https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111642
--- Comment #5 from Sergei Trofimovich <slyfox at gcc dot gnu.org> --- The default value is `-fchecking=2` there. `-fchecking=0` and `-fchecking=1` work fine. This means `-fchecking=` slightly alters c++ template instantiation. I'll try to extract smaller example. The following workaround seems to restore the build: --- a/gcc/cp/pt.cc +++ b/gcc/cp/pt.cc @@ -29302,20 +29302,21 @@ tree build_non_dependent_expr (tree expr) { tree orig_expr = expr; tree inner_expr; /* When checking, try to get a constant value for all non-dependent expressions in order to expose bugs in *_dependent_expression_p and constexpr. This can affect code generation, see PR70704, so only do this for -fchecking=2. */ if (flag_checking > 1 + && false && cxx_dialect >= cxx11 /* Don't do this during nsdmi parsing as it can lead to unexpected recursive instantiations. */ && !parsing_nsdmi () /* Don't do this during concept processing either and for the same reason. */ && !processing_constraint_expression_p ()) fold_non_dependent_expr (expr, tf_none); STRIP_ANY_LOCATION_WRAPPER (expr);