aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2007-09-22 08:26:50 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2007-09-22 08:26:50 +0000
commit1018b4c3565d3c892addfc349b00b3519308211e (patch)
tree24108520810ea2907302064e54bef5f33f634077 /gcc/testsuite/gcc.dg
parentdb9a0df07fc938a874309c5af28895bc347c0673 (diff)
downloadgcc-1018b4c3565d3c892addfc349b00b3519308211e.zip
gcc-1018b4c3565d3c892addfc349b00b3519308211e.tar.gz
gcc-1018b4c3565d3c892addfc349b00b3519308211e.tar.bz2
target-supports.exp (check_cached_effective_target): New procedure.
gcc/testsuite/ * lib/target-supports.exp (check_cached_effective_target): New procedure. (check_no_compiler_messages, check_no_messages_and_pattern): Use it. (check_effective_target_c99_runtime): New procedure. * gcc.dg/builtins-20.c (test3f): Wrap cargf check in HAVE_C99_RUNTIME. (test3l): Likewise cargl. * gcc.dg/builtins-59.c: Require c99_runtime. * gcc.dg/builtins-61.c: Likewise. * gcc.dg/builtins-62.c: Likewise. From-SVN: r128664
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/builtins-20.c16
-rw-r--r--gcc/testsuite/gcc.dg/builtins-59.c1
-rw-r--r--gcc/testsuite/gcc.dg/builtins-61.c1
-rw-r--r--gcc/testsuite/gcc.dg/builtins-62.c1
4 files changed, 13 insertions, 6 deletions
diff --git a/gcc/testsuite/gcc.dg/builtins-20.c b/gcc/testsuite/gcc.dg/builtins-20.c
index 4acb921..43aa71b 100644
--- a/gcc/testsuite/gcc.dg/builtins-20.c
+++ b/gcc/testsuite/gcc.dg/builtins-20.c
@@ -449,9 +449,6 @@ void test2f(float x, float y)
void test3f(__complex__ float x, __complex__ float y, int i)
{
- if (cargf(x) != atan2f(__imag__ x, __real__ x))
- link_error ();
-
if (ccosf(x) != ccosf(-x))
link_error();
@@ -502,6 +499,11 @@ void test3f(__complex__ float x, __complex__ float y, int i)
if (ctanf(~(x/y)) != -ctanf(~(x/-y)))
link_error();
+
+#ifdef HAVE_C99_RUNTIME
+ if (cargf(x) != atan2f(__imag__ x, __real__ x))
+ link_error ();
+#endif
}
void test1l(long double x)
@@ -674,9 +676,6 @@ void test2l(long double x, long double y)
void test3l(__complex__ long double x, __complex__ long double y, int i)
{
- if (cargl(x) != atan2l(__imag__ x, __real__ x))
- link_error ();
-
if (ccosl(x) != ccosl(-x))
link_error();
@@ -727,6 +726,11 @@ void test3l(__complex__ long double x, __complex__ long double y, int i)
if (ctanl(~(x/y)) != -ctanl(~(x/-y)))
link_error();
+
+#ifdef HAVE_C99_RUNTIME
+ if (cargl(x) != atan2l(__imag__ x, __real__ x))
+ link_error ();
+#endif
}
int main()
diff --git a/gcc/testsuite/gcc.dg/builtins-59.c b/gcc/testsuite/gcc.dg/builtins-59.c
index a7da712..b940d39 100644
--- a/gcc/testsuite/gcc.dg/builtins-59.c
+++ b/gcc/testsuite/gcc.dg/builtins-59.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-fdump-tree-gimple" } */
+/* { dg-require-effective-target c99_runtime } */
double test (double x)
{
diff --git a/gcc/testsuite/gcc.dg/builtins-61.c b/gcc/testsuite/gcc.dg/builtins-61.c
index 9f0c990..dff163f 100644
--- a/gcc/testsuite/gcc.dg/builtins-61.c
+++ b/gcc/testsuite/gcc.dg/builtins-61.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O -ffast-math -fdump-tree-optimized" } */
+/* { dg-require-effective-target c99_runtime } */
double test1 (double x)
{
diff --git a/gcc/testsuite/gcc.dg/builtins-62.c b/gcc/testsuite/gcc.dg/builtins-62.c
index af7a02a..db62696 100644
--- a/gcc/testsuite/gcc.dg/builtins-62.c
+++ b/gcc/testsuite/gcc.dg/builtins-62.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O -ffinite-math-only -fdump-tree-optimized" } */
+/* { dg-require-effective-target c99_runtime } */
double test1 (double x)
{