From: Jeff Law <jeffreyalaw@gmail.com>
To: Richard Biener <rguenther@suse.de>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH][RFC] Prevent TYPE_PRECISION on VECTOR_TYPEs
Date: Fri, 23 Jun 2023 13:30:25 -0600 [thread overview]
Message-ID: <3bfc300b-eaea-36fe-ce03-bb3e8311a66e@gmail.com> (raw)
In-Reply-To: <20230623082613.00D381331F@imap2.suse-dmz.suse.de>
On 6/23/23 02:26, Richard Biener via Gcc-patches wrote:
> The following makes sure that using TYPE_PRECISION on VECTOR_TYPE
> ICEs when tree checking is enabled. This should avoid wrong-code
> in cases like PR110182 and instead ICE.
>
> It also introduces a TYPE_PRECISION_RAW accessor and adjusts
> places I found that are eligible to use that.
>
> This patch requires (at least) the series of patches I will
> followup this with. I have to re-bootstrap / test to look
> for further fallout (I've picked this up again after some weeks).
>
> Opinions?
>
> Thanks,
> Richard.
>
> * tree.h (TYPE_PRECISION): Check for non-VECTOR_TYPE.
> (TYPE_PRECISION_RAW): Provide raw access to the precision
> field.
> * tree.cc (verify_type_variant): Compare TYPE_PRECISION_RAW.
> (gimple_canonical_types_compatible_p): Likewise.
> * tree-streamer-out.cc (pack_ts_type_common_value_fields):
> Stream TYPE_PRECISION_RAW.
> * tree-streamer-in.cc (unpack_ts_type_common_value_fields):
> Likewise.
> * lto-streamer-out.cc (hash_tree): Hash TYPE_PRECISION_RAW.
Given how easy it is to incorrectly use TYPE_PRECISION on VECTOR_TYPE,
I'm all for it.
jeff
next prev parent reply other threads:[~2023-06-23 19:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-23 8:26 Richard Biener
2023-06-23 19:30 ` Jeff Law [this message]
2023-06-23 10:42 Richard Biener
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=3bfc300b-eaea-36fe-ce03-bb3e8311a66e@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
/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).