https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89977
JunMa <JunMa at linux dot alibaba.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |JunMa at linux dot alibaba.com --- Comment #1 from JunMa <JunMa at linux dot alibaba.com> --- in function f, the conversion of stmt _1 = (long unsigned int) n_3 is extending, while in function g, the conversion of stmt _1 = (long unsigned int) n_3 is truncating. For integer type truncation, gcc compute the range of target only if the range size of source is less than what the precision of the target type can represent. I think this can be relaxed when the target type of truncation is unsigned.