This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]