aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn David Anglin <danglin@gcc.gnu.org>2023-01-07 18:40:04 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2023-01-07 18:40:04 +0000
commit727bd5d478ff8035e4f26e939d690fd3752d4133 (patch)
treeb749a1ee83a1488fc298e794ee7bc1fbfac8de94
parent902c755930326cb4405672aa3ea13c35c653cbff (diff)
downloadgcc-727bd5d478ff8035e4f26e939d690fd3752d4133.zip
gcc-727bd5d478ff8035e4f26e939d690fd3752d4133.tar.gz
gcc-727bd5d478ff8035e4f26e939d690fd3752d4133.tar.bz2
Fix compilation of gcc.dg/atomic/c11-atomic-exec-[45].c on hpux.
_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.
-rw-r--r--gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c
index 669e7c0..a7e158f 100644
--- a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c
+++ b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c
@@ -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>
diff --git a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c
index f8bfa63..299d6ab 100644
--- a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c
+++ b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c
@@ -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 } */