PR c++/71576 - bitfield and rvalue reference
* call.c (convert_like_real): Use lvalue_kind. From-SVN: r238683
This commit is contained in:
parent
76178f6767
commit
478ed1fae7
@ -1,5 +1,8 @@
|
|||||||
2016-07-22 Jason Merrill <jason@redhat.com>
|
2016-07-22 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR c++/71576
|
||||||
|
* call.c (convert_like_real): Use lvalue_kind.
|
||||||
|
|
||||||
PR c++/71748
|
PR c++/71748
|
||||||
PR c++/52746
|
PR c++/52746
|
||||||
* pt.c (tsubst_baselink): Call
|
* pt.c (tsubst_baselink): Call
|
||||||
|
@ -6737,7 +6737,7 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
|
|||||||
for a non-reference copy-initialization (8.5). */
|
for a non-reference copy-initialization (8.5). */
|
||||||
|
|
||||||
tree type = TREE_TYPE (ref_type);
|
tree type = TREE_TYPE (ref_type);
|
||||||
cp_lvalue_kind lvalue = real_lvalue_p (expr);
|
cp_lvalue_kind lvalue = lvalue_kind (expr);
|
||||||
|
|
||||||
gcc_assert (same_type_ignoring_top_level_qualifiers_p
|
gcc_assert (same_type_ignoring_top_level_qualifiers_p
|
||||||
(type, next_conversion (convs)->type));
|
(type, next_conversion (convs)->type));
|
||||||
|
14
gcc/testsuite/g++.dg/cpp0x/rv-bitfield3.C
Normal file
14
gcc/testsuite/g++.dg/cpp0x/rv-bitfield3.C
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
// PR c++/71576
|
||||||
|
// { dg-do compile { target c++11 } }
|
||||||
|
|
||||||
|
template < typename T > T && foo ();
|
||||||
|
|
||||||
|
struct A
|
||||||
|
{
|
||||||
|
int i:5;
|
||||||
|
};
|
||||||
|
|
||||||
|
void foo ()
|
||||||
|
{
|
||||||
|
int &&j = foo < A > ().i;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user