gcc/testsuite/g++.dg/tree-ssa/pr15791-1.C
raw| 1 | /* { dg-do link } */ |
| 2 | /* { dg-additional-options -Wno-array-compare } */ |
| 3 | |
| 4 | void link_error (); |
| 5 | |
| 6 | int main () |
| 7 | { |
| 8 | struct { int b[2]; } x; |
| 9 | int b[2]; |
| 10 | if (&b[1] != &b[1]) |
| 11 | link_error (); |
| 12 | if (&b[0] != b) |
| 13 | link_error (); |
| 14 | if (b == &b[2]) |
| 15 | link_error (); |
| 16 | if (b != b) |
| 17 | link_error (); |
| 18 | if (&x.b[1] == &x.b[0]) |
| 19 | link_error (); |
| 20 | if (x.b != &x.b[0]) |
| 21 | link_error (); |
| 22 | if (&x.b[1] == x.b) |
| 23 | link_error (); |
| 24 | return 0; |
| 25 | } |
| 26 |