[Bug fortran/93678] [9/10/11 Regression] ICE in 9.2/9.2.1 not happening in previous gfortran versions

tkoenig at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jul 12 12:55:40 GMT 2020


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

--- Comment #5 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
A somewhat smaller test case, which of course does nothing useful,
but still reproduces the ICE:

module mo_a
  implicit none
  type t_b
     integer :: n = 0
     integer :: nr = 0
     character, pointer :: buffer(:) => NULL()
   contains
     procedure :: unpackbytes => b_unpackbytes  
  end type t_b
  character :: characterarraymold(1)
contains
  subroutine b_unpackint(me, val)
    class(t_b), intent(inout) :: me
    integer, intent(out) :: val
    val = transfer(me%unpackbytes(transfer(val, characterarraymold)),  val)
  end subroutine b_unpackint
  function b_unpackbytes(me, bytearraymold) result(res)
    class(t_b), intent(inout) :: me
    character, intent(in) :: bytearraymold(:)
    character, pointer :: res(:)
  end function b_unpackbytes
end module mo_a


More information about the Gcc-bugs mailing list