[Patch, Fortran] PR34137 ENTRY fixes: allow in modules, fix diagnostics

Tobias Burnus burnus@net-b.de
Sun Nov 18 15:07:00 GMT 2007


:ADDPATCH fortran:

Hi all,

when trying to fix PR34079 (incl. ENTRY), I encountered first that
BIND(C) does not work for ENTRY and, secondly, some deficits in the
Fortran 95 support of ENTRY.


a) ENTRY was rejected in a module as the master function had no type.

Entry may not be used as internal procedure, but it is allowed as module
procedure. Or in words of the standard (F95/F2003):

Constraint: An entry-stmt may appear only in an external-subprogram or
module-subprogram. An entry-stmt shall not appear within an
executable-construct.

C1253 (R1235) An entry-stmt shall appear only in an external-subprogram
or module-subprogram. An entry-stmt shall not appear within an
executable-construct.


b) It was possible to assign to the ENTRY name, even if a RESULT was
specified. This lead to an ICE later on.

Build and regression tested on x86-64. OK for the trunk?

Tobias

PS: I find the following strange (decl.c):

      /* An entry in a function.
[...]
         m = match_result (proc, &result);

I wonder whether this should not be "match_result (entry, &result)"
instead? I tried both and they seem both to work. I will re-check this
part for BIND(C) support of ENTRY.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: entry-mod.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071118/33622287/attachment.ksh>


More information about the Fortran mailing list