1 // PR c++/80896
2 // { dg-do compile { target c++11 } }
3 
4 int x = 42;
func()5 [[nodiscard]] int& func() { return x; }
6 
main()7 int main() { func(); }  // { dg-warning "ignoring return value" }
8