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