mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
17b456229e
commit
950ad21d34
|
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
! { 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
|
||||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue