public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "zhendong.su at inf dot ethz.ch" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/109417] New: ICE on valid code at -O3 on x86_64-linux-gnu: Segmentation fault
Date: Wed, 05 Apr 2023 07:54:28 +0000	[thread overview]
Message-ID: <bug-109417-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 109417
           Summary: ICE on valid code at -O3 on x86_64-linux-gnu:
                    Segmentation fault
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zhendong.su at inf dot ethz.ch
  Target Milestone: ---

This appears to be a recent regression.

Compiler Explorer: https://godbolt.org/z/eM6aG1aYc


[605] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/13.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk
--enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib
--with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.0.1 20230405 (experimental) [master r13-7008-gfdc5abbdcfb] (GCC)
[606] %
[606] % gcctk -O2 small.c; ./a.out
[607] %
[607] % gcctk -O3 small.c
during GIMPLE pass: vrp
small.c: In function ‘main’:
small.c:3:5: internal compiler error: Segmentation fault
    3 | int main() {
      |     ^~~~
0xeeb4bf crash_signal
        ../../gcc-trunk/gcc/toplev.cc:314
0x1cea605 gori_compute::may_recompute_p(tree_node*, basic_block_def*, int)
        ../../gcc-trunk/gcc/gimple-range-gori.cc:1322
0x1cda775 ranger_cache::range_from_dom(vrange&, tree_node*, basic_block_def*,
ranger_cache::rfd_mode)
        ../../gcc-trunk/gcc/gimple-range-cache.cc:1462
0x1cdc8e0 ranger_cache::range_from_dom(vrange&, tree_node*, basic_block_def*,
ranger_cache::rfd_mode)
        ../../gcc-trunk/gcc/gimple-range-cache.cc:1426
0x1cdc8e0 ranger_cache::fill_block_cache(tree_node*, basic_block_def*,
basic_block_def*)
        ../../gcc-trunk/gcc/gimple-range-cache.cc:1212
0x1cdd5a4 ranger_cache::block_range(vrange&, basic_block_def*, tree_node*,
bool)
        ../../gcc-trunk/gcc/gimple-range-cache.cc:1039
0x1cd3ce8 gimple_ranger::range_on_entry(vrange&, basic_block_def*, tree_node*)
        ../../gcc-trunk/gcc/gimple-range.cc:156
0x11bde4a remove_unreachable::remove_and_update_globals(bool)
        ../../gcc-trunk/gcc/tree-vrp.cc:156
0x11c066d remove_unreachable::remove_and_update_globals(bool)
        ../../gcc-trunk/gcc/tree-vrp.cc:1104
0x11c066d execute_ranger_vrp(function*, bool, bool)
        ../../gcc-trunk/gcc/tree-vrp.cc:1104
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
[608] %
[608] % cat small.c
int printf(const char *, ...);
int c, d, *e, f[1][2], g;
int main() {
  int h = 0, *a = &h, **b[1] = {&a};
  while (e)
    while (g) {
    L:
      for (h = 0; h < 2; h++) {
        while (d)
          for (*e = 0; *e < 1;)
            printf("0");
        while (c)
          ;
        f[g][h] = 0;
      }
    }
  if (h)
    goto L;
  return 0;
}

             reply	other threads:[~2023-04-05  7:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-05  7:54 zhendong.su at inf dot ethz.ch [this message]
2023-04-05  9:26 ` [Bug tree-optimization/109417] [13 Regression] " xry111 at gcc dot gnu.org
2023-04-05 18:24 ` [Bug tree-optimization/109417] [13 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: Segmentation fault since r13-6945 jakub at gcc dot gnu.org
2023-04-05 19:55 ` amacleod at redhat dot com
2023-04-06 12:32 ` cvs-commit at gcc dot gnu.org
2023-04-06 12:32 ` amacleod at redhat dot com
2023-04-26 19:25 ` cvs-commit 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-109417-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).