re PR c++/52596 ([C++11] internal compiler error: in lvalue_kind, at cp/tree.c:153)
PR c++/52596 * tree.c (lvalue_kind): Treat a deferred access control SCOPE_REF as an lvalue. From-SVN: r186188
This commit is contained in:
parent
1d02a30769
commit
6b8fa44f0a
|
@ -1,3 +1,9 @@
|
|||
2012-04-05 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/52596
|
||||
* tree.c (lvalue_kind): Treat a deferred access control SCOPE_REF
|
||||
as an lvalue.
|
||||
|
||||
2012-04-03 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/52796
|
||||
|
|
|
@ -150,8 +150,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));
|
||||
{
|
||||
tree op = TREE_OPERAND (ref, 1);
|
||||
/* The member must be an lvalue; assume it isn't a bit-field. */
|
||||
if (TREE_CODE (op) == IDENTIFIER_NODE)
|
||||
return clk_ordinary;
|
||||
gcc_assert (!type_dependent_expression_p (CONST_CAST_TREE (ref)));
|
||||
return lvalue_kind (op);
|
||||
}
|
||||
|
||||
case MAX_EXPR:
|
||||
case MIN_EXPR:
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2012-04-05 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/52596
|
||||
* g++.dg/template/qualified-id5.C: New.
|
||||
|
||||
2012-04-03 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/52796
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
// 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;
|
||||
}
|
Loading…
Reference in New Issue