| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-O0 -fipa-icf -fdump-ipa-icf" } */ |
| 3 |
|
| 4 |
struct S |
| 5 |
{ |
| 6 |
int a; |
| 7 |
}; |
| 8 |
|
| 9 |
int |
| 10 |
foo3 (struct S x, struct S y, struct S z) |
| 11 |
{ |
| 12 |
if (z.a != 9) |
| 13 |
__builtin_abort (); |
| 14 |
return 0; |
| 15 |
} |
| 16 |
|
| 17 |
int |
| 18 |
bar3 (struct S x, struct S y, struct S z) |
| 19 |
{ |
| 20 |
return foo3 (y, x, z); |
| 21 |
} |
| 22 |
|
| 23 |
int |
| 24 |
baz3 (struct S x, struct S y, struct S z) |
| 25 |
{ |
| 26 |
return foo3 (y, z, x); |
| 27 |
} |
| 28 |
|
| 29 |
int |
| 30 |
main (void) |
| 31 |
{ |
| 32 |
struct S |
| 33 |
a = { 3 }, |
| 34 |
b = { 6 }, |
| 35 |
c = { 9 }; |
| 36 |
|
| 37 |
return bar3 (b, a, c); |
| 38 |
} |
| 39 |
|
| 40 |
/* { dg-final { scan-ipa-dump "Equal symbols: 0" "icf" } } */ |