public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] Fix trivial failure of gcc.dg/atomic/c11-atomic-exec-[45].c on hppa-hpux
@ 2014-08-07 19:31 John David Anglin
  0 siblings, 0 replies; only message in thread
From: John David Anglin @ 2014-08-07 19:31 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 247 bytes --]

_POSIX_C_SOURCE is predefined on hppa-hpux, so it needs to be  
undefined before
it can be redefined.

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

Dave
--
John David Anglin	dave.anglin@bell.net



[-- Attachment #2: c11-atomic-exec.d.txt --]
[-- Type: text/plain, Size: 1616 bytes --]

2014-08-07  John David Anglin  <danglin@gcc.gnu.org>

	* gcc.dg/atomic/c11-atomic-exec-4.c: Undefine _POSIX_C_SOURCE before
	defining in dg-options.
	* gcc.dg/atomic/c11-atomic-exec-5.c: Likewise.

Index: gcc.dg/atomic/c11-atomic-exec-4.c
===================================================================
--- gcc.dg/atomic/c11-atomic-exec-4.c	(revision 213683)
+++ gcc.dg/atomic/c11-atomic-exec-4.c	(working copy)
@@ -2,7 +2,7 @@
    operating properly when operations on the same variable are carried
    out in two threads.  */
 /* { dg-do run } */
-/* { dg-options "-std=c11 -pedantic-errors -pthread -D_POSIX_C_SOURCE=200809L" } */
+/* { dg-options "-std=c11 -pedantic-errors -pthread -U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=200809L" } */
 /* { dg-additional-options "-D_XOPEN_SOURCE=600" { target *-*-solaris2.1[0-9]* } } */
 /* { dg-require-effective-target pthread } */
 
Index: gcc.dg/atomic/c11-atomic-exec-5.c
===================================================================
--- gcc.dg/atomic/c11-atomic-exec-5.c	(revision 213683)
+++ gcc.dg/atomic/c11-atomic-exec-5.c	(working copy)
@@ -3,7 +3,7 @@
    iterations of the compare-and-exchange loop are needed, exceptions
    get properly cleared).  */
 /* { dg-do run } */
-/* { dg-options "-std=c11 -pedantic-errors -pthread -D_POSIX_C_SOURCE=200809L" } */
+/* { dg-options "-std=c11 -pedantic-errors -pthread -U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=200809L" } */
 /* { dg-add-options ieee } */
 /* { dg-additional-options "-mfp-trap-mode=sui" { target alpha*-*-* } } */
 /* { dg-additional-options "-D_XOPEN_SOURCE=600" { target *-*-solaris2.1[0-9]* } } */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-07 19:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-07 19:31 [committed] Fix trivial failure of gcc.dg/atomic/c11-atomic-exec-[45].c on hppa-hpux John David Anglin

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