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

            Bug ID: 114681
           Summary: ICE: in as_a, at is-a.h:255 with -O
                    -fnon-call-exceptions -fno-exceptions
                    -fcondition-coverage
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: ipa
          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 57923
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57923&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -fnon-call-exceptions -fno-exceptions
-fcondition-coverage testcase.c
during IPA pass: inline
testcase.c: In function 'foo':
testcase.c:14:3: internal compiler error: in as_a, at is-a.h:255
   14 |   bar ();
      |   ^~~~~~
0x83b2a0 geh_filter const* as_a<geh_filter const*, gimple const>(gimple const*)
        /repo/gcc-trunk/gcc/is-a.h:255
0x83ee63 gcond* as_a<gcond*, gimple>(gimple*)
        /repo/gcc-trunk/gcc/hash-set.h:64
0x83ee63 copy_bb
        /repo/gcc-trunk/gcc/tree-inline.cc:2096
0x15a31aa copy_cfg_body
        /repo/gcc-trunk/gcc/tree-inline.cc:3087
0x15a31aa copy_body
        /repo/gcc-trunk/gcc/tree-inline.cc:3340
0x15a810e expand_call_inline
        /repo/gcc-trunk/gcc/tree-inline.cc:5143
0x15a9a49 gimple_expand_calls_inline
        /repo/gcc-trunk/gcc/tree-inline.cc:5343
0x15a9a49 optimize_inline_calls(tree_node*)
        /repo/gcc-trunk/gcc/tree-inline.cc:5515
0x12426bb inline_transform(cgraph_node*)
        /repo/gcc-trunk/gcc/ipa-inline-transform.cc:792
0x13d14f6 execute_one_ipa_transform_pass
        /repo/gcc-trunk/gcc/passes.cc:2334
0x13d14f6 execute_all_ipa_transforms(bool)
        /repo/gcc-trunk/gcc/passes.cc:2397
0xfcea7d cgraph_node::expand()
        /repo/gcc-trunk/gcc/cgraphunit.cc:1838
0xfcea7d cgraph_node::expand()
        /repo/gcc-trunk/gcc/cgraphunit.cc:1798
0xfcfdfa expand_all_functions
        /repo/gcc-trunk/gcc/cgraphunit.cc:2028
0xfcfdfa symbol_table::compile()
        /repo/gcc-trunk/gcc/cgraphunit.cc:2404
0xfd2977 symbol_table::compile()
        /repo/gcc-trunk/gcc/cgraphunit.cc:2315
0xfd2977 symbol_table::finalize_compilation_unit()
        /repo/gcc-trunk/gcc/cgraphunit.cc:2589
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-r14-9885-20240410075703-g109f1b28fc9-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.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-r14-9885-20240410075703-g109f1b28fc9-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240410 (experimental) (GCC)

Reply via email to