public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "peng.wang@compiler-dev.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/96294] Compile error for pointer function
Date: Thu, 23 Jul 2020 11:36:16 +0000	[thread overview]
Message-ID: <bug-96294-4-VDz8Qcg795@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96294-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96294

--- Comment #2 from PengWang <peng.wang@compiler-dev.com> ---
(In reply to Dominique d'Humieres from comment #1)
> read
> 
> F2008: A pointer function assignment is ambiguous if it is the first
> executable statement after the specification block. Please add any other
> kind of executable statement before it. FIXME
> 
> program a
>         IMPLICIT NONE
>         print *, "begin"
>         myfunc() = 311
>         print*,myfunc()
> 
> contains
>     FUNCTION myfunc() RESULT (result_ptr)
>         IMPLICIT NONE
>         INTEGER, POINTER :: result_ptr
>         INTEGER, SAVE, TARGET:: targ
> 
>         result_ptr => targ
>     END FUNCTION myfunc
> end program a
> 
> gives
> 
>  begin
>          311

Where is this explanation to be found, I have not seen it yet, maybe the
standard documents that I have are imcomplete, Can I have the download link of
your standard document? thank you very much!!!

  parent reply	other threads:[~2020-07-23 11:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23  7:42 [Bug fortran/96294] New: " peng.wang@compiler-dev.com
2020-07-23 10:45 ` [Bug fortran/96294] " dominiq at lps dot ens.fr
2020-07-23 11:36 ` peng.wang@compiler-dev.com [this message]
2020-07-23 12:18 ` dominiq at lps dot ens.fr
2020-07-23 12:51 ` peng.wang@compiler-dev.com

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-96294-4-VDz8Qcg795@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).