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/113463] ICE: in extended_tree, at tree.h:6449 with _BitInt() used as offset
Date: Fri, 19 Jan 2024 09:02:32 +0000	[thread overview]
Message-ID: <bug-113463-4-KT2icjpVT2@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113463-4@http.gcc.gnu.org/bugzilla/>

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

--- 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:df1cd90e32bb17d34f5fdce99bd0377fe1b8e5c6

commit r14-8277-gdf1cd90e32bb17d34f5fdce99bd0377fe1b8e5c6
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Jan 19 10:00:51 2024 +0100

    gimple-ssa-warn-restrict: Only use type range from NOP_EXPR for
non-narrowing conversions [PR113463]

    builtin_memref::extend_offset_range when it sees a NOP_EXPR from
    INTEGRAL_TYPE (to INTEGRAL_TYPE of sizetype/ptrdifftype precision
    given the callers) uses wi::to_offset on TYPE_{MIN,MAX}_VALUE
    of the rhs1 type.  This ICEs with large BITINT_TYPEs - to_offset
    is only supported for precisions up to the offset_int precision
    - but it even doesn't make any sense to do such thing for narrowing
    conversions, their range means the whole sizetype/ptrdifftype range
    and so the normal handling done later on (largest sized supported object)
    is the way to go in that case.

    So, the following patch just restrict this to non-narrowing conversions.

    2024-01-19  Jakub Jelinek  <jakub@redhat.com>

            PR tree-optimization/113463
            * gimple-ssa-warn-restrict.cc
(builtin_memref::extend_offset_range):
            Only look through NOP_EXPRs if rhs1 doesn't have wider type than
            lhs.

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

  parent reply	other threads:[~2024-01-19  9:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18  2:55 [Bug tree-optimization/113463] New: " zsojka at seznam dot cz
2024-01-18 15:28 ` [Bug tree-optimization/113463] " jakub at gcc dot gnu.org
2024-01-19  9:02 ` cvs-commit at gcc dot gnu.org [this message]
2024-01-19  9:05 ` jakub at gcc dot gnu.org
2024-01-20 17:11 ` pinskia 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-113463-4-KT2icjpVT2@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).