Merged with mainline at revision 128810.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / ssefn-4.c
blobeacdfa79392360ee5cb10b364e0bd2ff02d172b3
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" } */
7 #include "sse2-check.h"
9 #include <assert.h>
11 static float xs (void)
13 return 3.14159265;
16 float ys (float a)
18 return xs () * a;
21 static double xd (void)
23 return 3.1415926535;
26 double yd (double a)
28 return xd () * a;
31 static void
32 sse2_test (void)
34 assert (ys (1) == xs ());
35 assert (ys (2) == xs () * 2);
36 assert (yd (1) == xd ());
37 assert (yd (2) == xd () * 2);