From 755afe2e51be1cae4d92b3bd3da93ea2a20fbb90 Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Tue, 2 Jun 2015 16:10:17 +0200
Subject: [PATCH] Pool allocator fallout: fix uninialized class members.

	* alloc-pool.h (pool_allocator::pool_allocator): Set implicit
	values to avoid -Wmaybe-uninitialized errors.

From-SVN: r224030
---
 gcc/ChangeLog    | 5 +++++
 gcc/alloc-pool.h | 7 +++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e22dbb9481e7..d7f1dc73f197 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-02  Martin Liska  <mliska@suse.cz>
+
+	* alloc-pool.h (pool_allocator::pool_allocator): Set implicit
+	values to avoid -Wmaybe-uninitialized errors.
+
 2015-06-02  Richard Biener  <rguenther@suse.de>
 
 	PR debug/65549
diff --git a/gcc/alloc-pool.h b/gcc/alloc-pool.h
index 96a1342b9fa9..ddb2a911df4f 100644
--- a/gcc/alloc-pool.h
+++ b/gcc/alloc-pool.h
@@ -159,11 +159,11 @@ template <typename T>
 inline
 pool_allocator<T>::pool_allocator (const char *name, size_t num,
 				   size_t extra_size, bool ignore_type_size):
-  m_name (name), m_elts_per_block (num), m_returned_free_list (NULL),
+  m_name (name), m_id (0), m_elts_per_block (num), 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_ignore_type_size (ignore_type_size), m_extra_size (extra_size),
-  m_initialized (false) {}
+  m_block_size (0), m_ignore_type_size (ignore_type_size),
+  m_extra_size (extra_size), m_initialized (false) {}
 
 /* Initialize a pool allocator.  */
 
@@ -215,7 +215,6 @@ pool_allocator<T>::initialize ()
 
   m_id = last_id;
 #endif
-
 }
 
 /* Free all memory allocated for the given memory pool.  */
-- 
GitLab