public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-5068] middle-end/108209 - typo in genmatch.cc:commutative_op
@ 2023-01-09 14:08 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2023-01-09 14:08 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:46034c46f82dec169fe7fc7c2d82d8321d9a9512
commit r13-5068-g46034c46f82dec169fe7fc7c2d82d8321d9a9512
Author: Richard Biener <rguenther@suse.de>
Date: Mon Jan 9 14:28:03 2023 +0100
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:
---
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-09 14:08 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:08 [gcc r13-5068] 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).