| 1 |
// { dg-do run } |
| 2 |
// { dg-additional-options "-fno-early-inlining" } |
| 3 |
struct S101273 |
| 4 |
{ |
| 5 |
int x; |
| 6 |
S101273* impl; |
| 7 |
S101273(int x) |
| 8 |
{ |
| 9 |
this->x = x; |
| 10 |
this->impl = this; |
| 11 |
} |
| 12 |
S101273(const S101273 &o) |
| 13 |
{ |
| 14 |
this->x = o.x; |
| 15 |
this->impl = this; |
| 16 |
} |
| 17 |
~S101273() { } |
| 18 |
}; |
| 19 |
|
| 20 |
S101273 makeS101273() |
| 21 |
{ |
| 22 |
return S101273(2); |
| 23 |
} |
| 24 |
|
| 25 |
S101273 nrvo101273() |
| 26 |
{ |
| 27 |
S101273 ret = makeS101273(); |
| 28 |
return ret; |
| 29 |
} |
| 30 |
|
| 31 |
int main() |
| 32 |
{ |
| 33 |
auto nrvo = nrvo101273(); |
| 34 |
if(&nrvo != nrvo.impl) __builtin_abort (); |
| 35 |
|
| 36 |
return 0; |
| 37 |
} |