OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
PR testsuite/21010
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.dg
/
pr17112-1.c
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