aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>2020-11-25 13:53:37 -0500
committerDavid Edelsohn <dje.gcc@gmail.com>2020-11-25 20:36:01 -0500
commit8f81f43f606cd915e96c857c007a4635fc0ea601 (patch)
treef10e19779e6c280e102a9e8cdf9eeb4b68727faf
parenta02e304245b5181d0f56adab0756719d876b0c58 (diff)
downloadgcc-8f81f43f606cd915e96c857c007a4635fc0ea601.zip
gcc-8f81f43f606cd915e96c857c007a4635fc0ea601.tar.gz
gcc-8f81f43f606cd915e96c857c007a4635fc0ea601.tar.bz2
testsuite: Adjust nextafter and skip profile-info-section on AIX.
nextafter-2.c builds nextafter-1.c with math.h, but nextafter-1.c provides prototypes for the functions. The prototypes can conflict with the definitions in math.h. This patch omits the prototypes when compiling nextafer-2.c. profile-info-section.c uses the profile-info-section flag that is not valid on AIX, so skip the test on AIX. gcc/testsuite/ChangeLog: * gcc.dg/nextafter-1.c: Omit prototypes if _NEXT_AFTER_2 defined. * gcc.dg/nextafter-2.c: Define _NEXT_AFTER_2. * gcc.dg/profile-info-section.c: Skip on AIX.
-rw-r--r--gcc/testsuite/gcc.dg/nextafter-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/nextafter-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/profile-info-section.c2
3 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/nextafter-1.c b/gcc/testsuite/gcc.dg/nextafter-1.c
index 1916ac2..646a741 100644
--- a/gcc/testsuite/gcc.dg/nextafter-1.c
+++ b/gcc/testsuite/gcc.dg/nextafter-1.c
@@ -6,12 +6,14 @@
/* { dg-final { scan-tree-dump-not "nextafter" "optimized" } } */
/* { dg-final { scan-tree-dump-not "nexttoward" "optimized" } } */
+#ifndef _NEXT_AFTER_2
float nextafterf (float, float);
double nextafter (double, double);
long double nextafterl (long double, long double);
float nexttowardf (float, long double);
double nexttoward (double, long double);
long double nexttowardl (long double, long double);
+#endif
#define CHECK(x) if (!(x)) __builtin_abort ()
diff --git a/gcc/testsuite/gcc.dg/nextafter-2.c b/gcc/testsuite/gcc.dg/nextafter-2.c
index 8149a70..b36bc8b 100644
--- a/gcc/testsuite/gcc.dg/nextafter-2.c
+++ b/gcc/testsuite/gcc.dg/nextafter-2.c
@@ -25,4 +25,7 @@
# define NO_LONG_DOUBLE 1
# endif
#endif
+
+#define _NEXT_AFTER_2
+
#include "nextafter-1.c"
diff --git a/gcc/testsuite/gcc.dg/profile-info-section.c b/gcc/testsuite/gcc.dg/profile-info-section.c
index c27fe17..8f31f3b 100644
--- a/gcc/testsuite/gcc.dg/profile-info-section.c
+++ b/gcc/testsuite/gcc.dg/profile-info-section.c
@@ -1,3 +1,5 @@
+/* { dg-do compile } */
+/* { dg-skip-if "profile-info-section" { powerpc-ibm-aix* } } */
/* { dg-options "-fprofile-arcs -fprofile-info-section -fdump-tree-optimized" } */
int foo()