This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/23460] New: g77 unable to locate fortran INCLUDE files when preprocessed
- From: "douglas dot vechinski at dynetics dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Aug 2005 15:31:20 -0000
- Subject: [Bug fortran/23460] New: g77 unable to locate fortran INCLUDE files when preprocessed
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
First, as requested the output of gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
command line that triggers:
g77 -o example example.F
Error messages:
example.F:2:
include 'example.par'
^
Unable to open INCLUDE file `example.par' at (^)
I'm unable to send the preprocessed file (*.i*) that is requested as none was
generated when I used the -save-temps flag. In fact, when I add the -save-temps
flag it compiles with no problem. (I know the site says not to send source code
but I see no other choice, plus it is small.)
So, here is the source file example.F:
include 'example.par'
do i=1,nmax
write(6,*)'i = ',i
enddo
stop
end
and the include file example.par
parameter (nmax=10)
Note, while this example does not have any preprocessing directives in it, I
discovered the problem in a code that did. I shrank it down to this small
example. I submitted the problem to the fortran@gcc.gnu.org mail list on Aug
16, 2005. If I include a -pipe or a -I. on the command line it compiles.
Apparently the problem is that when the preprocessor processes the *.F file, it
creates a temp file in a different directory which it then tries to compile.
But the file to be included via the standard Fortran INCLUDE directive is not
located in this temporary location and can not find it.
--
Summary: g77 unable to locate fortran INCLUDE files when
preprocessed
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: douglas dot vechinski at dynetics dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23460