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 inline-asm/84742
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
strct-pack-4.c
blob
56d315f47ff07d7c7cf23b72a8de95cbacaa1367
1
typedef
struct
2
{
3
unsigned char
a
__attribute__
((
packed
));
4
unsigned short
b
__attribute__
((
packed
));
5
}
three_char_t
;
6
7
unsigned char
8
my_set_a
(
void
)
9
{
10
return
0xab
;
11
}
12
13
unsigned short
14
my_set_b
(
void
)
15
{
16
return
0x1234
;
17
}
18
19
main
()
20
{
21
three_char_t three_char
;
22
23
three_char
.
a
=
my_set_a
();
24
three_char
.
b
=
my_set_b
();
25
if
(
three_char
.
a
!=
0xab
||
three_char
.
b
!=
0x1234
)
26
abort
();
27
exit
(
0
);
28
}
29