OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [pr42049.c] - Blame information for rev 297

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
/* PR middle-end/42049 */
2
 
3
extern char *strcpy (char *s1, const char *s2);
4
struct S { char s[4]; };
5
 
6
int
7
foo (int x, char **y)
8
{
9
  char const *a;
10
  char const *b;
11
  struct S s[9];
12
  long i;
13
  if (x > 1)
14
    a = y[1];
15
  else
16
    a = "abc";
17
  if (x > 2)
18
    b = y[2];
19
  else
20
    b = "def";
21
  strcpy (s[0].s, a);
22
  strcpy (s[1].s, b);
23
  for (i = 2; i < x - 2 && i < 8; i++)
24
    strcpy (s[i].s, y[i + 1]);
25
  s[i].s[0] = '\0';
26
  return 0;
27
}

powered by: WebSVN 2.1.0

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