low_array_add_ptr.c
393 Bytes
////A: --has-swar
//C: -daiteq-swar-enable
#include <stdint.h>
#define ARRAYSIZE 20
typedef unsigned int su10x3b __attribute__((subword(3)));
int main(void)
{
volatile unsigned int a[ARRAYSIZE], b[ARRAYSIZE], z[ARRAYSIZE];
unsigned int *pa = &a[0];
unsigned int *pb = &b[0];
unsigned int *pz = &z[0];
for (int i=0;i<ARRAYSIZE;++i)
*pz++ = *pa++ + *pb++;
return 0;
}