https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102470
Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.j.odwyer at gmail dot com --- Comment #2 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> --- Segfaults starting in GCC 9.1 (the first release with class NTTPs) until 12.3, succeeds fine in GCC 13.1 and later. Reduced: https://compiler-explorer.com/z/Kea5ar6MM struct MA { int x; }; template<class> constexpr int mao = 1; template<int> struct AST {}; template<MA ma> using AS = AST<ma.x>; template<class> using ASF = AS<mao<int>>; <source>: In substitution of 'template<MA ma> using AS = AST<((const MA)ma).x> [with MA ma = mao<int>]': <source>:5:39: required from here <source>:4:32: internal compiler error: Segmentation fault 4 | template<MA ma> using AS = AST<ma.x>; | ^~ 0x1bbabfe internal_error(char const*, ...) 0x109f844 strip_array_types(tree_node*) 0x8d3f2c cp_type_quals(tree_node const*) 0x88e40f tsubst_template_args(tree_node*, tree_node*, int, tree_node*) 0x87b764 tsubst(tree_node*, tree_node*, int, tree_node*) [...]