1 2014-06-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3 * config/fpu-387.h (my_fenv_t): Amend structure so it also works
6 2014-06-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
9 * io/list_read.c (next_char_internal): Adjust the read length to
10 a single wide character. (eat_spaces): Add missing paren.
11 * io/unix.c (mem_read4): Use the correct mem_alloc function for
12 wide character internal reads.
14 2014-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
17 * configure.host: Add checks for IEEE support, rework priorities.
18 * configure.ac: Define IEEE_SUPPORT, check for fpsetsticky and
20 * configure: Regenerate.
21 * Makefile.am: Build new ieee files, install IEEE_* modules.
22 * Makefile.in: Regenerate.
23 * gfortran.map (GFORTRAN_1.6): Add new symbols.
24 * libgfortran.h (get_fpu_trap_exceptions, set_fpu_trap_exceptions,
25 support_fpu_trap, set_fpu_except_flags, support_fpu_flag,
26 support_fpu_rounding_mode, get_fpu_state, set_fpu_state): New
28 * config/fpu-*.h (get_fpu_trap_exceptions,
29 set_fpu_trap_exceptions, support_fpu_trap, set_fpu_except_flags,
30 support_fpu_flag, support_fpu_rounding_mode, get_fpu_state,
31 set_fpu_state): New functions.
32 * ieee/ieee_features.F90: New file.
33 * ieee/ieee_exceptions.F90: New file.
34 * ieee/ieee_arithmetic.F90: New file.
35 * ieee/ieee_helper.c: New file.
37 2014-06-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
40 * io/list_read.c (eat_spaces): Use a 'for' loop instead of
41 'while' loop to skip the loop if there are no bytes left in the
42 string. Only seek if actual spaces can be skipped.
44 2014-06-25 Tobias Burnus <burnus@net-b.de>
46 * caf/single.c (assign_char4_from_char1, assign_char1_from_char4,
47 convert_type): New static functions.
48 (_gfortran_caf_get, _gfortran_caf_send): Use them.
50 2014-06-19 Tobias Burnus <burnus@net-b.de>
52 * caf/single.c (_gfortran_caf_co_sum, _gfortran_caf_co_max,
53 _gfortran_caf_co_min): Fix stat setting.
55 2014-06-17 Tobias Burnus <burnus@net-b.de>
57 * caf/libcaf.h (gfc_descriptor_t): New typedef.
58 (caf_vector_t): Update.
59 (_gfortran_caf_co_sum, _gfortran_caf_co_max, _gfortran_caf_co_min):
60 Remove vector-subscript argument.
61 (_gfortran_caf_co_send, _gfortran_caf_co_get,
62 _gfortran_caf_co_sendget): New.
63 * caf/single.c (_gfortran_caf_co_sum, _gfortran_caf_co_max,
64 _gfortran_caf_co_min): Remove vector-subscript argument.
65 (_gfortran_caf_co_send, _gfortran_caf_co_get,
66 _gfortran_caf_co_sendget): New.
68 2014-06-17 Janne Blomqvist <jb@gcc.gnu.org>
70 * libgfortran.h (xmallocarray): New prototype.
71 * runtime/memory.c (xmallocarray): New function.
72 (xcalloc): Check for nonzero separately instead of multiplying.
73 * generated/*.c: Regenerated.
74 * intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
76 * intrinsics/eoshift0.c (eoshift0): Likewise.
77 * intrinsics/eoshift2.c (eoshift2): Likewise.
78 * intrinsics/pack_generic.c (pack_internal): Likewise.
79 (pack_s_internal): Likewise.
80 * intrinsics/reshape_generic.c (reshape_internal): Likewise.
81 * intrinsics/spread_generic.c (spread_internal): Likewise.
82 (spread_internal_scalar): Likewise.
83 * intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
84 (string_minmax): Likewise.
85 * intrinsics/transpose_generic.c (transpose_internal): Likewise.
86 * intrinsics/unpack_generic.c (unpack_internal): Likewise.
87 * io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
88 * io/transfer.c (st_set_nml_var): Call xmallocarray instead of
90 * io/unit.c (get_internal_unit): Likewise.
91 (filename_from_unit): Don't cast xmalloc return value.
92 * io/write.c (nml_write_obj): Likewise, formatting.
93 * m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
95 (besse_yn_r'rtype_kind`): Likewise.
96 * m4/cshift1.m4 (cshift1): Likewise.
97 * m4/eoshift1.m4 (eoshift1): Likewise.
98 * m4/eoshift3.m4 (eoshift3): Likewise.
99 * m4/iforeach.m4: Likewise.
100 * m4/ifunction.m4: Likewise.
101 * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
103 * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
104 * m4/matmul.m4 (matmul_'rtype_code`): Likewise.
105 * m4/matmull.m4 (matmul_'rtype_code`): Likewise.
106 * m4/pack.m4 (pack_'rtype_code`): Likewise.
107 * m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
108 * m4/shape.m4 (shape_'rtype_kind`): Likewise.
109 * m4/spread.m4 (spread_'rtype_code`): Likewise.
110 (spread_scalar_'rtype_code`): Likewise.
111 * m4/transpose.m4 (transpose_'rtype_code`): Likewise.
112 * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
113 (unpack1_'rtype_code`): Likewise.
114 * runtime/convert_char.c (convert_char1_to_char4): Likewise.
115 (convert_char4_to_char1): Simplify.
116 * runtime/environ.c (init_unformatted): Call xmallocarray instead
118 * runtime/in_pack_generic.c (internal_pack): Likewise.
120 2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
123 * configure.ac: Include <math.h> when checking for fp_except_t
125 * configure: Regenerate.
127 2014-06-08 Janne Blomqvist <jb@gcc.gnu.org>
130 * io/unix.h (struct stream_vtable): Add new member function,
132 (smarkeor): New inline function.
133 (flush_if_unbuffered): Remove prototype.
134 * io/unix.c (raw_markeor): New function.
135 (raw_vtable): Initialize markeor member.
136 (buf_markeor): New function.
137 (buf_vtable): Initialize markeor member.
138 (mem_vtable): Likewise.
139 (mem4_vtable): Likewise.
140 (flush_if_unbuffered): Remove function.
141 * io/transfer.c (next_record): Call smarkeor instead of
144 2014-05-27 Uros Bizjak <ubizjak@gmail.com>
146 * intrinsics/getcwd.c: Include stdlib.h.
148 2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
150 * libgfortran.h (xrealloc): New prototype.
151 * runtime/memory.c (xrealloc): New function.
152 * io/fbuf.c (fbuf_alloc): Use xrealloc.
153 * io/list_read.c (push_char_default): Likewise.
154 (push_char4): Likewise.
156 2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
159 * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf
161 (fdate): Use gf_ctime.
162 (fdate_sub): Likewise.
164 (ctime_sub): Likewise.
166 2014-05-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
169 * io/list_read.c (extended_look_ahead): New helper function to
170 scan the namelist name and look for matches with the new '+'
171 extended type parent indicator. (str_comp_extended): New
172 helper function to compare the namelist name with the varname
173 namelist. (find_nml_name): Use the new helper functions to match
174 the extended type varnames.
176 2014-05-23 Jerry DeLisle <jvdelisle@gcc.gnu>
179 * io/list_read.c (eat_spaces): If the next character pointed to
180 is a space, don't seek, must be at the end.
182 2014-05-23 Hans-Peter Nilsson <hp@axis.com>
184 * configure.ac [with_newlib] (HAVE_STRNLEN, HAVE_STRNDUP): Define.
185 * configure: Regenerate.
187 2014-05-23 Janne Blomqvist <jb@gcc.gnu.org>
190 * runtime/string.c: Include stdlib.h.
192 2014-05-22 Janne Blomqvist <jb@gcc.gnu.org>
195 * config.h.in: Regenerated.
196 * configure: Regenerated.
197 * configure.ac (AC_CHECK_FUNCS_ONCE): Check for strnlen and
199 * libgfortran.h (fc_strdup): New prototype.
200 * runtime/string.c (strnlen): New fallback function.
201 (strndup): New fallback function.
202 (fc_strdup): New function.
203 * io/close.c (st_close): Use fc_strdup.
204 * io/open.c (new_unit): Likewise.
205 (already_open): Likewise.
206 * io/unit.c (filename_from_unit): Likewise.
207 * io/unix.c (unpack_filename): Remove function.
208 (regular_file): Rename to regular_file2, add path argument.
209 (regular_file): New function calling regular_file2.
210 (compare_file_filename): Use fc_strdup.
211 (find_file): Likewise.
212 (delete_file): Likewise.
213 (file_exists): Likewise.
214 (file_size): Likewise.
215 (inquire_sequential): Likewise.
216 (inquire_direct): Likewise.
217 (inquire_formatted): Likewise.
218 (inquire_access): Likewise.
219 * io/unix.h (unpack_filename): Remove prototype.
220 * runtime/main.c (please_free_exe_path_when_done): Change type to
222 (store_exe_path): Use malloced buffer, grow as needed.
224 2014-05-17 Jerry DeLisle <jvdelisle@gcc.gnu>
227 * io/io.h (gfc_unit): New function pointers *next_char_fn_ptr
228 and *push_char_fn_ptr.
229 *io/list_read.c (next_char): Create macro with this name to call
230 the new function pointer. Split the original next_char function
231 into three new functions. (next_char_default, next_char_internal,
232 next_char_utf8): New functions. (push_char): Create macro with
233 this name to call new function pointer. Split the original
234 push_char into three new functions. (push_char_default,
235 push_char_internal, push_char4): New functions. (set_workers):
236 New function to initilize the function pointers depending on the
237 type of IO to be performed. (list_formatted_read_scalar): Use
238 set_workers function. (finish_list_read): Likewise.
239 (namelist_read): Likewise.
240 (nml_get_obj_data): Use push_char_default.
242 2014-05-16 Janne Blomqvist <jb@gcc.gnu.org>
245 * io/unix.c (raw_close): Check if s->fd is -1.
246 (fd_to_stream): Check return value of fstat(), handle error.
248 2014-05-12 Janne Blomqvist <jb@gcc.gnu.org>
251 * intrinsics/getcwd.c (getcwd_i4_sub): Avoid potentially large
252 stack allocation, avoid extra copying in the common case.
254 2014-05-12 Janne Blomqvist <jb@gcc.gnu.org>
256 * configure.ac (AM_CFLAGS): Use -std=gnu11.
258 * configure: Regenerated.
260 2014-05-11 Tobias Burnus <burnus@net-b.de>
262 * caf/libcaf.h (_gfortran_caf_num_images): Change type of
263 second argument to int.
264 * caf/mpi.c (_gfortran_caf_num_images): Ditto.
265 * caf/single.c (_gfortran_caf_num_images): Ditto.
267 2014-05-08 Tobias Burnus <burnus@net-b.de>
269 * caf/libcaf.h (caf_vector_t, _gfortran_caf_co_sum,
270 _gfortran_caf_co_min, _gfortran_caf_co_max): Declare
273 2014-05-06 Jerry DeLisle <jvdelisle@gcc.gnu>
276 * io/list_read.c (list_formatted_read_scalar): Use eat_separator
277 and delete extraneous code.
279 2014-04-30 Tobias Burnus <burnus@net-b.de>
281 * caf/libcaf.h (_gfortran_caf_this_image, _gfortran_caf_num_images):
283 (_gfortran_caf_init): Change prototype.
284 (mpi_token_t): New typedef.
286 * caf/mpi.c (_gfortran_caf_this_image, _gfortran_caf_num_images):
288 (_gfortran_caf_init): Update.
289 (_gfortran_caf_finalize, _gfortran_caf_register,
290 _gfortran_caf_deregister): Use mpi_token_t.
291 * caf/single.c (_gfortran_caf_this_image, _gfortran_caf_num_images):
293 (_gfortran_caf_init): Update.
294 (_gfortran_caf_finalize, _gfortran_caf_register,
295 _gfortran_caf_deregister): Use mpi_token_t, simplify.
297 2014-04-26 Jerry DeLisle <jvdelisle@gcc.gnu>
300 * io/list_read.c: Add uchar typedef. (push_char4): New function
301 to save kind=4 character. (next_char_utf8): New function to read
302 a single UTF-8 encoded character value. (read_chracter): Update
303 to use the new functions for reading UTF-8 strings.
304 (list_formatted_read_scalar): Update to handle list directed
305 reads of UTF-8 strings. (nml_read_obj): Likewise update for
306 UTF-8 strings in namelists.
307 * io/write.c (nml_write_obj): Add kind=4 character support for
310 2014-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
312 * configure.ac: Quote usage of ac_cv_func_clock_gettime in if test.
313 * configure: Regenerate.
315 2014-04-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
317 * config/fpu-387.h [__sun__ && __svr4__]: Remove SSE execution
320 2014-04-11 Jerry DeLisle <jvdelisle@gcc.gnu>
323 io/unit.c (is_trim_ok): If internal unit is array, do not trim.
325 2014-03-21 Jerry DeLisle <jvdelisle@gcc.gnu>
328 * io/transfer.c (data_transfer_init): If std= was specified, set
329 delim status to DELIM_NONE of no other was specified.
331 2014-03-18 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
333 * configure.ac: Check for presence of fcntl.
334 * configure: Regenerate.
335 * config.h.in: Regenerate.
336 * io/unix.c (set_close_on_exec): Check for HAVE_FCNTL.
338 2014-03-17 Jerry DeLisle <jvdelisle@gcc.gnu>
341 * io/list_read.c (list_formatted_read_scalar): Do not use
342 eat_separator. Explicitly set the comma and end-of-line flags.
343 Check for END condition from finish_separator.
345 2014-03-15 Jerry DeLisle <jvdelisle@gcc.gnu>
348 * io/list_read.c (finish_list_read): Read one character to check
349 for the end of the file. If it is the end, then issue the file
350 end error message. If not, use eat_line to reach the end
351 without giving error. The next attempt to read will then
352 issue the error as described above.
354 2014-03-12 Jerry DeLisle <jvdelisle@gcc.gnu>
357 * io/read.c (read_decimal): Quickly skip spaces to avoid calls
359 * io/unit.c (is_trim_ok): New helper function to check various
360 conditions to see if its OK to trim the internal unit string.
361 (get_internal_unit): Use LEN_TRIM to shorten selected internal
362 unit strings for optimizing READ. Enable this optimization for
364 * io/list_read.c (finish_list_read): Don't call eat_line for
367 2014-03-08 Jerry DeLisle <jvdelisle@gcc.gnu>
370 * io/list_read.c (next_char): Mark unlikely error checks.
371 (eat_spaces): For character array reading, skip ahead over
372 spaces rather than call next_char multiple times.
374 2014-03-08 Tobias Burnus <burnus@net-b.de>
376 * libgfortran.h (unlikely, likely): Add usage comment.
378 2014-03-08 Dominique d'Humieres <dominiq@lps.ens.fr>
381 * io/write_float.def (output_float): Remove unused variable
382 nzero_real. Replace a double space with a single one.
383 (determine_en_precision): Fix wrong handling of the EN format.
385 2014-03-03 Jerry DeLisle <jvdelisle@gcc.gnu>
388 * io/inquire.c (inquire_via_unit): In the case of
389 DELIM_UNSPECIFIED set inquire return string to "NONE".
390 * io/list_read.c (read_character): In the case of DELIM_NONE and
391 namelists, complete the character read using the namelist
393 * io/open.c (new_unit): Don't set delim status to none if not
394 specified so that DELIM_UNSPECIFIED can be used later.
395 * io/transfer.c (data_transfer_init): For namelist I/O, if the
396 unit delim status is unspecified set the current status to quote.
397 Otherwise, set current status to the unit status.
398 * io/unit.c (get_internel_unit, init_unit): Remember to set
399 flags_delim initially to DELIM_UNSPECIFIED so defaults come out
401 * io/write.c (write_character): Add a new function argument
402 "mode" to signify that raw output is to be used vs output with
403 delimiters. If the mode is set to DELIM (1) proceed with
404 delimiters. (list_formatted_write_scalar): Write the separator
405 only if a delimiter was previously specified. Update the call to
406 write_character with the mode argument given.
407 (namelist_write_newline): Use the mode argument. (nml_write_obj):
408 Use the mode argument. Remove use of tmp_delim. Write the
409 semi-colon or comma correctly only when needed with using
410 delimiters. Cleanup whitespace.
411 (namelist_write): If delim is not specified in namelist I/O,
412 default to using quotes. Get rid of the tmp_delim variable and
413 use the new mode argument in write_character.
415 2014-02-21 Tobias Burnus <burnus@net-b.de>
418 * libgfortran/io/inquire.c (yes, no): New static const char vars.
419 (inquire_via_unit): Use them. Use OPEN mode instead of using
420 POSIX's access to query about write=, read= and readwrite=.
422 2014-01-20 Jerry DeLisle <jvdelisle@gcc.gnu>
423 Dominique d'Humieres <dominiq@lps.ens.fr>
425 * io/write_float.def (output_float): Remove inadvertent test
426 code from previous patch.
428 2014-01-19 Jerry DeLisle <jvdelisle@gcc.gnu>
429 Dominique d'Humieres <dominiq@lps.ens.fr>
434 * io/write_float.def (output_float): Fix wrong handling of the
436 (output_float_FMT_G_): Fixes rounding issues with -m32.
438 2014-01-11 Jerry DeLisle <jvdelisle@gcc.gnu>
439 Dominique d'Humieres <dominiq@lps.ens.fr>
440 Steven G. Kargl <kargl@gcc.gnu.org>
444 * io/io.h (struct st_parameter_dt): Assign expanded_read flag to
445 unused bit. Define new variable line_buffer_pos.
446 * io/list_read.c (free_saved, next_char, l_push_char,
447 read_logical, read_real): Replace use of item_count with
448 line_buffer_pos for line_buffer look ahead.
449 (read_logical, read_integer, parse_real, read_real, check_type):
450 Adjust location of free_line to after generating error messages
451 to retain the correct item count for the message.
453 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
455 Update copyright years
457 Copyright (C) 2013-2014 Free Software Foundation, Inc.
459 Copying and distribution of this file, with or without modification,
460 are permitted in any medium without royalty provided the copyright
461 notice and this notice are preserved.