From 8ef22408ea8f5ff18f740f169c99d6f4f00079bd Mon Sep 17 00:00:00 2001 From: glisse Date: Mon, 8 Jun 2015 12:20:43 +0000 Subject: [PATCH] 2015-06-08 Marc Glisse * genmatch.c (expr::gen_transform): For conditions, guess the type from the second operand. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224220 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/genmatch.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e33780fe9428..e7616d3226e8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-06-08 Marc Glisse + + * genmatch.c (expr::gen_transform): For conditions, guess the type + from the second operand. + 2015-06-08 Tom de Vries PR tree-optimization/66442 diff --git a/gcc/genmatch.c b/gcc/genmatch.c index 9dc3b8cf9521..f27170381d8e 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. */ -- 2.47.3