2 /* { dg-require-effective-target int32plus } */
11 } __attribute__((packed, aligned(1))) TestMsgType;
15 uint16_t header_info[2];
17 void Pack(uint8_t *buffer)
19 __builtin_memcpy(buffer, &_pref, sizeof(_pref));
21 void UnPack(uint8_t *buffer)
23 __builtin_memcpy(&_pref, buffer, sizeof(_pref));
31 void Pack(uint8_t *buffer)
33 _payload.Pack(buffer);
36 void UnPack(uint8_t *buffer)
38 _payload.UnPack(buffer);
44 uint8_t * buffer = new uint8_t [30];
47 msg._payload._pref.x = 0xabcd;
48 msg._payload._pref.y = 0xa;
49 msg._payload._pref.z = 0x0001020304051617;
51 msg1.UnPack(&buffer[0]);
52 if (msg1._payload._pref.x != 0xabcd)