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

            Bug ID: 119599
           Summary: [15 Regression] ICE: in single_succ_edge, at
                    basic-block.h:332 with __noreturn__ function that
                    returns
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 60965
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60965&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -finstrument-functions-once testcase.c 
testcase.c: In function 'bar':
testcase.c:1:76: warning: 'noreturn' function does return
    1 | static inline __attribute__((__always_inline__, __noreturn__)) void
bar() {}
      |                                                                        
   ^
during GIMPLE pass: local-fnsummary
testcase.c: In function 'foo':
testcase.c:2:1: internal compiler error: in single_succ_edge, at
basic-block.h:332
    2 | void foo() { bar(); }
      | ^~~~
0x2df96e1 internal_error(char const*, ...)
        /repo/gcc-trunk/gcc/diagnostic-global-context.cc:517
0xef8363 fancy_abort(char const*, int, char const*)
        /repo/gcc-trunk/gcc/diagnostic.cc:1749
0x803fb2 single_succ_edge(basic_block_def const*)
        /repo/gcc-trunk/gcc/basic-block.h:332
0x803fb2 single_succ_edge(basic_block_def const*)
        /repo/gcc-trunk/gcc/basic-block.h:330
0x803fb2 builtin_unreachable_bb_p
        /repo/gcc-trunk/gcc/ipa-fnsummary.cc:2711
0x803fb2 guards_builtin_unreachable
        /repo/gcc-trunk/gcc/ipa-fnsummary.cc:2733
0x803fb2 find_necessary_statements
        /repo/gcc-trunk/gcc/ipa-fnsummary.cc:2808
0x1389105 analyze_function_body
        /repo/gcc-trunk/gcc/ipa-fnsummary.cc:2934
0x138ccf8 compute_fn_summary(cgraph_node*, bool)
        /repo/gcc-trunk/gcc/ipa-fnsummary.cc:3476
0x138d1cd compute_fn_summary_for_current
        /repo/gcc-trunk/gcc/ipa-fnsummary.cc:3506
0x138d1cd execute
        /repo/gcc-trunk/gcc/ipa-fnsummary.cc:5161
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.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-20250401222213-r15-9143-g063fbd5a10d47d-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/15.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --enable-libsanitizer
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-20250401222213-r15-9143-g063fbd5a10d47d-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.0.1 20250402 (experimental) (GCC)

Reply via email to