[Patch, Fortran] Allow ENTRY without RESULT (PR30873)
Fri Mar 2 08:50:00 GMT 2007
gfortran did not like
And prints this error:
- gfc_error ("RESULT attribute required in ENTRY statement at %C");
However, the Fortran standard permits this and uses then the entry-name
as result-name - similar to functions without result-name.
R1235 entry-stmt is ENTRY entry-name [ ( [ dummy-arg-list ] ) [ suffix ] ]
C1252 (R1235) If RESULT is specified, the entry-name shall not appear in
any specification or type declaration statement in the scoping unit of
the function program.
C1254 (R1235) RESULT shall appear only if the entry-stmt is in a
C1257 (R1235) If RESULT is specified, result-name shall not be the same
as the function-name in the FUNCTION statement and shall not be the same
as the entry-name in any ENTRY statement in the subprogram.
Found by Joost VandeVondele, thanks!
I could trace this check back to r69825:
* gcc/fortran: New front end.
This check is also no longer part of g95.
Bootstrapped and regression tested on x86_64-unknown-linux-gnu
Ok for the trunk, 4.2 and for 4.1?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1522 bytes
Desc: not available
More information about the Gcc-patches