aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/builtins.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr27314.c14
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);
+}