[Bug target/126434] [17 Regression] ICE: invalid rtl sharing found in the insn {zero_extendsidi2}

zsojka at seznam dot cz via Gcc-bugs <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126434

--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> ---
Created attachment 65144
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65144&action=edit
reduced testcase

(I am sorry for the empty Description, I pressed Enter by mistake)

Compiler output:
$ powerpc64le-unknown-linux-gnu-gcc -O1 -favoid-store-forwarding
--param=store-forwarding-max-distance=146 testcase.c
testcase.c: In function 'foo':
testcase.c:9:1: error: invalid rtl sharing found in the insn
    9 | }
      | ^
(insn 46 43 14 2 (set (subreg:DI (reg:TI 134 [ _2 ]) 0)
        (zero_extend:DI (subreg:SI (reg:TI 134 [ _2 ]) 0))) "testcase.c":8:5 16
{zero_extendsidi2}
     (nil))
testcase.c:9:1: error: shared rtx
(subreg:DI (reg:TI 134 [ _2 ]) 0)
during RTL pass: avoid_store_forwarding
testcase.c:9:1: internal compiler error: internal consistency failure
0x23c5dcd internal_error(char const*, ...)
        /repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0xd1f25c verify_rtx_sharing
        /repo/gcc-trunk/gcc/emit-rtl.cc:3061
0xd1efda verify_rtx_sharing
        /repo/gcc-trunk/gcc/emit-rtl.cc:3076
0xd200f3 verify_insn_sharing
        /repo/gcc-trunk/gcc/emit-rtl.cc:3146
0xd245cf verify_rtl_sharing()
        /repo/gcc-trunk/gcc/emit-rtl.cc:3169
0x10f2adf execute_function_todo
        /repo/gcc-trunk/gcc/passes.cc:2121
0x10f2fd7 execute_todo
        /repo/gcc-trunk/gcc/passes.cc:2152
/repo/gcc-trunk/binary-trunk-20260727043948-r17-2723-g3f2b3eced0f827-checking-yes-rtl-df-extra-powerpc64le/bin/../libexec/gcc/powerpc64le-unknown-linux-gnu/17.0.0/cc1
-quiet -iprefix
/repo/gcc-trunk/binary-trunk-20260727043948-r17-2723-g3f2b3eced0f827-checking-yes-rtl-df-extra-powerpc64le/bin/../lib/gcc/powerpc64le-unknown-linux-gnu/17.0.0/
testcase.c -quiet -dumpdir a- -dumpbase testcase.c -dumpbase-ext .c -O1
-favoid-store-forwarding --param=store-forwarding-max-distance=146 -o
/tmp/ccwOVa5w.s
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.