This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/56284] [OOP] ICE with alternate return in type-bound procedure
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 11 Feb 2013 12:36:46 +0000
- Subject: [Bug fortran/56284] [OOP] ICE with alternate return in type-bound procedure
- Auto-submitted: auto-generated
- References: <bug-56284-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56284
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org
|gnu.org |
--- Comment #5 from janus at gcc dot gnu.org 2013-02-11 12:36:46 UTC ---
... and this adds a warning about the obsolescent alternate return argument
(with -std=f2003 or f2008):
Index: gcc/fortran/decl.c
===================================================================
--- gcc/fortran/decl.c (revision 195915)
+++ gcc/fortran/decl.c (working copy)
@@ -4487,7 +4487,15 @@ gfc_match_formal_arglist (gfc_symbol *progname, in
for (;;)
{
if (gfc_match_char ('*') == MATCH_YES)
- sym = NULL;
+ {
+ sym = NULL;
+ if (gfc_notify_std (GFC_STD_F95_OBS, "Alternate return argument "
+ "at %C") == FAILURE)
+ {
+ m = MATCH_ERROR;
+ goto cleanup;
+ }
+ }
else
{
m = gfc_match_name (name);
Also: Mine.