https://codereview.appspot.com/7393058/diff/8001/libgcc/dyn-ipa.c File libgcc/dyn-ipa.c (right):
https://codereview.appspot.com/7393058/diff/8001/libgcc/dyn-ipa.c#newcode235 libgcc/dyn-ipa.c:235: /* Return module_id. FUNC_GUID is the global unique id. */ Add a comment here that the returned value is 1 based. https://codereview.appspot.com/7393058/diff/8001/libgcc/dyn-ipa.c#newcode238 libgcc/dyn-ipa.c:238: get_module_id_from_func_glob_uid (gcov_type func_guid) get_module_ident_ ... is better. https://codereview.appspot.com/7393058/diff/8001/libgcc/dyn-ipa.c#newcode246 libgcc/dyn-ipa.c:246: get_module_id_value (const struct gcov_info *module_info) get_module_ident is better. https://codereview.appspot.com/7393058/diff/8001/libgcc/dyn-ipa.c#newcode1212 libgcc/dyn-ipa.c:1212: mod_id = get_module_id_from_func_glob_uid (node->guid) - 1; Change var name from mod_id to mod_idx https://codereview.appspot.com/7393058/diff/8001/libgcc/dyn-ipa.c#newcode1232 libgcc/dyn-ipa.c:1232: callee_mod_id --> callee_mod_idx https://codereview.appspot.com/7393058/diff/8001/libgcc/dyn-ipa.c#newcode1250 libgcc/dyn-ipa.c:1250: = get_module_info (callee_mod_id); Should be get_module_info (callee_mod_idx + 1). You should carefully check to make sure NO interfaces takes idx as parameters, and no interface returns idx. https://codereview.appspot.com/7393058/diff/8001/libgcc/dyn-ipa.c#newcode2234 libgcc/dyn-ipa.c:2234: /* Dumper function for NODE. M is the module id and F is the function id. */ M is module ident - 1 https://codereview.appspot.com/7393058/diff/8001/libgcc/dyn-ipa.c#newcode2276 libgcc/dyn-ipa.c:2276: /* Dumper function for NODE. M is the module id and F is the function id. */ M is module_ident -1 https://codereview.appspot.com/7393058/