The code below gets rejected by nvfortran 26.5 but is valid code (and compiles with gfortran, ifx, nagfor and flang(_new). The error message is:
NVFORTRAN-S-0188-Argument number 1 to vector4_from_array: type mismatch (sm_physics.f90: 117)
NVFORTRAN-S-0189-Argument number 2 to vector4_from_array: association of scalar actual argument to array dummy argument (sm_physics.f90: 117)
0 inform, 0 warnings, 2 severes, 0 fatal for coeffqed_b1
NVFORTRAN-S-0188-Argument number 1 to vector4_from_array: type mismatch (sm_physics.f90: 125)
NVFORTRAN-S-0189-Argument number 2 to vector4_from_array: association of scalar actual argument to array dummy argument (sm_physics.f90: 125)
0 inform, 0 warnings, 2 severes, 0 fatal for sumq4q
The reproducer is:
module iso_varying_string
implicit none
integer, parameter, private :: GET_BUFFER_LEN = 1
type, public :: varying_string
private
character(LEN=1), dimension(:), allocatable :: chars
end type varying_string
public :: assignment(=)
end module iso_varying_string
module lorentz
implicit none
private
public :: vector4_t
public :: assignment (=)
type :: vector4_t
real, dimension(0:3) :: p = &
[0.0, 0.0, 0.0, 0.0]
end type vector4_t
interface assignment (=)
module procedure array_from_vector4_1, array_from_vector4_2, &
vector4_from_array
end interface
interface
pure module subroutine array_from_vector4_1 (a, p)
real, dimension(:), intent(out) :: a
type(vector4_t), intent(in) :: p
end subroutine array_from_vector4_1
pure module subroutine array_from_vector4_2 (a, p)
type(vector4_t), dimension(:), intent(in) :: p
real, dimension(:,:), intent(out) :: a
end subroutine array_from_vector4_2
pure module subroutine vector4_from_array (p, a)
type(vector4_t), intent(out) :: p
real, dimension(:), intent(in) :: a
end subroutine vector4_from_array
end interface
end module lorentz
submodule (lorentz) lorentz_s
implicit none
contains
pure module subroutine array_from_vector4_1 (a, p)
real, dimension(:), intent(out) :: a
type(vector4_t), intent(in) :: p
a = p%p
end subroutine array_from_vector4_1
pure module subroutine array_from_vector4_2 (a, p)
type(vector4_t), dimension(:), intent(in) :: p
real, dimension(:,:), intent(out) :: a
integer :: i
forall (i=1:size(p))
a(:,i) = p(i)%p
end forall
end subroutine array_from_vector4_2
pure module subroutine vector4_from_array (p, a)
type(vector4_t), intent(out) :: p
real, dimension(:), intent(in) :: a
p%p(0:3) = a
end subroutine vector4_from_array
end submodule lorentz_s
module physics_defs
use iso_varying_string, string_t => varying_string
implicit none
private
public :: is_nlo_component
interface
elemental module function is_nlo_component (comp) result (is_nlo)
logical :: is_nlo
integer, intent(in) :: comp
end function is_nlo_component
end interface
end module physics_defs
submodule (physics_defs) physics_defs_s
implicit none
contains
elemental module function is_nlo_component (comp) result (is_nlo)
logical :: is_nlo
integer, intent(in) :: comp
end function is_nlo_component
end submodule physics_defs_s
module sm_physics
use physics_defs
use lorentz
implicit none
private
interface
pure module function coeffqed_b1 (nf, nlep)
integer, intent(in) :: nf, nlep
real :: coeffqed_b1
end function coeffqed_b1
end interface
end module sm_physics
submodule (sm_physics) sm_physics_s
implicit none
contains
pure module function coeffqed_b1 (nf, nlep)
integer, intent(in) :: nf, nlep
real :: coeffqed_b1
coeffqed_b1 = 0
end function coeffqed_b1
pure function sumQ4q (nf)
integer, intent(in) :: nf
real :: sumQ4q
select case (nf)
case (0)
sumQ4q = 0.0
end select
end function sumQ4q
end submodule sm_physics_s