This bug was fixed in r255430, but the test looks different enough so we better add it.
Tested on x86_64-linux, ok for trunk? 2017-12-19 Marek Polacek <pola...@redhat.com> PR c++/82231 * g++.dg/cpp1z/nontype-auto14.C: New test. --- gcc/testsuite/g++.dg/cpp1z/nontype-auto14.C +++ gcc/testsuite/g++.dg/cpp1z/nontype-auto14.C @@ -0,0 +1,14 @@ +// PR c++/82231 +// { dg-options -std=c++17 } + +template<int> +struct x {}; + +template <auto I, decltype(I) X> +void f(x<X>) { } + +int +main() +{ + f<0>(x<1>{}); +} Marek