diff options
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/alias-4.c | 19 |
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 409c42f0..d949b83 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2016-01-15 Jan Hubicka <hubicka@ucw.cz> + * gcc.c-torture/execute/alias-4.c: New testcase. + +2016-01-15 Jan Hubicka <hubicka@ucw.cz> + PR ipa/68148 * g++.dg/ipa/devirt-49.C: New testcase. diff --git a/gcc/testsuite/gcc.c-torture/execute/alias-4.c b/gcc/testsuite/gcc.c-torture/execute/alias-4.c new file mode 100644 index 0000000..6c6c958 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/alias-4.c @@ -0,0 +1,19 @@ +/* { dg-require-alias "" } */ +int a = 1; +extern int b __attribute__ ((alias ("a"))); +int c = 1; +extern int d __attribute__ ((alias ("c"))); +main (int argc) +{ + int *p; + int *q; + if (argc) + p = &a, q = &b; + else + p = &c, q = &d; + *p = 1; + *q = 2; + if (*p == 1) + __builtin_abort (); + return 0; +} |