1 /* Test program to test bit field operations on bit fields of large
4 /* This file is expected to fail to compile if the type long long int
5 is not supported, but in that case it is irrelevant. */
10 #if !defined(__STDC__) && !defined(__cplusplus)
16 unsigned long long u1
: 15;
17 unsigned long long u2
: 33;
18 unsigned long long u3
: 16;
19 signed long long s1
: 15;
20 signed long long s2
: 33;
21 signed long long s3
: 16;
64 /* This is used by bitfields.exp to determine if the target understands
70 memset ((char *) &flags
, 0, sizeof (flags
));
72 /* For each member, set that member to 1, allow gdb to verify that the
73 member (and only that member) is 1, and then reset it back to 0. */
98 /* Fill alternating fields with all 1's and verify that none of the bits
99 "bleed over" to the other fields. */
109 flags
.u2
= 0x1FFFFFFFFLL
;
118 /* Fill the unsigned fields with the maximum positive value and verify
119 that the values are printed correctly. */
122 flags
.u2
= 0x1FFFFFFFFLL
;
129 /* Fill the signed fields with the maximum positive value, then the maximally
130 negative value, then -1, and verify in each case that the values are
131 printed correctly. */
133 /* Maximum positive values */
135 flags
.s2
= 0xFFFFFFFFLL
;
139 /* Maximally negative values */
141 flags
.s2
= -0x100000000LL
;
144 /* Extract bitfield value so that bitfield.exp can check if the target
145 understands signed bitfields. */
166 for (i
= 0; i
< 5; i
+= 1)
This page took 0.032799 seconds and 4 git commands to generate.