PR target/55146
[official-gcc.git] / gcc / testsuite / gcc.dg / Warray-bounds-5.c
blobba9cd2aa03fc1121a1b9069d1793107893c1d313
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -Wall" } */
3 /* based on PR 37861 */
5 extern int printf (__const char *__restrict __format, ...);
7 static int f2(char formatstr[10][100])
9 int anz;
10 for( anz = 0; anz < 10; ++anz ) {
11 printf( "%d %s\n", anz, formatstr[anz] );
13 return anz;
17 static char formatstr[10][100];
18 int main( void )
20 int anz;
21 anz = f2(formatstr);
22 printf( " %d\n",anz);
23 return 0;