This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/46100] [Fortran 2008] Non-variable pointer expression as actual argument to INTENT(OUT) non-pointer dummy
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 Oct 2010 17:45:32 +0000
- Subject: [Bug fortran/46100] [Fortran 2008] Non-variable pointer expression as actual argument to INTENT(OUT) non-pointer dummy
- Auto-submitted: auto-generated
- References: <bug-46100-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46100
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Non-variable pointer |[Fortran 2008] Non-variable
|expression as actual |pointer expression as
|argument to INTENT(OUT) |actual argument to
|non-pointer dummy |INTENT(OUT) non-pointer
| |dummy
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-10-20 17:45:27 UTC ---
After carefully reading the interpretation request,
http://www.j3-fortran.org/doc/year/08/08-172.txt, I think the reason that it is
invalid in Fortran 95/2003 is that only variables are definable and as "f()" is
not a variable, it is invalid.
Fortran 2008 has (cf. PR 40054):
R602 variable is designator
or expr
C602 (R602) expr shall be a reference to a function that has a pointer
result."
Which makes the program valid.