This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/64191] [4.9/5 Regression] indirect clobbers messes up dead code elimination in loop calling dtor


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.9/5 Regression]          |[4.9/5 Regression] indirect
                   |-march=native messes up     |clobbers messes up dead
                   |dead code elimination in    |code elimination in loop
                   |loop calling dtor           |calling dtor

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
Relevant part of the testcase:

struct Bar
{
  int i;
  ~Bar() { }
};
void bar_dtor_loop(Bar* p, unsigned int n)
{
  if (p) {
      Bar* e = p + n;
      while (e > p) {
          --e;
          e->~Bar();
      }
  }
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]