| 1 |
/* { dg-do compile { target powerpc*-*-* } } */ |
| 2 |
/* { dg-options "-O2 -std=c99" } */ |
| 3 |
|
| 4 |
int main () |
| 5 |
{ |
| 6 |
|
| 7 |
/* Test builin with out of range arguments. Can only test for constant |
| 8 |
int arguments. The builtins __builtin_set_fpscr_rn() also supports a |
| 9 |
variable as an argument but can't test variable value at compile time. */ |
| 10 |
|
| 11 |
__builtin_mtfsb0(-1); /* { dg-error "argument 1 must be a literal between 0 and 31, inclusive" } */ |
| 12 |
__builtin_mtfsb0(32); /* { dg-error "argument 1 must be a literal between 0 and 31, inclusive" } */ |
| 13 |
|
| 14 |
__builtin_mtfsb1(-1); /* { dg-error "argument 1 must be a literal between 0 and 31, inclusive" } */ |
| 15 |
__builtin_mtfsb1(32); /* { dg-error "argument 1 must be a literal between 0 and 31, inclusive" } */ |
| 16 |
|
| 17 |
__builtin_set_fpscr_rn(-1); /* { dg-error "argument 1 must be a variable or a literal between 0 and 3, inclusive" } */ |
| 18 |
__builtin_set_fpscr_rn(4); /* { dg-error "argument 1 must be a variable or a literal between 0 and 3, inclusive" } */ |
| 19 |
} |
| 20 |
|