https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117969
Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpolacek at gcc dot gnu.org Last reconfirmed| |2024-12-09 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Confirmed, started with r7-2529-g23f4e590fb4ce7: commit 23f4e590fb4ce718e58cd736c19d7e6959429500 Author: Jason Merrill <ja...@redhat.com> Date: Tue Aug 9 10:08:33 2016 -0400 PR c++/56701 - wrong type of &*this * typeck.c (cp_build_addr_expr_1): Remove special *this handling. From-SVN: r239285 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -5626,11 +5626,6 @@ cp_build_addr_expr_1 (tree arg, bool strict_lvalue, tsubst_flags_t complain) /* Let &* cancel out to simplify resulting code. */ if (INDIRECT_REF_P (arg)) { - /* We don't need to have `current_class_ptr' wrapped in a - NON_LVALUE_EXPR node. */ - if (arg == current_class_ref) - return current_class_ptr; - arg = TREE_OPERAND (arg, 0); if (TREE_CODE (TREE_TYPE (arg)) == REFERENCE_TYPE) {