| 1 |
/* Test support of scalar_storage_order attribute */ |
| 2 |
|
| 3 |
/* { dg-do compile } */ |
| 4 |
|
| 5 |
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ |
| 6 |
#define REV_ENDIANNESS __attribute__((scalar_storage_order("big-endian"))) |
| 7 |
#else |
| 8 |
#define REV_ENDIANNESS __attribute__((scalar_storage_order("little-endian"))) |
| 9 |
#endif |
| 10 |
|
| 11 |
typedef struct tIp6Addr |
| 12 |
{ |
| 13 |
unsigned int s6_addr32[4]; |
| 14 |
} tIp6Addr; |
| 15 |
|
| 16 |
struct _tBeTimNetAddr |
| 17 |
{ |
| 18 |
unsigned char isIPv4; |
| 19 |
union |
| 20 |
{ |
| 21 |
unsigned int addr; |
| 22 |
tIp6Addr addr6; /* { dg-warning "type punning toggles" } */ |
| 23 |
} REV_ENDIANNESS u; |
| 24 |
} REV_ENDIANNESS; |