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

            Bug ID: 103064
           Summary: ICE: verify_ssa failed: RESULT_DECL should be read
                    only when DECL_BY_REFERENCE is set with
                    -fharden-conditional-branches
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu

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

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -fharden-conditional-branches -fno-tree-pta
testcase.C 
testcase.C: In function 'S f()':
testcase.C:14:3: error: RESULT_DECL should be read only when DECL_BY_REFERENCE
is set
   14 | S f() {
      |   ^
while verifying SSA_NAME s_7 in statement
__asm__("" : "=g" s_7 : "0" s_2(D));
during GIMPLE pass: hardcbr
testcase.C:14:3: internal compiler error: verify_ssa failed
0x184ac8f verify_ssa(bool, bool)
        /repo/gcc-trunk/gcc/tree-ssa.c:1212
0x1517c3d execute_function_todo
        /repo/gcc-trunk/gcc/passes.c:2049
0x151857b execute_todo
        /repo/gcc-trunk/gcc/passes.c:2096
Please submit a full bug report,
with preprocessed source if appropriate.
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-4872-20211103145922-g600dcd74b8e-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.0/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-4872-20211103145922-g600dcd74b8e-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20211103 (experimental) (GCC)

Reply via email to