1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#include <stdarg.h>
#include "compat-common.h"
#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
#endif
#define T(NAME, TYPE, INITVAL) \
extern TYPE g01##NAME; \
\
extern void check##NAME (TYPE x, TYPE v); \
\
void \
init##NAME (TYPE *p, TYPE v) \
{ \
*p = v + INITVAL; \
} \
\
void \
checkg##NAME (void) \
{ \
check##NAME (g01##NAME, 1+INITVAL); \
} \
\
TYPE \
test0##NAME (void) \
{ \
return g01##NAME; \
} \
\
TYPE \
test1##NAME (TYPE x01) \
{ \
return x01; \
}
#ifndef SKIP_COMPLEX
#ifndef SKIP_COMPLEX_INT
T(cc, _Complex char, CINT (0, 1))
T(cs, _Complex short, CINT (1, 2))
#endif
T(cf, _Complex float, CDBL (1.0, 2.0))
#endif
|