re PR libfortran/20950 ([4.0 only] segfault in INQUIRE asking for SEQUENTIAL status)
PR libfortran/20950 * io/inquire.c (inquire_via_unit): Check for the gfc_unit being NULL when setting ioparm.sequential. * gfortran.dg/pr20950.f: New test. From-SVN: r98312
This commit is contained in:
parent
8c9de419a1
commit
293fcb2e28
|
@ -1,3 +1,8 @@
|
||||||
|
2005-04-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||||
|
|
||||||
|
PR libfortran/20950
|
||||||
|
* gfortran.dg/pr20950.f: New test.
|
||||||
|
|
||||||
2005-04-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
2005-04-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||||
|
|
||||||
PR libfortran/19216
|
PR libfortran/19216
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
! PR libfortran/20950
|
||||||
|
! Original bug-report by Walt Brainerd, The Fortran Company
|
||||||
|
! { dg-do run }
|
||||||
|
character*20 c
|
||||||
|
inquire (33, sequential = c)
|
||||||
|
if (c .ne. "UNKNOWN") call abort
|
||||||
|
end
|
|
@ -1,3 +1,9 @@
|
||||||
|
2005-04-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||||
|
|
||||||
|
PR libfortran/20950
|
||||||
|
* io/inquire.c (inquire_via_unit): Check for the gfc_unit being
|
||||||
|
NULL when setting ioparm.sequential.
|
||||||
|
|
||||||
2005-04-17 Thomas Koenig <Thomas.Koenig@online.de>
|
2005-04-17 Thomas Koenig <Thomas.Koenig@online.de>
|
||||||
|
|
||||||
PR libfortran/21075
|
PR libfortran/21075
|
||||||
|
|
|
@ -87,13 +87,16 @@ inquire_via_unit (gfc_unit * u)
|
||||||
|
|
||||||
if (ioparm.sequential != NULL)
|
if (ioparm.sequential != NULL)
|
||||||
{
|
{
|
||||||
/* disallow an open direct access file to be accessed
|
if (u == NULL)
|
||||||
sequentially */
|
p = inquire_sequential (NULL, 0);
|
||||||
if (u->flags.access==ACCESS_DIRECT)
|
else
|
||||||
p = "NO";
|
{
|
||||||
else
|
/* disallow an open direct access file to be accessed sequentially */
|
||||||
p = (u == NULL) ? inquire_sequential (NULL, 0) :
|
if (u->flags.access == ACCESS_DIRECT)
|
||||||
inquire_sequential (u->file, u->file_len);
|
p = "NO";
|
||||||
|
else
|
||||||
|
p = inquire_sequential (u->file, u->file_len);
|
||||||
|
}
|
||||||
|
|
||||||
cf_strcpy (ioparm.sequential, ioparm.sequential_len, p);
|
cf_strcpy (ioparm.sequential, ioparm.sequential_len, p);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue