re PR c++/12573 (ICE (segfault) with Boost.Python)

PR c++/12573
	* pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
	looking into them recursively.

From-SVN: r74172
This commit is contained in:
Giovanni Bajo 2003-12-02 12:02:21 +00:00
parent 7e7c843fc7
commit 27408a3c02
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/12573
* pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
looking into them recursively.
2003-12-02 Richard Henderson <rth@redhat.com>
* name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.

View File

@ -11713,6 +11713,9 @@ value_dependent_expression_p (tree expression)
}
if (TREE_CODE (expression) == SCOPE_REF)
return dependent_scope_ref_p (expression, value_dependent_expression_p);
if (TREE_CODE (expression) == COMPONENT_REF)
return (value_dependent_expression_p (TREE_OPERAND (expression, 0))
|| value_dependent_expression_p (TREE_OPERAND (expression, 1)));
/* A constant expression is value-dependent if any subexpression is
value-dependent. */
if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (expression))))