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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr38745.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do compile } */
2
 
3
union u_u16
4
{
5
  unsigned short v;
6
  struct
7
    {
8
      unsigned char lo8, hi8;
9
    } __attribute__ ((__may_alias__)) u;
10
} __attribute__ ((__may_alias__));
11
union u_u32
12
{
13
  unsigned int v;
14
  struct
15
    {
16
      u_u16 lo16, hi16;
17
    } u;
18
} __attribute__ ((__may_alias__));
19
union u_u64
20
{
21
  struct
22
    {
23
      u_u32 lo32, hi32;
24
    } u;
25
};
26
struct Record
27
{
28
};
29
long long
30
UnpackFullKey (Record & rec, const char *&p)
31
{
32
  long long c64 = 0;
33
  (*(u_u16 *) & (*(u_u32 *) & ( *(u_u64*)&c64).u.lo32.v).u.lo16.v).u.hi8 = 1;
34
  return c64;
35
}
36
 

powered by: WebSVN 2.1.0

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