From patchwork Wed Oct 4 11:28:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 148239 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp60404vqb; Wed, 4 Oct 2023 04:30:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHnYsxpTSNtX74EU9sSjo1yKjp7KjSJ23Gh9bSewP6FkLY7UJw9+kJOw9ZysqQuiJ3trjJd X-Received: by 2002:a17:906:3081:b0:9ae:73ca:bbad with SMTP id 1-20020a170906308100b009ae73cabbadmr1707977ejv.43.1696419035484; Wed, 04 Oct 2023 04:30:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696419035; cv=none; d=google.com; s=arc-20160816; b=CkmXbJeh0OK8ywS8yEVMU5V9nxYB5i7jxhEzS9WMFQfQm9Z+sVRJvlzN49BPWDMhAG pBSWxR3grLb+pFRxqROgxgh69ApjVFRO8/wq06tTviglNfZJv1D5J8QEyHSubHAOQcvq eFo8ap9OsQ2Y24M3/8MyfxzlG19lrmVpAMR13xa4SWPcBoxrm0UUgDSxKN48KGxwVib6 QTmmGSw3YiX3g/84SSP6HheqzIvm3OaRPqQpHmyhdwx/n4P/RFDyUQjoevfHelvV31P5 9Mjp9qL1sCc0XpeIOlPLPtUJ+9HDgn6XoEgZVBX5cUHntMpMsnLFY9iTb9WoC3HT6CG6 9Rzg== ARC-Message-Signature: i=1; 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:message-id:date:subject:to:from:dkim-signature :dmarc-filter:delivered-to; bh=W/jRu/OzpjjnFUL7E208iSdn2lAdCffiLK8haERuVqo=; fh=sJ+2/4g29YdyXkoRrFZSpsL2zxijepB7X/1rB0LDDh8=; b=E24AuJ6elVEOti+Wl5rx8oc958G6c5Jg2VpQc3KjvCrmairoED6bUkJsOLEGBktP6z uaUZKuYqNvaussxbENbe3SftXatx/8f+Zh4w+mI53x+KlQn1RrF/bNyDWcdTRvCViEpO GarIWTgP/ODACIwCYW3kmxnAwWDDba0YmYM6M6WqZMlH4Bjl4tXw+QoNzb3M3zbLabLF GiFenmx5lPEFdA77Q6YZzLF6MOX/S8rK/JJfdnfbk9/PAY2oHxoMc1WelxS9QwFI6a/G X3a6WmQ5WjSWt5HfEcbBuEijoHw0oVRtDZvYn8VLmoCGJNkYVah7TVBEh7q5JCMfdLJH qVqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ircN3t7A; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id j8-20020a170906410800b0099207b3bc46si1713728ejk.322.2023.10.04.04.30.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 04:30:35 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ircN3t7A; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 721EE3861952 for ; Wed, 4 Oct 2023 11:29:23 +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.129.124]) by sourceware.org (Postfix) with ESMTPS id 3997E3855587 for ; Wed, 4 Oct 2023 11:28:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3997E3855587 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696418938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W/jRu/OzpjjnFUL7E208iSdn2lAdCffiLK8haERuVqo=; b=ircN3t7AHOOsfOwekmTOquCMiQ+tjimLA+7R+cqNO2l/twDanCA7F2kG0tdYdvMWXXX8cs gUH+dlE6FqO8BfPGdvzEGd9SeX4l/JI3cHH63qX60GpLcfMZThTfe5UklZGq7Fw2FZz72Z lLJOoP4bENRJ3wenHbdceZ313JVnvPw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-511-N9kg9JztMQOsNkmFDBWQRw-1; Wed, 04 Oct 2023 07:28:57 -0400 X-MC-Unique: N9kg9JztMQOsNkmFDBWQRw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BE882101B047; Wed, 4 Oct 2023 11:28:56 +0000 (UTC) Received: from localhost (unknown [10.42.28.180]) by smtp.corp.redhat.com (Postfix) with ESMTP id 78EE347CD2; Wed, 4 Oct 2023 11:28:56 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed,gcc-11] libstdc++: Fix testsuite failures with -O0 Date: Wed, 4 Oct 2023 12:28:36 +0100 Message-ID: <20231004112855.3297083-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP 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: 1778824286242617335 X-GMAIL-MSGID: 1778824286242617335 I've pushed this to gcc-11 after testing on x86_64-linux. -- >8 -- Backport the prune.exp change from r12-4425-g1595fe44e11a96 to fix two testsuite failures when testing with -O0: FAIL: 20_util/uses_allocator/69293_neg.cc (test for excess errors) FAIL: 20_util/uses_allocator/cons_neg.cc (test for excess errors) Also force some 20_util/integer_comparisons/ xfail tests to use -O2 so that the errors match the dg-error directives. libstdc++-v3/ChangeLog: * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: Add -O2 to dg-options. * testsuite/20_util/integer_comparisons/greater_neg.cc: Likewise. * testsuite/20_util/integer_comparisons/less_equal_neg.cc: Likewise. * testsuite/lib/prune.exp: Prune 'in constexpr expansion'. --- .../testsuite/20_util/integer_comparisons/greater_equal_neg.cc | 2 +- .../testsuite/20_util/integer_comparisons/greater_neg.cc | 2 +- .../testsuite/20_util/integer_comparisons/less_equal_neg.cc | 2 +- libstdc++-v3/testsuite/lib/prune.exp | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal_neg.cc b/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal_neg.cc index 62633262948..028dce3df51 100644 --- a/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal_neg.cc +++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal_neg.cc @@ -15,7 +15,7 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=gnu++2a" } +// { dg-options "-std=gnu++2a -O2" } // { dg-do compile { target c++2a } } #include diff --git a/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_neg.cc b/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_neg.cc index 48cb64d5676..f0422bc1948 100644 --- a/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_neg.cc +++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_neg.cc @@ -15,7 +15,7 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=gnu++2a" } +// { dg-options "-std=gnu++2a -O2" } // { dg-do compile { target c++2a } } #include diff --git a/libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal_neg.cc b/libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal_neg.cc index a16b36a83c9..3bd5d6480fe 100644 --- a/libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal_neg.cc +++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal_neg.cc @@ -15,7 +15,7 @@ // with this library; see the file COPYING3. If not see // . -// { dg-options "-std=gnu++2a" } +// { dg-options "-std=gnu++2a -O2" } // { dg-do compile { target c++2a } } #include diff --git a/libstdc++-v3/testsuite/lib/prune.exp b/libstdc++-v3/testsuite/lib/prune.exp index 6c905631f16..2ebfb922ef4 100644 --- a/libstdc++-v3/testsuite/lib/prune.exp +++ b/libstdc++-v3/testsuite/lib/prune.exp @@ -46,6 +46,7 @@ proc libstdc++-dg-prune { system text } { regsub -all "(^|\n)\[^\n\]*(: )?At (top level|global scope):\[^\n\]*" $text "" text regsub -all "(^|\n)\[^\n\]*: (recursively )?required \[^\n\]*" $text "" text regsub -all "(^|\n)\[^\n\]*: . skipping \[0-9\]* instantiation contexts \[^\n\]*" $text "" text + regsub -all "(^|\n)\[^\n\]*: in .constexpr. expansion \[^\n\]*" $text "" text regsub -all "(^|\n) inlined from \[^\n\]*" $text "" text # Why doesn't GCC need these to strip header context? regsub -all "(^|\n)In file included from \[^\n\]*" $text "" text