From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 453813858CDA; Fri, 12 Jan 2024 20:02:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 453813858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705089723; bh=qX6RiODkuk9qKQJJq00b1wj0GgIUzxWt+YtB8+0FjZ0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CdjO6t9lZLNcjFR7I+OcRhEiPWN5FPk06RHrs+vrZXDN35WNqrlV1/u2/FCNaOFBE 7yWIdWpkL3WzHD/E7gSWlNSgEpxD2fkkkF3i7GyI1ny41q4j0B6hHSAcBR8NCRTxxl 2hRqoTfuoLmCYU4Om6kZZElQP9eYsJNAsSnD66FY= From: "sgk at troutmask dot apl.washington.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/113313] execute_command_line hangs at run time Date: Fri, 12 Jan 2024 20:02:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sgk at troutmask dot apl.washington.edu X-Bugzilla-Status: UNCONFIRMED 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=3D113313 --- Comment #7 from Steve Kargl -= -- On Thu, Jan 11, 2024 at 07:03:05AM +0000, john.harper at vuw dot ac.nz wrot= e: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113313 >=20 > --- Comment #2 from john.harper at vuw dot ac.nz --- > Thank you! You may wish to know that in my Ubuntu system the program=20 > runs properly if the function iam is used in an assignment statement not = a=20 > print statement. Interesting. One of the first things that the internal implementation does is=20 /* Flush all I/O units before executing the command. */ flush_all_units(); libgfortran is supposedly thread-safe and looking into flush_all_units() shows some unlocking and testing for locks. With 'print *, iam('john')', there may be lock contention.=