microblaze: Avoid clobbering register parameters in syscall
[glibc.git] / math / tst-CMPLX.c
blobfa0747b9915765764a70a5d280216926b21ee1bd
1 #include <complex.h>
2 #include <stdio.h>
5 static int
6 do_test (void)
8 int result = 0;
10 #ifdef CMPLX
11 size_t s;
13 #define T(f, r, i, t) \
14 do { \
15 s = sizeof (f (r, i)); \
16 if (s != sizeof (complex t)) \
17 { \
18 printf ("\
19 CMPLX (" #r ", " #i ") does not produce complex " #t ": %zu\n", s); \
20 result = 1; \
21 } \
22 } while (0)
24 #define C(f, t) \
25 do { \
26 T (f, 0.0f, 0.0f, t); \
27 T (f, 0.0f, 0.0, t); \
28 T (f, 0.0f, 0.0L, t); \
29 T (f, 0.0f, 0.0f, t); \
30 T (f, 0.0, 0.0f, t); \
31 T (f, 0.0L, 0.0f, t); \
32 T (f, 0.0, 0.0f, t); \
33 T (f, 0.0, 0.0, t); \
34 T (f, 0.0, 0.0L, t); \
35 T (f, 0.0f, 0.0, t); \
36 T (f, 0.0, 0.0, t); \
37 T (f, 0.0L, 0.0, t); \
38 T (f, 0.0L, 0.0f, t); \
39 T (f, 0.0L, 0.0, t); \
40 T (f, 0.0L, 0.0L, t); \
41 T (f, 0.0f, 0.0L, t); \
42 T (f, 0.0, 0.0L, t); \
43 T (f, 0.0L, 0.0L, t); \
44 } while (0)
46 C (CMPLXF, float);
47 C (CMPLX, double);
48 C (CMPLXL, long double);
49 #endif
51 return result;
54 #define TEST_FUNCTION do_test ()
55 #include "../test-skeleton.c"