public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/58002] New: [IR tracking] Pointer function results in non pointer context: Shall use a temporary Date: Sat, 27 Jul 2013 11:22:00 -0000 [thread overview] Message-ID: <bug-58002-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58002 Bug ID: 58002 Summary: [IR tracking] Pointer function results in non pointer context: Shall use a temporary Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org If "fx()" is a pointer returning function, "fx()" is an expression. Hence, for call foo(fx()) the argument should be not the pointer address of fx() but a temporary with the value of the function result. Everything becomes messier with Fortran 2008 as calls to pointer-returning functions count as variables. gfortran currently does not create a temporary in line with Fortran 2008 (!), but it should to conform to Fortran 90/95/2003. See Interpretation Request F08/0089 at http://www.j3-fortran.org/doc/year/13/13-006Ar1.txt - but also at the discussion at http://mailman.j3-fortran.org/pipermail/j3/2013-July/006578.html
next reply other threads:[~2013-07-27 11:22 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-07-27 11:22 burnus at gcc dot gnu.org [this message] 2015-10-13 12:59 ` [Bug fortran/58002] " dominiq at lps dot ens.fr 2015-10-13 13:24 ` dominiq at lps dot ens.fr 2021-12-18 3:23 ` pinskia at gcc dot gnu.org 2021-12-18 3:23 ` pinskia 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-58002-4@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: linkBe 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).