Thanks for the report. I have been able to reproduce the issue with your code here at PGI. I have filed a bug report on this today, and will let you know as soon as I hear something on this.

As for -acc, the compiler should only be generating accelerator code at points where there are 'acc' directives in your code. (via #pragma in C/C++, or !$ in Fortran.) Thus, the way to disable accelerator code generation in certain sections of your program is to simply remove the directives. One way to do this is to change !$acc to !$xxx at a given region, which makes Fortran treat it as just a comment instead of a directive.

Passing the -acc switch likely causes certain other optimizations to be enabled, so I suspect the problem with this code actually could be an optimization issue rather than an OpenACC issue.

I'm afraid I have a deadline in a week's time so 14.4 may come too late for me... my plan now is to move the OpenACC routines that I want into a seperate file/module, compile that with the -acc flag and then compile my other original modules without the optimisation flags before linking them.

(I'm assuming you couldn't give me a prerelease version of 14.4 with those fixes)