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

Subversion Repositories openrisc

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

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));
6
 
7
struct S
8
{
9
  _Complex float d __attribute__((aligned (8)));
10
};
11
 
12
int
13
f1 (struct S x)
14
{
15
  struct S s = x;
16
  return *(T *) &s.d;
17
}
18
 
19
int
20
f2 (struct S x)
21
{
22
  struct S s = x;
23
  return *(char *) &s.d;
24
}
25
 
26
int
27
f3 (struct S x)
28
{
29
  struct S s = x;
30
  return ((char *) &s.d)[2];
31
}
32
 
33
int
34
f4 (struct S x, int y)
35
{
36
  struct S s = x;
37
  return ((char *) &s.d)[y];
38
}

powered by: WebSVN 2.1.0

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