https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99423
--- Comment #1 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
// bug_a.ii
template<typename _T1>
struct pair
{
pair() { }
};
inline pair<bool> blob ()
{
return {};
}
// bug_b.ii
import "bug_a.ii";
pair<bool> 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<bool> 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