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

           Summary: [F2008] Handle VALUE with arrays (DIMENSION)
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: bur...@gcc.gnu.org
        Depends on: 35203
            Blocks: 39627


Fortran 2008 relaxed the constrains with regards to VALUE. While Fortran 2003
only allowed it for objects which can be transferred by pass-by-value (in
sprite of BIND(C) dummys/C nonpointer parameters), Fortran 2003 now allows for
everything which may be copied in, which is nearly everything.

Fortran 2008 has:

C557  An entity with the VALUE attribute shall be a dummy data object
      that is not an assumed-size array or a coarray, and does not have
      a coarray ultimate component.

C558  An entity with the VALUE attribute shall not have the ALLOCATABLE,
      INTENT (INOUT), INTENT(OUT), POINTER, or VOLATILE attributes.


Fortran 2003 has:

C527 (R501)   If the VALUE attribute is specified, the PARAMETER, EXTERNAL,
     POINTER, ALLOCATABLE, DIMENSION, VOLATILE, INTENT(INOUT), or INTENT(OUT)
     attribute shall not be specified.

Thus: DIMENSION has been removed and just attr.codimension/attr.coarray_comp
are prohibited - as a dummy with assumed size as there copy-in/copy-out will
fail.

Reply via email to