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
The following modules can be compiled without error by gfortran-7
MODULE mo_math_types
IMPLICIT NONE
PRIVATE
PUBLIC :: t_cartesian_coordinates
TYPE t_cartesian_coordinates
REAL:: x(3)
END TYPE t_cartesian_coordinates
END MODULE mo_math_types
MODULE mo_math_utilities
USE mo_math_types
IMPLICIT NONE
PRIVATE
PUBLIC :: t_cartesian_coordinates
CONTAINSFUNCTIONcc2tv(xx) result (tt)
TYPE(t_cartesian_coordinates), INTENT(in) :: xx
REAL:: tt
ENDFUNCTIONcc2tv
END MODULE mo_math_utilities
MODULE mod1
USE mo_math_utilities, ONLY: t_cartesian_coordinates
END MODULE mod1
Transformed code
After transformation, the type t_cartesian_coordinates is not seen anymore in the module mod1 because the PUBLIC :: t_cartesian_coordinates from the module mo_math_utilities has been removed.
MODULE mo_math_types
TYPE , PUBLIC :: t_cartesian_coordinates
REAL:: x ( 1 : 3 )
END TYPE t_cartesian_coordinates
END MODULE mo_math_types
MODULE mo_math_utilities
USE mo_math_types
PRIVATE :: cc2tv
CONTAINSFUNCTIONcc2tv ( xx ) RESULT(tt)
TYPE ( t_cartesian_coordinates ) , INTENT(IN) :: xx
REAL:: tt
ENDFUNCTIONcc2tv
END MODULE mo_math_utilities
MODULE mod1
USE mo_math_utilities, ONLY: t_cartesian_coordinates
END MODULE mod1
All the tests are using the -fmodule-private flags as it is the case in ICON.
Solution
The single PUBLIC statements should be kept in the transformed code as they have an important meaning in the USE modules chain.
The text was updated successfully, but these errors were encountered:
Original code
The following modules can be compiled without error by gfortran-7
Transformed code
After transformation, the type
t_cartesian_coordinates
is not seen anymore in the modulemod1
because thePUBLIC :: t_cartesian_coordinates
from the modulemo_math_utilities
has been removed.All the tests are using the
-fmodule-private
flags as it is the case in ICON.Solution
The single
PUBLIC
statements should be kept in the transformed code as they have an important meaning in theUSE
modules chain.The text was updated successfully, but these errors were encountered: