This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/29719] newlib targets ICEs in expand_builtin_int_roundingfn
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Nov 2006 14:52:40 -0000
- Subject: [Bug middle-end/29719] newlib targets ICEs in expand_builtin_int_roundingfn
- References: <bug-29719-5208@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from ubizjak at gmail dot com 2006-11-05 14:52 -------
(In reply to comment #3)
> I had a slightly deeper look. The ceilf builtin is defined only
> for C99 targets in builtins.def:
>
> DEF_C99_C90RES_BUILTIN (BUILT_IN_CEILF, "ceilf", BT_FN_FLOAT_FLOAT,
> ATTR_CONST_NOTHROW_LIST)
But please consider this part from convert.c, function convert_to_integer():
switch (fcode)
{
CASE_FLT_FN (BUILT_IN_CEIL):
/* Only convert in ISO C99 mode. */
if (!TARGET_C99_FUNCTIONS)
break;
if (outprec < TYPE_PRECISION (long_integer_type_node)
|| (outprec == TYPE_PRECISION (long_integer_type_node)
&& !TYPE_UNSIGNED (type)))
fn = mathfn_built_in (s_intype, BUILT_IN_LCEIL);
else if (outprec == TYPE_PRECISION (long_long_integer_type_node)
&& !TYPE_UNSIGNED (type))
fn = mathfn_built_in (s_intype, BUILT_IN_LLCEIL);
break;
TARGET_C99_FUNCTIONS should prevent this transformation, when we can't
fall-back to ceilf().
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29719