[Bug libfortran/20163] gfortran - error opening direct access file

2005-04-09 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-09 
19:40 ---
Subject: Bug 20163

CVSROOT:/cvs/gcc
Module name:gcc
Changes by: [EMAIL PROTECTED]   2005-04-09 19:40:48

Modified files:
gcc/testsuite  : ChangeLog 
Added files:
gcc/testsuite/gfortran.dg: open-options-blanks.f 

Log message:
2005-04-09  Thomas Koenig  <[EMAIL PROTECTED]>

PR libfortran/20163
* gfortran.dg/open-options-blanks.f:  New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5313&r2=1.5314
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/open-options-blanks.f.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20163


[Bug libfortran/20163] gfortran - error opening direct access file

2005-04-09 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-09 
19:37 ---
Subject: Bug 20163

CVSROOT:/cvs/gcc
Module name:gcc
Changes by: [EMAIL PROTECTED]   2005-04-09 19:37:14

Modified files:
libgfortran: ChangeLog 
libgfortran/runtime: string.c 

Log message:
2005-04-09  Thomas Koenig <[EMAIL PROTECTED]>

PR libfortran/20163
* runtime/string.c (compare0): Use fstrlen() to
strip trailing blanks from option string.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.185&r2=1.186
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/runtime/string.c.diff?cvsroot=gcc&r1=1.4&r2=1.5



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20163


[Bug libfortran/20163] gfortran - error opening direct access file

2005-03-29 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-29 
08:37 ---
Subject: Bug 20163

CVSROOT:/cvs/gcc
Module name:gcc
Changes by: [EMAIL PROTECTED]   2005-03-29 08:37:32

Modified files:
gcc/testsuite  : ChangeLog 
libgfortran: ChangeLog 
libgfortran/io : open.c 
Added files:
gcc/testsuite/gfortran.dg: pr20163-2.f 

Log message:
PR libfortran/20163
* io/open.c (st_open): call library_end() before returning even if
an error arises.

* gfortran.dg/pr20163-2.f: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5228&r2=1.5229
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/pr20163-2.f.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.178&r2=1.179
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/open.c.diff?cvsroot=gcc&r1=1.11&r2=1.12



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20163


[Bug libfortran/20163] gfortran - error opening direct access file

2005-03-29 Thread fxcoudert at gcc dot gnu dot org

--- Additional Comments From fxcoudert at gcc dot gnu dot org  2005-03-29 
08:42 ---
Fixed.

-- 
   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20163


[Bug libfortran/20163] gfortran - error opening direct access file

2005-03-29 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-29 
08:42 ---
Subject: Bug 20163

CVSROOT:/cvs/gcc
Module name:gcc
Branch: gcc-4_0-branch
Changes by: [EMAIL PROTECTED]   2005-03-29 08:41:58

Modified files:
gcc/testsuite  : ChangeLog 
libgfortran: ChangeLog 
libgfortran/io : open.c 
Added files:
gcc/testsuite/gfortran.dg: pr20163-2.f 

Log message:
PR libfortran/20163
* io/open.c (st_open): call library_end() before returning even if
an error arises.

* gfortran.dg/pr20163-2.f: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.71&r2=1.5084.2.72
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/pr20163-2.f.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.163.2.11&r2=1.163.2.12
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/open.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.10.10.1&r2=1.10.10.2



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20163


[Bug libfortran/20163] gfortran - error opening direct access file

2005-03-22 Thread fxcoudert at gcc dot gnu dot org


-- 
   What|Removed |Added

 CC||fxcoudert at gcc dot gnu dot
   ||org
   Keywords||patch
   Last reconfirmed|2005-02-23 14:19:57 |2005-03-22 23:05:08
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20163


[Bug libfortran/20163] gfortran - error opening direct access file

2005-02-27 Thread dir at lanl dot gov

--- Additional Comments From dir at lanl dot gov  2005-02-27 14:05 ---
Looks like a missing call to library_end ()in open.c. I added that one line and
the recursive error went away -

[dir:~/tests/gfortran] dir% gfortran -o recursive3 recursive3.f
[dir:~/tests/gfortran] dir% recursive3
[dir:~/tests/gfortran] dir% cat  recursive3.f
  open(10,status="foo",err=100)
  call abort
 100  continue
  open(10,status="scratch")
  end

> 
[dir:~] dir% diff -c /Users/dir/junk/io/open.c
/Users/dir/gfortran/gcc/libgfortran/io/open.c
*** /Users/dir/junk/io/open.c   Sat Jan 22 16:14:30 2005
--- /Users/dir/gfortran/gcc/libgfortran/io/open.c   Sat Feb 26 21:36:28 2005
***
*** 480,488 
if (flags.position == POSITION_UNSPECIFIED)
  flags.position = POSITION_ASIS;
  
