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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
So we're inlining A::omp declare reduction y~i(A::T&)::<lambda()>::operator()
(const struct ._anon_1 * const __closure) which has no abstract origin.

For the -fno-var-tracking-assignments case we are pruning the early DIE of the
function as unused as part of prune_unused_types_prune while we don't when
VTA is enabled.  That's because:

  /* For -fvar-tracking-assignments, also set the mark on nodes that could be
     referenced by DW_TAG_call_site DW_AT_call_origin (i.e. direct call
     callees).  */
  cgraph_node *cnode;
  FOR_EACH_FUNCTION (cnode)
    if (cnode->referred_to_p (false))
      {
        dw_die_ref die = lookup_decl_die (cnode->decl);
        if (die == NULL || die->die_mark)
          continue;
        for (cgraph_edge *e = cnode->callers; e; e = e->next_caller)
          if (e->caller != cnode
              && opt_for_fn (e->caller->decl, flag_var_tracking_assignments))
            {
              prune_unused_types_mark (die, 1);
              break;
            }
      }

I'm not sure why this code shouldn't apply to DW_TAG_inlined_subroutine
which is needed independently of -fvar-tracking-assignments ...

Reply via email to