]>
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-options "-O2 -ftrack-macro-expansion=0" } */
6 extern void* alloca (__SIZE_TYPE__
);
12 void test_alloca (unsigned n
)
14 /* Verify that alloca(0) is not diagnosed in a loop either. */
15 for (unsigned i
= 0; i
< n
; ++i
)
18 /* Verify no warnings for the loops below. */
19 for (unsigned i
= 0; i
< n
; ++i
)
22 for (unsigned i
= 1; i
< n
; ++i
)