[Bug fortran/123208] Private component statements rejected inside submodules
anlauf at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 18 19:08:45 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123208
--- Comment #2 from anlauf at gcc dot gnu.org ---
(In reply to Steve Kargl from comment #1)
> F2023
> C817 An access-spec shall appear only in the specification-part of a module.
Yes. This is also what Intel and NAG say:
ifx:
pr123208.f90(10): error #6848: This attribute specification is valid only in
the specification part of a module.
private
^
compilation aborted for pr123208.f90 (code 1)
nagfor:
NAG Fortran Compiler Release 7.2(Shin-Urayasu) Build 7203
Error: pr123208.f90, line 10: PRIVATE components statement is only permitted
within the specification part of a module
detected at <end-of-statement>@PRIVATE
[NAG Fortran Compiler pass 1 error termination, 1 error]
More information about the Gcc-bugs
mailing list