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 ipa/109639] [14 regression] Internal compiler error: tree check: expected integer_cst, have addr_expr in to_wide, at tree.h:6283 since r14-249-g3c9372dfee0bb8
Date: Thu, 27 Apr 2023 11:59:12 +0000	[thread overview]
Message-ID: <bug-109639-4-yfJpncYstV@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109639-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Aldy Hernandez <aldyh@gcc.gnu.org>:

https://gcc.gnu.org/g:2b8ac1df6493eb1789c7c4d9f3df280ef9cf0ac4

commit r14-298-g2b8ac1df6493eb1789c7c4d9f3df280ef9cf0ac4
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Thu Apr 27 12:05:36 2023 +0200

    Normalize addresses in IPA before calling range_op_handler [PR109639]

    The old legacy code would allow building ranges containing symbolics,
    even though the entire ranger ecosystem does not handle them.  These
    were normalized into non-zero ranges by helper functions in VRP
    (range_fold_*_expr) before calling the ranger.  The only users of
    these functions should have been legacy VRP, which is no more.
    However, a handful of users crept into IPA, even though these
    functions shouldn't never been called outside of VRP or vr-values.

    The issue here is that IPA is building a range of [&foo, &foo] and
    expecting range_fold_binary to normalize it to non-zero.  Fixed by
    adding a helper function before calling the range_op handler.

    I think these covers the problematic ranges.  If not, I'll come up
    with something more generalized that does not involve polluting
    irange::set with the normalization code.  After all, this only
    involves a handful of IPA places.

    I've also added an assert in irange::set() making it easier to detect
    any possible fallout without having to drill deep into the setter.

    gcc/ChangeLog:

            PR tree-optimization/109639
            * ipa-cp.cc (ipa_value_range_from_jfunc): Normalize range.
            (propagate_vr_across_jump_function): Same.
            * ipa-fnsummary.cc (evaluate_conditions_for_known_args): Same.
            * ipa-prop.h (ipa_range_set_and_normalize): New.
            * value-range.cc (irange::set): Assert min and max are INTEGER_CST.

  parent reply	other threads:[~2023-04-27 11:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-26 23:15 [Bug tree-optimization/109639] New: [14 regression] Internal compiler error: tree check: expected integer_cst, have addr_expr in to_wide, at tree.h:6283 sjames at gcc dot gnu.org
2023-04-27  0:34 ` [Bug tree-optimization/109639] " sjames at gcc dot gnu.org
2023-04-27  2:56 ` sjames at gcc dot gnu.org
2023-04-27  3:00 ` pinskia at gcc dot gnu.org
2023-04-27  3:01 ` pinskia at gcc dot gnu.org
2023-04-27  4:22 ` pinskia at gcc dot gnu.org
2023-04-27  4:22 ` pinskia at gcc dot gnu.org
2023-04-27  5:13 ` sjames at gcc dot gnu.org
2023-04-27  5:14 ` sjames at gcc dot gnu.org
2023-04-27  5:45 ` [Bug tree-optimization/109639] [14 regression] Internal compiler error: tree check: expected integer_cst, have addr_expr in to_wide, at tree.h:6283 since r14-249-g3c9372dfee0bb8 sjames at gcc dot gnu.org
2023-04-27  6:13 ` pinskia at gcc dot gnu.org
2023-04-27  6:14 ` pinskia at gcc dot gnu.org
2023-04-27  6:43 ` rguenth at gcc dot gnu.org
2023-04-27  9:01 ` [Bug ipa/109639] " aldyh at gcc dot gnu.org
2023-04-27  9:08 ` aldyh at gcc dot gnu.org
2023-04-27  9:11 ` aldyh at gcc dot gnu.org
2023-04-27 10:11 ` aldyh at gcc dot gnu.org
2023-04-27 11:59 ` cvs-commit at gcc dot gnu.org [this message]
2023-04-27 12:00 ` aldyh 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-109639-4-yfJpncYstV@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).