https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104140
Bug ID: 104140 Summary: [12 Regression] ICE verify_gimple failed: type mismatch in binary expression since r12-6434-g0752c75536e Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: belyshev at depni dot sinp.msu.ru Target Milestone: --- $ cat bug.c int x; unsigned u, v; void f (void) { long long y = x; u = y * v >> 32; } void g (void) { f (); } $ gcc bug.c -S -O2 -march=rv32im -mabi=ilp32 # or: -march=rv32g -mabi=ilp32d bug.c: In function 'g': bug.c:8:6: error: type mismatch in binary expression 8 | void g (void) { f (); } | ^ int int unsigned int highparttmp_10 = x.0_2 h* v.1_4; during GIMPLE pass: widening_mul bug.c:8:6: internal compiler error: verify_gimple failed ... Found during bootstrap on riscv32 when compiling attribs.c. Bisected to r12-6434-g0752c75536e: Author: Roger Sayle <ro...@nextmovesoftware.com> Date: Tue Jan 11 12:30:44 2022 +0000 Recognize MULT_HIGHPART_EXPR in tree-ssa-math-opts pass.