------- Comment #15 from rguenth at gcc dot gnu dot org 2006-08-24 13:03
-------
One problem is that in fold-const.c we use HONOR_XXX macros, while in
builtins.c
folding we use MODE_HAS_XXX. HONOR_XXX changes with -ffinite-math-only and
friends, while MODE_HAS_XXX not (of course).
So to make behavior consistent, we need to switch either use to the other
scheme.
Meanwhile I also spotted
case BUILT_IN_FINITE:
if (!MODE_HAS_NANS (TYPE_MODE (TREE_TYPE (arg)))
&& !MODE_HAS_INFINITIES (TYPE_MODE (TREE_TYPE (arg))))
return omit_one_operand (type, integer_zero_node, arg);
which needs to read integer_one_node as result. Fortunately modes with
no nans don't come along here that often.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28796