aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorThomas Koenig <Thomas.Koenig@online.de>2005-08-16 20:26:04 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2005-08-16 20:26:04 +0000
commit950ad21d343bd853bc6355adf8a36ca642e9b759 (patch)
treeb1ba39a7209647152c1aabb867d0cd7ffde560ea /libgfortran
parent17b456229ec66d747ffb569508fa168f5d92cfc8 (diff)
downloadgcc-950ad21d343bd853bc6355adf8a36ca642e9b759.zip
gcc-950ad21d343bd853bc6355adf8a36ca642e9b759.tar.gz
gcc-950ad21d343bd853bc6355adf8a36ca642e9b759.tar.bz2
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
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog7
-rw-r--r--libgfortran/io/transfer.c10
2 files changed, 14 insertions, 3 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 223567c..7ed9429 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,10 @@
+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>
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;
+ }
}