public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3069] Remove assert from set_nonzero_bits. Date: Tue, 4 Oct 2022 17:53:06 +0000 (GMT) [thread overview] Message-ID: <20221004175306.17AA9385842F@sourceware.org> (raw) https://gcc.gnu.org/g:87b0fe37a2a5916cd09586e2af83b8203f57612a commit r13-3069-g87b0fe37a2a5916cd09586e2af83b8203f57612a Author: Aldy Hernandez <aldyh@redhat.com> Date: Tue Oct 4 19:50:28 2022 +0200 Remove assert from set_nonzero_bits. The assert removed by this patch was there to keep users from passing masks of incompatible types. The self tests are passing host wide ints down (set_nonzero_bits (-1)), which seem to be 32 bits, whereas some embedded targets have integer_type_node's of 16-bits. This is causing problems in m32c-elf, among others. I suppose there's no harm in passing a 32-bit mask, because set_nonzero_bits calls wide_int::from() to convert the mask to the appropriate type. So we can remove the assert. gcc/ChangeLog: * value-range.cc (irange::set_nonzero_bits): Remove assert. Diff: --- gcc/value-range.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/value-range.cc b/gcc/value-range.cc index afb26a40083..a307559b654 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -2913,7 +2913,6 @@ irange::set_nonzero_bits (const wide_int_ref &bits) { gcc_checking_assert (!undefined_p ()); unsigned prec = TYPE_PRECISION (type ()); - gcc_checking_assert (prec == bits.get_precision ()); // Drop VARYINGs with a nonzero mask to a plain range. if (m_kind == VR_VARYING && bits != -1)
reply other threads:[~2022-10-04 17:53 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=20221004175306.17AA9385842F@sourceware.org \ --to=aldyh@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: linkBe 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).