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/39850] New: Too strict checking for procedures as actual argument


Issue came up when testing/rewiewing proc pointers, cf.
http://gcc.gnu.org/ml/fortran/2009-04/msg00214.html

The following program is believed to be correct and it runs with g95, NAG f95,
sunf95, openf95, and ifort, but not with gfortran:
  Error: Type/rank mismatch in argument 'a'

real function func()
 func = 42.0
end function func

program test
  external func  ! subroutine or implicitly typed real function
  call sub(func) ! Error: Type/rank mismatch in argument 'a'
contains
  subroutine sub(a)
   real, external :: a
   print *, a(0.4)
  end subroutine sub
end


-- 
           Summary: Too strict checking for procedures as actual argument
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


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