https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100785
Bug ID: 100785 Summary: ICE: in expand_asm_stmt, at cfgexpand.c:3401 Product: gcc Version: tree-ssa Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: cnsun at uwaterloo dot ca Target Milestone: --- $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/configure --enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch --prefix=/scratch/software/gcc-trunk --disable-bootstrap Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20210526 (experimental) [master revision :21638bbbf:1fd76b24306ed4df4cf9e797d900699ed59ce7f7] (GCC) $ cat mutant.c foo(struct { int a : 1; } * x) { __asm__("" : "+m"(x->a)); } $ gcc-trunk mutant.c mutant.c:1:5: warning: anonymous struct declared inside parameter list will not be visible outside of this definition or declaration 1 | foo(struct { int a : 1; } * x) { __asm__("" : "+m"(x->a)); } | ^~~~~~ mutant.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | foo(struct { int a : 1; } * x) { __asm__("" : "+m"(x->a)); } | ^~~ mutant.c: In function ‘foo’: mutant.c:1:34: error: output number 0 not directly addressable 1 | foo(struct { int a : 1; } * x) { __asm__("" : "+m"(x->a)); } | ^~~~~~~ during RTL pass: expand mutant.c:1:34: internal compiler error: in expand_asm_stmt, at cfgexpand.c:3401 0x68b3a6 expand_asm_stmt /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/cfgexpand.c:3401 0xa41bb9 expand_gimple_stmt_1 /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/cfgexpand.c:3847 0xa41bb9 expand_gimple_stmt /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/cfgexpand.c:4014 0xa47d09 expand_gimple_basic_block /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/cfgexpand.c:6056 0xa49bdf execute /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/cfgexpand.c:6782 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.