https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70281
--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> --- Minimized reproducer: $ cat bug.c const char *bch_stats_show (unsigned long cache_hits) { return (__builtin_types_compatible_p (typeof (cache_hits >> 16), int) ? "%i\n" : "%i\n"); } Am working on a fix.