public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/59103] New: [OOP] Reject deallocate/intent(out) for polymorphic var in PURE procedures (IR F08/0033)
@ 2013-11-13  7:27 burnus at gcc dot gnu.org
  2013-11-13  7:34 ` [Bug fortran/59103] " burnus at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-11-13  7:27 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59103

            Bug ID: 59103
           Summary: [OOP] Reject deallocate/intent(out) for polymorphic
                    var in PURE procedures (IR F08/0033)
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org

(This PR is also motivated by
https://groups.google.com/forum/#!topic/comp.lang.fortran/66iSG-kMZfo and
https://groups.google.com/forum/#!topic/comp.lang.fortran/-NaOfgodyYc )


Interpretation request F08/0033,
ftp://ftp.nag.co.uk/sc22wg5/N1851-N1900/N1875.txt, added additional
restrictions to PURE as polymorphic variables might have IMPURE FINAL
subroutines. Thus:

* An INTENT(OUT) argument of a pure procedure should
  not be allowed to be polymorphic
* deallocation of any polymorphic entity should be forbidden in
  a pure procedure.
* Any statement that might result in a deallocation that is
  forbidden should not be allowed in a pure procedure.


Or more formally:


EDITS to 10-007r1:

[24:10] 1.6.2p1 last sentence, "Any"->"Except as identified in this
        subclause, any".
{This edit is also present in interp F08/0032.}

[24:11+] 1.6.2 at end of subclause insert new paragraph:

         "Fortran 2003 permitted an INTENT(OUT) argument of a pure
          subroutine to be polymorphic.  This is not permitted by this
          part of ISO/IEC 1539.".

[312:23+] After C1278, insert new constraint:
  "C1278b An INTENT(OUT) dummy argument of a pure procedure shall not
          be polymorphic."

[313:4+] After C1284, insert new constraint and note:
  "C1284a A statement that might result in the deallocation of a
          polymorphic entity is not permitted in a pure procedure.

   Note 12.48x
   Apart from the DEALLOCATE statement, this includes intrinsic
   assignment if the variable has a polymorphic allocatable component
   at any level of component selection that does not involve a pointer
   component but which might involve one or more allocatable
   components."


Example:
  See interpretation request.


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

end of thread, other threads:[~2014-12-27 22:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-13  7:27 [Bug fortran/59103] New: [OOP] Reject deallocate/intent(out) for polymorphic var in PURE procedures (IR F08/0033) burnus at gcc dot gnu.org
2013-11-13  7:34 ` [Bug fortran/59103] " burnus at gcc dot gnu.org
2014-12-21 12:14 ` dominiq at lps dot ens.fr
2014-12-21 13:52 ` janus at gcc dot gnu.org
2014-12-21 13:54 ` janus at gcc dot gnu.org
2014-12-27 22:45 ` janus 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).