Commit 950ad21d by Thomas Koenig Committed by Thomas Koenig

re PR libfortran/23428 (inquire(iolength= ) for complex give incorrect value)

2005-08-16  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/23428
	* io/transfer.c (iolength_transfer):  Remove __attribute__ ((unused))
	from type.  Return correct length for inquire(iolength=)
	for complex variables.

2005-08-16  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/23428
	* gfortran.dg/inquire-complex.f90:  New test case.

From-SVN: r103168
parent 17b45622
2005-08-16 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/23428
* gfortran.dg/inquire-complex.f90: New test case.
2005-08-16 James E Wilson <wilson@specifix.com> 2005-08-16 James E Wilson <wilson@specifix.com>
PR tree-optimization/21105 PR tree-optimization/21105
......
! { dg-do run }
! PR 23428: Inquire(iolength) used to give the wrong result.
program main
implicit none
integer s4, s8
complex(kind=8) c8
complex(kind=4) c4
inquire (iolength=s) c8
if (s4 /= 8 .or. s8 /= 16) call abort
end program main
2005-08-16 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/23428
* io/transfer.c (iolength_transfer): Remove __attribute__ ((unused))
from type. Return correct length for inquire(iolength=)
for complex variables.
2005-08-11 Francois-Xavier Coudert <coudert@clipper.ens.fr> 2005-08-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
Steven Bosscher <stevenb@suse.de> Steven Bosscher <stevenb@suse.de>
......
...@@ -1536,12 +1536,16 @@ finalize_transfer (void) ...@@ -1536,12 +1536,16 @@ finalize_transfer (void)
data transfer, it just updates the length counter. */ data transfer, it just updates the length counter. */
static void static void
iolength_transfer (bt type __attribute__ ((unused)), iolength_transfer (bt type , void *dest __attribute__ ((unused)),
void *dest __attribute__ ((unused)),
int len) int len)
{ {
if (ioparm.iolength != NULL) if (ioparm.iolength != NULL)
*ioparm.iolength += len; {
if (type == BT_COMPLEX)
*ioparm.iolength += 2*len;
else
*ioparm.iolength += len;
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment