[PATCH, TESTSUITE]: Fix extra testsuite failures with -fpic/-fPIC.
Kaveh R. GHAZI
ghazi@caip.rutgers.edu
Fri Aug 21 17:48:00 GMT 2009
I get several extra "failures" when running the testsuite with
-fpic/-fPIC. They're all fixed by adding -fpie so that functions bind
locally and/or the necessarily optimizations can occur.
Tested via "make check" with -fpic/-fPIC passes on
x86_64-unknown-linux-gnu. Okay for mainline?
Thanks,
--Kaveh
2009-08-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/tree-ssa/inline-3.c: Add -fpie when pic.
* gcc.dg/tree-ssa/local-pure-const.c: Likewise.
* gfortran.dg/whole_file_5.f90: Likewise.
diff -rup orig/egcc-SVN20090821/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c egcc-SVN20090821/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c
--- orig/egcc-SVN20090821/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c 2009-05-27 02:00:59.000000000 +0200
+++ egcc-SVN20090821/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c 2009-08-21 15:47:10.000000000 +0200
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-einline2" } */
+/* { dg-options "-O2 -fdump-tree-einline2 -fpie" { target { ! nonpic } } } */
extern void inlined ();
void inline_me_too (void);
void inline_through_me (void (*ptr)(void));
diff -rup orig/egcc-SVN20090821/gcc/testsuite/gcc.dg/tree-ssa/local-pure-const.c egcc-SVN20090821/gcc/testsuite/gcc.dg/tree-ssa/local-pure-const.c
--- orig/egcc-SVN20090821/gcc/testsuite/gcc.dg/tree-ssa/local-pure-const.c 2009-07-03 02:01:22.000000000 +0200
+++ egcc-SVN20090821/gcc/testsuite/gcc.dg/tree-ssa/local-pure-const.c 2009-08-21 15:53:49.000000000 +0200
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-local-pure-const1" } */
+/* { dg-options "-O1 -fdump-tree-local-pure-const1 -fpie" { target { ! nonpic } } } */
t(int a, int b, int c)
{
int *p;
diff -rup orig/egcc-SVN20090821/gcc/testsuite/gfortran.dg/whole_file_5.f90 egcc-SVN20090821/gcc/testsuite/gfortran.dg/whole_file_5.f90
--- orig/egcc-SVN20090821/gcc/testsuite/gfortran.dg/whole_file_5.f90 2009-04-27 02:00:52.000000000 +0200
+++ egcc-SVN20090821/gcc/testsuite/gfortran.dg/whole_file_5.f90 2009-08-21 15:58:50.000000000 +0200
@@ -1,5 +1,6 @@
! { dg-do "compile" }
! { dg-options "-O3 -fwhole-file -fdump-tree-optimized" }
+! { dg-options "-O3 -fwhole-file -fdump-tree-optimized -fpie" { target { ! nonpic } } }
!
! Check that inlining of functions declared BEFORE usage works.
! If yes, then the dump does not contain a call to F().
More information about the Gcc-patches
mailing list