repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* gcc.target/i386/mpx/hard-reg-1-nov.c (mpx_test): Use "esp"
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
921204-1.c
blob
a7bba830a34ca0f794986d772560e610d99c147e
1
/* The bit-field below would have a problem if __INT_MAX__ is too
2
small. */
3
#if __INT_MAX__ < 2147483647
4
int
5
main
(
void
)
6
{
7
exit
(
0
);
8
}
9
#else
10
typedef
struct
{
11
unsigned
b0
:
1
,
f1
:
17
,
b18
:
1
,
b19
:
1
,
b20
:
1
,
f2
:
11
;
12
}
bf
;
13
14
typedef
union
{
15
bf b
;
16
unsigned
w
;
17
}
bu
;
18
19
bu
20
f
(
bu i
)
21
{
22
bu o
=
i
;
23
24
if
(
o
.
b
.
b0
)
25
o
.
b
.
b18
=
1
,
26
o
.
b
.
b20
=
1
;
27
else
28
o
.
b
.
b18
=
0
,
29
o
.
b
.
b20
=
0
;
30
31
return
o
;
32
}
33
34
main
()
35
{
36
bu a
;
37
bu r
;
38
39
a
.
w
=
0x4000000
;
40
a
.
b
.
b0
=
0
;
41
r
=
f
(
a
);
42
if
(
a
.
w
!=
r
.
w
)
43
abort
();
44
exit
(
0
);
45
}
46
#endif