public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/110601] New: [14 Regression] ICE on systemd-253.5: during GIMPLE pass: cunroll: internal compiler error: Segmentation fault in scale_loop_profile()
@ 2023-07-08 20:24 slyfox at gcc dot gnu.org
  2023-07-08 20:27 ` [Bug middle-end/110601] " slyfox at gcc dot gnu.org
  2023-07-08 20:28 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-07-08 20:24 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110601
           Summary: [14 Regression] ICE on systemd-253.5: during GIMPLE
                    pass: cunroll: internal compiler error: Segmentation
                    fault in scale_loop_profile()
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at gcc dot gnu.org
  Target Milestone: ---

Noticed ICE on gcc-master r14-2396-g15bbf1826a01f5 when building systemd-253.5

cvise came up with this test:

// $ cat bug.c
int high_key_blocks[] = {0, 0};
int high_key_blocks_0_0;
long test_key_bitmask_key;
void log_object_internal();
void test_key() {
  _Bool found = 0;
  for (long i;;)
    for (long block = 0;
         block < sizeof(high_key_blocks) / sizeof(int) && !found; block++)
      for (i = high_key_blocks_0_0; i && !found; i++)
        if (test_key_bitmask_key) {
          log_object_internal();
          found = 1;
        }
}

Crashing:

$ gcc  -c bug.c -o bug.o -O2 -Werror -Wall
during GIMPLE pass: cunroll
bug.c: In function 'test_key':
bug.c:5:6: internal compiler error: Segmentation fault
    5 | void test_key() {
      |      ^~~~~~~~
0xccc87f crash_signal
        ../../source/gcc/toplev.cc:314
0x85aafe fprintf
       
/nix/store/2bhnayqiskhnif3nhs26kkai342dz4dz-glibc-2.37-8-dev/include/bits/stdio2.h:79
0x85aafe scale_loop_profile(loop*, profile_probability, long)
        ../../source/gcc/cfgloopmanip.cc:585
0xdfa332 try_unroll_loop_completely
        ../../source/gcc/tree-ssa-loop-ivcanon.cc:911
0xdfa332 canonicalize_loop_induction_variables
        ../../source/gcc/tree-ssa-loop-ivcanon.cc:1286
0xdfb667 tree_unroll_loops_completely_1
        ../../source/gcc/tree-ssa-loop-ivcanon.cc:1429
0xdfb5be tree_unroll_loops_completely_1
        ../../source/gcc/tree-ssa-loop-ivcanon.cc:1382
0xdfb5be tree_unroll_loops_completely_1
        ../../source/gcc/tree-ssa-loop-ivcanon.cc:1382
0xdfb83b tree_unroll_loops_completely
        ../../source/gcc/tree-ssa-loop-ivcanon.cc:1478
0xdfbc3f execute
        ../../source/gcc/tree-ssa-loop-ivcanon.cc:1644
0xdfbc3f execute
        ../../source/gcc/tree-ssa-loop-ivcanon.cc:1634

$ gcc -v
Using built-in specs.
COLLECT_GCC=/<<NIX>>/gcc-14.0.0/bin/gcc
COLLECT_LTO_WRAPPER=/<<NIX>>/gcc-14.0.0/libexec/gcc/x86_64-unknown-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../source/configure --prefix=/<<NIX>>/gcc-14.0.0
--with-gmp-include=/<<NIX>>/gmp-6.2.1-dev/include
--with-gmp-lib=/<<NIX>>/gmp-6.2.1/lib
--with-mpfr-include=/<<NIX>>/mpfr-4.2.0-dev/include
--with-mpfr-lib=/<<NIX>>/mpfr-4.2.0/lib --with-mpc=/<<NIX>>/libmpc-1.3.1
--with-native-system-header-dir=/<<NIX>>/glibc-2.37-8-dev/include
--with-build-sysroot=/ --program-prefix= --enable-lto --disable-libstdcxx-pch
--without-included-gettext --with-system-zlib --enable-checking=release
--enable-static --enable-languages=c,c++ --disable-multilib --enable-plugin
--disable-libcc1 --with-isl=/<<NIX>>/isl-0.20 --disable-bootstrap
--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu
--target=x86_64-unknown-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 99999999 (experimental) (GCC)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug middle-end/110601] [14 Regression] ICE on systemd-253.5: during GIMPLE pass: cunroll: internal compiler error: Segmentation fault in scale_loop_profile()
  2023-07-08 20:24 [Bug middle-end/110601] New: [14 Regression] ICE on systemd-253.5: during GIMPLE pass: cunroll: internal compiler error: Segmentation fault in scale_loop_profile() slyfox at gcc dot gnu.org
@ 2023-07-08 20:27 ` slyfox at gcc dot gnu.org
  2023-07-08 20:28 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-07-08 20:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Created attachment 55505
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55505&action=edit
bug.c.org

Attaching bug.c.org in case reduced example is too artificial.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug middle-end/110601] [14 Regression] ICE on systemd-253.5: during GIMPLE pass: cunroll: internal compiler error: Segmentation fault in scale_loop_profile()
  2023-07-08 20:24 [Bug middle-end/110601] New: [14 Regression] ICE on systemd-253.5: during GIMPLE pass: cunroll: internal compiler error: Segmentation fault in scale_loop_profile() slyfox at gcc dot gnu.org
  2023-07-08 20:27 ` [Bug middle-end/110601] " slyfox at gcc dot gnu.org
@ 2023-07-08 20:28 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-08 20:28 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup.

*** This bug has been marked as a duplicate of bug 110600 ***

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-08 20:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-08 20:24 [Bug middle-end/110601] New: [14 Regression] ICE on systemd-253.5: during GIMPLE pass: cunroll: internal compiler error: Segmentation fault in scale_loop_profile() slyfox at gcc dot gnu.org
2023-07-08 20:27 ` [Bug middle-end/110601] " slyfox at gcc dot gnu.org
2023-07-08 20:28 ` pinskia at gcc dot gnu.org

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).