https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94489
Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpolacek at gcc dot gnu.org Keywords|ice-on-valid-code |ice-on-invalid-code, | |needs-reduction --- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Doesn't seem like valid code; clang++ trunk also rejects it: 94489.C:28:61: error: no matching constructor for initialization of 'std::plus<void>' I think the fix should be --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -3748,6 +3748,7 @@ expand_integer_pack (tree call, tree args, tsubst_flags_t complain, } else { + hi = instantiate_non_dependent_expr_sfinae (hi, complain); hi = cxx_constant_value (hi); int len = valid_constant_size_p (hi) ? tree_to_shwi (hi) : -1; but it'd be nice to have a reduced version.