https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84513
Bug ID: 84513 Summary: gfortran -M generates circular dependency Product: gcc Version: 7.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: eh.toussaint at gmail dot com Target Milestone: --- When using the -M option to let gfortran generate a rule for inclusion in makefiles, the following code (all in one file) results in a circular dependency for the .mod file. $ cat foobar.f90 module bar end module program foo use bar end program ---end foobar.f90 $ gfortran -cpp -M foobar.f90 foobar.o bar.mod: foobar.f90 bar.mod It's not a major problem, because (GNU) Make simply drops it with the following message, but I'd still like to report it for the sake of neatness. make: Circular bar.mod <- bar.mod dependency dropped.