Message ID | 253AEBCB-9D4D-47C1-A63F-7C71D3DB2227@sandoe-acoustics.co.uk |
---|---|
State | New |
Headers | show |
On Sep 8, 2011, at 1:19 AM, Iain Sandoe wrote: > gcc.dg/vmx/gcc-bug-i.c is failing for powerpc*-*-* > with: > Excess errors: /opt/gcc/work/gcc/testsuite/gcc.dg/vmx/gcc-bug-i.c:16:22: warning: always_inline function might not be inlinable [-Wattributes] > this is because the function in question is declared: > static DO_INLINE int inline_me(vector signed short data) ; > where: > #define DO_INLINE __attribute__ ((always_inline)) > so, unless __attribute__ ((always_inline)) is intended to imply "inline", the fix below is proposed, > OK for trunk? I'd like an inline person to comment on this.
On Thu, Sep 8, 2011 at 8:02 PM, Mike Stump <mikestump@comcast.net> wrote: > On Sep 8, 2011, at 1:19 AM, Iain Sandoe wrote: >> gcc.dg/vmx/gcc-bug-i.c is failing for powerpc*-*-* >> with: >> Excess errors: /opt/gcc/work/gcc/testsuite/gcc.dg/vmx/gcc-bug-i.c:16:22: warning: always_inline function might not be inlinable [-Wattributes] >> this is because the function in question is declared: >> static DO_INLINE int inline_me(vector signed short data) ; >> where: >> #define DO_INLINE __attribute__ ((always_inline)) >> so, unless __attribute__ ((always_inline)) is intended to imply "inline", the fix below is proposed, >> OK for trunk? > > I'd like an inline person to comment on this. A function not declared inline with an always_inline attribute is a bug. So, the patch looks ok to me. Richard.
> A function not declared inline with an always_inline attribute is a bug.
If the test case is buggy, why is it not spotted on non ppc platforms?
Dominique
On Fri, Sep 9, 2011 at 11:03 AM, Dominique Dhumieres <dominiq@lps.ens.fr> wrote: >> A function not declared inline with an always_inline attribute is a bug. > > If the test case is buggy, why is it not spotted on non ppc platforms? because it's not run on anything besides ppc > Dominique >
dominiq@lps.ens.fr (Dominique Dhumieres) writes:
> If the test case is buggy, why is it not spotted on non ppc platforms?
Because it's not run on other platforms.
Andreas.
Index: gcc/testsuite/gcc.dg/vmx/gcc-bug-i.c =================================================================== --- gcc/testsuite/gcc.dg/vmx/gcc-bug-i.c (revision 177459) +++ gcc/testsuite/gcc.dg/vmx/gcc-bug-i.c (working copy) @@ -13,7 +13,7 @@ #define DO_INLINE __attribute__ ((always_inline)) #define DONT_INLINE __attribute__ ((noinline)) -static DO_INLINE int inline_me(vector signed short data) +static inline DO_INLINE int inline_me(vector signed short data) { union {vector signed short v; signed short s[8];} u; u.v = data;