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