[Bug fortran/65548] [5 Regression] gfc_conv_procedure_call

juergen.reuter at desy dot de gcc-bugzilla@gcc.gnu.org
Fri Apr 10 16:48:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65548

--- Comment #12 from Jürgen Reuter <juergen.reuter at desy dot de> ---
Here is the code (cf. below). It ICEs with r221962. 

module phs_base
  type :: flavor_t
   contains
     procedure :: get_mass => flavor_get_mass
  end type flavor_t

  type, abstract :: phs_config_t
     integer :: n_in = 0
     type(flavor_t), dimension(:,:), allocatable :: flv
  end type phs_config_t

  type, abstract :: phs_t
     class(phs_config_t), pointer :: config => null ()
     real, dimension(:), allocatable :: m_in
   contains
     procedure :: base_init => phs_base_init
  end type phs_t

contains

  elemental function flavor_get_mass (flv) result (mass)
    real :: mass
    class(flavor_t), intent(in) :: flv
    mass = 0
  end function flavor_get_mass

  subroutine phs_base_init (phs, phs_config)
    class(phs_t), intent(out) :: phs
    class(phs_config_t), intent(in), target :: phs_config
    phs%config => phs_config
    allocate (phs%m_in  (phs%config%n_in), &
         source = phs_config%flv(:phs_config%n_in, 1)%get_mass ())
  end subroutine phs_base_init

end module phs_base


More information about the Gcc-bugs mailing list