https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94408
--- Comment #1 from michalak at ucar dot edu --- Here is a slightly more simplified version of the test.F90 program that still demonstrates the error with gcc 9.1.0 (below). The namelist_t type from the previous reproducer code turns out not to be necessary and has been removed from the example. Commenting out the indicated line causes the error to go away. Thanks, -John === module mod_input type config_t integer :: domain_id contains procedure :: init => rw_config procedure :: rw_nl_grid end type config_t interface module subroutine rw_config (this,iunit) implicit none class (config_t) :: this integer, intent(in), optional :: iunit end subroutine rw_config module subroutine rw_nl_grid ( this, iunit ) implicit none class (config_t) :: this integer, optional, intent(in) :: iunit end subroutine rw_nl_grid end interface contains module subroutine rw_config (this,iunit) implicit none class (config_t) :: this integer, intent(in), optional :: iunit call this%rw_nl_grid ! comment this out to make error go away end subroutine rw_config module subroutine rw_nl_grid ( this, iunit ) implicit none class (config_t) :: this integer, optional, intent(in) :: iunit end subroutine rw_nl_grid end module mod_input module neptune_write_native contains subroutine Run use mod_input type(config_t) :: config end subroutine Run end module neptune_write_native