[4.2 PATCH]: testsuite fix gcc.dg/pr29254.c with -fpic/-fPIC
Kaveh R. GHAZI
ghazi@caip.rutgers.edu
Fri Jan 25 11:33:00 GMT 2008
The testcase gcc.dg/pr29254.c fails with -fpic/-fPIC on the 4.2 branch:
http://gcc.gnu.org/ml/gcc-testresults/2008-01/msg01179.html
The testcase in 4.2 appears to rely on inlining a global function which
doesn't happen in pic mode. On mainline it passes because this area of
the compiler and the testcase itself were modified. However the audit
trail indicates that the patch is too hairy to backport to the branches.
See PR29478 especially comment#19.
So instead I've made the function static so it always gets inlined.
Okay for 4.2?
Thanks,
--Kaveh
2008-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/pr29254.c (func1): Mark static when pic.
diff -rup orig/egcc-4.2-SVN20080124/gcc/testsuite/gcc.dg/pr29254.c egcc-4.2-SVN20080124/gcc/testsuite/gcc.dg/pr29254.c
--- orig/egcc-4.2-SVN20080124/gcc/testsuite/gcc.dg/pr29254.c 2008-01-03 23:34:57.000000000 +0100
+++ egcc-4.2-SVN20080124/gcc/testsuite/gcc.dg/pr29254.c 2008-01-25 06:25:44.000000000 +0100
@@ -8,6 +8,9 @@ list_compare (int * list1)
value_compare ();
}
+#ifdef __PIC__
+static
+#endif
func1 (int * f){}
value_compare (int * a)
More information about the Gcc-patches
mailing list