Currently the code generated for the following (stupid example) (match (integer_zerop @0) INTEGER_CST@0 (if (integer_zerop (@0))))
is wrong in not assigning anything to the result @0. The following obvious patch fixes that. We don't have a match pattern like the above so it doesn't affect generated code. Applied. Richard. 2015-07-22 Richard Biener <rguent...@suse.de> * genmatch.c (parser::parse_result): Properly handle match with result operands and conditions. Index: gcc/genmatch.c =================================================================== --- gcc/genmatch.c (revision 226042) +++ gcc/genmatch.c (working copy) @@ -3555,6 +3555,7 @@ parser::parse_result (operand *result, p { if (!matcher) fatal_at (peek (), "manual transform not implemented"); + ife->trueexpr = result; } eat_token (CPP_CLOSE_PAREN); return ife;