diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/genmatch.c | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e33780f..e7616d3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-06-08 Marc Glisse <marc.glisse@inria.fr> + + * genmatch.c (expr::gen_transform): For conditions, guess the type + from the second operand. + 2015-06-08 Tom de Vries <tom@codesourcery.com> PR tree-optimization/66442 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. */ |