Segmentation fault using gcc-gfortran 4.2.4 or 4.3.2
Arjen Markus
arjen.markus@wldelft.nl
Wed Oct 15 13:26:00 GMT 2008
Kimberly Artita wrote:
>Several times I've tried upgrading to the gcc gfortran compiler from
>version 4.1.2 to 4.2.4 or 4.3.2.
>
>In version 4.1.2, I could read in a character string from a text file
>that contained spaces, example:
>
>General Input/Output
>
>In versions 4.2.4 and 4.3.2, I keep getting a segmentation fault
>error. It seems that spaces aborts the read function?
>
>The text files I'm reading in a generated from a ESRI ArcView
>extension. I have 7x159 + 13 separate text files.
>
>Is there a simple solution to this chaos? I don't want to edit the
>text files...
>
>(I'm running gentoo and using *.f90 files.)
>
>
>
Hello Kimberly,
can you show us a small program that shows this behaviour? I have tried
it with the program below (Linux RHEL, gfortran 4.3.2) and I had no
such problem:
program readslash
character(len=20) :: string
open( 10, file = 'readslash.inp' )
read( 10, * ) string
! read( 10, '(a)' ) string
write( *, * ) string
end program
Could it be a problem somewhere else in your code?
Regards,
Arjen
More information about the Fortran
mailing list