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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2025-01-29 00:00:00         |2026-1-28

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
2449         Currently we ignore these functions in speculative
devirtualization.
2450         ??? Maybe it would make sense to be more aggressive for LTO even
2451         elsewhere.  */
2452      if (!flag_ltrans
2453          && !pure_virtual
2454          && type_in_anonymous_namespace_p (DECL_CONTEXT (target))
2455          && (!target_node
2456              || !referenced_from_vtable_p (target_node)))

this doesn't consider DECL_CONTEXT being a TU decl.

Either as Jason says we shouldn't globalize METHOD_TYPE in FLD or we need
to guard for this possibility.

Honza, please have a look.

Reply via email to