[PATCH INSTALLED]: fix tree-ssa/inline-4.c with -fpic/-fPIC passes
Kaveh R. GHAZI
ghazi@caip.rutgers.edu
Wed Feb 10 03:55:00 GMT 2010
A recently added testcase (tree-ssa/inline-4.c) errors with -fpic or
-fPIC on the trunk and 4.4 branch:
http://gcc.gnu.org/ml/gcc-testresults/2010-02/msg00834.html
http://gcc.gnu.org/ml/gcc-testresults/2010-02/msg00835.html
It's another instance of the testcase expecting global functions to
bind locally, which isn't the case with pic. Fixed on the trunk and
4.4 branch via patches below. (The 4.4. branch doesn't have the
bind_pic_locally testsuite infrastructure, so I do it manually.)
Tested on x86_64-unknown-linux-gnu, installed as obvious.
--Kaveh
2010-02-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/tree-ssa/inline-4.c: Bind pic locally.
diff -rup orig/egcc-SVN20100209/gcc/testsuite/gcc.dg/tree-ssa/inline-4.c egcc-SVN20100209/gcc/testsuite/gcc.dg/tree-ssa/inline-4.c
--- orig/egcc-SVN20100209/gcc/testsuite/gcc.dg/tree-ssa/inline-4.c 2010-02-08 19:08:24.000000000 +0100
+++ egcc-SVN20100209/gcc/testsuite/gcc.dg/tree-ssa/inline-4.c 2010-02-09 05:46:04.000000000 +0100
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-einline2" } */
+/* { dg-add-options bind_pic_locally } */
extern int rand(void);
diff -rup orig/egcc-4.4-SVN20100209/gcc/testsuite/gcc.dg/tree-ssa/inline-4.c egcc-4.4-SVN20100209/gcc/testsuite/gcc.dg/tree-ssa/inline-4.c
--- orig/egcc-4.4-SVN20100209/gcc/testsuite/gcc.dg/tree-ssa/inline-4.c 2010-02-09 02:04:28.000000000 +0100
+++ egcc-4.4-SVN20100209/gcc/testsuite/gcc.dg/tree-ssa/inline-4.c 2010-02-09 05:47:32.000000000 +0100
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-einline2" } */
+/* { dg-options "-O2 -fdump-tree-einline2 -fpie" { target { ! nonpic } } } */
extern int rand(void);
More information about the Gcc-patches
mailing list