[Bug c++/99423] [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99423 Nathan Sidwell changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #3 from Nathan Sidwell --- 1f428775acc 2021-03-10 | c++: ICE do to GC leakage [PR 99423]
[Bug c++/99423] [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99423 --- Comment #2 from CVS Commits --- The master branch has been updated by Nathan Sidwell : https://gcc.gnu.org/g:1f428775acc391c8ce4fcf79b243043fcc99 commit r11-7610-g1f428775acc391c8ce4fcf79b243043fcc99 Author: Nathan Sidwell Date: Wed Mar 10 12:07:24 2021 -0800 c++: ICE do to GC leakage [PR 99423] My reworking of pending-entity loading introduced a GC problem. The post-load processing needs to inhibit GCs (that would otherwise occur in clone_decl). That wasn't happening on one code path, leading to dangling pointers in the active call frames. PR c++/99423 gcc/cp/ * module.cc (post_load_processing): Assert not gcable. (laxy_load_pendings): Extend no-gc region around post_load_processing. gcc/testsuite/ * g++.dg/modules/pr99423_a.H: New. * g++.dg/modules/pr99423_b.H: New.
[Bug c++/99423] [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99423 --- Comment #1 from Nathan Sidwell --- // bug_a.ii template struct pair { pair() { } }; inline pair blob () { return {}; } // bug_b.ii import "bug_a.ii"; pair boom(); ./cc1plus -fmodule-header=system -std=c++20 bug_a.ii -fpreprocessed -quiet && ./cc1plus -fmodule-header=system -std=c++20 bug_b.ii -fpreprocessed -quiet --param ggc-min-expand=0 --param ggc-min-heapsize=0 bug_b.ii:4:10: internal compiler error: tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803 4 | pair boom(); | ^ 0x1acdc4b tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../../src/gcc/tree.c:9814 0xad685c tree_check(tree_node*, char const*, int, char const*, tree_code) ../../../src/gcc/tree.h:3353 0xdc6b60 lookup_template_class_1 ../../../src/gcc/cp/pt.c:9803
[Bug c++/99423] [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99423 Nathan Sidwell changed: What|Removed |Added Last reconfirmed||2021-03-09 Ever confirmed|0 |1 Status|UNCONFIRMED |ASSIGNED