Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/20040423-1.c

raw
1 void abort (void);
2
3 int
4 sub1 (int i, int j)
5 {
6 typedef struct
7 {
8 int c[i+2];
9 }c;
10 int x[10], y[10];
11
12 if (j == 2)
13 {
14 __builtin_memcpy (x, y, 10 * sizeof (int));
15 return sizeof (c);
16 }
17 else
18 return sizeof (c) * 3;
19 }
20
21 int
22 main ()
23 {
24 typedef struct
25 {
26 int c[22];
27 }c;
28 if (sub1 (20, 3) != sizeof (c)*3)
29 abort ();
30
31 return 0;
32 }