[Bug lto/87434] LTO corrupts code

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 26 14:26:00 GMT 2018


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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
+             rtx new_mem = gen_rtx_MEM (GET_MODE (mem), derived_ptr_reg);
+             MEM_COPY_ATTRIBUTES (new_mem, mem);

I think it's dangerous to use old MEMs attributes this way, esp. MEM_EXPR
and friends.  You might also run into existing issues with RTL alias analysis
(find-baseterm and friends, just search bugzilla)

Obviously LTO has nothing to do with this, you are simply "unlucky".


More information about the Gcc-bugs mailing list