Super criptic error message when offloading long doubles

When compiling my code with PGI+OpenACC I kept getting this error:

     21, Accelerator restriction: unsupported operation: X87CON
PGCC/x86-64 Linux 19.10-0: compilation completed with severe errors

It took me a long time to figure out that this happens when you have long doubles inside structures as in the snippet below.

struct my_struct {
  long double x;
};

extern int N;

extern my_struct *data;
#pragma acc declare create(data)

void test(){
#pragma acc parallel loop  copyin(data[0:N]) async(1)
  for(int i=0;i<N;i++){
    data[i].x=0.;
  }

}

And compiled with

pc++  -o main.o  -c main.c -mp  -acc -ta=tesla:cc60  -O2 -Minfo

Hope it helps

Thanks AntonioRagangnin,

This is a know limitation that’s been previously reported (SoA by reference). Basically, GPUs don’t have support for 80-bit precision so don’t support long double. Though I have an open RFE (TPR #25392) in to see if we can make the message less cryptic.

-Mat