https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118456
Bug ID: 118456
Summary: [15 Regression] wrong code due to ifcombine since
r15-6773
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: jakub at gcc dot gnu.org
Target Milestone: ---
struct S { unsigned long long o; unsigned short a, b; } s;
__attribute__((noipa)) int
foo (void)
{
return ((unsigned char) s.a) >> 3 == 17 && ((signed char) s.b) >> 2 == -27;
}
int
main ()
{
s.a = 17 << 3;
s.b = -27 << 2;
if (foo () != 1)
__builtin_abort ();
}
is miscompiled at -O2 starting with
r15-6773-gc96a6c2c264776d8138c6b303d005e74f047cfa0
r15-6865 doesn't fix that.