PR lto/81406
* gcc.dg/lto/pr81406_0.c: New test.
From-SVN: r255643
+2017-12-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR lto/81406
+ * gcc.dg/lto/pr81406_0.c: New test.
+
2017-12-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/66974
--- /dev/null
+/* PR lto/81406 */
+/* { dg-lto-do link } */
+/* { dg-lto-options { { -O2 -g -flto } } } */
+/* { dg-extra-ld-options { -g -r -nostdlib } } */
+
+int a;
+int *foo (void);
+
+static inline int __attribute__ ((__artificial__))
+bar (void)
+{
+ if (a)
+ *foo () = 2;
+}
+
+void *
+baz (void)
+{
+ return (void *) bar;
+}