swar-array.c
730 Bytes
//A: --has-swar
//C: -daiteq-swar-enable
typedef unsigned int s32x1b __attribute__((subword(1)));
typedef unsigned int s16x2b __attribute__((subword(2)));
typedef unsigned int s10x3b __attribute__((subword(3)));
typedef unsigned int s8x4b __attribute__((subword(4)));
typedef unsigned int s4x8b __attribute__((subword(8)));
typedef unsigned int s2x16b __attribute__((subword(16)));
#define ARRAY_SIZE 50
s32x1b a1b[ARRAY_SIZE];
s16x2b a2b[ARRAY_SIZE];
s10x3b a3b[ARRAY_SIZE];
s8x4b a4b[ARRAY_SIZE];
s4x8b a8b[ARRAY_SIZE];
s2x16b a16b[ARRAY_SIZE];
int main(void)
{
volatile int sa, ss;
sa = sizeof(a1b);
ss = sizeof(a2b);
sa = sizeof(a3b);
ss = sizeof(a4b);
sa = sizeof(a8b);
ss = sizeof(a16b);
return 0;
}