Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/Warray-bounds-5.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-options "-O3 -Wall" } */ | |
3 /* based on PR 37861 */ | |
4 | |
5 extern int printf (__const char *__restrict __format, ...); | |
6 | |
7 static int f2(char formatstr[10][100]) | |
8 { | |
9 int anz; | |
10 for( anz = 0; anz < 10; ++anz ) { | |
11 printf( "%d %s\n", anz, formatstr[anz] ); | |
12 } | |
13 return anz; | |
14 } | |
15 | |
16 | |
17 static char formatstr[10][100]; | |
18 int main( void ) | |
19 { | |
20 int anz; | |
21 anz = f2(formatstr); | |
22 printf( " %d\n",anz); | |
23 return 0; | |
24 } |