| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdump-ipa-cp-details" } */ |
| 3 |
|
| 4 |
volatile int cond; |
| 5 |
int abs (int); |
| 6 |
|
| 7 |
volatile int g; |
| 8 |
|
| 9 |
int __attribute__((noinline, noclone)) |
| 10 |
take_address (int *p) |
| 11 |
{ |
| 12 |
g = *p; |
| 13 |
} |
| 14 |
|
| 15 |
static int __attribute__((noinline, noclone)) |
| 16 |
foo (int i) |
| 17 |
{ |
| 18 |
if (i < 5) |
| 19 |
__builtin_abort (); |
| 20 |
return 0; |
| 21 |
} |
| 22 |
|
| 23 |
static int __attribute__((noinline, noclone)) |
| 24 |
bar (int j) |
| 25 |
{ |
| 26 |
foo (~j); |
| 27 |
foo (abs (j)); |
| 28 |
foo (j); |
| 29 |
take_address (&j); |
| 30 |
return 0; |
| 31 |
} |
| 32 |
|
| 33 |
int |
| 34 |
main () |
| 35 |
{ |
| 36 |
for (unsigned int i = 0; i < 10; ++i) |
| 37 |
bar (i); |
| 38 |
|
| 39 |
return 0; |
| 40 |
} |
| 41 |
|
| 42 |
/* { dg-final { scan-ipa-dump-times "Setting value range of param 0 \\(now 0\\) .irange. int \\\[-10, 9\\\]" 1 "cp" } } */ |