diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-29 09:57:03 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-29 09:57:03 +0000 |
commit | de67cbb806fe1e2860298fafd01165a3daab7814 (patch) | |
tree | c558a0163b59050648d073ef7d2227b12d40ae74 /gcc/builtins.c | |
parent | 450c0971a72bdfdd62dad3ae6c942536ac122825 (diff) | |
download | ppe42-gcc-de67cbb806fe1e2860298fafd01165a3daab7814.tar.gz ppe42-gcc-de67cbb806fe1e2860298fafd01165a3daab7814.zip |
2011-07-29 Richard Guenther <rguenther@suse.de>
* builtins.c (fold_builtin_signbit): Build the comparison
with a proper type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176922 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; } |