[Bug tree-optimization/105990] New: Dead code elimination failed at -O3
crazylht at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Jun 15 13:35:16 GMT 2022
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.
More information about the Gcc-bugs
mailing list