From: Richard Guenther Date: Fri, 29 Jul 2011 09:57:03 +0000 (+0000) Subject: builtins.c (fold_builtin_signbit): Build the comparison with a proper type. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=96d034961743d3bb13117469e1c43a404cd6facc;p=gcc.git builtins.c (fold_builtin_signbit): Build the comparison with a proper type. 2011-07-29 Richard Guenther * builtins.c (fold_builtin_signbit): Build the comparison with a proper type. From-SVN: r176922 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5653050796b..fad87a05171 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-07-29 Richard Guenther + + * builtins.c (fold_builtin_signbit): Build the comparison + with a proper type. + 2011-07-29 Richard Guenther PR tree-optimization/49893 diff --git a/gcc/builtins.c b/gcc/builtins.c index 79a6b09e928..0ffacf9d445 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -8645,8 +8645,9 @@ fold_builtin_signbit (location_t loc, tree arg, tree type) /* If ARG's format doesn't have signed zeros, return "arg < 0.0". */ if (!HONOR_SIGNED_ZEROS (TYPE_MODE (TREE_TYPE (arg)))) - return fold_build2_loc (loc, LT_EXPR, type, arg, - build_real (TREE_TYPE (arg), dconst0)); + return fold_convert (type, + fold_build2_loc (loc, LT_EXPR, boolean_type_node, arg, + build_real (TREE_TYPE (arg), dconst0))); return NULL_TREE; }