Closed klausler closed 2 years ago
One possible justification for C1406 has occurred to me: after the first USE, INTRINSIC
or USE, NON_INTRINSIC
of a particular module name in a scoping unit, later USE
statements of the same module name don't have to also include the explicit INTRINSIC
/NON_INTRINSIC
. It's not much, but it's reasonable. Closing this issue.
"C1406 (R1409) A scoping unit shall not directly reference an intrinsic module and a nonintrinsic module of the same name."
It might be confusing to have (say) a user-defined
ISO_FORTRAN_ENV
module in a program and reference it in a scope along with the intrinsic module of the same name, but so long as theUSE
statements are qualified withINTRINSIC
andNON_INTRINSIC
, there's no ambiguity. So why impose this constraint? It feels a bit like a restriction from an early implementation was resolved by fiat.(The constraint would have some justification if Fortran had module-qualified name references, but it doesn't.)