1 /* Test __builtin_tgmath: valid uses, _FloatN types. */
3 /* { dg-options "" } */
4 /* { dg-add-options float32 } */
5 /* { dg-require-effective-target float32_runtime } */
7 extern void abort (void);
8 extern void exit (int);
10 #define CHECK_CALL(C, E, V) \
15 extern __typeof (C) V; \
21 extern long double var_ld
;
22 extern _Float32 var_f32
;
24 float t1f (float x
) { return x
+ 1; }
25 double t1d (double x
) { return x
+ 2; }
26 long double t1l (long double x
) { return x
+ 3; }
27 _Float32
t1f32 (_Float32 x
) { return x
+ 4; }
29 #define t1v(x) __builtin_tgmath (t1f, t1d, t1l, t1f32, x)
39 CHECK_CALL (t1v (f
), 2, var_f
);
40 CHECK_CALL (t1v (d
), 4, var_d
);
41 CHECK_CALL (t1v (ld
), 6, var_ld
);
42 CHECK_CALL (t1v (f32
), 8, var_f32
);
43 CHECK_CALL (t1v (i
), 7, var_d
);