From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16255 invoked by alias); 19 Jun 2007 08:27:00 -0000 Received: (qmail 16230 invoked by uid 48); 19 Jun 2007 08:26:51 -0000 Date: Tue, 19 Jun 2007 08:27:00 -0000 Message-ID: <20070619082651.16229.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/32399] [4.3 Regression] ICE in build2_stat, at tree.c:3074 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-06/txt/msg01552.txt.bz2 ------- 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