From patchwork Fri Feb 2 10:28:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 195784 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp333915dyc; Fri, 2 Feb 2024 02:31:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHRDs7cFKukeS6L1bs1R7nZ/aHYSf9b0my7VF9vYW6oEfU4UCM8XqmXh0CFhUqwQG66kts X-Received: by 2002:a05:6214:2468:b0:68c:425b:ea9 with SMTP id im8-20020a056214246800b0068c425b0ea9mr9459303qvb.42.1706869898472; Fri, 02 Feb 2024 02:31:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706869898; cv=pass; d=google.com; s=arc-20160816; b=Whi/nfRYqP2KZcTvjOnPPMbjGLSIxUEaclqmzT52Y0UkjKloB3NBU0VOo+1PF//zK7 sEP+x/sJXDRAsIvr+ncPq2Y3V252d4AYraFmuSZv3bVgs52imjyclFerZ0KTtutXSqeK yc3R2dsWCmftmlCkdbdKDJhPmt3+Dn8SwcBC8reVYxG8qTL7VPPhimJEIAeZgd3hlHJ8 7iACHXSQge7+AyiUoLi6o4ppo9WPJ+KWtMBsosdZW4036FaReAmEZit4xhMr3CcMjsF3 q5LM+ejDMub5lRWNWSQAvhh7PrI7YZya6qAmBpkRfeiKsSTRwjqBA80xQGgGlEUeIsuR E4mg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=5zJvEFNPUrmOGK0KlN4bkRGaY/duJVvTOnutuWE4wxs=; fh=yDLLeX6Ntjfd17i+RqHuXzeBpxwvnhuTMfYLGxgeE38=; b=iGNW5rHWP8E2/Oi8EeIKlkmoaQzR5Y1KJMiDVOsjLLARl645GQyTlUC5xeFcIMQxd+ j14VkimxK4ZA99T3UFO7nGjhfgCS2N11DWmfllSWn9GlFV+2uhB6Sjmv4OjeawEWwsU9 mt8vo6pu26QLLZZ2+gBnylT7tMhgdZ+Echxkf7alj3w/AQ0Lk0SxyEBj/hw3r8Rlth2B k7z4eKP80W/RKlqQHieyGa3ijPwT6j4GGq/FmzG0DeT9FEavPvik1+0FoanLMSIqRy/X h0fXshp/K5aes4ng2rTYiWKmIEwzpi0XqwqbDMN6A7LYKSPgWJXjioqtX8+JDFSY1GSS bqrw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="LGU/DGhL"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCV37PI+FdH3Xoqd4WsyyywS01Tj8D/15wOTpaPQOPLbsUtwqDECaGIMX13j1Hguqdr2vK6h24vzoabxplScXdAR3T1k3g== Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id j12-20020a0ceb0c000000b0068c544d3545si1655444qvp.214.2024.02.02.02.31.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 02:31:38 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="LGU/DGhL"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2A5AC3857C5E for ; Fri, 2 Feb 2024 10:31:38 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 097BB3858020 for ; Fri, 2 Feb 2024 10:29:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 097BB3858020 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 097BB3858020 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706869741; cv=none; b=CHSrhJQUaC3LY9tuMYP+uo9gnt5eFL6j3JGhrD5wtJcoE6R0AG662vaEE0jsyuxEgM8pfNxKJa7WMPrQNDgBXt2AC86ZeFd0Jyi80Yg+IzyDhBwbmcW4sjbL8u7Z37ixZmpBqA6z6LDeP2Yw+GnrpzD8kkqvlRuL+VXGTwoKGIM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706869741; c=relaxed/simple; bh=L21QZJohOagAotb+dinOxunqEG9RGcxemA3AHXJORTg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=m7Zgl8P9enCnZJGmx4Tw0qccjIveQDmBxGfN61dDVCVDijdEdrmy14WOo5ua5sQhAmmSD2w+vsU8dSW18J3BDMDEFD1OPWj+VOenmNVgR67Ps7Xtfa4Uirp3RVEgfzJVNJ186EFpsrz7CmfEEGEHEqLknBV1MdBbzbV+xXmVLno= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706869739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5zJvEFNPUrmOGK0KlN4bkRGaY/duJVvTOnutuWE4wxs=; b=LGU/DGhLa7V/Iuc9Yd/C1FNXz9u/Pm5I2N5jwGJr/amTHDeBCwakEZFEy/5vyFLshto1AY r/FTzEW1XDl7xG+85YrSeaRbHIhnx5bq7jANoYRUpk+dQUucFyom2deOkvQ3hwPSllOWIK Y3M9kJi10vj99B52yX10+/GiWfrvvYc= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-66-i3-_bUXaMauGdpN6dwk_wQ-1; Fri, 02 Feb 2024 05:28:56 -0500 X-MC-Unique: i3-_bUXaMauGdpN6dwk_wQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 305013806702; Fri, 2 Feb 2024 10:28:56 +0000 (UTC) Received: from localhost (unknown [10.42.28.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id D67E12166B33; Fri, 2 Feb 2024 10:28:55 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: =?utf-8?q?Fran=C3=A7ois_Dumont?= Subject: [committed 2/2] libstdc++: Fix invalid order in PSTL inplace_merge test [PR90276] Date: Fri, 2 Feb 2024 10:28:08 +0000 Message-ID: <20240202102846.2241323-2-jwakely@redhat.com> In-Reply-To: <20240202102846.2241323-1-jwakely@redhat.com> References: <20240202102846.2241323-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789782810635077999 X-GMAIL-MSGID: 1789782810635077999 Tested x86_64-linux. Pushed to trunk. -- >8 -- This looks like a typo in the upstream test that causes a failure in debug mode. It has been reported upstream. libstdc++-v3/ChangeLog: PR libstdc++/90276 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Fix comparison function to use less-than instead of equality. --- .../testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc b/libstdc++-v3/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc index 576f22423b8..a9205553574 100644 --- a/libstdc++-v3/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc +++ b/libstdc++-v3/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc @@ -160,7 +160,7 @@ main() test_by_type( [](std::size_t idx){ return MemoryChecker{std::int32_t(idx * 2)}; }, [](std::size_t idx){ return MemoryChecker{std::int32_t(idx * 2 + 1)}; }, - [](const MemoryChecker& val1, const MemoryChecker& val2){ return val1.value() == val2.value(); }); + [](const MemoryChecker& val1, const MemoryChecker& val2){ return val1.value() < val2.value(); }); EXPECT_FALSE(MemoryChecker::alive_objects() < 0, "wrong effect from inplace_merge: number of ctors calls < num of dtors calls"); EXPECT_FALSE(MemoryChecker::alive_objects() > 0, "wrong effect from inplace_merge: number of ctors calls > num of dtors calls");