// PR c++/91644 - ICE with constinit in function template. // { dg-do compile { target c++11 } } template static void fn1 () { static __constinit auto v1 = 0; static __constinit int v2 = 0; } int nonconst; template static void fn2 () { static __constinit auto v1 = nonconst; // { dg-error "does not have a constant initializer|not usable" } static __constinit int v2 = nonconst; // { dg-error "does not have a constant initializer|not usable" } } template static void fn3 () { static __constinit T v1 = 0; static __constinit T v2 = nonconst; // { dg-error "does not have a constant initializer|not usable" } } void g () { fn1(); fn2(); fn3(); }