This was fixed by r269078. PR c++/83596 gcc/testsuite/ChangeLog: * g++.dg/cpp1z/nontype5.C: New test.