Commit a81596fb authored by yb9976's avatar yb9976
Browse files

Prevent computations with tarval_bad.

This fixes opt/fehler206.c.
parent 133cd801
......@@ -1156,6 +1156,12 @@ static ir_node *applyOneEdge(ir_node *iv, ir_node *rc, LFTR_edge *e, iv_env *env
panic("Unsupported opcode");
}
if (tv == tarval_bad || tv_init == tarval_bad) {
tarval_set_integer_overflow_mode(ovmode);
DB((dbg, LEVEL_4, " = OVERFLOW"));
return NULL;
}
if (pscc->code == iro_Add) {
tv_end = tarval_add(tv, tv_incr);
} else {
......@@ -1165,7 +1171,7 @@ static ir_node *applyOneEdge(ir_node *iv, ir_node *rc, LFTR_edge *e, iv_env *env
tarval_set_integer_overflow_mode(ovmode);
if (tv == tarval_bad || tv_init == tarval_bad || tv_end == tarval_bad) {
if (tv_end == tarval_bad) {
DB((dbg, LEVEL_4, " = OVERFLOW"));
return NULL;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment