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
Merge reload-branch up to revision 101000
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
pr17112-1.c
blob
7c8b7aa04320ed329fc653cf2459a5661b7730dc
1
/* PR middle-end/17112 */
2
/* { dg-do run } */
3
/* { dg-options "-O2" } */
4
5
extern
void
abort
(
void
);
6
7
typedef
struct
{
8
int
int24
:
24
__attribute__
((
packed
));
9
}
myint24
;
10
11
myint24 x
[
3
] = {
12
0x123456
,
13
0x789abc
,
14
0xdef012
15
};
16
17
myint24 y
[
3
];
// starts out as zeros
18
19
void
foo
()
20
{
21
y
[
1
] =
x
[
1
];
22
}
23
24
int
main
()
25
{
26
foo
();
27
28
if
(
y
[
0
].
int24
!=
0
||
y
[
2
].
int24
!=
0
)
29
abort
();
30
return
0
;
31
}
32