From patchwork Wed Sep 13 15:29:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 813488 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-462047-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Uyi/VsDA"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xslwY1rvmz9s7v for ; Thu, 14 Sep 2017 01:30:17 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=QKqymZrlrq7XT1RX2t2bt8agiN6rSFAVBg6uPlMPq1KBuVS26EKbU fqS0SUr80GpJnCYbWQSN5r98tWF40e1p/p/DXMu2c3tkUcIL2bw1Tbty0r28H5mk 19WwFw+8okiCcqrewfWkHd50QsO4rwbkt7vEy4tZU6CPirUIirIwaI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=qQRcZwzXmX9aRobsBMns/1Us3Uk=; b=Uyi/VsDAL3ZnwIHIoPaO NBUU879T+L0XMIaTsAvRqjQeBFh6E4tr69l4YyAxSha4Tg+Ivu9ikXam3NpeEls8 mig/hmhGAgWVRP4b8hyTUqd2mqys4n4T1FL8CjYzf78TntfUcJlVgnkt0U9bbY/t wLAJJkq0DkKjh0oVXfX4iGw= Received: (qmail 47987 invoked by alias); 13 Sep 2017 15:29:59 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 47969 invoked by uid 89); 13 Sep 2017 15:29:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 13 Sep 2017 15:29:56 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 074BFE2B84; Wed, 13 Sep 2017 15:29:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 074BFE2B84 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jwakely@redhat.com Received: from localhost (unknown [10.33.36.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id AE6DB69FBC; Wed, 13 Sep 2017 15:29:54 +0000 (UTC) Date: Wed, 13 Sep 2017 16:29:54 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] Fix libstdc++ tests using invalid effective-target Message-ID: <20170913152953.GA15020@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.8.3 (2017-05-23) The c++11 effective-target isn't supported on gcc-5-branch, so these tests need to use dg-options instead. (I'll be glad when we close gcc-5-branch and I don't have to remember this!) One of the tests FAILed when this was fixed, because it was also using a constructor of __gnu_test::test_container that doesn't exist on gcc-5-branch. So I fixed that too. * testsuite/20_util/reference_wrapper/80504.cc: Do not use invalid effective-target. * testsuite/22_locale/conversions/buffer/2.cc: Likewise. * testsuite/28_regex/basic_regex/ctors/basic/iter.cc: Likewise. Fix use of test_container. Tested x86_64-linux, committed to gcc-5-branch. commit 397c9db7d7a08ded788d5d7cc3c8bc9ec6525eec Author: Jonathan Wakely Date: Wed Sep 13 15:56:08 2017 +0100 Fix libstdc++ tests using invalid effective-target * testsuite/20_util/reference_wrapper/80504.cc: Do not use invalid effective-target. * testsuite/22_locale/conversions/buffer/2.cc: Likewise. * testsuite/28_regex/basic_regex/ctors/basic/iter.cc: Likewise. Fix use of test_container. diff --git a/libstdc++-v3/testsuite/20_util/reference_wrapper/80504.cc b/libstdc++-v3/testsuite/20_util/reference_wrapper/80504.cc index 727a560cd17..d46ffcd056b 100644 --- a/libstdc++-v3/testsuite/20_util/reference_wrapper/80504.cc +++ b/libstdc++-v3/testsuite/20_util/reference_wrapper/80504.cc @@ -15,7 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do compile { target c++11 } } +// { dg-options "-std=gnu++11" } +// { dg-do compile } #include diff --git a/libstdc++-v3/testsuite/22_locale/conversions/buffer/2.cc b/libstdc++-v3/testsuite/22_locale/conversions/buffer/2.cc index 8eda714b61d..3efb51ff1c2 100644 --- a/libstdc++-v3/testsuite/22_locale/conversions/buffer/2.cc +++ b/libstdc++-v3/testsuite/22_locale/conversions/buffer/2.cc @@ -15,7 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do run { target c++11 } } +// { dg-options "-std=gnu++11" } +// { dg-do run } #include #include diff --git a/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/iter.cc b/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/iter.cc index 7776c5fd557..4c70e0d6241 100644 --- a/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/iter.cc +++ b/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/iter.cc @@ -15,7 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do compile { target c++11 } } +// { dg-options "-std=gnu++11" } +// { dg-do compile } #include #include @@ -24,7 +25,8 @@ void test01() { char s[] = ""; - __gnu_test::test_container c(s); + __gnu_test::test_container + c(s, s+1); std::regex r1(c.begin(), c.end()); std::regex r2(c.begin(), c.end(), std::regex_constants::grep); }