+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>
PR tree-optimization/21105
--- /dev/null
+! { 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>
Steven Bosscher <stevenb@suse.de>
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;
+ }
}