This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH]: testsuite vect-ifcvt-9.c, Q: must "inline" go with attribute "always_inline"?
- From: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: janis187 at us dot ibm dot com
- Date: Fri, 11 Jan 2008 00:50:54 -0500 (EST)
- Subject: [PATCH]: testsuite vect-ifcvt-9.c, Q: must "inline" go with attribute "always_inline"?
Another testcase that fails on all branches with -fpic/-fPIC. I believe
the problem here is that for the testcase to work, it wants to inline
something using __attribute__((always_inline)). But AFAICT, in order for
that attribute to be effective you must also use the "inline" keyword.
Perhaps someone can confirm?
Anyway, patch fixes the testcase with -fpic/-fPIC. Tested on
x86_64-unknown-linux-gnu via "make check".
Okay for mainline/4.2/4.1?
Thanks,
--Kaveh
2008-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/vect/vect-ifcvt-9.c: Use inline.
diff -rup orig/egcc-SVN20080110/gcc/testsuite/gcc.dg/vect/vect-ifcvt-9.c egcc-SVN20080110/gcc/testsuite/gcc.dg/vect/vect-ifcvt-9.c
--- orig/egcc-SVN20080110/gcc/testsuite/gcc.dg/vect/vect-ifcvt-9.c 2008-01-03 23:34:40.000000000 +0100
+++ egcc-SVN20080110/gcc/testsuite/gcc.dg/vect/vect-ifcvt-9.c 2008-01-11 06:35:01.000000000 +0100
@@ -12,7 +12,7 @@ extern void abort(void);
int A[N] = {36,39,42,45,43,32,21,12,23,34,45,56,67,78,89,11};
int B[N] = {0,0,42,42,42,0,0,0,0,0,42,42,42,42,42,0};
-void foo () __attribute__((always_inline));
+inline void foo () __attribute__((always_inline));
void foo ()
{
int i, j;