https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114388

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The change makes the value category clk_rvalueref but I don't know what that
means in C++98 mode:

       op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
+      if (op1_lvalue_kind == clk_class)
+       /* If E1 is an lvalue, then E1.E2 is an lvalue;
+          otherwise E1.E2 is an xvalue.  */
+       op1_lvalue_kind = clk_rvalueref;

You're right that it's not a const B& but it's also not a prvalue of type B.
It's some kind of reference though, as there is no longer a copy/slice that
produces a B prvalue (you can add a private copy ctor and see that it's needed
in GCC 8 and not in GCC 9).

Reply via email to