Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/rv9p.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/36744 |
2 // { dg-do run { target c++11 } } | |
3 | |
4 struct S | |
5 { | |
6 S(): i(2) {} | |
7 S(S const&s): i(s.i) {} | |
8 int i; | |
9 }; | |
10 | |
11 void f(S x) { x.i = 0; } | |
12 | |
13 extern "C" void abort (void); | |
14 int main() | |
15 { | |
16 S y; | |
17 f(static_cast<S&&>(y)); | |
18 if (y.i != 2) | |
19 abort (); | |
20 return 0; | |
21 } |