https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107065
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Even GCC 4.8 rejects #c4, so doesn't look like a regression.
We deduce bool& in the first decltype: finish_decltype_type gets a VAR_DECL 'b'
(that's wrong I think), id_expression_or_member_access_p is false (that is
correct). lvalue_kind then of course reports that the VAR_DECL is an ordinary
lvalue, and we deduce to bool&, just like it were decltype((b)). So the
problem must be that we strip both NEGATE_EXPRs.