From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9448 invoked by alias); 3 Jan 2013 16:32:36 -0000 Received: (qmail 9287 invoked by uid 48); 3 Jan 2013 16:32:05 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/55851] [4.8 Regression] ICE in size_binop_loc, at fold-const.c:1385 Date: Thu, 03 Jan 2013 16:32:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2013-01/txt/msg00204.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55851 --- Comment #9 from Richard Biener 2013-01-03 16:32:04 UTC --- Ehm. (In reply to comment #8) > Created attachment 29078 [details] > gcc48-pr55851.patch > > Untested patch (which I don't like very much, but we can't even use something > like get_initialized_tmp_var which would strip the cast as useless too). Ugh. Now that sizetypes are no longer "special" we can also decide to allow ENUMERAL_TYPE in size positions (and adjust int_binop_types_match_p). But I'm not sure if we really want non-literal-sizetype sizes in type trees (they will easily appear in the extra operands of ARRAY_REF and COMPONENT_REF though, so maybe it's really the right thing to do). Otherwise using a get_initialized_tmp_var-like mechanism should be ok as long as you explicitely create the temporary variable with sizetype (I don't see that it strips the cast before getting at the type to create the temporary?)