[Bug fortran/47507] New: PURE functions with VALUE arguments invalidly rejectd

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 28 09:41:00 GMT 2011


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

           Summary: PURE functions with VALUE arguments invalidly rejectd
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


The following is valid, but gfortran claims:

Error: Argument 'x' of pure function 'f' at (1) must be INTENT(IN)

"C1276 The specification-part of a pure function subprogram shall specify that
       all its nonpointer dummy data objects have the INTENT (IN) or the
       VALUE attribute."  (F2008 quote)

pure function f(x)
  real, VALUE :: x
  real :: f
  f = sin(x)
end function f



More information about the Gcc-bugs mailing list