You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to generate code for the following example:
module other_module
implicit none
interface sub
module procedure sub_real
end interface sub
contains
subroutine sub_real(me)
real :: me
end subroutine sub_real
end module other_module
module tem_matrix_module
use other_module, only: sub
implicit none
interface sub
module procedure sub_int
end interface sub
interface sub
module procedure sub_logical
end interface sub
contains
subroutine sub_int(me)
integer :: me
end subroutine sub_int
subroutine sub_logical(me)
logical:: me
end subroutine sub_logical
end module tem_matrix_module
results in duplicated interface blocks after transforming to xml and back again:
MODULE other_module
INTERFACE sub
MODULE PROCEDURE sub_real
END INTERFACE
CONTAINS
SUBROUTINE sub_real ( me )
REAL :: me
END SUBROUTINE sub_real
END MODULE other_module
MODULE tem_matrix_module
USE other_module , ONLY: sub
INTERFACE sub
MODULE PROCEDURE sub_int
MODULE PROCEDURE sub_logical
END INTERFACE
INTERFACE sub
MODULE PROCEDURE sub_int
MODULE PROCEDURE sub_logical
END INTERFACE
CONTAINS
SUBROUTINE sub_int ( me )
INTEGER :: me
END SUBROUTINE sub_int
SUBROUTINE sub_logical ( me )
LOGICAL :: me
END SUBROUTINE sub_logical
END MODULE tem_matrix_module
Which is illegal code, while the original was legal.
It may appear strange to have two separate generic interface blocks for the same generic name in the original code, but this arises because we generate the code for different data-types in a pre-processing step.
If the other_module is not used, the transformation works as expected resulting in two interface blocks with only a single module procedure, as in the original code.
The text was updated successfully, but these errors were encountered:
Trying to generate code for the following example:
results in duplicated interface blocks after transforming to xml and back again:
Resulting mwe_back.f90:
Which is illegal code, while the original was legal.
It may appear strange to have two separate generic interface blocks for the same generic name in the original code, but this arises because we generate the code for different data-types in a pre-processing step.
If the
other_module
is not used, the transformation works as expected resulting in two interface blocks with only a single module procedure, as in the original code.The text was updated successfully, but these errors were encountered: