// { dg-do compile { target c++1y } } template struct ST; template struct ST {}; int g(int); char& g(char); double&& g(double); template auto&& f(T t) { return g(t); } // { dg-warning "reference to temporary" } int main() { ST(); ST(); ST(); }