From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0FAAC38362E0; Fri, 25 Nov 2022 20:53:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0FAAC38362E0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669409635; bh=Id20gjWBDMQjDS4Oy5EOh692O7CFUs2JvbAH0zzJ0YA=; h=From:To:Subject:Date:From; b=Ul52ZR6MRY1PZXZjXrvPoge+iifq2FETn+6crHwcdg2w5eAGcv/uAGpdzdFgO7rCP dLbcGtuBx/0vssjLye/GZvP7hakTvrawKtdW39mrkAXvM1oAWsrLqB/57waL65sjod hEXXGbcSMSmeboFV9KkRWFbryoQCEOkpMO7si82E= From: "jwmwalrus at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/107872] New: ICE on recursive DT with DTIO Date: Fri, 25 Nov 2022 20:53:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jwmwalrus at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D107872 Bug ID: 107872 Summary: ICE on recursive DT with DTIO Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: jwmwalrus at gmail dot com Target Milestone: --- Hi. The code below throws the following ICE: $ gfortran -c -fbacktrace test2.f90=20 gfortran: internal compiler error: Segmentation fault signal terminated pro= gram f951 Please submit a full bug report, with preprocessed source (by using -freport-bug). See for instructions. ----------8<---------- module mod1 type t integer :: data type(t), allocatable :: next contains procedure, private :: write_t generic :: write(formatted) =3D> write_t end type contains recursive subroutine write_t(this, unit, iotype, v_list, iostat, iomsg) class(t), intent(in) :: this integer, intent(in) :: unit character(*), intent(in) :: iotype integer, intent(in) :: v_list(:) integer, intent(out) :: iostat character(*), intent(inout) :: iomsg if (ALLOCATED(this%next)) & write (unit, '(dt)') this%next end subroutine end module ---------->8---------- $ gfortran --version GNU Fortran (Debian 12.2.0-9) 12.2.0 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.=