gcc/testsuite/gcc.c-torture/compile/20010113-1.c
raw| 1 | /* Origin: PR c/364 from [email protected], very much reduced to a |
| 2 | testcase by Joseph Myers <[email protected]>. |
| 3 | |
| 4 | The initializer of z is a valid address constant, and GCC 2.95.2 |
| 5 | accepts it as such. CVS GCC as of 2001-01-13 rejects it, but accepts |
| 6 | it if y is changed to x in the initializer. */ |
| 7 | |
| 8 | struct { |
| 9 | struct { |
| 10 | int x; |
| 11 | int y; |
| 12 | } p; |
| 13 | } v; |
| 14 | |
| 15 | int *z = &((&(v.p))->y); |