aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/sh/sh4a-cosf.c
blob: d6277da7e9ae9f029e6687c665489b6fe1d34b8f (plain)
1
2
3
4
5
6
7
8
9
10
11
/* Verify that we generate single-precision sine and cosine approximate
   (fsca) in fast math mode on SH4A with FPU.  */
/* { dg-do compile }  */
/* { dg-options "-O -ffast-math" } */
/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m4a" "-m4a-single" "-m4a-single-only" } }  */
/* { dg-final { scan-assembler "fsca" } } */

#include <math.h>

float test(float f) { return cosf(f); }