Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.brendan / union1.C
blobffc5555d75109b2c8af7c63cd0d01436d1c67e1a
1 // { dg-do run  }
2 // GROUPS passed unions
3 // This is fixed by finish_anon_union doing a string_cst_equal check on
4 // the DECL_SIZE of the decls, instead of comparing the DECL_SIZE nodes.
6 // The compiler currently fails to allocate space for the static union.
8      unsigned
9      hash(const double d)
10      {
11         static union {
12            unsigned asint[2];
13            double asdouble;
14         };
15         asdouble = d;
16         return asint[0] ^ asint[1];
17      }
19 int main ()
21   hash (3.1415);