diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-06-14 13:47:01 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-06-14 13:47:01 +0000 |
commit | 412640c9812b63f04840ba7c497be454ab4f0793 (patch) | |
tree | c10cec8d883105dbb3d15047b89f3ff821d25aed /gcc/genmatch.c | |
parent | b9c739977c1ab3b39ad04ece2b0e7c9102febfbd (diff) | |
download | gcc-412640c9812b63f04840ba7c497be454ab4f0793.tar.gz |
2016-06-14 Richard Biener <rguenther@suse.de>
PR middle-end/71526
* genmatch.c (expr::gen_transform): Use in_type for comparisons
if available.
* gfortran.dg/pr71526.f90: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237441 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genmatch.c')
-rw-r--r-- | gcc/genmatch.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/genmatch.c b/gcc/genmatch.c index 9bb1279dc00..f5aa29b72f5 100644 --- a/gcc/genmatch.c +++ b/gcc/genmatch.c @@ -2288,8 +2288,14 @@ expr::gen_transform (FILE *f, int indent, const char *dest, bool gimple, { /* comparisons use boolean_type_node (or what gets in), but their operands need to figure out the types themselves. */ - sprintf (optype, "boolean_type_node"); - type = optype; + if (in_type) + type = in_type; + else + { + sprintf (optype, "boolean_type_node"); + type = optype; + } + in_type = NULL; } else if (*opr == COND_EXPR || *opr == VEC_COND_EXPR) |