From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 318C6385841E; Fri, 6 Jan 2023 11:09:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 318C6385841E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673003388; bh=O+uKlr4Do/WtU3CgOusmixMx8poUuvGbL9ti8KlVcRE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DLYh0FLrJrOu6KGNefAxfzxY77BHxMXRXetD392ZN7TLm9jzsr7WBABOqHTZvtgKL Gool4n7d3aVJJKM4ory5WuBIeER3EAt4TTmG+YNCHHpUnwDWMeu0RucWUrKvoq3T7y U2OHPzyKbo4CmezZvi5+Qt0J3xsLda/ETkl36QTk= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/108305] FAIL: 27_io/basic_ofstream/open/char/noreplace.cc execution test Date: Fri, 06 Jan 2023 11:09:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi 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: 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=3D108305 --- Comment #4 from Jonathan Wakely --- My assumption was that targets that don't support exclusive mode for fopen would fail in exactly that way, and so using std::ios::noreplace would be "conservatively unsupported". That is, it would always fail to open the fil= e, even if it doesn't exist. That seems acceptable. But this test FAIL suggests that the flag is just silently ignored, allowing non-exclusive access to the file. That is not acceptable, since the flag *appears* to work, but fails to establish the required invariant. Maybe we need #ifndef __hpux__ around the declaration and all uses of std::ios::noreplace.=