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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Maybe not 100% the same but I think it shows the issue:
```
struct s1
{
  int t;
  s1(int tt) : t(tt) {}
};

struct s2 : s1
{
  s2(int a) : s1(a){}
};

void g(s2*);


void f()
{
  s2 a[2]{s2(0), s2(1)};
  g(a);
}
```
In s2::s2, DSE is able to:
```
  Deleted dead store: *this_3(D) ={v} {CLOBBER(bob)};

void s2::s2 (struct s2 * const this, int a)
{
  <bb 2> :
  MEM[(struct s1 *)this_3(D)] ={v} {CLOBBER(bob)};
  MEM[(struct s1 *)this_3(D)].t = a_5(D);
```

And now the other thing is these are CLOBBER_OBJECT_BEGIN (BOB) rather than
CLOBBER_STORAGE_END (EOB) .

Reply via email to