This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/50525] gfortran should not allow early reference to entry dummy argument (r178939)
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 27 Sep 2011 07:56:20 +0000
- Subject: [Bug fortran/50525] gfortran should not allow early reference to entry dummy argument (r178939)
- Auto-submitted: auto-generated
- References: <bug-50525-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50525
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid
CC| |burnus at gcc dot gnu.org
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-09-27 07:56:20 UTC ---
NAG has:
Error: test.f90, line 2: Dummy arg X used before first occurrence in an
argument list
And ifort has:
h4j.f90(2): error #6482: An ENTRY dummy argument is referenced in an executable
statement before it appears in any ENTRY statement. [X]
f(y)=x ! this is wrong
-----------^
The easiest fix is probably to check whether the symbol is already defined when
parsing "entry e(x)" (or adding attr.dummy).