From 7026b8dfd18fc18e7110c193b1a41d4bb119c8c7 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Mon, 8 Jun 2015 14:20:43 +0200 Subject: genmatch.c (expr::gen_transform): For conditions, guess the type from the second operand. 2015-06-08 Marc Glisse * genmatch.c (expr::gen_transform): For conditions, guess the type from the second operand. From-SVN: r224220 --- gcc/genmatch.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/genmatch.c') diff --git a/gcc/genmatch.c b/gcc/genmatch.c index 9dc3b8c..f271703 100644 --- a/gcc/genmatch.c +++ b/gcc/genmatch.c @@ -1709,6 +1709,13 @@ expr::gen_transform (FILE *f, const char *dest, bool gimple, int depth, sprintf (optype, "boolean_type_node"); type = optype; } + else if (*operation == COND_EXPR + || *operation == VEC_COND_EXPR) + { + /* Conditions are of the same type as their first alternative. */ + sprintf (optype, "TREE_TYPE (ops%d[1])", depth); + type = optype; + } else { /* Other operations are of the same type as their first operand. */ -- cgit v1.1