From: Giovanni Bajo Date: Thu, 8 Jan 2004 11:52:41 +0000 (+0000) Subject: re PR c++/12573 (ICE (segfault) with Boost.Python) X-Git-Tag: releases/gcc-3.4.0~1197 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d5ddced5629ab28ff3dfbceb1293678c9420afb;p=thirdparty%2Fgcc.git 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. They can be there because of the new __offsetof__ extension. From-SVN: r75546 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 147ca7dc07e6..ef16d19a566e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2004-01-08 Giovanni Bajo + + PR c++/12573 + * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by + looking into them recursively. They can be there because of the + new __offsetof__ extension. + 2004-01-07 Zack Weinberg * parser.c (cp_parser_save_member_function_body): Mark the diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 3c0e7d802137..6b099a1d3ab2 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -11671,6 +11671,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))))