From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 072863858403; Mon, 1 Nov 2021 18:08:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 072863858403 From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/102992] fortran: redirecting standard out to a file does not work on macOS 12.0 Date: Mon, 01 Nov 2021 18:08:14 +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: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: iains at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Nov 2021 18:08:15 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102992 --- Comment #23 from Iain Sandoe --- (In reply to J=C3=BCrgen Reuter from comment #22) > (In reply to Thomas Koenig from comment #20) > > (In reply to Iain Sandoe from comment #16) > > > (In reply to Thomas Koenig from comment #14) >=20 > >=20 > > There is always the reason of not breaking compatibility, a quick look > > at close_units() shows that it is not meant to be called twice, > > so combining both methods is likely to cause headaches. > >=20 > > So, something for the next incompatible libgfortran update, maybe. > >=20 > > Maybe flushing all units on program termination would be safer, but > > I am not sure we should put in a workaround for what appears to > > be a bug in the underlying system (hopefully soon to be fixed), > > especially since there seems to be a workaround in user code. >=20 > I agree that if this an OS bug, then workarounds in libgfortran that might > jeopardize the integrity are hard to justify.=20 Well, we certainly would not want to do compromise integrity, in any event; that would not be a solution. However, ensuring a single call to the funct= ion ought to be feasible. the secondary point I made was that the phasing of D= TORs called from cxa_atexit (C++) c.f. directly from a destructor can cause subt= le issues in any case. >Do we know that this will be > fixed let's say for macOS 12.0.2 or so, and when will that come?=20 I have filed a bug report, (FB9733712). It is impossible to know what the = OS release priorities are (or schedules), but I do know that the Apple OSS fol= ks are very supportive of gfortran, so I expect they will help. > At the > moment these things do break quite a lot of build scripts for software th= at > rely on redirecting output from test programs. Changing all those test > programs to iso_fortan_env is tedious (but doable).=