2 /* { dg-options "-O2" } */
3 /* { dg-additional-options "-mfp16-format=ieee" {target "arm*-*-*"} } */
5 extern void abort (void);
10 main (int argc
, char **argv
)
14 /* This 'assembler' should be portable across ARM and AArch64. */
15 asm volatile ("" : : : "memory");
20 /* Do the addition on __fp16's (implicitly converts both operands to
21 float32, adds, converts back to f16, then we convert to int). */
22 __fp16 res1
= in1
+ in2
;
23 asm volatile ("" : : : "memory");
26 /* Do the addition on int's (we convert both operands directly to int, add,
28 int result2
= ((int) in1
) + ((int) in2
);
30 if (__builtin_abs (result2
- result1
) > EPSILON
)