From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20760 invoked by alias); 10 Apr 2014 08:48:19 -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 20716 invoked by uid 48); 10 Apr 2014 08:48:16 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/60567] [4.9 Regression] lto1 ICE in add_symbol_to_partition, at lto/lto-partition.c:233 with -fno-use-linker-plugin Date: Thu, 10 Apr 2014 08:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: ice-on-valid-code, lto X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: hubicka 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: 2014-04/txt/msg00714.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60567 --- Comment #17 from Jakub Jelinek --- (In reply to Jan Hubicka from comment #15) > This patch fixes the ICE by copying forced_by_abi as part of cgraph fixup in > ipa visibility. I would like Jason to comment on this. I think fix at C++ > FE side would be more appropriate if the thunk is indeed keyed. > > If not, I will update partitinoning predicate to always iterate the whole > group and see if any of symbols is keyed. > > Index: ipa.c > =================================================================== > --- ipa.c (revision 209170) > +++ ipa.c (working copy) > @@ -1032,6 +1032,7 @@ function_and_variable_visibility (bool w > == DECL_COMDAT_GROUP (decl_node->decl)); > gcc_checking_assert (node->same_comdat_group); > } > + decl_node->forced_by_abi = node->forced_by_abi; > if (DECL_EXTERNAL (decl_node->decl)) > DECL_EXTERNAL (node->decl) = 1; > } Shouldn't that be the other way around though? node->forced_by_abi = decl_node->forced_by_abi; >>From what I understand, decl_node is the target of the thunk, and node is thunk, on this testcase decl_node->forced_by_abi is true originally, while node->forced_by_abi is false. So, if the thunks are supposed to inherit the flag from the thunk target, we should change node->forced_by_abi, similarly how we e.g. change DECL_EXTERNAL (node->decl).