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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Keywords|                            |wrong-code

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think simple_dce_from_worklist is incorrect of removing this inline-asm in
the first place.
Take:
```
static int t;

int f (int *a)
{
  int t1;
  asm (" " : "=r" (t1) : : "memory");
  t = t1;
  return *a;
}
```
The inline-asm could have written to *a but now it has been removed.

Let me look into fixing that.
Note my patch (r12-4598-g113860301f46d14a255bd) exposed this even before VRP
exposed this so I feel like I should fix this.

Reply via email to