[Bug lto/58203] memset/memcpy are discarded with -flto

2025-05-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58203

--- Comment #10 from Andrew Pinski  ---
The basic problem is the gimple IR has no reference to either memset or memcpy
in the case of zeroing  aggregates or copying them. So the linker does think
memset/memcpy is needed. And then when gcc expands the zeroing or copying, a
reference happens but it is already too late to bring back in them.

Marking memset/memcpy as used should bring in the reference to them if
memcpy/memset is only in lto ir.

[Bug lto/58203] memset/memcpy are discarded with -flto

2025-05-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58203

Andrew Pinski  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #9 from Andrew Pinski  ---
*** Bug 120393 has been marked as a duplicate of this bug. ***

[Bug lto/58203] memset/memcpy are discarded with -flto

2024-12-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58203

--- Comment #8 from Andrew Pinski  ---
*** Bug 118063 has been marked as a duplicate of this bug. ***

[Bug lto/58203] memset/memcpy are discarded with -flto

2024-12-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58203

Andrew Pinski  changed:

   What|Removed |Added

 CC||benediktibk at gmail dot com

--- Comment #7 from Andrew Pinski  ---
*** Bug 118063 has been marked as a duplicate of this bug. ***

[Bug lto/58203] memset/memcpy are discarded with -flto

2021-12-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58203

Andrew Pinski  changed:

   What|Removed |Added

 CC||goswin-v-b at web dot de

--- Comment #6 from Andrew Pinski  ---
*** Bug 65199 has been marked as a duplicate of this bug. ***

[Bug lto/58203] memset/memcpy are discarded with -flto

2021-12-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58203

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2021-12-24
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW

--- Comment #5 from Andrew Pinski  ---
.

[Bug lto/58203] memset/memcpy are discarded with -flto

2021-12-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58203

Andrew Pinski  changed:

   What|Removed |Added

 CC||patrick.oppenlander at gmail 
dot c
   ||om

--- Comment #4 from Andrew Pinski  ---
*** Bug 60395 has been marked as a duplicate of this bug. ***

[Bug lto/58203] memset/memcpy are discarded with -flto

2021-03-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58203

Andrew Pinski  changed:

   What|Removed |Added

 CC||kabel at blackhole dot sk

--- Comment #3 from Andrew Pinski  ---
*** Bug 99559 has been marked as a duplicate of this bug. ***

[Bug lto/58203] memset/memcpy are discarded with -flto

2016-09-11 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58203

Jan Hubicka  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org

--- Comment #2 from Jan Hubicka  ---
At present the runtime functions are not supposed to be LTOed, because
references to them may appear late in the codegen.  I suppose things could work
with explicit "used" attribute.

[Bug lto/58203] memset/memcpy are discarded with -flto

2013-08-20 Thread kukyakya at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58203

--- Comment #1 from kukyakya at gmail dot com ---
Created attachment 30679
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30679&action=edit
Test case