public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/115381] New: Missed deoptimization opportunity when comparing two different linker symbols
@ 2024-06-07  4:45 user202729 at protonmail dot com
  2024-06-07  6:14 ` [Bug tree-optimization/115381] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: user202729 at protonmail dot com @ 2024-06-07  4:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115381
           Summary: Missed deoptimization opportunity when comparing two
                    different linker symbols
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: user202729 at protonmail dot com
  Target Milestone: ---

Code:

```
int x();
int y();

int z(){ return &x == &y; }
```

Clang optimizes this to 0. GCC doesn't.

Godbolt link: https://godbolt.org/z/8rGbbdrbe

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

end of thread, other threads:[~2024-06-07 14:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-07  4:45 [Bug tree-optimization/115381] New: Missed deoptimization opportunity when comparing two different linker symbols user202729 at protonmail dot com
2024-06-07  6:14 ` [Bug tree-optimization/115381] " rguenth at gcc dot gnu.org
2024-06-07  6:18 ` rguenth at gcc dot gnu.org
2024-06-07 14:16 ` pinskia at gcc dot gnu.org
2024-06-07 14:17 ` pinskia 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).