Patchwork Fix some LTO -fPIC testcases

login
register
mail settings
Submitter Bernd Schmidt
Date March 22, 2011, 3:17 p.m.
Message ID <4D88BD7B.4090008@codesourcery.com>
Download mbox | patch
Permalink /patch/87936/
State New
Headers show

Comments

Bernd Schmidt - March 22, 2011, 3:17 p.m.
On targets where -fpic/-fPIC produce an error, we currently fail a large
number of LTO testcases. These should be using the appropriate
dg-require-effective-target so that they don't get run. Ok?


Bernd
* g++.dg/lto/20091002-1_0.C: Use "dg-require-effective-target fpic".
	* g++.dg/lto/20091002-2_0.C: Likewise.
	* g++.dg/lto/20091004-1_0.C: Likewise.
	* g++.dg/lto/20091002-3_0.C: Likewise.
	* g++.dg/lto/20091004-2_0.C: Likewise.
	* g++.dg/lto/20081123_0.C: Likewise.
	* g++.dg/lto/20090313_0.C: Likewise.
	* g++.dg/lto/20081109-1_0.C: Likewise.
	* g++.dg/lto/20081219_0.C: Likewise.
	* g++.dg/lto/20081204-1_0.C: Likewise.
	* g++.dg/lto/20090302_0.C: Likewise.
	* g++.dg/lto/20081119-1_0.C: Likewise.
	* g++.dg/lto/20081118_0.C: Likewise.
	* gcc.dg/lto/20091020-2_0.c: Likewise.
	* gcc.dg/lto/20090210_0.c: Likewise.
	* gcc.dg/lto/20081204-1_0.c: Likewise.
	* gcc.dg/lto/20081224_0.c: Likewise.
	* gcc.dg/lto/20090219_0.c: Likewise.
	* gcc.dg/lto/20091014-1_0.c: Likewise.
	* gcc.dg/lto/20091016-1_0.c: Likewise.
	* gcc.dg/lto/20090206-2_0.c: Likewise.
	* gcc.dg/lto/20090116_0.c: Likewise.
	* gcc.dg/lto/20091013-1_0.c: Likewise.
	* gcc.dg/lto/20091015-1_0.c: Likewise.
	* gcc.dg/lto/20090126-2_0.c: Likewise.
Richard Guenther - March 22, 2011, 3:19 p.m.
On Tue, Mar 22, 2011 at 4:17 PM, Bernd Schmidt <bernds@codesourcery.com> wrote:
> On targets where -fpic/-fPIC produce an error, we currently fail a large
> number of LTO testcases. These should be using the appropriate
> dg-require-effective-target so that they don't get run. Ok?

Ok.

Thanks,
Richard.

>
> Bernd
>

Patch

Index: gcc/testsuite/g++.dg/lto/20091002-1_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20091002-1_0.C.orig
+++ gcc/testsuite/g++.dg/lto/20091002-1_0.C
@@ -1,4 +1,5 @@ 
 // { dg-lto-do link }
+// { dg-require-effective-target fpic }
 // { dg-lto-options {{-fPIC -flto}} }
 // { dg-extra-ld-options "-fPIC -r -nostdlib" }
 
Index: gcc/testsuite/g++.dg/lto/20091002-2_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20091002-2_0.C.orig
+++ gcc/testsuite/g++.dg/lto/20091002-2_0.C
@@ -1,4 +1,5 @@ 
 // { dg-lto-do link }
+// { dg-require-effective-target fpic }
 // { dg-lto-options {{-fPIC}} }
 // { dg-extra-ld-options "-fPIC -r -nostdlib" }
 
Index: gcc/testsuite/g++.dg/lto/20091002-3_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20091002-3_0.C.orig
+++ gcc/testsuite/g++.dg/lto/20091002-3_0.C
@@ -1,4 +1,5 @@ 
 // { dg-lto-do link }
+// { dg-require-effective-target fpic }
 // { dg-lto-options {{-fPIC}} }
 // { dg-extra-ld-options "-fPIC -r -nostdlib" }
 
Index: gcc/testsuite/g++.dg/lto/20091004-1_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20091004-1_0.C.orig
+++ gcc/testsuite/g++.dg/lto/20091004-1_0.C
@@ -1,4 +1,5 @@ 
 // { dg-lto-do link }
+// { dg-require-effective-target fpic }
 // { dg-lto-options {{-fPIC -O -flto}} }
 
 typedef double Real;
Index: gcc/testsuite/g++.dg/lto/20091004-2_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20091004-2_0.C.orig
+++ gcc/testsuite/g++.dg/lto/20091004-2_0.C
@@ -1,4 +1,5 @@ 
 // { dg-lto-do link }
+// { dg-require-effective-target fpic }
 // { dg-lto-options {{-fPIC -O -flto}} }
 
 typedef double Real;
Index: gcc/testsuite/g++.dg/lto/20081123_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081123_0.C.orig
+++ gcc/testsuite/g++.dg/lto/20081123_0.C
@@ -1,4 +1,5 @@ 
 // { dg-lto-do link }
