1 // PR c++/36744 2 // { dg-do run { target c++11 } } 3 4 struct S 5 { SS6 S(): i(2) {} SS7 S(S const&s): i(s.i) {} 8 int i; 9 }; 10 f(S x)11void f(S x) { x.i = 0; } 12 13 extern "C" void abort (void); main()14int main() 15 { 16 S y; 17 f(static_cast<S&&>(y)); 18 if (y.i != 2) 19 abort (); 20 return 0; 21 } 22