diff options
| author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-20 06:15:23 +0000 |
|---|---|---|
| committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-20 06:15:23 +0000 |
| commit | 1e51d3b6c5c4b747eddb583de9dfbbaf98b64e78 (patch) | |
| tree | b4283a43278984f5c60a44f2816bacd122737a7d | |
| parent | 51c5f96c4ee42b8a974dafbf263b4a0d1f80937f (diff) | |
| download | ppe42-gcc-1e51d3b6c5c4b747eddb583de9dfbbaf98b64e78.tar.gz ppe42-gcc-1e51d3b6c5c4b747eddb583de9dfbbaf98b64e78.zip | |
* gcc.dg/builtins-18.c: Wrap C99 tests with HAVE_C99_RUNTIME.
Define HAVE_C99_RUNTIME except on Solaris.
* gcc.dg/builtins-20.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72693 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/testsuite/gcc.dg/builtins-18.c | 8 | ||||
| -rw-r--r-- | gcc/testsuite/gcc.dg/builtins-20.c | 10 |
3 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 91565dca721..7b8e888768e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2003-10-20 Eric Botcazou <ebotcazou@libertysurf.fr> + + * gcc.dg/builtins-18.c: Wrap C99 tests with HAVE_C99_RUNTIME. + Define HAVE_C99_RUNTIME except on Solaris. + * gcc.dg/builtins-20.c: Likewise. + 2003-10-19 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> * gcc.dg/old-style-asm-1.c: Use scan-assembler-times. diff --git a/gcc/testsuite/gcc.dg/builtins-18.c b/gcc/testsuite/gcc.dg/builtins-18.c index 86338c03e09..07b94185d61 100644 --- a/gcc/testsuite/gcc.dg/builtins-18.c +++ b/gcc/testsuite/gcc.dg/builtins-18.c @@ -8,6 +8,12 @@ /* { dg-do link } */ /* { dg-options "-O2 -ffast-math" } */ + +/* Solaris doesn't have the entire C99 runtime. */ +#if !defined(sun) +#define HAVE_C99_RUNTIME +#endif + extern void link_error(void); extern float cabsf (float _Complex); @@ -43,6 +49,7 @@ main (void) if (__builtin_cabs (3.0 + 4.0i) != 5.0) link_failure (); +#ifdef HAVE_C99_RUNTIME /* Test long doubles. */ if (cabsl (ldc) != 5.0L) link_error (); @@ -52,6 +59,7 @@ main (void) link_failure (); if (__builtin_cabsl (3.0L + 4.0iL) != 5.0L) link_failure (); +#endif return 0; } diff --git a/gcc/testsuite/gcc.dg/builtins-20.c b/gcc/testsuite/gcc.dg/builtins-20.c index a4e24a8029b..b633c55f8a3 100644 --- a/gcc/testsuite/gcc.dg/builtins-20.c +++ b/gcc/testsuite/gcc.dg/builtins-20.c @@ -8,6 +8,12 @@ /* { dg-do link } */ /* { dg-options "-O2 -ffast-math" } */ + +/* Solaris doesn't have the entire C99 runtime. */ +#if !defined(sun) +#define HAVE_C99_RUNTIME +#endif + extern void link_error(void); void test1(double x) @@ -42,6 +48,7 @@ void test1f(float x) if (cosf(x) != cosf(-x)) link_error (); +#ifdef HAVE_C99_RUNTIME if (sinf(x)/cosf(x) != tanf(x)) link_error (); @@ -53,6 +60,7 @@ void test1f(float x) if (cosf(x)*tanf(x) != sinf(x)) link_error (); +#endif } void test2f(float x, float y) @@ -70,6 +78,7 @@ void test1l(long double x) if (cosl(x) != cosl(-x)) link_error (); +#ifdef HAVE_C99_RUNTIME if (sinl(x)/cosl(x) != tanl(x)) link_error (); @@ -81,6 +90,7 @@ void test1l(long double x) if (cosl(x)*tanl(x) != sinl(x)) link_error (); +#endif } void test2l(long double x, long double y) |

