This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/38590] [4.4 Regression] ice: verify_gimple failed
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Dec 2008 22:16:12 -0000
- Subject: [Bug middle-end/38590] [4.4 Regression] ice: verify_gimple failed
- References: <bug-38590-12544@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from pinskia at gcc dot gnu dot org 2008-12-21 22:16 -------
The obvious patch which I am testing right now:
Index: fold-const.c
===================================================================
--- fold-const.c (revision 142867)
+++ fold-const.c (working copy)
@@ -11678,7 +11678,7 @@ fold_binary (enum tree_code code, tree t
WARN_STRICT_OVERFLOW_MISC);
return fold_build2 (code, type,
fold_convert (type, TREE_OPERAND (arg0, 0)),
- negate_expr (arg1));
+ fold_convert (type, negate_expr (arg1)));
}
if ((!INTEGRAL_TYPE_P (type) || TYPE_OVERFLOW_UNDEFINED (type))
&& TREE_CODE (arg1) == NEGATE_EXPR
@@ -11689,8 +11689,9 @@ fold_binary (enum tree_code code, tree t
"when distributing negation across "
"division"),
WARN_STRICT_OVERFLOW_MISC);
- return fold_build2 (code, type, negate_expr (arg0),
- TREE_OPERAND (arg1, 0));
+ return fold_build2 (code, type,
+ fold_convert (type, negate_expr (arg0)),
+ fold_convert (type, TREE_OPERAND (arg1, 0)));
}
/* If arg0 is a multiple of arg1, then rewrite to the fastest div
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38590