From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124912 invoked by alias); 2 Aug 2017 12:45:55 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 120394 invoked by uid 89); 2 Aug 2017 12:45:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= 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 ESMTP; Wed, 02 Aug 2017 12:45:51 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 846A881240 for ; Wed, 2 Aug 2017 12:45:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 846A881240 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=polacek@redhat.com Received: from redhat.com (ovpn-204-38.brq.redhat.com [10.40.204.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E44C717A7B for ; Wed, 2 Aug 2017 12:45:49 +0000 (UTC) Date: Wed, 02 Aug 2017 12:45:00 -0000 From: Marek Polacek To: GCC Patches Subject: PATCH for base_pool_allocator (PR other/81667) Message-ID: <20170802124546.GX3397@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.8.3 (2017-05-23) X-SW-Source: 2017-08/txt/msg00176.txt.bz2 This PR points out that m_elt_size was left uninitialized in the member initializer list for base_pool_allocator. I think it makes sense to initialize it like this. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2017-08-02 Marek Polacek PR other/81667 * alloc-pool.h (base_pool_allocator): Initialize m_elt_size. diff --git gcc/alloc-pool.h gcc/alloc-pool.h index a5236db3dae..1d04e5d2cfe 100644 --- gcc/alloc-pool.h +++ gcc/alloc-pool.h @@ -240,8 +240,9 @@ base_pool_allocator ::base_pool_allocator ( const char *name, size_t size MEM_STAT_DECL): m_name (name), m_id (0), m_elts_per_block (0), m_returned_free_list (NULL), m_virgin_free_list (NULL), m_virgin_elts_remaining (0), m_elts_allocated (0), - m_elts_free (0), m_blocks_allocated (0), m_block_list (NULL), m_size (size), - m_initialized (false), m_location (ALLOC_POOL_ORIGIN, false PASS_MEM_STAT) {} + m_elts_free (0), m_blocks_allocated (0), m_block_list (NULL), m_elt_size (0), + m_size (size), m_initialized (false), + m_location (ALLOC_POOL_ORIGIN, false PASS_MEM_STAT) {} /* Initialize a pool allocator. */ Marek