- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, i ran into a problem with parameterized derived types. If i try to compile the following code with the 15.0.4 Compiler on Windows i get error 6633
"The type of the actual argument differs from the type of the dummy argument. ". (in Line 37)
module M_MATRIX
use, intrinsic :: iso_fortran_env, only: real64
type, public :: DT_MATRIX(knd, k, n)
integer, kind :: knd
integer, len :: k
integer, len :: n
real(kind = knd), dimension(k,n) :: m
end type
end module M_MATRIX
!-------------------------------------------------------
module M_EXAMPLE
use M_MATRIX
! public ! <- compiles
private !
public :: foo ! <- does not compile
contains
subroutine foo(matrix)
type(DT_MATRIX(real64,2,2)) :: matrix
matrix%m = 0.0d0
end subroutine
end module M_EXAMPLE
!-------------------------------------------------------
program test
use M_EXAMPLE !, only: foo ! <- "only" disables the public-workaround
use M_MATRIX
Implicit none
type(DT_MATRIX(real64,2,2)) :: A
call foo(A)
end
There seems to be no change in behavior, whether there are kind- or len-parameters in the type definition of DT_MATRIX.
As i searched the forum, i read about some bug-fixes to PTDs in the 16.0 release, so this might be unimportant.
Wolf
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This still fails in 16.0. I don't think the error is justified and will send this on to the developers. Clearly it has something to do with accessibility of names from M_EXAMPLE but I don't see why. Issue ID is DPD200374900.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This has been fixed - I suspect that the fix missed the cutoff for Update 1 but, if so, it will be in Update 2 (February).
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page