blob: 5043be2d1191394101266ccdc0dd990a66f3c669 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/* { dg-options "-O1 -fno-strict-aliasing" } */
/* PR rtl-optimization/41033 */
struct X {
int i;
int j;
};
int foo(struct X *p, struct X *q)
{
p->j = 1;
q->i = 0;
return p->j;
}
extern void abort (void);
int main()
{
struct X x;
if (foo (&x, (struct X *)&x.j) != 0)
abort ();
return 0;
}
|