PGF90- Internal compiler error

Hi all,

I am using pgfortran to compile my code. This code works well with ifort and gfortran compiler and when I use pgfortran with optimization flag -O0 and -O1 it can pass too. But if using pgfortran with optimization flag -O2 and -O3, it can not work. As is shown below, the difference between the two pictures is optimization flag.

Any suggestions on what the problem would be greatly appreciated.

Send the source code to 3D_ibm_DIIB.for and we can determine if it
is already known and will be fixed (or is fixed) in a current or upcoming
release, or if it is a new problem that will be fixed in the future.

Be sure to also send any header files, modfiles, or modfiles sources, so we can replicate the behavior.

You have a workaround (do not compile -O2), by compiling everything
but the failing routine(s) -O2.