gcc/testsuite/gcc.c-torture/compile/920710-2.c
raw| 1 | /* { dg-additional-options "-std=gnu89" } */ |
| 2 | |
| 3 | union u |
| 4 | { |
| 5 | struct {unsigned h, l;} i; |
| 6 | double d; |
| 7 | }; |
| 8 | |
| 9 | foo (union u x) |
| 10 | { |
| 11 | while (x.i.h++) |
| 12 | { |
| 13 | while (x.i.l-- > 0) |
| 14 | ; |
| 15 | while (x.d++ > 0) |
| 16 | ; |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | union n |
| 21 | { |
| 22 | long long unsigned i; |
| 23 | double d; |
| 24 | }; |
| 25 | |
| 26 | bar (union n x) |
| 27 | { |
| 28 | int i; |
| 29 | for (i = 0; i < 100; i++) |
| 30 | { |
| 31 | while (--x.i > 0) |
| 32 | ; |
| 33 | while (++x.d > 0) |
| 34 | ; |
| 35 | } |
| 36 | return x.i; |
| 37 | } |
| 38 |