libgomp: Document 'GOMP_teams4'
[official-gcc.git] / gcc / testsuite / g++.dg / conversion / pr16333.C
blobd0049304790320059f2dab48293f1357856b2685
1 // PR c++/16333
3 struct X {
4    X (const int (&)[3]);
5 };
7 int a[3];
8 X foo1 () { return a; }
9 const X &foo2 () { return a; } // { dg-message "returning reference to temporary" }
10 X &foo3 () { return a; } // { dg-error "cannot bind non-const lvalue ref" }