This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/46100] [Fortran 2008] Non-variable pointer expression as actual argument to INTENT(OUT) non-pointer dummy


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]