blob: b93e6e0c69566c3c29c17b79e1c9a06687abfaef [file] [log] [blame]
// { dg-do compile }
// GROUPS passed old-abort
extern int f(int); // { dg-message "old declaration" }
int& f(int x) // { dg-error "new declaration" }
{
int local;
local = x+2;
return local; // { dg-warning "reference to local" "" { target c++20_down } }
// { dg-error "non-const lvalue" "" { target c++23 } .-1 }
}