https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128258
Bug ID: 128258
Summary: ICE at O2: output_operand: invalid expression as
operand
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: bic60176 at gmail dot com
Target Milestone: ---
Created attachment 66018
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=66018&action=edit
testcase
Compiler Explorer: https://godbolt.org/z/h7vWr9Tfq
Console:
<source>:21:1: internal compiler error: output_operand: invalid expression as
operand
21 | }
| ^
0x2912368 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x2906fab internal_error(char const*, ...)
???:0
0xde6197 output_operand_lossage(char const*, ...)
???:0
0xde6ae2 output_addr_const(_IO_FILE*, rtx_def*)
???:0
0xde6ae2 output_addr_const(_IO_FILE*, rtx_def*)
???:0
0x169f101 default_assemble_integer(rtx_def*, unsigned int, int)
???:0
0x169f191 assemble_integer(rtx_def*, unsigned int, unsigned int, int)
???:0
0x16b121f assemble_variable(tree_node*, int, int, int)
???:0
0x16b6d26 symbol_table::output_variables()
???:0
0xcda356 symbol_table::finalize_compilation_unit()
???:0
/cefs/7f/7fa6d45b591391d387e52988_gcc-trunk-20261028/bin/../libexec/gcc/x86_64-linux-gnu/17.0.0/cc1
-quiet -imultiarch x86_64-linux-gnu -iprefix
/cefs/7f/7fa6d45b591391d387e52988_gcc-trunk-20261028/bin/../lib/gcc/x86_64-linux-gnu/17.0.0/
<source> -quiet -dumpdir /app/ -dumpbase output.c -dumpbase-ext .c -masm=intel
-mtune=generic -march=x86-64 -g -O2 -fdiagnostics-color=always -fno-verbose-asm
-o /app/output.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.
Compiler returned: 1