https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101123
--- Comment #2 from anlauf at gcc dot gnu.org --- Why on Earth would somebody really want to combine legacy MAX0 with IMPLICIT INTEGER*4 and -fdefault-integer-8? Reduced testcase: SUBROUTINE TEST IMPLICIT INTEGER*4 (I-N) MAXMN=MAX0(M,N) END Dump tree: __attribute__((fn spec (". "))) void test () { integer(kind=4) m; integer(kind=4) maxmn; integer(kind=4) n; { integer(kind=4) M.0; M.0 = m; M.0 = MAX_EXPR <n, M.0>; maxmn = (integer(kind=4)) (integer(kind=8)) M.0; } } Is the dump tree inaccurate? It matches my expectation. Note: the code compiles with MAX0 replaced by (the generic) MAX.