I am experimenting with a generic programming technique - via rename clauses, see the code below - and I get an error message about multiple PRIVATE statements being used. I do not quite understand why because the two statements are in separate modules:
module quaternion_def_basic implicit none type quaternion !type(complex) :: c(2) complex :: c(2) end type quaternion end module quaternion_def_basic module quaternion_def use quaternion_def_basic, only: T => quaternion end module quaternion_def module octonion_def use quaternion_def, T2 => T implicit none private :: T2 type T type(T2) :: c(2) end type T end module octonion_def module sedenion_def use octonion_def, T2 => T implicit none private :: T2 type T type(T2) :: c(2) end type T end module sedenion_def
If I comment out the PRIVATE statement in the sedenion_def module, the code is accepted. Can anyone point out whether this is a genuine programming error or something that is wrong in the compiler. FYI: gfortran does accept the code.
I am using Intel Fortran 2015 for this.