2005-10-12 Janne Blomqvist <jblomqvi@cc.hut.fi>
* io/unix.c: Remove parts of patch of 2005/10/07 that cause
input from the terminal to hang.
From-SVN: r105324
PR libgfortran/24313
* c99_functions.c (csqrtf, csqrt): Fix choice of branch cut. Note
csqrt{f} were imported from glibc, and this bug is still present
there. glibc PR is 1146.
From-SVN: r105274
2005-10-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
PR fortran/16339
PR fortran/23363
* io/io.h: Add read and write members to stream, define access
macros.
* io/transfer.c (read_block_direct): New function.
(write_block_direct): New function.
(unformatted_read): Change to use read_block_direct.
(unformatted_write): Change to use write_block_direct.
* io/unix.c: Remove mmap includes and defines.
(writen): Remove.
(readn): Remove.
(reset_stream): New function.
(do_read): New function.
(do_write): New function.
(fd_flush): Change to use do_write() instead of writen().
(fd_alloc_r_at): Change to use do_read().
(fd_seek): Change return type to try, as the prototype. Add check
to avoid syscall overhead if possible.
(fd_read): New function.
(fd_write): New function.
(fd_open): Set pointers for new functions.
(mem_read): New function.
(mem_write): New function.
(open_internal): Set pointers for new functions.
(is_seekable): Clean up comment.
From-SVN: r105101
2005-10-07 Jerry DeLisle <jvdelisle@verizon.net>
* io/transfer.c (write_block): Add test for end-of-file condition,
removed from mem_alloc_w_at. (next_record_w): Clean up checks for
NULL pointer returns from s_alloc_w.
* io/unix.c (mem_alloc_w_at): Remove call to generate_error end-of-file.
* io/write.c (write_float): Add checks for NULL pointer returns from
write_block calls. (write_integer): Same.
From-SVN: r105092
PR libfortran/19308
PR fortran/20120
PR libfortran/22437
* Makefile.am: Add generated files for large real and integers
kinds. Add a rule to create the kinds.inc c99_protos.inc files.
Use kinds.inc to preprocess Fortran generated files.
* libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE,
GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16,
gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16,
gfc_array_l16.
* mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and
HAVE_GFC_COMPLEX_* when these types are available.
* intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16.
* m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4,
m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4,
m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4,
m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4,
m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4,
m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4,
m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4,
m4/sum.m4, m4/transpose.m4: Protect generated functions with
appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives.
* Makefile.in: Regenerate.
* all files in generated/: Regenerate.
* f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long
double builtin function.
(gfc_init_builtin_functions): Add mfunc_longdouble,
mfunc_clongdouble and func_clongdouble_longdouble trees. Build
them for round, trunc, cabs, copysign and pow functions.
* iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add
case for kind 10 and 16.
* trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16,
exponent10 and exponent16.
(gfc_build_intrinsic_function_decls): Build nodes for int16,
real10, real16, complex10 and complex16 types. Build all possible
combinations for function _gfortran_pow_?n_?n. Build function
calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16.
* trans-expr.c (gfc_conv_power_op): Add case for integer(16),
real(10) and real(16).
* trans-intrinsic.c: Add suppport for long double builtin
functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION
macros.
(gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and
real(16) kinds.
(gfc_build_intrinsic_lib_fndecls): Add support for real10_decl
and real16_decl in library functions.
(gfc_get_intrinsic_lib_fndecl): Add cases for real and complex
kinds 10 and 16.
(gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16)
kinds.
(gfc_conv_intrinsic_sign): Likewise.
(gfc_conv_intrinsic_ishftc): Add case for integer(16) kind.
* trans-types.c (gfc_get_int_type, gfc_get_real_type,
gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in
the case of kinds not available.
* trans.h: Declare trees for cpowl10, cpowl16, ishftc16,
exponent10 and exponent16.
* gfortran.dg/large_real_kind_2.F90: New test.
* gfortran.dg/large_integer_kind_2.f90: New test.
From-SVN: r104889
2005-09-24 Janne Blomqvist <jblomqvi@cc.hut.fi>
* trans-io.c (gfc_build_io_library_fndecls): Add entry
iocall_x_array for transfer_array. (transfer_array_desc): New
function. (gfc_trans_transfer): Add code to call
transfer_array_desc.
2005-09-24 Janne Blomqvist <jblomqvi@cc.hut.fi>
* io.h: Changed prototypes of list_formatted_{read|write}.
* list_read.c (list_formatted_read): Renamed to
list_formatted_read_scalar and made static. (list_formatted_read):
New function.
* transfer.c: Prototype for transfer_array. Changed transfer
function pointer. (unformatted_read): Add nelems argument, use
it. (unformatted_write): Likewise. (formatted_transfer): Changed
name to formatted_transfer_scalar. (formatted_transfer): New
function. (transfer_integer): Add nelems argument to transfer
call, move updating item count to transfer
functions. (transfer_real): Likewise. (transfer_logical):
Likewise. (transfer_character): Likewise. (transfer_complex):
Likewise. (transfer_array): New function. (data_transfer_init):
Call formatted_transfer with new argument. (iolength_transfer):
New argument, use it.
* write.c (list_formatted_write): Renamed to
list_formatted_write_scalar, made static. (list_formatted_write):
New function.
From-SVN: r104662
2005-09-14 Jerry DeLisle <jvdelisle@verizon.net
PR fortran/21875 Internal Unit Array I/O, NIST
* libgfortran.h: Add run time error code for array stride.
* runtime/error.c (translate_error): Add error message for
array stride.
* io/io.h: Add array descriptor pointer to IOPARM structure.
Add prtotypes for two new functions.
* io/transfer.c (data_transfer_init): Removed initialization and
moved to unit.c (get_unit)
* io/transfer.c (next_record_r): Include internal unit read
functionality.
* io/transfer.c (next_record_w): Include internal unit write
functionality, including padding of character array records.
* io/unit.c (get_array_unit_len): New function to return the number
of records in the character array 'file' from the array descriptor.
* io/unit.c (get_unit): Gathered initialization code from
init_data_transfer for internal units and added initialization of
character array unit.
* io/unit.c (is_array_io): New function to determine if internal unit
is an array.
* io/unix.c (mem_alloc_w_at): Add error checks for bad record length
and end of file.
From-SVN: r104276
gcc/fortran/
PR target/19269
* iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift)
(gfc_resolve_pack, gfc_resolve_reshape, gfc_resolve_spread)
(gfc_resolve_transpose, gfc_resolve_unpack): Add "_char" to the name
for character-based operations.
(gfc_resolve_pack): Remove ATTRIBUTE_UNUSED from array argument.
(gfc_resolve_unpack): Copy the whole typespec from the vector.
* trans-array.c (gfc_conv_expr_descriptor): In the EXPR_FUNCTION
case, get the string length from the scalarization state.
libgfortran/
PR target/19269
* intrinsics/cshift0.c (cshift0): Add an extra size argument.
(cshift0_1, cshift0_2, cshift0_4, cshift0_8): Replace explicit
implementations with...
(DEFINE_CSHIFT): ...this new macro. Define character versions too.
* intrinsics/eoshift0.c (zeros): Delete.
(eoshift0): Add extra size and filler arguments. Use memset if no
bound is provided.
(eoshift0_1, eoshift0_2, eoshift0_4, eoshift0_8): Replace explicit
implementations with...
(DEFINE_EOSHIFT): ...this new macro. Define character versions too.
* intrinsics/eoshift2.c (zeros): Delete.
(eoshift2): Add extra size and filler arguments. Use memset if no
bound is provided.
(eoshift2_1, eoshift2_2, eoshift2_4, eoshift2_8): Replace explicit
implementations with...
(DEFINE_EOSHIFT): ...this new macro. Define character versions too.
* intrinsics/pack.c (pack_internal): New static function, reusing
the contents of pack and adding an extra size argument. Change
"mptr" rather than "m" when calculating the array size.
(pack): Redefine as a forwarder to pack_internal.
(pack_s_internal): New static function, reusing the contents of
pack_s and adding an extra size argument.
(pack_s): Redefine as a forwarder to pack_s_internal.
(pack_char, pack_s_char): New functions.
* intrinsics/reshape.c (reshape_internal): New static function,
reusing the contents of reshape and adding an extra size argument.
(reshape): Redefine as a forwarder to reshape_internal.
(reshape_char): New function.
* intrinsics/spread.c (spread_internal): New static function,
reusing the contents of spread and adding an extra size argument.
(spread): Redefine as a forwarder to spread_internal.
(spread_char): New function.
* intrinsics/transpose.c (transpose_internal): New static function,
reusing the contents of transpose and adding an extra size argument.
(transpose): Redefine as a forwarder to transpose_internal.
(transpose_char): New function.
* intrinsics/unpack.c (unpack_internal): New static function, reusing
the contents of unpack1 and adding extra size and fsize arguments.
(unpack1): Redefine as a forwarder to unpack_internal.
(unpack0): Call unpack_internal instead of unpack1.
(unpack1_char, unpack0_char): New functions.
* m4/cshift1.m4 (cshift1): New static function, reusing the contents
of cshift1_<kind> and adding an extra size argument.
(cshift1_<kind>): Redefine as a forwarder to cshift1.
(cshift1_<kind>_char): New function.
* m4/eoshift1.m4 (zeros): Delete.
(eoshift1): New static function, reusing the contents of
eoshift1_<kind> and adding extra size and filler arguments.
Fix calculation of hstride. Use memset if no bound is provided.
(eoshift1_<kind>): Redefine as a forwarder to eoshift1.
(eoshift1_<kind>_char): New function.
* m4/eoshift3.m4 (zeros): Delete.
(eoshift3): New static function, reusing the contents of
eoshift3_<kind> and adding extra size and filler arguments.
Use memset if no bound is provided.
(eoshift3_<kind>): Redefine as a forwarder to eoshift3.
(eoshift3_<kind>_char): New function.
* generated/cshift1_4.c, generated/cshift1_8.c,
* generated/eoshift1_4.c, generated/eoshift1_8.c,
* generated/eoshift3_4.c, generated/eoshift3_8.c: Regenerate.
From-SVN: r104217
PR libfortran/20179
* io/unix.c (is_preconnected): Add function to test if a stream
corresponds to a preconnected unit.
* io/io.h: Add prototype for is_preconnected.
* io/transfer.c (data_transfer_init): Do not truncate
preconnected units.
From-SVN: r104141
PR fortran/12840
* trans.h (gfor_fndecl_internal_realloc): Declare.
(gfor_fndecl_internal_realloc64): Declare.
* trans-decl.c (gfor_fndecl_internal_realloc): New variable.
(gfor_fndecl_internal_realloc64): New variable.
(gfc_build_builtin_function_decls): Initialize them.
* trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument.
* trans-array.c (gfc_trans_allocate_array_storage): Add an argument
to say whether the array can grow later. Don't allocate the array
on the stack if so. Don't call malloc for zero-sized arrays.
(gfc_trans_allocate_temp_array): Add a similar argument here.
Pass it along to gfc_trans_allocate_array_storage.
(gfc_get_iteration_count, gfc_grow_array): New functions.
(gfc_iterator_has_dynamic_bounds): New function.
(gfc_get_array_constructor_element_size): New function.
(gfc_get_array_constructor_size): New function.
(gfc_trans_array_ctor_element): Replace pointer argument with
a descriptor tree.
(gfc_trans_array_constructor_subarray): Likewise. Take an extra
argument to say whether the variable-sized part of the constructor
must be allocated using realloc. Grow the array when this
argument is true.
(gfc_trans_array_constructor_value): Likewise.
(gfc_get_array_cons_size): Delete.
(gfc_trans_array_constructor): If the loop bound has not been set,
split the allocation into a static part and a dynamic part. Set
loop->to to the bounds for static part before allocating the
temporary. Adjust call to gfc_trans_array_constructor_value.
(gfc_conv_loop_setup): Allow any constructor to determine the
loop bounds. Check whether the constructor has a dynamic size
and prefer to use something else if so. Expect the loop bound
to be set later. Adjust call to gfc_trans_allocate_temp_array.
* trans-expr.c (gfc_conv_function_call): Adjust another call here.
From-SVN: r104073
PR libfortran/23262
* acinclude.m4 (LIBGFOR_CHECK_CRLF): New check.
* configure.ac: Use new check.
* configure.in: Regenerate.
* config.h.in: Regenerate.
* configure: Regenerate.
* io/transfer.c (next_record_w): Add case for CRLF as line
terminator.
* io/unix.c (tempfile, regular_file): Open files with
O_BINARY on systems with CRLF.
From-SVN: r104009
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
* intrinsics/c99_functions.c (log10l): New log10l function for
systems where this is not available.
* c99_protos.h: Prototype for log10l function.
* libgfortran.h: Use generated kinds.h to define GFC_INTEGER_*,
GFC_UINTEGER_*, GFC_LOGICAL_*, GFC_REAL_*, GFC_COMPLEX_*. Update
prototypes for gfc_itoa and xtoa.
* io/io.h: Update prototypes for set_integer and max_value.
* io/list_read.c (convert_integer): Use new
GFC_(INTEGER|REAL)_LARGEST type.
* io/read.c (set_integer): Likewise.
(max_value): Likewise.
(convert_real): Likewise.
(real_l): Likewise.
(next_char): Likewise.
(read_decimal): Likewise.
(read_radix): Likewise.
(read_f): Likewise.
* io/write.c (extract_int): Use new GFC_INTEGER_LARGEST type.
(extract_real): Use new GFC_REAL_LARGEST type.
(calculate_exp): Likewise.
(calculate_G_format): Likewise.
(output_float): Likewise. Use log10l for long double values.
Add comment for sprintf format. Use GFC_REAL_LARGEST_FORMAT.
(write_l): Use new GFC_INTEGER_LARGEST type.
(write_float): Use new GFC_REAL_LARGEST type.
(write_int): Remove useless special case for (len < 8).
(write_decimal): Use GFC_INTEGER_LARGEST.
(otoa): Use GFC_UINTEGER_LARGEST as argument.
(btoa): Use GFC_UINTEGER_LARGEST as argument.
* runtime/error.c (gfc_itoa): Use GFC_INTEGER_LARGEST as
argument.
(xtoa): Use GFC_UINTEGER_LARGEST as argument.
* Makefile.am: Use mk-kinds-h.sh to generate header kinds.h
with all Fortran kinds available.
* configure.ac: Check for strtold and log10l.
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* config.h.in: Regenerate.
* mk-kinds-h.sh: Configuration script for available integer
and real kinds.
* lib/target-supports.exp: Add
check_effective_target_fortran_large_real and
check_effective_target_fortran_large_int to check for
corresponding effective targets.
* gfortran.dg/large_integer_kind_1.f90: New test.
* gfortran.dg/large_real_kind_1.f90: New test.
From-SVN: r101274
PR libfortran/19155
* io/read.c (convert_real): strtod can set errno to EINVAL on an
empty string, but we shouldn't have an error in that case.
From-SVN: r101128
PR libfortran/19216
* io/list_read.c (eat_separator): No need to call next_record,
even in non-namelist_mode.
* gfortran.dg/pr19216.f: Add correct space between brackets and
dg directive.
From-SVN: r101105
PR libfortran/16436
* io/transfer.c (read_sf): Correct updating of bytes_left field.
(formatted_transfer): Correct updating of bytes_left field and
reformatting code (comments and whitespace).
* io/unix.c (move_pos_offset): "active" field should not be
changed here. Whitespace corrections.
* gfortran.dg/g77/f77-edit-t-in.f: Not XFAIL-ed any more.
From-SVN: r101100
2005-06-12 Steven G. Kargl <kargls@comcast.net>
Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/PR21797
* m4/cexp.m4 (csqrt`'q): Add type qualifyer to
sqrt and fabs.
* generated/exp_c4.c: Regenerated.
Co-Authored-By: Thomas Koenig <Thomas.Koenig@online.de>
From-SVN: r100864
2005-06-11 Thomas Koenig <Thomas.Koenig@onlinde.de>
PR libfortran/21333
* Makefile.am: Add in_pack_c4.c, in_pack_c8.c, in_unpack_c4.c
and in_unpack_c8.c.
* Makefile.in: Regenerate.
* libgfortran.h: Declare internal_pack_c4, internal_pack_c8,
internal_unpack_c4 and internal_unpack_c8.
* m4/in_pack.m4: Use rtype_ccode insteald of rtype_kind
in function name.
Use sizeof (rtype_name) as size for memory allocation.
* m4/in_unpack.m4: Use rtype_ccode insteald of rtype_kind
in function name.
Use sizeof (rtype_name) for calculation of sizes for memcpy.
* runtime/in_pack_generic.c: For real, integer and logical
call internal_pack_4 if size==4 and internal_pack_8 if
size==8.
For complex, call internal_pack_c4 if size==8 and
internal_pack_c8 if size==16.
* runtime/in_unpack_generic.c: For real, integer and logical
call internal_unpack_4 if size==4 and internal_unpack_8 if
size==8.
For complex, call internal_unpack_c4 if size==8 and
internal_unpack_c8 if size==16.
* generated/in_pack_i4.c: Regenerated.
* generated/in_pack_i8.c: Regenerated.
* generated/in_unpack_i4.c: Regenerated.
* generated/in_unpack_i8.c: Regenerated.
* generated/in_pack_c4.c: New file.
* generated/in_pack_c8.c: New file.
* generated/in_unpack_c4.c: New file.
* generated/in_unpack_c8.c: New file.
2005-05-11 Thomas Koenig <Thomas.Koenig@online.de>
* gfortran.fortran-torture/execute/in-pack.f90: New test.
From-SVN: r100842
2005-06-09 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21480
* m4/reshape.m4: Use sizeof (rtype_name) for sizes to be passed
to reshape_packed.
* generated/reshape_c4.c: Regenerated.
* generated/reshape_c8.c: Regenerated.
* generated/reshape_i4.c: Regenerated.
* generated/reshape_i8.c: Regenerated.
2005-06-09 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21480
* gfortran.dg/reshape-complex.f90: Add a test for a packed
complex array.
From-SVN: r100805
2005-06-07 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21926
* m4/matmul.m4: Correct zeroing of result for non-packed
arrays with lowest stride is one.
* generated/matmul_c4.c: Regenerated.
* generated/matmul_c8.c: Regenerated.
* generated/matmul_i4.c: Regenerated.
* generated/matmul_i8.c: Regenerated.
* generated/matmul_r4.c: Regenerated.
* generated/matmul_r8.c: Regenerated.
2005-06-07 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21926
* gfortran.fortran-torture/execute/intrinsic_matmul.f90:
Test case where the return array has lowest stride one,
but isn't packed.
From-SVN: r100721
PR libfortran/20006
* io.c (format_item_1): Add check and extension warning for
$ edit descriptor.
* io/format.c (parse_format_list): Set repeat count of $ format
node to 1.
* io/transfer.c (read_sf): Add g.seen_dollar to the test
concerning advancing I/O.
(data_transfer_init): Likewise.
(finalize_transfer): Likewise.
From-SVN: r100314
2005-05-27 Thomas Koenig <Thomas.Koenig@online.de>
* runtime/in_pack_generic.c: Adjust copyright years.
(in_pack_generic): Change dimension of auxiliary arrays from
GFC_MAX_DIMENSION - 1 to GFC_MAX_DIMENSION.
* runtime/in_unpack_generic.c: Adjust copyright years.
(in_unpack_generic): Change dimension of auxiliary arrays from
GFC_MAX_DIMENSION - 1 to GFC_MAX_DIMENSION.
From-SVN: r100271
2005-05-26 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/17283
* gfortran.fortran-torture/execute/intrinsic_unpack.f90:
Test callee-allocated memory with write statements.
2005-05-26 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/17283
* intrinsics/unpack_generic.c: Fix name of routine
on top. Update copyright years.
(unpack1): Remove const from return array descriptor.
rs: New variable, for calculating return sizes.
Populate return array descriptor if ret->data is NULL.
From-SVN: r100189