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
* es.po: Update.
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.target
/
rx
/
pack.c
blob
ce13b5021b2d60485f3f616c8c456484dbf3cecd
1
/* { dg-do run } */
2
3
typedef
unsigned short
INT16U
;
4
5
typedef
struct
tst_2
6
{
7
INT16U f0
;
/* [+0] */
8
INT16U
*
f1
;
/* [+2] */
9
INT16U f2
;
/* [+6] */
10
INT16U
*
f3
;
/* [+8] */
11
}
__attribute__
((
__packed__
))
t2
;
12
13
#include <stddef.h>
14
#include <stdlib.h>
15
16
int
main
(
void
)
17
{
18
if
(
offsetof
(
t2
,
f1
) !=
2
)
19
abort
();
20
if
(
offsetof
(
t2
,
f2
) !=
6
)
21
abort
();
22
if
(
offsetof
(
t2
,
f3
) !=
8
)
23
abort
();
24
exit
(
0
);
25
}