------- Additional Comments From tkoenig at gcc dot gnu dot org  2005-09-07 
20:58 -------
Even with the committed patch, there is still something wrong
on i686:

$ cat compl.f
      program main
      complex (kind=10) a, b
      integer(kind=1), dimension(32) :: ea, eb

      equivalence (ea, a), (eb, b)
      ea = 0
      a = (3.2_10, -2.1_10)
      print '(16(Z2.2),1X,16(Z2.2))', ea(1:16),ea(17:32)
      open (10,form="unformatted",status="replace")
      write(10) a
      rewind(10)
      eb = 0
      read(10) b
      print '(16(Z2.2),1X,16(Z2.2))', eb(1:16),eb(17:32)
      print *,b
      rewind(10)
      end
$ gfortran -g compl.f
$ gdb ./a.out
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux"...Using host libthread_db library
"/lib/tls/libthread_db.so.1".

(gdb) r
Starting program: /home/ig25/Krempel/a.out
CDCCCCCCCCCCCCCC0040000066666666 6666668600C000000000000000000000
CDCCCCCCCCCCCCCC0040000066666666 66666686000000000000000000000000

Program received signal SIGSEGV, Segmentation fault.
0xb7fb1f41 in output_float (f=0x8052390, value=<invalid float value>)
    at ../../../gcc-4.1/libgfortran/io/write.c:475
475       if (buffer[2] != '.' || buffer[ndigits + 2] != 'e')
(gdb) bt
#0  0xb7f44f41 in output_float (f=0x8052390, value=<invalid float value>)
    at ../../../gcc-4.1/libgfortran/io/write.c:475
#1  0xb7f45b78 in write_float (f=0xfffffff9, source=Variable "source" is not
available.
)
    at ../../../gcc-4.1/libgfortran/io/write.c:900
#2  0xb7f45d08 in write_real (source=0xbfd71402 "", length=Variable "length"
isnot available.
)
    at ../../../gcc-4.1/libgfortran/io/write.c:1387
#3  0xb7f45db1 in write_complex (source=0xbfd713f8 "ÍÌÌÌÌÌÌÌ", len=10)
    at ../../../gcc-4.1/libgfortran/io/write.c:1401
#4  0xb7f465bd in *_gfortrani_list_formatted_write (type=BT_COMPLEX,
    p=0xbfd713f8, len=10) at ../../../gcc-4.1/libgfortran/io/write.c:1462
#5  0xb7f3f760 in *_gfortran_transfer_complex (p=0xbfd713f8, kind=10)
    at ../../../gcc-4.1/libgfortran/io/transfer.c:891
#6  0x08048a28 in MAIN__ () at compl.f:15
#7  0x08048a83 in main (argc=1, argv=0xbfd714b4)
    at ../../../gcc-4.1/libgfortran/fmain.c:18
         

-- 


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

Reply via email to