swar-init.c
673 Bytes
//A: --has-swar
//C: -daiteq-swar-enable
//#include <stdint.h>
typedef unsigned int s4x8b __attribute__((subword(8)));
typedef signed int ss4x8b __attribute__((subword(8)));
char t[4] = {1,10,100,127};
s4x8b a = {1,10,100,127};
s4x8b c = {2,3,4,1};
s4x8b d = {100,200};
ss4x8b e = {100,-100,50,-50};
//s4x8b f = 0x12345678; /* error: not supported now */
//s4x8b h = {260}; /* error: out of range */
//s4x8b i = {-26}; /* error: out of range */
s4x8b j[3] = {{1,2,3,4},{5,6,7,8},{9,10,11,12}};
s4x8b k = {1,2,3,4,5}; /* warning: excess elements */
int main(void)
{
unsigned int b;
a = a * c;
b = *((unsigned int *) &a);
return 0;
}