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