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



             Bug #: 54756

           Summary: [OOP] Should reject CLASS, intent(out) in PURE

                    procedures

    Classification: Unclassified

           Product: gcc

           Version: 4.8.0

            Status: UNCONFIRMED

          Keywords: accepts-invalid

          Severity: normal

          Priority: P3

         Component: fortran

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: bur...@gcc.gnu.org

                CC: ja...@gcc.gnu.org





Fortran 2008 no longer allows CLASS(),INTENT(OUT) in PURE procedures, gfortran

accepts those.



(Note: I think one should also reject them for Fortran 2003 as it seems to make

life easier easier for the FINAL implementation.)



See "TECHNICAL CORRIGENDUM 1" to Fortran 2008,

ftp://ftp.nag.co.uk/sc22wg5/N1901-N1950/N1902.pdf in "Subclause 1.6.2"

See also ftp://ftp.nag.co.uk/sc22wg5/N1851-N1900/N1875.txt for f08/0011 and

f08/0033.



"Fortran 2003 permitted an INTENT(OUT) argument of a pure subroutine to be

polymorphic; that is not permitted by this part of ISO/IEC 153."



Side note: That doesn't seem to affect impure (elemental).





type t

end type t

contains

pure subroutine foo(x)

  class(t), intent(out) :: x

end subroutine

end

Reply via email to