[ARM] Fix test armv8_2-fp16-move-1.c
[official-gcc.git] / gcc / testsuite / gcc.target / arm / neon-nested-apcs.c
blobcd92d7d33e7a43705f5245c1b22665708dba34ad
1 /* { dg-do run } */
2 /* { dg-require-effective-target arm_neon_hw } */
3 /* { dg-options "-fno-omit-frame-pointer -mapcs-frame -O" }
4 /* { dg-add-options arm_neon } */
6 extern void abort (void);
8 float data;
10 void __attribute__((noinline, noclone)) bar (float f)
12 data = f;
15 float __attribute__((noinline, noclone)) foo (float f)
17 int error_reported = 0;
19 void __attribute__((noinline, noclone))
20 nested (int a, int b, int c, int d, float f0, float f1, float f2, float f3)
22 float e;
24 if (f3 > f2)
25 e = f3;
26 else
27 e = f2;
29 if (f0 - f1 > e)
31 error_reported = a + b + c + d;
32 bar (f0);
33 bar (e);
37 nested (1, 2, 3, 4, 1.0, 1.0, 3.5, 4.2);
38 return f + (float)error_reported;
41 #define PI 3.1415927f
43 int main (void)
45 if (foo (PI) != PI)
46 abort ();
47 return 0;