1 2016-10-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3 io/inquire.c (inquire_via_unit): Add check for internal unit
4 passed into child IO procedure.
6 2016-10-01 Andre Vehreschild <vehre@gcc.gnu.org>
9 * caf/single.c (caf_internal_error): Fix not terminating va-list.
10 (_gfortran_caf_register): Free memory also when other allocs failed.
11 (_gfortran_caf_get_by_ref): Fixed style.
12 (send_by_ref): Token is now stored at the correct position preventing
13 inaccessible tokens, memory loss and possibly crashes.
15 2016-09-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
18 io/transfer.c (next_record): Flush before calculating next_record.
21 2016-09-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
24 * io/inquire.c (inquire_via_unit): Adjust error check for the
25 two possible internal unit KINDs.
26 * io/io.h: Adjust defines for is_internal_unit and
27 is_char4_unit. (gfc_unit): Add internal unit data to structure.
28 (get_internal_unit): Change declaration to set_internal_unit.
29 (free_internal_unit): Change name to stash_internal_unit_number.
30 (get_unique_unit_number): Adjust parameter argument.
31 Define IOPARM_DT_HAS_UDTIO. (gfc_saved_unit): New structure.
32 * io/list_read.c (next_char_internal): Use is_char4_unit.
33 * io/open.c (st_open): Adjust call to get_unique_unit_number.
34 * io/transfer.c (write_block): Use is_char4_unit.
35 (data_transfer_init): Update check for unit numbers.
36 (st_read_done): Free the various allocated memories used for the
37 internal units and stash the negative unit number and pointer to unit
38 structure to allow reuse. (st_write_done): Likewise stash the freed
40 * io/unit.c: Create a fixed size buffer of 16 gfc_saved_unit's to use
41 as a stack to save newunit unit numbers and unit structure for reuse.
42 (get_external_unit): Change name to get_gfc_unit to better
43 reflect what it does. (find_unit): Change call to get_gfc_unit.
44 (find_or_create_unit): Likewise. (get_internal_unit): Change
45 name to set_internal_unit. Move internal unit from the dtp
46 structure to the gfc_unit structure so that it can be passed to
47 child I/O statements through the UNIT.
48 (free_internal_unit): Change name to stash_internal_unit_number.
49 Push the common.unit number onto the newunit stack, saving it
50 for possible reuse later. (get_unit): Set the internal unit
51 KIND. Use get_unique_unit_number to get a negative unit number
52 for the internal unit. Use get_gfc_unit to get the unit structure
53 and use set_internal_unit to initialize it.
54 (init_units): Initialize the newunit stack.
55 (get_unique_unit_number): Check the stack for an available unit
56 number and use it. If none there get the next most negative
57 number. (close_units): Free any unit structures pointed to from the save
60 2016-09-21 Janne Blomqvist <jb@gcc.gnu.org>
62 * intrinsics/random.c (getosrandom): Use rand_s() on
63 MinGW-w64. Fix bounds overflow in fallback code.
65 2016-09-19 Andre Vehreschild <vehre@gcc.gnu.org>
67 * caf/libcaf.h: Add caf_reference_type.
68 * caf/mpi.c: Adapted signature of caf_register().
69 * caf/single.c (struct caf_single_token): Added to keep the pointer
70 to the memory registered and array descriptor.
71 (caf_internal_error): Added convenience interface.
72 (_gfortran_caf_register): Adapted to work with caf_single_token and
73 return memory in the array descriptor.
74 (_gfortran_caf_deregister): Same.
75 (assign_char1_from_char4): Fixed style.
76 (convert_type): Fixed incorrect conversion.
77 (_gfortran_caf_get): Adapted to work with caf_single_token.
78 (_gfortran_caf_send): Same.
79 (_gfortran_caf_sendget): Same.
80 (copy_data): Added to stop repeating it in all _by_ref functions.
81 (get_for_ref): Recursive getting of coarray data using a chain of
83 (_gfortran_caf_get_by_ref): Driver for computing the memory needed for
84 the get and checking properties of the operation.
85 (send_by_ref): Same as get_for_ref but for sending data.
86 (_gfortran_caf_send_by_ref): Same like caf_get_by_ref but for sending.
87 (_gfortran_caf_sendget_by_ref): Uses get_by_ref and send_by_ref to
88 implement sendget for reference chains.
89 (_gfortran_caf_atomic_define): Adapted to work with caf_single_token.
90 (_gfortran_caf_atomic_ref): Likewise.
91 (_gfortran_caf_atomic_cas): Likewise.
92 (_gfortran_caf_atomic_op): Likewise.
93 (_gfortran_caf_event_post): Likewise.
94 (_gfortran_caf_event_wait): Likewise.
95 (_gfortran_caf_event_query): Likewise.
96 (_gfortran_caf_lock): Likewise.
97 (_gfortran_caf_unlock): Likewise.
99 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
102 * ieee/ieee_arithmetic.F90 (IEEE_VALUE_4,IEEE_VALUE_8,IEEE_VALULE_10,
103 IEEE_VALUE_16): Use correct keyword.
105 2016-09-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
108 * io/write_float.def (build_float_string): Recognize when the
109 result will not fit in the user provided, star fill, and exit
112 2016-08-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
115 * io/write.c (kind_from_size): New function to calculate required buffer
116 size based on kind type. (select_buffer, select_string): Use new
117 function. (write_float_0, write_real, write_real_g0, write_complex):
118 Adjust calls to pass parameters needed by new function.
120 2016-08-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
121 Paul Thomas <pault@gcc.gnu.org>
124 * gfortran.map : Flag _st_set_nml_dtio_var and
125 _gfortran_transfer_derived.
126 * io/format.c (format_lex): Detect DTIO formatting.
127 (parse_format_list): Parse the DTIO format.
128 (next_format): Include FMT_DT.
129 * io/format.h : Likewise. Add structure 'udf' to structure
130 'fnode' to carry the IOTYPE string and the 'vlist'.
131 * io/io.h : Add prototypes for the two types of DTIO subroutine
132 and a typedef for gfc_class. Also, add to 'namelist_type'
133 fields for the pointer to the DTIO procedure and the vtable.
134 Add fields to struct st_parameter_dt for pointers to the two
135 types of DTIO subroutine. Add to gfc_unit DTIO specific fields.
136 (internal_proto): Add prototype for 'read_user_defined' and
137 'write_user_defined'.
138 * io/list_read.c (check_buffers): Use the 'current_unit' field.
139 (unget_char): Likewise.
140 (eat_spaces): Likewise.
141 (list_formatted_read_scalar): For case BT_CLASS, call the DTIO
143 (nml_get_obj_data): Likewise when DTIO procedure is present,.
144 * io/transfer.c : Export prototypes for 'transfer_derived' and
145 'transfer_derived_write'.
146 (unformatted_read): For case BT_CLASS, call the DTIO procedure.
147 (unformatted_write): Likewise.
148 (formatted_transfer_scalar_read): Likewise.
149 (formatted_transfer_scalar_write: Likewise.
150 (transfer_derived): New function.
151 (data_transfer_init): Set last_char if no child_dtio.
152 (finalize_transfer): Return if child_dtio set.
153 (st_write_done): Add condition for child_dtio not set.
154 Add extra arguments for st_set_nml_var prototype.
155 (set_nml_var): New function that contains the contents of the
156 old version of st_set_nml_var. Also sets the 'dtio_sub' and
157 'vtable' fields of the 'nml' structure.
158 (st_set_nml_var): Now just calls set_nml_var with 'dtio_sub'
160 (st_set_nml_dtio_var): New function that calls set_nml_var.
161 * io/unit.c (get_external_unit): If the found unit child_dtio
162 is non zero, don't do any mutex locking/unlocking. Just
164 * io/unix.c (tempfile_open): Revert to C style comment.
165 * io/write.c (list_formatted_write_scalar): Do the DTIO call.
166 (nml_write_obj): Add BT_CLASS and do the DTIO call.
168 2016-08-29 Nathan Sidwell <nathan@acm.org>
170 * configure.ac (nvptx-*): Hardwire newlib.
171 * configure: Rebuilt.
173 2016-08-19 Janne Blomqvist <jb@gcc.gnu.org>
175 * intrinsics/random.c (xor_keys): New array with "secret" keys.
176 (scramble_seed): XOR given seed with xor_keys array rather than
178 (unscramble_seed): Remove function.
179 (random_seed_i4): Use new scramble_seed.
180 (random_seed_i8): Likewise.
182 2016-08-19 Janne Blomqvist <jb@gcc.gnu.org>
184 * intrinsics/random.c (master_init): New variable.
185 (init_rand_state): Move below getosrandom (), maybe initialize
187 (random_seed_i4): If called with no arguments, set master_init to
188 false, and reinitialize. If called with PUT=, set master_init to
190 (random_seed_i8): Likewise.
192 2016-08-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
194 * intrinsics/random.c: Include <stdlib.h>.
196 2016-08-11 Janne Blomqvist <jb@gcc.gnu.org>
198 * intrinsics/random.c: Replace KISS with xorshift1024* using
200 * runtime/main.c (init): Don't call random_seed_i4.
202 2016-07-22 Andre Vehreschild <vehre@gcc.gnu.org>
204 * caf/libcaf.h: Add parameter stat to caf_get() and
205 caf_send()'s function prototypes.
206 * caf/single.c (_gfortran_caf_get): Implement reporting
207 error using stat instead of abort().
208 (_gfortran_caf_send): Same.
209 (_gfortran_caf_sendget): Use NULL for stat when calling
212 2016-06-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
215 * io/write.c: Cleaned up whitespace.
216 (write_d, write_e, write_f, write_es, write_en): Use new helper
217 function write_float_0.
218 (write_float_0): New helper function.
219 (get_precision, select_buffer, select_string, write_float_string): New
220 helper functions used in remaining float writing functions.
221 Helper function write_float_string now contains code for writing
222 to kind=4 character internal units.
223 (write_real): Modified to establish working buffers at this level
224 and to use new helper functions.
225 (write_real_g0): Likewise modified.
226 (write_complex): Likewise modified. Gets both float strings before
227 output so that final lengths can be determined which allows right
228 justifying the complex number with no intervening spaces.
229 * io/write_float.def (build_float_string): Renamed from previosly
230 output_float, modified to use buffers passed in from higher functions,
231 builds a null terminated string of the floating point value. Character
232 kind=4 code eliminated.
233 (write_infnan): Likewise modified to use incoming buffers and eliminate
235 (OUTPUT_FLOAT_FMT_G): Deleted, functionality moved into FORMAT_FLOAT.
236 (FORMAT_FLOAT): Renamed macro from WRITE_FLOAT. Use build_float_string.
237 (get_float_string): Renamed from write_float, uses FORMAT_FLOAT macro.
238 Buffer allocation removed, now at higher level.
240 2016-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
243 * io/list_read (eat_spaces): Eat '\r' as part of spaces.
245 2016-04-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
248 * io/list_read (check_buffers): Add '\r' to check for end of line.
250 2016-03-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
251 Dominique d'Humieres <dominiq@lps.ens.fr>
254 * io/write_float.def: Fix PF format for negative values of the scale
257 2016-03-28 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
259 * caf/libcaf.h: caf_stop_numeric and caf_stop_str prototype.
260 * caf/single.c: _gfortran_caf_stop_numeric and
261 _gfortran_caf_stop_str implementation.
263 2016-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
266 * io/list_read.c (read_real): If digit is missing from exponent issue
267 an error. (parse_real): Likewise and adjusted error message to clarify
268 it is part of a complex number.
269 (nml_read_obj): Bump item count and add comment that this is used to
270 identify which item in a namelist read has a problem.
272 2016-02-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
275 * io/list_read.c (push_char4): Fix the pointer usage for xrealloc.
277 2016-02-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
280 * io/list_read.c: Entire file trailing spaces removed.
281 (CASE_SEPARATORS): Remove '!'.
282 (is_separator): Add namelist mode as condition with '!'.
283 (push_char): Remove un-needed memset. (push_char4): Likewise and remove
284 'new' pointer. (eat_separator): Remove un-needed use of notify_std.
285 (read_logical): If '!' bang encountered when not in namelist mode got
286 bad_logical to give an error. (read_integer): Likewise reject '!'.
287 (read_character): Remove condition testing c = '!' which is now inside
288 the is_separator macro. (parse_real): Reject '!' unless in namelist mode.
289 (read_complex): Reject '!' unless in namelist mode. (read_real): Likewise
292 2016-02-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
295 * io/list_read.c (read_character): Remove code related to DELIM_NONE.
297 2016-01-23 John David Anglin <danglin@gcc.gnu.org>
300 * runtime/backtrace.c: Include gthr.h.
301 (show_backtrace): Use __gthread_active_p() to determine whether threads
302 are active. Return if lbstate is NULL.
304 2016-01-15 Jakub Jelinek <jakub@redhat.com>
306 * intrinsics/execute_command_line.c (set_cmdstat): Use "%s", msg
307 instead of msg to avoid -Wformat-security warning.
309 2016-01-04 Jakub Jelinek <jakub@redhat.com>
311 Update copyright years.
313 Copyright (C) 2016 Free Software Foundation, Inc.
315 Copying and distribution of this file, with or without modification,
316 are permitted in any medium without royalty provided the copyright
317 notice and this notice are preserved.