https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82976 --- Comment #3 from Janne Blomqvist <jb at gcc dot gnu.org> --- Yes, the logical(kind=4) definitely comes from the frontend. If you compile with -fdefault-integer-8 it changes to a logical(kind=8).