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 middle-end/99641] [11 Regression] opt30.adb, opt49.adb and loop_optimization3.adb fail to build at m32 Date: Thu, 18 Mar 2021 10:32:56 +0000 [thread overview] Message-ID: <bug-99641-4-nGqFU7KGnl@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-99641-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99641 Eric Botcazou <ebotcazou at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|ada |middle-end Target Milestone|--- |11.0 Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |ebotcazou at gcc dot gnu.org --- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- The offset calculation in native_encode_initializer is incorrect: if (index && TREE_CODE (index) == RANGE_EXPR) { if (!tree_fits_shwi_p (TREE_OPERAND (index, 0)) || !tree_fits_shwi_p (TREE_OPERAND (index, 1))) return 0; pos = (tree_to_shwi (TREE_OPERAND (index, 0)) - min_index) * fieldsize; count = (tree_to_shwi (TREE_OPERAND (index, 1)) - tree_to_shwi (TREE_OPERAND (index, 0))); } else if (index) { if (!tree_fits_shwi_p (index)) return 0; pos = (tree_to_shwi (index) - min_index) * fieldsize; } It must not be done in HOST_WIDE_INT but in sizetype instead, like in e.g. get_inner_reference or get_ref_base_and_extent.
next prev parent reply other threads:[~2021-03-18 10:32 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-18 9:37 [Bug ada/99641] New: " iains at gcc dot gnu.org 2021-03-18 9:39 ` [Bug ada/99641] " iains at gcc dot gnu.org 2021-03-18 9:58 ` ebotcazou at gcc dot gnu.org 2021-03-18 10:32 ` ebotcazou at gcc dot gnu.org [this message] 2021-03-19 9:42 ` [Bug middle-end/99641] " cvs-commit at gcc dot gnu.org 2021-03-19 9:46 ` cvs-commit at gcc dot gnu.org 2021-03-19 9:47 ` 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-99641-4-nGqFU7KGnl@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: 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).