aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@gcc.gnu.org>2015-12-22 17:49:21 +0000
committerPatrick Palka <ppalka@gcc.gnu.org>2015-12-22 17:49:21 +0000
commit6be028226ea467f1ddd4dc0aeadd6935c614cea0 (patch)
tree8cb91d48b7d571da64cc4a675833c291557a4e3c /gcc
parentaf9345d7df615812a078bb942cadd4c317c3e3de (diff)
downloadgcc-6be028226ea467f1ddd4dc0aeadd6935c614cea0.zip
gcc-6be028226ea467f1ddd4dc0aeadd6935c614cea0.tar.gz
gcc-6be028226ea467f1ddd4dc0aeadd6935c614cea0.tar.bz2
Fix read of uninitialized value in make_pack_expansion()
gcc/cp/ChangeLog: * pt.c (make_pack_expansion): Make sure to initialize ppd.type_pack_expansion_p. From-SVN: r231904
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index bba3973..1d4714a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-22 Patrick Palka <ppalka@gcc.gnu.org>
+
+ * pt.c (make_pack_expansion): Make sure to initialize
+ ppd.type_pack_expansion_p.
+
2015-12-21 David Malcolm <dmalcolm@redhat.com>
* typeck.c (cp_build_binary_op): Update for change in signature
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 209e65f..dab15bd 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -3637,6 +3637,8 @@ make_pack_expansion (tree arg)
class expansion. */
ppd.visited = new hash_set<tree>;
ppd.parameter_packs = &parameter_packs;
+ ppd.type_pack_expansion_p = true;
+ gcc_assert (TYPE_P (TREE_PURPOSE (arg)));
cp_walk_tree (&TREE_PURPOSE (arg), &find_parameter_packs_r,
&ppd, ppd.visited);