This field is built as a gcov_unsigned_t but declared as a plain "unsigned", which breaks all int16 targets:
/* n_functions */ field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, get_gcov_unsigned_t ()); DECL_CHAIN (field) = fields; fields = field; Assuming we want to support more then 65536 functions on int16 targets, how about this semi-obvious patch? Index: gcov-io.h =================================================================== --- gcov-io.h (revision 182614) +++ gcov-io.h (working copy) @@ -444,13 +444,13 @@ struct gcov_info gcov_unsigned_t stamp; /* uniquifying time stamp */ const char *filename; /* output file name */ gcov_merge_fn merge[GCOV_COUNTERS]; /* merge functions (null for unused) */ - unsigned n_functions; /* number of functions */ + gcov_unsigned_t n_functions; /* number of functions */ const struct gcov_fn_info *const *functions; /* pointer to pointers to function information */ }; /* Register a new object file module. */ extern void __gcov_init (struct gcov_info *) ATTRIBUTE_HIDDEN;