Bug 24892 - ACCESS argument to the OPEN statement
Summary: ACCESS argument to the OPEN statement
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libfortran (show other bugs)
Version: 4.1.0
: P3 normal
Target Milestone: 4.0.3
Assignee: Francois-Xavier Coudert
URL: http://gcc.gnu.org/ml/fortran/2005-11...
Keywords: patch
Depends on:
Blocks: 19292
  Show dependency treegraph
 
Reported: 2005-11-16 15:01 UTC by Francois-Xavier Coudert
Modified: 2005-11-18 12:43 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-11-16 17:27:14


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francois-Xavier Coudert 2005-11-16 15:01:25 UTC
$ cat u.f
      OPEN(10,ACCESS='APPEND')
      END
$ g77 u.f && ./a.out
$ gfortran u.f && ./a.out
At line 1 of file u.f
Fortran runtime error: Bad ACCESS parameter in OPEN statement

I don't think it is in the standard, but I don't have the standard at hand).
Comment 1 Francois-Xavier Coudert 2005-11-16 17:27:14 UTC
Patch submitted for review.
Comment 2 Francois-Xavier Coudert 2005-11-17 12:47:03 UTC
Subject: Bug 24892

Author: fxcoudert
Date: Thu Nov 17 12:46:57 2005
New Revision: 107119

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107119
Log:
	PR fortran/24892
	* io/io.h (unit_access): Add ACCESS_APPEND.
	* io/open.c (access_opt): Add APPEND value for ACCESS keyword.
	(st_open): Use that new value to set the POSITION accordingly.

	* gfortran.dg/open_access_append_1.f90: New test.
	* gfortran.dg/open_access_append_2.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/open_access_append_1.f90
    trunk/gcc/testsuite/gfortran.dg/open_access_append_2.f90
Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/io/io.h
    trunk/libgfortran/io/open.c

Comment 3 Francois-Xavier Coudert 2005-11-18 12:40:50 UTC
Subject: Bug 24892

Author: fxcoudert
Date: Fri Nov 18 12:40:42 2005
New Revision: 107177

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107177
Log:
	PR fortran/20811
	PR fortran/24892

	* io/io.h (unit_access): Add ACCESS_APPEND.
	* io/open.c (access_opt): Add APPEND value for ACCESS keyword.
	(st_open): Use that new value to set the POSITION accordingly.
	* configure.ac: Add "-I ." to AM_FCFLAGS.
	* configure: Regenerate.

	* scanner.c (gfc_open_included_file): Add an extra include_cwd
	argument. Only include files in the current working directory if
	its value is true.
	* gfortran.h: Change prototype for gfc_open_included_file.
	(load_file): Don't search for include files in the current working
	directory.
	* options.c (gfc_post_options): Add the directory of the source file
	to the list of paths for included files.
	* module.c (gfc_use_module): Look for module files in the current
	directory.

Modified:
    branches/gcc-4_0-branch/gcc/fortran/ChangeLog
    branches/gcc-4_0-branch/gcc/fortran/gfortran.h
    branches/gcc-4_0-branch/gcc/fortran/module.c
    branches/gcc-4_0-branch/gcc/fortran/options.c
    branches/gcc-4_0-branch/gcc/fortran/scanner.c
    branches/gcc-4_0-branch/libgfortran/ChangeLog
    branches/gcc-4_0-branch/libgfortran/configure
    branches/gcc-4_0-branch/libgfortran/configure.ac
    branches/gcc-4_0-branch/libgfortran/io/io.h
    branches/gcc-4_0-branch/libgfortran/io/open.c

Comment 4 Francois-Xavier Coudert 2005-11-18 12:43:16 UTC
Fixed.