Closed
Description
Version of flang-new : 18.0.0(cc627828f5176c6d75a25f1756d387d18539c1fb)
A dummy argument of Derived Types
used in MODULE PROCEDURE
subprogram statement results in a compilation error.
The following are the test program, Flang-new, Gfortran and ifort compilation result.
sngf_c1249_105b_2.f90:
module m
interface
module subroutine sub(a)
type ty
sequence
integer ::i
end type ty
type(ty)::a
end subroutine
end interface
contains
module subroutine sub(a)
type ty
sequence
integer ::i
end type ty
type(ty)::a
if (a%i /= 10) print *,'ng'
write(6,*) "sub"
end subroutine
end module m
program main
use m
type ty
sequence
integer ::i
end type ty
type(ty) :: a
a%i=10
call sub(a)
print *,'pass'
end program main
flang-new sngf_c1249_105b_2.f90
error: Semantic errors in sngf_c1249_105b_2.f90
./sngf_c1249_105b_2.f90:17:15: error: Dummy argument 'a' has type ty; the corresponding argument in the interface body has type ty
type(ty)::a
^
./sngf_c1249_105b_2.f90:8:18: Declaration of 'a'
type(ty)::a
^
$
$ gfortran sngf_c1249_105b_2.f90
$
$ ifort sngf_c1249_105b_2.f90
$
Metadata
Metadata
Assignees
Type
Projects
Status
Done