diff options
author | Uros Bizjak <uros@kss-loka.si> | 2005-04-15 07:43:56 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2005-04-15 07:43:56 +0200 |
commit | 1c432a0c34a7f3ac56afca802e1dce1058be2db5 (patch) | |
tree | 6cece628e71c04ff9e27b7ef90ee01ffb2ef5922 /gcc/builtins.c | |
parent | 57b11c96547894d67972735a5df66fb9c7fdacdb (diff) | |
download | gcc-1c432a0c34a7f3ac56afca802e1dce1058be2db5.zip gcc-1c432a0c34a7f3ac56afca802e1dce1058be2db5.tar.gz gcc-1c432a0c34a7f3ac56afca802e1dce1058be2db5.tar.bz2 |
re PR tree-optimization/21004 (gcc.dg/builtins-53.c fails)
PR tree-optimization/21004
* convert.c (convert_to_integer): Convert ceilf, ceill, floorf
and floorl in c99 mode only.
* builtins.c (expand_builtin_int_roundingfn): Assert that
fallback_fndecl is not NULL_TREE.
testsuite:
PR tree-optimization/21004
* gcc.dg/builtins-53.c: Include builtins-config.h.
Check floorf, ceilf, floorl and ceill transformations
only when HAVE_C99_RUNTIME is defined.
From-SVN: r98174
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 1a54a06..78a577f 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -2220,6 +2220,9 @@ expand_builtin_int_roundingfn (tree exp, rtx target, rtx subtarget) /* Fall back to floating point rounding optab. */ fallback_fndecl = mathfn_built_in (TREE_TYPE (arg), fallback_fn); + /* We shouldn't get here on targets without TARGET_C99_FUNCTIONS. + ??? Perhaps convert (int)floorf(x) into (int)floor((double)x). */ + gcc_assert (fallback_fndecl != NULL_TREE); exp = build_function_call_expr (fallback_fndecl, arglist); tmp = expand_builtin_mathfn (exp, NULL_RTX, NULL_RTX); |