Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / gcc.dg / compat / scalar-by-value-2_y.c
blob2eea6135d74c293b4848bce530c7935891918107
1 #include <stdarg.h>
3 #include "compat-common.h"
5 #define T(NAME, TYPE, INITVAL) \
6 extern TYPE g01##NAME, g02##NAME, g03##NAME, g04##NAME; \
7 extern TYPE g05##NAME, g06##NAME, g07##NAME, g08##NAME; \
8 extern TYPE g09##NAME, g10##NAME, g11##NAME, g12##NAME; \
9 extern TYPE g13##NAME, g14##NAME, g15##NAME, g16##NAME; \
11 extern void check##NAME (TYPE x, TYPE v); \
13 void \
14 init##NAME (TYPE *p, TYPE v) \
15 { \
16 *p = v + INITVAL; \
17 } \
19 void \
20 checkg##NAME (void) \
21 { \
22 check##NAME (g01##NAME, 1); \
23 check##NAME (g02##NAME, 2); \
24 check##NAME (g03##NAME, 3); \
25 check##NAME (g04##NAME, 4); \
26 check##NAME (g05##NAME, 5); \
27 check##NAME (g06##NAME, 6); \
28 check##NAME (g07##NAME, 7); \
29 check##NAME (g08##NAME, 8); \
30 check##NAME (g09##NAME, 9); \
31 check##NAME (g10##NAME, 10); \
32 check##NAME (g11##NAME, 11); \
33 check##NAME (g12##NAME, 12); \
34 check##NAME (g13##NAME, 13); \
35 check##NAME (g14##NAME, 14); \
36 check##NAME (g15##NAME, 15); \
37 check##NAME (g16##NAME, 16); \
38 } \
40 void \
41 test##NAME (TYPE x01, TYPE x02, TYPE x03, TYPE x04, \
42 TYPE x05, TYPE x06, TYPE x07, TYPE x08, \
43 TYPE x09, TYPE x10, TYPE x11, TYPE x12, \
44 TYPE x13, TYPE x14, TYPE x15, TYPE x16) \
45 { \
46 check##NAME (x01, 1); \
47 check##NAME (x02, 2); \
48 check##NAME (x03, 3); \
49 check##NAME (x04, 4); \
50 check##NAME (x05, 5); \
51 check##NAME (x06, 6); \
52 check##NAME (x07, 7); \
53 check##NAME (x08, 8); \
54 check##NAME (x09, 9); \
55 check##NAME (x10, 10); \
56 check##NAME (x11, 11); \
57 check##NAME (x12, 12); \
58 check##NAME (x13, 13); \
59 check##NAME (x14, 14); \
60 check##NAME (x15, 15); \
61 check##NAME (x16, 16); \
64 T(c, char, 21)
65 T(uc, unsigned char, 22)
66 T(sc, signed char, (-33))
67 T(us, unsigned short, 41)
68 T(ss, short, (-44))
69 T(f, float, 90.0)