From patchwork Wed Nov 23 15:25:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 83696 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp2694541qge; Wed, 23 Nov 2016 07:26:12 -0800 (PST) X-Received: by 10.98.159.67 with SMTP id g64mr3286954pfe.93.1479914772850; Wed, 23 Nov 2016 07:26:12 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id n24si34306972pgc.301.2016.11.23.07.26.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Nov 2016 07:26:12 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-442395-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-442395-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-442395-patch=linaro.org@gcc.gnu.org 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=XNOt8ZgmIYQAQnxR3Jhb7K4Auc/OqhI0hOjOPzKdL+6txn//CS9Li 2nbGP2qT6lemZAihkD52GLwzA2leo/ec/M/EOdLHOfR4d/lleR+zZLdvO0hxdpM7 sMRplrECgJW7Mgu1Ak9D7UCpDLLQy/6ocP4kpkastlAU/FLoyGWleI= 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=yUdlkxo1JF9sOhaSjiMXoy+IwmQ=; b=YeaivsWK4H59OHN+0eHZ Uni+VR61EWJqoIBayI9a6icVbLtKiiZb/pJrku87Sk64WXdf9IfVKW27cNIdfFI7 JOt7oA6xBj83CfVMZWTNcad+c8piHldoZABLxiw6U5MUgrszESP/rMQ0nmkdPto4 VhG0EG258dDRpA1DtihmblE= Received: (qmail 37514 invoked by alias); 23 Nov 2016 15:25:56 -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 37485 invoked by uid 89); 23 Nov 2016 15:25:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=BAYES_00, 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, 23 Nov 2016 15:25:45 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 860406DD8C; Wed, 23 Nov 2016 15:25:44 +0000 (UTC) Received: from localhost (ovpn-116-47.ams2.redhat.com [10.36.116.47]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uANFPhxS002229; Wed, 23 Nov 2016 10:25:44 -0500 Date: Wed, 23 Nov 2016 15:25:43 +0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] Replace unsupported effective-target with dg-options Message-ID: <20161123152543.GC3301@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.7.1 (2016-10-04) I accidentally backported tests using { target c++11 } to the branch, but that only works on trunk. One test was also using C++14-only features, but is meant to be valid in C++11. * testsuite/24_iterators/reverse_iterator/71771.cc: Replace calls to C++14 std::rbeing and std::rend. Use dg-options instead of effective-target. * testsuite/27_io/headers/cstdio/functions_neg.cc: Likewise. * testsuite/experimental/numeric/77801.cc: Likewise. Tested x86_64-linux, committed to gcc-6-branch. commit d97bb71f4e0cb7735e78ab879dae82886bdc6482 Author: Jonathan Wakely Date: Wed Nov 23 15:08:17 2016 +0000 Replace unsupported effective-target with dg-options * testsuite/24_iterators/reverse_iterator/71771.cc: Replace calls to C++14 std::rbeing and std::rend. Use dg-options instead of effective-target. * testsuite/27_io/headers/cstdio/functions_neg.cc: Use dg-options instead of effective-target. * testsuite/experimental/numeric/77801.cc: Likewise. diff --git a/libstdc++-v3/testsuite/24_iterators/reverse_iterator/71771.cc b/libstdc++-v3/testsuite/24_iterators/reverse_iterator/71771.cc index 1a7c963..fe08224 100644 --- a/libstdc++-v3/testsuite/24_iterators/reverse_iterator/71771.cc +++ b/libstdc++-v3/testsuite/24_iterators/reverse_iterator/71771.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 @@ -39,5 +40,7 @@ test01() int i[2]; __gnu_test::test_container c(i); - diff2(std::rbegin(c), std::rend(c)); + using reverse_iterator + = std::reverse_iterator<__gnu_test::bidirectional_iterator_wrapper>; + diff2(reverse_iterator(c.end()), reverse_iterator(c.begin())); } diff --git a/libstdc++-v3/testsuite/27_io/headers/cstdio/functions_neg.cc b/libstdc++-v3/testsuite/27_io/headers/cstdio/functions_neg.cc index f9e5f86..0df181b 100644 --- a/libstdc++-v3/testsuite/27_io/headers/cstdio/functions_neg.cc +++ b/libstdc++-v3/testsuite/27_io/headers/cstdio/functions_neg.cc @@ -1,4 +1,5 @@ -// { dg-do compile { target c++14 } } +// { dg-options "-std=gnu++14" } +// { dg-do compile } // Copyright (C) 2007-2016 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/experimental/numeric/77801.cc b/libstdc++-v3/testsuite/experimental/numeric/77801.cc index c4c8bfb..8bee00d 100644 --- a/libstdc++-v3/testsuite/experimental/numeric/77801.cc +++ b/libstdc++-v3/testsuite/experimental/numeric/77801.cc @@ -15,7 +15,8 @@ // with this library; see the file COPYING3. If not see // . -// { dg-do compile { target c++14 } } +// { dg-options "-std=gnu++14" } +// { dg-do compile } #include #include