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 tree-optimization/86075] dead store elimination defeats strlen optimization after memset zero followed by strcpy


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-06-07
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
But then the strlen pass should see the zeroing and then notice the memcpy will
produce a 0-terminated string.  The user might have written this w/o the
a[3] = 0 in place after all.

So IMHO not a DSE fault but possibly a dup of another strlen missed
optimization.

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