!   if (ioparm.library_return != LIBRARY_OK)
  return;
! 
u = find_unit (ioparm.unit);
  
if (u == NULL)
--- 480,489 
if (flags.position == POSITION_UNSPECIFIED)
  flags.position = POSITION_ASIS;
  
!   if (ioparm.library_return != LIBRARY_OK){
! library_end ();
  return;
!   }
u = find_unit (ioparm.unit);
  
if (u == NULL)


(In reply to comment #5)
> Here is a reduced test case for the second error:
> 
> $ cat open-after-error.f
>   open(10,status="foo",err=100)
>   call abort
>  100  continue
>   open(10,status="scratch")
>   end
> $ cat open-after-error.f
>   open(10,status="foo",err=100)
>   call abort
>  100  continue
>   open(10,status="scratch")
>   end
> $ gfortran open-after-error.f
> $ ./a.out
> At line 4 of file open-after-error.f
> Internal Error: Recursive library calls not allowed
> 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20163


[Bug libfortran/20163] gfortran - error opening direct access file

2005-02-26 Thread Thomas dot Koenig at online dot de

--- Additional Comments From Thomas dot Koenig at online dot de  2005-02-26 
20:49 ---
Here is a reduced test case for the second error:

$ cat open-after-error.f
  open(10,status="foo",err=100)
  call abort
 100  continue
  open(10,status="scratch")
  end
$ cat open-after-error.f
  open(10,status="foo",err=100)
  call abort
 100  continue
  open(10,status="scratch")
  end
$ gfortran open-after-error.f
$ ./a.out
At line 4 of file open-after-error.f
Internal Error: Recursive library calls not allowed


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20163


[Bug libfortran/20163] gfortran - error opening direct access file

2005-02-26 Thread Thomas dot Koenig at online dot de

--- Additional Comments From Thomas dot Koenig at online dot de  2005-02-26 
20:46 ---
Patch for the first bug here:

http://gcc.gnu.org/ml/gcc-patches/2005-02/msg01694.html

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20163


[Bug libfortran/20163] gfortran - error opening direct access file

2005-02-23 Thread Thomas dot Koenig at online dot de

--- Additional Comments From Thomas dot Koenig at online dot de  2005-02-23 
23:29 ---
This has a pretty good chance of fixing it.

Proper testing, Changelog entry, ... tomorrow.

Index: string.c
===
RCS file: /cvsroot/gcc/gcc/libgfortran/runtime/string.c,v
retrieving revision 1.4
diff -c -r1.4 string.c
*** string.c12 Jan 2005 21:27:31 -  1.4
--- string.c23 Feb 2005 23:28:02 -
***
*** 41,57 
  compare0 (const char *s1, int s1_len, const char *s2)
  {
int i;

!   if (strncasecmp (s1, s2, s1_len) != 0)
! return 0;
!
!   /* The rest of s1 needs to be blanks for equality.  */
!
!   for (i = strlen (s2); i < s1_len; i++)
! if (s1[i] != ' ')
!   return 0;
!
!   return 1;
  }


--- 41,51 
  compare0 (const char *s1, int s1_len, const char *s2)
  {
int i;
+   int len;

!   /* Strip traling blanks from the Fortran string.  */
!   len = fstrlen(s1, s1_len);
!   return strncasecmp(s1,s2,len) == 0;
  }




-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20163


[Bug libfortran/20163] gfortran - error opening direct access file

2005-02-23 Thread Thomas dot Koenig at online dot de

--- Additional Comments From Thomas dot Koenig at online dot de  2005-02-23 
23:09 ---
This is two bugs.

The first bug can be reduced to

$ cat open-opt.f
  open(unit=10,status="scratch ")
  end
$ gfortran open-opt.f
$ ./a.out
At line 1 of file open-opt.f
Fortran runtime error: Bad STATUS parameter in OPEN statement


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20163


[Bug libfortran/20163] gfortran - error opening direct access file

2005-02-23 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-23 
14:19 ---
Confirmed.

-- 
   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed||1
   Last reconfirmed|-00-00 00:00:00 |2005-02-23 14:19:57
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20163


[Bug libfortran/20163] gfortran - error opening direct access file

2005-02-23 Thread pinskia at gcc dot gnu dot org


-- 
   What|Removed |Added

  Component|fortran |libfortran


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20163