ph_struct.c
359 Bytes
////C: '-msoft-fp-half'
////A: '--has-fpack --has-fhalf'
typedef half phalf __attribute__((ext_vector_type(2)));
typedef struct sph {
union {
half hu;
half hl;
} part;
phalf full;
} sph_t;
int main(void)
{
volatile sph_t d;
volatile half a,b;
d.part.hu = 1.2345h;
d.part.hl = 34.567h;
a = d.full.x;
b = d.full.y;
return 0;
}