Commit Graph

506 Commits

Author SHA1 Message Date
Janne Blomqvist
b879c108b2 PR libfortran/43605 FTELL intrinsic, take 2.
Co-Authored-By: Dominique d'Humieres <dominiq@lps.ens.fr>

From-SVN: r157932
2010-04-01 23:51:45 +03:00
Paul Thomas
a1ff2ab8e4 transfer.c: Update copyright.
2010-04-01  Paul Thomas  <pault@gcc.gnu.org>

	* io/transfer.c : Update copyright.
	* io/unix.c : ditto
	* io/read.c : ditto
	* io/io.h : ditto
	* io/unix.h : ditto
	* io/inquire.c : ditto
	* io/format.c : ditto
	* io/list_read.c : ditto
	* runtime/error.c : ditto
	* libgfortran.h : ditto
	* intrinsics/date_and_time.c: ditto
	* intrinsics/args.c : ditto

From-SVN: r157924
2010-04-01 18:22:00 +00:00
Janne Blomqvist
e76a3fde81 PR libfortran/43605 Fix FTELL for formatted files
Co-Authored-By: Manfred Schwarb <manfred99@gmx.ch>

From-SVN: r157914
2010-04-01 19:22:57 +03:00
Jerry DeLisle
6c1400dd58 re PR fortran/43265 (No EOF condition if reading with '(x)' from an empty file)
2010-03-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/43265
	* io/transfer.c (next_record_r): Only call hit_eof for specific
	conditions when an EOF is encountered.

From-SVN: r157810
2010-03-30 03:22:28 +00:00
Tobias Burnus
10fa280a98 re PR libfortran/43551 (Buffered direct I/O reads wrong record)
2010-03-29  Tobias Burnus  <burnus@net-b.de>

        PR fortran/43551
        * io/unix.c (buf_write): Set physical_offset after lseek.

2010-03-29  Tobias Burnus  <burnus@net-b.de>

        PR fortran/43551
        * gfortran.dg/direct_io_12.f90: New test.

From-SVN: r157792
2010-03-29 08:17:19 +02:00
Jerry DeLisle
6a10835a6b re PR fortran/43517 (spurious end-of-file condition when namelist read follows formatted read)
2010-03-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/43517
	* io/read.c (read_x): Return if seen EOR condition.

From-SVN: r157737
2010-03-26 03:23:34 +00:00
Jerry DeLisle
260f179b8d re PR fortran/43409 (I/O: INQUIRE for SIZE does not work.)
2010-03-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/43409
	* io/io.h: Fix type of size in st_parameter_inquire structure.

From-SVN: r157618
2010-03-22 02:39:02 +00:00
Jerry DeLisle
41c3cddc6b re PR fortran/43409 (I/O: INQUIRE for SIZE does not work.)
2010-03-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/43409
	* ioparm.def: Change inquire size variable to type pointer to
	GFC_IO_INT type.

2010-03-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/43409
	* io/unix.h: Add prototype for new function to return file size.
	* io/unix.c (file_size): New function.
	* io/inquire.c (inquire_via_unit): Use new function.
	(inquire_via_filename): Use new function.

From-SVN: r157593
2010-03-20 14:39:00 +00:00
Jerry DeLisle
bf71e8f028 transfer.c (read_sf_internal): Remove stray function declaration used during debigging.
2010-03-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* io/transfer.c (read_sf_internal): Remove stray function declaration
	used during debigging.

From-SVN: r157531
2010-03-18 03:26:07 +00:00
Jerry DeLisle
59011a60c0 re PR fortran/43265 (No EOF condition if reading with '(x)' from an empty file)
2010-03-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/43265
	* io/io.h: Delete prototype for read_sf, making it static.
	* io/read.c (read_x): Modify to call hit_eof if PAD="no".
	* io/transfer.c (read_sf_internal): New static function extracted from
	read_sf for use on internal units only. Handle empty string case.
	(read_sf): New factoring of this function, make it static.  Add special
	conditions for EOF based on ADVANCE="no", PAD="no", and whether any
	bytes have been previously read from the record.
	(read_block_form): Modify to call read_sf or read_sf_internal.
	(next_record_r): Add a done flag similar to next_record_w. Call hit_eof
	if internal array unit next record returns finished, meaning an EOF was
	found and not done, ie not the last record expected.  For external
	units call hit_eof if item_count is 1 or there are no pending spaces.
	(next_record): Update call to next_record_r.

