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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |ppalka at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Seems the cast to that pointer type rather than ADDR_EXPR of a COMPONENT_REF of
a DECL_ARTIFICIAL member inside of that class is created by build_base_path:
386       /* Don't bother with the calculations inside sizeof; they'll ICE if
the
387          source type is incomplete and the pointer value doesn't matter. 
In a
388          template (even in instantiate_non_dependent_expr), we don't have
vtables
389          set up properly yet, and the value doesn't matter there either;
we're
390          just interested in the result of overload resolution.  */
391       if (uneval)
392         {
393           expr = build_nop (ptr_target_type, expr);
394           goto indout;
395         }
So, because it is in unevaluated context we don't bother (or can't?) do the
normal handling, and then are upset during the constant evaluation about that.

Reply via email to