* 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
+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>
+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>
--- /dev/null
+/* { 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;
+}
+
--- /dev/null
+/* { dg-options "-fno-strict-aliasing" } */
+extern float *ptr2;
+void
+typefun (float val)
+{
+ *ptr2=val;
+}