From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12792 invoked by alias); 24 Nov 2010 15:17:59 -0000 Received: (qmail 12781 invoked by uid 22791); 24 Nov 2010 15:17:58 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_FN,TW_TM X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 24 Nov 2010 15:17:54 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/43218] [LTO] Conflicting function types cause ICE X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Keywords: ice-on-invalid-code, lto 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: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.0 X-Bugzilla-Changed-Fields: Status AssignedTo 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 Date: Wed, 24 Nov 2010 15:49:00 -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 X-SW-Source: 2010-11/txt/msg02996.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43218 Richard Guenther changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |ASSIGNED AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org |gnu.org | --- Comment #5 from Richard Guenther 2010-11-24 15:17:42 UTC --- They now fail because -flto is now -fwhopr. They are all fixed with -flto -flto-partition=none. expand_call_inline ICE: 4043 gcc_assert (gimple_assign_single_p (stmt) 4044 || CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))); (gdb) call debug_gimple_stmt (stmt) D.2008_1 = () D.2015; because we inline int f(void) as if it were float f(void). The can-inline-p check doesn't work in WPA mode as we do not have the call stmt around. We of course would also ICE during stmt verification if we didn't inline this function. For non-function decls we wrap them inside MEM_REFs serving as VIEW_CONVERT_EXPRs, we don't do that for fns because that caused regressions elsewhere, so a fix is delayed to the point where we properly preserve the call ABI type for calls. Ahm, at ltrans stage we have ... arg 0 for the call fn, so the type is preserved but the addr-expr contains a mismatch (which verification I disabled for lto). We could warn or error for ABI incompatible function signatures, but somebody has to write a proper predicate first. Hmm, I'll try to fix this up at symbol/cgraph merging time.