2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / arm-fp16-compile-assign.c
blobd6143d2788136b00cf592570ae2add7ef34546b2
1 /* { dg-do compile { target arm*-*-* } } */
2 /* { dg-options "-mfp16-format=ieee" } */
4 /* Test basic assignments and conversions for __fp16. */
6 __fp16 h0 = -1.0;
7 __fp16 h1 = 0.0;
8 __fp16 h2 = 1234.0;
9 __fp16 h3 = 42.0;
10 float f1 = 2.0;
11 float f2 = -999.9;
13 void f (__fp16 *p)
15 __fp16 t;
17 h0 = 1.0;
18 h1 = h2;
19 h2 = f1;
20 f2 = h2;
22 t = *p;
23 *p = h3;
24 h3 = t;
27 /* Make sure we are not falling through to undefined libcalls. */
28 /* { dg-final { scan-assembler-not "__truncsfhf" } } */
29 /* { dg-final { scan-assembler-not "__extendhfsf" } } */