From-SVN: r157527
2010-03-18 02:38:17 +00:00
Kai Tietz
b2ef02df53 format.c (parse_format_list): Add to ERROR, WARNING, SILENT enumerators NOTIFICATION_ prefix.
2010-03-12  Kai Tietz  <kai.tietz@onevision.com>

        PR/42950
        * io/format.c (parse_format_list): Add to ERROR, WARNING,
        SILENT enumerators NOTIFICATION_ prefix.
        * runtime/error.c (notification_std): Likewise.
        * libgfortran.h (notification): Likewise.
        (GFC_LARGEST_BUF): Check for HAVE_GFC_INTEGER_16.

From-SVN: r157407
2010-03-12 15:43:55 +01:00
Tobias Burnus
2f4d643dab re PR fortran/43228 (NAMELIST I/O: Reading at 2 dimensions (rank) array values.)
2010-03-11  Tobias Burnus  <burnus@net-b.de>

        PR fortran/43228
        * io/list_read.c (nml_parse_qualifier): Disable expanded_read
        for array sections.

2010-03-11  Tobias Burnus  <burnus@net-b.de>

        PR fortran/43228
        * gfortran.dg/namelist_61.f90: New test.

From-SVN: r157389
2010-03-11 17:06:37 +01:00
Jerry DeLisle
b7137299f1 re PR libfortran/43320 (200.sixtrack fails setup)
2010-03-10  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/43320
	* io/transfer.c (next_record_r): Add hit_eof based on item_count
	condition.

From-SVN: r157377
2010-03-11 02:15:33 +00:00
Jerry DeLisle
04b98fd2ed re PR fortran/43265 (No EOF condition if reading with '(x)' from an empty file)
2010-03-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/43265
	* io/read.c: Include fbuf.h and unix.h to enable lower level I/O for
	read_x. (read_x): Replace the use of read_sf with equivalent lower level
	I/O, eliminating unneeded code and handling EOF and EOR conditions.
	* io/io.h: Revise prototype for read_sf.
	* io/transfer.c (read_sf): Delete no_error parameter and all uses of it.
	(read_block_form): Likewise.
	(next_record_r): Delete wrong code call to hit_eof.

From-SVN: r157310
2010-03-09 14:41:17 +00:00
Kai Tietz
196c8bc8a3 libgfortran.h (_POSIX): Define if __MINGW32__ is defined.
2010-03-08  Kai TIetz  <kai.tietz@onevision.com>

        PR/42950
        * libgfortran.h (_POSIX): Define if __MINGW32__ is defined.
        (gfc_printf): Define to gnu_printf for __MINGW32__ case,
        otherwise to __printf__.
        (gfc_strtof,gfc_strtod,gfc_strtold): Define for mingw case
        to POSIX compatible converter functions.
        (runtime_error): Use instead gfc_printf as formatter
        attribute name.
        (runtime_error_at): Likewise.
        (runtime_warning_at): Likewise.
        (st_printf): Likewise.
        * intrinsics/date_and_time.c (localtime_r): Undefine
        possible defined macro.
        (gmtime_r): Likewise.
        * io/read.c (convert_real): Use gfc_strtof, gfc_strtod,
        and gfc_strtold.

From-SVN: r157271
2010-03-08 09:01:55 +01:00
Jerry DeLisle
f983954d59 transfer.c (require_type): Subtract one from item_count for output of error message.
2010-02-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* io/transfer.c (require_type): Subtract one from item_count for output
	of error message.  Add comment before formatted_transfer function
	explaining why the item_count is off by one.

From-SVN: r157060
2010-02-25 05:47:10 +00:00
Rainer Orth
28c64ec893 * io/write_float.def (WRITE_FLOAT): Use __builtin_signbit.
From-SVN: r157048
2010-02-24 15:35:40 +00:00
Jerry DeLisle
3bbc846211 list_read.c (list_formatted_read_scalar): Remove duplicate code.
2010-02-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* io/list_read.c (list_formatted_read_scalar): Remove duplicate code.

From-SVN: r156988
2010-02-23 05:00:42 +00:00
Jerry DeLisle
6c076a6c42 re PR libfortran/42742 (Handle very large format strings correctly)
2010-02-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/42742
	* io/format.c (reset_fnode_counters): Use the correct pointer to the
	head of the fnode list. (parse_format): Remove previous hack that set
	limit on size of format string for caching.

From-SVN: r156568
2010-02-07 07:45:55 +00:00
Jerry DeLisle
26bda00088 PR libfortran
2010-02-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran
	* io/transfer.c (read_sf): Handle EOR and EOF conditions for
	ADVANCE="no" with PAD="yes" or PAD="no".

