summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2016-01-15 12:02:29 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2016-01-15 11:02:29 +0000
commit0f6176e67c84ffe19978aaad568d5e9996890fb3 (patch)
treeb178e327a01abe93abcf88ed3ca820b469f4f1d9
parent824ca15e298a60f8ea31e433dd23327f86ee2227 (diff)
downloadgcc-0f6176e67c84ffe19978aaad568d5e9996890fb3.tar.gz
* gcc.c-torture/execute/alias-4.c: New testcase.
From-SVN: r232411
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/alias-4.c19
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 409c42f0172..d949b835034 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 00000000000..6c6c9587b45
--- /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;
+}