public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Marek Polacek <polacek@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: PATCH for base_pool_allocator (PR other/81667)
Date: Wed, 02 Aug 2017 12:53:00 -0000	[thread overview]
Message-ID: <CAFiYyc0fU0cRiPsNKp+TokY1xezgP6WTtSrwsyE0URAGxUgrCg@mail.gmail.com> (raw)
In-Reply-To: <20170802124546.GX3397@redhat.com>

On Wed, Aug 2, 2017 at 2:45 PM, Marek Polacek <polacek@redhat.com> wrote:
> 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?

Ok.

Richard.

> 2017-08-02  Marek Polacek  <polacek@redhat.com>
>
>         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 <TBlockAllocator>::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

      reply	other threads:[~2017-08-02 12:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-02 12:45 Marek Polacek
2017-08-02 12:53 ` Richard Biener [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFiYyc0fU0cRiPsNKp+TokY1xezgP6WTtSrwsyE0URAGxUgrCg@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=polacek@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).