repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Daily bump.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
nsdmi-union1.C
blob
c5acc4a789abd6307dc7446199ff84daa7128eb8
1
// PR c++/52377
2
// { dg-do run { target c++11 } }
3
4
union Test
5
{
6
int a{4};
7
};
8
9
union B
10
{
11
int i = 42;
12
double d;
13
B() = default;
14
B(double d): d(d) { }
15
};
16
17
int main()
18
{
19
Test t;
20
B b;
21
B b2(4.25);
22
23
if (t.a != 4 || b.i != 42 || b2.d != 4.25)
24
__builtin_abort();
25
}