aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r--gcc/cp/init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 957a7a4..a4fc9ff 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -625,6 +625,9 @@ perform_member_init (tree member, tree init)
&& TREE_CHAIN (init) == NULL_TREE)
{
tree val = TREE_VALUE (init);
+ /* Handle references. */
+ if (REFERENCE_REF_P (val))
+ val = TREE_OPERAND (val, 0);
if (TREE_CODE (val) == COMPONENT_REF && TREE_OPERAND (val, 1) == member
&& TREE_OPERAND (val, 0) == current_class_ref)
warning_at (DECL_SOURCE_LOCATION (current_function_decl),