diff options
author | Richard Guenther <rguenther@suse.de> | 2007-01-24 14:13:28 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2007-01-24 14:13:28 +0000 |
commit | 877cc28c99f98cb1ef2bdc9fda528344006de9d0 (patch) | |
tree | d74175b61f1f24370f73c4e592be00e56e380347 /gcc | |
parent | 9d972b2dd319f761fe3beb4cdbcde0e1412da49e (diff) | |
download | gcc-877cc28c99f98cb1ef2bdc9fda528344006de9d0.zip gcc-877cc28c99f98cb1ef2bdc9fda528344006de9d0.tar.gz gcc-877cc28c99f98cb1ef2bdc9fda528344006de9d0.tar.bz2 |
re PR testsuite/30181 (FAIL: gcc.dg/builtins-57.c scan-tree-dump trunc)
2007-01-24 Richard Guenther <rguenther@suse.de>
PR testsuite/30181
* gcc.dg/builtins-57.c: Change to a link-time testcase
to support non-C99 targets.
From-SVN: r121115
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/builtins-57.c | 29 |
2 files changed, 25 insertions, 10 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b75e059..899705c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2007-01-24 Richard Guenther <rguenther@suse.de> + + PR testsuite/30181 + * gcc.dg/builtins-57.c: Change to a link-time testcase + to support non-C99 targets. + 2007-01-24 Jan Hubicka <jh@suse.cz> * gcc.dg/tree-ssa/pr23382.c: Avoid DCE from eliminating dead variable. diff --git a/gcc/testsuite/gcc.dg/builtins-57.c b/gcc/testsuite/gcc.dg/builtins-57.c index 87fbd44..361826c 100644 --- a/gcc/testsuite/gcc.dg/builtins-57.c +++ b/gcc/testsuite/gcc.dg/builtins-57.c @@ -1,16 +1,25 @@ -/* { dg-do compile } */ -/* { dg-options "-fdump-tree-gimple" } */ +/* { dg-do link } */ +/* { dg-options "-std=c99 -ffinite-math-only" } */ -double foo (double x) +#include "builtins-config.h" + +extern void link_error (void); + +extern double floor (double); +extern double trunc (double); +extern double fabs (double); + +void test (double x) { - return __builtin_floor (__builtin_fabs (x)); +#ifdef HAVE_C99_RUNTIME + if (floor (fabs (x)) != trunc (fabs (x))) + link_error (); +#endif + if (__builtin_lfloor (fabs (x)) != (long)fabs (x)) + link_error (); } -long bar (double x) +int main (void) { - return __builtin_lfloor (__builtin_fabs (x)); + return 0; } - -/* { dg-final { scan-tree-dump-not "lfloor" "gimple" } } */ -/* { dg-final { scan-tree-dump "trunc" "gimple" } } */ -/* { dg-final { cleanup-tree-dump "gimple" } } */ |