diff options
author | Uros Bizjak <uros@kss-loka.si> | 2006-04-14 07:01:18 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2006-04-14 07:01:18 +0200 |
commit | 39b1ec97f0445bcc6e960de32e7b82011f0161ca (patch) | |
tree | 921e8632d08bdb1418b18a6c4687b775cf30868e /gcc | |
parent | 880864cfc6ea6e4ba41a5404ba8e4cc133a2a861 (diff) | |
download | gcc-39b1ec97f0445bcc6e960de32e7b82011f0161ca.zip gcc-39b1ec97f0445bcc6e960de32e7b82011f0161ca.tar.gz gcc-39b1ec97f0445bcc6e960de32e7b82011f0161ca.tar.bz2 |
re PR middle-end/27134 (ICE with floor and -ffast-math)
PR middle-end/27134
* builtins.c (expand_builtin_int_roundingfn): Use expand_normal()
to expand fallback builtin function call.
testsuite/ChangeLog:
PR middle-end/27134
* gcc.dg/pr27314.c: New test.
From-SVN: r112949
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/builtins.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr27314.c | 14 |
4 files changed, 26 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c0ccec9..f8fdd81 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-04-13 Uros Bizjak <uros@kss-loka.si> + + PR middle-end/27134 + * builtins.c (expand_builtin_int_roundingfn): Use expand_normal() + to expand fallback builtin function call. + 2006-04-14 Alan Modra <amodra@bigpond.net.au> PR middle-end/27095 diff --git a/gcc/builtins.c b/gcc/builtins.c index c4d7ec2..836f965 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -2312,7 +2312,7 @@ expand_builtin_int_roundingfn (tree exp, rtx target, rtx subtarget) gcc_assert (fallback_fndecl != NULL_TREE); exp = build_function_call_expr (fallback_fndecl, arglist); - tmp = expand_builtin_mathfn (exp, NULL_RTX, NULL_RTX); + tmp = expand_normal (exp); /* Truncate the result of floating point optab to integer via expand_fix (). */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 69bd3a2..b19e82f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-04-13 Uros Bizjak <uros@kss-loka.si> + + PR middle-end/27134 + * gcc.dg/pr27314.c: New test. + 2006-04-13 Richard Henderson <rth@redhat.com> * g++.dg/gomp/block-0.C: Update expected matches. diff --git a/gcc/testsuite/gcc.dg/pr27314.c b/gcc/testsuite/gcc.dg/pr27314.c new file mode 100644 index 0000000..d99be5e --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr27314.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O1 -ffast-math" } */ + +extern double floor (double); + +inline int bar (double x) +{ + return (int) floor (x); +} + +int foo (int i) +{ + return bar (i); +} |