* config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
[official-gcc.git] / libgfortran / ChangeLog-2014
blob5fc717d15a9ae5ee46cb89b161bc64da49b30a54
1 2014-11-28  Bernd Schmidt  <bernds@codesourcery.com>
3         * Makefile.am (AM_CFLAGS): Add -DLIBGFOR_MINIMAL if LIBGFOR_MINIMAL.
4         (gfor_io_src, gfor_heper_src, gfor_src): Split into minimal and
5         always included sources.
6         * Makefile.in: Regenerate.
7         * configure.ac (LIBGFOR_MINIMAL): New AM_CONDITIONAL.
8         * configure: Regenerate.
9         * caf/single.c (caf_runtime_error): Don't print messages if
10         LIBGFOR_MINIMAL.
11         * runtime/compile_options.c (fatal_error_in_progress,
12         show_signal, backtrace_handler, maybe_find_addr2line): Guard with
13         !defined LIBGFOR_MINIMAL.
14         (set_options): Likewise for the backtrace code.
15         * runtime/minimal.c: New file.
17 2014-11-25  Uros Bizjak  <ubizjak@gmail.com>
19         * intrinsics/env.c (getenv): Remove unused variable res_len.
21 2014-11-24  John David Anglin  <danglin@gcc.gnu.org>
23         * configure.ac: Guard include of <ieeefp.h>.
24         * configure: Rebuilt.
26 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
28         PR bootstrap/63784
29         * configure: Regenerated.
31 2014-11-16  Janne Blomqvist  <jb@gcc.gnu.org>
33         PR libfortran/60324
34         * intrinsics/random.c (kiss_size): Rename to KISS_SIZE, make it a
35         macro instead of a variable.
36         (random_seed_i4): Make seed correct size, remove assert, KISS_SIZE
37         related changes.
38         (random_seed_i8): KISS_SIZE related changes.
40 2014-11-13  Marek Polacek  <polacek@redhat.com>
42         * intrinsics/access.c: Include <stdlib.h>.
43         * intrinsics/chdir.c: Likewise.
44         * intrinsics/chmod.c: Likewise.
45         * intrinsics/link.c: Likewise.
46         * intrinsics/perror.c: Likewise.
47         * intrinsics/rename.c: Likewise.
48         * intrinsics/symlnk.c: Likewise.
49         * intrinsics/unlink.c: Likewise.
51 2014-11-13  Janne Blomqvist  <jb@gcc.gnu.org>
53         PR libfortran/60324
54         * configure: Regenerated.
55         * configure.ac (AM_CFLAGS): Add Werror=vla.
56         * libgfortran.h (gfc_alloca): Remove macro.
57         (fc_strdup_notrim): New prototype.
58         * intrinsics/access.c (access_func): Use fc_strdup rather than
59         stack allocation.
60         * intrinsics/chdir.c (chdir_i4_sub): Likewise.
61         (chdir_i8_sub): Likewise.
62         * intrinsics/chmod.c (chmod_internal): New function, move logic
63         here.
64         (chmod_func): Call chmod_internal.
65         * intrinsics/env.c (getenv): Use fc_strdup rather than stack
66         allocation.
67         (get_environment_variable_i4): Likewise.
68         * intrinsics/execute_command_line.c (execute_command_line):
69         Likewise.
70         * intrinsics/hostnm.c (hostnm_0): New function, use static buffer
71         rather than VLA.
72         (hostnm_i4_sub): Call hostnm_0.
73         (hostnm_i8_sub): Likewise.
74         (hostnm): Likewise.
75         * intrinsics/link.c (link_internal): New function, use fc_strdup
76         rather than stack allocation.
77         (link_i4_sub): Call link_internal.
78         (link_i8_sub): Likewise.
79         (link_i4): Likewise.
80         (link_i8): Likewise.
81         * intrinsics/perror.c (perror_sub): Use fc_strdup rather than
82         stack allocation.
83         * intrinsics/random.c (random_seed_i4): Use static buffer rather
84         than VLA, use _Static_assert to make sure it's big enough.
85         * intrinsics/rename.c (rename_internal): New function, use
86         fc_strdup rather than stack allocation.
87         (rename_i4_sub): Call rename_internal.
88         (rename_i8_sub): Likewise.
89         (rename_i4): Likewise.
90         (rename_i8): Likewise.
91         * intrinsics/stat.c (stat_i4_sub_0): Use fc_strdup rather than
92         stack allocation.
93         (stat_i8_sub_0): Likewise.
94         * intrinsics/symlink.c (symlnk_internal): New function, use
95         fc_strdup rather than stack allocation.
96         (symlnk_i4_sub): Call symlnk_internal.
97         (symlnk_i8_sub): Likewise.
98         (symlnk_i4): Likewise.
99         (symlnk_i8): Likewise.
100         * intrinsics/system.c (system_sub): Use fc_strdup rather than
101         stack allocation.
102         * intrinsics/unlink.c (unlink_i4_sub): Likewise.
103         * io/file_pos.c (READ_CHUNK): Make it a macro rather than variable.
104         * io/list_read.c (nml_get_obj_data): Use fixed stack buffer, fall
105         back to xmalloc/free for large sizes.
106         * io/read.c (read_f): Likewise.
107         * io/transfer.c (MAX_READ): Make it a macro rather than variable.
108         (WRITE_CHUNK): Likewise.
109         * io/write_float.def (write_float): Use fixed stack buffer, fall
110         back to xmalloc/free for large sizes.
111         * runtime/string.c (fc_strdup_notrim): New function.
113 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
115         PR target/63610
116         * configure: Regenerate.
118 2014-11-10  Janne Blomqvist  <jb@gcc.gnu.org>
120         PR libfortran/47007
121         PR libfortran/61847
122         * config.h.in: Regenerated.
123         * configure: Regenerated.
124         * configure.ac (AC_CHECK_HEADERS_ONCE): Check for xlocale.h.
125         (AC_CHECK_FUNCS_ONCE): Check for newlocale, freelocale, uselocale,
126         strerror_l.
127         * io/io.h (locale.h): Include.
128         (xlocale.h): Include if present.
129         (c_locale): New variable.
130         (old_locale): New variable.
131         (old_locale_ctr): New variable.
132         (old_locale_lock): New variable.
133         (st_parameter_dt): Add old_locale member.
134         * io/transfer.c (data_transfer_init): Set locale to "C" if doing
135         formatted transfer.
136         (finalize_transfer): Reset locale to previous.
137         * io/unit.c (c_locale): New variable.
138         (old_locale): New variable.
139         (old_locale_ctr): New variable.
140         (old_locale_lock): New variable.
141         (init_units): Init c_locale, init old_locale_lock.
142         (close_units): Free c_locale.
143         * runtime/error.c (locale.h): Include.
144         (xlocale.h): Include if present.
145         (gf_strerror): Use strerror_l if available. Reset locale to
146         LC_GLOBAL_LOCALE for strerror_r branch.
148 2014-10-20  Janne Blomqvist  <jb@gcc.gnu.org>
150         PR libfortran/63589
151         * configure.ac: Check for strtok_r.
152         * runtime/main.c (gfstrtok_r): Fallback implementation of
153         strtok_r.
154         (find_addr2line): Use strtok_r to split PATH.
155         * config.h.in: Regenerated.
156         * configure: Regenerated.
158 2014-10-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
160         * ieee/ieee_helper.c (ieee_is_finite_*, ieee_is_nan_*,
161         ieee_is_negative_*, ieee_is_normal_*, ieee_copy_sign_*,
162         ieee_unordered_*, ieee_logb_*, ieee_rint_*, ieee_scalb_*,
163         ieee_rem_*, ieee_next_after_*): Remove functions.
164         * gfortran.map (GFORTRAN_1.5): Remove corresponding symbols.
166 2014-10-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
168         PR libgfortran/63460
169         * io/unit.c (init_units): Initialize the DELIM flag to
170         UNSPECIFIED for the STDIN unit so that the flag is
171         correctly set later.
173 2014-10-01  Janne Blomqvist  <jb@gcc.gnu.org>
175         * intrinsics/pack_generic.c (pack_s_internal): Fix
176         -Wmaybe-uninitialized warning.
177         * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
178         (unpack1_'rtype_code`): Likewise.
179         * generated/unpack_*.m4: Regenerated.
181 2014-09-30  Janne Blomqvist  <jb@gcc.gnu.org>
183         * configure.ac (AM_CFLAGS): Add
184         -Werror=implicit-function-declaration.
185         * Makefile.in: Regenerated.
186         * aclocal.m4: Regenerated.
187         * configure: Regenerated.
189 2014-09-25  Tobias Burnus  <burnus@net-b.de>
191         * caf/libcaf.h (_gfortran_caf_co_broadcast): New prototype.
192         * caf/single.c (_gfortran_caf_co_broadcast): New.
194 2014-09-18  Janne Blomqvist  <jb@gcc.gnu.org>
196         PR libfortran/62768
197         * io/inquire.c (inquire_via_unit): Use gfc_unit.filename also when
198         HAVE_TTYNAME{_R} is not defined.
200 2014-09-17  Janne Blomqvist  <jb@gcc.gnu.org>
202         PR libfortran/62768
203         * io/io.h (gfc_unit): Store C string for the filename.
204         * io/close.c (st_close): Use gfc_unit.filename.
205         * io/inquire.c (inquire_via_unit): Likewise.
206         * io/open.c (new_unit): Likewise.
207         (already_open): Likewise, unlink file before freeing filename.
208         * io/unit.c (init_units): Likewise.
209         (close_unit_1): Likewise.
210         (filename_from_unit): Likewise.
211         * io/unix.c (compare_file_filename): Likewise.
212         (find_file0): Likewise.
213         (delete_file): Likewise.
215 2014-09-10  Janne Blomqvist  <jb@gcc.gnu.org>
217         * io/transfer.c (read_block_form): Fix pad status check (found by
218         Thomas Schwinge with -Wlogical-not-parentheses).
220 2014-08-31  Tobias Burnus  <burnus@net-b.de>
222         * caf/libcaf.h (_gfortran_caf_send, _gfortran_caf_get,
223         _gfortran_caf_sendget): Update prototype.
224         * caf/single.c (_gfortran_caf_send, _gfortran_caf_get,
225         _gfortran_caf_sendget): Handle may_require_tmp.
227 2014-08-20  Steven G. Kargl  <kargl@gcc.gnu.org>
229         PR libgfortran/62188
230         * m4/bessel.m4: Avoid indexing off the end of an array.
231         * generated/bessel_r10.c: Regenerated.
232         * generated/bessel_r16.c: Ditto.
233         * generated/bessel_r4.c: Ditto.
234         * generated/bessel_r8.c: Ditto.
236 2014-08-14  Tobias Burnus  <burnus@net-b.de>
238         * caf/libcaf.h (caf_register_t): Update for critical.
239         (_gfortran_caf_critical, _gfortran_caf_end_critical): Remove.
240         (_gfortran_caf_lock, _gfortran_caf_unlock): Add.
241         * caf/single.c (_gfortran_caf_register): Handle locking
242         variables.
243         (_gfortran_caf_sendget): Re-name args for consistency.
244         (_gfortran_caf_lock, _gfortran_caf_unlock): Add.
246 2014-08-04  Jakub Jelinek  <jakub@redhat.com>
248         * runtime/memory.c (xmallocarray): Avoid division for the common case.
250 2014-07-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
252         PR libgfortran/61632
253         * io/format.c (format_error): Avoid invalid string pointer by
254         using the fortran string length values to generate error string.
255         (parse_format): Allocate the null terminator for the format
256         string.
258 2014-07-12  Tobias Burnus  <burnus@net-b.de>
260         * caf/libcaf.h (_gfortran_caf_atomic_define,
261         _gfortran_caf_atomic_ref, _gfortran_caf_atomic_op,
262         _gfortran_caf_atomic_cas): New prototypes.
263         * caf/single.c (_gfortran_caf_atomic_define,
264         _gfortran_caf_atomic_ref, _gfortran_caf_atomic_op,
265         _gfortran_caf_atomic_cas): New functions.
267 2014-07-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
269         * config/fpu-*.h (get_fpu_rounding_mode, set_fpu_rounding_mode,
270         support_fpu_rounding_mode): Clean up, mark unreachable code as such.
272 2014-07-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
274         * libgfortran.h (support_fpu_underflow_control,
275         get_fpu_underflow_mode, set_fpu_underflow_mode): New prototypes.
276         * config/fpu-*.h (support_fpu_underflow_control,
277         get_fpu_underflow_mode, set_fpu_underflow_mode):
278         New functions.
279         * ieee/ieee_arithmetic.F90: Support underflow control.
281 2014-07-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
283         * config/fpu-sysv.h (get_fpu_rounding_mode): Use FP_RN, FP_RP,
284         FP_RM, FP_RZ unconditionally.
285         (set_fpu_rounding_mode): Likewise.
287 2014-07-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
289         * libgfortran.h: Assume __GNUC__.
291 2014-07-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
293         * runtime/stop.c: Use C11 _Noreturn.
294         * libgfortran.h: Use C11 _Noreturn in prototypes.
295         Move REALPART, IMAGPART and COMPLEX_ASSIGN macros...
296         * intrinsics/c99_functions.c: ... here.
298 2014-07-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
300         * config/fpu-387.h, config/fpu-aix.h, config/fpu-sysv.h,
301         config/fpu-glibc.h: Use static assertions.
303 2014-07-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
305         * configure, config.h.in: Regenerate.
306         * config/fpu-sysv.h: Include <assert.h>.
308 2014-07-02  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
310         * config/fpu-glibc.h: Fix comment about FE_DENORMAL.
312 2014-07-02  Uros Bizjak  <ubizjak@gmail.com>
314         * configure.host (ieee_flags): Add -mieee for alpha*.
316         * config/fpu-glibc.h (support_fpu_rounding_mode): Correctly handle
317         GFC_FPE_UPWARD, GFC_FPE_DOWNWARD and GFC_FPE_TOWARDZERO.
318         * config/fpu-aix.h (support_fpu_rounding_mode): Ditto.
320 2014-06-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
322         * config/fpu-387.h (my_fenv_t): Amend structure so it also works
323         on mingw32.
325 2014-06-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
327         PR libgfortran/61640
328         * io/list_read.c (next_char_internal): Adjust the read length to
329         a single wide character. (eat_spaces): Add missing paren.
330         * io/unix.c (mem_read4): Use the correct mem_alloc function for
331         wide character internal reads.
333 2014-06-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
335         PR fortran/29383
336         * configure.host: Add checks for IEEE support, rework priorities.
337         * configure.ac: Define IEEE_SUPPORT, check for fpsetsticky and
338         fpresetsticky.
339         * configure: Regenerate.
340         * Makefile.am: Build new ieee files, install IEEE_* modules.
341         * Makefile.in: Regenerate.
342         * gfortran.map (GFORTRAN_1.6): Add new symbols.
343         * libgfortran.h (get_fpu_trap_exceptions, set_fpu_trap_exceptions,
344         support_fpu_trap, set_fpu_except_flags, support_fpu_flag,
345         support_fpu_rounding_mode, get_fpu_state, set_fpu_state): New
346         prototypes.
347         * config/fpu-*.h (get_fpu_trap_exceptions,
348         set_fpu_trap_exceptions, support_fpu_trap, set_fpu_except_flags,
349         support_fpu_flag, support_fpu_rounding_mode, get_fpu_state,
350         set_fpu_state): New functions.
351         * ieee/ieee_features.F90: New file.
352         * ieee/ieee_exceptions.F90: New file.
353         * ieee/ieee_arithmetic.F90: New file.
354         * ieee/ieee_helper.c: New file.
356 2014-06-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
358         PR libgfortran/61499
359         * io/list_read.c (eat_spaces): Use a 'for' loop instead of
360         'while' loop to skip the loop if there are no bytes left in the
361         string. Only seek if actual spaces can be skipped.
363 2014-06-25  Tobias Burnus  <burnus@net-b.de>
365         * caf/single.c (assign_char4_from_char1, assign_char1_from_char4,
366         convert_type): New static functions.
367         (_gfortran_caf_get, _gfortran_caf_send): Use them.
369 2014-06-19  Tobias Burnus  <burnus@net-b.de>
371         * caf/single.c (_gfortran_caf_co_sum, _gfortran_caf_co_max,
372         _gfortran_caf_co_min): Fix stat setting.
374 2014-06-17  Tobias Burnus  <burnus@net-b.de>
376         * caf/libcaf.h (gfc_descriptor_t): New typedef.
377         (caf_vector_t): Update.
378         (_gfortran_caf_co_sum, _gfortran_caf_co_max, _gfortran_caf_co_min):
379         Remove vector-subscript argument.
380         (_gfortran_caf_co_send, _gfortran_caf_co_get,
381         _gfortran_caf_co_sendget): New.
382         * caf/single.c (_gfortran_caf_co_sum, _gfortran_caf_co_max,
383         _gfortran_caf_co_min): Remove vector-subscript argument.
384         (_gfortran_caf_co_send, _gfortran_caf_co_get,
385         _gfortran_caf_co_sendget): New.
387 2014-06-17  Janne Blomqvist  <jb@gcc.gnu.org>
389         * libgfortran.h (xmallocarray): New prototype.
390         * runtime/memory.c (xmallocarray): New function.
391         (xcalloc): Check for nonzero separately instead of multiplying.
392         * generated/*.c: Regenerated.
393         * intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
394         xmalloc.
395         * intrinsics/eoshift0.c (eoshift0): Likewise.
396         * intrinsics/eoshift2.c (eoshift2): Likewise.
397         * intrinsics/pack_generic.c (pack_internal): Likewise.
398         (pack_s_internal): Likewise.
399         * intrinsics/reshape_generic.c (reshape_internal): Likewise.
400         * intrinsics/spread_generic.c (spread_internal): Likewise.
401         (spread_internal_scalar): Likewise.
402         * intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
403         (string_minmax): Likewise.
404         * intrinsics/transpose_generic.c (transpose_internal): Likewise.
405         * intrinsics/unpack_generic.c (unpack_internal): Likewise.
406         * io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
407         * io/transfer.c (st_set_nml_var): Call xmallocarray instead of
408         xmalloc.
409         * io/unit.c (get_internal_unit): Likewise.
410         (filename_from_unit): Don't cast xmalloc return value.
411         * io/write.c (nml_write_obj): Likewise, formatting.
412         * m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
413         instead of xmalloc.
414         (besse_yn_r'rtype_kind`): Likewise.
415         * m4/cshift1.m4 (cshift1): Likewise.
416         * m4/eoshift1.m4 (eoshift1): Likewise.
417         * m4/eoshift3.m4 (eoshift3): Likewise.
418         * m4/iforeach.m4: Likewise.
419         * m4/ifunction.m4: Likewise.
420         * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
421         Likewise.
422         * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
423         * m4/matmul.m4 (matmul_'rtype_code`): Likewise.
424         * m4/matmull.m4 (matmul_'rtype_code`): Likewise.
425         * m4/pack.m4 (pack_'rtype_code`): Likewise.
426         * m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
427         * m4/shape.m4 (shape_'rtype_kind`): Likewise.
428         * m4/spread.m4 (spread_'rtype_code`): Likewise.
429         (spread_scalar_'rtype_code`): Likewise.
430         * m4/transpose.m4 (transpose_'rtype_code`): Likewise.
431         * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
432         (unpack1_'rtype_code`): Likewise.
433         * runtime/convert_char.c (convert_char1_to_char4): Likewise.
434         (convert_char4_to_char1): Simplify.
435         * runtime/environ.c (init_unformatted): Call xmallocarray instead
436         of xmalloc.
437         * runtime/in_pack_generic.c (internal_pack): Likewise.
439 2014-06-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
441         PR libfortran/60468
442         * configure.ac: Include <math.h> when checking for fp_except_t
443         and fp_rnd_t types.
444         * configure: Regenerate.
446 2014-06-08  Janne Blomqvist  <jb@gcc.gnu.org>
448         PR libfortran/56981
449         * io/unix.h (struct stream_vtable): Add new member function,
450         markeor.
451         (smarkeor): New inline function.
452         (flush_if_unbuffered): Remove prototype.
453         * io/unix.c (raw_markeor): New function.
454         (raw_vtable): Initialize markeor member.
455         (buf_markeor): New function.
456         (buf_vtable): Initialize markeor member.
457         (mem_vtable): Likewise.
458         (mem4_vtable): Likewise.
459         (flush_if_unbuffered): Remove function.
460         * io/transfer.c (next_record): Call smarkeor instead of
461         flush_if_unbuffered.
463 2014-05-27  Uros Bizjak  <ubizjak@gmail.com>
465         * intrinsics/getcwd.c: Include stdlib.h.
467 2014-05-26  Janne Blomqvist  <jb@gcc.gnu.org>
469         * libgfortran.h (xrealloc): New prototype.
470         * runtime/memory.c (xrealloc): New function.
471         * io/fbuf.c (fbuf_alloc): Use xrealloc.
472         * io/list_read.c (push_char_default): Likewise.
473         (push_char4): Likewise.
475 2014-05-26  Janne Blomqvist  <jb@gcc.gnu.org>
477         PR libfortran/61310
478         * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf
479         instead of strftime.
480         (fdate): Use gf_ctime.
481         (fdate_sub): Likewise.
482         (ctime): Likewise.
483         (ctime_sub): Likewise.
485 2014-05-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
487         PR libgfortran/55117
488         * io/list_read.c (extended_look_ahead): New helper function to
489         scan the namelist name and look for matches with the new '+'
490         extended type parent indicator.  (str_comp_extended): New
491         helper function to compare the namelist name with the varname
492         namelist. (find_nml_name): Use the new helper functions to match
493         the extended type varnames.
495 2014-05-23  Jerry DeLisle  <jvdelisle@gcc.gnu>
497         PR libfortran/61173
498         * io/list_read.c (eat_spaces): If the next character pointed to
499         is a space, don't seek, must be at the end.
501 2014-05-23  Hans-Peter Nilsson  <hp@axis.com>
503         * configure.ac [with_newlib] (HAVE_STRNLEN, HAVE_STRNDUP): Define.
504         * configure: Regenerate.
506 2014-05-23  Janne Blomqvist  <jb@gcc.gnu.org>
508         PR libfortran/60324
509         * runtime/string.c: Include stdlib.h.
511 2014-05-22  Janne Blomqvist  <jb@gcc.gnu.org>
513         PR libfortran/60324
514         * config.h.in: Regenerated.
515         * configure: Regenerated.
516         * configure.ac (AC_CHECK_FUNCS_ONCE): Check for strnlen and
517         strndup.
518         * libgfortran.h (fc_strdup): New prototype.
519         * runtime/string.c (strnlen): New fallback function.
520         (strndup): New fallback function.
521         (fc_strdup): New function.
522         * io/close.c (st_close): Use fc_strdup.
523         * io/open.c (new_unit): Likewise.
524         (already_open): Likewise.
525         * io/unit.c (filename_from_unit): Likewise.
526         * io/unix.c (unpack_filename): Remove function.
527         (regular_file): Rename to regular_file2, add path argument.
528         (regular_file): New function calling regular_file2.
529         (compare_file_filename): Use fc_strdup.
530         (find_file): Likewise.
531         (delete_file): Likewise.
532         (file_exists): Likewise.
533         (file_size): Likewise.
534         (inquire_sequential): Likewise.
535         (inquire_direct): Likewise.
536         (inquire_formatted): Likewise.
537         (inquire_access): Likewise.
538         * io/unix.h (unpack_filename): Remove prototype.
539         * runtime/main.c (please_free_exe_path_when_done): Change type to
540         bool.
541         (store_exe_path): Use malloced buffer, grow as needed.
543 2014-05-17  Jerry DeLisle  <jvdelisle@gcc.gnu>
545         PR libfortran/52539
546         * io/io.h (gfc_unit): New function pointers *next_char_fn_ptr
547         and *push_char_fn_ptr.
548         *io/list_read.c (next_char): Create macro with this name to call
549         the new function pointer. Split the original next_char function
550         into three new functions. (next_char_default, next_char_internal,
551         next_char_utf8): New functions. (push_char): Create macro with
552         this name to call new function pointer. Split the original
553         push_char into three new functions. (push_char_default,
554         push_char_internal, push_char4): New functions. (set_workers):
555         New function to initilize the function pointers depending on the
556         type of IO to be performed. (list_formatted_read_scalar): Use
557         set_workers function. (finish_list_read): Likewise.
558         (namelist_read): Likewise.
559         (nml_get_obj_data): Use push_char_default.
561 2014-05-16  Janne Blomqvist  <jb@gcc.gnu.org>
563         PR libfortran/61187
564         * io/unix.c (raw_close): Check if s->fd is -1.
565         (fd_to_stream): Check return value of fstat(), handle error.
567 2014-05-12  Janne Blomqvist  <jb@gcc.gnu.org>
569         PR libfortran/61035
570         * intrinsics/getcwd.c (getcwd_i4_sub): Avoid potentially large
571         stack allocation, avoid extra copying in the common case.
573 2014-05-12  Janne Blomqvist  <jb@gcc.gnu.org>
575         * configure.ac (AM_CFLAGS): Use -std=gnu11.
576         (CFLAGS): Likewise.
577         * configure: Regenerated.
579 2014-05-11  Tobias Burnus  <burnus@net-b.de>
581         * caf/libcaf.h (_gfortran_caf_num_images): Change type of
582         second argument to int.
583         * caf/mpi.c (_gfortran_caf_num_images): Ditto.
584         * caf/single.c (_gfortran_caf_num_images): Ditto.
586 2014-05-08  Tobias Burnus  <burnus@net-b.de>
588         * caf/libcaf.h (caf_vector_t, _gfortran_caf_co_sum,
589         _gfortran_caf_co_min, _gfortran_caf_co_max): Declare
590         * caf/single.c
592 2014-05-06  Jerry DeLisle  <jvdelisle@gcc.gnu>
594         PR libfortran/61049
595         * io/list_read.c (list_formatted_read_scalar): Use eat_separator
596         and delete extraneous code.
598 2014-04-30  Tobias Burnus  <burnus@net-b.de>
600         * caf/libcaf.h (_gfortran_caf_this_image, _gfortran_caf_num_images):
601         New prototypes.
602         (_gfortran_caf_init): Change prototype.
603         (mpi_token_t): New typedef.
604         (TOKEN): New define.
605         * caf/mpi.c (_gfortran_caf_this_image, _gfortran_caf_num_images):
606         New functions.
607         (_gfortran_caf_init): Update.
608         (_gfortran_caf_finalize, _gfortran_caf_register,
609         _gfortran_caf_deregister): Use mpi_token_t.
610         * caf/single.c (_gfortran_caf_this_image, _gfortran_caf_num_images):
611         New functions.
612         (_gfortran_caf_init): Update.
613         (_gfortran_caf_finalize, _gfortran_caf_register,
614         _gfortran_caf_deregister): Use mpi_token_t, simplify.
616 2014-04-26  Jerry DeLisle  <jvdelisle@gcc.gnu>
618         PR libfortran/52539
619         * io/list_read.c: Add uchar typedef. (push_char4): New function
620         to save kind=4 character. (next_char_utf8): New function to read
621         a single UTF-8 encoded character value. (read_chracter): Update
622         to use the new functions for reading UTF-8 strings.
623         (list_formatted_read_scalar): Update to handle list directed
624         reads of UTF-8 strings. (nml_read_obj): Likewise update for
625         UTF-8 strings in namelists.
626         * io/write.c (nml_write_obj): Add kind=4 character support for
627         namelist writes.
629 2014-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
631         * configure.ac: Quote usage of ac_cv_func_clock_gettime in if test.
632         * configure: Regenerate.
634 2014-04-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
636         * config/fpu-387.h [__sun__ && __svr4__]: Remove SSE execution
637         check.
639 2014-04-11  Jerry DeLisle  <jvdelisle@gcc.gnu>
641         PR libfortran/60810
642         io/unit.c (is_trim_ok): If internal unit is array, do not trim.
644 2014-03-21  Jerry DeLisle  <jvdelisle@gcc.gnu>
646         PR libfortran/60148
647         * io/transfer.c (data_transfer_init): If std= was specified, set
648         delim status to DELIM_NONE of no other was specified.
650 2014-03-18  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
652         * configure.ac: Check for presence of fcntl.
653         * configure: Regenerate.
654         * config.h.in: Regenerate.
655         * io/unix.c (set_close_on_exec): Check for HAVE_FCNTL.
657 2014-03-17  Jerry DeLisle  <jvdelisle@gcc.gnu>
659         PR libfortran/48600
660         * io/list_read.c (list_formatted_read_scalar): Do not use
661         eat_separator. Explicitly set the comma and end-of-line flags.
662         Check for END condition from finish_separator.
664 2014-03-15  Jerry DeLisle  <jvdelisle@gcc.gnu>
666         PR libfortran/58324
667         * io/list_read.c (finish_list_read): Read one character to check
668         for the end of the file.  If it is the end, then issue the file
669         end error message.  If not, use eat_line to reach the end
670         without giving error.  The next attempt to read will then
671         issue the error as described above.
673 2014-03-12  Jerry DeLisle  <jvdelisle@gcc.gnu>
675         PR libfortran/38199
676         * io/read.c (read_decimal): Quickly skip spaces to avoid calls
677         to next_char.
678         * io/unit.c (is_trim_ok): New helper function to check various
679         conditions to see if its OK to trim the internal unit string.
680         (get_internal_unit): Use LEN_TRIM to shorten selected internal
681         unit strings for optimizing READ. Enable this optimization for
682         formatted READ.
683         * io/list_read.c (finish_list_read): Don't call eat_line for
684         internal units.
686 2014-03-08  Jerry DeLisle  <jvdelisle@gcc.gnu>
688         PR libfortran/38199
689         * io/list_read.c (next_char): Mark unlikely error checks.
690         (eat_spaces): For character array reading, skip ahead over
691         spaces rather than call next_char multiple times.
693 2014-03-08  Tobias Burnus  <burnus@net-b.de>
695         * libgfortran.h (unlikely, likely): Add usage comment.
697 2014-03-08  Dominique d'Humieres  <dominiq@lps.ens.fr>
699         PR libgfortran/60128
700         * io/write_float.def (output_float): Remove unused variable
701         nzero_real. Replace a double space with a single one.
702         (determine_en_precision): Fix wrong handling of the EN format.
704 2014-03-03  Jerry DeLisle  <jvdelisle@gcc.gnu>
706         PR libfortran/60148
707         * io/inquire.c (inquire_via_unit): In the case of
708         DELIM_UNSPECIFIED set inquire return string to "NONE".
709         * io/list_read.c (read_character): In the case of DELIM_NONE and
710         namelists, complete the character read using the namelist
711         variable length.
712         * io/open.c (new_unit): Don't set delim status to none if not
713         specified so that DELIM_UNSPECIFIED can be used later.
714         * io/transfer.c (data_transfer_init): For namelist I/O, if the
715         unit delim status is unspecified set the current status to quote.
716         Otherwise, set current status to the unit status.
717         * io/unit.c (get_internel_unit, init_unit): Remember to set
718         flags_delim initially to DELIM_UNSPECIFIED so defaults come out
719         correctly.
720         * io/write.c (write_character): Add a new function argument
721         "mode" to signify that raw output is to be used vs output with
722         delimiters. If the mode is set to DELIM (1) proceed with
723         delimiters. (list_formatted_write_scalar): Write the separator
724         only if a delimiter was previously specified. Update the call to
725         write_character with the mode argument given.
726         (namelist_write_newline): Use the mode argument. (nml_write_obj):
727         Use the mode argument. Remove use of tmp_delim. Write the
728         semi-colon or comma correctly only when needed with using
729         delimiters. Cleanup whitespace.
730         (namelist_write): If delim is not specified in namelist I/O,
731         default to using quotes. Get rid of the tmp_delim variable and
732         use the new mode argument in write_character.
734 2014-02-21  Tobias Burnus  <burnus@net-b.de>
736         PR fortran/60286
737         * libgfortran/io/inquire.c (yes, no): New static const char vars.
738         (inquire_via_unit): Use them. Use OPEN mode instead of using
739         POSIX's access to query about write=, read= and readwrite=.
741 2014-01-20  Jerry DeLisle  <jvdelisle@gcc.gnu>
742             Dominique d'Humieres  <dominiq@lps.ens.fr>
744         * io/write_float.def (output_float): Remove inadvertent test
745         code from previous patch.
747 2014-01-19  Jerry DeLisle  <jvdelisle@gcc.gnu>
748             Dominique d'Humieres  <dominiq@lps.ens.fr>
750         PR libfortran/59771
751         PR libfortran/59774
752         PR libfortran/59836
753         * io/write_float.def (output_float): Fix wrong handling of the
754         Fw.0 format.
755         (output_float_FMT_G_): Fixes rounding issues with -m32.
757 2014-01-11  Jerry DeLisle  <jvdelisle@gcc.gnu>
758             Dominique d'Humieres  <dominiq@lps.ens.fr>
759             Steven G. Kargl  <kargl@gcc.gnu.org>
761         PR libfortran/59700
762         PR libfortran/59764
763         * io/io.h (struct st_parameter_dt): Assign expanded_read flag to
764         unused bit. Define new variable line_buffer_pos.
765         * io/list_read.c (free_saved, next_char, l_push_char,
766         read_logical, read_real): Replace use of item_count with
767         line_buffer_pos for line_buffer look ahead.
768         (read_logical, read_integer, parse_real, read_real, check_type):
769         Adjust location of free_line to after generating error messages
770         to retain the correct item count for the message.
772 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
774         Update copyright years
776 Copyright (C) 2014 Free Software Foundation, Inc.
778 Copying and distribution of this file, with or without modification,
779 are permitted in any medium without royalty provided the copyright
780 notice and this notice are preserved.