[Bug fortran/54756] [OOP] Should reject CLASS, intent(out) in PURE procedures

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Sep 29 18:30:00 GMT 2012


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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

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

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-09-29 18:30:38 UTC ---
The constraint belonging to that note (from the same corrigendum):

"C1278a  An INTENT(OUT) dummy argument of a pure procedure shall not be
polymorphic."


I think the rational is that a FINAL subroutine might be IMPURE and one could
thus invoke an IMPURE procedure through that back door - and it is not
detectable at compile time.

  * * *

Note that there is the related constraint:

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.



More information about the Gcc-bugs mailing list