From-SVN: r156540
2010-02-06 14:39:51 +00:00
Jerry DeLisle
e3e2cdd182 re PR fortran/42901 (reading array of structures from namelist fails)
2010-02-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/42901
	* io/list_read.c (nml_get_obj_data): Add new qualifier flag, clean up
	code, and adjust logic to set namelist info pointer correctly for array
	qualifiers of derived type components.

From-SVN: r156487
2010-02-04 01:49:41 +00:00
Jerry DeLisle
601aa68fd9 format.c (parse_format): Set limit on size of format strings that will be cached.
2010-01-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* io/format.c (parse_format): Set limit on size of format strings that
	will be cached.

From-SVN: r155939
2010-01-15 15:52:28 +00:00
Janne Blomqvist
c9828e7878 PR libfortran/42420 Large file capable stat for MingW
From-SVN: r155593
2010-01-03 20:09:37 +02:00
Tobias Burnus
17314cd9eb re PR libfortran/41711 ([F08] BOZ edit-descr does not support reading large kind reals)
2009-12-08  Tobias Burnus  <burnus@net-b.de>

        PR fortran/41711
        * io/read.c (set_integer): Support kind=10 for reading
        real/complex BOZ.

2009-12-08  Tobias Burnus  <burnus@net-b.de>

        PR fortran/41711
        * gfortran.dg/boz_15.f90: New test.

From-SVN: r155088
2009-12-08 15:12:06 +01:00
Janne Blomqvist
a4384badd7 PR libfortran/40812 Large file support for MinGW
From-SVN: r154984
2009-12-04 18:28:44 +02:00
Kai Tietz
509f7fdc0e unix.c (find_file): Add variable id conditionally for mingw targets.
2009-11-30  Kai Tietz  <Kai.Tietz@onevision.com>

        * io/unix.c (find_file): Add variable id conditionally for
        mingw targets.

