[ARM] Fix test armv8_2-fp16-move-1.c
[official-gcc.git] / gcc / testsuite / gcc.target / arm / pr63408.c
blob850596bd1803a83fb663d08d7ce7a48c1f17bae0
1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
3 void abort (void) __attribute__ ((noreturn));
4 float __attribute__((noinline))
5 f(float a, int b)
7 return a - (((float)b / 0x7fffffff) * 100);
10 int
11 main (void)
13 float a[] = { 100.0, 0.0, 0.0};
14 int b[] = { 0x7fffffff, 0x7fffffff/100.0f, -0x7fffffff / 100.0f};
15 float c[] = { 0.0, -1.0, 1.0 };
16 int i;
18 for (i = 0; i < (sizeof(a) / sizeof (float)); i++)
19 if (f (a[i], b[i]) != c[i])
20 abort ();
22 return 0;