Commit Graph

443 Commits

Author SHA1 Message Date
Janne Blomqvist a277877c31 Re-add ChangeLog entry that somehow managed to get itself missing in action.
From-SVN: r112068
2006-03-14 22:49:52 +02:00
Paul Thomas a4b9e93e5d re PR libfortran/25378 ([Fortran 2003] maxloc for all-false mask)
2006-03-13  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/25378
	* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Set the initial position to zero and
	modify the condition for updating it, to implement the F2003 requirement for all(mask)
	is false.

2006-03-13  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/25378
	* libgfortran/m4/minloc1.m4: Set the initial position to zero and modify the condition for
	updating it, to implement the F2003 requirement for all(mask).eq.false.
	* libgfortran/m4/maxloc1.m4: The same.
	* libgfortran/m4/iforeach.m4: The same.
	* libgfortran/m4/minloc0.m4: The same.
	* libgfortran/m4/maxloc0.m4: The same.
	* libgfortran/generated/maxloc0_16_i16.c: Regenerated, together with 41 others.
	* libgfortran/generated/minloc0_16_i16.c: Regenerated, together with 41 others.

2006-03-13  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/25378
	* gfortran.fortran-torture/execute/intrinsic_mmloc_3.f90: Expand test to include more
	permuatations of mask and index.
	* testsuite/gfortran.dg/scalar_mask_1.f90: Modify last test to respond to F2003 spec.
	that the position returned for an all false mask && condition is zero.

From-SVN: r112028
2006-03-13 22:49:56 +00:00
Jerry DeLisle 99c6db71de re PR libfortran/26499 (gfortran - End of File incorrectly positioned after binary I/O.)
2006-03-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/26499
	* io/file_pos (st_rewind): Flush always.
	* io/unix.c (fd_truncate): Return SUCCESS rather than FAILURE for
	special files like /dev/null.
	* io/transfer.c (st_write_done): Remove broken logic that prevented
	calling fd_truncate.

From-SVN: r111924
2006-03-10 03:15:36 +00:00
Jerry DeLisle 03e957f8c8 re PR fortran/26554 ([gfortran] incorrect behaviour when reading a logical variable from a string)
2006-03-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/26554
	* io/list_read.c (read_logical): Return the value if not in namelist
	mode.

From-SVN: r111738
2006-03-05 17:54:07 +00:00
Thomas Koenig 5b725b8d04 re PR fortran/25031 ([4.1 only] Allocatable array can be reallocated.)
2006-03-03  Thomas Koenig  <Thomas.Koenig@online.de>

	PR fortran/25031
	* trans-array.h:  Adjust gfc_array_allocate prototype.
	* trans-array.c (gfc_array_allocate):  Change type of
	gfc_array_allocatate to bool.  Function returns true if
	it operates on an array.  Change second argument to gfc_expr.
	Find last reference in chain.
	If the function operates on an allocatable array, emit call to
	allocate_array() or allocate64_array().
	* trans-stmt.c (gfc_trans_allocate):  Code to follow to last
	reference has been moved to gfc_array_allocate.
	* trans.h:  Add declaration for gfor_fndecl_allocate_array and
	gfor_fndecl_allocate64_array.
	(gfc_build_builtin_function_decls):  Add gfor_fndecl_allocate_array
	and gfor_fndecl_allocate64_array.

2006-03-03  Thomas Koenig  <Thomas.Koenig@online.de>

	PR fortran/25031
	* runtime/memory.c:  Adjust copyright years.
	(allocate_array):  New function.
	(allocate64_array):  New function.
	* libgfortran.h (error_codes):  Add ERROR_ALLOCATION.

2006-03-03  Thomas Koenig  <Thomas.Koenig@online.de>

	PR fortran/25031
	* multiple_allocation_1.f90:  New test.

From-SVN: r111677
2006-03-03 16:18:46 +00:00
Jerry DeLisle c9f15d9c0e re PR libfortran/26136 (List directed input with underfilled (logicals) array read incorrectly)
2006-02-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/26136
	* io/io.h: Add flag for reading from line_buffer.
	* io/list_read.c (l_push_char): New function to save namelist
	input when reading logicals.
	(free_line): New function to free line_buffer memory.
	(next_char): Added feature to read from line_buffer.
	(read_logical): Use new functions to test for '=' after reading a
	logical value, checking for possible variable name.
	(namelist_read): Use free_line when all done.