From-SVN: r154806
2009-11-30 15:12:33 +01:00
Jakub Jelinek
14ca4cf89c pack_generic.c (pack_internal): Remove unused zero_sized variable.
* intrinsics/pack_generic.c (pack_internal): Remove unused
	zero_sized variable.
	* intrinsics/unpack_generic.c (unpack0): Remove unused size
	variable.
	* io/write.c (namelist_write_newline): Remove unused length
	variable.
	* io/unix.c (find_file): Remove unused id variable.
	* m4/ifunction.m4 (SCALAR_ARRAY_FUNCTION): Remove unused sstride
	variable.
	* generated/maxloc1_16_i1.c: Regenerated.
	* generated/maxloc1_16_i16.c: Regenerated.
	* generated/maxloc1_16_i2.c: Regenerated.
	* generated/maxloc1_16_i4.c: Regenerated.
	* generated/maxloc1_16_i8.c: Regenerated.
	* generated/maxloc1_16_r10.c: Regenerated.
	* generated/maxloc1_16_r16.c: Regenerated.
	* generated/maxloc1_16_r4.c: Regenerated.
	* generated/maxloc1_16_r8.c: Regenerated.
	* generated/maxloc1_4_i1.c: Regenerated.
	* generated/maxloc1_4_i16.c: Regenerated.
	* generated/maxloc1_4_i2.c: Regenerated.
	* generated/maxloc1_4_i4.c: Regenerated.
	* generated/maxloc1_4_i8.c: Regenerated.
	* generated/maxloc1_4_r10.c: Regenerated.
	* generated/maxloc1_4_r16.c: Regenerated.
	* generated/maxloc1_4_r4.c: Regenerated.
	* generated/maxloc1_4_r8.c: Regenerated.
	* generated/maxloc1_8_i1.c: Regenerated.
	* generated/maxloc1_8_i16.c: Regenerated.
	* generated/maxloc1_8_i2.c: Regenerated.
	* generated/maxloc1_8_i4.c: Regenerated.
	* generated/maxloc1_8_i8.c: Regenerated.
	* generated/maxloc1_8_r10.c: Regenerated.
	* generated/maxloc1_8_r16.c: Regenerated.
	* generated/maxloc1_8_r4.c: Regenerated.
	* generated/maxloc1_8_r8.c: Regenerated.
	* generated/maxval_i1.c: Regenerated.
	* generated/maxval_i16.c: Regenerated.
	* generated/maxval_i2.c: Regenerated.
	* generated/maxval_i4.c: Regenerated.
	* generated/maxval_i8.c: Regenerated.
	* generated/maxval_r10.c: Regenerated.
	* generated/maxval_r16.c: Regenerated.
	* generated/maxval_r4.c: Regenerated.
	* generated/maxval_r8.c: Regenerated.
	* generated/minloc1_16_i1.c: Regenerated.
	* generated/minloc1_16_i16.c: Regenerated.
	* generated/minloc1_16_i2.c: Regenerated.
	* generated/minloc1_16_i4.c: Regenerated.
	* generated/minloc1_16_i8.c: Regenerated.
	* generated/minloc1_16_r10.c: Regenerated.
	* generated/minloc1_16_r16.c: Regenerated.
	* generated/minloc1_16_r4.c: Regenerated.
	* generated/minloc1_16_r8.c: Regenerated.
	* generated/minloc1_4_i1.c: Regenerated.
	* generated/minloc1_4_i16.c: Regenerated.
	* generated/minloc1_4_i2.c: Regenerated.
	* generated/minloc1_4_i4.c: Regenerated.
	* generated/minloc1_4_i8.c: Regenerated.
	* generated/minloc1_4_r10.c: Regenerated.
	* generated/minloc1_4_r16.c: Regenerated.
	* generated/minloc1_4_r4.c: Regenerated.
	* generated/minloc1_4_r8.c: Regenerated.
	* generated/minloc1_8_i1.c: Regenerated.
	* generated/minloc1_8_i16.c: Regenerated.
	* generated/minloc1_8_i2.c: Regenerated.
	* generated/minloc1_8_i4.c: Regenerated.
	* generated/minloc1_8_i8.c: Regenerated.
	* generated/minloc1_8_r10.c: Regenerated.
	* generated/minloc1_8_r16.c: Regenerated.
	* generated/minloc1_8_r4.c: Regenerated.
	* generated/minloc1_8_r8.c: Regenerated.
	* generated/minval_i1.c: Regenerated.
	* generated/minval_i16.c: Regenerated.
	* generated/minval_i2.c: Regenerated.
	* generated/minval_i4.c: Regenerated.
	* generated/minval_i8.c: Regenerated.
	* generated/minval_r10.c: Regenerated.
	* generated/minval_r16.c: Regenerated.
	* generated/minval_r4.c: Regenerated.
	* generated/minval_r8.c: Regenerated.
	* generated/product_c10.c: Regenerated.
	* generated/product_c16.c: Regenerated.
	* generated/product_c4.c: Regenerated.
	* generated/product_c8.c: Regenerated.
	* generated/product_i1.c: Regenerated.
	* generated/product_i16.c: Regenerated.
	* generated/product_i2.c: Regenerated.
	* generated/product_i4.c: Regenerated.
	* generated/product_i8.c: Regenerated.
	* generated/product_r10.c: Regenerated.
	* generated/product_r16.c: Regenerated.
	* generated/product_r4.c: Regenerated.
	* generated/product_r8.c: Regenerated.
	* generated/sum_c10.c: Regenerated.
	* generated/sum_c16.c: Regenerated.
	* generated/sum_c4.c: Regenerated.
	* generated/sum_c8.c: Regenerated.
	* generated/sum_i1.c: Regenerated.
	* generated/sum_i16.c: Regenerated.
	* generated/sum_i2.c: Regenerated.
	* generated/sum_i4.c: Regenerated.
	* generated/sum_i8.c: Regenerated.
	* generated/sum_r10.c: Regenerated.
	* generated/sum_r16.c: Regenerated.
	* generated/sum_r4.c: Regenerated.
	* generated/sum_r8.c: Regenerated.

From-SVN: r154729
2009-11-28 21:29:51 +01:00
Janne Blomqvist
872d209423 Move includes after include guards
From-SVN: r154343
2009-11-19 22:23:03 +02:00
Jerry DeLisle
0b4d979f55 re PR fortran/42090 (I/O: Problems when reading partial records in formatted direct access files)
2009-11-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/42090
	* io/transfer.c (skip_record): Set bytes_left_subrecord to zero after
	skipping the remaining bytes in the record.
	(next_record_r): Call skip_record with the number of bytes_left to be
	skipped.

