blob: 04d3a2e0e217f2d92a8024c7a334f4b5be7cef12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/* PR middle-end/17112 */
/* { dg-do run } */
/* { dg-require-effective-target int32plus } */
/* { dg-options "-O2" } */
extern void abort(void);
typedef struct {
int int24:24 __attribute__ ((packed)); /* { dg-warning "attribute ignored" "" { target { default_packed && { ! pcc_bitfield_type_matters } } } } */
} myint24;
myint24 x[3] = {
0x123456,
0x789abc,
0xdef012
};
myint24 y[3]; // starts out as zeros
void foo()
{
y[1] = x[1];
}
int main()
{
foo();
if (y[0].int24 != 0 || y[2].int24 != 0)
abort();
return 0;
}
|