From-SVN: r111597
2006-03-01 06:04:45 +00:00
Jerry DeLisle 9985dd8aaf re PR libfortran/26464 (Runtime I/O error/invald argument on READ)
2006-02-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/26464
	* io/file_pos.c (st_backspace): Flush and truncate file
	when in AFTER_ENDFILE condition.
	* io/transfer.c (st_read_done): Remove flush, no longer needed.

From-SVN: r111506
2006-02-28 02:07:00 +00:00
Jerry DeLisle c5418dcb96 re PR libfortran/26423 (Error on binary I/O for large array)
2006-02-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/26423
	* io/unix.c (fd_seek): Revert change from 25949.
	(fd_read): Same.
	(fd_write): Same.

From-SVN: r111420
2006-02-24 18:16:25 +00:00
François-Xavier Coudert 8f0d39a86b re PR libfortran/21303 (L edit descriptor without a width)
PR libfortran/21303

	* gfortran.h (notification): New enumeration.
	(gfc_notification_std): Prototype for the new function.
	* error.c (gfc_notification_std): New function.
	* io.c (check_format): Handle the case of a L format descriptor
	without a width.

	* runtime/error.c (notification_std): New function.
	* libgfortran.h (notification): New enumeration.
	* io/io.h (notification_std): Prototype for the new function. 
	* io/format.c (parse_format_list): Handle the case of a L format
	descriptor without a width.

	* gcc/testsuite/gfortran.dg/fmt_l.f90: New test.

From-SVN: r111281
2006-02-19 21:31:02 +00:00
Francois-Xavier Coudert c05f6d04cb * io/open.c (edit_modes): Correct abusive copy-pasting.
From-SVN: r111266
2006-02-19 10:23:28 +00:00
Francois-Xavier Coudert 83d38ece09 re PR libfortran/24903 (dotprod should use __builtin_conj)
PR libfortran/24903
	* m4/dotprodc.m4: Use __builtin_conj instead of assigning real
	and imaginary parts separately.
	* generated/dotprod_c4.c: Regenerated.
	* generated/dotprod_c8.c: Regenerated.
	* generated/dotprod_c10.c: Regenerated.
	* generated/dotprod_c16.c: Regenerated.

From-SVN: r111131
2006-02-16 07:52:22 +00:00
Janne Blomqvist 82b8244c51 re PR libfortran/25949 (Unbounded I/O buffer memory usage for formatted IO)
2006-02-12  Janne Blomqvist  <jb@gcc.gnu.org>

	PR libgfortran/25949
	* io/io.h: Add set function pointer to struct stream.  
	* io/unix.c (fd_seek): Only update offset, don't seek.
	(fd_sset): New function.
	(fd_read): Call lseek directly if necessary.
	(fd_write): Likewise.
	(fd_open): Set pointer to fd_sset.
	(mem_set): New function.
	(open_internal): Set pointer to mem_set.
	* io/transfer.c (write_block_direct): Rename to write_buf, add
	error return, non-pointer length argument.
	(unformatted_write): Update to use write_buf.
	(us_write): Simplify by using swrite instead of salloc_w.
	(write_us_marker): New function.
	(new_record_w): Use sset instead of memset, use write_us_marker,
	simplify by using swrite instead of salloc_w.

From-SVN: r110895
2006-02-12 21:59:32 +02:00
François-Xavier Coudert 5f8f531322 re PR libfortran/25425 ([4.1 only] F95 and F2003 differ on list-directed output for 0.0)
PR libfortran/25425

	* trans-decl.c (gfc_generate_function_code): Add new argument,
	pedantic, to set_std call.

	* libgfortran.h: Add pedantic field to compile_options struct.
	* io/write.c (calculate_G_format): Depending on the standard,
	choose E or F format for list-directed output of 0.0.
	* runtime/error.c (notify_std): Make warning and error dependent
	on pedanticity.
	* runtime/compile_options.c (set_std): Use new pedantic argument.

From-SVN: r110769
2006-02-08 20:54:14 +00:00
Tobias Schlüter 43ff4e9aa3 re PR libfortran/25577 (gfortran routine mvbits returns wrong answer.)
libgfortran/
2006-02-07  Dale Ranta  <dir@lanl.gov>

	PR fortran/25577
	* intrinsics/mvbits.c: Shift '(TYPE)1' type when building 'lenmask'.