From-SVN: r154316
2009-11-19 04:50:04 +00:00
Janne Blomqvist
a2f560d05c Forgot files from r153825
From-SVN: r153827
2009-11-03 00:14:20 +02:00
Janne Blomqvist
92cbdb6845 Split up io/io.h
From-SVN: r153825
2009-11-02 23:52:59 +02:00
Jerry DeLisle
486024b158 re PR libfortran/41711 ([F08] BOZ edit-descr does not support reading large kind reals)
2009-10-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/41711
	* libgfortran.h: Define larger sizes for BOZ conversion	buffers.
	* io/write.c (extract_uint): Include case where size is 10 if integer
	is large enough. (write_int): Rename to	write_boz. (write_boz): Factor
	out extract_uint and delete the	conversion function.
	(btoa_big): New binary conversion function.
	(otoa_big): New octal conversion function.
	(ztoa_big): New	hexidecimal conversion function.
	(write_b): Modify to use new function.
	(write_o): Likewise.
	(write_z): Likewise.

From-SVN: r153724
2009-10-29 19:20:18 +00:00
Jerry DeLisle
0a81006d27 re PR libfortran/41683 (F2003 Repeat specification after P descriptor rejected)
2009-10-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/41683
	* io/format.c (parse_format_list): Allow a repeat specifier immediately
	after a P specifier.

From-SVN: r152695
2009-10-13 01:43:39 +00:00
Jerry DeLisle
a30595bf43 re PR fortran/38439 (I/O PD edit descriptor inconsistency)
2009-10-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/38439
	* io/format.c (parse_format_list): Correct logic for FMT_F reading vs
	writing. Code clean-up.

From-SVN: r152657
2009-10-12 00:52:45 +00:00
Jerry DeLisle
d8c00a207c re PR fortran/38439 (I/O PD edit descriptor inconsistency)
2009-10-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/38439
	* io/format.c (parse_format_list): Add check for tokens not allowed
	after P specifier. Fix comments.  Remove un-needed code. Fix the
	default exponent list. Correct pointer assignment error.

From-SVN: r152644
2009-10-11 17:37:50 +00:00
Jerry DeLisle
0e8fc1857d re PR libfortran/35862 ([F2003] Implement new rounding modes for run time)
2009-10-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/35862
	* write_float.def (outout_float): Fix handling of special case where no
	digits after the decimal point and values less than 1.0. Adjust index
	into digits string. (WRITE_FLOAT): Remove special case code from macro.

From-SVN: r152483
2009-10-06 03:08:20 +00:00
Jerry DeLisle
379924dd59 re PR libfortran/35862 ([F2003] Implement new rounding modes for run time)
2009-09-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/35862
	* io.h (gfc_unit): Add round_status.
	(format_token): Add enumerators for rounding format specifiers.
	* transfer.c (round_opt): New options table.
	(formatted_transfer_scalar_read): Add set round_status for each rounding
	format token. (formatted_transfer_scalar_write): Likewise.
	* format.c (format_lex): Tokenize the rounding format specifiers.
	(parse_format_list): Parse the rounding format specifiers.
	* write_float.def (outout_float): Modify rounding code to use new
	variable rchar to set the appropriate rounding. Fix some whitespace.
	* unit.c (get_internal_unit): Initialize rounding mode for internal
	units. (init_units): Likewise.

From-SVN: r152263
2009-09-29 02:47:54 +00:00
Jerry DeLisle
bf187ce8be re PR fortran/41328 (bad iostat when reading DOS file in a character array (non-advancing))
2009-09-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/41328
	* io/transfer.c (read_sf): Set at_eof flag on short read if any
	characters were successfully read so that EOF condition with no EOR
	marker succeeds.

From-SVN: r151877
2009-09-19 04:41:38 +00:00
Jerry DeLisle
ee3eb6a416 re PR fortran/41328 (bad iostat when reading DOS file in a character array (non-advancing))
2009-09-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/41328
	* io/transfer.c (read_sf): Adjust fbuf position and do proper
	fbuf reads to traverse CR, CR-LF, and LF style line ends.

From-SVN: r151665
2009-09-13 03:41:41 +00:00
Jerry DeLisle
b495ad7f55 re PR fortran/41219 (libgfortran build warnings)
2009-09-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/41219
	* io/write.c (write_a_char4): Use correct type for crlf constant.

