https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72798
Bug ID: 72798 Summary: Module (.mod) file changes even when interface does not Product: gcc Version: 5.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: townsend at astro dot wisc.edu Target Milestone: --- Created attachment 39054 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39054&action=edit Test case demonstrating problem In a big project I'm involved in, we take advantage of the fact that gfortran's .mod files don't change across a recompilation, if the public interface of the module is unchanged. This allows us to avoid very time-consuming compilation cascades. However, I've run into a case where this desirable behavior doesn't seem to work. If I compile the attached module ('gfortran -c test_mod.f90') with and without the print statement commented out, I get .mod files which not only differ in contents, but also in size. Is this correct behavior? If so, how might I go about judging whether the public interface of a module has or hasn't changed?