testsuite/
2006-02-07  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>

	PR fortran/25577
	* gfortran.dg/mvbits_1.f90: New.

Also fixed Dirk Mueller's preceding ChangeLog entry.

From-SVN: r110728
2006-02-08 00:52:37 +01:00
Rainer Emrich 0e5264e8ea c99_functions.c: Work around incompatible declarations of cabs{,f,l} on pre-C99 IRIX systems.
2006-02-07  Rainer Emrich <r.emrich@de.tecosim.com>

	* intrinsics/c99_functions.c: Work around incompatible
        declarations of cabs{,f,l} on pre-C99 IRIX systems.

From-SVN: r110700
2006-02-07 18:26:54 +01:00
Thomas Koenig eaa90d25da re PR fortran/23815 (Add -byteswapio flag)
2005-02-06  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/23815
	* gfortran.texi: Document the GFORTRAN_CONVERT_UNIT environment
	variable.
	* invoke.texi:  Mention the "Runtime" chapter.
	Document the -fconvert= option.
	* gfortran.h:  Add options_convert.
	* lang.opt:  Add fconvert=little-endian, fconvert=big-endian,
	fconvert=native and fconvert=swap.
	* trans-decl.c (top level):  Add gfor_fndecl_set_convert.
	(gfc_build_builtin_function_decls):  Set gfor_fndecl_set_convert.
	(gfc_generate_function_code):  If -fconvert was specified,
	and this is the main program, add a call to set_convert().
	* options.c:  Handle the -fconvert options.

2005-02-06  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/23815
	* runtime/environ.c (init_unformatted):  Add GFORTRAN_CONVERT_UNIT
	environment variable.
	(top level):  Add defines, type and static variables for
	GFORTRAN_CONVERT_UNIT handling.
	(search_unit):  New function.
	(match_word): New function.
	(match_integer): New function.
	(next_token): New function.
	(push_token): New function.
	(mark_single): New function.
	(mark_range): New funciton.
	(do_parse): New function.
	(init_unformatted): New function.
	(get_unformatted_convert): New function.
	* runtime/compile_options.c:  Add set_convert().
	* libgfortran.h:  Add convert to compile_options_t.
	* io/open.c (st_open): Call get_unformatted_convert to get
	unit default; if CONVERT_NONE is returned, check for
	the presence of a CONVERT specifier and use it.
	As default, use compile_options.convert.
	* io/io.h (top level): Add CONVERT_NONE to unit_convert, to signal
	"nothing has been set".
	(top level): Add prototype for get_unformatted_convert.

2005-02-06  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/23815
	* unf_io_convert_4.f90:  New test.

From-SVN: r110664
2006-02-06 20:12:44 +00:00
Francois-Xavier Coudert df6ea78456 re PR libfortran/24685 (real(16) formatted input is broken for huge values (gfortran.dg/default_format_2.f90))
PR libfortran/24685

	* io/write.c (write_real): Widen the default format for real(10)
	variables output.

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

From-SVN: r110627
2006-02-05 23:04:07 +00:00
Jerry DeLisle dd9cf77f3c ChangeLog: Remove garbage text from one entry.
2006-01-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* ChangeLog: Remove garbage text from one entry.

From-SVN: r110381
2006-01-29 22:17:22 +00:00
Jerry DeLisle ecc9e67eef re PR libfortran/25835 (Segfault or Bad Address error on unformatted sequential READ)
2006-01-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/25835
	* io/transfer.c (st_read_done): Flush buffers when read is done.

From-SVN: r110200
2006-01-25 01:19:11 +00:00
Jerry DeLisle 7b7034ea9a re PR libfortran/25697 (libfortran - Segmentation fault/ Bad Address on unformatted read)
2006-01-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/25697
	* io/transfer.c (us_read): Detect end of file condition from previous
	operations and bail out (no need to pre-position).

From-SVN: r109870
2006-01-18 06:21:28 +00:00
Jerry DeLisle 272c35bd98 re PR libfortran/25631 (tl format specifier not working correctly)
2006-01-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/25631
	* io/transfer.c (formatted_transfer_scalar): Adjust pending_spaces and
	skips so that TL works correctly when no bytes_used yet.

