]> gcc.gnu.org Git - gcc.git/commitdiff
Fix compilation of gcc.dg/atomic/c11-atomic-exec-[45].c on hpux.
authorJohn David Anglin <danglin@gcc.gnu.org>
Sat, 7 Jan 2023 18:40:04 +0000 (18:40 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sat, 7 Jan 2023 18:40:04 +0000 (18:40 +0000)
_HPUX_SOURCE needs to be defined to provide various types needed
for pthreads.

2023-01-07  John David Anglin  <danglin@gcc.gnu.org>

gcc/testsuite/ChangeLog:

* gcc.dg/atomic/c11-atomic-exec-4.c: Add "-D_HPUX_SOURCE" option
on *-*-hpux*.
* gcc.dg/atomic/c11-atomic-exec-5.c: Likewise.

gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c
gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c

index 669e7c058c39e410e3c8adc435b1c48e6eed3df2..a7e158f14e8ddb62e8acd1cfbee6d236213f5881 100644 (file)
@@ -4,6 +4,7 @@
 /* { dg-do run } */
 /* { 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* } } */
+/* { dg-additional-options "-D_HPUX_SOURCE" { target *-*-hpux* } } */
 /* { dg-require-effective-target pthread } */
 
 #include <stdint.h>
index f8bfa63b4cc8a693bb1352f0876368421a96a02b..299d6ab904b7aa4dc65f2a0cf141fe3c68791d04 100644 (file)
@@ -7,6 +7,7 @@
 /* { dg-add-options ieee } */
 /* { dg-additional-options "-mfp-trap-mode=sui" { target alpha*-*-* } } */
 /* { dg-additional-options "-D_XOPEN_SOURCE=600" { target *-*-solaris2* } } */
+/* { dg-additional-options "-D_HPUX_SOURCE" { target *-*-hpux* } } */
 /* { dg-require-effective-target fenv_exceptions } */
 /* { dg-require-effective-target pthread } */
 /* { dg-timeout-factor 2 } */
This page took 0.074508 seconds and 5 git commands to generate.