diff mbox

[committed] Fix failure of gcc.dg/tree-prof/pr59003.c on hppa*-*-hpux*

Message ID BLU0-SMTP153D21785AACECEDCFB52A977A0@phx.gbl
State New
Headers show

Commit Message

John David Anglin March 24, 2014, 1:17 a.m. UTC
gcc.dg/tree-prof/pr59003.c fails on hppa*-*-hpux* because of limited  
variable alignment
when -fno-common is not specified in the options.

Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11.
Committed to trunk.

Dave
--
John David Anglin	dave.anglin@bell.net
2014-03-23  John David Anglin  <danglin@gcc.gnu.org>

	* gcc.dg/tree-prof/pr59003.c: Add -fno-common to dg-options on
	hppa*-*-hpux*.

Comments

Rainer Orth March 24, 2014, 6:48 a.m. UTC | #1
John David Anglin <dave.anglin@bell.net> writes:

> Index: gcc.dg/tree-prof/pr59003.c
> ===================================================================
> --- gcc.dg/tree-prof/pr59003.c	(revision 208769)
> +++ gcc.dg/tree-prof/pr59003.c	(working copy)
> @@ -1,6 +1,7 @@
>  /* PR target/59003 */
>  /* { dg-options "-O2" } */
>  /* { dg-options "-O2 -mtune=amdfam10" { target i?86-*-* x86_64-*-* } } */
> +/* { dg-options "-O2 -fno-common" { target hppa*-*-hpux* } } */

Better handled with dg-additional-options rather than duplicating
dg-options.  No need to change though, since the x86 entry already used
the less preferred style.

	Rainer
John David Anglin March 24, 2014, 1:48 p.m. UTC | #2
On 3/24/2014 2:48 AM, Rainer Orth wrote:
> John David Anglin <dave.anglin@bell.net> writes:
>
>> Index: gcc.dg/tree-prof/pr59003.c
>> ===================================================================
>> --- gcc.dg/tree-prof/pr59003.c	(revision 208769)
>> +++ gcc.dg/tree-prof/pr59003.c	(working copy)
>> @@ -1,6 +1,7 @@
>>   /* PR target/59003 */
>>   /* { dg-options "-O2" } */
>>   /* { dg-options "-O2 -mtune=amdfam10" { target i?86-*-* x86_64-*-* } } */
>> +/* { dg-options "-O2 -fno-common" { target hppa*-*-hpux* } } */
> Better handled with dg-additional-options rather than duplicating
> dg-options.  No need to change though, since the x86 entry already used
> the less preferred style.

I already tried it.  dg-additional-options isn't supported in tree-prof.

Dave
Andreas Schwab March 24, 2014, 1:54 p.m. UTC | #3
John David Anglin <dave.anglin@bell.net> writes:

> I already tried it.  dg-additional-options isn't supported in tree-prof.

Shouldn't be hard to fix.

Andreas.
Rainer Orth March 24, 2014, 1:59 p.m. UTC | #4
John David Anglin <dave.anglin@bell.net> writes:

> On 3/24/2014 2:48 AM, Rainer Orth wrote:
>> John David Anglin <dave.anglin@bell.net> writes:
>>
>>> Index: gcc.dg/tree-prof/pr59003.c
>>> ===================================================================
>>> --- gcc.dg/tree-prof/pr59003.c	(revision 208769)
>>> +++ gcc.dg/tree-prof/pr59003.c	(working copy)
>>> @@ -1,6 +1,7 @@
>>>   /* PR target/59003 */
>>>   /* { dg-options "-O2" } */
>>>   /* { dg-options "-O2 -mtune=amdfam10" { target i?86-*-* x86_64-*-* } } */
>>> +/* { dg-options "-O2 -fno-common" { target hppa*-*-hpux* } } */
>> Better handled with dg-additional-options rather than duplicating
>> dg-options.  No need to change though, since the x86 entry already used
>> the less preferred style.
>
> I already tried it.  dg-additional-options isn't supported in tree-prof.

It may well be that just accepting it in profopt.exp (and compat.exp and
lto.exp and plugin-support.exp that all have copies of that code ;-)
works.

I'll give it a try.

	Rainer
diff mbox

Patch

Index: gcc.dg/tree-prof/pr59003.c
===================================================================
--- gcc.dg/tree-prof/pr59003.c	(revision 208769)
+++ gcc.dg/tree-prof/pr59003.c	(working copy)
@@ -1,6 +1,7 @@ 
 /* PR target/59003 */
 /* { dg-options "-O2" } */
 /* { dg-options "-O2 -mtune=amdfam10" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -fno-common" { target hppa*-*-hpux* } } */
 
 __attribute__((noinline, noclone)) void *
 foo (void *p, unsigned int q)