From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2DBD43858D38; Thu, 11 Jan 2024 05:49:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DBD43858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704952151; bh=l6lIabhb4yNjUJjLGKQCPe4AaDLmICp+8giNMUnwakg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ECEJfmCPPyoIHxNtn3SZ7DKh8FaBjYyqEtpmCecaHFSKMwdWoK/WeM5hs0/ePQehg TVfCYDpzgn2qveSn2ASoNuJ6lXVKdzeCsjw2/swZsuFod7RkHdAw2BuLAUjK3z0ygH WCNMaTV8iBJiqASy0gn3lcoujRsmwVeqvsh1kFoc= From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/113313] execute_command_line hangs at run time Date: Thu, 11 Jan 2024 05:49:10 +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: kargl at gcc dot gnu.org 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: 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=3D113313 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #1 from kargl at gcc dot gnu.org --- Created attachment 57034 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57034&action=3Dedit patch to execute_command_line.c Code compiles and runs on FreeBSD. That said, I see % gfcx -o z a.f90 -g && ./z I am john F I am JOHN F % valgrind ./z =3D=3D18812=3D=3D Memcheck, a memory error detector =3D=3D18812=3D=3D Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward = et al. =3D=3D18812=3D=3D Using Valgrind-3.22.0 and LibVEX; rerun with -h for copyr= ight info =3D=3D18812=3D=3D Command: ./z =3D=3D18812=3D=3D=20 =3D=3D18812=3D=3D Conditional jump or move depends on uninitialised value(s) =3D=3D18812=3D=3D at 0x4B0AD79: _gfortran_execute_command_line_i4 (execute_command_line.c:203) =3D=3D18812=3D=3D by 0x400B2A: iam.0 (a.f90:15) =3D=3D18812=3D=3D by 0x400BE1: MAIN__ (a.f90:5) =3D=3D18812=3D=3D by 0x400CEF: main (a.f90:6) =3D=3D18812=3D=3D=20 I am john F =3D=3D18812=3D=3D Conditional jump or move depends on uninitialised value(s) =3D=3D18812=3D=3D at 0x4B0AD79: _gfortran_execute_command_line_i4 (execute_command_line.c:203) =3D=3D18812=3D=3D by 0x400B2A: iam.0 (a.f90:15) =3D=3D18812=3D=3D by 0x400C8B: MAIN__ (a.f90:6) =3D=3D18812=3D=3D by 0x400CEF: main (a.f90:6) =3D=3D18812=3D=3D=20 I am JOHN F =3D=3D18812=3D=3D=20 =3D=3D18812=3D=3D HEAP SUMMARY: =3D=3D18812=3D=3D in use at exit: 0 bytes in 0 blocks =3D=3D18812=3D=3D total heap usage: 26 allocs, 26 frees, 9,873 bytes allo= cated Looking at the code around line 203 suggests that there may be some confusi= on with setting the error status. The attached patch allows the code to run without the valgrind warnings.=