This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/32399] [4.3 Regression] ICE in build2_stat, at tree.c:3074
- 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: 19 Jun 2007 08:26:51 -0000
- Subject: [Bug middle-end/32399] [4.3 Regression] ICE in build2_stat, at tree.c:3074
- References: <bug-32399-3760@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from pinskia at gcc dot gnu dot org 2007-06-19 08:26 -------
This code itself is very weird and I don't know if it is really defined or not.
We have basically:
char *f(char *a, char *b)
{
return a + (int)b;
}
How can that even be defined.
Anyways the following fixes the problem:
Index: tree-ssa-address.c
===================================================================
--- tree-ssa-address.c (revision 125776)
+++ tree-ssa-address.c (working copy)
@@ -423,9 +423,9 @@
/* Add ELT to base. */
type = TREE_TYPE (parts->base);
- parts->base = fold_build2 (PLUS_EXPR, type,
+ parts->base = fold_build2 (POINTER_PLUS_EXPR, type,
parts->base,
- fold_convert (type, elt));
+ fold_convert (sizetype, elt));
}
/* Finds the most expensive multiplication in ADDR that can be
Though I have not tested it at all.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2007-06-19 08:26:50
date| |
Summary|ICE in build2_stat, at |[4.3 Regression] ICE in
|tree.c:3074 |build2_stat, at tree.c:3074
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32399