From patchwork Thu Nov 23 10:54:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 168897 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp389460vqx; Thu, 23 Nov 2023 04:00:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IFhlEJVO69EAZ5veG0J2PntlWACl1ctiMlRzT9IOt0yYJAaUjlyqVCGtisCoSGZJuSoytTl X-Received: by 2002:a05:6871:7505:b0:1f9:8f15:3e4 with SMTP id ny5-20020a056871750500b001f98f1503e4mr5061448oac.27.1700740838470; Thu, 23 Nov 2023 04:00:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700740838; cv=pass; d=google.com; s=arc-20160816; b=emtoaMxmSvFDNBEXsw4wm2TkIh4lC2dZVVR05Xhmg39Zb/5/kgc1IMjIWJDQPeIVSq 6cbOfR9HiL+eGanMZgaIlRmF6tHp4x3B17z3heYJ+Np99kN0WaFF4jIZKMMg5nYAApo6 6WrOhQlDN2x1RTX77ALA3dXrS4V+hZslgoRct7837EZWM+shjOgJu/d8GAKdwBLo2dw8 AMljZe2NazWSbHl63dadRZbvhvFHQfQr+JvPAHVahvArIh+tFcAlUtDKy3SjHFa3Hw6S V/B5w7odJ8s6i8Vnia8WEJDk6YjOokNqQw8IeEIgFJj0ZTmoRDHkLuBwBGjW0yBZxjl2 WoXg== 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:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=E/vplXiuUyYZwTNs1gz0tGoyjZUpnRZui73sDAAZXyk=; fh=DwCfpEd07ZKr8qo3+q36oY7PS2RykIDIQMM7koCab94=; b=b3Bp5NfaBwaMTV4fOXV4yCxgW4y2Q0Nokj/Cnx8MQSJspBNXoSTQZPW9LkKMuSveuN IyF50Wlp3SPAYJZh6pm7QbTs8MoPyexMbRZglS87iAtEhE4r/RGI7C0PB9OeQqRkcHwl B1z61RkXEqZ8VtMwTu12aJDWF9woyCGvGpOURvfXpsNe4WG1MydfDyslOWIdOBAUxwOt M7kiiRcb25/AWRVDbBNiBtTfBZdeCf0cb9q0jP7GoEAm0oKRaftWLwCawS9hKNJEygt4 80J2LXeYXbUucI2mhsSYyhgGgjWzBMExf51JUHawHkrW31i0CzlAF+Gk68Yat7ie2nCq WbGA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WFjrHHGv; arc=pass (i=1); 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 (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id ay20-20020a05620a179400b00773e066060csi1020992qkb.296.2023.11.23.04.00.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 04:00:38 -0800 (PST) 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=WFjrHHGv; arc=pass (i=1); 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 0988B3857BA1 for ; Thu, 23 Nov 2023 10:56:33 +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 284DB3858C5F for ; Thu, 23 Nov 2023 10:55:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 284DB3858C5F 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 284DB3858C5F 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=1700736933; cv=none; b=FrZUGGJtV/dPB2nptio1bmVvpCuEyzEMkv06L8DdQyfsLP6BfdG+hbW9FKpcdB8ATeBNZTCGUca2C8kibL2HSUiGHMlhdemjwCp+vKWn+shFyyMGgKlbCxcNysLBa3JaVgTyA6q2mkc6XEEDy0WS5npeMSQOP2sLj/nMd8eOKhI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700736933; c=relaxed/simple; bh=B0VpITWBE6xf1d2JlGE6qyCTAHX4ksM0j+QbweypM3E=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=dDfEHLs/pGTbXSLbCdRtU8vAFwI7aboWyNrLxMuD3iIklGK2h71GWy6SMDEsLLcqGajFdMiqEr0M/eBU9fA+SZcXnbpTVQBG/JJJ1gjkATA8SJ6SqEei/9WiwcT2LKFOa8c8jcFEqqk4R4AMuirKyWjlyVc5XXQ7sK+25JJh+qM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700736931; 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; bh=E/vplXiuUyYZwTNs1gz0tGoyjZUpnRZui73sDAAZXyk=; b=WFjrHHGv3ZNrWgSJex1q3QIKYfRd0Am/X8lGtv6alfIurCf+h4bt6v/71ytQ7s+iKWcRiM G5B/264b3ydBheno+P5KOvbEp4O1ACtNtXz6QfuTGDr5DE0Israe1ZmidQwts/XOJD8e6M A408xTxd64GcyyZ7+GsC2HiOOJDfukI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-624-mNSAMVFgOGW1os14o8NkWg-1; Thu, 23 Nov 2023 05:55:28 -0500 X-MC-Unique: mNSAMVFgOGW1os14o8NkWg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 1578C185A782; Thu, 23 Nov 2023 10:55:28 +0000 (UTC) Received: from localhost (unknown [10.42.28.188]) by smtp.corp.redhat.com (Postfix) with ESMTP id D45401C060B0; Thu, 23 Nov 2023 10:55:27 +0000 (UTC) From: Jonathan Wakely To: gcc-patches@gcc.gnu.org Cc: Jason Merrill , Jakub Jelinek , libstdc++@gcc.gnu.org Subject: [PATCH] c++: Make g++.dg/opt/pr110879.C require C++11 [PR110879] Date: Thu, 23 Nov 2023 10:54:56 +0000 Message-ID: <20231123105527.2347252-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.8 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_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: 1783356025403858595 X-GMAIL-MSGID: 1783356025403858595 Jakub noted in the PR that this test fails for -std=c++98. Tested x86_64-linux. OK for trunk? -- >8 -- The _M_realloc_insert member does not have the trivial relocation optimization for C++98, which seems to be why the _M_end_of_storage member does not get optimized away. Make this test unsupported for C++98. gcc/testsuite/ChangeLog: PR libstdc++/110879 * g++.dg/opt/pr110879.C: Require C++11 or later. --- gcc/testsuite/g++.dg/opt/pr110879.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/g++.dg/opt/pr110879.C b/gcc/testsuite/g++.dg/opt/pr110879.C index 7f0a0a80b8a..57556605a51 100644 --- a/gcc/testsuite/g++.dg/opt/pr110879.C +++ b/gcc/testsuite/g++.dg/opt/pr110879.C @@ -1,4 +1,4 @@ -// { dg-do compile } +// { dg-do compile { target c++11 } } // { dg-options "-O3 -fdump-tree-optimized" } #include