segfault with gfortran > 4.0.3

François-Xavier Coudert fxcoudert@gmail.com
Tue Aug 1 16:33:00 GMT 2006


Hello John,

> It shouldn't be too difficult.  Put all the code from the
> tarball into one file, check the segfault still occurs, then
> start chopping out BLOCK IF and DO LOOPs until the Segfault
> goes away.  Restore the minimum code to again cause the Segfault,
> and start chopping out peripherial code (whole subroutines and
> functions).  You'll probably reduce the 3000+ lines of code down
> to a very generic 10 to 20 of lines of code.  At this point,
> there is no legal issue.

The following code reproduces the problem:

subroutine bar(s, n)
   integer n
   character s*(n)
   character*3, dimension(:), pointer :: m
contains
   subroutine gee
      m(1) = s(1:3)
   end subroutine gee
end subroutine bar

I think it's short enough to be legally OK.

FX



More information about the Fortran mailing list