blob: 09668face34d18c063911c1da8567dd9e60a0338 (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/* { dg-do run } */
#include <stdlib.h>
struct S { int a; struct V *b; };
typedef struct { int c; } T;
typedef struct { int d; int e; } U;
void *
fn (void *x)
{
return x;
}
int
foo (struct S *s)
{
T x;
T y = *(T *)fn (&x);
return y.c;
}
int
bar (struct S *s)
{
U x;
U y = *(U *)fn (&x);
return y.d + s->a;
}
int
main ()
{
struct S s;
foo(&s) + bar (&s);
return 0;
}
/*--------------------------------------------------------------------------*/
/* { dg-final { scan-ipa-dump "No structures to transform" "ipa_struct_reorg" { xfail *-*-* } } } */
/* { dg-final { cleanup-ipa-dump "*" } } */
|