aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr81406_0.c20
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a053fcb..4fac001 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+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
diff --git a/gcc/testsuite/gcc.dg/lto/pr81406_0.c b/gcc/testsuite/gcc.dg/lto/pr81406_0.c
new file mode 100644
index 0000000..44ef3c7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr81406_0.c
@@ -0,0 +1,20 @@
+/* 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;
+}