]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR c++/67164 - clean up dead code
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Jul 2016 05:06:52 +0000 (05:06 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Jul 2016 05:06:52 +0000 (05:06 +0000)
* pt.c (iterative_hash_template_arg, template_args_equal): Don't
handle ARGUMENT_PACK_SELECT.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238507 138bc75d-0d04-0410-961f-82ee72b054a4

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

index c88b98cbf1b0ab1617f29d01e2239c6daf61df3e..417cb82b3ee9683e63852d3421dfbc14311266c2 100644 (file)
@@ -1,3 +1,9 @@
+2016-07-19  Jason Merrill  <jason@redhat.com>
+
+       PR c++/67164
+       * pt.c (iterative_hash_template_arg, template_args_equal): Don't
+       handle ARGUMENT_PACK_SELECT.
+
 2016-07-18  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/70869
index 916fd7b47c491673a2b61f82cd2ec9b85b48008c..7c7024c00461639fdd742a9122aeb68c615eb45c 100644 (file)
@@ -1704,9 +1704,7 @@ iterative_hash_template_arg (tree arg, hashval_t val)
     STRIP_NOPS (arg);
 
   if (TREE_CODE (arg) == ARGUMENT_PACK_SELECT)
-    /* We can get one of these when re-hashing a previous entry in the middle
-       of substituting into a pack expansion.  Just look through it.  */
-    arg = ARGUMENT_PACK_SELECT_FROM_PACK (arg);
+    gcc_unreachable ();
 
   code = TREE_CODE (arg);
   tclass = TREE_CODE_CLASS (code);
@@ -7894,17 +7892,7 @@ template_args_equal (tree ot, tree nt)
       return 1;
     }
   else if (ot && TREE_CODE (ot) == ARGUMENT_PACK_SELECT)
-    {
-      /* We get here probably because we are in the middle of substituting
-         into the pattern of a pack expansion. In that case the
-        ARGUMENT_PACK_SELECT temporarily replaces the pack argument we are
-        interested in. So we want to use the initial pack argument for
-        the comparison.  */
-      ot = ARGUMENT_PACK_SELECT_FROM_PACK (ot);
-      if (nt && TREE_CODE (nt) == ARGUMENT_PACK_SELECT)
-       nt = ARGUMENT_PACK_SELECT_FROM_PACK (nt);
-      return template_args_equal (ot, nt);
-    }
+    gcc_unreachable ();
   else if (TYPE_P (nt))
     {
       if (!TYPE_P (ot))