From-SVN: r109858
2006-01-18 00:52:21 +00:00
Roger Sayle d1f37bc642 configure.ac (CFLAGS): Update to include -std=gnu99 so that the configure tests will be run with the...
* configure.ac (CFLAGS): Update to include -std=gnu99 so that
	the configure tests will be run with the same environment as
	used to compile the libgfortran source code.
	* configure: Regenerate.

From-SVN: r109774
2006-01-16 22:03:14 +00:00
Roger Sayle edf8dc34ff c99_functions.c: Add function prototypes to avoid warnings from -Wstrict-prototypes...
* intrinsics/c99_functions.c: Add function prototypes to avoid
	warnings from -Wstrict-prototypes -Wmissing-prototypes.  On Tru64
	work around a brain-dead libm by redirecting calls to cabs{,f,l}
	to a local __gfc_cabs{,f,l}.

From-SVN: r109646
2006-01-12 17:37:47 +00:00
Janne Blomqvist 8c7ffa93a8 configure.ac: Remove check for sys/mman.h.
2006-01-07  Janne Blomqvist  <jb@gcc.gnu.org>

	* configure.ac: Remove check for sys/mman.h.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* config.h.in: Regenerated.
	* aclocal.m4: Regenerated.

From-SVN: r109455
2006-01-07 21:28:22 +02:00
Jerry DeLisle b184f89b8a Fix date.
From-SVN: r109447
2006-01-07 01:22:50 +00:00
Tobias Schlüter cc4bb878f1 Fix previous ChangeLog entry
From-SVN: r109417
2006-01-06 13:31:17 +01:00
Jerry DeLisle 9696b2257c re PR libfortran/25598 (gfortran - Fortran runtime error: Invalid argument)
2006-01-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/25598
	* io/file_pos.c (unformatted_backspace): Assure the new file position
	to seek is not less than zero.
	(st_backspace): Set unit bytes_left to zero.
	* io/transfer.c (next_record_r): Fix line lengths, no functional change.

From-SVN: r109405
2006-01-06 01:39:34 +00:00
Paolo Bonzini 4c4b3eb0fc re PR libgomp/25259 (bootstrap failures on non-C99 platforms (no stdint.h))
config:
2006-01-02  Paolo Bonzini  <bonzini@gnu.org>

	PR target/25259
	* stdint.m4: New.

gcc:
2006-01-02  Paolo Bonzini  <bonzini@gnu.org>

	PR target/25259
	* Makefile.in (DECNUMINC): Include libdecnumber's build directory.

libgfortran:
2006-01-02  Paolo Bonzini  <bonzini@gnu.org>

	PR target/25259
	* configure.ac: Use GCC_HEADER_STDINT.
	* libgfortran.h: Include gstdint.h.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libdecnumber:
2006-01-02  Paolo Bonzini  <bonzini@gnu.org>

	PR target/25259
	* configure.ac: Use GCC_HEADER_STDINT.
	* decContext.h: Include gstdint.h.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

From-SVN: r109241
2006-01-02 18:53:27 +00:00
Steven G. Kargl f1d592bed3 * Split the ChangeLog into years.
From-SVN: r109225
2006-01-01 17:14:35 +00:00
Jerry DeLisle a7c633eaef re PR libfortran/25594 (LAPACK regression in schkbl.f)
2005-12-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/25594
	PR libgfortran/25419
	* io/list_read.c (list_formatted_read_scalar): Test for comma to return
	a null value (default). Revert patch of 25419 on 2005-12-28.

From-SVN: r109211
2006-01-01 02:45:22 +00:00
Jerry DeLisle 844234fb50 re PR libfortran/25139 ("Invalid argument" error on I/O)
2005-12-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/25139
	* io/unix.c (fd_truncate): Set s->active to zero.
	PR libgfortran/25510
	* libgfortran.h: Add ERROR_INTERNAL and ERROR_INTERNAL_UNIT.
	* runtime/error.c (translate_error): Add messages for new errors.
	* io/list_read.c (next_char): Use new errors.
	* io/transfer.c (next_record_r) (next_record_w): Use new errors.

From-SVN: r109122
2005-12-28 20:58:08 +00:00
Jerry DeLisle b5918dea9c re PR libfortran/25550 (file data corrupted after reading end of file)
2005-12-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/25550
	* io/file_pos.c (st_rewind): Reset bytes left so no error occurs in
	next_record_r.

