https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109640
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Reduced testcase: ``` struct f{}; int &&ffa(const f&, int &r) { return static_cast<int&&>(r); } void b() { int a; int&& i = ffa(f{}, a); i = 1; } ``` Should see f{} is an empty struct which is exactly the same as the lambda here.