1 // PR c++/16333
2 
3 struct X {
4    X (const int (&)[3]);
5 };
6 
7 int a[3];
foo1()8 X foo1 () { return a; }
foo2()9 const X &foo2 () { return a; } // { dg-warning "returning reference to temporary" }
foo3()10 X &foo3 () { return a; } // { dg-error "cannot bind non-const lvalue ref" }
11