From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10413 invoked by alias); 6 Dec 2013 19:32:16 -0000 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 Received: (qmail 10387 invoked by uid 48); 6 Dec 2013 19:32:12 -0000 From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/59399] ICE in expand_expr_real_1 with -m64 -fsanitize=signed-integer-overflow Date: Fri, 06 Dec 2013 19: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-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-12/txt/msg00558.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59399 --- Comment #3 from Marek Polacek --- On both x86_64 and ppc64, we have this identical SSA_NAME: unit size align 32 symtab 0 alias set -1 canonical type 0x7fb5a65a4690 precision 32 min max pointer_to_this > visited var def_stmt _3 = UBSAN_CHECK_ADD (j_1(D), i_2(D)); version 3> Now in expr.c we call get_rtx_for_ssa_name on it. On x86_64 the RTX is then (reg:SI 83 [ D.2423 ]) while on ppc64 the RTX is (reg:DI 123 [ D.2759+-4 ]), so we have a discrepancy here. And then the following is true on ppc64 if (REG_P (decl_rtl) && DECL_MODE (exp) != BLKmode && GET_MODE (decl_rtl) != DECL_MODE (exp)) because DECL_MODE (exp) is SImode, not DImode. And then we make our way to the block of code where we fail. Why get_rtx_for_ssa_name returns different rtx for the same SSA_NAME?