[Bug ipa/97565] -flto -ipa-pta ICE: at cgraph_node::get_untransformed_body()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97565 Richard Biener changed: What|Removed |Added Status|ASSIGNED|RESOLVED Known to fail|11.1.1 |11.2.0 Known to work||10.3.1, 11.2.1 Target Milestone|--- |10.4 Keywords||ice-on-valid-code Resolution|--- |FIXED --- Comment #12 from Richard Biener --- Fixed up to where originally reported.
[Bug ipa/97565] -flto -ipa-pta ICE: at cgraph_node::get_untransformed_body()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97565 --- Comment #11 from CVS Commits --- The releases/gcc-10 branch has been updated by Richard Biener : https://gcc.gnu.org/g:3b0c38012093078549811ae1ca0215d1047a2be2 commit r10-10061-g3b0c38012093078549811ae1ca0215d1047a2be2 Author: Richard Biener Date: Mon Aug 23 15:37:48 2021 +0200 ipa/97565 - fix IPA PTA body availability check Looks like the existing check using has_gimple_body_p isn't enough at LTRANS time but I need to check in_other_partition as well. 2021-08-23 Richard Biener PR ipa/97565 * tree-ssa-structalias.c (ipa_pta_execute): Check in_other_partition in addition to has_gimple_body. * g++.dg/lto/pr97565_0.C: New testcase. * g++.dg/lto/pr97565_1.C: Likewise. (cherry picked from commit 0230e69a3fabe6ad1d80cdf308ad1bf1934c4381)
[Bug ipa/97565] -flto -ipa-pta ICE: at cgraph_node::get_untransformed_body()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97565 --- Comment #10 from CVS Commits --- The releases/gcc-11 branch has been updated by Richard Biener : https://gcc.gnu.org/g:5bc33f0318152235ce10220f0d1a2e0c87bde9f1 commit r11-8897-g5bc33f0318152235ce10220f0d1a2e0c87bde9f1 Author: Richard Biener Date: Mon Aug 23 15:37:48 2021 +0200 ipa/97565 - fix IPA PTA body availability check Looks like the existing check using has_gimple_body_p isn't enough at LTRANS time but I need to check in_other_partition as well. 2021-08-23 Richard Biener PR ipa/97565 * tree-ssa-structalias.c (ipa_pta_execute): Check in_other_partition in addition to has_gimple_body. * g++.dg/lto/pr97565_0.C: New testcase. * g++.dg/lto/pr97565_1.C: Likewise. (cherry picked from commit 0230e69a3fabe6ad1d80cdf308ad1bf1934c4381)
[Bug ipa/97565] -flto -ipa-pta ICE: at cgraph_node::get_untransformed_body()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97565 --- Comment #9 from Sergei Trofimovich --- Tested gcc-master against spidermonkey-78.13.0 with -flto -fipa-pta -O1. Works without a problem. Thank you!
[Bug ipa/97565] -flto -ipa-pta ICE: at cgraph_node::get_untransformed_body()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97565 Richard Biener changed: What|Removed |Added Known to work||12.0 --- Comment #8 from Richard Biener --- Fixed on trunk sofar, will push it to branches if it happens to help.
[Bug ipa/97565] -flto -ipa-pta ICE: at cgraph_node::get_untransformed_body()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97565 --- Comment #7 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:0230e69a3fabe6ad1d80cdf308ad1bf1934c4381 commit r12-3085-g0230e69a3fabe6ad1d80cdf308ad1bf1934c4381 Author: Richard Biener Date: Mon Aug 23 15:37:48 2021 +0200 ipa/97565 - fix IPA PTA body availability check Looks like the existing check using has_gimple_body_p isn't enough at LTRANS time but I need to check in_other_partition as well. 2021-08-23 Richard Biener PR ipa/97565 * tree-ssa-structalias.c (ipa_pta_execute): Check in_other_partition in addition to has_gimple_body. * g++.dg/lto/pr97565_0.C: New testcase. * g++.dg/lto/pr97565_1.C: Likewise.
[Bug ipa/97565] -flto -ipa-pta ICE: at cgraph_node::get_untransformed_body()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97565 --- Comment #6 from Jan Hubicka --- has_gimple_body_p really cares about the WPA unit (we should probably note that in the comment). Here you seem to have function that is in the WPA translation unit but lands in different partition and in that case you have in_other_partition. used_from_other_partition is about symbols defined in current ltrans partition but being used from other ltrans.
[Bug ipa/97565] -flto -ipa-pta ICE: at cgraph_node::get_untransformed_body()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97565 Richard Biener changed: What|Removed |Added Last reconfirmed|2020-10-26 00:00:00 |2021-7-13 Known to fail|10.2.0 |10.3.0, 11.1.1, 12.0 --- Comment #5 from Richard Biener --- No, I'm still waiting for feedback from Honza. It can also be worked around by not using -fipa-pta ;) Re-confirmed btw.
[Bug ipa/97565] -flto -ipa-pta ICE: at cgraph_node::get_untransformed_body()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97565 --- Comment #4 from Xi Ruoyao --- This issue still exists in trunk. "-fno-builtin-abort" can be used as a workaround for SpiderMonkey though. Any progress?
[Bug ipa/97565] -flto -ipa-pta ICE: at cgraph_node::get_untransformed_body()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97565 --- 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) @0x7661b000 Type: function definition Visibility: in_other_partition externally_visible prevailing_def_ironly_exp external public visibility_specified References: Referring: abort/2 (alias) Read from file: ./t.ltrans0.o Availability: available Unit id: 2 Function flags: count:1073741824 (estimated locally) nonfreeing_fn unlikely_executed Called by: Calls: 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. */ 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_exp 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?
[Bug ipa/97565] -flto -ipa-pta ICE: at cgraph_node::get_untransformed_body()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97565 Richard Biener changed: What|Removed |Added Last reconfirmed||2020-10-26 Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 --- Comment #2 from Richard Biener --- I will have a look.
[Bug ipa/97565] -flto -ipa-pta ICE: at cgraph_node::get_untransformed_body()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97565 --- Comment #1 from Sergei Trofimovich --- If I change 'abort' name to 'foo' then test works fine: $ cat abort.cpp extern "C" void foo(void) { foo(); } $ cat main.cpp extern "C" void foo(void); int main(int argc, char * argv[]) { foo(); } $ cat o.res 2 main.o 2 203 3cd4d3b7ff8d0f59 PREVAILING_DEF main 206 3cd4d3b7ff8d0f59 RESOLVED_IR foo abort.o 1 191 2179600d205ec4af PREVAILING_DEF_IRONLY foo Looks like 'abort' is considered a builtin of some sort that conflicts with user's override in a way that breaks LTO streaming of type declaration.