From patchwork Mon Sep 3 14:54:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 965486 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-485030-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="xDYc5ScI"; 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 423tKd1mKvz9s4Z for ; Tue, 4 Sep 2018 00:54:43 +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:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=hf6z2O6W0iFEiBeBx2XcIlyX1wHVhbwyUdM/MMKFua3m7hFc1t rWQeCfYR3KBQgibGAlpgSeFCvrw3Q06E3DRQoKOw2Fpo6yzbqOlTSYDCi6XlbPa+ Mn9pz0B3ibMMa8+lGdejx3uG4KV/uSZF1k82RKGlT+WXMOIbtxlDJegXU= 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:cc:subject:message-id:mime-version:content-type; s= default; bh=dXHVk/9EToQ2ilTjbqFtH8cWHIo=; b=xDYc5ScIWr5Q7e1r7oDb FDswZcj/tNVe+g4jE5yFgY6G1tgtRVdlANopfCxT54kX/e/T+XR+08ackx/Rcpeb wkW/aRPfpJFDZSNkEmv8sjNAhg2wJq7F10vwHtBq1J9wV3sExzxJ2gAgIxHu9lkh 1aMnmdQzjmYJhBzDDeJcrS0= Received: (qmail 32964 invoked by alias); 3 Sep 2018 14:54:35 -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 32920 invoked by uid 89); 3 Sep 2018 14:54:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=78179, dg-xfail-run-if, AIX, powerpc-ibm-aix* X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Sep 2018 14:54:33 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D69768011059; Mon, 3 Sep 2018 14:54:31 +0000 (UTC) Received: from localhost (unknown [10.33.36.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 990D42026D6B; Mon, 3 Sep 2018 14:54:31 +0000 (UTC) Date: Mon, 3 Sep 2018 15:54:30 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: danglin@gcc.gnu.org, sandra@gcc.gnu.org Subject: [PATCH] PR libstdc++/78179 run long double tests separately Message-ID: <20180903145430.GA11187@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.2 (2017-12-15) Split the long double testing into a separate file, so that we can XFAIL targets where the long double precision doesn't meet the expected tolerances. The float and double tests are still expefted to PASS for all targets. PR libstdc++/78179 * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: New test that runs the long double part of hypot.cc. * testsuite/26_numerics/headers/cmath/hypot.cc: Disable long double tests unless TEST_HYPOT_LONG_DOUBLE is defined. Tested x86_64-linux, committed to trunk. commit f7369a2897f0d8ae014af88142b27569eecd3aa2 Author: Jonathan Wakely Date: Mon Sep 3 15:48:33 2018 +0100 PR libstdc++/78179 run long double tests separately Split the long double testing into a separate file, so that we can XFAIL targets where the long double precision doesn't meet the expected tolerances. The float and double tests are still expefted to PASS for all targets. PR libstdc++/78179 * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: New test that runs the long double part of hypot.cc. * testsuite/26_numerics/headers/cmath/hypot.cc: Disable long double tests unless TEST_HYPOT_LONG_DOUBLE is defined. diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc new file mode 100644 index 00000000000..8a054735ce9 --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc @@ -0,0 +1,25 @@ +// Copyright (C) 2016-2018 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-options "-std=gnu++17" } +// { dg-do run { target c++17 } } +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } } + +// Run the long double tests from hypot.cc separately, because they fail on a +// number of targets. See PR libstdc++/78179 for details. +#define TEST_HYPOT_LONG_DOUBLE +#include "hypot.cc" diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc index 69840c8117a..36c7553c5e8 100644 --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc @@ -17,7 +17,6 @@ // { dg-options "-std=gnu++17" } // { dg-do run { target c++17 } } -// { dg-xfail-run-if "AIX long double" { powerpc-ibm-aix* } } #include #include @@ -126,9 +125,13 @@ const long double toler3 = 1e-16l; void test01() { + // See hypot-long-double.cc for this macro +#ifndef TEST_HYPOT_LONG_DOUBLE test(data1, toler1); test(data2, toler2); +#else test(data3, toler3); +#endif } int