Nvfortran 25.11: internal compiler error with OpenACC code

Hi Mat,

Unfortunately I’m back with another issue in nvfortran, now with version 25.11.

The following code compiles with -O0 [nvfortran -O0 -acc -c farm.f90] but not does compile with -O1 , -O2 or -O3 . Note the team might find the error message emitted at -O1 most useful. The code used to compile at all optimisations levels with nvfortran 25.7 and 25.9.

module farm
  implicit none
  contains

  subroutine fox(scalar)
    real(kind=8), intent(inout) :: scalar
    real(kind=8), dimension(10) :: array

    !$acc kernels
    if (scalar < 1.0) then
      array(:) = 1
    end if
    !$acc end kernels

  end subroutine fox

  subroutine chicken()
    logical :: bool
    integer :: int
    real(kind=8) :: scalar
    real(kind=8), allocatable, dimension(:) :: array

    allocate(array(10))

    !$acc kernels
    scalar = array(5)
    if (bool .AND. int == 0) then
      array(:) = 1
    else
      array(:) = 2
    end if
    !$acc end kernels

    call fox(scalar)

  end subroutine chicken

end module farm

Cheers,

-Nuno

Thanks Nuno! I was able to track down the check-in where this started and sent the engineer a report. Filed as TPR #38055.

-Mat

Hi Mat, this seems to have been fixed in 26.1!
Could you please confirm when you get a chance?

Hi Nuno,

Yes, TPR#38055 was fixed in 26.1.

Thanks again for the report.

-Mat

Excellent, and thanks for the very quick turnaround once again.