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

--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #14)
> DECL_NAMELESS VAR_DECL names don't leak into debug info.  The
> -fcompare-debug failures
> I believe are solely because these fancy names appear in the
> -fdump-final-insns=
> dumps (e.g. inside of MEM_EXPRs or REG_EXPRs).
> And, they wouldn't appear there if it was just the VAR_DECLs created by SRA
> with DECL_NAMELESS set, we have that
>       /* For -fcompare-debug don't dump DECL_NAMELESS names at all,
>          -g might have created more fancy names and their indexes
>          could get out of sync.  Usually those should be DECL_IGNORED_P
>          too, SRA can create even non-DECL_IGNORED_P DECL_NAMELESS fancy
>          names, let's hope those never get out of sync after doing the
>          dump_fancy_name sanitization.  */
>       else if ((flags & TDF_COMPARE_DEBUG)
>                && DECL_NAMELESS (node)
>                && DECL_IGNORED_P (node))
>         name = NULL_TREE;
>       /* For DECL_NAMELESS names look for embedded uids in the
>          names and sanitize them for TDF_NOUID.  */
>       else if ((flags & TDF_NOUID) && DECL_NAMELESS (node))
>         dump_fancy_name (pp, name);
>       else
>         pp_tree_identifier (pp, name);
> where dump_fancy_name will try to look for the Dnnnnn$ inside of it, so
> offset$D94316$_M_impl$D93629$_M_start_588
> would be either not dumped as just _588 or
> offset$Dxxxx$_M_impl$Dxxxx$_M_start_588

Note create_tmp_var also sets DECL_IGNORED_P.

So the D12345 to Dxxxx is only done when there's a $ after the number?
Why not also do this when there's a _ as clean_symbol_name does?

Reply via email to