https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103268
Bug ID: 103268 Summary: [12 regression] ICE om glib-2.10.1: internal compiler error: in optimize_atomic_bit_test_and, at tree-ssa-ccp.c:3626 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- ICE is initially observed on glib-2.70.1. Here is extracted example: // $ cat a.c.c void g_assertion_message_cmpnum(long); static int si; void test_types(long n) { unsigned u2 = ({ __atomic_fetch_xor(&si, 0, 5); }); long l = u2; g_assertion_message_cmpnum(l); } $ gcc-12.0.0 a.c.c -c -O2 a.c.c: In function 'test_types': a.c.c:5:22: warning: unused parameter 'n' [-Wunused-parameter] 5 | void test_types(long n) { | ~~~~~^ during GIMPLE pass: fab a.c.c:5:6: internal compiler error: in optimize_atomic_bit_test_and, at tree-ssa-ccp.c:3626 5 | void test_types(long n) { | ^~~~~~~~~~ 0x1df4a67 internal_error(char const*, ...) ???:0 0x8d493d fancy_abort(char const*, int, char const*) ???:0 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. $ gcc-12.0.0 -v Using built-in specs. COLLECT_GCC=/nix/store/kb1by7nzcqlv8j2hl7q0kks8fw8dpym0-gcc-12.0.0/bin/gcc COLLECT_LTO_WRAPPER=/nix/store/kb1by7nzcqlv8j2hl7q0kks8fw8dpym0-gcc-12.0.0/libexec/gcc/x86_64-unknown-linux-gnu/12.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20211114 (experimental) (GCC)