From patchwork Mon Jun 22 15:11:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 487226 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 E4741140157 for ; Tue, 23 Jun 2015 01:11:36 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=G2jN4w9J; dkim-atps=neutral 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=rBYcgLBOMHMfA9FfDU0uaTY+PlFHK0sdb1uQAEPFXYFX1Z2MrJrqW w8qpgN5Gdb0IKjdKjAG8H8JAKds3wW3yoFW5AtVos+uQw4OYzW2aqHpXT2TrmqUE MCfZbB4sSocH/jodu4eh0QIxA6wAL0U/RyTOrYAXizQoI/rkx9wTU4= 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=4Q7UMSFCbn1ETpOOUi3JlrLyAtU=; b=G2jN4w9JgCRH8SXC7LIc 8Li/gNuwmtASuMLf9USEuePahs67Pyrj2QS5fHZVB0SOmIYmilusJyHP30/e0M7r KE76BjlE/x2l1XflBDZgV5O7LQRFxrtmTnGuOWXzXU0eKmIGZEvFy6O9rU1zObgP xtFSoeKhR3235y46JjFvfzI= Received: (qmail 42415 invoked by alias); 22 Jun 2015 15:11:20 -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 42001 invoked by uid 89); 22 Jun 2015 15:11:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 22 Jun 2015 15:11:17 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id B40DB19F219; Mon, 22 Jun 2015 15:11:15 +0000 (UTC) Received: from localhost (ovpn-116-102.ams2.redhat.com [10.36.116.102]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5MFBEcE021377; Mon, 22 Jun 2015 11:11:15 -0400 Date: Mon, 22 Jun 2015 16:11:14 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [patch] Fix std::polar() test FAIL Message-ID: <20150622151114.GK2856@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.5.23 (2014-03-12) I recently added a debug mode assertion that std::polar is not called with a negative rho argument, which this test does. Tested powerpc64le-linux, committed to trunk. commit 3592c4a31ba7f3af4eb8111565888651652ad7b1 Author: Jonathan Wakely Date: Mon Jun 22 15:08:55 2015 +0100 * testsuite/26_numerics/complex/value_operations/1.cc: Use non-negative rho argument. diff --git a/libstdc++-v3/testsuite/26_numerics/complex/value_operations/1.cc b/libstdc++-v3/testsuite/26_numerics/complex/value_operations/1.cc index 1caf9f1..a1e0a6b 100644 --- a/libstdc++-v3/testsuite/26_numerics/complex/value_operations/1.cc +++ b/libstdc++-v3/testsuite/26_numerics/complex/value_operations/1.cc @@ -53,7 +53,7 @@ void test01() complex_type e __attribute__((unused)) = conj(c); - complex_type f = polar(c.imag(), 0.0); + complex_type f = polar(std::abs(c.imag()), 0.0); VERIFY( f.real() != 0 ); }