public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/108199] Bitfields, unions and SRA and storage_order_attribute
Date: Mon, 09 Jan 2023 21:46:20 +0000	[thread overview]
Message-ID: <bug-108199-4-QWmIj69NrS@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108199-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #11 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Here is a testcase for the trunk on x86_64-linux-gnu:

Thanks.  The problem is indeed the BIT_FIELD_REF of a scalar, which is an
undocumented extension of GENERIC:

/* Reference to a group of bits within an object.  Similar to COMPONENT_REF
   except the position is given explicitly rather than via a FIELD_DECL.
   Operand 0 is the structure or union expression;
   operand 1 is a tree giving the constant number of bits being referenced;
   operand 2 is a tree giving the constant position of the first referenced
bit.
   The result type width has to match the number of bits referenced.
   If the result type is integral, its signedness specifies how it is extended
   to its mode width.  */
DEFTREECODE (BIT_FIELD_REF, "bit_field_ref", tcc_reference, 3)

How are the bits numbered in there, IOW is bit 0 always the LSB or not?

  parent reply	other threads:[~2023-01-09 21:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22 16:08 [Bug tree-optimization/108199] New: Bitfields " krebbel at gcc dot gnu.org
2022-12-22 16:09 ` [Bug tree-optimization/108199] " krebbel at gcc dot gnu.org
2022-12-22 16:24 ` krebbel at gcc dot gnu.org
2022-12-22 16:29 ` krebbel at gcc dot gnu.org
2022-12-22 16:39 ` [Bug tree-optimization/108199] Bitfields, unions and SRA " pinskia at gcc dot gnu.org
2022-12-22 17:08 ` krebbel at gcc dot gnu.org
2022-12-22 18:29 ` pinskia at gcc dot gnu.org
2022-12-23  7:53 ` krebbel at gcc dot gnu.org
2023-01-09 13:21 ` rguenth at gcc dot gnu.org
2023-01-09 20:15 ` ebotcazou at gcc dot gnu.org
2023-01-09 20:26 ` pinskia at gcc dot gnu.org
2023-01-09 21:46 ` ebotcazou at gcc dot gnu.org [this message]
2023-01-10 11:11 ` ebotcazou at gcc dot gnu.org
2023-01-10 11:24 ` ebotcazou at gcc dot gnu.org
2023-01-11 15:03 ` cvs-commit at gcc dot gnu.org
2023-01-11 15:35 ` krebbel at gcc dot gnu.org
2023-01-11 15:41 ` krebbel at gcc dot gnu.org
2023-01-11 16:11 ` ebotcazou at gcc dot gnu.org
2023-01-11 19:46 ` cvs-commit at gcc dot gnu.org
2023-01-11 19:47 ` cvs-commit at gcc dot gnu.org
2023-01-11 19:48 ` ebotcazou 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-108199-4-QWmIj69NrS@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).