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/25034] New: allows passing of contained subprograms as actual argument


schluter@pcl247d:~/src> cat t.f90
subroutine a
  call f(g)
contains
  function g(x)
   x =0.
  end function g
end subroutine a
schluter@pcl247d:~/src> gcc/build/gcc/f951 -quiet t.f90
t.f90: In function 'g':
t.f90:5: warning: Function return value not set
schluter@pcl247d:~/src> 

This is not allowed, as can be understood by considering what happens if a
variable of the containing function's scope is referenced.


-- 
           Summary: allows passing of contained subprograms as actual
                    argument
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tobi at gcc dot gnu dot org


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


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