This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH TESTSUITE]: fix gcc.dg/tree-ssa/inline-2.c with -fpic/-fPIC
- From: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 6 Nov 2008 00:27:33 -0500 (EST)
- Subject: [PATCH TESTSUITE]: fix gcc.dg/tree-ssa/inline-2.c with -fpic/-fPIC
This patch fixes gcc.dg/tree-ssa/inline-2.c when run with -fpic/-fPIC.
The function foo() must be inlined for the test to succeed, and it is
marked with attribute "always_inline". However my understanding from
the docs is that this attribute is a noop unless you add the "inline"
keyword as well.
Patch tested via "make check" on x86_64-unknown-linux-gnu with extra
-fpic/-fPIC passes. The test succeeds with the patch.
Okay for mainline?
Thanks,
--Kaveh
2008-11-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/tree-ssa/inline-2.c (foo): Add 'inline' keyword.
diff -rup orig/egcc-SVN20081105/gcc/testsuite/gcc.dg/tree-ssa/inline-2.c egcc-SVN20081105/gcc/testsuite/gcc.dg/tree-ssa/inline-2.c
--- orig/egcc-SVN20081105/gcc/testsuite/gcc.dg/tree-ssa/inline-2.c 2008-08-10 02:01:51.000000000 +0200
+++ egcc-SVN20081105/gcc/testsuite/gcc.dg/tree-ssa/inline-2.c 2008-11-05 21:24:02.000000000 +0100
@@ -5,7 +5,7 @@
and the call to link_error optimized away. */
extern void link_error (void);
-int __attribute__((always_inline)) foo(void) { return 0; }
+inline int __attribute__((always_inline)) foo(void) { return 0; }
int main()
{