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