Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp0x/rv9p.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// PR c++/36744 // { dg-do run { target c++11 } } struct S { S(): i(2) {} S(S const&s): i(s.i) {} int i; }; void f(S x) { x.i = 0; } extern "C" void abort (void); int main() { S y; f(static_cast<S&&>(y)); if (y.i != 2) abort (); return 0; }