1 // { dg-do compile { target c++11 } } 2 typedef const int* type; 3 4 float& foo( const type& ggg ); 5 int& foo( type&& ggg ); 6 bar(int * someptr)7 void bar( int* someptr ) 8 { 9 int& x = foo( someptr ); // { dg-error "cannot bind non-const lvalue reference" } 10 } 11