------- Comment #2 from tkoenig at gcc dot gnu dot org  2007-12-22 20:40 -------
Simplified test case:

$ cat eof.f90 
program main
  character(len=2) :: line
  character(len=1) :: a(3)
  line = 'ab'
  read (line,'(A)',end=99) a
  stop
  99 continue 
end program main
$ gfortran -g eof.f90 
$ gdb ./a.out
GNU gdb 6.6.90.20070912-debian
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
(gdb) r
Starting program: /tmp/a.out 

Program received signal SIGSEGV, Segmentation fault.
0xb7da6665 in memcpy () from /lib/i686/cmov/libc.so.6
(gdb) bt
#0  0xb7da6665 in memcpy () from /lib/i686/cmov/libc.so.6
#1  0xb7f493a4 in *_gfortrani_read_sf (dtp=0xbfd46074, length=0xbfd45dd8, 
    no_error=0) at ../../../../gcc/trunk/libgfortran/io/transfer.c:169
#2  0xb7f49574 in *_gfortrani_read_block (dtp=0xbfd46074, length=0xbfd45dd8)
    at ../../../../gcc/trunk/libgfortran/io/transfer.c:318
#3  0xb7f47328 in *_gfortrani_read_a (dtp=0xbfd46074, f=0x8050568, 
    p=0xbfd461a7 "·ÈaÔ¿9\207\004\b\001", length=1)
    at ../../../../gcc/trunk/libgfortran/io/read.c:248
#4  0xb7f4ad4e in formatted_transfer_scalar (dtp=0xbfd46074, 
    type=BT_CHARACTER, p=0xbfd461a7, len=1, size=1)
    at ../../../../gcc/trunk/libgfortran/io/transfer.c:1121
#5  0xb7f4b81e in formatted_transfer (dtp=0xbfd46074, type=BT_CHARACTER, 
    p=0xbfd461a5, kind=1, size=1, nelems=3)
    at ../../../../gcc/trunk/libgfortran/io/transfer.c:1366
#6  0xb7f484de in *_gfortran_transfer_array (dtp=0xbfd46074, desc=0xbfd46188, 
    kind=1, charlen=1) at ../../../../gcc/trunk/libgfortran/io/transfer.c:1518
#7  0x080486d1 in main () at eof.f90:5


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34560

Reply via email to