public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "asolokha at gmx dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/107570] New: [13 Regression] ICE: Segmentation fault (in instantiate_scev_name/gimple_bb)
Date: Tue, 08 Nov 2022 13:52:05 +0000	[thread overview]
Message-ID: <bug-107570-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 107570
           Summary: [13 Regression] ICE: Segmentation fault (in
                    instantiate_scev_name/gimple_bb)
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc 13.0.0 20221106 snapshot (g:c56826d0f3b143a9cb64ee263707046f8073c1b6) ICEs
when compiling the following testcase w/ -Os:

long int n;

void
foo (int *p, int x)
{
  for (;;)
    {
      for (*p = 0; *p < 1; ++*p)
        {
          n += *p < 0;
          if (n < x)
            {
              while (x < 1)
                ++x;

              __builtin_unreachable ();
            }
        }

      p = &x;
    }
}

% gcc-13 -Os -c dpim0i6y.c
during GIMPLE pass: vrp
dpim0i6y.c: In function 'foo':
dpim0i6y.c:4:1: internal compiler error: Segmentation fault
    4 | foo (int *p, int x)
      | ^~~
0xf0e7af crash_signal
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/toplev.cc:314
0xff9e27 gimple_bb
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/gimple.h:1904
0xff9e27 instantiate_scev_name
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/tree-scalar-evolution.cc:2270
0xff9e27 instantiate_scev_r
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/tree-scalar-evolution.cc:2644
0xff9cec instantiate_scev_poly
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/tree-scalar-evolution.cc:2424
0xff9cec instantiate_scev_r
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/tree-scalar-evolution.cc:2649
0xffa8c2 instantiate_scev(edge_def*, loop*, tree_node*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/tree-scalar-evolution.cc:2726
0x129350a instantiate_parameters
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/tree-scalar-evolution.h:63
0x129350a bounds_of_var_in_loop(tree_node**, tree_node**, range_query*, loop*,
gimple*, tree_node*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/vr-values.cc:1672
0x1d78ff3 fold_using_range::range_of_ssa_name_with_loop_info(vrange&,
tree_node*, loop*, gphi*, fur_source&)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/gimple-range-fold.cc:957
0x1d79bab fold_using_range::range_of_phi(vrange&, gphi*, fur_source&)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/gimple-range-fold.cc:820
0x1d7c4d8 fold_using_range::fold_stmt(vrange&, gimple*, fur_source&,
tree_node*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/gimple-range-fold.cc:491
0x1d6e183 gimple_ranger::fold_range_internal(vrange&, gimple*, tree_node*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/gimple-range.cc:257
0x1d6e183 gimple_ranger::range_of_stmt(vrange&, gimple*, tree_node*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/gimple-range.cc:318
0x1d6cab7 gimple_ranger::range_on_entry(vrange&, basic_block_def*, tree_node*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/gimple-range.cc:153
0x11f2436 remove_unreachable::remove_and_update_globals(bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/tree-vrp.cc:151
0x11f66ba remove_unreachable::remove_and_update_globals(bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/tree-vrp.cc:4536
0x11f66ba execute_ranger_vrp(function*, bool, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221106/work/gcc-13-20221106/gcc/tree-vrp.cc:4536

             reply	other threads:[~2022-11-08 13:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 13:52 asolokha at gmx dot com [this message]
2022-11-08 15:11 ` [Bug tree-optimization/107570] " rguenth at gcc dot gnu.org
2022-11-21 12:12 ` [Bug tree-optimization/107570] [13 Regression] ICE: Segmentation fault (in instantiate_scev_name/gimple_bb) since r13-3595-g7b1cdca6d6d594a8 marxin at gcc dot gnu.org
2023-02-01 17:56 ` jakub at gcc dot gnu.org
2023-02-01 18:12 ` amacleod at redhat dot com
2023-02-03 19:43 ` cvs-commit at gcc dot gnu.org
2023-02-03 19:43 ` amacleod at redhat dot com

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-107570-4@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).