public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "douglas dot vechinski at dynetics dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/23460] New: g77 unable to locate fortran INCLUDE files when preprocessed
Date: Thu, 18 Aug 2005 15:40:00 -0000	[thread overview]
Message-ID: <20050818153054.23460.douglas.vechinski@dynetics.com> (raw)

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


             reply	other threads:[~2005-08-18 15:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-18 15:40 douglas dot vechinski at dynetics dot com [this message]
2005-08-18 19:14 ` [Bug fortran/23460] [3.4 Regression] " pinskia at gcc dot gnu dot org
2005-08-31 21:05 ` tobi at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050818153054.23460.douglas.vechinski@dynetics.com \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).