diff mbox

[testsuite] Fix gcc.dg/torture/pr47917.c on IRIX 6.5

Message ID 201104060043.15498.ebotcazou@adacore.com
State New
Headers show

Commit Message

Eric Botcazou April 5, 2011, 10:43 p.m. UTC
> The new gcc.dg/torture/pr47917.c test currently fails the execution test
> on IRIX 6.5.  To get a C99-conformant snprintf, one needs to include
> <stdio.h> with _XOPEN_SOURCE defined as 500.  The following patch does
> this.

Likewise on Solaris 8 (It's deprecated, I know, but I have access to a quite 
fast SPARC/Solaris 8 machine).

Tested on sparc-sun-solaris2.8, applied on the mainline.


2011-04-05  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc.dg/torture/pr47917.c: Add -D_XOPEN_SOURCE=500 to dg-options for
	Solaris 8 as well.

Comments

Eric Botcazou April 5, 2011, 10:53 p.m. UTC | #1
> 2011-04-05  Eric Botcazou  <ebotcazou@adacore.com>
>
> 	* gcc.dg/torture/pr47917.c: Add -D_XOPEN_SOURCE=500 to dg-options for
> 	Solaris 8 as well.

I somehow missed that the same change is needed on Solaris 9... Adjusted.
Rainer Orth April 6, 2011, 8:51 a.m. UTC | #2
Eric Botcazou <ebotcazou@adacore.com> writes:

>> The new gcc.dg/torture/pr47917.c test currently fails the execution test
>> on IRIX 6.5.  To get a C99-conformant snprintf, one needs to include
>> <stdio.h> with _XOPEN_SOURCE defined as 500.  The following patch does
>> this.
>
> Likewise on Solaris 8 (It's deprecated, I know, but I have access to a quite 
> fast SPARC/Solaris 8 machine).

Thanks for doing this: I meant to get to this, but am currently looking
into the same failure on Tru64 UNIX where a proper (and more general)
fix is more involved.

	Rainer
diff mbox

Patch

Index: gcc.dg/torture/pr47917.c
===================================================================
--- gcc.dg/torture/pr47917.c	(revision 171942)
+++ gcc.dg/torture/pr47917.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-std=c99" } */
-/* { dg-options "-std=c99 -D_XOPEN_SOURCE=500" { target mips-sgi-irix6.5 } } */
+/* { dg-options "-std=c99 -D_XOPEN_SOURCE=500" { target mips-sgi-irix6.5 *-*-solaris2.8 } } */
 /* { dg-options "-std=gnu99" { target *-*-hpux* } } */
 /* { dg-xfail-if "no C99 snprintf function" { *-*-hpux10* } } */
 /* { dg-xfail-run-if "non-conforming C99 snprintf" { *-*-hpux11.[012]* } } */