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