| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdump-ipa-icf-details" } */ |
| 3 |
|
| 4 |
static int f(int t, int *a) __attribute__((noinline)); |
| 5 |
|
| 6 |
static int g(int t, volatile int *a) __attribute__((noinline)); |
| 7 |
static int g(int t, volatile int *a) |
| 8 |
{ |
| 9 |
int i; |
| 10 |
int tt = 0; |
| 11 |
for(i=0;i<t;i++) |
| 12 |
tt += *a; |
| 13 |
return tt; |
| 14 |
} |
| 15 |
static int f(int t, int *a) |
| 16 |
{ |
| 17 |
int i; |
| 18 |
int tt = 0; |
| 19 |
for(i=0;i<t;i++) |
| 20 |
tt += *a; |
| 21 |
return tt; |
| 22 |
} |
| 23 |
|
| 24 |
|
| 25 |
int h(int t, int *a) |
| 26 |
{ |
| 27 |
return f(t, a) + g(t, a); |
| 28 |
} |
| 29 |
|
| 30 |
/* { dg-final { scan-ipa-dump "Equal symbols: 0" "icf" } } */ |