Index: cp/init.c =================================================================== --- cp/init.c (revision 222561) +++ cp/init.c (working copy) @@ -625,6 +625,9 @@ perform_member_init (tree member, tree init) && TREE_CHAIN (init) == NULL_TREE) { tree val = TREE_VALUE (init); + /* Handle references. */ + if (TREE_CODE (val) == INDIRECT_REF) + 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), Index: testsuite/g++.dg/warn/Winit-self-3.C =================================================================== --- testsuite/g++.dg/warn/Winit-self-3.C (revision 0) +++ testsuite/g++.dg/warn/Winit-self-3.C (working copy) @@ -0,0 +1,26 @@ +// PR c++/64667 +// { dg-options "-Winit-self" } + +class A +{ +public: + A(const A&) : a(a) {} // { dg-warning "initialized with itself" } +private: + int a; +}; + +class B +{ +public: + B(const B&) : b(b) {} // { dg-warning "initialized with itself" } +private: + int* b; +}; + +class C +{ +public: + C(const C&) : c(c) {} // { dg-warning "initialized with itself" } +private: + int& c; +};