From-SVN: r109101
2005-12-28 07:20:19 +00:00
Jerry DeLisle 93f006d8e3 re PR libfortran/25419 (gfortran read does not take comma for default on one entry)
2005-12-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/25419
	* io/list_read.c (list_formatted_read_scalar): Allow comma to return a
	null value (default).

From-SVN: r109099
2005-12-28 06:59:35 +00:00
Jerry DeLisle 8ad4c89538 re PR libfortran/25307 (internal read with end=label aborts)
2005-12-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/25307
	* io/list_read.c (next_char): Handle end-of-file conditions for
	internal units and add support for internal character array units.

From-SVN: r108938
2005-12-22 02:32:29 +00:00
Jerry DeLisle 0a73639369 re PR libfortran/25463 (T edit descriptor and ADVANCE="no")
2005-12-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/25463
	* io/transfer.c (finalize_transfer): Fix execution order so that
	next_record is set to zero in all cases.

From-SVN: r108784
2005-12-19 06:52:33 +00:00
Jerry DeLisle 494ef4c254 re PR fortran/25264 (write to internal unit from the string itself gives wrong result ?)
2005-12-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/25264
	PR libgfortran/25349
	* io/unit.c (get_unit): Delete code that cleared the string when the
	unit was opened, which is too soon.
	* io/transfer.c (next_record_w): Pass done flag in.  Change logic for
	setting max_pos.  Add code to position unit and pad record as needed.

From-SVN: r108671
2005-12-16 19:32:21 +00:00
Jakub Jelinek 78fdb6d283 re PR libfortran/24991 (gfortran build fails with - error:gthr-default.h: No such file or directory)
PR libfortran/24991
	* acinclude.m4 (LIBGFOR_CHECK_PRAGMA_WEAK): Rename to...
	(LIBGFOR_GTHREAD_WEAK): ... this.  Define SUPPORTS_WEAK rather
	than HAVE_PRAGMA_WEAK.  Define GTHREAD_USE_WEAK to 0 on hosts
	that shouldn't use weak in gthr.h.
	* configure.ac: Use LIBGFOR_GTHREAD_WEAK instead of
	LIBGFOR_CHECK_PRAGMA_WEAK.
	* config.h.in: Regenerated.
	* configure: Regenerated.
	* io/io.h (SUPPORTS_WEAK): Don't define here.

	* intrinsics/ftell.c (ftell, FTELL_SUB): Add unlock_unit call.
	* intrinsics/fget.c (fgetc, fputs): Likewise.
	* intrinsics/tty.c (ttynam): Likewise.

From-SVN: r108471
2005-12-13 09:31:41 +01:00
Richard Sandiford 1524f80b1c Make-lang.in (fortran/trans-resolve.o): Depend on fortran/dependency.h.
gcc/fortran/
	* Make-lang.in (fortran/trans-resolve.o): Depend on
	fortran/dependency.h.
	* gfortran.h (gfc_expr): Add an "inline_noncopying_intrinsic" flag.
	* dependency.h (gfc_get_noncopying_intrinsic_argument): Declare.
	(gfc_check_fncall_dependency): Change prototype.
	* dependency.c (gfc_get_noncopying_intrinsic_argument): New function.
	(gfc_check_argument_var_dependency): New function, split from
	gfc_check_fncall_dependency.
	(gfc_check_argument_dependency): New function.
	(gfc_check_fncall_dependency): Replace the expression parameter with
	separate symbol and argument list parameters.  Generalize the function
	to handle dependencies for any type of expression, not just variables.
	Accept a further argument giving the intent of the expression being
	tested.  Ignore	intent(in) arguments if that expression is also
	intent(in).
	* resolve.c: Include dependency.h.
	(find_noncopying_intrinsics): New function.
	(resolve_function, resolve_call): Call it on success.
	* trans-array.h (gfc_conv_array_transpose): Declare.
	(gfc_check_fncall_dependency): Remove prototype.
	* trans-array.c (gfc_conv_array_transpose): New function.
	* trans-intrinsic.c (gfc_conv_intrinsic_function): Don't use the
	libcall handling if the expression is to be evaluated inline.
	Add a case for handling inline transpose()s.
	* trans-expr.c (gfc_trans_arrayfunc_assign): Adjust for the new
	interface provided by gfc_check_fncall_dependency.

