1 /* PR target/65163 */ 2 3 typedef unsigned int uint32_t; 4 typedef unsigned short uint16_t; 5 union unaligned_32 { uint32_t l; } __attribute__((packed)); 6 union unaligned_16 { uint16_t l; } __attribute__((packed)); 7 8 int test_00(unsigned char * buf,int bits_per_component)9test_00 (unsigned char* buf, int bits_per_component) 10 { 11 (((union unaligned_32*)(buf))->l) = 12 __builtin_bswap32 (bits_per_component == 10 ? 1 : 0); 13 return 0; 14 } 15 16 int test_01(unsigned char * buf,int bits_per_component)17test_01 (unsigned char* buf, int bits_per_component) 18 { 19 (((union unaligned_16*)(buf))->l) = 20 __builtin_bswap16 (bits_per_component == 10 ? 1 : 0); 21 return 0; 22 } 23