2005-09-04 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/23321
* io/transfer.c(data_transfer_init): Check for a too-large
record number. Return if sseek failed.
2005-09-04 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/23321
* gfortran.dg/direct_io_4.f90: New test case.
From-SVN: r103835
* io/read.c (read_x): Take int argument instead of fnode * and
digging the N from F->u.n.
* io/io.h (read_x): Adjust prototype.
* io/transfer.c (formatted_transfer): Adjust callers. Don't clobber
f->u.n for FMT_T.
* gfortran.dg/fmt_t_1.f90: New test.
From-SVN: r103811
2005-08-29 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/23598
* io/lock.c(library_start): If ioparm.iostat is present, clear
it unconditionally.
2005-02-29 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/23598
* gfortran.dg/iostat_1.f90: New test.
From-SVN: r103613
* acinclude.m4 (LIBGFOR_CHECK_UNLINK_OPEN_FILE): Add check to see
if target can unlink open files.
* configure.ac: Use this new test.
* config.h.in: Regenerate.
* configure: Regenerate.
* Makefile.in: Regenerate.
* aclocal.ac: Regenerate.
* io/io.h: Add prototype for unpack_filename.
* io/close.c (st_close): Delete file after closing unit if
HAVE_UNLINK_OPEN_FILE is not defined.
* io/unix.c (unpack_filename): Unlink scratch file after opening
it only if HAVE_UNLINK_OPEN_FILE is defined.
From-SVN: r103566
2005-08-16 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/23428
* io/transfer.c (iolength_transfer): Remove __attribute__ ((unused))
from type. Return correct length for inquire(iolength=)
for complex variables.
2005-08-16 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/23428
* gfortran.dg/inquire-complex.f90: New test case.
From-SVN: r103168
PR libfortran/20006
* gfortran.h: Add is_main_program member to symbol_attribute.
* trans-decl: Add a gfor_fndecl_set_std tree.
(gfc_build_builtin_function_decls): Create it.
(gfc_generate_function_code): Add this call at the beginning of
the main program.
* trans.c (gfc_generate_code): Move main_program and attr.
* trans.h: Add declaration for gfor_fndecl_set_std.
* Makefile.am: Add file runtime/compile_options.c.
* Makefile.in: Regenerate.
* libgfortran.h: Create structure compile_options_t. Define the
compile_options variable and GFC_STD_ macros.
* runtime/compile_options.c: New file.
* runtime/error.c (notify_std): New function.
* runtime/main.c (init): Call init_compile_options during
initialization.
* io/format.c: Use the new notify_std function for the $
descriptor extension.
* gfortran.dg/runtime_warning_1.f90: New test.
Co-Authored-By: Steven Bosscher <stevenb@suse.de>
From-SVN: r102990
* check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
functions for new intrinsics TTYNAM and ISATTY.
* intrinsic.c (add_functions, add_subroutines): Add new
intrinsics.
* intrinsic.h: Add prototypes for new check and resolve
functions.
* iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
resolve functions for intrinsics TTYNAM and ISATTY.
* gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
* trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
* Makefile.am: Add file intrinsics/tty.c to Makefile process.
* Makefile.in: Regenerate.
* io/io.h: Prototypes for new functions stream_isatty and
stream_ttyname.
* io/unix (stream_isatty, stream_ttyname): New functions to call
isatty() and ttyname() on a given unit.
* intrinsics/tty.c: New file to implement g77 intrinsics TTYNAM
and ISATTY.
From-SVN: r102915
* io/io.h: Change DEFAULT_TEMPDIR to /tmp instead of /var/tmp.
* io/unix.c (tempfile): Look at the TEMP environment variable
to find the temporary files directory. Whitespace correction.
From-SVN: r102822
2005-08-04 Paul Thomas <pault@gcc.gnu.org>
* transfer.c (data_transfer_init): Truncate file in
sequential WRITE when last_record == 0, rather than
current_record. Cures problem on RH9.
From-SVN: r102746
2005-07-30 Paul Thomas <pault@gcc.gnu.org>
PR fortran/22570 and related issues.
* transfer.c (formatted_transfer): Make sure that there
really is data present before X- or T- editing. Move all
treatment of tabbing during writes to start of next data
producing format. Suppress incorrect zeroing of bytes_left
in slash formating. Insert int cast for assignment of a
difference of two gfc_offsets.
PR fortran/22570 an related issues.
* gfortran.dg/x_slash_1.f: New test.
From-SVN: r102583
2005-07-23 Jerry DeLisle <jvdelisle@verizon.net>
* io/write.c (write_float): Revise output of IEEE exceptional
values to comply with F95 and F2003 standards.
From-SVN: r102324
2005-07-22 Jerry DeLisle <jvdelisle@verizon.net>
PR libfortran/21875 (FM111.f)
* io/read.c (next_char): Return a ' ' character when BLANK_ZERO
or BLANK_NULL are active.
(read_decimal): Interpret ' ' character correctly for BZ or BN.
(read_radix): Interpret ' ' character correctly for BZ or BN.
(read_f): Interpret ' ' character correctly for BZ or BN.
2005-07-22 Paul Thomas <pault@gcc.gnu.org>
PR libfortran/22570
* read.c (read_x): Correct the condition for doing the
x-editing during formatted input.
* transfer.c (formatted_transfer): Cast offset difference
as int, clean-up arithmetic with new variable, bytes_used,
zero counters for FMT_SLASH,
(data_transfer_init) Zero X- and T-editing counters
unconditionally.
(next_record_w) Zero X- and T-editing counters.
unconditionally.
From-SVN: r102284
2005-07-14 Jerry DeLisle <jvdelisle@verizon.net>
* io/write.c (write_float): Fix field width checks for
printing 'Infinity' or 'Inf'.
(output_float): Fix typo in comment.
From-SVN: r102115
2005-07-12 Paul Thomas <pault@gcc.gnu.org>
PR libfortran/16435
* transfer.c (formatted_transfer): Correct the problems
with X- and T-editting that caused TLs followed by TRs
to overwrite data, which caused NIST FM908.FOR to fail
on many tests.
(data_transfer_init): Zero X- and T-editting counters at
the start of formatted IO.
* write.c (write_x): Write specified number of skips with
specified number of spaces at the end.
2005-07-12 Paul Thomas <pault@gcc.gnu.org>
PR libfortran/16435
* gfortran.dg/tl_editting.f90: New.
* gfortran.dg/g77/f77-edit-x-out.f: Remove XFAIL.
From-SVN: r102008
2005-07-13 Paul Thomas <pault@gcc.gnu.org>
* io/read.c (read_complex): Prevent X formatting during reads
from going beyond EOR to fix NIST fm908.FOR failure.
* io/list_read.c (read_complex): Allow complex data in list-
directed reads to have eols either side of the comma to
fix NIST FM906.FOR failure.
2005-07-13 Paul Thomas <pault@gcc.gnu.org>
* gfortran.dg/past_eor.f90: New.
* gfortran.dg/complex_read.f90: New.
From-SVN: r101984
2005-07-12 Thomas Koenig <Thomas.Koenig@online.de>
io/unix.c: Add member special_file to type unix_stream.
(fd_truncate): Don't call ftruncate or chsize if
s refers to a special file.
(fd_to_stream): initialize s->special_file.
2005-07-12 Thomas Koenig <Thomas.Koenig@online.de>
gfortran.dg/dev_null.f90: Remove targets.
From-SVN: r101937
2005-07-09 Jerry DeLisle <jvdelisle@verizon.net>
PR libfortran/21875 (FM111.f)
* io/read.c (next_char): Return a ' ' character when BLANK_ZERO or
BLANK_NULL are active.
(read_decimal): Interpret ' ' character correctly for BZ or BN.
(read_radix): Interpret ' ' character correctly for BZ or BN.
(read_f): Interpret ' ' character correctly for BZ or BN.
* gfortran.dg/test (fmt_read_bz_bn.f90): New test case.
From-SVN: r101837
2005-07-07 Francois-Xavier Coudert <coudert@clipper.ens.fr>
Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/22217
* io/write.c (extract_unit): New function; extract
ints as unsigned signed int of the correct size.
* io/write.c (write_int): Use it.
* runtime/error.c: Adjust copyright years.
Adjust size of buffer to maximum that can occur.
2005-07-07 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/22217
* gfortran.dg/negative-z-descriptor.f90: New test.
From-SVN: r101829
2005-07-07 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21594
* intrinsics/eoshift0.c: If abs(shift) > len, fill the
the whole array with the boundary value, but don't overrun it.
* intrinsics/eoshift2.c: Likewise.
* m4/eoshift1.m4: Likewise.
* m4/eoshift3.m4: Likewise.
* generated/eoshift1_4.c: Regenerated.
* generated/eoshift1_8.c: Regenerated.
* generated/eoshift3_4.c: Regenerated.
* generated/eoshift3_8.c: Regenerated.
2005-07-07 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21594
* gfortran.fortran-torture/execute/intrinsic_eoshift.f90:
Add test cases where the shift length is greater than the
array length.
From-SVN: r101738
PR libfortran/22170
* io/transfer.c (formatted_transfer): Do not iterate on the
repeat count of a FMT_SLASH, since this is already done in
next_format().
From-SVN: r101377
2005-06-24 Jerry DeLisle <jvdelisle@verizon.net>
PR libfortran/21915
* Makefile.am: include intrinsics/hyper.c
* c99_protos.h: add prototypes for single precision versions of
acosh, asinh, and atanh for platforms that do not have these
* config.h.in: add #undef for wrappers
* configure.ac: add checks for single precision versions
* aclocal.m4: generated
* Makefile.in: generated
* configure: generated
From-SVN: r101302