1 /* { dg-do compile { target powerpc*-*-* } } */
2 /* { dg-options "-O2 -std=c99" } */
3 
main()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 must be a constant between 0 and 31" } */
12   __builtin_mtfsb0(32);  /* { dg-error "Argument must be a constant between 0 and 31" } */
13 
14   __builtin_mtfsb1(-1);  /* { dg-error "Argument must be a constant between 0 and 31" } */
15   __builtin_mtfsb1(32);  /* { dg-error "Argument must be a constant between 0 and 31" } */
16 
17   __builtin_set_fpscr_rn(-1);  /* { dg-error "Argument must be a value between 0 and 3" } */
18   __builtin_set_fpscr_rn(4);   /* { dg-error "Argument must be a value between 0 and 3" } */
19 }
20 
21