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

* [Bug fortran/59103] [OOP] Reject deallocate/intent(out) for polymorphic var in PURE procedures (IR F08/0033)
  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 ` burnus at gcc dot gnu.org
  2014-12-21 12:14 ` dominiq at lps dot ens.fr
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-11-13  7:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Actually, we also have to check whether finalizers are IMPURE for
nonpolymorphic TYPE. I think we currently don't do so.


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

* [Bug fortran/59103] [OOP] Reject deallocate/intent(out) for polymorphic var in PURE procedures (IR F08/0033)
  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
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-12-21 12:14 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2014-12-21
     Ever confirmed|0                           |1

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Isn't this PR related to the patch at
https://gcc.gnu.org/ml/fortran/2014-12/msg00098.html?


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

* [Bug fortran/59103] [OOP] Reject deallocate/intent(out) for polymorphic var in PURE procedures (IR F08/0033)
  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
  4 siblings, 0 replies; 6+ messages in thread
From: janus at gcc dot gnu.org @ 2014-12-21 13:52 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |janus at gcc dot gnu.org

--- Comment #3 from janus at gcc dot gnu.org ---
(In reply to Tobias Burnus from comment #0)
> 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

Note: This part is already covered by PR 54756 (see also the link to the patch
in comment #2).


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

* [Bug fortran/59103] [OOP] Reject deallocate/intent(out) for polymorphic var in PURE procedures (IR F08/0033)
  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
                   ` (2 preceding siblings ...)
  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
  4 siblings, 0 replies; 6+ messages in thread
From: janus at gcc dot gnu.org @ 2014-12-21 13:54 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #4 from janus at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #2)
> Isn't this PR related to the patch at
> https://gcc.gnu.org/ml/fortran/2014-12/msg00098.html?

Yes, but the patch does not cover all cases mentioned in comment 0.


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

* [Bug fortran/59103] [OOP] Reject deallocate/intent(out) for polymorphic var in PURE procedures (IR F08/0033)
  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
                   ` (3 preceding siblings ...)
  2014-12-21 13:54 ` janus at gcc dot gnu.org
@ 2014-12-27 22:45 ` janus at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: janus at gcc dot gnu.org @ 2014-12-27 22:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from janus at gcc dot gnu.org ---
(In reply to janus from comment #4)
> (In reply to Dominique d'Humieres from comment #2)
> > Isn't this PR related to the patch at
> > https://gcc.gnu.org/ml/fortran/2014-12/msg00098.html?
> 
> Yes, but the patch does not cover all cases mentioned in comment 0.

This patch has been committed as r219085.


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