I use the PGI C compiler version 16.4 on linux.
The following code cannot be compiled.
typedef struct Complex {
double r;
double i;
} Complex_t;
typedef struct stest {
Complex_t v;
} stest_t;
int main()
{
stest_t c[2];
#pragma acc kernels
{
double a = c[1].v.r + c[1].v.i;
double b = c[0].v.i + c[0].v.r;
c[0].v.r = a + b;
}
return 0;
}
$ pgcc -acc bug.c
PGC-F-0000-Internal compiler error. lili redefinition. 17 (bug.c: 13)
PGC/x86-64 Linux 16.4-0: compilation aborted