From 46034c46f82dec169fe7fc7c2d82d8321d9a9512 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 9 Jan 2023 14:28:03 +0100 Subject: [PATCH] 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. --- gcc/genmatch.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc index fb9e37a..d4cb439 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; -- 2.7.4