1 /* { dg-do compile { target arm*-*-* } } */
2 /* { dg-options "-mfp16-format=ieee" } */
3 
4 /* Test basic assignments and conversions for __fp16.  */
5 
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;
12 
f(__fp16 * p)13 void f (__fp16 *p)
14 {
15   __fp16 t;
16 
17   h0 = 1.0;
18   h1 = h2;
19   h2 = f1;
20   f2 = h2;
21 
22   t = *p;
23   *p = h3;
24   h3 = t;
25 }
26 
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" } } */
30