http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51081

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-04-16
     Ever Confirmed|0                           |1

--- Comment #4 from janus at gcc dot gnu.org 2012-04-16 12:37:26 UTC ---
(In reply to comment #0)
> Compiling with -std=2003 just prints:
> 
>   Error: Internal procedure 'int' is invalid
>          in procedure pointer assignment at (1)

This is of course easily fixed:

Index: gcc/fortran/expr.c
===================================================================
--- gcc/fortran/expr.c    (revision 186485)
+++ gcc/fortran/expr.c    (working copy)
@@ -3444,9 +3444,10 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_ex
           return FAILURE;
         }
       if (attr.proc == PROC_INTERNAL &&
-          gfc_notify_std (GFC_STD_F2008, "Internal procedure '%s' is "
-                  "invalid in procedure pointer assignment at %L",
-                  rvalue->symtree->name, &rvalue->where) == FAILURE)
+          gfc_notify_std (GFC_STD_F2008, "Fortran 2008: Internal procedure "
+                  "'%s' is invalid in procedure pointer assignment "
+                  "at %L", rvalue->symtree->name, &rvalue->where)
+                  == FAILURE)
         return FAILURE;
     }
       /* Check for F08:C730.  */



An alternative would be to add the correct label automatically inside
'gfc_notify_std', based on the value of 'GFC_STD_*' passed.

Reply via email to