@@ -12422,9 +12422,9 @@ use_pack_expansion_extra_args_p (tree parm_packs,
return false;
}
- bool has_expansion_arg = false;
for (int i = 0 ; i < arg_pack_len; ++i)
{
+ bool has_expansion_arg = false;
bool has_non_expansion_arg = false;
for (tree parm_pack = parm_packs;
parm_pack;
@@ -12444,7 +12444,10 @@ use_pack_expansion_extra_args_p (tree parm_packs,
}
if (has_expansion_arg && has_non_expansion_arg)
- return true;
+ {
+ gcc_checking_assert (false);
+ return true;
+ }
}
return false;
}
new file mode 100644
@@ -0,0 +1,13 @@
+// PR c++/86355
+// { dg-do compile { target c++11 } }
+
+template <int...> struct integral_constant {
+ static const int value = 1;
+};
+template <class... T> using mp_all = integral_constant<T::value...>;
+template <class... T> using check2 = mp_all<mp_all<T..., integral_constant<0>>>;
+check2<> x;
+
+template <class T, class U> struct assert_same;
+template <class T> struct assert_same<T,T> { };
+assert_same<decltype(x),integral_constant<1>> a;