1 #include "compat-common.h"
2 #include "struct-align-1.h"
4 #define SETUP(NAME,V1,V2,V3) \
6 double v2_##NAME = V2; \
9 struct B1_##NAME b1_##NAME = { V1, V2 }; \
10 struct B2_##NAME b2_##NAME = { V1, { V2 } }; \
11 struct B3_##NAME b3_##NAME = { V1, { V2, V3 } }; \
13 struct B1_##NAME ab1_##NAME[2] = \
14 { { V1, V2 }, { V1, V2 } }; \
15 struct B2_##NAME ab2_##NAME[2] = \
16 { { V1, { V2 } }, { V1, { V2 } } }; \
17 struct B3_##NAME ab3_##NAME[2] = \
18 { { V1, { V2, V3 } }, { V1, { V2, V3 } } }; \
20 extern void test_##NAME (void); \
21 extern void checkp1_##NAME (struct B1_##NAME *); \
22 extern void checkp2_##NAME (struct B2_##NAME *); \
23 extern void checkp3_##NAME (struct B3_##NAME *); \
24 extern void checkg1_##NAME (void); \
25 extern void checkg2_##NAME (void); \
26 extern void checkg3_##NAME (void); \
29 pass1_##NAME (struct B1_##NAME s) \
31 checkp1_##NAME (&s); \
35 pass2_##NAME (struct B2_##NAME s) \
37 checkp2_##NAME (&s); \
41 pass3_##NAME (struct B3_##NAME s) \
43 checkp3_##NAME (&s); \
47 return1_##NAME (void) \
49 return ab1_##NAME[0]; \
53 return2_##NAME (void) \
55 return ab2_##NAME[0]; \
59 return3_##NAME (void) \
61 return ab3_##NAME[0]; \
64 #define CHECK(NAME) test_##NAME()
66 #if __INT_MAX__ > 32767
67 SETUP (orig
, 49, 1.0, 111111)
69 SETUP (orig
, 49, 1.0, 1111)
71 #ifndef SKIP_ATTRIBUTE
72 #if __INT_MAX__ > 32767
73 SETUP (p_all
, 50, 2.0, 222222)
74 SETUP (p_inner
, 51, 3.0, 333333)
75 SETUP (p_outer
, 52, 4.0, 444444)
76 SETUP (a_max
, 53, 5.0, 555555)
77 SETUP (m_outer_p_inner
, 54, 6.0, 666666)
78 SETUP (m_inner_p_outer
, 55, 7.0, 777777)
80 SETUP (p_all
, 50, 2.0, 2222)
81 SETUP (p_inner
, 51, 3.0, 3333)
82 SETUP (p_outer
, 52, 4.0, 4444)
83 SETUP (a_max
, 53, 5.0, 5555)
84 SETUP (m_outer_p_inner
, 54, 6.0, 6666)
85 SETUP (m_inner_p_outer
, 55, 7.0, 7777)
90 struct_align_1_x (void)
95 #ifndef SKIP_ATTRIBUTE
100 CHECK (m_outer_p_inner
);
101 CHECK (m_inner_p_outer
);