From-SVN: r151653
2009-09-12 15:08:27 +00:00
Jerry DeLisle
951b8fbe45 re PR fortran/41192 (NAMELIST input with just a comment ("&NAME ! comment \") fails)
2009-09-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/41192
	* io/list_read.c (eat_line): Enable eat_line to function on
	internal units.

	PR libgfortran/41219
	* io/list_read.c (nml_read_obj): Replace GFC_DTYPE_UNKNOWN with
	BT_NULL to get rid of warning.

From-SVN: r151495
2009-09-08 00:59:05 +00:00
Jerry DeLisle
e2cec2c358 re PR fortran/41075 ([F2008] Implement unlimited format item)
2009-08-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/41075
	* io/io.h (enum format_token): Add FMT_STAR.
	* io/format.c (format_lex): Add case for FMT_STAR.
	(parse_format_list): Parse FMT_STAR and check for left paren
	after. (next_format0): Modify helper function to check for
	unimited format and return the repeated format node.  Update
	comments to clarify.

From-SVN: r150844
2009-08-17 14:27:29 +00:00
Jerry DeLisle
37d1bbbc62 re PR libfortran/32784 ([win32] Using 'CONOUT$', 'CONIN$', or 'CONERR$' as assigned file generates Fortran runtime error: Bad file descriptor)
2009-08-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/32784
	io/unix.c (regular_file): Add support for CONIO on mingw.

From-SVN: r150779
2009-08-14 21:10:06 +00:00
Jerry DeLisle
ba286d5696 re PR fortran/40853 (I/O: Namelist read error)
2009-08-02  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/40853
	* io/list_read.c (nml_get_obj_data): Do not set nl
	pointer to first_nl if nl->next is NULL.

From-SVN: r150356
2009-08-02 18:31:07 +00:00
Jerry DeLisle
d8771b59b7 re PR libfortran/32784 ([win32] Using 'CONOUT$', 'CONIN$', or 'CONERR$' as assigned file generates Fortran runtime error: Bad file descriptor)
2009-07-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/32784
	* unix.c (regular_file): Check for CONIN$ CONOUT$, and CONERR$ and open
	the respective /dev/conin or /dev/conout devices.  This is Cygwin
	specific.

From-SVN: r149970
2009-07-23 00:58:46 +00:00
Janne Blomqvist
217c4f5393 When finalizing I/O transfer, set current_record to 0 before returning.
PR libfortran/40714

Co-Authored-By: Jerry DeLisle <jvdelisle@gcc.gnu.org>

From-SVN: r149757
2009-07-17 22:40:23 +03:00
Tobias Burnus
ffa61a5ee8 re PR fortran/40588 (Small bug in match_charkind_name)
2009-07-12  Tobias Burnus  <burnus@net-b.de>
            Philippe Marguinaud <philippe.marguinaud@meteo.fr>

        PR fortran/40588
        * primary.c (match_charkind_name): Fix condition for $ matching.

        PR libfortran/22423
        * libgfortran.h: Typedef the GFC_DTYPE_* enum.

2009-07-12  Tobias Burnus  <burnus@net-b.de>

        PR libfortran/22423
        * io/io.h (namelist_type): Use the proper enum for GFC_DTYPE_*.
        * intrinsics/iso_c_binding.c (c_f_pointer_u0): Make sure
        variable is initialized to silence warning.


Co-Authored-By: Philippe Marguinaud <philippe.marguinaud@meteo.fr>

From-SVN: r149545
2009-07-13 08:26:38 +02:00
Jerry DeLisle
2418d0e0e6 re PR libfortran/40330 (incorrect IO)
2009-07-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/40330
	PR libfortran/40662
	* io/io.h (st_parameter_dt): Define format_not_saved bit used to signal
	whether the parsed format data was previously saved. Used to determine
	if the current format data should be freed or not.
	* io/transfer.c (st_read_done): Use the format_not_saved bit.
	(st_write_done): Likewise.
	* io/format.c (parse_format_list): Add boolean pointer to arg list. This
	pointer is used to return status to the caller regarding whether it is
	safe to cache the parsed format data.  Currently, if a FMT_STRING token
	is encounetered, it is not safe to cache. Also, added a local boolean
	variable to hold this information as recursive calls to
	parse_format_list are made.  Remove previous save_format logic.
	(parse_format): Do not use the format caching facility if the current
	unit is an internal unit or if it is not safe to save parsed format
	data.

From-SVN: r149398
2009-07-09 01:20:23 +00:00
Jerry DeLisle
93ab3a3d79 re PR fortran/40576 (Endless loop in internal write)
2009-06-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/40576
	* io/transfer.c (sset): Adjust exit condition for loop.

From-SVN: r149075
2009-06-30 00:46:35 +00:00
Jerry DeLisle
573cbcb9c6 re PR fortran/40508 (memory leak in internal write of gfortran)
2009-06-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/40508
	* io/format.c: Don't save parsed format data for internal units.

From-SVN: r148823
2009-06-23 00:16:24 +00:00