1 2014-02-21 Tobias Burnus <burnus@net-b.de>
4 * libgfortran/io/inquire.c (yes, no): New static const char vars.
5 (inquire_via_unit): Use them. Use OPEN mode instead of using
6 POSIX's access to query about write=, read= and readwrite=.
8 2014-01-20 Jerry DeLisle <jvdelisle@gcc.gnu>
9 Dominique d'Humieres <dominiq@lps.ens.fr>
11 * io/write_float.def (output_float): Remove inadvertent test
12 code from previous patch.
14 2014-01-19 Jerry DeLisle <jvdelisle@gcc.gnu>
15 Dominique d'Humieres <dominiq@lps.ens.fr>
20 * io/write_float.def (output_float): Fix wrong handling of the
22 (output_float_FMT_G_): Fixes rounding issues with -m32.
24 2014-01-11 Jerry DeLisle <jvdelisle@gcc.gnu>
25 Dominique d'Humieres <dominiq@lps.ens.fr>
26 Steven G. Kargl <kargl@gcc.gnu.org>
30 * io/io.h (struct st_parameter_dt): Assign expanded_read flag to
31 unused bit. Define new variable line_buffer_pos.
32 * io/list_read.c (free_saved, next_char, l_push_char,
33 read_logical, read_real): Replace use of item_count with
34 line_buffer_pos for line_buffer look ahead.
35 (read_logical, read_integer, parse_real, read_real, check_type):
36 Adjust location of free_line to after generating error messages
37 to retain the correct item count for the message.
39 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
41 Update copyright years
43 2013-12-18 Steven G. Kargl <kargl@gcc.gnu.org>
45 * io/read.c (read_f): Convert assert to runtime error.
47 2013-12-17 Andreas Tobler <andreast@gcc.gnu.org>
49 * io/unix.c (tempfile_open): Only use the needed flag O_CLOEXEC.
51 2013-12-16 Jerry DeLisle <jvdelisle@gcc.gnu>
54 * io/file_pos.c (st_rewind): Do proper return after
56 * io/open.c (edit_modes): Move action code inside block that
57 checks for library ok. (new_unit): Do cleanup after error.
58 (st_open): Do proper return after error.
59 * io/transfer.c (data_transfer_init): Likewise.
61 2013-12-11 Tobias Burnus <burnus@net-b.de>
63 * config/fpu-387.h (sigill_hdlr, get_fpu_rounding_mode): Emit SSE
64 instructions when __SSE_MATH__ is defined.
66 2013-12-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
68 * intrinsics/erfc_scaled.c (_M_2_SQRTPI): Define if missing.
70 2013-12-01 Uros Bizjak <ubizjak@gmail.com>
73 * intrinsics/erfc_scaled.c (erfc_scaled_r16): Also provide for
74 quadruple precision long double variant.
76 2013-11-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
78 * intrinsics/erfc_scaled.c (erfc_scaled_r16): Don't define if
79 __float128 is not available.
81 2013-11-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
84 * intrinsics/erfc_scaled.c (erfc_scaled_r16): New function.
85 * intrinsics/erfc_scaled_inc.c: Do not provide quadruple
88 2013-11-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
91 * intrinsics/unpack_generic.c (unpack_internal): Let the compiler
92 know that dim > 0 to avoid warnings.
94 2013-11-15 Janne Blomqvist <jb@gcc.gnu.org>
95 Jerry DeLisle <jvdelisle@gcc.gnu.org>
98 * io/unix.c (regular_file): Don't set O_CREAT when opening a file
99 read-only with unknown status. Mask out O_CREAT when falling back
100 to opening read-only if ACTION= is not set and read-write fails.
102 2013-11-15 Steve Ellcey <sellcey@mips.com>
104 * configure.ac: Do not define HAVE_STRTOLD.
105 * configure: Regenerate.
107 2013-11-10 Janne Blomqvist <jb@gcc.gnu.org>
109 * configure.ac: Check presence of mkostemp.
110 * io/unix.c (set_close_on_exec): New function.
111 (tempfile_open): Use mkostemp and O_CLOEXEC if available, fallback
112 to calling set_close_on_exec.
113 (regular_file): Add O_CLOEXEC to flags if defined.
114 (open_external): Call set_close_on_exec if O_CLOEXEC is not
116 * config.h.in: Regenerated.
117 * configure: Regenerated.
118 * Makefile.in: Regenerated.
119 * aclocal.m4: Regenerated.
121 2013-10-01 Tobias Burnus <burnus@net-b.de>
124 * io/list_read (parse_repeat, read_integer, read_character,
125 parse_real, read_real, check_type, list_formatted_read_scalar,
126 finish_list_read): Call list_free.
128 2013-09-20 Alan Modra <amodra@gmail.com>
130 * configure: Regenerate.
132 2013-07-23 Uros Bizjak <ubizjak@gmail.com>
134 * config/fpu-387.h (get_fpu_rounding_mode): Read rounding mode
135 from SSE mxcsr register on x86_64.
137 2013-07-21 Ondřej Bílka <neleai@seznam.cz>
139 * io/transfer.c: Fix comment typos.
141 2013-07-21 Tobias Burnus <burnus@net-b.de>
144 * config/fpu-387.h (set_fpu_rounding_mode,
145 get_fpu_rounding_mode): Add missing _ to fix build.
147 2013-07-21 Tobias Burnus <burnus@net-b.de>
148 Uros Bizjak <ubizjak@gmail.com>
151 * libgfortran.h (set_fpu_rounding_mode,
152 get_fpu_rounding_mode): New prototypes.
153 * config/fpu-387.h (set_fpu_rounding_mode,
154 get_fpu_rounding_mode): New functions.
155 * config/fpu-aix.h (set_fpu_rounding_mode,
156 get_fpu_rounding_mode): Ditto.
157 * config/fpu-generic.h (set_fpu_rounding_mode,
158 get_fpu_rounding_mode): Ditto.
159 * config/fpu-glibc.h (set_fpu_rounding_mode,
160 get_fpu_rounding_mode): Ditto.
161 * config/fpu-sysv.h (set_fpu_rounding_mode,
162 get_fpu_rounding_mode): Ditto.
163 * configure.ac: Check for fp_rnd and fp_rnd_t.
164 * io/io.h (enum unit_round): Use GFC_FPE_* for the value.
165 * io/read.c (convert_real): Set FP ronding mode.
166 * Makefile.in: Regenerate.
167 * aclocal.m4: Regenerate.
168 * config.h.in: Regenerate.
169 * configure: Regenerate.
171 2013-06-24 Tobias Burnus <burnus@net-b.de>
173 * configure.ac: Check for fp_except and fp_except_t.
174 * config/fpu-sysv.h: Conditionally use either type.
175 * configure: Regenerate.
176 * config.h.in: Regenerate.
178 2013-06-21 Eric Botcazou <ebotcazou@adacore.com>
180 * config/fpu-sysv.h (get_fpu_except_flags): Fix typo.
182 2013-06-20 Uros Bizjak <ubizjak@gmail.com>
184 * config/fpu-387.h (_FPU_MASK_ALL): New.
185 (_FPU_EX_ALL): Ditto.
186 (set_fpu): Use fstcw to store x87 FPU control word. Use fnclex to
187 clear stalled exception flags. Correctly clear stalled SSE
188 exception flags. Simplify code.
189 (get_fpu_except_flags): Simplify code.
191 2013-06-20 Tobias Burnus <burnus@net-b.de>
194 * io/list_read.c (next_char, eat_separator): Don't set EOL for \r.
196 2013-06-19 Uros Bizjak <ubizjak@gmail.com>
198 * config/fpu-387.h: Use __asm__ and __volatile__ consistently.
199 (get_fpu_except_flags): Initialize result.
201 2013-06-17 Tobias Burnus <burnus@net-b.de>
203 * libgfortran.h (compile_options_t) Add fpe_summary.
204 (get_fpu_except_flags): New prototype.
205 * runtime/compile_options.c (set_options, init_compile_options):
207 * runtime/stop.c (report_exception): New function.
208 (stop_numeric, stop_numeric_f08, stop_string, error_stop_string,
209 error_stop_numeric): Call it.
210 * config/fpu-387.h (get_fpu_except_flags): New function.
211 * config/fpu-aix.h (get_fpu_except_flags): New function.
212 * config/fpu-generic.h (get_fpu_except_flags): New function.
213 * config/fpu-glibc.h (get_fpu_except_flags): New function.
214 * config/fpu-sysv.h (get_fpu_except_flags): New function.
215 * configure.ac: Check for fpxcp.h.
216 * configure: Regenerate.
217 * config.h.in: Regenerate.
219 2013-06-01 Tobias Burnus <burnus@net-b.de>
222 * io/write_float.def (ISFINITE2Q, ISFINITE2, ISFINITE2L, ISFINITE,
223 SIGNBIT2Q, SIGNBIT2, SIGNBIT2L, SIGNBIT, ISNAN2Q, ISNAN2, ISNAN2L,
225 (output_float_FMT_G_,WRITE_FLOAT): Use them.
227 2013-05-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
229 * acinclude.m4 (libgfor_cv_have_as_needed): Check for -z ignore, too.
230 * configure: Regenerate.
232 2013-05-05 David Edelsohn <dje.gcc@gmail.com>
234 * caf/libcaf.h (_gfortran_caf_critical): Add a prototype.
235 (_gfortran_caf_end_critical): Same.
237 2013-05-04 David Edelsohn <dje.gcc@gmail.com>
239 * runtime/environ.c: Include unistd.h.
240 * runtime/pause.c: Test HAVE_UNISTD_H.
241 * runtime/stop.c: Same.
244 * io/read.c (si_max): Protect declaration of value.
246 2013-04-29 Janne Blomqvist <jb@gcc.gnu.org>
248 * intrinsics/system_clock (gf_gettime_mono): Use variable
249 resolution for fractional seconds argument.
250 (system_clock_4): Simplify, update for gf_gettime_mono change.
251 (system_clock_8): Likewise.
253 2013-04-29 Janne Blomqvist <jb@gcc.gnu.org>
256 * io/transfer.c (next_record_w_unf): First fix head marker, then
258 (next_record): Call flush_if_unbuffered.
259 * io/unix.c (struct unix_stream): Add field unbuffered.
260 (flush_if_unbuffered): New function.
261 (fd_to_stream): New argument.
262 (open_external): Fix fd_to_stream call.
263 (input_stream): Likewise.
264 (output_stream): Likewise.
265 (error_stream): Likewise.
266 * io/unix.h (flush_if_unbuffered): New prototype.
268 2013-04-28 Janne Blomqvist <jb@gcc.gnu.org>
270 * intrinsics/system_clock.c (system_clock_4): Fix sign error in
273 2013-04-15 Tobias Burnus <burnus@net-b.de>
275 * list_read.c (finish_separator): Initialize variable.
277 2013-04-15 Janne Blomqvist <jb@gcc.gnu.org>
280 * intrinsics/time_1.h: Check __CYGWIN__ in addition to
282 * intrinsics/system_clock.c (GF_CLOCK_MONOTONIC): Check
283 _POSIX_MONOTONIC_CLOCK as well.
284 (system_clock_4): Use GetTickCount on Windows.
285 (system_clock_8): Use QueryPerformanceCounter and
286 QueryPerformanceCounterFrequency on Windows.
288 2013-04-04 Tobias Burnus <burnus@net-b.de>
291 * io/list_read.c (check_type): Fix kind checking for COMPLEX.
293 2013-04-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
296 * io/list_read.c (nml_read_obj): Do not reset the read error flag
297 inside nml_read_obj. If the read error flag is found set just exit.
298 Fix some whitespace on comments.
299 (nml_read_obj_data): Reset the read error flag before the first call
302 2013-03-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
305 * io/list_read.c (nml_parse_qualifier): Remove spurious next_char call
306 when checking for EOF. Use error return mechanism when EOF detected.
307 Do not return false unless parse_err_msg and parse_err_msg_size have
308 been set. Use hit_eof.
309 (nml_get_obj_data): Likewise use the correct error mechanism.
310 * io/transfer.c (hit_eof): Do not set AFTER_ENDFILE if in namelist
313 2013-03-29 Tobias Burnus <burnus@net-b.de>
316 * io/format.c (parse_format_list): Also cache FMT_STRING.
317 (parse_format): Update call.
319 2013-03-29 Tobias Burnus <burnus@net-b.de>
322 * io/format.c (parse_format): With caching, copy
324 (save_parsed_format): Use dtp->format directy without
327 2013-03-29 Tobias Burnus <burnus@net-b.de>
330 * io/list_read.c (nml_query): Only abort when
332 (namelist_read): Add goto instead of falling through.
334 2013-03-25 Tilo Schwarz <tilo@tilo-schwarz.de>
337 * io/list_read.c (nml_parse_qualifier): To check for a derived type
338 don't use the namelist head element type but the current element type.
339 (nml_get_obj_data): Add current namelist element type to
340 nml_parse_qualifier call.
342 2013-03-24 Tobias Burnus <burnus@net-b.de>
345 * io/list_read.c (read_real): Fix EOF diagnostic.
347 2013-03-20 Tilo Schwarz <tilo@tilo-schwarz.de>
350 * io/list_read.c (nml_read_obj): Don't end the component loop on a
351 nested derived type, but continue with the next loop iteration.
352 (nml_get_obj_data): Don't move the first_nl pointer further in the
353 list if a qualifier was found.
355 2013-03-20 Tilo Schwarz <tilo@tilo-schwarz.de>
358 * io/open.c (st_open): Raise error for unit number < 0 only if
359 unit number does not exist already.
361 2013-03-19 Janne Blomqvist <jb@gcc.gnu.org>
363 * libgfortran.h: Include stdbool.h.
365 (notify_std): Change return type to bool.
366 * intrinsics/chmod.c: Don't include stdbool.h.
367 * intrinsics/execute_command_line.c: Likewise.
368 * io/format.c: Likewise.
369 * io/list_read.c (nml_parse_qualifier): Change return type to bool.
370 (nml_read_obj): Likewise.
371 (nml_get_obj_data): Likewise.
372 * io/transfer.c (read_block_form): Fix comment.
373 (write_buf): Change return type to bool.
374 * io/write.c: Don't include stdbool.h.
375 * io/write_float.def (output_float): Change return type to bool.
376 (output_float_FMT_G_ ## x): Change type of result variable.
377 * runtime/error.c (notify_std): Change return type to bool.
379 2013-03-11 Tobias Burnus <burnus@net-b.de>
381 * io/transfer.c (read_block_direct): Correct condition.
382 * intrinsics/execute_command_line.c (execute_command_line):
383 Remove dead code for the HAVE_FORK case.
385 2013-02-21 Janne Blomqvist <jb@gcc.gnu.org>
388 * io/open.c (test_endfile): Call stell only if size != 0.
389 * io/unix.c (raw_tell): Revert r194679.
390 (raw_size): Return size field only for regular files, otherwise 0.
392 2013-02-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
395 * acinclude.m4 (LIBGFOR_CHECK_FOR_BROKEN_POWF): Remove check for
397 * configure.ac (LIBGFOR_CHECK_FOR_BROKEN_POWF): Likewise.
398 * intrinsics/c99_functions.c: Likewise.
399 * configure: Rebuilt.
400 * config.h.in: Rebuilt.
402 2013-02-06 Janus Weil <janus@gcc.gnu.org>
405 * runtime/in_pack_generic.c (internal_pack): Return if base_addr is
408 2013-01-23 Janne Blomqvist <jb@gcc.gnu.org>
410 * io/file_pos.c (unformatted_backspace): Use __builtin_bswapXX
411 instead of reverse_memcpy.
412 * io/io.h (reverse_memcpy): Remove prototype.
413 * io/transfer.c (reverse_memcpy): Make static, move towards
415 (bswap_array): New function.
416 (unformatted_read): Use bswap_array to byte swap the data
418 (unformatted_write): Use a larger temp buffer and bswap_array.
419 (us_read): Use __builtin_bswapXX instead of reverse_memcpy.
420 (write_us_marker): Likewise.
422 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
424 Update copyright years.
426 2013-01-06 Tobias Burnus <burnus@net-b.de>
429 * intrinsics/env.c (get_environment_variable_i8): Don't use
430 uninitialized variable.
432 2013-01-02 Jerry DeLisle <jvdelisle@gcc.gnu.org>
435 * io/list_read.c (read_real): Do not call hit_eof when EOF can be
436 treated as a value separator.
437 (parse_real): Likewise.
438 (read_logical): Likewise.
439 (read_character): Likewise.
440 (read_complex): Likewise.
442 Copyright (C) 2013-2014 Free Software Foundation, Inc.
444 Copying and distribution of this file, with or without modification,
445 are permitted in any medium without royalty provided the copyright
446 notice and this notice are preserved.