This is the mail archive of the gcc-bugs@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]

[Bug fortran/56284] [OOP] ICE with alternate return in type-bound procedure


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.


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