Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/test_fpscr_drn_builtin_error.c

raw
1 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2 /* { dg-require-effective-target hard_dfp } */
3 /* { dg-options "-O2 -std=c99" } */
4
5 int main ()
6 {
7
8 /* Test builin with out of range arguments. The builtin
9 __builtin_set_fpscr_drn() also support a variable as an argument but
10 can't test variable value at compile time. */
11
12 __builtin_set_fpscr_drn(-1); /* { dg-error "argument 1 must be a variable or a literal between 0 and 7, inclusive" } */
13 __builtin_set_fpscr_drn(8); /* { dg-error "argument 1 must be a variable or a literal between 0 and 7, inclusive" } */
14
15 }
16