[Bug lto/85583] [9 Regression] lto1: internal compiler error: in lto_balanced_map, at lto/lto-partition.c:833
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85583 Martin Liška changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #9 from Martin Liška --- Yes, I would notice that as I'm building quite some packages with LTO not on daily basis.
[Bug lto/85583] [9 Regression] lto1: internal compiler error: in lto_balanced_map, at lto/lto-partition.c:833
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85583 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #8 from Jakub Jelinek --- So fixed?
[Bug lto/85583] [9 Regression] lto1: internal compiler error: in lto_balanced_map, at lto/lto-partition.c:833
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85583 --- Comment #7 from Jan Hubicka --- Author: hubicka Date: Tue May 15 16:39:43 2018 New Revision: 260266 URL: https://gcc.gnu.org/viewcvs?rev=260266=gcc=rev Log: PR lto/85583 * lto-partition.c (account_reference_p): Do not account references from aliases; do not account refernces from external initializers. Modified: trunk/gcc/lto/ChangeLog trunk/gcc/lto/lto-partition.c
[Bug lto/85583] [9 Regression] lto1: internal compiler error: in lto_balanced_map, at lto/lto-partition.c:833
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85583 --- Comment #6 from Jan Hubicka --- Problem is that we do not account correctly duplicated symbols because we do not add them into boundary Index: lto/lto-partition.c === --- lto/lto-partition.c (revision 260258) +++ lto/lto-partition.c (working copy) @@ -439,13 +439,24 @@ { if (cgraph_node *cnode = dyn_cast (n1)) n1 = cnode; + /* Do not account references from aliases - they are never split across + partitions. */ + if (n1->alias) +return false; /* Do not account recursion - the code below will handle it incorrectly - otherwise. Also do not account references to external symbols. - They will never become local. */ + otherwise. Do not account references to external symbols: they will + never become local. Finally do not account references to duplicated + symbols: they will be always local. */ if (n1 == n2 - || DECL_EXTERNAL (n2->decl) - || !n2->definition) + || !n2->definition + || n2->get_partitioning_class () != SYMBOL_PARTITION) return false; + /* If referring node is duplicated symbol, we can not compute the boundary + cost, because we do not know what partition will be added to until + the boundary is computed. */ + if (contained_in_symbol (n1) + ->get_partitioning_class () != SYMBOL_PARTITION) +return false; return true; }
[Bug lto/85583] [9 Regression] lto1: internal compiler error: in lto_balanced_map, at lto/lto-partition.c:833
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85583 --- Comment #5 from Martin Liška --- Reduced test-case: $ cat json.ii class b { public: virtual ~b(); }; template class c : b {}; class B { c d; }; extern template class c; main() { B a; } $ ./xgcc -B. -flto=8 -O2 -std=gnu++17 json.ii json.ii:10:6: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type] main() { B a; } ^ lto1: internal compiler error: in lto_balanced_map, at lto/lto-partition.c:836 0x62014f lto_balanced_map(int, int) ../../gcc/lto/lto-partition.c:836 0x614b2c do_whole_program_analysis ../../gcc/lto/lto.c:3179 0x614b2c lto_main() ../../gcc/lto/lto.c:3374 Honza, can you please fix that?
[Bug lto/85583] [9 Regression] lto1: internal compiler error: in lto_balanced_map, at lto/lto-partition.c:833
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85583 Martin Liška changed: What|Removed |Added Status|WAITING |NEW --- Comment #4 from Martin Liška --- (In reply to Martin Liška from comment #3) > Can't reproduce, can you please provide output --verbose. Not needed, I have another test-case that I've been reducing.
[Bug lto/85583] [9 Regression] lto1: internal compiler error: in lto_balanced_map, at lto/lto-partition.c:833
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85583 Martin Liška changed: What|Removed |Added Status|ASSIGNED|WAITING --- Comment #3 from Martin Liška --- Can't reproduce, can you please provide output --verbose.
[Bug lto/85583] [9 Regression] lto1: internal compiler error: in lto_balanced_map, at lto/lto-partition.c:833
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85583 Jan Hubicka changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2018-05-02 Assignee|unassigned at gcc dot gnu.org |hubicka at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #2 from Jan Hubicka --- I will take a look. Indeed it was buggy for empty files (where best cost is -1 rather than 0), but this is probably independent issue.
[Bug lto/85583] [9 Regression] lto1: internal compiler error: in lto_balanced_map, at lto/lto-partition.c:833
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85583 Richard Biener changed: What|Removed |Added Keywords||ice-on-valid-code, lto CC||hubicka at gcc dot gnu.org Target Milestone|--- |9.0 Summary|lto1: internal compiler |[9 Regression] lto1: |error: in lto_balanced_map, |internal compiler error: in |at lto/lto-partition.c:833 |lto_balanced_map, at ||lto/lto-partition.c:833 --- Comment #1 from Richard Biener --- The sanity check was fixed one already. Honza?