From 950ad21d343bd853bc6355adf8a36ca642e9b759 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Tue, 16 Aug 2005 20:26:04 +0000 Subject: re PR libfortran/23428 (inquire(iolength= ) for complex give incorrect value) 2005-08-16 Thomas Koenig 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 PR libfortran/23428 * gfortran.dg/inquire-complex.f90: New test case. From-SVN: r103168 --- libgfortran/io/transfer.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'libgfortran/io') diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 00e8c31..03708f8 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -1536,12 +1536,16 @@ finalize_transfer (void) data transfer, it just updates the length counter. */ static void -iolength_transfer (bt type __attribute__ ((unused)), - void *dest __attribute__ ((unused)), +iolength_transfer (bt type , void *dest __attribute__ ((unused)), int len) { if (ioparm.iolength != NULL) - *ioparm.iolength += len; + { + if (type == BT_COMPLEX) + *ioparm.iolength += 2*len; + else + *ioparm.iolength += len; + } } -- cgit v1.1