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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr48335-6.c] - Blame information for rev 749

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

Line No. Rev Author Line
1 689 jeremybenn
/* PR middle-end/48335 */
2
/* { dg-do compile } */
3
/* { dg-options "-O2 -fno-tree-sra" } */
4
 
5
typedef long long T __attribute__((may_alias, aligned (1)));
6
typedef short U __attribute__((may_alias, aligned (1)));
7
 
8
struct S
9
{
10
  _Complex float d __attribute__((aligned (8)));
11
};
12
 
13
T
14
f1 (struct S x)
15
{
16
  struct S s = x;
17
  return *(T *) ((char *) &s.d + 1);
18
}
19
 
20
int
21
f2 (struct S x)
22
{
23
  struct S s = x;
24
  return ((U *)((char *) &s.d + 1))[0];
25
}
26
 
27
int
28
f3 (struct S x)
29
{
30
  struct S s = x;
31
  return ((U *)((char *) &s.d + 1))[1];
32
}
33
 
34
int
35
f4 (struct S x)
36
{
37
  struct S s = x;
38
  return ((U *)((char *) &s.d + 1))[2];
39
}
40
 
41
int
42
f5 (struct S x)
43
{
44
  struct S s = x;
45
  return ((U *)((char *) &s.d + 1))[3];
46
}

powered by: WebSVN 2.1.0

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