]> gcc.gnu.org Git - gcc.git/commitdiff
ipa-inline-transform.c (inline_call): Drop -fstrict-aliasing when inlining -fno-stric...
authorJan Hubicka <hubicka@ucw.cz>
Tue, 1 Dec 2015 04:13:26 +0000 (05:13 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Tue, 1 Dec 2015 04:13:26 +0000 (04:13 +0000)
* ipa-inline-transform.c (inline_call): Drop -fstrict-aliasing when
inlining -fno-strict-aliasing into -fstrict-aliasing body.
* gcc.dg/lto/alias-1_0.c: New testcase.
* gcc.dg/lto/alias-1_1.c: New testcase.

From-SVN: r231094

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/lto/alias-1_0.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/lto/alias-1_1.c [new file with mode: 0644]

index a68582dae91eca77ab698579510b419fec066ddf..a1c196251a290333c85435d1823956132c5e3272 100644 (file)
@@ -1,3 +1,8 @@
+2015-11-30  Jan Hubicka  <hubicka@ucw.cz>
+
+       * ipa-inline-transform.c (inline_call): Drop -fstrict-aliasing when
+       inlining -fno-strict-aliasing into -fstrict-aliasing body.
+
 2015-11-30  Aditya Kumar  <aditya.k7@samsung.com>
            Sebastian Pop  <s.pop@samsung.com>
 
index d3816a259e61c925e021715ebc7ec3e9330ee381..1a86d8779a60ed8bcdc8cd5be98197e50ceb58e3 100644 (file)
@@ -1,3 +1,8 @@
+2015-11-30  Jan Hubicka  <hubicka@ucw.cz>
+
+       * gcc.dg/lto/alias-1_0.c: New testcase.
+       * gcc.dg/lto/alias-1_1.c: New testcase.
+
 2015-11-30  Aditya Kumar  <aditya.k7@samsung.com>
            Sebastian Pop  <s.pop@samsung.com>
 
diff --git a/gcc/testsuite/gcc.dg/lto/alias-1_0.c b/gcc/testsuite/gcc.dg/lto/alias-1_0.c
new file mode 100644 (file)
index 0000000..48ef54f
--- /dev/null
@@ -0,0 +1,23 @@
+/* { dg-lto-do run } */
+/* { dg-lto-options { { -O2 -flto } } } */
+int val;
+
+__attribute__ ((used))
+int *ptr = &val;
+__attribute__ ((used))
+float *ptr2 = (void *)&val;
+
+extern void typefun(float val);
+
+void link_error (void);
+
+int
+main()
+{ 
+  *ptr=1;
+  typefun (0);
+  if (*ptr)
+    __builtin_abort ();
+  return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/lto/alias-1_1.c b/gcc/testsuite/gcc.dg/lto/alias-1_1.c
new file mode 100644 (file)
index 0000000..f9e08f3
--- /dev/null
@@ -0,0 +1,7 @@
+/* { dg-options "-fno-strict-aliasing" } */
+extern float *ptr2;
+void
+typefun (float val)
+{ 
+  *ptr2=val;
+}
This page took 0.118287 seconds and 5 git commands to generate.