https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97360
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 CC| |rguenth at gcc dot gnu.org --- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> --- See verify_gimple_comparison for what GIMPLE allows [to slip through]: /* For comparisons we do not have the operations type as the effective type the comparison is carried out in. Instead we require that either the first operand is trivially convertible into the second, or the other way around. Because we special-case pointers to void we allow comparisons of pointers with the same mode as well. */ if (!useless_type_conversion_p (op0_type, op1_type) && !useless_type_conversion_p (op1_type, op0_type) && (!POINTER_TYPE_P (op0_type) || !POINTER_TYPE_P (op1_type) || TYPE_MODE (op0_type) != TYPE_MODE (op1_type))) { so this is the two pointers, same mode "exception". I don't see the void * special-casing anymore though. That means removing the exception above and fixing the fallout might be the way to go. I guess FEs are in the end responsible for the above.