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 #define DESC_p_all "packed attribute for all"
34 } __attribute__ ((packed));
38 } __attribute__ ((packed));
43 } __attribute__ ((packed));
48 } __attribute__ ((packed));
53 } __attribute__ ((packed));
55 #define DESC_p_inner "packed attribute for inner"
63 } __attribute__ ((packed));
73 } __attribute__ ((packed));
80 #define DESC_p_outer "packed attribute for outer"
84 } __attribute__ ((packed));
93 } __attribute__ ((packed));
102 struct A3_p_outer a3;
103 } __attribute__ ((packed));
105 #define DESC_a_max "maximum useful struct alignment for all"
109 } __attribute__ ((aligned));
113 } __attribute__ ((aligned));
118 } __attribute__ ((aligned));
123 } __attribute__ ((aligned));
128 } __attribute__ ((aligned));
130 #define DESC_m_outer_p_inner "maximum alignment for outer, packed inner"
131 struct B1_m_outer_p_inner {
134 } __attribute__ ((aligned)) __attribute__ ((packed));
136 struct A2_m_outer_p_inner {
138 } __attribute__ ((packed));
140 struct B2_m_outer_p_inner {
142 struct A2_m_outer_p_inner a2;
143 } __attribute__ ((aligned));
145 struct A3_m_outer_p_inner {
148 } __attribute__ ((packed));
150 struct B3_m_outer_p_inner {
152 struct A3_m_outer_p_inner a3;
153 } __attribute__ ((aligned));
155 #define DESC_m_inner_p_outer "maximum alignment for inner, packed outer"
156 struct B1_m_inner_p_outer {
159 } __attribute__ ((aligned)) __attribute__ ((packed));
161 struct A2_m_inner_p_outer {
163 } __attribute__ ((aligned));
165 struct B2_m_inner_p_outer {
167 struct A2_m_inner_p_outer a2;
168 } __attribute__ ((packed));
170 struct A3_m_inner_p_outer {
173 } __attribute__ ((aligned));
175 struct B3_m_inner_p_outer {
177 struct A3_m_inner_p_outer a3;
178 } __attribute__ ((packed));