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

Subversion Repositories openrisc

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

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 short U __attribute__((may_alias, aligned (1)));
6
 
7
struct S
8
{
9
  double d;
10
};
11
 
12
void bar (struct S);
13
 
14
void
15
f1 (int x)
16
{
17
  struct S s = { .d = 0.0 };
18
  ((U *)((char *) &s.d + 1))[-1] = x;
19
  __real__ s.d *= 7.0;
20
  bar (s);
21
}
22
 
23
void
24
f2 (int x)
25
{
26
  struct S s = { .d = 0.0 };
27
  ((U *)((char *) &s.d + 1))[-2] = x;
28
  __real__ s.d *= 7.0;
29
  bar (s);
30
}
31
 
32
void
33
f3 (int x)
34
{
35
  struct S s = { .d = 0.0 };
36
  ((U *)((char *) &s.d + 1))[5] = x;
37
  __real__ s.d *= 7.0;
38
  bar (s);
39
}

powered by: WebSVN 2.1.0

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