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
PR tree-optimization/78170: Truncate sign-extended padding when encoding bitfields
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
pr78170.c
blob
8ef812ee6accb62db8dd6889d74032a88b784d2c
1
/* PR tree-optimization/78170.
2
Check that sign-extended store to a bitfield
3
doesn't overwrite other fields. */
4
5
int
a
,
b
,
d
;
6
7
struct
S0
8
{
9
int
f0
;
10
int
f1
;
11
int
f2
;
12
int
f3
;
13
int
f4
;
14
int
f5
:
15
;
15
int
f6
:
17
;
16
int
f7
:
2
;
17
int
f8
:
30
;
18
}
c
;
19
20
void
fn1
()
21
{
22
d
=
b
=
1
;
23
for
(;
b
;
b
=
a
)
24
{
25
struct
S0 e
= {
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
1
};
26
c
=
e
;
27
c
.
f6
= -
1
;
28
}
29
}
30
31
int
main
()
32
{
33
fn1
();
34
if
(
c
.
f7
!=
0
)
35
__builtin_abort
();
36
return
0
;
37
}