Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.target / i386 / ssefn-4.c
blob2d7407eaef846a474046abe715a4b916bec1779e
1 /* Execution test for argument passing with SSE2 and local functions
2 Written by Paolo Bonzini, 25 January 2005 */
4 /* { dg-do run } */
5 /* { dg-options "-O2 -msse2 -mfpmath=sse" } */
6 /* { dg-require-effective-target sse2 } */
8 #include "sse2-check.h"
10 #include <assert.h>
12 static float xs (void)
14 return 3.14159265;
17 float ys (float a)
19 return xs () * a;
22 static double xd (void)
24 return 3.1415926535;
27 double yd (double a)
29 return xd () * a;
32 static void
33 sse2_test (void)
35 assert (ys (1) == xs ());
36 assert (ys (2) == xs () * 2);
37 assert (yd (1) == xd ());
38 assert (yd (2) == xd () * 2);