https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103235
Bug ID: 103235 Summary: [12 Regression] Recent change to atomics triggers ICE Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: law at gcc dot gnu.org Target Milestone: --- Created attachment 51790 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51790&action=edit Testcase This change: commit fb161782545224f55ba26ba663889c5e6e9a04d1 Author: liuhongt <hongtao....@intel.com> Date: Mon Oct 25 13:59:51 2021 +0800 Improve integer bit test on __atomic_fetch_[or|and]_* returns Is causing various ports (csky, mips*, s390, maybe others) to fail to build glibc: bash-5.1# ./cc1 -O2 /tmp/pthread_cancel.i -quiet pthread_cancel.c: In function '__pthread_cancel': pthread_cancel.c:60:1: error: type mismatch in binary expression int unsigned int int _36 = _4 & 8; during GIMPLE pass: fab pthread_cancel.c:60:1: internal compiler error: verify_gimple failed 0x11a2ef3 verify_gimple_in_cfg(function*, bool) ../../../gcc/gcc/tree-cfg.c:5577 0xff2179 execute_function_todo ../../../gcc/gcc/passes.c:2042 0xff1115 do_per_function ../../../gcc/gcc/passes.c:1687 0xff2369 execute_todo ../../../gcc/gcc/passes.c:2096 Attached is a testcase that ought to trigger with a csky-linux-gnu cross compiler. I haven't done any debugging other than to bisect to the change above.