https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111606
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Markus F.X.J. Oberhumer from comment #0) > Test case has been reduced by cvise. > > Might be related to / duplicate of > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90747 > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100557 Looks unrelated to those two. Full backtrace: t.c: In instantiation of ‘const bool integral_constant<1>::value’: t.c:10:3: required by substitution of ‘template<class U> Span::Span(U, typename enable_if<XSpan_ptr_is_convertible<U>::value>::type) [with U = int]’ t.c:13:11: required from here t.c:10:3: error: explicit instantiation of ‘integral_constant<1>::value’ but no definition available [-fpermissive] 10 | Span(U, typename enable_if<XSpan_ptr_is_convertible<U>::value>::type = 1){} | ^~~~ ‘ internal compiler error: error reporting routines re-entered. 0x10eb12b instantiate_decl(tree_node*, bool, bool) /home/apinski/src/upstream-gcc/gcc/gcc/cp/pt.cc:27362 0xec2acc maybe_instantiate_decl(tree_node*) /home/apinski/src/upstream-gcc/gcc/gcc/cp/decl2.cc:5555 0xebee56 decl_constant_var_p(tree_node*) /home/apinski/src/upstream-gcc/gcc/gcc/cp/decl2.cc:4569 0xef4a04 constant_value_1 /home/apinski/src/upstream-gcc/gcc/gcc/cp/init.cc:2526 0xef4e58 decl_really_constant_value(tree_node*, bool) /home/apinski/src/upstream-gcc/gcc/gcc/cp/init.cc:2617 0xdced8a cxx_eval_constant_expression /home/apinski/src/upstream-gcc/gcc/gcc/cp/constexpr.cc:7216 0xdd1260 cxx_eval_constant_expression /home/apinski/src/upstream-gcc/gcc/gcc/cp/constexpr.cc:7827 0xdd4f50 cxx_eval_outermost_constant_expr /home/apinski/src/upstream-gcc/gcc/gcc/cp/constexpr.cc:8517 0xdd60bd maybe_constant_value(tree_node*, tree_node*, mce_value) /home/apinski/src/upstream-gcc/gcc/gcc/cp/constexpr.cc:8806 0xdd6735 fold_non_dependent_expr(tree_node*, int, bool, tree_node*) /home/apinski/src/upstream-gcc/gcc/gcc/cp/constexpr.cc:8945 0x11bf9c8 check_narrowing(tree_node*, tree_node*, int, bool) /home/apinski/src/upstream-gcc/gcc/gcc/cp/typeck2.cc:993 0xd5a283 convert_like_internal /home/apinski/src/upstream-gcc/gcc/gcc/cp/call.cc:8879 0xd5a5c9 convert_like /home/apinski/src/upstream-gcc/gcc/gcc/cp/call.cc:8944 0xd5a63a convert_like /home/apinski/src/upstream-gcc/gcc/gcc/cp/call.cc:8959 0xd4a9ed build_converted_constant_expr_internal /home/apinski/src/upstream-gcc/gcc/gcc/cp/call.cc:4808 0xd4aa84 build_converted_constant_expr(tree_node*, tree_node*, int) /home/apinski/src/upstream-gcc/gcc/gcc/cp/call.cc:4838 0x1084793 convert_nontype_argument /home/apinski/src/upstream-gcc/gcc/gcc/cp/pt.cc:7414 0x1089896 convert_template_argument /home/apinski/src/upstream-gcc/gcc/gcc/cp/pt.cc:8713 0x108b975 coerce_template_parms(tree_node*, tree_node*, tree_node*, int, bool) /home/apinski/src/upstream-gcc/gcc/gcc/cp/pt.cc:9205 0x108e57e lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) /home/apinski/src/upstream-gcc/gcc/gcc/cp/pt.cc:9980 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.