https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117432
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- func_checker::compare_gimple_call Does: /* Checking of argument. */ for (i = 0; i < gimple_call_num_args (s1); ++i) { t1 = gimple_call_arg (s1, i); t2 = gimple_call_arg (s2, i); if (!compare_operand (t1, t2, get_operand_access_type (&map, t1))) return return_false_with_msg ("GIMPLE call operands are different"); } But then compare_operand does: if (operand_equal_p (t1, t2, OEP_MATCH_SIDE_EFFECTS)) return true; BUT operand_equal_p will returns true for -1 with different types: /* Check equality of integer constants before bailing out due to precision differences. */ if (TREE_CODE (arg0) == INTEGER_CST && TREE_CODE (arg1) == INTEGER_CST) { /* Address of INTEGER_CST is not defined; check that we did not forget to drop the OEP_ADDRESS_OF flags. */ gcc_checking_assert (!(flags & OEP_ADDRESS_OF)); return tree_int_cst_equal (arg0, arg1); } So maybe I suspect there needs to be a check for the type difference in func_checker::compare_gimple_call. But I am not 100% sure if there are other cases where the operand_equal_p will return true and the types mismatch matter though; Maybe there is not one except for call arguments. Maybe OEP_BITWISE should be passed to operand_equal_p here ...