]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/g++.old-deja/g++.brendan/union1.C
Handle anonymous unions at the tree level.
[gcc.git] / gcc / testsuite / g++.old-deja / g++.brendan / union1.C
CommitLineData
921e5a0e
JL
1// GROUPS passed unions
2// This is fixed by finish_anon_union doing a string_cst_equal check on
3// the DECL_SIZE of the decls, instead of comparing the DECL_SIZE nodes.
f17d060e
JM
4
5// The compiler currently fails to allocate space for the static union.
f17d060e 6
921e5a0e
JL
7 unsigned
8 hash(const double d)
9 {
10 static union {
11 unsigned asint[2];
12 double asdouble;
13 };
14 asdouble = d;
15 return asint[0] ^ asint[1];
16 }
f17d060e
JM
17
18int main ()
19{
20 hash (3.1415);
21}
This page took 1.533502 seconds and 5 git commands to generate.