libgfortran/
	* m4/matmul.m4: Use a different order in the special case of a
	transposed first argument.
	* generated/matmul_c4.c, generated/matmul_c8.c, generated/matmul_c10.c,
	* generated/matmul_c16.c, generated/matmul_i4.c, generated/matmul_i8.c,
	* generated/matmul_i10.c, generated/matmul_r4.c, generated/matmul_r8.c
	* generated/matmul_r10.c, generated/matmul_r16.c: Regenerated.

Co-Authored-By: Victor Leikehman <LEI@il.ibm.com>

From-SVN: r108459
2005-12-13 05:23:12 +00:00
Janne Blomqvist cef578a882 Forgot ChangeLog for 108359
From-SVN: r108361
2005-12-11 00:05:55 +02:00
Janne Blomqvist 74f04a6a44 Makefile.am: Enable loop unrolling for matmul.
2005-12-10  Janne Blomqvist  <jb@gcc.gnu.org>

	* Makefile.am: Enable loop unrolling for matmul.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* aclocal.m4: Regenerated.

From-SVN: r108359
2005-12-10 23:22:16 +02:00
Thomas Koenig 181c9f4a9b re PR fortran/23815 (Add -byteswapio flag)
2005-12-10  Thomas Koenig  <Thomas.Koenig@online.de>

	PR fortran/23815
	* io.c (top level):  Add convert to io_tag.
	(resolve_tag):  convert is GFC_STD_GNU.
	(match_open_element):  Add convert.
	(gfc_free_open):  Likewise.
	(gfc_resolve_open):  Likewise.
	(gfc_free_inquire):  Likewise.
	(match_inquire_element):  Likewise.
	* dump-parse-tree.c (gfc_show_code_node):  Add
	convet for open and inquire.
	gfortran.h: Add convert to gfc_open and gfc_inquire.
	* trans-io.c (gfc_trans_open):  Add convert.
	(gfc_trans_inquire):  Likewise.
	* ioparm.def:  Add convert to open and inquire.
	* gfortran.texi:  Document CONVERT.

2005-12-10  Thomas Koenig  <Thomas.Koenig@online.de>

	PR fortran/23815
	* io/file_pos.c (unformatted_backspace):  If flags.convert
	does not equal CONVERT_NATIVE, reverse the record marker.
	* io/open.c:  Add convert_opt[].
	(st_open):  If no convert option is given, set CONVERT_NATIVE.
	If CONVERT_BIG or CONVERT_LITTLE are given, set flags.convert to
	CONVERT_NATIVE or CONVERT_SWAP (depending on wether we have
	a big- or little-endian system).
	* io/transfer.c (unformatted_read):  Remove unused attribute
	from arguments.
	If we need to reverse
	bytes, break up large transfers into a loop.  Split complex
	numbers into its two parts.
	(unformatted_write):  Likewise.
	(us_read):  If flags.convert does not equal CONVERT_NATIVE,
	reverse the record marker.
	(next_record_w): Likewise.
	(reverse_memcpy):  New function.
	* io/inquire.c (inquire_via_unit):  Implement convert.
	* io/io.h (top level):  Add enum unit_convert.
	Add convert to st_parameter_open and st_parameter_inquire.
	Define IOPARM_OPEN_HAS_CONVERT and IOPARM_INQUIRE_HAS_CONVERT.
	Increase padding for st_parameter_dt.
	Declare reverse_memcpy().

2005-12-10  Thomas Koenig  <Thomas.Koenig@online.de>

	PR fortran/23815
	* gfortran.dg/unf_io_convert_1.f90:  New test.
	* gfortran.dg/unf_io_convert_2.f90:  New test.
	* gfortran.dg/unf_io_convert_3.f90:  New test.

From-SVN: r108358
2005-12-10 20:01:56 +00:00
Jakub Jelinek 891c05b102 re PR libfortran/24991 (gfortran build fails with - error:gthr-default.h: No such file or directory)
PR libfortran/24991
	* acinclude.m4: Include acx.m4 and no-executables.m4.
	* configure.ac: Add GCC_TOPLEVEL_SUBDIRS.
	* configure: Rebuilt.
	* Makefile.am (AM_CPPFLAGS): Use $(host_subdir) in build dir
	path.
	* Makefile.in: Rebuilt.

