public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at kam dot mff.cuni.cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/103818] [12 Regression] ICE: in insert, at ipa-modref-tree.c:591 since r12-3202-gf5ff3a8ed4ca9173
Date: Tue, 12 Apr 2022 10:50:45 +0000 [thread overview]
Message-ID: <bug-103818-4-dsTsJIBKO8@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103818-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103818
--- Comment #6 from hubicka at kam dot mff.cuni.cz ---
> For 128-bit math, you can e.g. use poly_offset_int, which generally looks like
> a better type for these offsets and sizes (especially if they are counted in
> bits not bytes).
> Just to perform the <= comparison on the wider poly_offset_int, perhaps:
> --- gcc/ipa-modref-tree.cc.jj 2022-04-06 16:44:44.000000000 +0200
> +++ gcc/ipa-modref-tree.cc 2022-04-11 17:50:02.937784764 +0200
> @@ -380,9 +380,13 @@ modref_access_node::update2 (poly_int64
> new_max_size = max_size2;
> else
> {
> - new_max_size = max_size2 + offset2 - offset1;
> - if (known_le (new_max_size, max_size1))
> + poly_offset_int n = max_size2;
> + n += offset2;
> + n -= offset1;
> + if (known_le (n, max_size1))
> new_max_size = max_size1;
> + else
> + new_max_size = max_size2 + offset2 - offset1;
> }
>
> update (parm_offset1, offset1,
> (though, not sure how can you narrow that back to poly_int64).
> Though, the big question is what should one do with these overflows or
> underflows that aren't representable, update2 can't fail right now and the
> above still ICEs.
> Is there some way how to indicate it is an access to an unknown offset?
I sent patch for this (and plan to commit it today). One can set new_max_size
to -1 which means unknown/unlimited rnag on overflow. Underflow should
be impossible, since we always keep offsets/sizes nonnegative.
Honza
next prev parent reply other threads:[~2022-04-12 10:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-23 16:10 [Bug c/103818] New: ICE: in insert, at ipa-modref-tree.c:591 k.even-mendoza at imperial dot ac.uk
2021-12-23 19:52 ` [Bug ipa/103818] [12 Regression] " pinskia at gcc dot gnu.org
2021-12-28 10:22 ` [Bug ipa/103818] [12 Regression] ICE: in insert, at ipa-modref-tree.c:591 since r12-3202-gf5ff3a8ed4ca9173 marxin at gcc dot gnu.org
2022-01-26 13:39 ` marxin at gcc dot gnu.org
2022-01-26 13:39 ` marxin at gcc dot gnu.org
2022-04-09 20:25 ` hubicka at gcc dot gnu.org
2022-04-11 16:00 ` jakub at gcc dot gnu.org
2022-04-12 10:50 ` hubicka at kam dot mff.cuni.cz [this message]
2022-04-20 9:01 ` cvs-commit at gcc dot gnu.org
2022-04-20 9:11 ` hubicka 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-103818-4-dsTsJIBKO8@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).