| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O3 -fdump-ipa-cp-details -fno-early-inlining --param ipa-cp-max-recursive-depth=8 --param ipa-cp-eval-threshold=1" } */ |
| 3 |
|
| 4 |
struct V { |
| 5 |
int f0; |
| 6 |
int f1; |
| 7 |
}; |
| 8 |
|
| 9 |
int data[100]; |
| 10 |
|
| 11 |
int fn (); |
| 12 |
|
| 13 |
int recur_fn (struct V * __restrict v) |
| 14 |
{ |
| 15 |
int i = v->f0; |
| 16 |
int j = v->f1; |
| 17 |
struct V t; |
| 18 |
|
| 19 |
if (j > 100) |
| 20 |
{ |
| 21 |
fn (); |
| 22 |
return 1; |
| 23 |
} |
| 24 |
|
| 25 |
data[i] = i; |
| 26 |
|
| 27 |
t.f0 = i - 2; |
| 28 |
t.f1 = j + 1; |
| 29 |
|
| 30 |
recur_fn (&t); |
| 31 |
|
| 32 |
return i * j; |
| 33 |
} |
| 34 |
|
| 35 |
int main () |
| 36 |
{ |
| 37 |
struct V v; |
| 38 |
|
| 39 |
v.f0 = 1; |
| 40 |
v.f1 = 3; |
| 41 |
return recur_fn (&v); |
| 42 |
} |
| 43 |
|
| 44 |
/* { dg-final { scan-ipa-dump-times "Creating a specialized node of recur_fn/\[0-9\]*\\." 8 "cp" } } */ |