aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2016-07-20 01:06:52 -0400
committerJason Merrill <jason@gcc.gnu.org>2016-07-20 01:06:52 -0400
commit43694e8bbb002aac45baaf35cc70861c546a1a40 (patch)
treeba5ef5c5526537d41142bef480688fba06895388 /gcc/cp
parent30bfa23492def68e9d6449aa41647f3ef1f183fb (diff)
downloadgcc-43694e8bbb002aac45baaf35cc70861c546a1a40.zip
gcc-43694e8bbb002aac45baaf35cc70861c546a1a40.tar.gz
gcc-43694e8bbb002aac45baaf35cc70861c546a1a40.tar.bz2
PR c++/67164 - clean up dead code
* pt.c (iterative_hash_template_arg, template_args_equal): Don't handle ARGUMENT_PACK_SELECT. From-SVN: r238507
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/pt.c16
2 files changed, 8 insertions, 14 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c88b98c..417cb82 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 916fd7b..7c7024c 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -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))