1 // { dg-do compile { target c++14 } } 2 f()3auto f() { return 42; } // { dg-message "old declaration .auto" } 4 auto f(); // OK 5 int f(); // { dg-error "new declaration" } 6 f(T t)7template <class T> auto f(T t) { return t; } 8 template <class T> T f(T t); 9 main()10int main() 11 { 12 f(42); // { dg-error "ambiguous" } 13 } 14