[Bug fortran/42048] New: [F03] Erroneous syntax error message on TBP call

janus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Nov 15 10:39:00 GMT 2009


Reported by Damian Rouson:


module grid_module
 implicit none
 type grid
 contains
   procedure :: new_grid
 end type
contains
 subroutine new_grid(this)
   class(grid) :: this
 end subroutine
end module

module field_module
 use grid_module
 implicit none

 type field
   type(grid) :: mesh
 end type

contains

 type(field) function new_field()
  call new_field%mesh%new_grid()
 end function

 ! This compiles when uncommented:
 !function new_field() result(new)
 !  type(field) :: new
 !  call new%mesh%new_grid()
 !end function

end module


This is rejected with:

  call new_field%mesh%new_grid()
                1
Error: Syntax error in CALL statement at (1)


-- 
           Summary: [F03] Erroneous syntax error message on TBP call
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: janus at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list