From patchwork Wed Aug 7 11:49:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 265488 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id A93472C0105 for ; Wed, 7 Aug 2013 21:50:13 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=vnAxAbIiWpkKN6Bra5zgF56/fJSNSp1VDM2ddi0fEoM YluBV9xWcA62d/zYYrlggINeMrPP3vL4c5JsTrEAzfTMN7BkYxd5pTbMdp8gqyaK 9kRfR0YIMV6PFNsEvE4nmj7EtMLygPCSX2NaUjvzYF1wOpbEtYsOZlmHSkam0O3U = 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 :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=0ea1k0cD7eodR2U5kVb6dGZn4vk=; b=gnqbgE2v6HD1WGVVz k8fneHqdUHpVfE+eKxvddtfyWK+NFlFMDrNaTuWGF6qHoghi2PLe9332l0R7wOjt LskvK93pfKwgt7D7O1z7o/EfHPbVreLKl9LgSFdaJe2Ct5VpRdXL9v84a0rlly2D gzGzXLOZmaJnq29kJHFjii1cZ8= Received: (qmail 13087 invoked by alias); 7 Aug 2013 11:49: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 13054 invoked by uid 89); 7 Aug 2013 11:49:55 -0000 X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_MED, RDNS_NONE, SPF_PASS, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-User: qpsmtpd, 2 recipients Received: from Unknown (HELO aserp1040.oracle.com) (141.146.126.69) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 07 Aug 2013 11:49:24 +0000 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r77BnFKV028246 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 7 Aug 2013 11:49:16 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r77BnEuV015500 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 7 Aug 2013 11:49:15 GMT Received: from abhmt120.oracle.com (abhmt120.oracle.com [141.146.116.72]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r77BnEdx020693; Wed, 7 Aug 2013 11:49:14 GMT Received: from poldo4.casa (/79.36.197.175) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 07 Aug 2013 04:49:13 -0700 Message-ID: <52023437.3090806@oracle.com> Date: Wed, 07 Aug 2013 13:49:11 +0200 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: libstdc++ Subject: [v3] Fix libstdc++/58098 X-Virus-Found: No Hi, I'm applying this mainline and 4_8-branch. Tested x86_64-linux. Thanks, Paolo. ////////////////////// 2013-08-07 Paolo Carlini PR libstdc++/58098 * include/bits/random.h (cauchy_distribution<>::min, extreme_value_distribution<>::min, normal_distribution<>::min, student_t_distribution<>::min): Fix. * include/ext/random (normal_mv_distribution<>::min): Likewise. * testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc: Adjust. testsuite/26_numerics/random/cauchy_distribution/cons/default.cc: Likewise. * testsuite/26_numerics/random/extreme_value_distribution/cons/ parms.cc: Likewise. testsuite/26_numerics/random/extreme_value_distribution/cons/ default.cc: Likewise. * testsuite/26_numerics/random/normal_distribution/cons/parms.cc: Likewise. * testsuite/26_numerics/random/normal_distribution/cons/default.cc: Likewise. * testsuite/26_numerics/random/student_t_distribution/cons/parms.cc: Likewise. * testsuite/26_numerics/random/student_t_distribution/cons/default.cc: Likewise. * testsuite/ext/random/normal_mv_distribution/cons/parms.cc: Likewise. * testsuite/ext/random/normal_mv_distribution/cons/default.cc: Likewise. * testsuite/26_numerics/random/exponential_distribution/cons/parms.cc: Minor tweak. * testsuite/26_numerics/random/exponential_distribution/cons/default.cc: Likewise. * testsuite/ext/von_mises_distribution/*: Move to... * testsuite/ext/random/von_mises_distribution/*: ... here. * testsuite/ext/triangular_distribution/*: Move to... * testsuite/ext/random/triangular_distribution/*: ... here. Index: include/bits/random.h =================================================================== --- include/bits/random.h (revision 201558) +++ include/bits/random.h (working copy) @@ -2178,7 +2178,7 @@ */ result_type min() const - { return std::numeric_limits::min(); } + { return std::numeric_limits::lowest(); } /** * @brief Returns the least upper bound value of the distribution. @@ -3011,7 +3011,7 @@ */ result_type min() const - { return std::numeric_limits::min(); } + { return std::numeric_limits::lowest(); } /** * @brief Returns the least upper bound value of the distribution. @@ -3428,7 +3428,7 @@ */ result_type min() const - { return std::numeric_limits::min(); } + { return std::numeric_limits::lowest(); } /** * @brief Returns the least upper bound value of the distribution. @@ -5136,7 +5136,7 @@ */ result_type min() const - { return std::numeric_limits::min(); } + { return std::numeric_limits::lowest(); } /** * @brief Returns the least upper bound value of the distribution. Index: include/ext/random =================================================================== --- include/ext/random (revision 201558) +++ include/ext/random (working copy) @@ -791,7 +791,7 @@ result_type min() const { result_type __res; - __res.fill(std::numeric_limits<_RealType>::min()); + __res.fill(std::numeric_limits<_RealType>::lowest()); return __res; } /** Index: testsuite/26_numerics/random/cauchy_distribution/cons/default.cc =================================================================== --- testsuite/26_numerics/random/cauchy_distribution/cons/default.cc (revision 201558) +++ testsuite/26_numerics/random/cauchy_distribution/cons/default.cc (working copy) @@ -35,7 +35,7 @@ VERIFY( u.a() == 0.0 ); VERIFY( u.b() == 1.0 ); typedef std::cauchy_distribution<>::result_type result_type; - VERIFY( u.min() == std::numeric_limits::min() ); + VERIFY( u.min() == std::numeric_limits::lowest() ); VERIFY( u.max() == std::numeric_limits::max() ); } Index: testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc =================================================================== --- testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc (revision 201558) +++ testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc (working copy) @@ -35,7 +35,7 @@ VERIFY( u.a() == 5.0 ); VERIFY( u.b() == 2.0 ); typedef std::cauchy_distribution<>::result_type result_type; - VERIFY( u.min() == std::numeric_limits::min() ); + VERIFY( u.min() == std::numeric_limits::lowest() ); VERIFY( u.max() == std::numeric_limits::max() ); } Index: testsuite/26_numerics/random/exponential_distribution/cons/default.cc =================================================================== --- testsuite/26_numerics/random/exponential_distribution/cons/default.cc (revision 201558) +++ testsuite/26_numerics/random/exponential_distribution/cons/default.cc (working copy) @@ -34,7 +34,7 @@ std::exponential_distribution<> u; VERIFY( u.lambda() == 1.0 ); typedef std::exponential_distribution<>::result_type result_type; - VERIFY( u.min() == 0 ); + VERIFY( u.min() == 0.0 ); VERIFY( u.max() == std::numeric_limits::max() ); } Index: testsuite/26_numerics/random/exponential_distribution/cons/parms.cc =================================================================== --- testsuite/26_numerics/random/exponential_distribution/cons/parms.cc (revision 201558) +++ testsuite/26_numerics/random/exponential_distribution/cons/parms.cc (working copy) @@ -34,7 +34,7 @@ std::exponential_distribution<> u(0.5); VERIFY( u.lambda() == 0.5 ); typedef std::exponential_distribution<>::result_type result_type; - VERIFY( u.min() == 0 ); + VERIFY( u.min() == 0.0 ); VERIFY( u.max() == std::numeric_limits::max() ); } Index: testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc =================================================================== --- testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc (revision 201558) +++ testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc (working copy) @@ -35,7 +35,7 @@ VERIFY( u.a() == 0.0 ); VERIFY( u.b() == 1.0 ); typedef std::extreme_value_distribution<>::result_type result_type; - VERIFY( u.min() == std::numeric_limits::min() ); + VERIFY( u.min() == std::numeric_limits::lowest() ); VERIFY( u.max() == std::numeric_limits::max() ); } Index: testsuite/26_numerics/random/extreme_value_distribution/cons/parms.cc =================================================================== --- testsuite/26_numerics/random/extreme_value_distribution/cons/parms.cc (revision 201558) +++ testsuite/26_numerics/random/extreme_value_distribution/cons/parms.cc (working copy) @@ -35,7 +35,7 @@ VERIFY( u.a() == 5.0 ); VERIFY( u.b() == 2.0 ); typedef std::extreme_value_distribution<>::result_type result_type; - VERIFY( u.min() == std::numeric_limits::min() ); + VERIFY( u.min() == std::numeric_limits::lowest() ); VERIFY( u.max() == std::numeric_limits::max() ); } Index: testsuite/26_numerics/random/normal_distribution/cons/default.cc =================================================================== --- testsuite/26_numerics/random/normal_distribution/cons/default.cc (revision 201558) +++ testsuite/26_numerics/random/normal_distribution/cons/default.cc (working copy) @@ -35,7 +35,7 @@ VERIFY( u.mean() == 0.0 ); VERIFY( u.stddev() == 1.0 ); typedef std::normal_distribution<>::result_type result_type; - VERIFY( u.min() == std::numeric_limits::min() ); + VERIFY( u.min() == std::numeric_limits::lowest() ); VERIFY( u.max() == std::numeric_limits::max() ); } Index: testsuite/26_numerics/random/normal_distribution/cons/parms.cc =================================================================== --- testsuite/26_numerics/random/normal_distribution/cons/parms.cc (revision 201558) +++ testsuite/26_numerics/random/normal_distribution/cons/parms.cc (working copy) @@ -35,7 +35,7 @@ VERIFY( u.mean() == 5.0 ); VERIFY( u.stddev() == 2.0 ); typedef std::normal_distribution<>::result_type result_type; - VERIFY( u.min() == std::numeric_limits::min() ); + VERIFY( u.min() == std::numeric_limits::lowest() ); VERIFY( u.max() == std::numeric_limits::max() ); } Index: testsuite/26_numerics/random/student_t_distribution/cons/default.cc =================================================================== --- testsuite/26_numerics/random/student_t_distribution/cons/default.cc (revision 201558) +++ testsuite/26_numerics/random/student_t_distribution/cons/default.cc (working copy) @@ -34,7 +34,7 @@ std::student_t_distribution<> u; VERIFY( u.n() == 1.0 ); typedef std::student_t_distribution<>::result_type result_type; - VERIFY( u.min() == std::numeric_limits::min() ); + VERIFY( u.min() == std::numeric_limits::lowest() ); VERIFY( u.max() == std::numeric_limits::max() ); } Index: testsuite/26_numerics/random/student_t_distribution/cons/parms.cc =================================================================== --- testsuite/26_numerics/random/student_t_distribution/cons/parms.cc (revision 201558) +++ testsuite/26_numerics/random/student_t_distribution/cons/parms.cc (working copy) @@ -34,7 +34,7 @@ std::student_t_distribution<> u(1.5); VERIFY( u.n() == 1.5 ); typedef std::student_t_distribution<>::result_type result_type; - VERIFY( u.min() == std::numeric_limits::min() ); + VERIFY( u.min() == std::numeric_limits::lowest() ); VERIFY( u.max() == std::numeric_limits::max() ); } Index: testsuite/ext/random/normal_mv_distribution/cons/default.cc =================================================================== --- testsuite/ext/random/normal_mv_distribution/cons/default.cc (revision 201558) +++ testsuite/ext/random/normal_mv_distribution/cons/default.cc (working copy) @@ -36,9 +36,9 @@ VERIFY( u.varcov()[1] == 0.0 ); VERIFY( u.varcov()[2] == 1.0 ); typedef __gnu_cxx::normal_mv_distribution<2>::result_type result_type; - VERIFY( u.min()[0] == std::numeric_limits::min() ); + VERIFY( u.min()[0] == std::numeric_limits::lowest() ); VERIFY( u.max()[0] == std::numeric_limits::max() ); - VERIFY( u.min()[1] == std::numeric_limits::min() ); + VERIFY( u.min()[1] == std::numeric_limits::lowest() ); VERIFY( u.max()[1] == std::numeric_limits::max() ); } Index: testsuite/ext/random/normal_mv_distribution/cons/parms.cc =================================================================== --- testsuite/ext/random/normal_mv_distribution/cons/parms.cc (revision 201558) +++ testsuite/ext/random/normal_mv_distribution/cons/parms.cc (working copy) @@ -36,9 +36,9 @@ VERIFY( u.varcov()[1] == 0.0 ); VERIFY( u.varcov()[2] == 3.0 ); typedef __gnu_cxx::normal_mv_distribution<2>::result_type result_type; - VERIFY( u.min()[0] == std::numeric_limits::min() ); + VERIFY( u.min()[0] == std::numeric_limits::lowest() ); VERIFY( u.max()[0] == std::numeric_limits::max() ); - VERIFY( u.min()[1] == std::numeric_limits::min() ); + VERIFY( u.min()[1] == std::numeric_limits::lowest() ); VERIFY( u.max()[1] == std::numeric_limits::max() ); } Index: testsuite/ext/triangular_distribution/cons/default.cc =================================================================== --- testsuite/ext/triangular_distribution/cons/default.cc (revision 201558) +++ testsuite/ext/triangular_distribution/cons/default.cc (working copy) @@ -1,44 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 -// . - -#include -#include - -void -test01() -{ - bool test __attribute__((unused)) = true; - - __gnu_cxx::triangular_distribution<> u; - VERIFY( u.a() == 0.0 ); - VERIFY( u.b() == 0.5 ); - VERIFY( u.c() == 1.0 ); - VERIFY( u.min() == 0.0 ); - VERIFY( u.max() == 1.0 ); -} - -int main() -{ - test01(); - return 0; -} Index: testsuite/ext/triangular_distribution/cons/parms.cc =================================================================== --- testsuite/ext/triangular_distribution/cons/parms.cc (revision 201558) +++ testsuite/ext/triangular_distribution/cons/parms.cc (working copy) @@ -1,44 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 -// . - -#include -#include - -void -test01() -{ - bool test __attribute__((unused)) = true; - - __gnu_cxx::triangular_distribution<> u(1.5, 3.0, 3.5); - VERIFY( u.a() == 1.5 ); - VERIFY( u.b() == 3.0 ); - VERIFY( u.c() == 3.5 ); - VERIFY( u.min() == 1.5 ); - VERIFY( u.max() == 3.5 ); -} - -int main() -{ - test01(); - return 0; -} Index: testsuite/ext/triangular_distribution/operators/equal.cc =================================================================== --- testsuite/ext/triangular_distribution/operators/equal.cc (revision 201558) +++ testsuite/ext/triangular_distribution/operators/equal.cc (working copy) @@ -1,42 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2010-03-16 Paolo Carlini -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 -// . - -#include -#include - -void -test01() -{ - bool test __attribute__((unused)) = true; - - __gnu_cxx::triangular_distribution u(1.5, 3.0, 4.0), v, w; - - VERIFY( v == w ); - VERIFY( !(u == v) ); -} - -int main() -{ - test01(); - return 0; -} Index: testsuite/ext/triangular_distribution/operators/inequal.cc =================================================================== --- testsuite/ext/triangular_distribution/operators/inequal.cc (revision 201558) +++ testsuite/ext/triangular_distribution/operators/inequal.cc (working copy) @@ -1,42 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2010-03-16 Paolo Carlini -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 -// . - -#include -#include - -void -test01() -{ - bool test __attribute__((unused)) = true; - - __gnu_cxx::triangular_distribution u(1.5, 3.0, 5.0), v, w; - - VERIFY( u != v ); - VERIFY( !(v != w) ); -} - -int main() -{ - test01(); - return 0; -} Index: testsuite/ext/triangular_distribution/operators/serialize.cc =================================================================== --- testsuite/ext/triangular_distribution/operators/serialize.cc (revision 201558) +++ testsuite/ext/triangular_distribution/operators/serialize.cc (working copy) @@ -1,44 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2009-08-14 Edward M. Smith-Rowland <3dw4rd@verizon.net> -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 -// . - -#include -#include - -void -test01() -{ - std::stringstream str; - __gnu_cxx::triangular_distribution u(1.5, 3.0, 4.5), v; - std::minstd_rand0 rng; - - u(rng); // advance - str << u; - - str >> v; -} - -int main() -{ - test01(); - return 0; -} Index: testsuite/ext/triangular_distribution/requirements/explicit_instantiation/1.cc =================================================================== --- testsuite/ext/triangular_distribution/requirements/explicit_instantiation/1.cc (revision 201558) +++ testsuite/ext/triangular_distribution/requirements/explicit_instantiation/1.cc (working copy) @@ -1,26 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=c++11" } -// { dg-require-cstdint "" } -// -// Copyright (C) 2013 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 -// . - -#include - -template class __gnu_cxx::triangular_distribution; -template class __gnu_cxx::triangular_distribution; -template class __gnu_cxx::triangular_distribution; Index: testsuite/ext/triangular_distribution/requirements/typedefs.cc =================================================================== --- testsuite/ext/triangular_distribution/requirements/typedefs.cc (revision 201558) +++ testsuite/ext/triangular_distribution/requirements/typedefs.cc (working copy) @@ -1,34 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 -// . - -#include - -void -test01() -{ - typedef __gnu_cxx::triangular_distribution test_type; - - typedef test_type::result_type result_type; - typedef test_type::param_type param_type; -} Index: testsuite/ext/von_mises_distribution/cons/default.cc =================================================================== --- testsuite/ext/von_mises_distribution/cons/default.cc (revision 201558) +++ testsuite/ext/von_mises_distribution/cons/default.cc (working copy) @@ -1,43 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 -// . - -#include -#include - -void -test01() -{ - bool test __attribute__((unused)) = true; - - __gnu_cxx::von_mises_distribution<> u; - VERIFY( u.mu() == 0.0 ); - VERIFY( u.kappa() == 1.0 ); - VERIFY( u.min() == -__gnu_cxx::__math_constants::__pi ); - VERIFY( u.max() == __gnu_cxx::__math_constants::__pi ); -} - -int main() -{ - test01(); - return 0; -} Index: testsuite/ext/von_mises_distribution/cons/parms.cc =================================================================== --- testsuite/ext/von_mises_distribution/cons/parms.cc (revision 201558) +++ testsuite/ext/von_mises_distribution/cons/parms.cc (working copy) @@ -1,43 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 -// . - -#include -#include - -void -test01() -{ - bool test __attribute__((unused)) = true; - - __gnu_cxx::von_mises_distribution<> u(1.5, 3.0); - VERIFY( u.mu() == 1.5 ); - VERIFY( u.kappa() == 3.0 ); - VERIFY( u.min() == -__gnu_cxx::__math_constants::__pi ); - VERIFY( u.max() == __gnu_cxx::__math_constants::__pi ); -} - -int main() -{ - test01(); - return 0; -} Index: testsuite/ext/von_mises_distribution/operators/equal.cc =================================================================== --- testsuite/ext/von_mises_distribution/operators/equal.cc (revision 201558) +++ testsuite/ext/von_mises_distribution/operators/equal.cc (working copy) @@ -1,42 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2010-03-16 Paolo Carlini -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 -// . - -#include -#include - -void -test01() -{ - bool test __attribute__((unused)) = true; - - __gnu_cxx::von_mises_distribution u(1.5, 3.0), v, w; - - VERIFY( v == w ); - VERIFY( !(u == v) ); -} - -int main() -{ - test01(); - return 0; -} Index: testsuite/ext/von_mises_distribution/operators/inequal.cc =================================================================== --- testsuite/ext/von_mises_distribution/operators/inequal.cc (revision 201558) +++ testsuite/ext/von_mises_distribution/operators/inequal.cc (working copy) @@ -1,42 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2010-03-16 Paolo Carlini -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 -// . - -#include -#include - -void -test01() -{ - bool test __attribute__((unused)) = true; - - __gnu_cxx::von_mises_distribution u(1.5, 3.0), v, w; - - VERIFY( u != v ); - VERIFY( !(v != w) ); -} - -int main() -{ - test01(); - return 0; -} Index: testsuite/ext/von_mises_distribution/operators/serialize.cc =================================================================== --- testsuite/ext/von_mises_distribution/operators/serialize.cc (revision 201558) +++ testsuite/ext/von_mises_distribution/operators/serialize.cc (working copy) @@ -1,44 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2009-08-14 Edward M. Smith-Rowland <3dw4rd@verizon.net> -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 -// . - -#include -#include - -void -test01() -{ - std::stringstream str; - __gnu_cxx::von_mises_distribution u(1.5, 3.0), v; - std::minstd_rand0 rng; - - u(rng); // advance - str << u; - - str >> v; -} - -int main() -{ - test01(); - return 0; -} Index: testsuite/ext/von_mises_distribution/requirements/explicit_instantiation/1.cc =================================================================== --- testsuite/ext/von_mises_distribution/requirements/explicit_instantiation/1.cc (revision 201558) +++ testsuite/ext/von_mises_distribution/requirements/explicit_instantiation/1.cc (working copy) @@ -1,26 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=c++11" } -// { dg-require-cstdint "" } -// -// Copyright (C) 2013 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 -// . - -#include - -template class __gnu_cxx::von_mises_distribution; -template class __gnu_cxx::von_mises_distribution; -template class __gnu_cxx::von_mises_distribution; Index: testsuite/ext/von_mises_distribution/requirements/typedefs.cc =================================================================== --- testsuite/ext/von_mises_distribution/requirements/typedefs.cc (revision 201558) +++ testsuite/ext/von_mises_distribution/requirements/typedefs.cc (working copy) @@ -1,34 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 -// . - -#include - -void -test01() -{ - typedef __gnu_cxx::von_mises_distribution test_type; - - typedef test_type::result_type result_type; - typedef test_type::param_type param_type; -}