This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [fortran,patch] Extend symbol.c's check_conflict (PR29657)


Tobias Burnus wrote:
:ADDPATCH fortran:

This patch adds the following conflicts:

* FUNCTION name conflicts with SAVE
5.2.4 SAVE
Constraint: An object-name shall not be the name of an object in a common block, a dummy
argument name, a procedure name, a function result name, an automatic data object
name, or the name of an object with the PARAMETER attribute.


As far as I can see, all the others are there.

* SUBROUTINE name conflicts with DIMENSION
* PROGRAM and MODULE names conflicts with DIMENSION
Those should be obvious. I couldn't find a good reference, though.
Neither could I; as you say, they are obvious.

* DUMMY ARGUMENTS conflict with ENTRY
This is explicitly forbidden in Fortran 2003
C1255
12.5.2.5 ENTRY statement
Constraint: Within the subprogram containing the entry-stmt, the entry-name shall not appear as a
dummy argument in the FUNCTION or SUBROUTINE statement or in another
ENTRY statement and it shall not appear in an EXTERNAL or INTRINSIC statement.


* DUMMY ARGUMENTS conflict with INTRINSIC
It it not stated as allowed - contrary to EXTERNAL where it is
explicitly allowed (see 12.3.2.2)
12.3.2.3 INTRINSIC statement
....snip....
NOTE 12.11
A name shall not appear in both an EXTERNAL and an INTRINSIC statement in the same
scoping unit.


which implies the constraint that you are applying.

OK for trunk.

Thanks

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]