public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/58002] New: [IR tracking] Pointer function results in non pointer context: Shall use a temporary
@ 2013-07-27 11:22 burnus at gcc dot gnu.org
  2015-10-13 12:59 ` [Bug fortran/58002] " dominiq at lps dot ens.fr
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-07-27 11:22 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-18  3:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-27 11:22 [Bug fortran/58002] New: [IR tracking] Pointer function results in non pointer context: Shall use a temporary burnus at gcc dot gnu.org
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

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).