Internal compiler error at forall construct

When compiled using IPA optimization (-fastsse -Mipa=fast,pure -O2), the following code:

  if (iter2 /= 0) then

     ! Do some initializations [... Omitted ...]

     main_iteration: do iter=iter1,iter2

        ! [... Omitted ...]

        if (iter <= 1) then

           ! Do some initializations [... Omitted ...]

        else ! (iter > 1)
           select case (imass)
           case (2) ! Axially distributed

              ! Evaluate the rate of density change:
              forall (i = 1:ncie, j = 1:neta)  ! Line 427
                 rhodot(i,j) = dxm_dz_new(i)*dz_dvol(i)
              end forall

           end select

        end if

        ! Body of main loop [... Omitted ...]

     end do main_iteration
  end if

causes an internal compiler error (edited here for length):

IPA: Recompiling intgrt.obj: new IPA information
PGF90-F-0000-Internal compiler error. rewrite_subroutine:
unknown stmt found 0 (intgrt.f90: 427)
PGF90/any Linux/x86-64 6.1-3: compilation aborted

If the forall construct in the above code fragment is replaced by the following:

              ! Evaluate the rate of density change:
              do j = 1,neta
                 rhodot(1:ncie,j) = &
                      dxm_dz_new(1:ncie)*dz_dvol(1:ncie)
              end do

then the program compiles with no errors.

There are many forall constructs in the program, scattered over a number of routines, but the one indicated above is the only one that caused any difficulty in the IPA optimization stage.

Hi chylin,

Can you please send a report to trs@pgroup.com? I was unable to recreate the error with the given information so if you could include the full source, or a test case which illustrates the problem, we would appreciate it.

Thanks,
Mat

Mat,

I’m afraid that I can’t give you the full source. I’ll see if I can’t put together an illustrative test case.

Carl