Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp1z/decomp27.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 // PR c++/80084 | |
2 // { dg-options -std=c++17 } | |
3 // { dg-do run } | |
4 | |
5 struct A | |
6 { | |
7 A() { } | |
8 A(const A&) { } | |
9 }; | |
10 | |
11 struct B | |
12 { | |
13 A a; | |
14 }; | |
15 | |
16 void f(B b) | |
17 { | |
18 auto& [a] = b; | |
19 if (&a != &b.a) | |
20 __builtin_abort(); | |
21 } | |
22 | |
23 int main() | |
24 { | |
25 f(B()); | |
26 } |