public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, testsuite] fix target/PR49614
@ 2011-09-08 12:02 Iain Sandoe
  2011-09-08 18:26 ` Mike Stump
  0 siblings, 1 reply; 6+ messages in thread
From: Iain Sandoe @ 2011-09-08 12:02 UTC (permalink / raw)
  To: GCC Patches; +Cc: Dominique Dhumieres

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'.

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;



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch, testsuite] fix target/PR49614
  2011-09-08 12:02 [Patch, testsuite] fix target/PR49614 Iain Sandoe
@ 2011-09-08 18:26 ` Mike Stump
  2011-09-09  9:03   ` Richard Guenther
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Stump @ 2011-09-08 18:26 UTC (permalink / raw)
  To: Iain Sandoe; +Cc: GCC Patches, Dominique Dhumieres

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch, testsuite] fix target/PR49614
  2011-09-08 18:26 ` Mike Stump
@ 2011-09-09  9:03   ` Richard Guenther
  2011-09-09  9:18     ` Dominique Dhumieres
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Guenther @ 2011-09-09  9:03 UTC (permalink / raw)
  To: Mike Stump; +Cc: Iain Sandoe, GCC Patches, Dominique Dhumieres

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch, testsuite] fix target/PR49614
  2011-09-09  9:03   ` Richard Guenther
@ 2011-09-09  9:18     ` Dominique Dhumieres
  2011-09-09  9:35       ` Richard Guenther
  2011-09-09 10:04       ` Andreas Schwab
  0 siblings, 2 replies; 6+ messages in thread
From: Dominique Dhumieres @ 2011-09-09  9:18 UTC (permalink / raw)
  To: richard.guenther, mikestump; +Cc: gcc-patches, dominiq, developer

> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch, testsuite] fix target/PR49614
  2011-09-09  9:18     ` Dominique Dhumieres
@ 2011-09-09  9:35       ` Richard Guenther
  2011-09-09 10:04       ` Andreas Schwab
  1 sibling, 0 replies; 6+ messages in thread
From: Richard Guenther @ 2011-09-09  9:35 UTC (permalink / raw)
  To: Dominique Dhumieres; +Cc: mikestump, gcc-patches, developer

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
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch, testsuite] fix target/PR49614
  2011-09-09  9:18     ` Dominique Dhumieres
  2011-09-09  9:35       ` Richard Guenther
@ 2011-09-09 10:04       ` Andreas Schwab
  1 sibling, 0 replies; 6+ messages in thread
From: Andreas Schwab @ 2011-09-09 10:04 UTC (permalink / raw)
  To: Dominique Dhumieres; +Cc: richard.guenther, mikestump, gcc-patches, developer

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.

-- 
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-09-09  9:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-08 12:02 [Patch, testsuite] fix target/PR49614 Iain Sandoe
2011-09-08 18:26 ` Mike Stump
2011-09-09  9:03   ` Richard Guenther
2011-09-09  9:18     ` Dominique Dhumieres
2011-09-09  9:35       ` Richard Guenther
2011-09-09 10:04       ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).