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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-valid-code           |ice-on-invalid-code

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Confirmed.  I believe this is wrong at gimplification time:
> 
> void bar ()
> {
>   __asm__ __volatile__("mov %1, %0" :  : "m" at);
> }
> 
> we'd need to gimplify this to a temporary.  We have a CONST_DECL here which
> is what confuses us (we're not going to put that into the constant pool
> I guess).  Possibly
> 
> 3738          op = expand_expr (val, NULL_RTX, VOIDmode,
> 3739                            allows_reg ? EXPAND_NORMAL
> 3740                            : allows_mem ? EXPAND_MEMORY
> 3741                            : EXPAND_INITIALIZER);
> 
> expects that this expands to a MEM because of EXPAND_MEMORY, but it does not
> (errorneously?!).

CONST_DECLs are unconditionally replaced with their value, but it's apparently
TREE_ADDRESSABLE here so we presumably cannot spill it at will.

Reply via email to