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 c/64440
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
20050603-2.c
blob
8c8e58e1b4d60a363b33bdbb6284a01c5f83fbea
1
/* { dg-do run } */
2
/* { dg-options "-O2" } */
3
#include <stdlib.h>
4
struct
s
{
5
unsigned short
f
:
16
;
6
unsigned short
y
:
8
;
7
unsigned short
g
:
2
;
8
unsigned int
x
;
9
};
10
11
void
set
(
struct
s
*,
int
)
__attribute__
((
noinline
));
12
void
set
(
struct
s
*
p
,
int
flags
) {
13
p
->
g
=
flags
<<
1
;
14
}
15
16
int
17
main
() {
18
struct
s foo
= {
0
,
0
,
3
,
0
};
19
set
(&
foo
, -
1
);
20
if
(
foo
.
g
!=
2
)
21
abort
();
22
return
0
;
23
}