gcc/testsuite/gcc.target/sh/sh4a-cosf.c
raw| 1 | /* Verify that we generate single-precision sine and cosine approximate |
| 2 | (fsca) in fast math mode on SH4A with FPU. */ |
| 3 | /* { dg-do compile { target { sh4a && any_fpu } } } */ |
| 4 | /* { dg-options "-O -ffast-math" } */ |
| 5 | /* { dg-final { scan-assembler "fsca" } } */ |
| 6 | |
| 7 | #include <math.h> |
| 8 | |
| 9 | float |
| 10 | test (float f) |
| 11 | { |
| 12 | return cosf (f); |
| 13 | } |