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

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |pault at gcc dot gnu.org
                 CC|                            |pault at gcc dot gnu.org

--- Comment #14 from Paul Thomas <pault at gcc dot gnu.org> ---
Created attachment 58026
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58026&action=edit
Fix for this PR

I'll package it all up for the list in the next 24 hours. Regtests OK, the
testcase of comment 1 compiles and this runs fine:

! { dg-do compile }
! Test the fix for PR93678 in which the charlen for the 'unpackbytes'
! vtable field was incomplete and caused the ICE as indicated.
! Contributed by Luis Kornblueh  <mail.l...@web.de>
!
! The testcase was reduced by various gfortran regulars.
module mo_a
  implicit none
  type t_b
    integer :: i
  contains
    procedure :: unpackbytes => b_unpackbytes
  end type t_b
contains
  function b_unpackbytes (me) result (res)
    class(t_b), intent(inout) :: me
    character                 :: res(1)
    res = char (me%i)
  end function b_unpackbytes
  subroutine b_unpackint (me, c)
    class(t_b), intent(inout) :: me
    character, intent(in) :: c
!   print *, b_unpackbytes (me) ! ok
    if (any (me% unpackbytes () .ne. c)) stop 1 ! ICEd here
  end subroutine b_unpackint
end module mo_a

  use mo_a
  class(t_b), allocatable :: z
  allocate (z, source = t_b(97))
  call b_unpackint (z, "a")
end
  • [Bug fortran/93678] [11/12/13/1... pault at gcc dot gnu.org via Gcc-bugs

Reply via email to