Do not ICE on ternary expressions when calculating value ranges
gcc/ChangeLog: 2021-12-12 Jan Hubicka <hubicka@ucw.cz> PR ipa/103513 * ipa-fnsummary.c (evaluate_conditions_for_known_args): Do not ICE on ternary expression. gcc/testsuite/ChangeLog: 2021-12-12 Jan Hubicka <hubicka@ucw.cz> PR ipa/103513 * gcc.c-torture/compile/pr103513.c: New test.
This commit is contained in:
parent
01ad8c54fd
commit
3b61f06b2e
|
@ -513,7 +513,7 @@ evaluate_conditions_for_known_args (struct cgraph_node *node,
|
|||
op->index ? &vr : &op0);
|
||||
}
|
||||
else
|
||||
gcc_unreachable ();
|
||||
res.set_varying (op->type);
|
||||
type = op->type;
|
||||
vr = res;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
int a;
|
||||
void b(int c) {
|
||||
int d = 3;
|
||||
d ^= c < 2;
|
||||
if (d < 3 && a)
|
||||
while (1)
|
||||
b(!a);
|
||||
}
|
Loading…
Reference in New Issue