aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2015-06-05 15:13:56 -0400
committerJason Merrill <jason@gcc.gnu.org>2015-06-05 15:13:56 -0400
commit85d9a299152839de26b0f18b6755334a8f90592e (patch)
treecec126e0bb3f0fa1ab717351d8cfdd02649d7cfa
parentd7438551ff5ffa0afeca2aa3efd13035b26bee34 (diff)
downloadgcc-85d9a299152839de26b0f18b6755334a8f90592e.zip
gcc-85d9a299152839de26b0f18b6755334a8f90592e.tar.gz
gcc-85d9a299152839de26b0f18b6755334a8f90592e.tar.bz2
re PR c++/66405 (ICE: in tsubst, at cp/pt.c:11984)
PR c++/66405 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is dependent even if it has a type. From-SVN: r224162
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/pt.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index bb59bcc..e9a78b3 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-05 Jason Merrill <jason@redhat.com>
+
+ PR c++/66405
+ * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
+ dependent even if it has a type.
+
2015-06-05 Aldy Hernandez <aldyh@redhat.com>
* cp-objcp-common.c: Adjust comment for
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index ec33d96..87b35fa 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -21442,6 +21442,10 @@ type_dependent_expression_p (tree expression)
&& variable_template_p (DECL_TI_TEMPLATE (expression)))
return any_dependent_template_arguments_p (DECL_TI_ARGS (expression));
+ /* Always dependent, on the number of arguments if nothing else. */
+ if (TREE_CODE (expression) == EXPR_PACK_EXPANSION)
+ return true;
+
if (TREE_TYPE (expression) == unknown_type_node)
{
if (TREE_CODE (expression) == ADDR_EXPR)
@@ -21459,10 +21463,6 @@ type_dependent_expression_p (tree expression)
if (TREE_CODE (expression) == SCOPE_REF)
return false;
- /* Always dependent, on the number of arguments if nothing else. */
- if (TREE_CODE (expression) == EXPR_PACK_EXPANSION)
- return true;
-
if (BASELINK_P (expression))
{
if (BASELINK_OPTYPE (expression)