Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/Walloca-7.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-require-effective-target alloca } */ | |
3 /* { dg-options "-Walloca -O0" } */ | |
4 | |
5 extern void f(void *); | |
6 | |
7 void foo(void) | |
8 { | |
9 // Test that strict -Walloca works even without optimization. | |
10 f (__builtin_alloca(500)); // { dg-warning "use of 'alloca'" } | |
11 } | |
12 | |
13 void bar(void) | |
14 { | |
15 // Test that we warn on alloca() calls, not just __builtin_alloca calls. | |
16 extern void *alloca(__SIZE_TYPE__); | |
17 f (alloca (123)); // { dg-warning "use of 'alloca'" } | |
18 } |