This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/39844] module whole-file checking disabled
- From: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Apr 2009 05:52:56 -0000
- Subject: [Bug fortran/39844] module whole-file checking disabled
- References: <bug-39844-15353@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from kargl at gcc dot gnu dot org 2009-04-22 05:52 -------
(In reply to comment #2)
> no quite.
> but the std post on limitation on this , so I really hope gfortran support it.
>
> http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/f4ab93c7cece56ee/d4518a395a0fd4fe?hl=zh-CN#d4518a395a0fd4fe
>
> today I check the Changelog ,I found
> * resolve.c (resolve_global_procedure): Enable whole-file checking for
> procedures that are declared later in the file.
>
> so I post this to gcc bugzilla.
>
> can the developers think about this?
>
Given the URL you posted, I'm inclined to say this should
be closed with WONTFIX. It is a clear violation of the
standard:
Note 2.2 in F2003 states:
This standard places no ordering requirement on the program units
that constitute a program, butmbecause the public portions of a module
are required to be available by the time a module reference (11.2.1)
is processed, a processor may require a particular order of processing
of the program units.
In 11.2.1, one finds
The USE statement specifies use association. A USE statement is a
module reference to the module it specifies. At the time a USE
statement is processed, the public portions of the specified module
shall be available.
When the USE AFTER is processed, the public is not available. period.
Is really that difficult to re-order the code? In particular, how
many other compiler accept your code?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39844