aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vrp.c
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@gcc.gnu.org>2016-07-26 15:21:29 +0000
committerPatrick Palka <ppalka@gcc.gnu.org>2016-07-26 15:21:29 +0000
commite04de6674345fe4db57884b14e20accefc2ad795 (patch)
treecf9e28eb973c1e51ae689e40f80582573de3b135 /gcc/tree-vrp.c
parent524cf1e47a27e8a89390a46235b979e41781f618 (diff)
downloadgcc-e04de6674345fe4db57884b14e20accefc2ad795.zip
gcc-e04de6674345fe4db57884b14e20accefc2ad795.tar.gz
gcc-e04de6674345fe4db57884b14e20accefc2ad795.tar.bz2
Minor changes in tree-vrp.c
gcc/ChangeLog: * tree-vrp.c (dump_asserts_for): Print loc->expr instead of name. (extract_code_and_val_from_cond_with_ops): Verify that name is either cond_op0 or cond_op1. From-SVN: r238762
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r--gcc/tree-vrp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 6986827..77c3014 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -4828,7 +4828,7 @@ dump_asserts_for (FILE *file, tree name)
dump_edge_info (file, loc->e, dump_flags, 0);
}
fprintf (file, "\n\tPREDICATE: ");
- print_generic_expr (file, name, 0);
+ print_generic_expr (file, loc->expr, 0);
fprintf (file, " %s ", get_tree_code_name (loc->comp_code));
print_generic_expr (file, loc->val, 0);
fprintf (file, "\n\n");
@@ -5010,13 +5010,15 @@ extract_code_and_val_from_cond_with_ops (tree name, enum tree_code cond_code,
comp_code = swap_tree_comparison (cond_code);
val = cond_op0;
}
- else
+ else if (name == cond_op0)
{
/* The comparison is of the form NAME COMP VAL, so the
comparison code remains unchanged. */
comp_code = cond_code;
val = cond_op1;
}
+ else
+ gcc_unreachable ();
/* Invert the comparison code as necessary. */
if (invert)