https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99423
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Nathan Sidwell <nat...@gcc.gnu.org>: https://gcc.gnu.org/g:1f428775acc391c8ce4fcf79b243043f3333cc99 commit r11-7610-g1f428775acc391c8ce4fcf79b243043f3333cc99 Author: Nathan Sidwell <nat...@acm.org> 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.