https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59716
--- Comment #9 from Patrick Palka <ppalka at gcc dot gnu.org> --- Hmm, this PR is essentially a dup of PR88580 but I don't think it's a 10/11 regression: between r8-2715 and r10-3735 it seems we just went from incorrectly rejecting the testcase (the behavior before r8-2715) to miscompiling it. After r10-3735 we went back to incorrectly rejecting it (arguably an improvement). So AFAICT we never correctly handled this testcase before r12-174. Output when compiled with GCC trunk: Construction of: DebugPrinter<Head, T>::DebugPrinter(Y ...) [with Y = {int, char, void*, int}; Head = int; T = {char, int, float}] Values: 1, c, 0xddddd, 1, Construction of: DebugPrinter<Head, T>::DebugPrinter(Y ...) [with Y = {float, char, void*, float}; Head = float; T = {void*, int, float}] Values: 2.2, c, 0xddddd, 2.2, GCC 10/11 reject the testcase. Output when compiled with GCC 7.4/8/9 (miscompile): Construction of: DebugPrinter<Head, T>::DebugPrinter(Y ...) [with Y = {int, bool, int}; Head = int; T = {char, int, float}] Values: 1, 0, 1, Construction of: DebugPrinter<Head, T>::DebugPrinter(Y ...) [with Y = {float, bool, float}; Head = float; T = {void*, int, float}] Values: 2.2, 0, 2.2, GCC < 7.4 reject the testcase. Output when compiled with Clang (equivalent to GCC trunk output): Construction of: DebugPrinter<int, char, int, float>::DebugPrinter(Y...) [Head = int, T = <char, int, float>, Y = <int, char, void *, int>] Values: 1, c, 0xddddd, 1, Construction of: DebugPrinter<float, void *, int, float>::DebugPrinter(Y...) [Head = float, T = <void *, int, float>, Y = <float, char, void *, float>] Values: 2.2, c, 0xddddd, 2.2,