From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 134433855144; Sat, 3 Dec 2022 08:56:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 134433855144 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670057776; bh=ZwzyVWRtI8eW+APGGVZYmnwzADC+PZWP9V85j7Vk/yo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TiwOW+UTvGeILFaAlL33r2G+Tcw7CeT8C2Jp1PMXuf9wTLu68fKevj4OXevO1rEiA 3tAS/R0mVmA/w/ezW0RagL2PlC0lGFkKVwFkiP1oE+C7ZvFsClkXPlDaZRkCP6ZJKH ep7O0hlDStOxO/ie5zaA9GuAj/QmIdZZqg+69ywM= From: "pault at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/91316] Derived type finalization failing Date: Sat, 03 Dec 2022 08:56:15 +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.1.0 X-Bugzilla-Keywords: 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: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D91316 --- Comment #2 from Paul Thomas --- (In reply to Paul Thomas from comment #1) > I notice that this is missing from the list of dependencies of PR37336, f= or > which a wider fix will be submitted this afternoon. >=20 > Best regards >=20 > Paul I have returned to this problem. final_s4 generates illegal recursive I/O a= nd hangs due to a mutex lock. It works fine if the I/O is removed from the fin= al procedure. __attribute__((fn spec (". "))) void final_s4 () { struct array00_final_t D.4386; { struct __st_parameter_dt dt_parm.6; dt_parm.6.common.filename =3D &"/home/pault/prs/pr37336/pr91316.f90"[1]= {lb: 1 sz: 1}; dt_parm.6.common.line =3D 127; dt_parm.6.common.flags =3D 128; dt_parm.6.common.unit =3D 6; _gfortran_st_write (&dt_parm.6); _gfortran_transfer_character_write (&dt_parm.6, &"f4: "[1]{lb: 1 sz: 1}, 4); { static integer(kind=3D4) C.4378 =3D 4; struct final_t D.4379; struct final_t D.4380; struct array00_final_t desc.7; struct final_t D.4387; integer(kind=3D4) D.4388; D.4379 =3D final_set (&C.4378); D.4380 =3D D.4379; desc.7.dtype =3D {.elem_len=3D4, .rank=3D0, .type=3D5}; desc.7.data =3D (void * restrict) &D.4379; desc.7.span =3D (integer(kind=3D8)) desc.7.dtype.elem_len; D.4386 =3D desc.7; D.4387 =3D D.4380; D.4388 =3D final_get (&D.4387); _gfortran_transfer_integer_write (&dt_parm.6, &D.4388, 4); if (__vtab_final_m_Final_t._final !=3D 0B && (struct final_t * restri= ct) D.4386.data !=3D 0B) { __vtab_final_m_Final_t._final (&D.4386, __vtab_final_m_Final_t._s= ize, 0); } } _gfortran_st_write_done (&dt_parm.6); } return; } Cheers Paul=