+// { dg-require-effective-target fpic }
 // { dg-lto-options {{-flto -flto-partition=1to1 -r -nostdlib -fPIC}} }
 
 int
Index: gcc/testsuite/g++.dg/lto/20090313_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20090313_0.C.orig
+++ gcc/testsuite/g++.dg/lto/20090313_0.C
@@ -1,4 +1,5 @@ 
 // { dg-lto-do link }
+// { dg-require-effective-target fpic }
 // { dg-lto-options {{-flto -flto-partition=1to1 -fPIC}} }
 // { dg-extra-ld-options "-flto -flto-partition=1to1 -r -nostdlib" }
 
Index: gcc/testsuite/g++.dg/lto/20081109-1_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081109-1_0.C.orig
+++ gcc/testsuite/g++.dg/lto/20081109-1_0.C
@@ -1,4 +1,5 @@ 
 // { dg-lto-do link }
+// { dg-require-effective-target fpic }
 // { dg-lto-options {{-fPIC -flto -flto-partition=1to1}} }
 // { dg-extra-ld-options "-fPIC -flto -flto-partition=1to1 -r -nostdlib -fno-exceptions" }
 void func(); class Foo { };
Index: gcc/testsuite/g++.dg/lto/20081219_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081219_0.C.orig
+++ gcc/testsuite/g++.dg/lto/20081219_0.C
@@ -1,4 +1,5 @@ 
 // { dg-lto-do link }
+// { dg-require-effective-target fpic }
 // { dg-lto-options {{-fPIC -flto -flto-partition=1to1 -O2}} }
 // { dg-extra-ld-options "-O2 -fPIC -flto -flto-partition=1to1 -r -nostdlib" }
 
Index: gcc/testsuite/g++.dg/lto/20081204-1_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081204-1_0.C.orig
+++ gcc/testsuite/g++.dg/lto/20081204-1_0.C
@@ -1,4 +1,5 @@ 
 /* { dg-lto-do link } */
+/* { dg-require-effective-target fpic } */
 /* { dg-lto-options {{-flto -flto-partition=1to1 -fPIC -r -nostdlib}} } */
 
 /* Tests for the absence during linking of:
Index: gcc/testsuite/g++.dg/lto/20090302_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20090302_0.C.orig
+++ gcc/testsuite/g++.dg/lto/20090302_0.C
@@ -1,4 +1,5 @@ 
 /* { dg-lto-do link } */
