From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 09F1D3973003; Fri, 2 Jul 2021 01:03:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 09F1D3973003 From: "rodgertq at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/101274] [11/12 Regression] std::execution::seq has incorrect behaviour under GCC 11.1.0 Date: Fri, 02 Jul 2021 01:03:03 +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: 11.1.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rodgertq at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.2 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: Fri, 02 Jul 2021 01:03:04 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101274 --- Comment #4 from Thomas Rodgers --- I did some more reading of http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/n4878.pdf and it wo= uld seem that you are not even guaranteed a deterministic ordering of the application of binary_op on the non-execution policy accepting overloads of std::reduce(). See [reduce] the note at bullet 9 - "[Note 1 : The difference between reduce and accumulate is that reduce appl= ies binary_op in an unspecified order, which yields a nondeterministic result f= or non-associative or non-commutative binary_op such as floating-point additio= n. =E2=80=94 end note]"=