public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/114329] ICE: verify_gimple failed: 'bit_field_ref' of non-mode-precision operand with bitfield _BitInt()
Date: Sat, 16 Mar 2024 14:17:32 +0000	[thread overview]
Message-ID: <bug-114329-4-8CKzZ0gYOv@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114329-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:3e8323e873c5af5047507d6b2cfbd12706820ee2

commit r14-9502-g3e8323e873c5af5047507d6b2cfbd12706820ee2
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Sat Mar 16 15:15:29 2024 +0100

    bitint: Fix up stores to large/huge _BitInt bitfields [PR114329]

    The verifier requires BIT_FIELD_REFs with INTEGRAL_TYPE_P first operand
    to have mode precision.  In most cases for the large/huge _BitInt bitfield
    stores the code uses bitfield representatives, which are typically arrays
    of chars, but if the bitfield starts at byte boundary on big endian,
    the code uses as nlhs in lower_mergeable_store COMPONENT_REF of the
    bitfield FIELD_DECL instead, which is fine for the limb accesses,
    but when used for the most significant limb can result in invalid
    BIT_FIELD_REF because the first operand then has BITINT_TYPE and
    usually VOIDmode.

    The following patch adds a helper method for the 4 creatikons of
    BIT_FIELD_REF which when needed adds a VIEW_CONVERT_EXPR.

    2024-03-16  Jakub Jelinek  <jakub@redhat.com>

            PR tree-optimization/114329
            * gimple-lower-bitint.cc (struct bitint_large_huge): Declare
            build_bit_field_ref method.
            (bitint_large_huge::build_bit_field_ref): New method.
            (bitint_large_huge::lower_mergeable_stmt): Use it.

            * gcc.dg/bitint-101.c: New test.

  parent reply	other threads:[~2024-03-16 14:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13 20:25 [Bug tree-optimization/114329] New: " zsojka at seznam dot cz
2024-03-15 18:12 ` [Bug tree-optimization/114329] " jakub at gcc dot gnu.org
2024-03-16 14:17 ` cvs-commit at gcc dot gnu.org [this message]
2024-03-16 14:18 ` jakub 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-114329-4-8CKzZ0gYOv@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).