Unexpected branch type

Hi,

I’m working on ZFS (RWTH Aachen University).
I want to offload a function with OpenACC to the GPU, but the compilation fails with

  • Unexpected branch type

In the function is a switch-case with 6 cases, if I throw away one case and just use 5 cases, the compilation works. Is there a problem with switch-case and OpenACC? I have got a switch-case with 2 cases in another gpu function and this works well.

I use pgc++ 15.4-0 64-bit

Thank you for your help,
Marco

Hi Marco,

I haven’t seen this error before, but let me try to reproduce it here. I need to leave today, but will see what I can determine tomorrow.

  • Mat

Hi Marco,

I was able find an old RFE from 2012 (TPR#18800) requesting we support larger switch statements. Unfortunately it was deemed a low priority item so has not been addressed. I’ll ask that revisit the issue and see if we can increase the priority.

  • Mat

Hi Mat,
thank you for your help.
Did I understand right, that PGI is not able to work with larger switch-case statements on GPUs?
For now, I try to work around with if-statements.

Did I understand right, that PGI is not able to work with larger switch-case statements on GPUs?

Correct.

Did I understand right, that PGI is not able to work with larger switch-case statements on GPUs?

This has been addressed and should be working on 18.10