public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/95558] New: Invalid IPA optimizations based on weak definition
@ 2020-06-06  3:45 bugdal at aerifal dot cx
  2020-06-06  8:01 ` [Bug ipa/95558] " amonakov at gcc dot gnu.org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: bugdal at aerifal dot cx @ 2020-06-06  3:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95558
           Summary: Invalid IPA optimizations based on weak definition
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bugdal at aerifal dot cx
  Target Milestone: ---

Created attachment 48689
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48689&action=edit
test case

Here is a case that came up in WIP code on musl libc, where I wanted to provide
a weak dummy definition for functionality that would optionally be replaced by
a strong definition elsewhere at ld time. I've been looking for some plausible
explanation aside from an IPA bug, like interaction with UB, but I can't find
any.

In the near-minimal test case here, the function reclaim() still has all of the
logic it should, but reclaim_gaps gets optimized down to a nop.

What seems to be happening is that the dummy weak definition does not leak into
its direct caller via IPA optimizations, but does leak to the caller's caller.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-07-07 10:37 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-06  3:45 [Bug middle-end/95558] New: Invalid IPA optimizations based on weak definition bugdal at aerifal dot cx
2020-06-06  8:01 ` [Bug ipa/95558] " amonakov at gcc dot gnu.org
2020-06-06 14:36 ` bugdal at aerifal dot cx
2020-06-06 14:40 ` bugdal at aerifal dot cx
2020-06-09  6:47 ` rguenth at gcc dot gnu.org
2021-09-22  5:59 ` [Bug ipa/95558] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2022-01-17 15:08 ` rguenth at gcc dot gnu.org
2022-01-17 16:33 ` bugdal at aerifal dot cx
2022-01-17 17:32 ` hubicka at kam dot mff.cuni.cz
2022-01-17 17:44 ` bugdal at aerifal dot cx
2022-01-17 19:15 ` amonakov at gcc dot gnu.org
2022-01-17 22:05 ` bugdal at aerifal dot cx
2022-01-17 22:20 ` pinskia at gcc dot gnu.org
2022-01-17 23:54 ` hubicka at kam dot mff.cuni.cz
2022-01-21 13:31 ` rguenth at gcc dot gnu.org
2022-05-27  9:42 ` [Bug ipa/95558] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:41 ` jakub at gcc dot gnu.org
2023-01-19 13:12 ` rguenth at gcc dot gnu.org
2023-07-07 10:37 ` [Bug ipa/95558] [11/12/13/14 " rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).