Testcase for PR48100

Submitted by Richard Guenther on Dec. 7, 2011, 1:52 p.m.

Details

Message ID alpine.LNX.2.00.1112071451440.4527@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Guenther Dec. 7, 2011, 1:52 p.m.
Which got fixed on trunk.

Tested on x86_64-unknown-linux-gnu, applied.

Richard.

2011-12-07  Richard Guenther  <rguenther@suse.de>

	PR lto/48100
	* gcc.dg/lto/20111207-1_0.c: New testcase.
	* gcc.dg/lto/20111207-1_1.c: Likewise.
	* gcc.dg/lto/20111207-1_2.c: Likewise.
	* gcc.dg/lto/20111207-1_3.c: Likewise.

Patch hide | download patch | download mbox

Index: gcc/testsuite/gcc.dg/lto/20111207-1_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20111207-1_0.c	(revision 0)
+++ gcc/testsuite/gcc.dg/lto/20111207-1_0.c	(revision 0)
@@ -0,0 +1,4 @@ 
+/* { dg-lto-do run } */
+/* { dg-lto-options { { -flto } } } */
+/* { dg-require-linker-plugin "" } */
+/* { dg-extra-ld-options "-fuse-linker-plugin" } */
Index: gcc/testsuite/gcc.dg/lto/20111207-1_1.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20111207-1_1.c	(revision 0)
+++ gcc/testsuite/gcc.dg/lto/20111207-1_1.c	(revision 0)
@@ -0,0 +1,3 @@ 
+/* { dg-options "-fno-lto" } */
+
+int i;
Index: gcc/testsuite/gcc.dg/lto/20111207-1_2.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20111207-1_2.c	(revision 0)
+++ gcc/testsuite/gcc.dg/lto/20111207-1_2.c	(revision 0)
@@ -0,0 +1 @@ 
+int i;
Index: gcc/testsuite/gcc.dg/lto/20111207-1_3.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20111207-1_3.c	(revision 0)
+++ gcc/testsuite/gcc.dg/lto/20111207-1_3.c	(revision 0)
@@ -0,0 +1,6 @@ 
+extern int i;
+
+int main()
+{
+  return i;
+}