1 // { dg-do compile { target c++11 } } 2 main()3 int main() { 4 int i = 0; 5 int& r = [&] () { return i; } (); // { dg-error "" "invalid initialization of non-const reference of type .int&. from a temporary of type .int." } 6 7 return 0; 8 } 9 10