Hi,
I have a compilation error on pgc++.
pgc++ says “unsupported operation”.
But, I could not find out which description is unsupported.
more sample.cpp
int main( ) {
#pragma acc parallel loop
for(int i=0;i<10;i++){
bool vv ;
bool *val=&vv ;
unsigned long tmp = 0u;
unsigned long tmp2 = (~tmp) ;
*val = tmp2 != 0;
}
}
$ pgc++ -acc -Minfo=accel sample.cpp
PGCC-S-0155-Accelerator region ignored; see -Minfo messages (sample.cpp: 1)
main:
1, Accelerator region ignored
3, Accelerator restriction: an unsupported operation was found
7, Accelerator restriction: unsupported operation: UKNOT
PGCC/x86 Linux 17.4-0: compilation completed with severe errors
If we modify a datatype for tmp and tmp2 to unsigned int, this error doesn’t occur.
more sample2.cpp
int main( ) {
#pragma acc parallel loop
for(int i=0;i<10;i++){
bool vv ;
bool *val=&vv ;
unsigned int tmp = 0u;
unsigned int tmp2 = (~tmp) ;
*val = tmp2 != 0;
}
}
$ pgc++ -acc -Minfo=accel sample2.cpp
main:
1, Accelerator kernel generated
Generating Tesla code
3, #pragma acc loop gang, vector(10) /* blockIdx.x threadIdx.x */
So, “unsigned long” seems to be related to this issue.
But, I’m not sure which my description is not suitable for pgc++.
Did I miss my bug on sample.cpp?
Thanks,
Hideki