+ for (i = n_res - 1; i >= 0; --i) {
+ ir_type *decl_res_tp = get_method_res_type(mtp, i);
+ ir_type *used_res_tp = get_method_res_type(ctp, i);
+
+ if (decl_res_tp != used_res_tp) {
+ ir_mode *decl_mode = get_type_mode(decl_res_tp);
+ ir_mode *used_mode = get_type_mode(used_res_tp);
+ if (decl_mode == NULL || used_mode == NULL)
+ return 0;
+ if (get_mode_size_bits(decl_mode) != get_mode_size_bits(used_mode))
+ return 0;
+ if (get_mode_arithmetic(decl_mode) != get_mode_arithmetic(used_mode))
+ return 0;
+ /* otherwise we can "reinterpret" the bits */
+ }
+ }