repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git]
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
fail19919.d
blob
3c65cbf2f4055dd367c56f5672e0c673fca78bd7
1
/*
2
TEST_OUTPUT:
3
---
4
fail_compilation/fail19919.d(16): Error: union field `f` with default initialization `3.14F` must be before field `n`
5
fail_compilation/fail19919.d(23): Error: union field `f` with default initialization `3.14F` must be before field `n`
6
---
7
*/
8
9
void
main
()
10
{
11
struct
X
12
{
13
union
14
{
15
int
n
;
16
float
f
=
3.14f
;
17
}
18
}
19
20
union
U
21
{
22
int
n
;
23
float
f
=
3.14f
;
24
}
25
}