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
C99 testsuite readiness: Compile more tests with -std=gnu89
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
strct-pack-3.c
blob
69adf576bf8ba8f1dd99099c8f8d1dc5660d3068
1
/* { dg-additional-options "-std=gnu89" } */
2
3
typedef
struct
4
{
5
short
i
__attribute__
((
aligned
(
2
),
packed
));
6
int
f
[
2
]
__attribute__
((
aligned
(
2
),
packed
));
7
}
A
;
8
9
f
(
ap
)
10
A
*
ap
;
11
{
12
short
i
,
j
=
1
;
13
14
i
=
ap
->
f
[
1
];
15
i
+=
ap
->
f
[
j
];
16
for
(
j
=
0
;
j
<
2
;
j
++)
17
i
+=
ap
->
f
[
j
];
18
19
return
i
;
20
}
21
22
main
()
23
{
24
A a
;
25
a
.
f
[
0
] =
100
;
26
a
.
f
[
1
] =
13
;
27
if
(
f
(&
a
) !=
139
)
28
abort
();
29
exit
(
0
);
30
}