Other compilers such as g95, NAG f95 and ifort also search /usr/local/include
and /usr/include for .mod files (and "INCLUDE"d files).

I think gfortran should do the same, especially since #include searches these
paths and "man gfortran"'s -Idir description implies #include and include
search the same directories.

g95 seems to use libcpp for reading almost all files and thus it searches also
in /usr/include (cpp_create_reader, cpp_read_main_file etc.). That way one
could also cpp-preprocess files included via "INCLUDE" rather than via
"#include".

The system include path is in the variable GCC_INCLUDE_DIR, which does not seem
to be used outside of cpp unless I missed something.

For CPP work, see wiki:
http://gcc.gnu.org/wiki/GFortran44


-- 
           Summary: Search /usr/local/include and /usr/include for .mod
                    files
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35707

Reply via email to