Commit c5c8755a by Jason Merrill Committed by Jason Merrill

re PR c++/52596 ([C++11] internal compiler error: in lvalue_kind, at cp/tree.c:153)

	PR c++/52596
	* semantics.c (finish_non_static_data_member): In templates, pass
	the decl to build_qualified_name.
	* tree.c (lvalue_kind) [SCOPE_REF]: Handle FIELD_DECL.

From-SVN: r186187
parent b258592a
2012-04-05 Jason Merrill <jason@redhat.com>
PR c++/52596
* semantics.c (finish_non_static_data_member): In templates, pass
the decl to build_qualified_name.
* tree.c (lvalue_kind) [SCOPE_REF]: Handle FIELD_DECL.
2012-04-04 Jason Merrill <jason@redhat.com>
PR c++/52845
......
......@@ -1590,7 +1590,7 @@ finish_non_static_data_member (tree decl, tree object, tree qualifying_scope)
else if (processing_template_decl)
return build_qualified_name (TREE_TYPE (decl),
qualifying_scope,
DECL_NAME (decl),
decl,
/*template_p=*/false);
else
{
......
......@@ -151,8 +151,14 @@ lvalue_kind (const_tree ref)
/* A scope ref in a template, left as SCOPE_REF to support later
access checking. */
case SCOPE_REF:
gcc_assert (!type_dependent_expression_p (CONST_CAST_TREE(ref)));
return lvalue_kind (TREE_OPERAND (ref, 1));
gcc_assert (!type_dependent_expression_p (CONST_CAST_TREE (ref)));
{
tree op = TREE_OPERAND (ref, 1);
if (TREE_CODE (op) == FIELD_DECL)
return (DECL_C_BIT_FIELD (op) ? clk_bitfield : clk_ordinary);
else
return lvalue_kind (op);
}
case MAX_EXPR:
case MIN_EXPR:
......
2012-04-05 Jason Merrill <jason@redhat.com>
PR c++/52596
* g++.dg/template/qualified-id5.C: New.
2012-04-05 Uros Bizjak <ubizjak@gmail.com>
PR target/52882
......
// PR c++/52596
struct msgpack_zone_finalizer_array {
int* tail;
};
struct msgpack_zone {
msgpack_zone_finalizer_array finalizer_array;
};
struct zone : public msgpack_zone {
template <typename T> T* allocate();
};
template <typename T>
T* zone::allocate()
{
--msgpack_zone::finalizer_array.tail;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment