]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/Walloca-larger-than-2.c
1 /* PR middle-end/82063 - issues with arguments enabled by -Wall
2 Verify that alloca() calls in loops are not diagnosed by default.
4 { dg-require-effective-target alloca }
5 { dg-options "-O2 -ftrack-macro-expansion=0" } */
7 extern void* alloca (__SIZE_TYPE__
);
13 void test_alloca (unsigned n
)
15 /* Verify that alloca(0) is not diagnosed in a loop either. */
16 for (unsigned i
= 0; i
< n
; ++i
)
19 /* Verify no warnings for the loops below. */
20 for (unsigned i
= 0; i
< n
; ++i
)
23 for (unsigned i
= 1; i
< n
; ++i
)