This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49309] [4.6/4.7 Regression] ICE with -fmudflap: verify_stmts failed: type mismatch in pointer plus expression
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 12 Jul 2011 21:06:47 +0000
- Subject: [Bug tree-optimization/49309] [4.6/4.7 Regression] ICE with -fmudflap: verify_stmts failed: type mismatch in pointer plus expression
- Auto-submitted: auto-generated
- References: <bug-49309-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49309
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011.07.12 21:06:29
AssignedTo|unassigned at gcc dot |pinskia at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-07-12 21:06:29 UTC ---
Simple fix:
Index: tree-mudflap.c
===================================================================
--- tree-mudflap.c (revision 62112)
+++ tree-mudflap.c (working copy)
@@ -869,7 +869,7 @@ mf_xform_derefs_1 (gimple_stmt_iterator
break;
case MEM_REF:
- addr = build2 (POINTER_PLUS_EXPR, TREE_TYPE (TREE_OPERAND (t, 1)),
+ addr = fold_build2_loc (location, POINTER_PLUS_EXPR, TREE_TYPE
(TREE_OPERAND (t, 1)),
TREE_OPERAND (t, 0),
fold_convert (sizetype, TREE_OPERAND (t, 1)));
base = addr;