http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59604
--- Comment #3 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Fri, Dec 27, 2013 at 06:10:23PM +0000, kargl at gcc dot gnu.org wrote: > > By the time we reach gfc_int2int, the boz should have been converted > to the integer, but isn't. Now, if we compare gfc_simplify_int to > gfc_simplify_real, we see in gfc_simplify_real, > > if (convert_boz (e, kind) == &gfc_bad_expr) > return &gfc_bad_expr; > > where convert_boz will do an explicit conversion of a boz to a > real type. There isn't a similar functionality for integer. > I forgot to mention that gfortran may be delaying the conversion under the translation to the middle-end, so tit can rely on the middle-end for wrap-around semantics of twos-complement signed integer arithmetic.