This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36526] pointer in pure function
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jun 2008 17:52:34 -0000
- Subject: [Bug fortran/36526] pointer in pure function
- References: <bug-36526-16322@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2008-06-13 17:52 -------
CONFIRM. Works with other compilers. The constraint checked for is:
"C1272 In a pure subprogram any designator with a base object that is in common
or accessed by host or use association, is a dummy argument of a pure function,
is a dummy argument with INTENT (IN) of a pure subroutine, or an object that is
storage associated with any such variable, shall not be used in the following
contexts: [...]
(5) As an actual argument associated with a dummy argument with INTENT (OUT) or
INTENT (INOUT) or with the POINTER attribute." (From F2003.)
At a glance, it seems as if this applies, but as the non-normative note
indicates, C1272 does not apply in this case:
"NOTE 12.45 Pure subroutines are included to allow subroutine calls from pure
procedures in a safe way [...] The constraints for pure subroutines are
based on the same principles as for pure functions, except that side effects to
INTENT (OUT), INTENT (INOUT), and pointer dummy arguments are permitted."
However, I failed to find this in the normative part; I will try a bit more to
figure out why C1272 does not apply.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |rejects-valid
Last reconfirmed|0000-00-00 00:00:00 |2008-06-13 17:52:34
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36526