public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/105990] New: Dead code elimination failed at -O3
@ 2022-06-15 13:35 crazylht at gmail dot com
  2022-06-15 13:39 ` [Bug tree-optimization/105990] " crazylht at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: crazylht at gmail dot com @ 2022-06-15 13:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105990
           Summary: Dead code elimination failed at -O3
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: crazylht at gmail dot com
  Target Milestone: ---

static struct { int a; } b, c;
static int d = -1;
void foo();
int main() {
    if (b.a)
        d = 2 | (b.a <= 0);
    for (; b.a; b.a++)
        c = b;
    if (!d)
        foo();
}


foo() can be eliminated since d would never be zero.

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

end of thread, other threads:[~2023-10-25 22:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15 13:35 [Bug tree-optimization/105990] New: Dead code elimination failed at -O3 crazylht at gmail dot com
2022-06-15 13:39 ` [Bug tree-optimization/105990] " crazylht at gmail dot com
2022-06-16 13:32 ` Painololo at protonmail dot com
2022-06-21  1:38 ` pinskia at gcc dot gnu.org
2023-08-07 20:56 ` [Bug ipa/105990] " pinskia at gcc dot gnu.org
2023-10-25 22:19 ` 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).