public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "linkw at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/106833] Handle OPAQUE_TYPE in gimple_canonical_types_compatible_p
Date: Wed, 07 Sep 2022 04:28:42 +0000	[thread overview]
Message-ID: <bug-106833-4-55IbRUpQPH@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106833-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106833

--- Comment #10 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Segher Boessenkool from comment #9)
> Although, preferably we should not allow assigning one opaque type to another
> opaque type just because they will eventually use the same mode, not without
> warning anyway?  Or is that unavoidable?  Compare assigning a V4SI to a V4SF.
> 

IIUC, you meant the assignment happening for two different opaque types, then
it's a conversion? If so, I think we can check it in rs6000_invalid_conversion,
currently it just simply checks the modes. If we have two different opaque
types mapping to one same mode, we can further check if the things like
TYPE_CANONICAL match.

> I don't know if your patch does this, btw, and it isn't so easy to test, we
> currently have only one type for each of our opaque modes.  Maybe test by
> adding an extra builtin type :-)

This patch doesn't handle that, the main issue here is that some cv-qualified
opaque type can cause ICE in type verification during LTO. IMHO, opaque types
conversion issue looks like a separated issue and it can be handled in target
hook invalid_conversion. But I guess you want a more generic check?  And as you
pointed out, there is no such scenario that two opaque types have the same
mode, not sure if we really want to handle it for now. :-)

  parent reply	other threads:[~2022-09-07  4:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05  8:01 [Bug middle-end/106833] New: " linkw at gcc dot gnu.org
2022-09-05  8:09 ` [Bug middle-end/106833] " linkw at gcc dot gnu.org
2022-09-05  8:25 ` rguenth at gcc dot gnu.org
2022-09-05  8:27 ` rguenth at gcc dot gnu.org
2022-09-05  9:26 ` linkw at gcc dot gnu.org
2022-09-05  9:29 ` linkw at gcc dot gnu.org
2022-09-05  9:58 ` rguenther at suse dot de
2022-09-05 16:25 ` segher at gcc dot gnu.org
2022-09-06  3:40 ` linkw at gcc dot gnu.org
2022-09-06 21:21 ` segher at gcc dot gnu.org
2022-09-07  4:28 ` linkw at gcc dot gnu.org [this message]
2022-09-07  4:31 ` [Bug middle-end/106833] Miss to handle OPAQUE_TYPE specially in verify_type linkw at gcc dot gnu.org
2022-09-07 13:08 ` segher at gcc dot gnu.org
2022-09-09 13:18 ` cvs-commit at gcc dot gnu.org
2022-09-14 12:43 ` linkw at gcc dot gnu.org
2022-09-14 12:53 ` bergner at gcc dot gnu.org
2022-09-14 13:50 ` linkw at gcc dot gnu.org

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=bug-106833-4-55IbRUpQPH@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).