[PATCH]: testsuite fixes for loadpre5.c/loadpre8.c with -fpic/-fPIC
Kaveh R. GHAZI
ghazi@caip.rutgers.edu
Fri Jan 11 06:44:00 GMT 2008
Hi Dan,
It looks like you wrote these two testcases. They fail with -fpic/-fPIC.
The patch below fixes them, but I wanted to double check whether adding
"static" changes the nature of the testcase or not. If you have another
approach, please let me know.
Tested via "make check" on x86_64-unknown-linux-gnu.
Okay for mainline and 4.2?
Thanks,
--Kaveh
2008-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/tree-ssa/loadpre5.c: Use static.
* gcc.dg/tree-ssa/loadpre8.c: Likewise.
diff -rup orig/egcc-SVN20080110/gcc/testsuite/gcc.dg/tree-ssa/loadpre5.c egcc-SVN20080110/gcc/testsuite/gcc.dg/tree-ssa/loadpre5.c
--- orig/egcc-SVN20080110/gcc/testsuite/gcc.dg/tree-ssa/loadpre5.c 2008-01-03 23:34:32.000000000 +0100
+++ egcc-SVN20080110/gcc/testsuite/gcc.dg/tree-ssa/loadpre5.c 2008-01-11 05:31:47.000000000 +0100
@@ -4,7 +4,7 @@ int p;
int r;
__attribute__ ((noinline))
-int a(void)
+static int a(void)
{
return p;
}
diff -rup orig/egcc-SVN20080110/gcc/testsuite/gcc.dg/tree-ssa/loadpre8.c egcc-SVN20080110/gcc/testsuite/gcc.dg/tree-ssa/loadpre8.c
--- orig/egcc-SVN20080110/gcc/testsuite/gcc.dg/tree-ssa/loadpre8.c 2008-01-03 23:34:32.000000000 +0100
+++ egcc-SVN20080110/gcc/testsuite/gcc.dg/tree-ssa/loadpre8.c 2008-01-11 05:41:17.000000000 +0100
@@ -24,7 +24,7 @@ typedef struct VEC_edge_base
{
}
VEC_edge_base;
-__attribute__ ((noinline)) edge
+__attribute__ ((noinline)) static edge
VEC_edge_base_index (const VEC_edge_base * vec_, unsigned ix_)
{
}
@@ -56,7 +56,7 @@ ei_start_1 (VEC_edge_gc ** ev)
i.container = ev;
return i;
}
-__attribute__ ((noinline)) ei_next (edge_iterator * i)
+__attribute__ ((noinline)) static ei_next (edge_iterator * i)
{
}
static __inline__ edge
@@ -75,7 +75,7 @@ static __inline__ tree
get_def_from_ptr (def_operand_p def)
{
}
-__attribute__ ((noinline)) tree
+__attribute__ ((noinline)) static tree
phi_nodes (basic_block bb)
{
}
More information about the Gcc-patches
mailing list