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

            Bug ID: 104522
           Summary: ICE: in real_to_decimal_for_mode, at real.cc:1770 with
                    -O -fcompare-debug
           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 52433
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52433&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -fcompare-debug testcase.c
during RTL pass: *clean_state
testcase.c: In function 'foo':
testcase.c:10:1: internal compiler error: in real_to_decimal_for_mode, at
real.cc:1770
   10 | }
      | ^
0x75757a real_to_decimal_for_mode(char*, real_value const*, unsigned long,
unsigned long, int, machine_mode)
        /repo/gcc-trunk/gcc/real.cc:1770
0x12bd744 rtx_writer::print_rtx(rtx_def const*)
        /repo/gcc-trunk/gcc/print-rtl.cc:981
0x12be1a2 rtx_writer::print_rtx_operand_code_e(rtx_def const*, int)
        /repo/gcc-trunk/gcc/print-rtl.cc:359
0x12bd34f rtx_writer::print_rtx(rtx_def const*)
        /repo/gcc-trunk/gcc/print-rtl.cc:938
0x12be1a2 rtx_writer::print_rtx_operand_code_e(rtx_def const*, int)
        /repo/gcc-trunk/gcc/print-rtl.cc:359
0x12bd34f rtx_writer::print_rtx(rtx_def const*)
        /repo/gcc-trunk/gcc/print-rtl.cc:938
0x12bf340 rtx_writer::print_rtl_single_with_indent(rtx_def const*, int)
        /repo/gcc-trunk/gcc/print-rtl.cc:1245
0x12bf39f print_rtl_single(_IO_FILE*, rtx_def const*)
        /repo/gcc-trunk/gcc/print-rtl.cc:1228
0xfc2a36 rest_of_clean_state
        /repo/gcc-trunk/gcc/final.cc:4494
0xfc2a36 execute
        /repo/gcc-trunk/gcc/final.cc:4584
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-7217-20220213164646-g57da3493970-checking-yes-rtl-df-extra-nobootstrap-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-7217-20220213164646-g57da3493970-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.1 20220213 (experimental) (GCC)

Reply via email to