This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Testcase for PR lto/81406
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 14 Dec 2017 16:27:38 +0100
- Subject: [committed] Testcase for PR lto/81406
- Authentication-results: sourceware.org; auth=none
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
This got fixed by r251220. Testcase tested on x86_64-linux,
trunk as well as r251218 (where it FAILs), committed to trunk as obvious.
2017-12-14 Jakub Jelinek <jakub@redhat.com>
PR lto/81406
* gcc.dg/lto/pr81406_0.c: New test.
--- gcc/testsuite/gcc.dg/lto/pr81406_0.c.jj 2017-12-14 16:20:44.867849609 +0100
+++ gcc/testsuite/gcc.dg/lto/pr81406_0.c 2017-12-14 16:17:34.000000000 +0100
@@ -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;
+}
Jakub