This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/47720] New: problems with makefile dependency generation using -M


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: unassigned@gcc.gnu.org
        ReportedBy: kristopher.kuhlman@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]