| 1 |
typedef struct |
| 2 |
{ |
| 3 |
unsigned char a; |
| 4 |
unsigned int b:5; |
| 5 |
unsigned int c:11, :0, d:8; |
| 6 |
struct { unsigned int ee:2; } e; |
| 7 |
} test_st; |
| 8 |
|
| 9 |
typedef union |
| 10 |
{ |
| 11 |
test_st st; |
| 12 |
struct |
| 13 |
{ |
| 14 |
unsigned int v1; |
| 15 |
unsigned int v2; |
| 16 |
unsigned int v3; |
| 17 |
unsigned int v4; |
| 18 |
}values; |
| 19 |
} read_st; |
| 20 |
|
| 21 |
|
| 22 |
typedef void __attribute__ ((cmse_nonsecure_call)) (*foo_ns) (test_st); |
| 23 |
|
| 24 |
extern void foo (test_st st); |
| 25 |
|
| 26 |
int |
| 27 |
main (void) |
| 28 |
{ |
| 29 |
read_st r; |
| 30 |
foo_ns f; |
| 31 |
|
| 32 |
f = (foo_ns) 0x200000; |
| 33 |
r.values.v1 = 0xFFFFFFFF; |
| 34 |
r.values.v2 = 0xFFFFFFFF; |
| 35 |
r.values.v3 = 0xFFFFFFFF; |
| 36 |
r.values.v4 = 0xFFFFFFFF; |
| 37 |
|
| 38 |
f (r.st); |
| 39 |
return 0; |
| 40 |
} |