OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.brendan/] [union1.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { 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.
5
 
6
// The compiler currently fails to allocate space for the static union.
7
 
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
     }
18
 
19
int main ()
20
{
21
  hash (3.1415);
22
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.