* sv.po: Update.
[official-gcc.git] / libgfortran / ChangeLog
blob62b5222609014ef825402717ed7769e38ae3380f
1 2016-10-09  Janne Blomqvist  <jb@gcc.gnu.org>
3         PR libfortran/67585
4         * io/io.h: TEMP_FAILURE_RETRY: Define macro if not found.
5         * io/unix.c (raw_read): Handle EINTR.
6         (raw_write): Check for return value -1.
7         (raw_seek): Handle EINTR.
8         (raw_tell): Likewise.
9         (raw_size): Likewise.
10         (raw_truncate): Likewise.
11         (raw_close): Likewise.
12         (buf_flush): Call raw_seek instead of lseek.
13         (buf_read): Likewise.
14         (buf_write): Likewise.
15         (fd_to_stream): Handle EINTR.
16         (tempfile_open): Likewise.
17         (regular_file2): Likewise.
18         (compare_file_filename): Likewise.
19         (find_file): Likewise.
20         (inquire_sequential): Likewise.
21         (inquire_direct): Likewise.
22         (inquire_formatted): Likewise.
24 2016-10-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
26         PR fortran/77868
27         * io/inquire.c (inquire_via_unit): NULL guard the check for
28         internal unit passed into child IO procedure.
30 2016-10-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
32         * io/inquire.c (inquire_via_unit): Add check for internal unit
33         passed into child IO procedure.
35 2016-10-01  Andre Vehreschild  <vehre@gcc.gnu.org>
37         PR fortran/77663
38         * caf/single.c (caf_internal_error): Fix not terminating va-list.
39         (_gfortran_caf_register): Free memory also when other allocs failed.
40         (_gfortran_caf_get_by_ref): Fixed style.
41         (send_by_ref): Token is now stored at the correct position preventing
42         inaccessible tokens, memory loss and possibly crashes.
44 2016-09-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
46         PR libgfortran/77707
47         io/transfer.c (next_record): Flush before calculating next_record.
48         Correctly calculate.
50 2016-09-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
52         PR libgfortran/48298
53         * io/inquire.c (inquire_via_unit): Adjust error check for the
54         two possible internal unit KINDs.
55         * io/io.h: Adjust defines for is_internal_unit and
56         is_char4_unit. (gfc_unit): Add internal unit data to structure.
57         (get_internal_unit): Change declaration to set_internal_unit.
58         (free_internal_unit): Change name to stash_internal_unit_number.
59         (get_unique_unit_number): Adjust parameter argument.
60         Define IOPARM_DT_HAS_UDTIO. (gfc_saved_unit): New structure.
61         * io/list_read.c (next_char_internal): Use is_char4_unit.
62         * io/open.c (st_open): Adjust call to get_unique_unit_number.
63         * io/transfer.c (write_block): Use is_char4_unit.
64         (data_transfer_init): Update check for unit numbers.
65         (st_read_done): Free the various allocated memories used for the
66         internal units and stash the negative unit number and pointer to unit
67         structure to allow reuse. (st_write_done): Likewise stash the freed
68         unit.
69         * io/unit.c: Create a fixed size buffer of 16 gfc_saved_unit's to use
70         as a stack to save newunit unit numbers and unit structure for reuse.
71         (get_external_unit): Change name to get_gfc_unit to better
72         reflect what it does. (find_unit): Change call to get_gfc_unit.
73         (find_or_create_unit): Likewise. (get_internal_unit): Change
74         name to set_internal_unit. Move internal unit from the dtp
75         structure to the gfc_unit structure so that it can be passed to
76         child I/O statements through the UNIT.
77         (free_internal_unit): Change name to stash_internal_unit_number.
78         Push the common.unit number onto the newunit stack, saving it
79         for possible reuse later. (get_unit): Set the internal unit
80         KIND. Use get_unique_unit_number to get a negative unit number
81         for the internal unit. Use get_gfc_unit to get the unit structure
82         and use set_internal_unit to initialize it.
83         (init_units): Initialize the newunit stack.
84         (get_unique_unit_number): Check the stack for an available unit
85         number and use it. If none there get the next most negative
86         number. (close_units): Free any unit structures pointed to from the save
87         stack.
89 2016-09-21  Janne Blomqvist  <jb@gcc.gnu.org>
91         * intrinsics/random.c (getosrandom): Use rand_s() on
92         MinGW-w64. Fix bounds overflow in fallback code.
94 2016-09-19  Andre Vehreschild  <vehre@gcc.gnu.org>
96         * caf/libcaf.h: Add caf_reference_type.
97         * caf/mpi.c: Adapted signature of caf_register().
98         * caf/single.c (struct caf_single_token): Added to keep the pointer
99         to the memory registered and array descriptor.
100         (caf_internal_error): Added convenience interface.
101         (_gfortran_caf_register): Adapted to work with caf_single_token and
102         return memory in the array descriptor.
103         (_gfortran_caf_deregister): Same.
104         (assign_char1_from_char4): Fixed style.
105         (convert_type): Fixed incorrect conversion.
106         (_gfortran_caf_get): Adapted to work with caf_single_token.
107         (_gfortran_caf_send): Same.
108         (_gfortran_caf_sendget): Same.
109         (copy_data): Added to stop repeating it in all _by_ref functions.
110         (get_for_ref): Recursive getting of coarray data using a chain of
111         references.
112         (_gfortran_caf_get_by_ref): Driver for computing the memory needed for
113         the get and checking properties of the operation.
114         (send_by_ref): Same as get_for_ref but for sending data.
115         (_gfortran_caf_send_by_ref): Same like caf_get_by_ref but for sending.
116         (_gfortran_caf_sendget_by_ref): Uses get_by_ref and send_by_ref to
117         implement sendget for reference chains.
118         (_gfortran_caf_atomic_define): Adapted to work with caf_single_token.
119         (_gfortran_caf_atomic_ref): Likewise.
120         (_gfortran_caf_atomic_cas): Likewise.
121         (_gfortran_caf_atomic_op): Likewise.
122         (_gfortran_caf_event_post): Likewise.
123         (_gfortran_caf_event_wait): Likewise.
124         (_gfortran_caf_event_query): Likewise.
125         (_gfortran_caf_lock): Likewise.
126         (_gfortran_caf_unlock): Likewise.
128 2016-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>
130         PR fortran/77507
131         * ieee/ieee_arithmetic.F90 (IEEE_VALUE_4,IEEE_VALUE_8,IEEE_VALULE_10,
132         IEEE_VALUE_16):  Use correct keyword.
134 2016-09-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
136         PR libgfortran/77393
137         * io/write_float.def (build_float_string): Recognize when the
138         result will not fit in the user provided, star fill, and exit
139         early.
141 2016-08-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
143         PR libgfortran/77393
144         * io/write.c (kind_from_size): New function to calculate required buffer
145         size based on kind type. (select_buffer, select_string): Use new
146         function. (write_float_0, write_real, write_real_g0, write_complex):
147         Adjust calls to pass parameters needed by new function.
149 2016-08-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
150         Paul Thomas  <pault@gcc.gnu.org>
152         PR libgfortran/48298
153         * gfortran.map : Flag _st_set_nml_dtio_var and
154         _gfortran_transfer_derived.
155         * io/format.c (format_lex): Detect DTIO formatting.
156         (parse_format_list): Parse the DTIO format.
157         (next_format): Include FMT_DT.
158         * io/format.h : Likewise. Add structure 'udf' to structure
159         'fnode' to carry the IOTYPE string and the 'vlist'.
160         * io/io.h : Add prototypes for the two types of DTIO subroutine
161         and a typedef for gfc_class. Also, add to 'namelist_type'
162         fields for the pointer to the DTIO procedure and the vtable.
163         Add fields to struct st_parameter_dt for pointers to the two
164         types of DTIO subroutine. Add to gfc_unit DTIO specific fields.
165         (internal_proto): Add prototype for 'read_user_defined' and
166         'write_user_defined'.
167         * io/list_read.c (check_buffers): Use the 'current_unit' field.
168         (unget_char): Likewise.
169         (eat_spaces): Likewise.
170         (list_formatted_read_scalar): For case BT_CLASS, call the DTIO
171         procedure.
172         (nml_get_obj_data): Likewise when DTIO procedure is present,.
173         * io/transfer.c : Export prototypes for 'transfer_derived' and
174         'transfer_derived_write'.
175         (unformatted_read): For case BT_CLASS, call the DTIO procedure.
176         (unformatted_write): Likewise.
177         (formatted_transfer_scalar_read): Likewise.
178         (formatted_transfer_scalar_write: Likewise.
179         (transfer_derived): New function.
180         (data_transfer_init): Set last_char if no child_dtio.
181         (finalize_transfer): Return if child_dtio set.
182         (st_write_done): Add condition for child_dtio not set.
183         Add extra arguments for st_set_nml_var prototype.
184         (set_nml_var): New function that contains the contents of the
185         old version of st_set_nml_var. Also sets the 'dtio_sub' and
186         'vtable' fields of the 'nml' structure.
187         (st_set_nml_var): Now just calls set_nml_var with 'dtio_sub'
188         and 'vtable' NULL.
189         (st_set_nml_dtio_var): New function that calls set_nml_var.
190         * io/unit.c (get_external_unit): If the found unit child_dtio
191         is non zero, don't do any mutex locking/unlocking.  Just
192         return the unit.
193         * io/unix.c (tempfile_open): Revert to C style comment.
194         * io/write.c (list_formatted_write_scalar): Do the DTIO call.
195         (nml_write_obj): Add BT_CLASS and do the DTIO call.
197 2016-08-29  Nathan Sidwell  <nathan@acm.org>
199         * configure.ac (nvptx-*): Hardwire newlib.
200         * configure: Rebuilt.
202 2016-08-19  Janne Blomqvist  <jb@gcc.gnu.org>
204         * intrinsics/random.c (xor_keys): New array with "secret" keys.
205         (scramble_seed): XOR given seed with xor_keys array rather than
206         shuffling bytes.
207         (unscramble_seed): Remove function.
208         (random_seed_i4): Use new scramble_seed.
209         (random_seed_i8): Likewise.
211 2016-08-19  Janne Blomqvist  <jb@gcc.gnu.org>
213         * intrinsics/random.c (master_init): New variable.
214         (init_rand_state): Move below getosrandom (), maybe initialize
215         master_state.
216         (random_seed_i4): If called with no arguments, set master_init to
217         false, and reinitialize. If called with PUT=, set master_init to
218         true.
219         (random_seed_i8): Likewise.
221 2016-08-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
223         * intrinsics/random.c: Include <stdlib.h>.
225 2016-08-11  Janne Blomqvist  <jb@gcc.gnu.org>
227         * intrinsics/random.c: Replace KISS with xorshift1024* using
228         per-thread state.
229         * runtime/main.c (init): Don't call random_seed_i4.
231 2016-07-22  Andre Vehreschild  <vehre@gcc.gnu.org>
233         * caf/libcaf.h: Add parameter stat to caf_get() and
234         caf_send()'s function prototypes.
235         * caf/single.c (_gfortran_caf_get): Implement reporting
236         error using stat instead of abort().
237         (_gfortran_caf_send): Same.
238         (_gfortran_caf_sendget): Use NULL for stat when calling
239         caf_send().
241 2016-06-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
243         PR libgfortran/48852
244         * io/write.c: Cleaned up whitespace.
245         (write_d, write_e, write_f, write_es, write_en): Use new helper
246         function write_float_0.
247         (write_float_0): New helper function.
248         (get_precision, select_buffer, select_string, write_float_string): New
249         helper functions used in remaining float writing functions.
250         Helper function write_float_string now contains code for writing
251         to kind=4 character internal units.
252         (write_real): Modified to establish working buffers at this level
253         and to  use new helper functions.
254         (write_real_g0): Likewise modified.
255         (write_complex): Likewise modified. Gets both float strings before
256         output so that final lengths can be determined which allows right
257         justifying the complex number with no intervening spaces.
258         * io/write_float.def (build_float_string): Renamed from previosly
259         output_float, modified to use buffers passed in from higher functions,
260         builds a null terminated string of the floating point value. Character
261         kind=4 code eliminated.
262         (write_infnan): Likewise modified to use incoming buffers and eliminate
263         kind=4 related code.
264         (OUTPUT_FLOAT_FMT_G): Deleted, functionality moved into FORMAT_FLOAT.
265         (FORMAT_FLOAT): Renamed macro from WRITE_FLOAT. Use build_float_string.
266         (get_float_string): Renamed from write_float, uses FORMAT_FLOAT macro.
267         Buffer allocation removed, now at higher level.
269 2016-05-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
271         PR libgfortran/71123
272         * io/list_read (eat_spaces): Eat '\r' as part of spaces.
274 2016-04-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
276         PR libgfortran/70684
277         * io/list_read (check_buffers): Add '\r' to check for end of line.
279 2016-03-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
280             Dominique d'Humieres  <dominiq@lps.ens.fr>
282         PR libgfortran/70235
283         * io/write_float.def: Fix PF format for negative values of the scale
284         factor.
286 2016-03-28  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
288         * caf/libcaf.h: caf_stop_numeric and caf_stop_str prototype.
289         * caf/single.c: _gfortran_caf_stop_numeric and
290         _gfortran_caf_stop_str implementation.
292 2016-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
294         PR libgfortran/69456
295         * io/list_read.c (read_real): If digit is missing from exponent issue
296         an error. (parse_real): Likewise and adjusted error message to clarify
297         it is part of a complex number.
298         (nml_read_obj): Bump item count and add comment that this is used to
299         identify which item in a namelist read has a problem.
301 2016-02-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
303         PR libgfortran/69651
304         * io/list_read.c (push_char4): Fix the pointer usage for xrealloc.
306 2016-02-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
308         PR libgfortran/69651
309         * io/list_read.c: Entire file trailing spaces removed.
310         (CASE_SEPARATORS): Remove '!'.
311         (is_separator): Add namelist mode as condition with '!'.
312         (push_char): Remove un-needed memset. (push_char4): Likewise and remove
313         'new' pointer. (eat_separator): Remove un-needed use of notify_std.
314         (read_logical): If '!' bang encountered when not in namelist mode got
315         bad_logical to give an error. (read_integer): Likewise reject '!'.
316         (read_character): Remove condition testing c = '!' which is now inside
317         the is_separator macro. (parse_real): Reject '!' unless in namelist mode.
318         (read_complex): Reject '!' unless in namelist mode. (read_real): Likewise
319         reject '!'.
321 2016-02-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
323         PR libgfortran/69668
324         * io/list_read.c (read_character): Remove code related to DELIM_NONE.
326 2016-01-23  John David Anglin  <danglin@gcc.gnu.org>
328         PR libfortran/68744
329         * runtime/backtrace.c: Include gthr.h.
330         (show_backtrace): Use __gthread_active_p() to determine whether threads
331         are active.  Return if lbstate is NULL.
333 2016-01-15  Jakub Jelinek  <jakub@redhat.com>
335         * intrinsics/execute_command_line.c (set_cmdstat): Use "%s", msg
336         instead of msg to avoid -Wformat-security warning.
338 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
340         Update copyright years.
342 Copyright (C) 2016 Free Software Foundation, Inc.
344 Copying and distribution of this file, with or without modification,
345 are permitted in any medium without royalty provided the copyright
346 notice and this notice are preserved.