Commit Graph

120 Commits

Author SHA1 Message Date
Victor Leikehman
410d3bbaa2 Modified Files:
ChangeLog generated/matmul_c4.c generated/matmul_c8.c
	generated/matmul_i4.c generated/matmul_i8.c
	generated/matmul_r4.c generated/matmul_r8.c m4/matmul.m4

2004-11-18  Victor Leikehman  <lei@il.ibm.com>

	* m4/matmul.m4: Loops reordered to improve cache behavior.
	* generated/matmul_??.c: Regenerated.

From-SVN: r90853
2004-11-18 08:45:11 +00:00
Paul Brook
9686c8110e Committed wrong version of previous patch.
From-SVN: r90384
2004-11-10 02:44:39 +00:00
Paul Brook
2cbcdebaf9 re PR fortran/18218 (Miscompare in sixtrack benchmark caused by loss of precision)
PR fortran/18218
	* configure.ac: Check for strtof.
	* configure: Regenerate.
	* config.h.in: Regenerate.
	* io/read.c (convert_real): Use strtof if available.
	(convert_precision_real): Remove.
	(read_f): Avoid poor exponentiation algorithm.
gcc/testsuite/
	* gfortran.dg/list_read.c: New test.

From-SVN: r90382
2004-11-10 02:19:27 +00:00
Andreas Schwab
c7a35fe9f3 configure.ac: Use AC_PROG_FC, FC and FCFLAGS instead of AC_PROG_F77, F77 and FFLAGS.
* configure.ac: Use AC_PROG_FC, FC and FCFLAGS instead of
	AC_PROG_F77, F77 and FFLAGS.
	* Makefile.am (selected_int_kind.inc, selected_real_kind.inc): Use
	FCCOMPILE instead of F77COMPILE.
	* configure, Makefile.in: Regenerate.

From-SVN: r90122
2004-11-05 12:50:53 +00:00
Kelley Cook
d49ec2d1a8 acinclude.m4: Properly quote AC_CACHE_CHECK.
2004-11-05  Kelley Cook  <kcook@gcc.gnu.org>

	* acinclude.m4: Properly quote AC_CACHE_CHECK.
	* Makefile.am: Add in ACLOCAL_AMFLAGS.
	* aclocal.m4, configure, Makefile.in: Regenerate.

From-SVN: r90114
2004-11-05 03:49:25 +00:00
Aaron W. LaFramboise
41724e6a13 config.h.in: Regenerate.
2004-10-30  Aaron W. LaFramboise <aaronavay62@aaronwl.com>

	* config.h.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (AC_CHECK_FUNCS): Add mkstemp.
	* io/unix.c (S_IRGRP): Define if undefined.
	(S_IWGRP): Same.
	(S_IROTH): Same.
	(S_IWOTH): Same.
	(tempfile): Use mktemp if mkstemp missing, fix typos.

From-SVN: r89893
2004-10-30 16:23:23 +00:00
Aaron W. LaFramboise
47289a4e33 Missing bit of previous patch.
2004-09-15  Aaron W. LaFramboise <aaronavay62@aaronwl.com>
	* unix.c: Include stdio.h.

From-SVN: r89892
2004-10-30 15:15:27 +00:00
Aaron W. LaFramboise
8cfe17f951 system.c ("libgfortran.h"): Move after system headers.
2004-10-30  Aaron W. LaFramboise <aaronavay62@aaronwl.com>

	*  intrinsics/system.c ("libgfortran.h"): Move after system headers.

From-SVN: r89891
2004-10-30 15:04:20 +00:00
Canqun Yang
7a003d8e2e check.c (gfc_check_rand): Allow missing optional argument.
2004-10-30  Canqun Yang  <canqun@nudt.edu.cn>

	* check.c (gfc_check_rand): Allow missing optional argument.
	(gfc_check_irand): Ditto.
	* intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
libgfortran/
	* intrinsics/rand.c (irand): Handle NULL argument.