From-SVN: r108280
2005-12-09 14:50:11 +01:00
Jerry DeLisle b14c7e14ab re PR libfortran/25039 ([4.1 only] comma short-circuit field width)
2005-12-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/25039
	* io/io.h: Create a new flag sf_read_comma to control comma
	separators in numeric reads.
	* io/transfer.c (formatted_transfer_scalar): Initialize the flag.
	(read_sf): Check for commas coming in and if the flag is set,
	shortcut the read.
	* io/read.c (read_a) (read_x): Clear the flag for character reads and
	reset it after the reads.

From-SVN: r108271
2005-12-09 02:53:41 +00:00
Francois-Xavier Coudert 93af36c5c1 format.c: Removing unused code.
* io/format.c: Removing unused code.
	* intrinsics/random.c: Likewise.

From-SVN: r108014
2005-12-04 18:13:59 +00:00
Janne Blomqvist cc21057721 Add forgotten ChangeLog entry:
2005-11-27  Janne Blomqvist  <jb@gcc.gnu.org>

	* m4/ifunction.m4: Add const restrict to function arguments.
	* m4/iforeach.m4: Likewise.
	* m4/eoshift1.m4: Likewise.
	* m4/eoshift3.m4: Likewise.
	* m4/dotprod.m4: Likewise.
	* m4/dotprodc.m4: Likewise.
	* m4/dotprodl.m4: Likewise.
	* m4/shape.m4: Likewise.
	* m4/cshift1.m4: Likewise.
	* m4/reshape.m4: Likewise.
	* m4/transpose.m4: Likewise.
	* generated/eoshift*: Regenerated
	* generated/dotprod*: Likewise.
	* generated/shape*: Likewise.
	* generated/cshift1*: Likewise.
	* generated/reshape*: Likewise.
	* generated/transpose*: Likewise.

From-SVN: r107912
2005-12-02 20:23:06 +02:00
Francois-Xavier Coudert cc0de35e81 re PR libfortran/25116 ([4.0] namelist read from non-opened file)
PR libfortran/25116
	* io/transfer.c (data_transfer_init): Don't set the default for
	namelist I/O on preconnected files to UNFORMATTED.

From-SVN: r107900
2005-12-02 16:46:49 +00:00
Eric Botcazou a488b14d1b libgfortran.h (ILP32 typedefs): Define _UINT8_T, _UINT32_T and _UINT64_T on Solaris.
* libgfortran.h (ILP32 typedefs): Define _UINT8_T, _UINT32_T and
	_UINT64_T on Solaris.

From-SVN: r107708
2005-11-30 08:45:25 +00:00
Steven G. Kargl 9852c209be re PR fortran/25149 (Compiler dies on -std=f95)
2005-11-28  Steven G. Kargl  <kargls@comcast.net>

	PR libgfortran/25149
	* intrinsics/abort.c: Add external abort_ to allow linking when 
	invoking -std=f95 in testsuite.

From-SVN: r107655
2005-11-29 05:52:57 +00:00
Jakub Jelinek e669bd2b69 acinclude.m4 (LIBGFOR_CHECK_PRAGMA_WEAK): Rename to...
libfortran/24991
	* acinclude.m4 (LIBGFOR_CHECK_PRAGMA_WEAK): Rename to...
	(LIBGFOR_GTHREAD_WEAK): ... this.  Define SUPPORTS_WEAK rather
	than HAVE_PRAGMA_WEAK.  Define GTHREAD_USE_WEAK to 0 on hosts
	that shouldn't use weak in gthr.h.
	* configure.ac: Use LIBGFOR_GTHREAD_WEAK instead of
	LIBGFOR_CHECK_PRAGMA_WEAK.
	* config.h.in: Regenerated.
	* configure: Regenerated.
	* io/io.h (SUPPORTS_WEAK): Don't define here.

From-SVN: r107616
2005-11-28 20:51:02 +01:00
Jakub Jelinek 401cd90a90 ftell.c (ftell, FTELL_SUB): Add unlock_unit call.
* intrinsics/ftell.c (ftell, FTELL_SUB): Add unlock_unit call.
	* intrinsics/fget.c (fgetc, fputs): Likewise.
	* intrinsics/tty.c (ttynam): Likewise.

From-SVN: r107595
2005-11-28 08:16:33 +01:00