1 // PR c++/89391
2 // { dg-do compile { target c++11 } }
3 
4 struct S { };
5 
6 void
foo()7 foo ()
8 {
9   auto a = reinterpret_cast<S&&>(foo ());	// { dg-error "invalid cast of an rvalue expression of type 'void' to type" }
10 }
11