From-SVN: r89886
2004-10-30 14:18:34 +00:00
Paul Brook
5615e8cdce transfer.c (finalize_transfer): Free internal streams.
* io/transfer.c (finalize_transfer): Free internal streams.
	* io/unix.c (mem_close): Free stream object.

From-SVN: r88709
2004-10-07 21:30:50 +00:00
Paul Brook
82e7998648 string_intrinsics.c (string_verify): Fix off by one error.
* intrinsics/string_intrinsics.c (string_verify): Fix off by one
	error.
testsuite/
	* gfortran.dg/intrinsic_verify_1.f90: New test.

From-SVN: r88704
2004-10-07 20:19:32 +00:00
Paul Brook
7726f633fa re PR libfortran/17709 (NULL I/O list and Format error.)
PR libfortran/17709
	* io/transfer.c (data_transfer_init): Reset sf_seen_eor.
testsuite/
	* gfortran.dg/empty_format_1.f90: New test.

From-SVN: r88615
2004-10-06 18:27:58 +00:00
Andrew Pinski
1ee3acfb08 mvbits.c: Commit the file.
2004-10-04  Andrew Pinski  <pinskia@physics.uc.edu>

        * intrinsics/mvbits.c: Commit the file.

From-SVN: r88541
2004-10-04 19:31:10 -07:00
Tobias Schlüter
5b1374e965 re PR fortran/17776 (no subroutine system)
fortran/
PR fortran/17776
* check.c (gfc_check_system_sub): New function.
* gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
* intrinsic.c (add_functions): Add 'system'.
(add_subroutines): Add 'system'.
* intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
Move prototypes to other suborutines.
(gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
Add prototype.
(gfc_resolve_system_clock): Fix formatting of prototype.
* iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
functions.
* trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
GFC_ISYM_SYSTEM.

libgfortran/
PR fortran/17776
* intrinsics/system.c: New file.
* Makefile.am: Add dependency for the new file.
* Makefile.in: Regenerate.

From-SVN: r88532
2004-10-04 23:30:32 +02:00
Tobias Schlüter
ee569894e7 re PR libfortran/17631 (libfortran: intrinsic subroutine MVBITS not implemented)
PR fortran/17631
fortran/
* intrinsic.c (add_sym_5): Remove.
(add_subroutines): Add resolution function for MVBITS.
* intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
MVBITS
* iresolve.c (gfc_resolve_mvbits): New function.
(gfc_resolve_random_number): Remove empty line at end of function.
libgfortran/
* Makefile.am (gfor_helper_src): Add intrinsics/mvbits.h.
* intrinsics/mvbits.h: New file.
testsuite/
* gfortran.fortran-torture/execute/intrinsic_mvbits.f90: New test.

From-SVN: r88527
2004-10-04 22:49:39 +02:00
Tobias Schlüter
58c5b409e8 re PR fortran/17283 (UNPACK issues)
PR fortran/17283
fortran/
* iresolve.c (gfc_resolve_pack): Choose function depending if mask is
scalar.
libgfortran/
* intrinsics/pack_generic.c (__pack): Allocate memory for return array
if not done by caller.
(__pack_s): New function.
* runtime/memory.c (internal_malloc, internal_malloc64): Allow
allocating zero memory.
testsuite/
* gfortran.fortran-torture/execute/intrinsic_pack.f90: Add more tests.

From-SVN: r88526
2004-10-04 21:27:29 +02:00
Paul Brook
06e4f02a16 re PR libfortran/17706 (reading a value of 0.0 gives a value of -0.0)
2004-10-04  Paul Brook  <paul@codesourcery.com>
	Bud Davis  <bdavis9659@comcast.net>

	PR fortran/17706
	PR fortran/16434
	* io/format.c (parse_format_list): Set repeat count for S, SP, SS,
	BN and BZ formats.
	* io/write.c (output_float): Don't output minus zero.
libgfortran/
	* gfortran/pr17706.f90: New test.
	* gfortran.dg/g77/f77-edit-s-out.f: Remove xfail.

Actually apply the patch this time.

From-SVN: r88513
2004-10-04 15:33:18 +00:00
Paul Brook
f3e4170112 re PR libfortran/17706 (reading a value of 0.0 gives a value of -0.0)
2004-10-04  Paul Brook  <paul@codesourcery.com>
	Bud Davis  <bdavis9659@comcast.net>

	PR fortran/17706
	PR fortran/16434
	* io/format.c (parse_format_list): Set repeat count for S, SP, SS,
	BN and BZ formats.
	* io/write.c (output_float): Don't output minus zero.
libgfortran/
	* gfortran/pr17706.f90: New test.
	* gfortran.dg/g77/f77-edit-s-out.f: Remove xfail.

Co-Authored-By: Bud Davis <bdavis9659@comcast.net>

From-SVN: r88512
2004-10-04 15:32:13 +00:00
Aaron W. LaFramboise
830219eec1 abort.c ("libgfortran.h"): Move.
2004-10-03  Aaron W. LaFramboise <aaronavay62@aaronwl.com>

	* intrinsics/abort.c ("libgfortran.h"): Move.
	* intrinsics/date_and_time.c ("libgfortran.h"): Same.
	* intrinsics/write.c ("libgfortran.h"): Same.

From-SVN: r88444
2004-10-03 12:04:15 +00:00
Tobias Schlüter
bf4d99cf13 re PR libfortran/16137 (Fortran compiler unable to produce executables as libfortran depends on C99 math functions)
PR libfortran/16137
* config.h.in (HAVE_POWF): Undefine.
* configure.ac: Check for 'powf' in library.
* configure: Regenerate.
* intrinsics/c99_functions.c (powf): New function.

From-SVN: r88128
2004-09-26 16:52:04 +02:00
Tobias Schlüter
487c67b637 * intrinsics/etime.c (etime_): New function.
From-SVN: r88052
2004-09-24 18:49:10 +02:00
Steven G. Kargl
c6847e25b9 libgfortran.h: define gfc_alloca()
2004-09-21  Steven G. Kargl  <kargls@comcast.net>

* libgfortran.h: define gfc_alloca()
* intrinsics/env.c (getenv, get_environment_variable_i4): Use it.

From-SVN: r87801
2004-09-21 14:38:34 +02:00
Bud Davis
77747e5f2d re PR libfortran/17286 (namelist containing more than one value cannot contain whitespace or newlines for READ)
2004-09-21  Bud Davis  <bdavis9659@comcast.net>

        PR fortran/17286
        * io/list_read.c (namelist_read): ignore spaces after
        the '=' for namelist reads.

2004-09-21  Bud Davis  <bdavis9659@comcast.net>

        PR fortran/17286
        * gfortran.dg/pr17286.f90: New test.

From-SVN: r87799
2004-09-21 11:22:47 +00:00
Aaron W. LaFramboise
f596fc98ea config.h.in: Regenerate.
2004-09-15  Aaron W. LaFramboise <aaronavay62@aaronwl.com>

	* config.h.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (AC_CHECK_HEADERS): Check for sys/mman.h.
	* unix.c: Include stdio.h.
	(HAVE_SYS_MMAN_H): Check.
	(PROT_READ, PROT_WRITE): Provide default definitions.

From-SVN: r87714
2004-09-18 23:55:22 +00:00
Steven G. Kargl
0110c1ec15 check.c (gfc_check_getcwd_sub): New function.
2004-09-15  Steven G. Kargl  <kargls@comcast.net>

	* check.c (gfc_check_getcwd_sub): New function.
	* gfortran.h (GFC_ISYM_GETCWD): New symbol.
	* intrinsic.c (add_functions): Add function definition;
	Use symbol.
	* intrinsic.c (add_subroutines): Add subroutine definitions.
	* intrinsic.h: Add prototypes.
	* iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
	New functions.
	* trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
libgfortran/
	* intrincics/getcwd.c: New file.
	* Makefile.am: Add getcwd.c.
	* Makefile.in: Regenerated.

From-SVN: r87555
2004-09-15 14:17:26 +00:00
Steven G. Kargl
a8c60d7fff check.c (gfc_check_getcwd_sub): New function.
2004-09-15  Steven G. Kargl  <kargls@comcast.net>

	* check.c (gfc_check_getcwd_sub): New function.
	* gfortran.h (GFC_ISYM_GETCWD): New symbol.
	* intrinsic.c (add_functions): Add function definition;
	Use symbol.
	* intrinsic.c (add_subroutines): Add subroutine definitions.
	* intrinsic.h: Add prototypes.
	* iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
	New functions.
	* trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
libgfortran/
	* intrinsics/getcwd.c: New file.
	* Makefile.am: Add getcwd.c.
	* Makefile.in: Regenerated.

From-SVN: r87552
2004-09-15 14:09:17 +00:00
Paul Brook
a8ea34ebed Fix typo.
From-SVN: r87548
2004-09-15 13:02:08 +00:00
Steven G. Kargl
3869a92c04 env.c (getenv, [...]): Remove trailing white space.
2004-09-15  Steven G. Kargl  <kargls@comcast.net>
	Paul Brook  <paul@codesourcery.com>

	* intrinsics/env.c (getenv, get_environmental_variable): Remove
	trailing white space.  Uase alloca.  Honour trim_name.

Co-Authored-By: Paul Brook <paul@codesourcery.com>

From-SVN: r87547
2004-09-15 12:59:22 +00:00
Bud Davis
c72477d6a6 re PR libfortran/17090 (Runtime I/O error)
2004-09-13  Bud Davis  <bdavis9659@comcast.net>

        PR fortran/17090

        * io/list_read.c (list_formatted_read): Handle trailing spaces
        at end of line.


2004-09-13  Bud Davis  <bdavis9659@comcast.net>

        PR fortran/17090
        * gfortran.dg/pr17090.f90: New test.

From-SVN: r87474
2004-09-14 00:56:46 +00:00
Paul Brook
8a57cd3d5e Put ChangeLog entry in the right place.
From-SVN: r87120
2004-09-06 16:58:16 +00:00
Paul Brook
2cada022f1 [multiple changes]
2004-09-06  Steven G. Kargl  <kargls@comcast.net>

	* io/write.c (output_float): Typo in comment.  Remove debugging
	printf.  Fix format for FP of form 1e10.

2004-09-06  Paul Brook  <paul@codesourcery.com>

	* gfortran.dg/edit_real_1.f90: Add new test.

From-SVN: r87119
2004-09-06 16:33:52 +00:00
Richard Henderson
803a6ff52c cshift0.c (DEF_COPY_LOOP, [...]): New.
* intrinsics/cshift0.c (DEF_COPY_LOOP, copy_loop_int, copy_loop_long,
        copy_loop_double, copy_loop_ldouble): New.
        (__cshift0): Make shift type ssize_t.  Use % operator instead of
        div.  Use specialized versions of copy loop depending on the shape.

From-SVN: r87045
2004-09-03 12:03:43 -07:00
Paul Brook
d809264e86 format.c (parse_format_list): Set repeat count for P descriptors.
* io/format.c (parse_format_list): Set repeat count for P descriptors.
	* write.c (output_float): Fix condition.  Correctly handle nonzero
	scale factor.
testsuite/
	* gfortran.dg/edit_real_1.f90: Add new tests.

From-SVN: r86952
2004-09-02 01:33:01 +00:00
Eric Botcazou
130abd1728 mk-sik-inc.sh: Use a temporary string instead of 'echo -n'.
* mk-sik-inc.sh: Use a temporary string instead of 'echo -n'.
	* mk-srk-inc.sh: Likewise.

From-SVN: r86919
2004-09-01 17:51:42 +00:00
Paul Brook
244fada7d0 error.c (generate_error): Set both iostat and library_return.
* runtime/error.c (generate_error): Set both iostat and
	library_return.
testsuite/
	* gfortran.dg/eof_2.f90: New test.

From-SVN: r86852
2004-08-31 23:43:21 +00:00
Paul Brook
334ff453ea re PR libfortran/16805 (Runtime failure using list directed read from string)
PR libfortran/16805
	* io/list_read.c (next_char): Don't signal EOF for internal files.
	* io/unix.c (mem_alloc_r_at): Don't return NULL for incomplete reads.
testsuite/
2004-08-31  Bud Davis  <bdavis9659@comcast.net>

	* gfortran.dg/list_read_2.f90: New test.

From-SVN: r86844
2004-08-31 20:37:43 +00:00
Tobias Schlüter
43b4305759 unit.c: Separate copyright years by ','.
* io/unit.c: Separate copyright years by ','.
(compare, insert_unit, delete_unit, is_internal_unit, close_units):
Remove blank line in beginning of function.
(get_unit): Simplify code.

From-SVN: r86841
2004-08-31 21:49:33 +02:00
Paul Brook
8a210b0fb0 * io/unit.c (get_unit): Remove superfluous if.
From-SVN: r86838
2004-08-31 18:59:42 +00:00
Paul Brook
bd72d66cb5 transfer.c (read_sf): Rename uinty to readlen.
* io/transfer.c (read_sf): Rename uinty to readlen.  Detect EOF.
	(finalize_transfer): Move setjmp after namlist IO.
	* io/unix.c (mem_alloc_r_at): Calculate remaining length correctly.
testsuite/
	* gfortran.dg/eof_1.f90: New test.

From-SVN: r86831
2004-08-31 15:53:31 +00:00
Paul Brook
c789f36b21 list_read.c (eat_separator): Set at_eo when a '/' is seen.
* list_read.c (eat_separator): Set at_eo when a '/' is seen.
testsuite/
	* gfortran.dg/list_read_1.f90: New file.

From-SVN: r86830
2004-08-31 14:56:09 +00:00
Tobias Schlüter
d7177ab25e trans-decl.c, [...]: Replace all occurences of 'gfc_strlen_type_node' by 'gfc_charlen_type_node'.
fortran/
* trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
all occurences of 'gfc_strlen_type_node' by
'gfc_charlen_type_node'.
* trans-types.h: Same. Also update comment accordingly.

libgfortran/
* libgfortran.h: Replace 'gfc_strlen_type' by
'gfc_charlen_type'. Update comment accordingly.
* intrinsics/args.c, intrinsics/env.c, io/io.h, io/transfer.c:
Replace all occurences of 'gfc_strlen_type' by 'gfc_charlen_type'.

From-SVN: r86828
2004-08-31 16:06:48 +02:00
Paul Brook
da17f5599e trans-types.h: Add comments.
* trans-types.h: Add comments.
	(intmax_type_node, string_type_node, const_string_type_node): Remove.
libgfortran/
	* libgfortran.h: Add comments.

From-SVN: r86810
2004-08-30 23:28:56 +00:00
Richard Henderson
625be28635 Makefile.am (gfor_helper_src): Split selected_kind.f90.
* Makefile.am (gfor_helper_src): Split selected_kind.f90.
        (gfor_built_src): Add selected_int_kind.inc selected_real_kind.inc.
        (selected_int_kind.inc selected_real_kind.inc): New rules.
        * Makefile.in: Regenerate.
        * mk-sik-inc.sh, mk-srk-inc.sh: New files.
        * intrinsics/selected_int_kind.f90: Split from selected_kind.f90,
        include table of detected kinds.
        * intrinsics/selected_real_kind.f90: Similarly.

From-SVN: r86801
2004-08-30 14:34:37 -07:00
Steven G. Kargl
048c989961 bessel.c: New file.
2004-08-29  Steven G. Kargl  <kargls@comcast.net>
	Paul Brook  <paul@codesourcery.com>

	* intrinsics/bessel.c: New file.
	* intrinsics/erf.c: New file.
	* Makefie.am: Add intrinsics/bessel.c and intrinsics/erf.c.
	* configure.ac: Test for C99 Bessel and Error functions.
	* Makefile.in: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.

From-SVN: r86728
2004-08-29 16:31:16 +00:00
Steven G. Kargl
e8525382d9 check.c (gfc_check_besn, [...]): New functions.
2004-08-29  Steven G. Kargl  <kargls@comcast.net>
	Paul Brook  <paul@codesourcery.com>

	* check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
	* f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
	(DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
	(build_builtin_fntypes): New function.
	(gfc_init_builtin_functions): Use it.
	* gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
	and GFC_ISYM_ERF{,C}.
	(gfc_c_int_kind): Declare.
	* intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
	* intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
	gfc_resolve_g77_math1): Add prototypes.
	* resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
	* mathbuiltins.def: Add comment.  Change third argument.  Use
	DEFINE_MATH_BUILTIN_C.  Add bessel and error functions.
	* trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
	(DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
	* trans-types.c (gfc_c_int_kind): Declare.
	(gfc_init_kinds): Set it.
testsuite/
	* gfortran.dg/g77/README: Update.
	* gfortran.dg/g77/erfc.f: Copy from g77.f-torture.
	* gfortran.dg/g77/intrinsic-unix-bessel.f: Ditto.
	* gfortran.dg/g77/intrinsic-unix-erf.f: Ditto.
libgfortran/
	* intrinsics/bessel.c: New file.
	* intrinsics/erf.c: New file.
	* Makefie.am: Add intrinsics/bessel.c and intrinsics/erf.c.
	* configure.ac: Test for C99 Bessel and Error functions.
	* Makefile.in: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.

Co-Authored-By: Paul Brook <paul@codesourcery.com>

From-SVN: r86727
2004-08-29 15:58:16 +00:00
Steven G. Kargl
4c0c6b9f2c gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
2004-08-29  Steven G. Kargl  <kargls@comcast.net>
	Paul Brook  <paul@codesourcery.com>

	* gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
	(gfc_check_f, gfc_simplify_f): Add f0.
	* intrinsic.c (do_check): Call f0.  Flatten.
	(add_sym_0): Fix prototype.  Set f0.
	(add_functions): Add getgid, getgid and getuid.
	(resolve_intrinsic): Remove obsolete comment.
	(do_simplify): Call f0.
	* intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
	gfc_resolve_getuid): Add prototypes.
	* iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
	gfc_resolve_getuid): New functions.
	* trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
	GFC_ISYM_GET?ID.
