From patchwork Tue Sep 3 10:22:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 272193 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 "www.sourceware.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 2048C2C0085 for ; Tue, 3 Sep 2013 20:22:31 +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=C5k1z94NsAxx1d/Roc3K+9GV5r67Qp3s054D4tY5vFc 5qR5Ez3psXoVasVCxDiwgleYVdZy62hOLKm7+5iDAKOQdbryUtXNphhKtkcArvrC vfpQGidHrvWBwfFLDW5XA8+9Bo1PZTwlM/X2lK90lGz5Wlh5VA20/P81IfMU5D34 = 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=6Ffj0hHCh0f/CZ4EmOQEOXvd/wU=; b=XWdf6xbt+aFiL/uI7 4J5y4pNVeF1a1326GrSuNzJjypDSoVz1ereyo32X0Bnd3dU7R/7hRTCzVgXHlTQy fh7Hi2BtbfLGHCH6TnSFfULdRj+siWt8FVgn5d3uvENZrP6KHBQB8vXhq3pRC7/Y xgnpmBhHMH8dH+TVIDfzENUk5w= Received: (qmail 12090 invoked by alias); 3 Sep 2013 10:22:14 -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 12073 invoked by uid 89); 3 Sep 2013 10:22:14 -0000 Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 03 Sep 2013 10:22:14 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-7.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL, RP_MATCHES_RCVD, SPF_PASS, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: userp1040.oracle.com Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r83AMATj012031 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 3 Sep 2013 10:22:11 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r83AMArR026302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 3 Sep 2013 10:22:10 GMT Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r83AM9G6026290; Tue, 3 Sep 2013 10:22:09 GMT Received: from poldo4.casa (/79.36.29.65) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 03 Sep 2013 03:22:09 -0700 Message-ID: <5225B84F.90504@oracle.com> Date: Tue, 03 Sep 2013 12:22:07 +0200 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: libstdc++ Subject: [v3] libstdc++/58302 X-IsSubscribed: yes Hi, a very stupid typo. Tested x86_64-linux, fixed in the active branches. Thanks, Paolo. ////////////////////// 2013-09-03 Paolo Carlini PR libstdc++/58302 * include/bits/random.tcc (negative_binomial_distribution<>:: operator()(_UniformRandomNumberGenerator&, const param_type&): Fix typo in template argument. * testsuite/26_numerics/random/negative_binomial_distribution/ operators/58302.cc: New. Index: include/bits/random.tcc =================================================================== --- include/bits/random.tcc (revision 202199) +++ include/bits/random.tcc (working copy) @@ -1291,7 +1291,7 @@ operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p) { - typedef typename std::gamma_distribution::param_type + typedef typename std::gamma_distribution::param_type param_type; const double __y = Index: testsuite/26_numerics/random/negative_binomial_distribution/operators/58302.cc =================================================================== --- testsuite/26_numerics/random/negative_binomial_distribution/operators/58302.cc (revision 0) +++ testsuite/26_numerics/random/negative_binomial_distribution/operators/58302.cc (working copy) @@ -0,0 +1,34 @@ +// { dg-do compile } +// { dg-options "-std=gnu++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 + +void test01() +{ + typedef std::negative_binomial_distribution<> dist_type; + + std::default_random_engine engine; + + dist_type dist; + dist_type::param_type param(3, 0.5); + + dist(engine, param); // compile error! +}