public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] Testcase for PR lto/81406
@ 2017-12-14 15:27 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2017-12-14 15:27 UTC (permalink / raw)
  To: gcc-patches

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-14 15:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-14 15:27 [committed] Testcase for PR lto/81406 Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).