public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "janus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/51081] Proc-pointer assignment: Rejects valid internal proc, -std=f2008 should mention "F2008"
Date: Mon, 16 Apr 2012 12:37:00 -0000	[thread overview]
Message-ID: <bug-51081-4-TUpvgrmDur@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-51081-4@http.gcc.gnu.org/bugzilla/>

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.


  parent reply	other threads:[~2012-04-16 12:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-10 14:43 [Bug fortran/51081] New: -std=f2003: Internal procedure in proc-pointer assignment: Mention that it is valid in F2008 burnus at gcc dot gnu.org
2011-11-10 14:57 ` [Bug fortran/51081] Proc-pointer assignment: Rejects valid internal proc, -std=f2008 should mention "F2008" burnus at gcc dot gnu.org
2011-11-10 15:01 ` burnus at gcc dot gnu.org
2012-04-16 12:02 ` janus at gcc dot gnu.org
2012-04-16 12:37 ` janus at gcc dot gnu.org [this message]
2012-07-17 21:51 ` janus at gcc dot gnu.org
2012-07-18  8:11 ` [Bug fortran/51081] [F03] Proc-pointer assignment: Rejects valid internal proc janus at gcc dot gnu.org
2012-07-18 12:54 ` janus at gcc dot gnu.org
2012-07-29 16:55 ` janus at gcc dot gnu.org
2012-07-29 19:04 ` janus at gcc dot gnu.org
2012-07-29 20:16 ` janus at gcc dot gnu.org
2012-07-30 19:56 ` janus at gcc dot gnu.org
2012-07-30 20:00 ` janus at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-51081-4-TUpvgrmDur@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).