| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-skip-if "not implemented for Darwin" { powerpc*-*-darwin* } } */ |
| 3 |
/* { dg-additional-options "-mno-speculate-indirect-jumps" } */ |
| 4 |
/* { dg-warning "'-mno-speculate-indirect-jumps' is deprecated" "" { target *-*-* } 0 } */ |
| 5 |
|
| 6 |
/* Test for deliberate misprediction of indirect calls. */ |
| 7 |
|
| 8 |
extern int (*f)(); |
| 9 |
|
| 10 |
int bar () |
| 11 |
{ |
| 12 |
return (*f) () * 53; |
| 13 |
} |
| 14 |
|
| 15 |
/* { dg-final { scan-assembler "crset 2" } } */ |
| 16 |
/* { dg-final { scan-assembler "beqctrl-" } } */ |