http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47720
Summary: problems with makefile dependency generation using -M Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: kristopher.kuhl...@gmail.com Created attachment 23327 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23327 two small test codes that illustrate problem I am in Ubuntu using a trunk build of gfortran from yesterday. When I try to create makefile dependencies using -M, first it complains that I need to use CPP to pre-process the code, even though there are no CPP directives in this code. The test code compiles file otherwise: $ gfortran-4.6 -c makegen1.f90 $ gfortran-4.6 -c makegen2.f90 $ gfortran-4.6 -M makegen?.f90 Fatal Error: To enable preprocessing, use -cpp Fatal Error: To enable preprocessing, use -cpp secondly, when I add the -cpp flag, I get redundant mentions of use of a common module. In this test code it shows up 3 times (see constants.mod mentioned 3 times). Can gfortran not repeat the same module several times? $ gfortran-4.6 -cpp -M makegen?.f90 makegen1.o constants.mod: makegen1.f90 makegen2.o utility.mod: makegen2.f90 constants.mod constants.mod \ constants.mod