"invalid cast opcode" compiling OpenACC for radeon

Hi,
we are working on a C/OpenACC scientific simulation code.
We are able to compile and run this code on NVIDIA K20, K40 and K80 GPUs, but if we try to compile the same code for radeon:hawaii we obtain this error:

 /opt/pgi/linux86-64/15.7/bin/pgocld -amd=hawaii /tmp/pgaccIHnfM3vSYMH_.ll -o /tmp/pgacccHnfgxRjTfIo.bin
/opt/pgi/linux86-64/2015/llvm/3.1/bin/llvm-link: /tmp/pgaccIHnfM3vSYMH_.ll:30540:22: error: invalid cast opcode for cast from '%struct.DT10387 = type { %struct.__dcomplex, %struct.__dcomplex, %struct.__dcomplex }' to 'i8*'
    %li671 = bitcast %struct.DT10387 %acc_Deo_127_ocl.sym274 to i8*
                     ^
/opt/pgi/linux86-64/2015/llvm/3.1/bin/llvm-link: error loading file '/tmp/pgaccIHnfM3vSYMH_.ll'
PGC-F-0155-Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code (OpenAcc/include_all.c: 1)
PGC/x86-64 Linux 15.7-0: compilation aborted
pgcc-Fatal-ccompile completed with exit code 1

Anyhow, do you have any hints about what the problem is and, if it is the case, how to solve it?

p.s.
Is the use of “double complex” data format a problem?


Thanks in advance.

Interesting. Is this a code that we can compile here, or can you make a small reproducer that we could try here?