diff mbox

[testsuite] fix target/PR49614

Message ID 253AEBCB-9D4D-47C1-A63F-7C71D3DB2227@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

Iain Sandoe Sept. 8, 2011, 8:19 a.m. UTC
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?
Iain

gcc/testsuite:
	PR target/49614
	* gcc.dg/vmx/gcc-bug-i.c (inline_me): Declare 'inline'.

Comments

Mike Stump Sept. 8, 2011, 6:02 p.m. UTC | #1
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.
Richard Biener Sept. 9, 2011, 6:52 a.m. UTC | #2
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.
Dominique d'Humières Sept. 9, 2011, 9:03 a.m. UTC | #3
> 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
Richard Biener Sept. 9, 2011, 9:16 a.m. UTC | #4
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
>
Andreas Schwab Sept. 9, 2011, 9:17 a.m. UTC | #5
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.
diff mbox

Patch

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;