1 2016-11-30 Andre Vehreschild <vehre@gcc.gnu.org>
3 * caf/single.c (_gfortran_caf_get_by_ref): Prevent compile time
5 (_gfortran_caf_send_by_ref): Same.
6 (_gfortran_caf_is_present): Prevent fallthrough warnings.
8 2016-11-30 Andre Vehreschild <vehre@gcc.gnu.org>
10 * caf/libcaf.h: Add new action types for (de-)registration of
11 allocatable components in derived type coarrays. Add _caf_is_present
13 * caf/single.c (_gfortran_caf_register): Add support for registration
14 only and allocation of already registered allocatable components in
15 derived type coarrays.
16 (_gfortran_caf_deregister): Add mode to deallocate but not deregister
17 an allocatable component in a derived type coarray.
18 (_gfortran_caf_is_present): New function. Query whether an
19 allocatable component in a derived type coarray on a remote image is
22 2016-11-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
25 * Makefile.am: Remove -fno-protect-parens -fstack-arrays.
26 * Makefile.in: Regenerate.
28 2016-11-16 Szabolcs Nagy <szabolcs.nagy@arm.com>
31 * config/fpu-glibc.h (support_fpu_trap): Use feenableexcept.
33 2016-11-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
34 Thomas Koenig <tkoenig@gcc.gnu.org>
37 * Makefile.am: Add new optimization flags matmul.
38 * Makefile.in: Regenerate.
39 * m4/matmul.m4: For the case of all strides = 1, implement a
40 fast blocked matrix multiply. Fix some whitespace.
41 * generated/matmul_c10.c: Regenerate.
42 * generated/matmul_c16.c: Regenerate.
43 * generated/matmul_c4.c: Regenerate.
44 * generated/matmul_c8.c: Regenerate.
45 * generated/matmul_i1.c: Regenerate.
46 * generated/matmul_i16.c: Regenerate.
47 * generated/matmul_i2.c: Regenerate.
48 * generated/matmul_i4.c: Regenerate.
49 * generated/matmul_i8.c: Regenerate.
50 * generated/matmul_r10.c: Regenerate.
51 * generated/matmul_r16.c: Regenerate.
52 * generated/matmul_r4.c: Regenerate.
53 * generated/matmul_r8.c: Regenerate.
55 2016-11-15 Matthias Klose <doko@ubuntu.com>
57 * configure: Regenerate.
59 2016-11-03 Fritz Reese <fritzoreese@gmail.com>
61 * io/io.h (IOPARM_DT_DEFAULT_EXP): New flag bit.
62 * io/list_read.c (parse_real, read_real): Allow omission of exponent
63 with IOPARM_DT_DEFAULT_EXP.
64 * io/read.c (read_f): Ditto.
66 2016-10-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
69 * io/format.c (parse_format_list): Adjust checks for FMT_L to
70 treat a zero width as an extension, giving warnings or error
71 as appropriate. Improve messages.
73 2016-10-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
76 * io/transfer.c (formatted_transfer_scalar_read): Clear seen_eor
77 only if we have tabbed to left of current position.
79 2016-10-26 Fritz Reese <fritzoreese@gmail.com>
81 * libgfortran.h (IOPARM_OPEN_HAS_READONLY, IOPARM_OPEN_HAS_SHARE,
82 IOPARM_OPEN_HAS_CC): New for READONLY, SHARE, and CARRIAGECONTROL.
83 * io/close.c (st_close): Support READONLY.
84 * io/io.h (st_parameter_open, unit_flags): Support SHARE,
85 CARRIAGECONTROL, and READONLY.
86 * io/open.c (st_open): Ditto.
87 * io/transfer.c (data_transfer_init): Ditto.
88 * io/io.h (st_parameter_dt): New member 'cc' for CARRIAGECONTROL.
89 * io/write.c (write_check_cc, write_cc): New functions for
91 * io/transfer.c (next_record_cc): Ditto.
92 * io/file_pos.c (st_endfile): Support SHARE and CARRIAGECONTROL.
93 * io/io.h (st_parameter_inquire): Ditto.
94 * io/open.c (edit_modes, new_unit): Ditto.
95 * io/inquire.c (inquire_via_unit, inquire_via_filename): Ditto.
96 * io/io.h (unit_share, unit_cc, cc_fortran, IOPARM_INQUIRE_HAS_SHARE,
97 IOPARM_INQUIRE_HAS_CC): New for SHARE and CARRIAGECONTROL.
98 * io/open.c (share_opt, cc_opt): Ditto.
99 * io/read.c (read_x): Support CARRIAGECONTROL.
100 * io/transfer.c (read_sf, next_record_r, next_record_w): Ditto.
101 * io/write.c (list_formatted_write_scalar, write_a): Ditto.
102 * io/unix.h (close_share): New prototype.
103 * io/unix.c (open_share, close_share): New functions to handle SHARE.
104 * io/unix.c (open_external): Handle READONLY. Call open_share.
105 * io/close.c (st_close): Call close_share.
107 2016-10-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
110 * io/io.h (st_parameter_dt): Reorder for readability and sanity.
111 * io/transfer.c (data_transfer_init): Remove TODO and enable the
112 runtime error message, rec= specifier not allowed in STREAM
114 * libtool-version: Bump major version of libgfortran to 4.
116 2016-10-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
119 * io/io.h (st_parameter_dt): Restore GFC_IO_INT to maintain
122 2016-10-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
124 * io/transfer.c (finalize_transfer): Free format data in child
125 procedures. (st_read_done, st_write_done): Don't free format
128 2016-10-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
131 * io/io.h: Move size_used from dtp to unit structure. Add bool
132 has_size to unit structure.
133 * io/read.c (read_x): Use has_size and size_used.
134 * io/transfer.c (read_sf_internal,read_sf,read_block_form,
135 read_block_form4): Likewise.
136 (data_transfer_init): If parent, initialize the size variables.
137 (finalize_transfer): Set the size variable using size_used in
138 gfc_unit. (write_block): Delete bogus/dead code.
140 2016-10-16 Janne Blomqvist <jb@gcc.gnu.org>
143 * io/transfer.c (data_transfer_init): Improve error message,
144 remove redundant check.
146 2016-10-15 Janne Blomqvist <jb@gcc.gnu.org>
149 * io/io.h (get_unique_unit_number): Remove prototype.
150 (newunit_alloc): New prototype.
151 * io/open.c (st_open): Call newunit_alloc.
152 * io/unit.c (newunits,newunit_size,newunit_lwi): New static
154 (GFC_FIRST_NEWUNIT): Rename to NEWUNIT_START.
155 (next_available_newunit): Remove variable.
156 (get_unit): Call newunit_alloc, don't try to create negative
158 (close_unit_1): Call newunit_free.
159 (close_units): Free newunits array.
160 (get_unique_number): Remove function.
161 (newunit_alloc): New function.
162 (newunit_free): New function.
163 * io/transfer.c (data_transfer_init): Check for invalid unit
166 2016-10-09 Janne Blomqvist <jb@gcc.gnu.org>
169 * io/io.h: TEMP_FAILURE_RETRY: Define macro if not found.
170 * io/unix.c (raw_read): Handle EINTR.
171 (raw_write): Check for return value -1.
172 (raw_seek): Handle EINTR.
173 (raw_tell): Likewise.
174 (raw_size): Likewise.
175 (raw_truncate): Likewise.
176 (raw_close): Likewise.
177 (buf_flush): Call raw_seek instead of lseek.
178 (buf_read): Likewise.
179 (buf_write): Likewise.
180 (fd_to_stream): Handle EINTR.
181 (tempfile_open): Likewise.
182 (regular_file2): Likewise.
183 (compare_file_filename): Likewise.
184 (find_file): Likewise.
185 (inquire_sequential): Likewise.
186 (inquire_direct): Likewise.
187 (inquire_formatted): Likewise.
189 2016-10-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
192 * io/inquire.c (inquire_via_unit): NULL guard the check for
193 internal unit passed into child IO procedure.
195 2016-10-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
197 * io/inquire.c (inquire_via_unit): Add check for internal unit
198 passed into child IO procedure.
200 2016-10-01 Andre Vehreschild <vehre@gcc.gnu.org>
203 * caf/single.c (caf_internal_error): Fix not terminating va-list.
204 (_gfortran_caf_register): Free memory also when other allocs failed.
205 (_gfortran_caf_get_by_ref): Fixed style.
206 (send_by_ref): Token is now stored at the correct position preventing
207 inaccessible tokens, memory loss and possibly crashes.
209 2016-09-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
212 io/transfer.c (next_record): Flush before calculating next_record.
215 2016-09-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
218 * io/inquire.c (inquire_via_unit): Adjust error check for the
219 two possible internal unit KINDs.
220 * io/io.h: Adjust defines for is_internal_unit and
221 is_char4_unit. (gfc_unit): Add internal unit data to structure.
222 (get_internal_unit): Change declaration to set_internal_unit.
223 (free_internal_unit): Change name to stash_internal_unit_number.
224 (get_unique_unit_number): Adjust parameter argument.
225 Define IOPARM_DT_HAS_UDTIO. (gfc_saved_unit): New structure.
226 * io/list_read.c (next_char_internal): Use is_char4_unit.
227 * io/open.c (st_open): Adjust call to get_unique_unit_number.
228 * io/transfer.c (write_block): Use is_char4_unit.
229 (data_transfer_init): Update check for unit numbers.
230 (st_read_done): Free the various allocated memories used for the
231 internal units and stash the negative unit number and pointer to unit
232 structure to allow reuse. (st_write_done): Likewise stash the freed
234 * io/unit.c: Create a fixed size buffer of 16 gfc_saved_unit's to use
235 as a stack to save newunit unit numbers and unit structure for reuse.
236 (get_external_unit): Change name to get_gfc_unit to better
237 reflect what it does. (find_unit): Change call to get_gfc_unit.
238 (find_or_create_unit): Likewise. (get_internal_unit): Change
239 name to set_internal_unit. Move internal unit from the dtp
240 structure to the gfc_unit structure so that it can be passed to
241 child I/O statements through the UNIT.
242 (free_internal_unit): Change name to stash_internal_unit_number.
243 Push the common.unit number onto the newunit stack, saving it
244 for possible reuse later. (get_unit): Set the internal unit
245 KIND. Use get_unique_unit_number to get a negative unit number
246 for the internal unit. Use get_gfc_unit to get the unit structure
247 and use set_internal_unit to initialize it.
248 (init_units): Initialize the newunit stack.
249 (get_unique_unit_number): Check the stack for an available unit
250 number and use it. If none there get the next most negative
251 number. (close_units): Free any unit structures pointed to from the save
254 2016-09-21 Janne Blomqvist <jb@gcc.gnu.org>
256 * intrinsics/random.c (getosrandom): Use rand_s() on
257 MinGW-w64. Fix bounds overflow in fallback code.
259 2016-09-19 Andre Vehreschild <vehre@gcc.gnu.org>
261 * caf/libcaf.h: Add caf_reference_type.
262 * caf/mpi.c: Adapted signature of caf_register().
263 * caf/single.c (struct caf_single_token): Added to keep the pointer
264 to the memory registered and array descriptor.
265 (caf_internal_error): Added convenience interface.
266 (_gfortran_caf_register): Adapted to work with caf_single_token and
267 return memory in the array descriptor.
268 (_gfortran_caf_deregister): Same.
269 (assign_char1_from_char4): Fixed style.
270 (convert_type): Fixed incorrect conversion.
271 (_gfortran_caf_get): Adapted to work with caf_single_token.
272 (_gfortran_caf_send): Same.
273 (_gfortran_caf_sendget): Same.
274 (copy_data): Added to stop repeating it in all _by_ref functions.
275 (get_for_ref): Recursive getting of coarray data using a chain of
277 (_gfortran_caf_get_by_ref): Driver for computing the memory needed for
278 the get and checking properties of the operation.
279 (send_by_ref): Same as get_for_ref but for sending data.
280 (_gfortran_caf_send_by_ref): Same like caf_get_by_ref but for sending.
281 (_gfortran_caf_sendget_by_ref): Uses get_by_ref and send_by_ref to
282 implement sendget for reference chains.
283 (_gfortran_caf_atomic_define): Adapted to work with caf_single_token.
284 (_gfortran_caf_atomic_ref): Likewise.
285 (_gfortran_caf_atomic_cas): Likewise.
286 (_gfortran_caf_atomic_op): Likewise.
287 (_gfortran_caf_event_post): Likewise.
288 (_gfortran_caf_event_wait): Likewise.
289 (_gfortran_caf_event_query): Likewise.
290 (_gfortran_caf_lock): Likewise.
291 (_gfortran_caf_unlock): Likewise.
293 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
296 * ieee/ieee_arithmetic.F90 (IEEE_VALUE_4,IEEE_VALUE_8,IEEE_VALULE_10,
297 IEEE_VALUE_16): Use correct keyword.
299 2016-09-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
302 * io/write_float.def (build_float_string): Recognize when the
303 result will not fit in the user provided, star fill, and exit
306 2016-08-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
309 * io/write.c (kind_from_size): New function to calculate required buffer
310 size based on kind type. (select_buffer, select_string): Use new
311 function. (write_float_0, write_real, write_real_g0, write_complex):
312 Adjust calls to pass parameters needed by new function.
314 2016-08-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
315 Paul Thomas <pault@gcc.gnu.org>
318 * gfortran.map : Flag _st_set_nml_dtio_var and
319 _gfortran_transfer_derived.
320 * io/format.c (format_lex): Detect DTIO formatting.
321 (parse_format_list): Parse the DTIO format.
322 (next_format): Include FMT_DT.
323 * io/format.h : Likewise. Add structure 'udf' to structure
324 'fnode' to carry the IOTYPE string and the 'vlist'.
325 * io/io.h : Add prototypes for the two types of DTIO subroutine
326 and a typedef for gfc_class. Also, add to 'namelist_type'
327 fields for the pointer to the DTIO procedure and the vtable.
328 Add fields to struct st_parameter_dt for pointers to the two
329 types of DTIO subroutine. Add to gfc_unit DTIO specific fields.
330 (internal_proto): Add prototype for 'read_user_defined' and
331 'write_user_defined'.
332 * io/list_read.c (check_buffers): Use the 'current_unit' field.
333 (unget_char): Likewise.
334 (eat_spaces): Likewise.
335 (list_formatted_read_scalar): For case BT_CLASS, call the DTIO
337 (nml_get_obj_data): Likewise when DTIO procedure is present,.
338 * io/transfer.c : Export prototypes for 'transfer_derived' and
339 'transfer_derived_write'.
340 (unformatted_read): For case BT_CLASS, call the DTIO procedure.
341 (unformatted_write): Likewise.
342 (formatted_transfer_scalar_read): Likewise.
343 (formatted_transfer_scalar_write: Likewise.
344 (transfer_derived): New function.
345 (data_transfer_init): Set last_char if no child_dtio.
346 (finalize_transfer): Return if child_dtio set.
347 (st_write_done): Add condition for child_dtio not set.
348 Add extra arguments for st_set_nml_var prototype.
349 (set_nml_var): New function that contains the contents of the
350 old version of st_set_nml_var. Also sets the 'dtio_sub' and
351 'vtable' fields of the 'nml' structure.
352 (st_set_nml_var): Now just calls set_nml_var with 'dtio_sub'
354 (st_set_nml_dtio_var): New function that calls set_nml_var.
355 * io/unit.c (get_external_unit): If the found unit child_dtio
356 is non zero, don't do any mutex locking/unlocking. Just
358 * io/unix.c (tempfile_open): Revert to C style comment.
359 * io/write.c (list_formatted_write_scalar): Do the DTIO call.
360 (nml_write_obj): Add BT_CLASS and do the DTIO call.
362 2016-08-29 Nathan Sidwell <nathan@acm.org>
364 * configure.ac (nvptx-*): Hardwire newlib.
365 * configure: Rebuilt.
367 2016-08-19 Janne Blomqvist <jb@gcc.gnu.org>
369 * intrinsics/random.c (xor_keys): New array with "secret" keys.
370 (scramble_seed): XOR given seed with xor_keys array rather than
372 (unscramble_seed): Remove function.
373 (random_seed_i4): Use new scramble_seed.
374 (random_seed_i8): Likewise.
376 2016-08-19 Janne Blomqvist <jb@gcc.gnu.org>
378 * intrinsics/random.c (master_init): New variable.
379 (init_rand_state): Move below getosrandom (), maybe initialize
381 (random_seed_i4): If called with no arguments, set master_init to
382 false, and reinitialize. If called with PUT=, set master_init to
384 (random_seed_i8): Likewise.
386 2016-08-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
388 * intrinsics/random.c: Include <stdlib.h>.
390 2016-08-11 Janne Blomqvist <jb@gcc.gnu.org>
392 * intrinsics/random.c: Replace KISS with xorshift1024* using
394 * runtime/main.c (init): Don't call random_seed_i4.
396 2016-07-22 Andre Vehreschild <vehre@gcc.gnu.org>
398 * caf/libcaf.h: Add parameter stat to caf_get() and
399 caf_send()'s function prototypes.
400 * caf/single.c (_gfortran_caf_get): Implement reporting
401 error using stat instead of abort().
402 (_gfortran_caf_send): Same.
403 (_gfortran_caf_sendget): Use NULL for stat when calling
406 2016-06-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
409 * io/write.c: Cleaned up whitespace.
410 (write_d, write_e, write_f, write_es, write_en): Use new helper
411 function write_float_0.
412 (write_float_0): New helper function.
413 (get_precision, select_buffer, select_string, write_float_string): New
414 helper functions used in remaining float writing functions.
415 Helper function write_float_string now contains code for writing
416 to kind=4 character internal units.
417 (write_real): Modified to establish working buffers at this level
418 and to use new helper functions.
419 (write_real_g0): Likewise modified.
420 (write_complex): Likewise modified. Gets both float strings before
421 output so that final lengths can be determined which allows right
422 justifying the complex number with no intervening spaces.
423 * io/write_float.def (build_float_string): Renamed from previosly
424 output_float, modified to use buffers passed in from higher functions,
425 builds a null terminated string of the floating point value. Character
426 kind=4 code eliminated.
427 (write_infnan): Likewise modified to use incoming buffers and eliminate
429 (OUTPUT_FLOAT_FMT_G): Deleted, functionality moved into FORMAT_FLOAT.
430 (FORMAT_FLOAT): Renamed macro from WRITE_FLOAT. Use build_float_string.
431 (get_float_string): Renamed from write_float, uses FORMAT_FLOAT macro.
432 Buffer allocation removed, now at higher level.
434 2016-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
437 * io/list_read (eat_spaces): Eat '\r' as part of spaces.
439 2016-04-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
442 * io/list_read (check_buffers): Add '\r' to check for end of line.
444 2016-03-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
445 Dominique d'Humieres <dominiq@lps.ens.fr>
448 * io/write_float.def: Fix PF format for negative values of the scale
451 2016-03-28 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
453 * caf/libcaf.h: caf_stop_numeric and caf_stop_str prototype.
454 * caf/single.c: _gfortran_caf_stop_numeric and
455 _gfortran_caf_stop_str implementation.
457 2016-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
460 * io/list_read.c (read_real): If digit is missing from exponent issue
461 an error. (parse_real): Likewise and adjusted error message to clarify
462 it is part of a complex number.
463 (nml_read_obj): Bump item count and add comment that this is used to
464 identify which item in a namelist read has a problem.
466 2016-02-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
469 * io/list_read.c (push_char4): Fix the pointer usage for xrealloc.
471 2016-02-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
474 * io/list_read.c: Entire file trailing spaces removed.
475 (CASE_SEPARATORS): Remove '!'.
476 (is_separator): Add namelist mode as condition with '!'.
477 (push_char): Remove un-needed memset. (push_char4): Likewise and remove
478 'new' pointer. (eat_separator): Remove un-needed use of notify_std.
479 (read_logical): If '!' bang encountered when not in namelist mode got
480 bad_logical to give an error. (read_integer): Likewise reject '!'.
481 (read_character): Remove condition testing c = '!' which is now inside
482 the is_separator macro. (parse_real): Reject '!' unless in namelist mode.
483 (read_complex): Reject '!' unless in namelist mode. (read_real): Likewise
486 2016-02-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
489 * io/list_read.c (read_character): Remove code related to DELIM_NONE.
491 2016-01-23 John David Anglin <danglin@gcc.gnu.org>
494 * runtime/backtrace.c: Include gthr.h.
495 (show_backtrace): Use __gthread_active_p() to determine whether threads
496 are active. Return if lbstate is NULL.
498 2016-01-15 Jakub Jelinek <jakub@redhat.com>
500 * intrinsics/execute_command_line.c (set_cmdstat): Use "%s", msg
501 instead of msg to avoid -Wformat-security warning.
503 2016-01-04 Jakub Jelinek <jakub@redhat.com>
505 Update copyright years.
507 Copyright (C) 2016 Free Software Foundation, Inc.
509 Copying and distribution of this file, with or without modification,
510 are permitted in any medium without royalty provided the copyright
511 notice and this notice are preserved.