[Bug c++/96354] [10/11 Regression] ICE in maybe_canonicalize_mem_ref_addr, at gimple-fold.c:4903 since r10-2271-gd81ab49d0586fca0

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Wed Jul 29 08:20:21 GMT 2020


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

--- Comment #11 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 28 Jul 2020, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96354
> 
> --- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> (In reply to rguenther@suse.de from comment #8)
> > We could allow this in debug stmts but pretty much any (or very many)
> > workers on MEM_REFs will be quite unhappy about this. Of course we're not
> > likely to run them on debug stmts. But then, we do have debug Temps for
> > this...
> 
> I was wondering if we are ok with even MEM_REF with DEBUG_EXPR_DECL as the
> address, but seems at least this routine is ok with that one.
> The question is what we would do with that at cfgexpand.c time.
> But I guess I can look at where this is folded into it and see if I can break
> it out into a debug expr decl and then see what expansion does for it.

It wouldn't be an address of a DEBUG_EXPR_DECL but the DEBUG_EXPR
defining the DEBUG_EXPR_DECL would be the address itself, thus

# DEBUG D.12 = &a[i_3];
# DEBUG a = MEM_REF[D.12];


More information about the Gcc-bugs mailing list