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

#include <math.h>

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