https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106460
Bug ID: 106460 Summary: internal compiler error: output_operand: invalid expression as operand on -O1 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: guojiufu at gcc dot gnu.org Target Milestone: --- For code: extern short var_48; void foo (double *r) { if (var_48) *r = 1234.5678; } On gcc trunk, using the below command, an ICE is raised: > gcc -mcpu=power10 -O1 t.c t.c:22:1: internal compiler error: output_operand: invalid expression as operand 22 | } | ^ 0x10bdb24b output_operand_lossage(char const*, ...) /home/guojiufu/gcc/gcc-mainline-base/gcc/final.cc:3234 0x10bdd2b7 output_addr_const(_IO_FILE*, rtx_def*) /home/guojiufu/gcc/gcc-mainline-base/gcc/final.cc:3831 0x11a64e57 assemble_integer_with_op(char const*, rtx_def*) /home/guojiufu/gcc/gcc-mainline-base/gcc/varasm.cc:2866 0x11a64f67 default_assemble_integer(rtx_def*, unsigned int, int) /home/guojiufu/gcc/gcc-mainline-base/gcc/varasm.cc:2882 0x11b0343f rs6000_assemble_integer /home/guojiufu/gcc/gcc-mainline-base/gcc/config/rs6000/rs6000.cc:14420 0x11a65063 assemble_integer(rtx_def*, unsigned int, unsigned int, int) /home/guojiufu/gcc/gcc-mainline-base/gcc/varasm.cc:2898 0x11a6b727 output_constant_pool_2 /home/guojiufu/gcc/gcc-mainline-base/gcc/varasm.cc:4074 0x11a6c20b output_constant_pool_1 /home/guojiufu/gcc/gcc-mainline-base/gcc/varasm.cc:4191 0x11a6cd87 output_constant_pool_contents /home/guojiufu/gcc/gcc-mainline-base/gcc/varasm.cc:4348 0x11a6d95b output_shared_constant_pool() /home/guojiufu/gcc/gcc-mainline-base/gcc/varasm.cc:4546 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.