https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126532
Bug ID: 126532
Summary: [17 Regression] ICE in value-range.h:1082
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: ktkachov at gcc dot gnu.org
Target Milestone: ---
int f_b, f_r;
__attribute__((noipa)) void
f (int a)
{
_Bool t1 = f_b;
if (t1)
{
_Bool t3 = a && t1;
_Bool t39 = t3 ^ t1;
if (t3)
;
else if (!a)
;
else
f_r += 7;
if (t39)
f_r += 3;
}
}
int
main (void)
{
for (int b = 0; b < 2; b++)
for (int a = -1; a < 2; a++)
{
int e = 0;
f_b = b;
f_r = 0;
f (a);
if (b)
{
int t3 = (a != 0);
int t39 = t3 ^ 1;
if (!t3 && a)
e += 7;
if (t39)
e += 3;
}
if (f_r != e)
__builtin_abort ();
}
return 0;
}
ICEs on aarch64 with -O2 -fno-tree-vrp -fno-tree-dominator-opts
during GIMPLE pass: threadfull
<source>: In function 'f':
<source>:4:1: internal compiler error: in type, at value-range.h:1082
4 | f (int a)
| ^