+/* { dg-require-effective-target fpic } */
 /* { dg-lto-options {{-fPIC -flto -flto-partition=1to1 -r -nostdlib}} } */
 struct Foo {
   bool Mumble();
Index: gcc/testsuite/g++.dg/lto/20081119-1_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081119-1_0.C.orig
+++ gcc/testsuite/g++.dg/lto/20081119-1_0.C
@@ -1,4 +1,5 @@ 
 /* { dg-lto-do link } */
+/* { dg-require-effective-target fpic } */
 /* { dg-lto-options {{-fPIC -flto -flto-partition=1to1 -r -nostdlib}} } */
 
 #include "20081119-1.h"
Index: gcc/testsuite/g++.dg/lto/20081118_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081118_0.C.orig
+++ gcc/testsuite/g++.dg/lto/20081118_0.C
@@ -1,4 +1,5 @@ 
 /* { dg-lto-do link } */
+/* { dg-require-effective-target fpic } */
 /* { dg-lto-options {{-fPIC -flto -flto-partition=1to1 -r -nostdlib}} } */
 
 /* We used to ICE because of dangling pointers.  */
Index: gcc/testsuite/gcc.dg/lto/20091014-1_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20091014-1_0.c.orig
+++ gcc/testsuite/gcc.dg/lto/20091014-1_0.c
@@ -1,4 +1,5 @@ 
 /* { dg-lto-do link } */
+/* { dg-require-effective-target fpic } */
 /* { dg-lto-options {{-fPIC -r -nostdlib -flto}} } */
 
 /* Empty file.  See PR41173.  */
Index: gcc/testsuite/gcc.dg/lto/20091016-1_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20091016-1_0.c.orig
+++ gcc/testsuite/gcc.dg/lto/20091016-1_0.c
@@ -1,4 +1,5 @@ 
 /* { dg-lto-do link } */
+/* { dg-require-effective-target fpic } */
 /* { dg-lto-options {{-fPIC -r -nostdlib -O2 -flto}} } */
 
 typedef struct VEC_constructor_elt_gc { } VEC_constructor_elt_gc;
Index: gcc/testsuite/gcc.dg/lto/20090206-2_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20090206-2_0.c.orig
+++ gcc/testsuite/gcc.dg/lto/20090206-2_0.c
@@ -1,5 +1,6 @@ 
 /* { dg-lto-do link } */
 /* { dg-skip-if "" { ! { i?86-*-linux* x86_64-*-linux* } } { "*" } { "" } } */
+/* { dg-require-effective-target fpic } */
 /* { dg-lto-options {{-flto -flto-partition=1to1 -fPIC}} } */
 /* { dg-suppress-ld-options {-fPIC} } */
 
Index: gcc/testsuite/gcc.dg/lto/20090116_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20090116_0.c.orig
+++ gcc/testsuite/gcc.dg/lto/20090116_0.c
@@ -1,4 +1,5 @@ 
 /* { dg-lto-do link } */
+/* { dg-require-effective-target fpic } */
 /* { dg-lto-options {{-O1 -flto -flto-partition=1to1 -fPIC}} } */
 /* { dg-extra-ld-options {-r -nostdlib -O0} } */
 
Index: gcc/testsuite/gcc.dg/lto/20091013-1_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20091013-1_0.c.orig
+++ gcc/testsuite/gcc.dg/lto/20091013-1_0.c
@@ -1,4 +1,5 @@ 
 /* { dg-lto-do link } */
+/* { dg-require-effective-target fpic } */
 /* { dg-lto-options {{-fPIC -r -nostdlib -flto} {-fPIC -r -nostdlib -O2 -flto}} } */
 
 void * HeapAlloc(void*,unsigned int,unsigned long);
Index: gcc/testsuite/gcc.dg/lto/20091015-1_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20091015-1_0.c.orig
+++ gcc/testsuite/gcc.dg/lto/20091015-1_0.c
@@ -1,4 +1,5 @@ 
 /* { dg-lto-do link } */
+/* { dg-require-effective-target fpic } */
 /* { dg-lto-options {{-fPIC -r -nostdlib -O2 -flto} {-fPIC -r -nostdlib -O2 -flto -flto-partition=1to1}} } */
 
 #include "20091015-1_b.h"
Index: gcc/testsuite/gcc.dg/lto/20090126-2_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20090126-2_0.c.orig
+++ gcc/testsuite/gcc.dg/lto/20090126-2_0.c
@@ -1,4 +1,5 @@ 
 /* { dg-lto-do link } */
+/* { dg-require-effective-target fpic } */
 /* { dg-lto-options {{-fPIC -O2 -flto -flto-partition=1to1}} } */
 /* { dg-extra-ld-options {-fno-PIC -r -nostdlib -O2 -flto -flto-partition=1to1} } */
 
Index: gcc/testsuite/gcc.dg/lto/20091020-1_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20091020-1_0.c.orig
+++ gcc/testsuite/gcc.dg/lto/20091020-1_0.c
@@ -1,4 +1,5 @@ 
 /* { dg-lto-do link } */
+/* { dg-require-effective-target fpic } */
 /* { dg-lto-options {{-fPIC -r -nostdlib -flto}} } */
 
 typedef struct {
Index: gcc/testsuite/gcc.dg/lto/20091020-2_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20091020-2_0.c.orig
+++ gcc/testsuite/gcc.dg/lto/20091020-2_0.c
@@ -1,4 +1,5 @@ 
 /* { dg-lto-do link } */
+/* { dg-require-effective-target fpic } */
 /* { dg-lto-options {{-fPIC -r -nostdlib -flto}} } */
 
 typedef struct {
Index: gcc/testsuite/gcc.dg/lto/20090210_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20090210_0.c.orig
+++ gcc/testsuite/gcc.dg/lto/20090210_0.c
@@ -1,4 +1,5 @@ 
 /* { dg-lto-do run }  */
+/* { dg-require-effective-target fpic } */
 /* { dg-suppress-ld-options {-fPIC} }  */
 /* { dg-require-effective-target tls } */
 /* { dg-extra-ld-options "-pthread" { target *-*-solaris2.[89] } } */
Index: gcc/testsuite/gcc.dg/lto/20081204-1_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20081204-1_0.c.orig
+++ gcc/testsuite/gcc.dg/lto/20081204-1_0.c
@@ -1,4 +1,5 @@ 
 /* { dg-lto-do link } */
+/* { dg-require-effective-target fpic } */
 /* { dg-lto-options {{-flto -flto-partition=1to1 -fPIC -r -nostdlib}} } */
 
 /* Tests for the absence during linking of:
Index: gcc/testsuite/gcc.dg/lto/20081224_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20081224_0.c.orig
+++ gcc/testsuite/gcc.dg/lto/20081224_0.c
@@ -1,4 +1,5 @@ 
 /* { dg-lto-do link } */
+/* { dg-require-effective-target fpic } */
 /* { dg-lto-options {{-flto -flto-partition=1to1 -r -nostdlib -fPIC}} } */
 #include "20081224_0.h"
 
Index: gcc/testsuite/gcc.dg/lto/20090219_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20090219_0.c.orig
+++ gcc/testsuite/gcc.dg/lto/20090219_0.c
@@ -1,4 +1,5 @@ 
 /* { dg-lto-do link } */
+/* { dg-require-effective-target fpic } */
 /* { dg-lto-options {{-O3 -flto -flto-partition=1to1 -fPIC -r -nostdlib}} } */
 
 struct Foo { int f1, f2, f3, f4, f5; };