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