libgfortran/
	* Makefile.am: Add intrinsics/getXid.c.
	* configure.ac: Add tests for get{g,p,u}id.
	* config.h.in: Regenerate.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

Co-Authored-By: Paul Brook <paul@codesourcery.com>

From-SVN: r86703
2004-08-28 23:43:41 +00:00
Paul Brook
7984a2f04b re PR libfortran/17195 (Infinite loop in output_float in libgfortran/io/write.c)
PR libfortran/17195
	* libgfortran.h (rtoa): Remove prototype.
	* runtime/error.c (rtoa): Remove.
	* io/write.c (calculate_G_format): Don't add blanks if E format is
	used.  Add correct number of blanks when exponent width is specified.
	(output_float): Rewrite.
testsuite/
	* gfortran.dg/edit_real_1.f90: New test.

From-SVN: r86701
2004-08-28 19:48:02 +00:00
Paul Brook
e041cc5aff Comment typo.
From-SVN: r86660
2004-08-27 14:37:13 +00:00
Paul Brook
c100eff11e rewind.c (st_rewind): Reset unit to read mode.
* io/rewind.c (st_rewind): Reset unit to read mode.
testsuite/
	* gfortran.dg/rewind_1.f90: New test.

From-SVN: r86659
2004-08-27 13:44:52 +00:00
Bud Davis
55948b693e re PR libfortran/16597 (gfortran: bug in unformatted I/O on scratch files)
2004-08-27  Bud Davis  <bdavis9659@comcast.net>

        PR fortran/16597
        * io/io.h: created typedef for unit_mode.
        * io/io.h (gfc_unit): added mode to unit structure.
        * io/transfer.c (data_transfer_init): flush if a write then
        read is done on a unit (direct access files).
        * io/rewind.c (st_rewind): Used unit mode instead of global.

        * gfortran.dg/pr16597.f90: New test.

From-SVN: r86654
2004-08-27 07:59:30 +00:00