gcc/testsuite/gcc.c-torture/compile/20000511-1.c
raw| 1 | /* { dg-additional-options "-std=gnu89" } */ |
| 2 | |
| 3 | typedef struct { |
| 4 | char y; |
| 5 | char x[32]; |
| 6 | } X; |
| 7 | |
| 8 | int z (void) |
| 9 | { |
| 10 | X xxx; |
| 11 | xxx.x[0] = |
| 12 | xxx.x[31] = '0'; |
| 13 | xxx.y = 0xf; |
| 14 | return f (xxx, xxx); |
| 15 | } |
| 16 | |
| 17 | int main (void) |
| 18 | { |
| 19 | int val; |
| 20 | |
| 21 | val = z (); |
| 22 | if (val != 0x60) |
| 23 | abort (); |
| 24 | exit (0); |
| 25 | } |
| 26 | |
| 27 | int f(X x, X y) |
| 28 | { |
| 29 | if (x.y != y.y) |
| 30 | return 'F'; |
| 31 | |
| 32 | return x.x[0] + y.x[0]; |
| 33 | } |