From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2AF98385840D; Wed, 24 Apr 2024 15:49:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2AF98385840D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713973782; bh=GoMtL5l+SDsGN2P3K8J4FMRMctSTvJ26I3T1dZ3YWEg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QHhbgwMyY9bgJmTbEydNVEEohmahy7KKLNGkU9D9UM0w9s5J5twNpGYeZCx3F92gm 2MxKL7jpm5KGSJp6f6ooHAuwQ2Lc4Xfo9s3ZmHWphV87Klv4oq1yG4ybST8WV7JD6b uddOyJKwyS/PF+QR2J+F/n9ssD49JkYSxK66a0Uc= From: "pault at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/93678] [11/12/13/14 Regression] ICE with TRANSFER and typebound procedures Date: Wed, 24 Apr 2024 15:49:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 9.2.1 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pault at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: pault at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to cc attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D93678 Paul Thomas changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |pault at gcc dot gn= u.org CC| |pault at gcc dot gnu.org --- Comment #14 from Paul Thomas --- Created attachment 58026 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D58026&action=3Dedit 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 ! ! The testcase was reduced by various gfortran regulars. module mo_a implicit none type t_b integer :: i contains procedure :: unpackbytes =3D> b_unpackbytes end type t_b contains function b_unpackbytes (me) result (res) class(t_b), intent(inout) :: me character :: res(1) res =3D 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 =3D t_b(97)) call b_unpackint (z, "a") end=