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

            Bug ID: 105231
           Summary: [12 Regression] ICE: in rtl_verify_bb_insns, at
                    cfgrtl.cc:2797 (flow control insn inside a basic
                    block) with custom flags
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: rtl-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 52784
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52784&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -Os -fsanitize-coverage=trace-pc
-fnon-call-exceptions --param=max-cse-insns=1 -frounding-math -mstack-arg-probe
-fsanitize=thread -m32 testcase.c
testcase.c: In function 'foo':
testcase.c:7:1: error: in basic block 3:
    7 | }
      | ^
testcase.c:7:1: error: flow control insn inside a basic block
(insn 78 22 24 3 (set (reg:XF 99)
        (float_extend:XF (mem/u/c:SF (symbol_ref/u:SI ("*.LC0") [flags 0x2]) [0
 S4 A32]))) 166 {*extendsfxf2_i387}
     (expr_list:REG_EH_REGION (const_int 1 [0x1])
        (nil)))
during RTL pass: combine
testcase.c:7:1: internal compiler error: in rtl_verify_bb_insns, at
cfgrtl.cc:2797
0x76ddbe _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        /repo/gcc-trunk/gcc/rtl-error.cc:108
0xe954e3 rtl_verify_bb_insns
        /repo/gcc-trunk/gcc/cfgrtl.cc:2797
0xe9ea5c rtl_verify_flow_info_1
        /repo/gcc-trunk/gcc/cfgrtl.cc:2883
0xe83dfa verify_flow_info()
        /repo/gcc-trunk/gcc/cfghooks.cc:282
0x22a4bb8 checking_verify_flow_info
        /repo/gcc-trunk/gcc/cfghooks.h:214
0x22a4bb8 try_optimize_cfg
        /repo/gcc-trunk/gcc/cfgcleanup.cc:2980
0x22a4bb8 cleanup_cfg(int)
        /repo/gcc-trunk/gcc/cfgcleanup.cc:3143
0x22d0820 rest_of_handle_combine
        /repo/gcc-trunk/gcc/combine.cc:14942
0x22d0820 execute
        /repo/gcc-trunk/gcc/combine.cc:14976
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-r12-8090-20220411190659-g1774ab84863-checking-yes-rtl-df-extra-nobootstrap-pr105211-pr105214-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.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 --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r12-8090-20220411190659-g1774ab84863-checking-yes-rtl-df-extra-nobootstrap-pr105211-pr105214-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.1 20220411 (experimental) (GCC)

Both vanilla gcc r12-8090 and with pr105211 and pr105214 patches applies ICE
the same way.

Reply via email to