public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1329] compiler: permit expressions of abstract bool to remain abstract
@ 2022-06-28 16:50 Ian Lance Taylor
0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2022-06-28 16:50 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:ed06274eacc17a224b87f23111d7ca874ea53b7c
commit r13-1329-ged06274eacc17a224b87f23111d7ca874ea53b7c
Author: Ian Lance Taylor <iant@golang.org>
Date: Mon Jun 27 22:17:51 2022 -0700
compiler: permit expressions of abstract bool to remain abstract
Test case is https://go.dev/cl/414755.
Fixes golang/go#51475
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/414735
Diff:
---
gcc/go/gofrontend/MERGE | 2 +-
gcc/go/gofrontend/expressions.cc | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 16d274ce99d..a0e386ab4f6 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-927528cdc112fc51e0d07ee79e7a1254b586eabe
+28fe9fad4acb4e02083faf5503b06e3e6e8eecaf
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc
index f59f61d19ad..aadca9710e6 100644
--- a/gcc/go/gofrontend/expressions.cc
+++ b/gcc/go/gofrontend/expressions.cc
@@ -6829,11 +6829,12 @@ Binary_expression::do_determine_type(const Type_context* context)
{
if ((tleft->integer_type() != NULL && tright->integer_type() != NULL)
|| (tleft->float_type() != NULL && tright->float_type() != NULL)
- || (tleft->complex_type() != NULL && tright->complex_type() != NULL))
+ || (tleft->complex_type() != NULL && tright->complex_type() != NULL)
+ || (tleft->is_boolean_type() && tright->is_boolean_type()))
{
- // Both sides have an abstract integer, abstract float, or
- // abstract complex type. Just let CONTEXT determine
- // whether they may remain abstract or not.
+ // Both sides have an abstract integer, abstract float,
+ // abstract complex, or abstract boolean type. Just let
+ // CONTEXT determine whether they may remain abstract or not.
}
else if (tleft->complex_type() != NULL)
subcontext.type = tleft;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-28 16:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-28 16:50 [gcc r13-1329] compiler: permit expressions of abstract bool to remain abstract Ian Lance Taylor
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).