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