2008-11-01 Dennis Wassel <dennis.wassel@gmail.com>
PR fortran/37159
* fortran/check.c (gfc_check_random_seed): Check PUT size
at compile time.
2008-11-01 Dennis Wassel <dennis.wassel@gmail.com>
PR fortran/37159
* intrinsics/random.c: Added comment to adapt check.c, should
kiss_size change.
Few cosmetic changes to existing comments.
2008-11-01 Dennis Wassel <dennis.wassel@gmail.com>
PR fortran/37159
* gfortran.dg/random_seed_1.f90: New testcase.
From-SVN: r141511
2008-10-22 Jerry DeLisle <jvdelisle@gcc.gnu.org
PR libfortran/37707
* io/list_read.c (read_character): Remove code to look ahead in namelist
reads to descriminate non-delimited strings from namelist objects.
* io/write.c (namelist_write): Delimit character strings with quote or
apostrophe, defaulting to quote.
From-SVN: r141317
2008-10-19 Jerry DeLisle <jvdelisle@gcc.gnu.org
PR libfortran/37834
* io/write_float.def (output_float): Emit '0.' for special case of
format specifier 'f0.0' and value of zero. Likewise emit '0' for 'f1.0'.
From-SVN: r141231
2008-10-16 Thomas Koenig <tkoenig@gcc.gnu.org>
* io/file_pos.c (unformatted_backspace): Normal case is
GFC_CONVERT_NATIVE.
* io/transfer.c (read_sf): Mark paths leading to generate_error()
as unlikely.
(readl_block_form): Likewise.
(read_block_direct): Likewise.
(write_block): Likewise.
(write_buf): Likewise.
(us_read): Likewise. Normal case is GFC_CONVERT_NATIVE.
(next_record_w_unf): Mark paths leading to generate_error()
as unlikely.
From-SVN: r141179
2008-10-09 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/37753
* io/transfer.c (unformatted_read): CONVERT_NATIVE
is the usual case. Check for kind==1 for non-byte-reversing
operation.
(unformatted_write): Likewise.
2008-10-09 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/37753
* gfortran.dg/convert_2.f90: New test case.
From-SVN: r141008
2008-10-08 Jerry DeLisle <jvdelisle@gcc.gnu.org
PR libfortran/37707
* io/list_read.c (nml_get_obj_data): If the first namelist object rank
is greater than zero, call nml_object_read with the first object rather
than the sub-object.
From-SVN: r140995
2008-09-22 Jerry DeLisle <jvdelisle@gcc.gnu.org
PR fortran/37498
* trans-io.c (gfc_build_io_library_fndecls): Bump pad size.
(build_dt): Set mask bit for IOPARM_dt_f2003.
* ioparm.def: Add IOPARM_dt_f2003.
2008-09-22 Jerry DeLisle <jvdelisle@gcc.gnu.org
PR libfortran/37498
* file_pos (st_endfile): Clear memory only for libfortran 4.3 private
area.
* list_read.c (eat_separator): Only access F2003 I/O parameters if
IOPARM_DT_HAS_F2003 bit is set. (parse_real): Ditto.
(read_real): Ditto.
* read.c (read_a): Likewise. (read_a_char4): Likewise though not
strictly necessary. (read_f): Likewise.
* io.h (unit_sign_s): New enumerator to allow duplication of
st_parameter structures. (IOPARM_DT_HAS_F2003): New mask bit.
(st_parameter_43): New structure copied from 4.3 version of
st_paramater_dt private section. (st_parameter_44): New structure with
F2003 items added. (st_parameter_dt): Modified to create union of new
and old structures to allow correct memory setting for 4.3 ABI
compatibility. Bumped the pad size.
* transfer.c (read_sf): Do not use F2003 I/O memory areas unless
IOPARM_DT_HAS_F2003 bit has been set. (read_block_form): Ditto.
(formatted_transfer_scalar): Ditto. (data_transfer_init): Ditto and
add comment, fix formatting.
* write.c (write_default_char4): Likewise though not strictly necessary.
(write_utf8_char4): Ditto. (write_character): Ditto.
(write_real_g0): Ditto. (list_formatted_write_scalar): Ditto.
(nml_write_obj): Ditto. (namelist_write): Ditto.
* write_float.def (calculate_sign): Eliminate warning by including all
cases in switch. (output_float): Output only decimal point of F2003 flag
is not set.
From-SVN: r140576
2008-09-10 Tobias Burnus <burnus@net-b.de>
H. J. Lu <hongjiu.lu@intel.com>
* mk-sik-inc.sh: Make -Wunused-variable proof.
* mk-srk-inc.sh: Make -Wunused-variable proof.
Co-Authored-By: H.J. Lu <hongjiu.lu@intel.com>
From-SVN: r140239
2008-09-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/37228
* io.c (check_format): Allow specifying precision with g0 format.
2008-09-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/37301
PR libfortran/37228
* io/io.h (write_real_g0): Declare new function to handle g0.d format.
* io/transfer.c (formatted_transfer_scalar): Use new function.
* io/format.c (parse_format_list): Enable g0.d.
* io/write.c (write_a_char4): Delete unused var.
(set_fnode_default): New function to set the default fnode w, d, and e
factored from write_real. (write_real): Use new factored function.
(write_real_g0): New function that sets d to that passed by g0.d format
specifier and set format to ES. Default values for w and e are used
from the new function, set_fnode_default.
2008-09-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/37228
* gfortran.dg/fmt_g0_4.f08: Revised test.
From-SVN: r139886
2008-08-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/36895
* io/write.c (namelist_write_newline): New function to correctly mark
next records in both external and internal units.
(nml_write_obj): Use new function.
(namelist_write: Use new function.
From-SVN: r139813
2008-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/35863
* intrinsics/selected_char_kind.c: Enable iso_10646.
* io/read.c (typedef uchar): New type.
(read_utf8): New function to read a single UTF-8 encoded character.
(read_utf8_char1): New function to read UTF-8 into a KIND=1 string.
(read_default_char1): New functio to read default into KIND=1 string.
(read_utf8_char4): New function to read UTF-8 into a KIND=4 string.
(read_default_char4): New function to read UTF-8 into a KIND=4 string.
(read_a): Modify to use the new functions.
(read_a_char4): Modify to use the new functions.
* io/write.c (error.h): Add include. (typedef uchar): New type.
(write_default_char4): New function to default write KIND=4 string.
(write_utf8_char4): New function to UTF-8 write KIND=4 string.
(write_a_char4): Modify to use new functions.
(write_character): Modify to use new functions.
From-SVN: r139147
2008-08-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/36886
* Makefile.am: Added $(i_cshift0_c).
Added $(i_cshift0_c) to gfor_built_specific_src.
Add rule to build from cshift0.m4.
* Makefile.in: Regenerated.
* libgfortran.h: Addedd prototypes for cshift0_i1,
cshift0_i2, cshift0_i4, cshift0_i8, cshift0_i16,
cshift0_r4, cshift0_r8, cshift0_r10, cshift0_r16,
cshift0_c4, cshift0_c8, cshift0_c10, cshift0_c16.
Define Macros GFC_UNALIGNED_C4 and GFC_UNALIGNED_C8.
* intrinsics/cshift0.c: Remove helper functions for
the innter shift loop.
(cshift0): Call specific functions depending on type
of array argument. Only call specific functions for
correct alignment for other types.
* m4/cshift0.m4: New file.
* generated/cshift0_i1.c: New file.
* generated/cshift0_i2.c: New file.
* generated/cshift0_i4.c: New file.
* generated/cshift0_i8:.c New file.
* generated/cshift0_i16.c: New file.
* generated/cshift0_r4.c: New file.
* generated/cshift0_r8.c: New file.
* generated/cshift0_r10.c: New file.
* generated/cshift0_r16.c: New file.
* generated/cshift0_c4.c: New file.
* generated/cshift0_c8.c: New file.
* generated/cshift0_c10.c: New file.
* generated/cshift0_c16.c: New file.
2008-08-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/36886
* gfortran.dg/cshift_char_3.f90: New test case.
* gfortran.dg/cshift_nan_1.f90: New test case.
From-SVN: r139111
2008-07-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/36582
* io/list_read.c: If variable rank is zero, do not adjust the found
namelist object pointer. Fix ChangeLog.
From-SVN: r138914
2008-07-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/36852
* io/list_read.c: If variable rank is zero, do not adjust the found
namelist object pointer.
From-SVN: r138072
2008-07-22 Daniel Kraft <d@domob.eu>
PR fortran/29835
* io.c (error_element), (format_locus): New static globals.
(unexpected_element): Spelled out this message fully.
(next_char): Keep track of locus when not MODE_STRING.
(next_char_not_space): Remember last parsed element in error_element.
(format_lex): Fix two indentation errors.
(check_format): Use format_locus and possibly error_element for a
slightly better error message on invalid format.
(check_format_string): Set format_locus to start of the string
expression used as format.
2008-07-22 Daniel Kraft <d@domob.eu>
PR fortran/29835
* io/format.c (struct format_data): New member error_element.
(unexpected_element): Added '%c' to message.
(next_char): Keep track of last parsed character in fmt->error_element.
(format_error): If the message is unexpected_element, output the
offending character, too.
2008-07-22 Daniel Kraft <d@domob.eu>
PR fortran/29835
* gfortran.dg/fmt_error_3.f90: New test.
* gfortran.dg/fmt_error_4.f90: New test.
* gfortran.dg/fmt_error_5.f90: New test.
From-SVN: r138063
2008-07-22 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/36890
* io/file_pos.c: Declare READ_CHUNK as signed to avoid
signed/unsigned comparison warning in formatted_backspace.
From-SVN: r138050
2008-07-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/36773
* intrinsics/cshift0.c (cshift0): Return early if size of array
is zero.
* intrinsics/eoshift0.c (eoshift0): Return early if size of
return array is zero.
* intrinsics/eoshift2.c (eoshift2): Likewise.
* m4/eoshift1.m4 (eoshift1): Return early if size of array
is zero.
* m4/eoshift3.m4 (eoshift3): Likewise.
* m4/eoshift2.m4 (eoshift2): Return early if size of return
array is zero.
* m4/eoshift4.m4 (eoshift2): Return early if size of return
array is zero.
* generated/cshift1_16.c: Regenerated.
* generated/cshift1_4.c: Regenerated.
* generated/cshift1_8.c: Regenerated.
* generated/eoshift1_16.c: Regenerated.
* generated/eoshift1_4.c: Regenerated.
* generated/eoshift1_8.c: Regenerated.
* generated/eoshift3_16.c: Regenerated.
* generated/eoshift3_4.c: Regenerated.
* generated/eoshift3_8.c: Regenerated.
2008-07-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/36773
* gfortran.dg/zero_sized_5.f90: New test case.
From-SVN: r138027
2008-07-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/36857
* io/write_float.def: Comment out locale dependent code and fix general
comments.
From-SVN: r138021
2008-06-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/36657
* io/list_read.c (read_character): Check for '!' along with separators.
(find_nml_name): Likewise and eat the comment if found.
From-SVN: r137236
2008-06-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/36546
* io/list_read.c (eat_separator): Add tab character to condition
for looping past whitespace.
From-SVN: r136859
2008-06-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/35863
* libgfortran.h: Change l8_to_l4_offset to big_endian and add endian_off.
* runtime/main.c: Fix error in comment. Change l8_to_l4_offset to
big_endian. (determine_endianness): Add endian_off and set its value
according to big_endian.
* gfortran.map: Add symbol for new _gfortran_transfer_character_wide.
* io/io.h: Add prototype declarations for new functions.
* io/list_read.c (list_formatted_read_scalar): Modify to handle kind=4.
(list_formatted_read): Calculate stride based on kind for character type
and use it when calling list_formatted_read_scalar.
* io/inquire.c (inquire_via_unit): Change l8_to_l4_offset to big_endian.
* io/open.c (st_open): Change l8_to_l4_offset to big_endian.
* io/read.c (read_a_char4): New function to handle formatted read.
* io/write.c: Define GFC_CHAR4(x) to improve readability of code.
(write_a_char4): New function to handle formatted write.
(write_character): Modify to accept the kind parameter and adjust for
endianess of the machine. (list_formatted_write): Calculate the stride
resulting from the kind and adjust the list_formatted_write_scalar call
accordingly. (nml_write_obj): Adjust calls to write_character.
(namelist_write): Likewise.
* io/transfer.c (formatted_transfer_scaler): Rename 'len' argument to
'kind' argument to better describe what it is. Add calls to new
functions for kind == 4. (formatted_transfer): Modify to handle the case
of type character and kind equals 4 to pass in the kind to the transfer
routines. (transfer_character_wide): Add this new function.
(transfer_array): Don't set kind to the character string length. Adjust
strides bases on character kind.
(unformatted_read): Adjust size based on kind for character types.
(unformatted_write): Likewise. (data_transfer_init): Change
l8_to_l4_offset to big_endian.
From-SVN: r136763
2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/36420
PR libfortran/36421
PR libfortran/36422
* io/io.h: Add prototype for write_real.
* io/transfer.c (formatted_transfer_scalar): For FMT_G and width zero,
use write_real.
* io/format.c: Add zero width error message. (parse_format_list): Use
error message for FMT_A if followed by FMT_ZERO. Use zero width error
message for FMT_G if mode is READ or if -std=f95 or f2003. (fmormat0):
Fix typo in comment.
* io/write.c (write_a): Set wlen to len if FMT_G and length is zero.
(write_l): Add wlen variable and use it if FMT_G and width is zero.
(write_decimal): If FMT_G, set m to -1 to flag processor dependent
formatting. (write_real): Remove static declaration.
From-SVN: r136545