public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] middle-end/108209 - typo in genmatch.cc:commutative_op
@ 2023-01-09 14:07 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2023-01-09 14:07 UTC (permalink / raw)
  To: gcc-patches

The early out for user-id handling indicated commutative
rather than not commutative.

Bootstrapped and tested on x86_64-unkown-linux-gnu, pushed.

	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 fb9e37ae434..d4cb439a851 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.35.3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-09 14:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-09 14:07 [PATCH] middle-end/108209 - typo in genmatch.cc:commutative_op Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).