public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Add testcase for PR lto/60820
@ 2014-04-18  8:03 Dominique Dhumieres
  0 siblings, 0 replies; 2+ messages in thread
From: Dominique Dhumieres @ 2014-04-18  8:03 UTC (permalink / raw)
  To: gcc-patches; +Cc: hubicka

> this is stand alone testcase for that PR.
> Comitted to mainline.
> ...

The test fails on darwin with

/opt/gcc/work/gcc/testsuite/gcc.dg/lto/pr60820_0.c:13:1: warning: alias definitions not supported in Mach-O; ignored

TIA

Dominique

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Add testcase for PR lto/60820
@ 2014-04-17  2:42 Jan Hubicka
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Hubicka @ 2014-04-17  2:42 UTC (permalink / raw)
  To: gcc-patches

Hi,
this is stand alone testcase for that PR.
Comitted to mainline.

	PR lto/60820
	* gcc.dg/lto/pr60820_0.c: New testcase.
	* gcc.dg/lto/pr60820_1.c: New testcase.
	
Index: testsuite/gcc.dg/lto/pr60820_1.c
===================================================================
--- testsuite/gcc.dg/lto/pr60820_1.c	(revision 0)
+++ testsuite/gcc.dg/lto/pr60820_1.c	(revision 0)
@@ -0,0 +1,11 @@
+#include <stdio.h>
+struct in6_addr {int bah;};
+extern const struct in6_addr in6addr_any;
+static const struct in6_addr local_in6addr_any = {1};
+#pragma weak in6addr_any = local_in6addr_any
+
+__attribute__ ((used))
+void foo()
+{
+  fprintf (stderr, "v1: %p, v2: %p\n", &local_in6addr_any, &in6addr_any);
+}
Index: testsuite/gcc.dg/lto/pr60820_0.c
===================================================================
--- testsuite/gcc.dg/lto/pr60820_0.c	(revision 0)
+++ testsuite/gcc.dg/lto/pr60820_0.c	(revision 0)
@@ -0,0 +1,13 @@
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-flto -r -nostdlib -O2}} } */
+#include <stdio.h>
+struct in6_addr {int bah;};
+extern const struct in6_addr in6addr_any;
+static const struct in6_addr local_in6addr_any = {1};
+#pragma weak in6addr_any = local_in6addr_any
+
+__attribute__ ((used))
+void foo2()
+{
+  fprintf (stderr, "v1: %p, v2: %p\n", &local_in6addr_any, &in6addr_any);
+}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-18  8:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-18  8:03 Add testcase for PR lto/60820 Dominique Dhumieres
  -- strict thread matches above, loose matches on Subject: below --
2014-04-17  2:42 Jan Hubicka

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).