Lines Matching refs:stmt
745 static bool type_name_eq(gimple stmt, const_tree type_tree, const char *wanted_name) in type_name_eq() argument
760 INFORM(gimple_location(stmt), "found non-char INTEGER_TYPE cast comparison: %qT\n", type_tree); in type_name_eq()
770 INFORM(gimple_location(stmt), "found non-void POINTER_TYPE cast comparison %qT\n", type_tree); in type_name_eq()
775 INFORM(gimple_location(stmt), "unhandled cast comparison: %qT\n", type_tree); in type_name_eq()
783 static bool whitelisted_cast(gimple stmt, const_tree lhs_tree, const_tree rhs_tree) in whitelisted_cast() argument
786 expanded_location xloc = expand_location(gimple_location(stmt)); in whitelisted_cast()
792 if (type_name_eq(stmt, lhs_tree, entry->lhs) && type_name_eq(stmt, rhs_tree, entry->rhs)) in whitelisted_cast()
815 gimple stmt; in find_bad_casts_execute() local
826 stmt = gsi_stmt(gsi); in find_bad_casts_execute()
830 debug_gimple_stmt(stmt); in find_bad_casts_execute()
831 debug_tree(gimple_get_lhs(stmt)); in find_bad_casts_execute()
835 if (gimple_code(stmt) != GIMPLE_ASSIGN) in find_bad_casts_execute()
840 debug_tree(gimple_assign_rhs1(stmt)); in find_bad_casts_execute()
845 rhs_code = gimple_assign_rhs_code(stmt); in find_bad_casts_execute()
850 lhs = gimple_get_lhs(stmt); in find_bad_casts_execute()
852 rhs1 = gimple_assign_rhs1(stmt); in find_bad_casts_execute()
876 if (!whitelisted_cast(stmt, ptr_lhs_type, ptr_rhs_type)) in find_bad_casts_execute()
877 MISMATCH(gimple_location(stmt), "rhs", ptr_lhs_type, ptr_rhs_type); in find_bad_casts_execute()
902 if (!whitelisted_cast(stmt, ptr_lhs_type, op0_type)) in find_bad_casts_execute()
903 MISMATCH(gimple_location(stmt), "op0", ptr_lhs_type, op0_type); in find_bad_casts_execute()
915 if (!whitelisted_cast(stmt, ptr_lhs_type, ptr_rhs_type)) in find_bad_casts_execute()
916 MISMATCH(gimple_location(stmt), "ssa", ptr_lhs_type, ptr_rhs_type); in find_bad_casts_execute()