From: Richard Biener Date: Mon, 9 Jan 2023 13:28:03 +0000 (+0100) Subject: middle-end/108209 - typo in genmatch.cc:commutative_op X-Git-Tag: basepoints/gcc-14~2139 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=46034c46f82dec169fe7fc7c2d82d8321d9a9512;p=thirdparty%2Fgcc.git middle-end/108209 - typo in genmatch.cc:commutative_op The early out for user-id handling indicated commutative rather than not commutative. PR middle-end/108209 * genmatch.cc (commutative_op): Fix return value for user-id with non-commutative first replacement. --- diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc index fb9e37ae434d..d4cb439a851e 100644 --- a/gcc/genmatch.cc +++ b/gcc/genmatch.cc @@ -496,7 +496,7 @@ commutative_op (id_base *id) { int res = commutative_op (uid->substitutes[0]); if (res < 0) - return 0; + return -1; for (unsigned i = 1; i < uid->substitutes.length (); ++i) if (res != commutative_op (uid->substitutes[i])) return -1;