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