[Bug libfortran/24305] Complex(10) formatted IO is broken.

2005-11-12 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.1.0


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



[Bug libfortran/24305] Complex(10) formatted IO is broken.

2005-11-11 Thread jb at gcc dot gnu dot org


--- Comment #4 from jb at gcc dot gnu dot org  2005-11-11 20:41 ---
The recent patch on 2005-11-06 AFAICS fixes this bug.


-- 

jb at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug libfortran/24305] Complex(10) formatted IO is broken.

2005-11-06 Thread jb at gcc dot gnu dot org


--- Comment #3 from jb at gcc dot gnu dot org  2005-11-06 18:28 ---
Subject: Bug 24305

Author: jb
Date: Sun Nov  6 18:28:22 2005
New Revision: 106563

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106563
Log:
gfortran ChangeLog

2005-11-06  Janne Blomqvist <[EMAIL PROTECTED]>

PR fortran/24174
PR fortran/24305
* fortran/trans-io.c (gfc_build_io_library_fndecls): Add kind
argument to transfer_array.
(transfer_array_desc): Add kind argument.

testsuite ChangeLog:

2005-11-06  Janne Blomqvist <[EMAIL PROTECTED]>

PR fortran/24174
PR fortran/24305
* testsuite/gfortran.dg/large_real_kind_form_io_1.f90: New file.

libgfortran Changelog:

2005-11-06  Janne Blomqvist <[EMAIL PROTECTED]>

PR fortran/24174
PR fortran/24305
* io/io.h: Add argument to prototypes, add prototypes for
size_from_*_kind functions.
* io/list_read.c (read_complex): Add size argument, use
it. 
(list_formatted_read): Add size argument, cleanup.
(list_formatted_read_scalar): Add size argument.
(nml_read_obj): Fix for padding.
* io/transfer.c: Add argument to transfer function pointer.
(unformatted_read): Add size argument.
(unformatted_write): Likewise.
(formatted_transfer_scalar): Fix for padding with complex(10).
(formatted_transfer): Add size argument, cleanup.
(transfer_integer): Add size argument to transfer call.
(transfer_real): Likewise.
(transfer_logical): Likewise.
(transfer_character): Likewise.
(transfer_complex): Likewise.
(transfer_array): New kind argument, use it.
(data_transfer_init): Add size argument to formatted_transfer
call.
(iolength_transfer): Add size argument, cleanup.
* io/write.c (write_complex): Add size argument, fix for padding
with complex(10).
(list_formatted_write): Add size argument, cleanup.
(list_formatted_write_scalar): Add size argument, use it.
(nml_write_obj): Fix for size vs. kind issue.
* io/size_from_kind.c: New file.
* Makefile.am: Add io/size_from_kind.c.
* configure: Regenerate.
* Makefile.in: Regenerate.


Added:
trunk/gcc/testsuite/gfortran.dg/large_real_kind_form_io_1.f90
trunk/libgfortran/io/size_from_kind.c
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-io.c
trunk/gcc/testsuite/ChangeLog
trunk/libgfortran/ChangeLog
trunk/libgfortran/Makefile.am
trunk/libgfortran/Makefile.in
trunk/libgfortran/configure
trunk/libgfortran/io/io.h
trunk/libgfortran/io/list_read.c
trunk/libgfortran/io/transfer.c
trunk/libgfortran/io/write.c


-- 


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



[Bug libfortran/24305] Complex(10) formatted IO is broken.

2005-11-05 Thread jblomqvi at cc dot hut dot fi


--- Comment #2 from jblomqvi at cc dot hut dot fi  2005-11-05 18:08 ---
Patch (that also fixes PR 24174) here:
http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00348.html


-- 


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



[Bug libfortran/24305] Complex(10) formatted IO is broken.

2005-10-10 Thread jblomqvi at cc dot hut dot fi


--- Comment #1 from jblomqvi at cc dot hut dot fi  2005-10-11 05:55 ---
Consider this testcase (from 24174):

! { dg-do run }
! PR 24174
program kind10_io
  real(kind=10) :: a,b(2), c
  complex(kind=10) :: d, e, f(2)
  character(len=180) :: tmp
  ! Test real(10) scalar and array formatted IO
  b(:) = 2.0_10
  write (tmp, *) b
  read (tmp, *) a, c
  if (a /= 2.0_10) call abort()
  if (c /= 2.0_10) call abort()
  ! Complex(10) scalar and array formatted and list formatted IO
  f = cmplx ( 1.0_10, 2.0_10, 10)
  d = cmplx ( huge (1.0_10), huge (2.0_10), 10)
  write (tmp, *) d
  read (tmp, *) e ! List formatted read doesn't work.
  if (e /= d) call abort()
  write (tmp, '(2(e12.4e5, 2x))') d
  read (tmp, '(2(e12.4e5, 2x))') e ! Read doesn't work either
  if (e /= d) call abort()
end program kind10_io


-- 


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