re PR lto/60405 (ICE in lto1 on x86_64-linux-gnu)
[official-gcc.git] / libgfortran / ChangeLog
blob0cf04d2a2b09f70494be20f504ad06ced2eefbde
1 2014-03-03  Jerry DeLisle  <jvdelisle@gcc.gnu>
3         PR libfortran/60148
4         * io/inquire.c (inquire_via_unit): In the case of
5         DELIM_UNSPECIFIED set inquire return string to "NONE".
6         * io/list_read.c (read_character): In the case of DELIM_NONE and
7         namelists, complete the character read using the namelist
8         variable length.
9         * io/open.c (new_unit): Don't set delim status to none if not
10         specified so that DELIM_UNSPECIFIED can be used later.
11         * io/transfer.c (data_transfer_init): For namelist I/O, if the
12         unit delim status is unspecified set the current status to quote.
13         Otherwise, set current status to the unit status.
14         * io/unit.c (get_internel_unit, init_unit): Remember to set
15         flags_delim initially to DELIM_UNSPECIFIED so defaults come out
16         correctly.
17         * io/write.c (write_character): Add a new function argument
18         "mode" to signify that raw output is to be used vs output with
19         delimiters. If the mode is set to DELIM (1) proceed with
20         delimiters. (list_formatted_write_scalar): Write the separator
21         only if a delimiter was previously specified. Update the call to
22         write_character with the mode argument given.
23         (namelist_write_newline): Use the mode argument. (nml_write_obj):
24         Use the mode argument. Remove use of tmp_delim. Write the
25         semi-colon or comma correctly only when needed with using
26         delimiters. Cleanup whitespace.
27         (namelist_write): If delim is not specified in namelist I/O,
28         default to using quotes. Get rid of the tmp_delim variable and
29         use the new mode argument in write_character.
31 2014-02-21  Tobias Burnus  <burnus@net-b.de>
33         PR fortran/60286
34         * libgfortran/io/inquire.c (yes, no): New static const char vars.
35         (inquire_via_unit): Use them. Use OPEN mode instead of using
36         POSIX's access to query about write=, read= and readwrite=.
38 2014-01-20  Jerry DeLisle  <jvdelisle@gcc.gnu>
39             Dominique d'Humieres  <dominiq@lps.ens.fr>
41         * io/write_float.def (output_float): Remove inadvertent test
42         code from previous patch.
44 2014-01-19  Jerry DeLisle  <jvdelisle@gcc.gnu>
45             Dominique d'Humieres  <dominiq@lps.ens.fr>
47         PR libfortran/59771
48         PR libfortran/59774
49         PR libfortran/59836
50         * io/write_float.def (output_float): Fix wrong handling of the
51         Fw.0 format.
52         (output_float_FMT_G_): Fixes rounding issues with -m32.
54 2014-01-11  Jerry DeLisle  <jvdelisle@gcc.gnu>
55             Dominique d'Humieres  <dominiq@lps.ens.fr>
56             Steven G. Kargl  <kargl@gcc.gnu.org>
58         PR libfortran/59700
59         PR libfortran/59764
60         * io/io.h (struct st_parameter_dt): Assign expanded_read flag to
61         unused bit. Define new variable line_buffer_pos.
62         * io/list_read.c (free_saved, next_char, l_push_char,
63         read_logical, read_real): Replace use of item_count with
64         line_buffer_pos for line_buffer look ahead.
65         (read_logical, read_integer, parse_real, read_real, check_type):
66         Adjust location of free_line to after generating error messages
67         to retain the correct item count for the message. 
69 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
71         Update copyright years
73 2013-12-18  Steven G. Kargl  <kargl@gcc.gnu.org>
75         * io/read.c (read_f): Convert assert to runtime error.
77 2013-12-17  Andreas Tobler  <andreast@gcc.gnu.org>
79         * io/unix.c (tempfile_open): Only use the needed flag O_CLOEXEC.
81 2013-12-16  Jerry DeLisle  <jvdelisle@gcc.gnu>
83         PR libfortran/59419
84         * io/file_pos.c (st_rewind): Do proper return after
85         generate_error.
86         * io/open.c (edit_modes): Move action code inside block that
87         checks for library ok. (new_unit): Do cleanup after error.
88         (st_open): Do proper return after error.
89         * io/transfer.c (data_transfer_init): Likewise.
90         
91 2013-12-11  Tobias Burnus  <burnus@net-b.de>
93         * config/fpu-387.h (sigill_hdlr, get_fpu_rounding_mode): Emit SSE
94         instructions when __SSE_MATH__ is defined.
96 2013-12-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
98         * intrinsics/erfc_scaled.c (_M_2_SQRTPI): Define if missing.
100 2013-12-01  Uros Bizjak  <ubizjak@gmail.com>
102         PR libfortran/59313
103         * intrinsics/erfc_scaled.c (erfc_scaled_r16): Also provide for
104         quadruple precision long double variant.
106 2013-11-20  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
108         * intrinsics/erfc_scaled.c (erfc_scaled_r16): Don't define if
109         __float128 is not available.
111 2013-11-20  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
113         PR libfortran/49024
114         * intrinsics/erfc_scaled.c (erfc_scaled_r16): New function.
115         * intrinsics/erfc_scaled_inc.c: Do not provide quadruple
116         precision variant.
118 2013-11-18  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
120         PR libfortran/51828
121         * intrinsics/unpack_generic.c (unpack_internal): Let the compiler
122         know that dim > 0 to avoid warnings.
124 2013-11-15  Janne Blomqvist  <jb@gcc.gnu.org>
125             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
127         PR fortran/59108
128         * io/unix.c (regular_file): Don't set O_CREAT when opening a file
129         read-only with unknown status. Mask out O_CREAT when falling back
130         to opening read-only if ACTION= is not set and read-write fails.
132 2013-11-15  Steve Ellcey  <sellcey@mips.com>
134         * configure.ac: Do not define HAVE_STRTOLD.
135         * configure: Regenerate.
137 2013-11-10  Janne Blomqvist  <jb@gcc.gnu.org>
139         * configure.ac: Check presence of mkostemp.
140         * io/unix.c (set_close_on_exec): New function.
141         (tempfile_open): Use mkostemp and O_CLOEXEC if available, fallback
142         to calling set_close_on_exec.
143         (regular_file): Add O_CLOEXEC to flags if defined.
144         (open_external): Call set_close_on_exec if O_CLOEXEC is not
145         defined.
146         * config.h.in: Regenerated.
147         * configure: Regenerated.
148         * Makefile.in: Regenerated.
149         * aclocal.m4: Regenerated.
151 2013-10-01  Tobias Burnus  <burnus@net-b.de>
153         PR fortran/55469
154         * io/list_read (parse_repeat, read_integer, read_character,
155         parse_real, read_real, check_type, list_formatted_read_scalar,
156         finish_list_read): Call list_free.
158 2013-09-20  Alan Modra  <amodra@gmail.com>
160         * configure: Regenerate.
162 2013-07-23  Uros Bizjak  <ubizjak@gmail.com>
164         * config/fpu-387.h (get_fpu_rounding_mode): Read rounding mode
165         from SSE mxcsr register on x86_64.
167 2013-07-21  Ondřej Bílka  <neleai@seznam.cz>
169         * io/transfer.c: Fix comment typos.
171 2013-07-21  Tobias Burnus  <burnus@net-b.de>
173         PR fortran/35862
174         * config/fpu-387.h (set_fpu_rounding_mode,
175         get_fpu_rounding_mode): Add missing _ to fix build.
177 2013-07-21  Tobias Burnus  <burnus@net-b.de>
178             Uros Bizjak  <ubizjak@gmail.com>
180         PR fortran/35862
181         * libgfortran.h (set_fpu_rounding_mode,
182         get_fpu_rounding_mode): New prototypes.
183         * config/fpu-387.h (set_fpu_rounding_mode,
184         get_fpu_rounding_mode): New functions.
185         * config/fpu-aix.h (set_fpu_rounding_mode,
186         get_fpu_rounding_mode): Ditto.
187         * config/fpu-generic.h (set_fpu_rounding_mode,
188         get_fpu_rounding_mode): Ditto.
189         * config/fpu-glibc.h (set_fpu_rounding_mode,
190         get_fpu_rounding_mode): Ditto.
191         * config/fpu-sysv.h (set_fpu_rounding_mode,
192         get_fpu_rounding_mode): Ditto.
193         * configure.ac: Check for fp_rnd and fp_rnd_t.
194         * io/io.h (enum unit_round): Use GFC_FPE_* for the value.
195         * io/read.c (convert_real): Set FP ronding mode.
196         * Makefile.in: Regenerate.
197         * aclocal.m4: Regenerate.
198         * config.h.in: Regenerate.
199         * configure: Regenerate.
201 2013-06-24  Tobias Burnus  <burnus@net-b.de>
203         * configure.ac: Check for fp_except and fp_except_t.
204         * config/fpu-sysv.h: Conditionally use either type.
205         * configure: Regenerate.
206         * config.h.in: Regenerate.
208 2013-06-21  Eric Botcazou  <ebotcazou@adacore.com>
210         * config/fpu-sysv.h (get_fpu_except_flags): Fix typo.
212 2013-06-20  Uros Bizjak  <ubizjak@gmail.com>
214         * config/fpu-387.h (_FPU_MASK_ALL): New.
215         (_FPU_EX_ALL): Ditto.
216         (set_fpu): Use fstcw to store x87 FPU control word. Use fnclex to
217         clear stalled exception flags.  Correctly clear stalled SSE
218         exception flags.  Simplify code.
219         (get_fpu_except_flags): Simplify code.
221 2013-06-20  Tobias Burnus  <burnus@net-b.de>
223         PR fortran/57633
224         * io/list_read.c (next_char, eat_separator): Don't set EOL for \r.
226 2013-06-19  Uros Bizjak  <ubizjak@gmail.com>
228         * config/fpu-387.h: Use __asm__ and __volatile__ consistently.
229         (get_fpu_except_flags): Initialize result.
231 2013-06-17  Tobias Burnus  <burnus@net-b.de>
233         * libgfortran.h (compile_options_t) Add fpe_summary.
234         (get_fpu_except_flags): New prototype.
235         * runtime/compile_options.c (set_options, init_compile_options):
236         Handle fpe_summary.
237         * runtime/stop.c (report_exception): New function.
238         (stop_numeric, stop_numeric_f08, stop_string, error_stop_string,
239         error_stop_numeric): Call it.
240         * config/fpu-387.h (get_fpu_except_flags): New function.
241         * config/fpu-aix.h (get_fpu_except_flags): New function.
242         * config/fpu-generic.h (get_fpu_except_flags): New function.
243         * config/fpu-glibc.h (get_fpu_except_flags): New function.
244         * config/fpu-sysv.h (get_fpu_except_flags): New function.
245         * configure.ac: Check for fpxcp.h.
246         * configure: Regenerate.
247         * config.h.in: Regenerate.
249 2013-06-01  Tobias Burnus  <burnus@net-b.de>
251         PR fortran/57496
252         * io/write_float.def (ISFINITE2Q, ISFINITE2, ISFINITE2L, ISFINITE,
253         SIGNBIT2Q, SIGNBIT2, SIGNBIT2L, SIGNBIT, ISNAN2Q, ISNAN2, ISNAN2L,
254         ISNAN): New macros.
255         (output_float_FMT_G_,WRITE_FLOAT): Use them.
257 2013-05-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
259         * acinclude.m4 (libgfor_cv_have_as_needed): Check for -z ignore, too.
260         * configure: Regenerate.
262 2013-05-05  David Edelsohn  <dje.gcc@gmail.com>
264         * caf/libcaf.h (_gfortran_caf_critical): Add a prototype.
265         (_gfortran_caf_end_critical): Same.
267 2013-05-04  David Edelsohn  <dje.gcc@gmail.com>
269         * runtime/environ.c: Include unistd.h.
270         * runtime/pause.c: Test HAVE_UNISTD_H.
271         * runtime/stop.c: Same.
272         * io/open.c: Same.
273         * io/unix.c: Same.
274         * io/read.c (si_max): Protect declaration of value.
276 2013-04-29  Janne Blomqvist  <jb@gcc.gnu.org>
278         * intrinsics/system_clock (gf_gettime_mono): Use variable
279         resolution for fractional seconds argument.
280         (system_clock_4): Simplify, update for gf_gettime_mono change.
281         (system_clock_8): Likewise.
283 2013-04-29  Janne Blomqvist  <jb@gcc.gnu.org>
285         PR fortran/56981
286         * io/transfer.c (next_record_w_unf): First fix head marker, then
287         write tail.
288         (next_record): Call flush_if_unbuffered.
289         * io/unix.c (struct unix_stream): Add field unbuffered.
290         (flush_if_unbuffered): New function.
291         (fd_to_stream): New argument.
292         (open_external): Fix fd_to_stream call.
293         (input_stream): Likewise.
294         (output_stream): Likewise.
295         (error_stream): Likewise.
296         * io/unix.h (flush_if_unbuffered): New prototype.
298 2013-04-28  Janne Blomqvist  <jb@gcc.gnu.org>
300         * intrinsics/system_clock.c (system_clock_4): Fix sign error in
301         Windows version.
303 2013-04-15  Tobias Burnus  <burnus@net-b.de>
305         * list_read.c (finish_separator): Initialize variable.
307 2013-04-15  Janne Blomqvist  <jb@gcc.gnu.org>
309         PR fortran/56919
310         * intrinsics/time_1.h: Check __CYGWIN__ in addition to
311         __MINGW32__.
312         * intrinsics/system_clock.c (GF_CLOCK_MONOTONIC): Check
313         _POSIX_MONOTONIC_CLOCK as well.
314         (system_clock_4): Use GetTickCount on Windows.
315         (system_clock_8): Use QueryPerformanceCounter and
316         QueryPerformanceCounterFrequency on Windows.
318 2013-04-04  Tobias Burnus  <burnus@net-b.de>
320         PR fortran/56810
321         * io/list_read.c (check_type): Fix kind checking for COMPLEX.
323 2013-04-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
325         PR libfortran/56660
326         * io/list_read.c (nml_read_obj): Do not reset the read error flag
327         inside nml_read_obj. If the read error flag is found set just exit.
328         Fix some whitespace on comments.
329         (nml_read_obj_data): Reset the read error flag before the first call
330         to nml_read_object.
332 2013-03-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
334         PR libfortran/56786
335         * io/list_read.c (nml_parse_qualifier): Remove spurious next_char call
336         when checking for EOF. Use error return mechanism when EOF detected.
337         Do not return false unless parse_err_msg and parse_err_msg_size have
338         been set. Use hit_eof.
339         (nml_get_obj_data): Likewise use the correct error mechanism.
340         * io/transfer.c (hit_eof): Do not set AFTER_ENDFILE if in namelist
341         mode.
343 2013-03-29  Tobias Burnus  <burnus@net-b.de>
345         PR fortran/56737
346         * io/format.c (parse_format_list): Also cache FMT_STRING.
347         (parse_format): Update call.
349 2013-03-29  Tobias Burnus  <burnus@net-b.de>
351         PR fortran/56737
352         * io/format.c (parse_format): With caching, copy
353         dtp->format string.
354         (save_parsed_format): Use dtp->format directy without
355         copying.
357 2013-03-29  Tobias Burnus  <burnus@net-b.de>
359         PR fortran/56735
360         * io/list_read.c (nml_query): Only abort when
361         an error occured.
362         (namelist_read): Add goto instead of falling through.
364 2013-03-25  Tilo Schwarz  <tilo@tilo-schwarz.de>
366         PR libfortran/52512
367         * io/list_read.c (nml_parse_qualifier): To check for a derived type
368         don't use the namelist head element type but the current element type.
369         (nml_get_obj_data): Add current namelist element type to
370         nml_parse_qualifier call.
372 2013-03-24  Tobias Burnus  <burnus@net-b.de>
374         PR fortran/56696
375         * io/list_read.c (read_real): Fix EOF diagnostic.
377 2013-03-20  Tilo Schwarz  <tilo@tilo-schwarz.de>
379         PR libfortran/51825
380         * io/list_read.c (nml_read_obj): Don't end the component loop on a
381         nested derived type, but continue with the next loop iteration.
382         (nml_get_obj_data): Don't move the first_nl pointer further in the
383         list if a qualifier was found.
385 2013-03-20  Tilo Schwarz  <tilo@tilo-schwarz.de>
387         PR libfortran/48618
388         * io/open.c (st_open): Raise error for unit number < 0 only if
389         unit number does not exist already.
391 2013-03-19  Janne Blomqvist  <jb@gcc.gnu.org>
393         * libgfortran.h: Include stdbool.h.
394         (enum try): Remove.
395         (notify_std): Change return type to bool.
396         * intrinsics/chmod.c: Don't include stdbool.h.
397         * intrinsics/execute_command_line.c: Likewise.
398         * io/format.c: Likewise.
399         * io/list_read.c (nml_parse_qualifier): Change return type to bool.
400         (nml_read_obj): Likewise.
401         (nml_get_obj_data): Likewise.
402         * io/transfer.c (read_block_form): Fix comment.
403         (write_buf): Change return type to bool.
404         * io/write.c: Don't include stdbool.h.
405         * io/write_float.def (output_float): Change return type to bool.
406         (output_float_FMT_G_ ## x): Change type of result variable.
407         * runtime/error.c (notify_std): Change return type to bool.
409 2013-03-11  Tobias Burnus  <burnus@net-b.de>
411         * io/transfer.c (read_block_direct): Correct condition.
412         * intrinsics/execute_command_line.c (execute_command_line):
413         Remove dead code for the HAVE_FORK case.
415 2013-02-21  Janne Blomqvist  <jb@gcc.gnu.org>
417         PR libfortran/30162
418         * io/open.c (test_endfile): Call stell only if size != 0.
419         * io/unix.c (raw_tell): Revert r194679.
420         (raw_size): Return size field only for regular files, otherwise 0.
422 2013-02-19  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
424         PR target/56347
425         * acinclude.m4 (LIBGFOR_CHECK_FOR_BROKEN_POWF): Remove check for
426         broken powf.
427         * configure.ac (LIBGFOR_CHECK_FOR_BROKEN_POWF): Likewise.
428         * intrinsics/c99_functions.c: Likewise.
429         * configure: Rebuilt.
430         * config.h.in: Rebuilt.
432 2013-02-06  Janus Weil  <janus@gcc.gnu.org>
434         PR fortran/55978
435         * runtime/in_pack_generic.c (internal_pack): Return if base_addr is
436         NULL.
438 2013-01-23  Janne Blomqvist  <jb@gcc.gnu.org>
440         * io/file_pos.c (unformatted_backspace): Use __builtin_bswapXX
441         instead of reverse_memcpy.
442         * io/io.h (reverse_memcpy): Remove prototype.
443         * io/transfer.c (reverse_memcpy): Make static, move towards
444         beginning of file.
445         (bswap_array): New function.
446         (unformatted_read): Use bswap_array to byte swap the data
447         in-place.
448         (unformatted_write): Use a larger temp buffer and bswap_array.
449         (us_read): Use __builtin_bswapXX instead of reverse_memcpy.
450         (write_us_marker): Likewise.
452 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
454         Update copyright years.
456 2013-01-06  Tobias Burnus  <burnus@net-b.de>
458         PR fortran/54678
459         * intrinsics/env.c (get_environment_variable_i8): Don't use
460         uninitialized variable.
462 2013-01-02  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
464         PR libfortran/55818
465         * io/list_read.c (read_real): Do not call hit_eof when EOF can be
466         treated as a value separator.
467         (parse_real): Likewise.
468         (read_logical): Likewise.
469         (read_character): Likewise.
470         (read_complex): Likewise.
472 Copyright (C) 2013-2014 Free Software Foundation, Inc.
474 Copying and distribution of this file, with or without modification,
475 are permitted in any medium without royalty provided the copyright
476 notice and this notice are preserved.