1 /* Test program to test bit field operations */
3 /* For non-ANSI compilers, use plain ints for the signed bit fields. However,
4 whether they actually end up signed or not is implementation defined, so
5 this may cause some tests to fail. But at least we can still compile
6 the test program and run the tests... */
8 #if !defined(__STDC__) && !defined(__cplusplus)
26 struct internalvartest
40 } dummy_internalvartest
;
88 /* This is used by bitfields.exp to determine if the target understands
94 /* For each member, set that member to 1, allow gdb to verify that the
95 member (and only that member) is 1, and then reset it back to 0. */
137 /* Fill alternating fields with all 1's and verify that none of the bits
138 "bleed over" to the other fields. */
164 /* Fill the unsigned fields with the maximum positive value and verify
165 that the values are printed correctly. */
167 /* Maximum positive values */
178 /* Fill the signed fields with the maximum positive value, then the maximally
179 negative value, then -1, and verify in each case that the values are
180 printed correctly. */
182 /* Maximum positive values */
189 /* Maximally negative values */
194 /* Extract bitfield value so that bitfield.exp can check if the target
195 understands signed bitfields. */
211 /* Bitfields at a non-zero offset in a containing structure. */
212 container
.one
.u3
= 5;
213 container
.two
.u3
= 3;