From 6be028226ea467f1ddd4dc0aeadd6935c614cea0 Mon Sep 17 00:00:00 2001 From: Patrick Palka Date: Tue, 22 Dec 2015 17:49:21 +0000 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/pt.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index bba3973a095..1d4714ac65b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2015-12-22 Patrick Palka + + * pt.c (make_pack_expansion): Make sure to initialize + ppd.type_pack_expansion_p. + 2015-12-21 David Malcolm * typeck.c (cp_build_binary_op): Update for change in signature diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 209e65f23b6..dab15bdad17 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; ppd.parameter_packs = ¶meter_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); -- 2.30.2