From: Jason Merrill Date: Fri, 5 Jun 2015 19:13:56 +0000 (-0400) Subject: re PR c++/66405 (ICE: in tsubst, at cp/pt.c:11984) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=85d9a299152839de26b0f18b6755334a8f90592e;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index bb59bcc70fc..e9a78b3ccb6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2015-06-05 Jason Merrill + + 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 * cp-objcp-common.c: Adjust comment for diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index ec33d96fc6f..87b35fa99de 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)