1 /* Define several variants of a struct for which the alignment differs
2 between powerpc64-linux and powerpc64-aix. This might be interesting
3 for other targets as well. */
5 #define DESC_orig "original"
30 #ifndef SKIP_ATTRIBUTE
31 #define DESC_p_all "packed attribute for all"
35 } __attribute__ ((packed));
39 } __attribute__ ((packed));
44 } __attribute__ ((packed));
49 } __attribute__ ((packed));
54 } __attribute__ ((packed));
56 #define DESC_p_inner "packed attribute for inner"
64 } __attribute__ ((packed));
74 } __attribute__ ((packed));
81 #define DESC_p_outer "packed attribute for outer"
85 } __attribute__ ((packed));
94 } __attribute__ ((packed));
103 struct A3_p_outer a3;
104 } __attribute__ ((packed));
106 #define DESC_a_max "maximum useful struct alignment for all"
110 } __attribute__ ((aligned));
114 } __attribute__ ((aligned));
119 } __attribute__ ((aligned));
124 } __attribute__ ((aligned));
129 } __attribute__ ((aligned));
131 #define DESC_m_outer_p_inner "maximum alignment for outer, packed inner"
132 struct B1_m_outer_p_inner {
135 } __attribute__ ((aligned)) __attribute__ ((packed));
137 struct A2_m_outer_p_inner {
139 } __attribute__ ((packed));
141 struct B2_m_outer_p_inner {
143 struct A2_m_outer_p_inner a2;
144 } __attribute__ ((aligned));
146 struct A3_m_outer_p_inner {
149 } __attribute__ ((packed));
151 struct B3_m_outer_p_inner {
153 struct A3_m_outer_p_inner a3;
154 } __attribute__ ((aligned));
156 #define DESC_m_inner_p_outer "maximum alignment for inner, packed outer"
157 struct B1_m_inner_p_outer {
160 } __attribute__ ((aligned)) __attribute__ ((packed));
162 struct A2_m_inner_p_outer {
164 } __attribute__ ((aligned));
166 struct B2_m_inner_p_outer {
168 struct A2_m_inner_p_outer a2;
169 } __attribute__ ((packed));
171 struct A3_m_inner_p_outer {
174 } __attribute__ ((aligned));
176 struct B3_m_inner_p_outer {
178 struct A3_m_inner_p_outer a3;
179 } __attribute__ ((packed));