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