| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-skip-if "" { ! { clmcpu } } } */ |
| 3 |
/* { dg-options "-mcpu=nps400 -mbitops -munaligned-access -mcmem -O2 -fno-strict-aliasing" } */ |
| 4 |
|
| 5 |
enum npsdp_mem_space_type { |
| 6 |
NPSDP_EXTERNAL_MS = 1 |
| 7 |
}; |
| 8 |
struct npsdp_ext_addr { |
| 9 |
struct { |
| 10 |
struct { |
| 11 |
enum npsdp_mem_space_type mem_type : 1; |
| 12 |
unsigned msid : 5; |
| 13 |
}; |
| 14 |
}; |
| 15 |
char user_space[]; |
| 16 |
} a; |
| 17 |
char b; |
| 18 |
void fn1() { |
| 19 |
((struct npsdp_ext_addr *)a.user_space)->mem_type = NPSDP_EXTERNAL_MS; |
| 20 |
((struct npsdp_ext_addr *)a.user_space)->msid = |
| 21 |
((struct npsdp_ext_addr *)a.user_space)->mem_type ? 1 : 10; |
| 22 |
while (b) |
| 23 |
; |
| 24 |
} |