Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / builtins-36.c
blobdc71198844821374625097759ca228690a838dff
1 /* Copyright (C) 2004 Free Software Foundation.
3 Check sin, sinf, sinl, cos, cosf and cosl built-in functions
4 eventually compile to sincos, sincosf and sincosl.
6 Written by Uros Bizjak, 5th April 2004. */
8 /* { dg-do compile } */
9 /* { dg-options "-O2 -ffast-math" } */
11 extern double sin(double);
12 extern float sinf(float);
13 extern long double sinl(long double);
15 extern double cos(double);
16 extern float cosf(float);
17 extern long double cosl(long double);
20 double test1(double x)
22 double y1, y2;
24 y1 = sin(x);
25 y2 = cos(x);
27 return y1 - y2;
30 float test1f(float x)
32 float y1, y2;
34 y1 = sinf(x);
35 y2 = cosf(x);
37 return y1 - y2;
40 long double test1l(long double x)
42 long double y1, y2;
44 y1 = sinl(x);
45 y2 = cosl(x);
47 return y1 - y2;
50 double test2(double x)
52 return sin(x);
55 float test2f(float x)
57 return sinf(x);
60 long double test2l(long double x)
62 return sinl(x);
65 double test3(double x)
67 return cos(x);
70 float test3f(float x)
72 return cosf(x);
75 long double test3l(long double x)
77 return cosl(x);