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

--- Comment #3 from Boris Staletic <boris.staletic at protonmail dot com> ---
>From what I can tell, there's some confusion regarding whether `T::M` is an
OFFSET_REF or a FIELD_DECL.
In both test cases, I have seen that cp_build_addr_expr_strict() is called with
a FIELD_DECL instead of an OFFSET_REF.
Going up the call stack, the operand to the address of operator starts as a
SPLICE_EXPR and becomes a FIELD_DECL here:

https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/cp/pt.cc;h=de101b180e3845013911a74ef5fead44b3e2e3b8;hb=HEAD#l16750

When templates are not involved, then the operand of the address of operator is
an OFFSET_REF.

Reply via email to