public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-6319] compiler: permit converting unnamed types when ignoring struct tags
Date: Thu,  6 Jan 2022 19:24:18 +0000 (GMT)	[thread overview]
Message-ID: <20220106192418.0D7823858430@sourceware.org> (raw)

https://gcc.gnu.org/g:be129ca481c2e9c06ba40957b955a5c5765b7c87

commit r12-6319-gbe129ca481c2e9c06ba40957b955a5c5765b7c87
Author: Ian Lance Taylor <iant@golang.org>
Date:   Wed Jan 5 20:57:14 2022 -0800

    compiler: permit converting unnamed types when ignoring struct tags
    
    Test case is https://golang.org/cl/375796.
    
    Fixes golang/go#50439
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/375797

Diff:
---
 gcc/go/gofrontend/MERGE    | 2 +-
 gcc/go/gofrontend/types.cc | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index a18f3a37349..9cc6a1c63c6 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-9732b0766667b9235d0f35d0fb0abfe406b94d49
+799e9807c36fc661b14dfff136369556f09a5ebf
 
 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/types.cc b/gcc/go/gofrontend/types.cc
index 57c02a97ef0..1c67ea099eb 100644
--- a/gcc/go/gofrontend/types.cc
+++ b/gcc/go/gofrontend/types.cc
@@ -791,8 +791,7 @@ Type::are_convertible(const Type* lhs, const Type* rhs, std::string* reason)
 
   // The types are convertible if they have identical underlying
   // types, ignoring struct field tags.
-  if ((lhs->named_type() != NULL || rhs->named_type() != NULL)
-      && Type::are_identical(lhs->base(), rhs->base(), 0, reason))
+  if (Type::are_identical(lhs->base(), rhs->base(), 0, reason))
     return true;
 
   // The types are convertible if they are both unnamed pointer types


                 reply	other threads:[~2022-01-06 19:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220106192418.0D7823858430@sourceware.org \
    --to=ian@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).