1 2 3 4 5 6 7 8 9
// PR c++/58649 template<typename> void foo() { E(); // { dg-error "declaration|declared" } enum E {}; } template void foo<int>();