OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [Warray-bounds-6.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { 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 f3(int v)
8
{
9
  int i,j = 0;
10
  for (i = 0; i <= v; i++)
11
    j++;
12
  return j;
13
}
14
 
15
static int f2(char formatstr[10][100]) {
16
  printf( "%d %s\n", 0, formatstr[f3(0)] );
17
  printf( "%d %s\n", 1, formatstr[f3(1)] );
18
  printf( "%d %s\n", 2, formatstr[f3(2)] );
19
  printf( "%d %s\n", 3, formatstr[f3(3)] );
20
  return 3;
21
}
22
 
23
static   char formatstr[10][100];
24
int main( void ) {
25
  int anz;
26
  anz = f2(formatstr);
27
  printf( "   %d\n",anz);
28
  return 0;
29
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.