This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Internal compiler error related to bug 15511


I have been following the gfortran development with considerable
interest and have been testing various snapshots on some legacy Fortran
77 code.

The following error occurs with:
GNU Fortran 95 (GCC 3.5.0 20040620 (experimental))
on i686-pc-linux-gnu

It appears to be very similar to bug 15511
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15511)

gcc was configured with configure --prefix=/usr/local/gcc-3.5

When compiling source code that is fed through the preprocessor (either
with a source file called foo.F or by specifying -xf77-cpp-input on the
command line) and with an include directive (-I) that has a long path
the following error message occurs:

gfortran -I/home/user/long/path/to/some/far/away/include/directory/src/../include \
 -save-temps -c foo.F
foo.f:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

The preprocessed source causing this error is:

# 1 "foo.F"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "foo.F"
      SUBROUTINE FOO
 
 
# 1 "/home/user/long/path/to/some/far/away/include/directory/src/../include/foo_bar.cmn" 1
C-*-fortran-*-
# 4 "foo.F" 2
 
      PRINT*,'OK'
 
      END

where the included filename extends beyond the 72 character limit.

This can be fixed in this case by either specifying
-ffixed-line-length-132 or by replacing the absolute path with a
relative path. The only difficulty with using relative paths is that the
code I was testing uses the GNU autotools and -I$(srcdir)/../../include
is expanded by the autotools into the absolute path.

Another feature I discovered with this is that:

> gfortran -save-temps -c foo.F

Keeps the preprocessed foo.f in the current directory, but

> gfortran -save-temps -xf77-cpp-input -c foo.f

does not keep the intermediate .f file in /tmp.

I can see that this is probably not going to be an 'urgent to fix' error
but I thought I'd let people know about it.

Would you like me to formally report a bug or do people consider this to
be covered by bug 15511

S Edwards
-- 
----------------------------------------------------------
----------------------------------------------------------

Attachment: signature.asc
Description: This is a digitally signed message part


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