From patchwork Tue Nov 20 14:58:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 200367 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]) by ozlabs.org (Postfix) with SMTP id F2A6A2C0089 for ; Wed, 21 Nov 2012 01:59:24 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1354028365; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Message-ID:Date:From:User-Agent:MIME-Version: To:CC:Subject:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=06ILxyY713PtCQGDAq8X3lCwsJU=; b=QxseN8ZVedZOEof /4PvvNMcMnD9AJW020EZUvDEnbZh8DXq0PaTnK0K7wmhrg1rGkuu7L+p+5jMBdIQ jcCVCL+KpDlgbZAFui+Hjo01Fh6vC67jhfjlH6PLdpD51S0FpXtf1ohFSGRuDxr7 b3eTprA4IFQBRBl82QdBHXFwFuME= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=yrszgGVZNR8KSOdan6NIb3T5uHi2YiQA4PLRp9cCaA6Un2dH+h/Dpg8IRT/gMm m0K1yKYgGbUlDykRIKepqsCoKGiN5eD3pjrlDu68ElKQPO8fB70aJEQiQEsrpXEt wCoZ9wAjMVqnP+wy1W+dqrmTYpQ6IkEBIWuVEFVSFSFz4=; Received: (qmail 2089 invoked by alias); 20 Nov 2012 14:59:08 -0000 Received: (qmail 2046 invoked by uid 22791); 20 Nov 2012 14:59:08 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_HOSTKARMA_NO, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Nov 2012 14:59:01 +0000 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id qAKEwxiZ000795 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 20 Nov 2012 14:59:00 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id qAKEwwGq007958 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Nov 2012 14:58:59 GMT Received: from abhmt110.oracle.com (abhmt110.oracle.com [141.146.116.62]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id qAKEwwm4010999; Tue, 20 Nov 2012 08:58:58 -0600 Received: from [192.168.1.4] (/79.53.235.175) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 20 Nov 2012 06:58:58 -0800 Message-ID: <50AB9AB0.7020408@oracle.com> Date: Tue, 20 Nov 2012 15:58:56 +0100 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: libstdc++ Subject: [v3] libstdc++/55413 X-IsSubscribed: yes 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 Hi, tested x86_64-linux, committed mainline and 4_7-branch. Thanks, Paolo. //////////////////////// 2012-11-20 Paolo Carlini PR libstdc++/55413 * include/bits/hashtable.h (_Hashtable<>::_M_rehash_aux): Initialize __bbegin_bkt and __prev_bkt to avoid uninitialized warnings. * testsuite/23_containers/unordered_set/instantiation_neg.cc: Adjust dg-error line number. Index: include/bits/hashtable.h =================================================================== --- include/bits/hashtable.h (revision 193662) +++ include/bits/hashtable.h (working copy) @@ -1,7 +1,6 @@ // hashtable.h header -*- C++ -*- -// Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 -// Free Software Foundation, Inc. +// Copyright (C) 2007-2012 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 @@ -1679,7 +1678,7 @@ __bucket_type* __new_buckets = _M_allocate_buckets(__n); __node_type* __p = _M_begin(); _M_before_begin()._M_nxt = nullptr; - std::size_t __bbegin_bkt; + std::size_t __bbegin_bkt = 0; while (__p) { __node_type* __next = __p->_M_next(); @@ -1720,8 +1719,8 @@ __node_type* __p = _M_begin(); _M_before_begin()._M_nxt = nullptr; - std::size_t __bbegin_bkt; - std::size_t __prev_bkt; + std::size_t __bbegin_bkt = 0; + std::size_t __prev_bkt = 0; __node_type* __prev_p = nullptr; bool __check_bucket = false; @@ -1749,8 +1748,8 @@ { if (__check_bucket) { - // Check if we shall update the next bucket because of insertions - // into __prev_bkt bucket. + // Check if we shall update the next bucket because of + // insertions into __prev_bkt bucket. if (__prev_p->_M_nxt) { std::size_t __next_bkt Index: testsuite/23_containers/unordered_set/instantiation_neg.cc =================================================================== --- testsuite/23_containers/unordered_set/instantiation_neg.cc (revision 193652) +++ testsuite/23_containers/unordered_set/instantiation_neg.cc (working copy) @@ -19,7 +19,7 @@ // with this library; see the file COPYING3. If not see // . -// { dg-error "with noexcept" "" { target *-*-* } 248 } +// { dg-error "with noexcept" "" { target *-*-* } 247 } #include