From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12570 invoked by alias); 18 Aug 2005 15:31:28 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 12505 invoked by uid 48); 18 Aug 2005 15:31:20 -0000 Date: Thu, 18 Aug 2005 15:40:00 -0000 From: "douglas dot vechinski at dynetics dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20050818153054.23460.douglas.vechinski@dynetics.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug fortran/23460] New: g77 unable to locate fortran INCLUDE files when preprocessed X-Bugzilla-Reason: CC X-SW-Source: 2005-08/txt/msg02118.txt.bz2 List-Id: 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