Fix read of uninitialized value in make_pack_expansion()
authorPatrick Palka <ppalka@gcc.gnu.org>
Tue, 22 Dec 2015 17:49:21 +0000 (17:49 +0000)
committerPatrick Palka <ppalka@gcc.gnu.org>
Tue, 22 Dec 2015 17:49:21 +0000 (17:49 +0000)
gcc/cp/ChangeLog:

* pt.c (make_pack_expansion): Make sure to initialize
ppd.type_pack_expansion_p.

From-SVN: r231904

gcc/cp/ChangeLog
gcc/cp/pt.c

index bba3973a0958165b2aa5e0c3f09b98eb3b80e4ad..1d4714ac65b27161daaf936d996dcf5e7a9bef22 100644 (file)
@@ -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
index 209e65f23b6ccd99fbd0a50014910898bd295f9a..dab15bdad17b21fff75c72bb45128a9ae45e81e4 100644 (file)
@@ -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);