gcc/testsuite/gcc.c-torture/execute/alias-4.c
raw| 1 | /* { dg-require-alias "" } */ |
| 2 | int a = 1; |
| 3 | extern int b __attribute__ ((alias ("a"))); |
| 4 | int c = 1; |
| 5 | extern int d __attribute__ ((alias ("c"))); |
| 6 | int |
| 7 | main (int argc) |
| 8 | { |
| 9 | int *p; |
| 10 | int *q; |
| 11 | if (argc) |
| 12 | p = &a, q = &b; |
| 13 | else |
| 14 | p = &c, q = &d; |
| 15 | *p = 1; |
| 16 | *q = 2; |
| 17 | if (*p == 1) |
| 18 | __builtin_abort (); |
| 19 | return 0; |
| 20 | } |