From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CB6AC3851C3E; Mon, 9 Nov 2020 15:25:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB6AC3851C3E From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/97565] -flto -ipa-pta ICE: at cgraph_node::get_untransformed_body() Date: Mon, 09 Nov 2020 15:25:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2020 15:25:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97565 --- Comment #3 from Richard Biener --- So the odd thing is that PTA sees /* Nodes without a body are not interesting. Especially do not visit clones at this point for now - we get duplicate decls there for inline clones at least. */ if (!node->has_gimple_body_p () || node->inlined_to) continue; node->get_body (); (gdb) p node->debug () abort/0 (abort) @0x7ffff661b000 Type: function definition Visibility: in_other_partition externally_visible prevailing_def_ironly_e= xp external public visibility_specified References:=20 Referring: abort/2 (alias)=20 Read from file: ./t.ltrans0.o Availability: available Unit id: 2 Function flags: count:1073741824 (estimated locally) nonfreeing_fn unlikely_executed Called by:=20 Calls:=20 but /* Return true when callgraph node is a function with Gimple body defined in current unit. Functions can also be define externally or they can be thunks with no Gimple representation. Note that at WPA stage, the function body may not be present in memory= .=20 */ inline bool has_gimple_body_p (void); where I assume that this means the current _LTRANS_ unit has the body defined. The other odd thing is that the node has ->used_from_other_partition false. Full initial symtab: Creating file ./t.ltrans0.o with sub id 0x7c0d6948e785db2d Symbol table: abort/0 (abort) @0x7f3431cf9000 Type: function definition Visibility: in_other_partition externally_visible prevailing_def_ironly_e= xp external public visibility_specified References: Referring: abort/2 (alias) Read from file: ./t.ltrans0.o Unit id: 2 Function flags: count:1073741824 (estimated locally) nonfreeing_fn unlikely_executed Called by: Calls: abort/2 (abort) @0x7f3431ef5ee0 Type: function definition analyzed alias transparent_alias Visibility: externally_visible external public visibility_specified References: abort/0 (alias) Referring: Read from file: ./t.ltrans0.o Unit id: 3 Function flags: Called by: main/1 (0 (precise),0.00 per call) (can throw external) Calls: main/1 (main) @0x7f3431ef5dd0 Type: function definition analyzed Visibility: externally_visible prevailing_def public References: Referring: Read from file: ./t.ltrans0.o Unit id: 3 Function flags: count:0 (precise) only_called_at_startup nonfreeing_fn unlikely_executed Called by: Calls: abort/2 (0 (precise),0.00 per call) (can throw external) oddly enough symbol and alias are in different partitions? Honza - is this a PTA bug (need to check in_other_partition?) or a IPA bug?=