Restore Solaris/SPARC bootstrap
[official-gcc.git] / libgfortran / ChangeLog
blob9f03a5ce36813a813e50f07f66bbe3c5acafdb5a
1 2014-07-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3         * configure, config.h.in: Regenerate.
4         * config/fpu-sysv.h: Include <assert.h>.
6 2014-07-02  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
8         * config/fpu-glibc.h: Fix comment about FE_DENORMAL.
10 2014-07-02  Uros Bizjak  <ubizjak@gmail.com>
12         * configure.host (ieee_flags): Add -mieee for alpha*.
14         * config/fpu-glibc.h (support_fpu_rounding_mode): Correctly handle
15         GFC_FPE_UPWARD, GFC_FPE_DOWNWARD and GFC_FPE_TOWARDZERO.
16         * config/fpu-aix.h (support_fpu_rounding_mode): Ditto.
18 2014-06-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
20         * config/fpu-387.h (my_fenv_t): Amend structure so it also works
21         on mingw32.
23 2014-06-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
25         PR libgfortran/61640
26         * io/list_read.c (next_char_internal): Adjust the read length to
27         a single wide character. (eat_spaces): Add missing paren.
28         * io/unix.c (mem_read4): Use the correct mem_alloc function for
29         wide character internal reads.
31 2014-06-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
33         PR fortran/29383
34         * configure.host: Add checks for IEEE support, rework priorities.
35         * configure.ac: Define IEEE_SUPPORT, check for fpsetsticky and
36         fpresetsticky.
37         * configure: Regenerate.
38         * Makefile.am: Build new ieee files, install IEEE_* modules.
39         * Makefile.in: Regenerate.
40         * gfortran.map (GFORTRAN_1.6): Add new symbols.
41         * libgfortran.h (get_fpu_trap_exceptions, set_fpu_trap_exceptions,
42         support_fpu_trap, set_fpu_except_flags, support_fpu_flag,
43         support_fpu_rounding_mode, get_fpu_state, set_fpu_state): New
44         prototypes.
45         * config/fpu-*.h (get_fpu_trap_exceptions,
46         set_fpu_trap_exceptions, support_fpu_trap, set_fpu_except_flags,
47         support_fpu_flag, support_fpu_rounding_mode, get_fpu_state,
48         set_fpu_state): New functions.
49         * ieee/ieee_features.F90: New file.
50         * ieee/ieee_exceptions.F90: New file.
51         * ieee/ieee_arithmetic.F90: New file.
52         * ieee/ieee_helper.c: New file.
54 2014-06-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
56         PR libgfortran/61499
57         * io/list_read.c (eat_spaces): Use a 'for' loop instead of
58         'while' loop to skip the loop if there are no bytes left in the
59         string. Only seek if actual spaces can be skipped.
61 2014-06-25  Tobias Burnus  <burnus@net-b.de>
63         * caf/single.c (assign_char4_from_char1, assign_char1_from_char4,
64         convert_type): New static functions.
65         (_gfortran_caf_get, _gfortran_caf_send): Use them.
67 2014-06-19  Tobias Burnus  <burnus@net-b.de>
69         * caf/single.c (_gfortran_caf_co_sum, _gfortran_caf_co_max,
70         _gfortran_caf_co_min): Fix stat setting.
72 2014-06-17  Tobias Burnus  <burnus@net-b.de>
74         * caf/libcaf.h (gfc_descriptor_t): New typedef.
75         (caf_vector_t): Update.
76         (_gfortran_caf_co_sum, _gfortran_caf_co_max, _gfortran_caf_co_min):
77         Remove vector-subscript argument.
78         (_gfortran_caf_co_send, _gfortran_caf_co_get,
79         _gfortran_caf_co_sendget): New.
80         * caf/single.c (_gfortran_caf_co_sum, _gfortran_caf_co_max,
81         _gfortran_caf_co_min): Remove vector-subscript argument.
82         (_gfortran_caf_co_send, _gfortran_caf_co_get,
83         _gfortran_caf_co_sendget): New.
85 2014-06-17  Janne Blomqvist  <jb@gcc.gnu.org>
87         * libgfortran.h (xmallocarray): New prototype.
88         * runtime/memory.c (xmallocarray): New function.
89         (xcalloc): Check for nonzero separately instead of multiplying.
90         * generated/*.c: Regenerated.
91         * intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
92         xmalloc.
93         * intrinsics/eoshift0.c (eoshift0): Likewise.
94         * intrinsics/eoshift2.c (eoshift2): Likewise.
95         * intrinsics/pack_generic.c (pack_internal): Likewise.
96         (pack_s_internal): Likewise.
97         * intrinsics/reshape_generic.c (reshape_internal): Likewise.
98         * intrinsics/spread_generic.c (spread_internal): Likewise.
99         (spread_internal_scalar): Likewise.
100         * intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
101         (string_minmax): Likewise.
102         * intrinsics/transpose_generic.c (transpose_internal): Likewise.
103         * intrinsics/unpack_generic.c (unpack_internal): Likewise.
104         * io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
105         * io/transfer.c (st_set_nml_var): Call xmallocarray instead of
106         xmalloc.
107         * io/unit.c (get_internal_unit): Likewise.
108         (filename_from_unit): Don't cast xmalloc return value.
109         * io/write.c (nml_write_obj): Likewise, formatting.
110         * m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
111         instead of xmalloc.
112         (besse_yn_r'rtype_kind`): Likewise.
113         * m4/cshift1.m4 (cshift1): Likewise.
114         * m4/eoshift1.m4 (eoshift1): Likewise.
115         * m4/eoshift3.m4 (eoshift3): Likewise.
116         * m4/iforeach.m4: Likewise.
117         * m4/ifunction.m4: Likewise.
118         * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
119         Likewise.
120         * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
121         * m4/matmul.m4 (matmul_'rtype_code`): Likewise.
122         * m4/matmull.m4 (matmul_'rtype_code`): Likewise.
123         * m4/pack.m4 (pack_'rtype_code`): Likewise.
124         * m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
125         * m4/shape.m4 (shape_'rtype_kind`): Likewise.
126         * m4/spread.m4 (spread_'rtype_code`): Likewise.
127         (spread_scalar_'rtype_code`): Likewise.
128         * m4/transpose.m4 (transpose_'rtype_code`): Likewise.
129         * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
130         (unpack1_'rtype_code`): Likewise.
131         * runtime/convert_char.c (convert_char1_to_char4): Likewise.
132         (convert_char4_to_char1): Simplify.
133         * runtime/environ.c (init_unformatted): Call xmallocarray instead
134         of xmalloc.
135         * runtime/in_pack_generic.c (internal_pack): Likewise.
137 2014-06-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
139         PR libfortran/60468
140         * configure.ac: Include <math.h> when checking for fp_except_t
141         and fp_rnd_t types.
142         * configure: Regenerate.
144 2014-06-08  Janne Blomqvist  <jb@gcc.gnu.org>
146         PR libfortran/56981
147         * io/unix.h (struct stream_vtable): Add new member function,
148         markeor.
149         (smarkeor): New inline function.
150         (flush_if_unbuffered): Remove prototype.
151         * io/unix.c (raw_markeor): New function.
152         (raw_vtable): Initialize markeor member.
153         (buf_markeor): New function.
154         (buf_vtable): Initialize markeor member.
155         (mem_vtable): Likewise.
156         (mem4_vtable): Likewise.
157         (flush_if_unbuffered): Remove function.
158         * io/transfer.c (next_record): Call smarkeor instead of
159         flush_if_unbuffered.
161 2014-05-27  Uros Bizjak  <ubizjak@gmail.com>
163         * intrinsics/getcwd.c: Include stdlib.h.
165 2014-05-26  Janne Blomqvist  <jb@gcc.gnu.org>
167         * libgfortran.h (xrealloc): New prototype.
168         * runtime/memory.c (xrealloc): New function.
169         * io/fbuf.c (fbuf_alloc): Use xrealloc.
170         * io/list_read.c (push_char_default): Likewise.
171         (push_char4): Likewise.
173 2014-05-26  Janne Blomqvist  <jb@gcc.gnu.org>
175         PR libfortran/61310
176         * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf
177         instead of strftime.
178         (fdate): Use gf_ctime.
179         (fdate_sub): Likewise.
180         (ctime): Likewise.
181         (ctime_sub): Likewise.
183 2014-05-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
185         PR libgfortran/55117
186         * io/list_read.c (extended_look_ahead): New helper function to
187         scan the namelist name and look for matches with the new '+'
188         extended type parent indicator.  (str_comp_extended): New
189         helper function to compare the namelist name with the varname
190         namelist. (find_nml_name): Use the new helper functions to match
191         the extended type varnames.
193 2014-05-23  Jerry DeLisle  <jvdelisle@gcc.gnu>
195         PR libfortran/61173
196         * io/list_read.c (eat_spaces): If the next character pointed to
197         is a space, don't seek, must be at the end.
199 2014-05-23  Hans-Peter Nilsson  <hp@axis.com>
201         * configure.ac [with_newlib] (HAVE_STRNLEN, HAVE_STRNDUP): Define.
202         * configure: Regenerate.
204 2014-05-23  Janne Blomqvist  <jb@gcc.gnu.org>
206         PR libfortran/60324
207         * runtime/string.c: Include stdlib.h.
209 2014-05-22  Janne Blomqvist  <jb@gcc.gnu.org>
211         PR libfortran/60324
212         * config.h.in: Regenerated.
213         * configure: Regenerated.
214         * configure.ac (AC_CHECK_FUNCS_ONCE): Check for strnlen and
215         strndup.
216         * libgfortran.h (fc_strdup): New prototype.
217         * runtime/string.c (strnlen): New fallback function.
218         (strndup): New fallback function.
219         (fc_strdup): New function.
220         * io/close.c (st_close): Use fc_strdup.
221         * io/open.c (new_unit): Likewise.
222         (already_open): Likewise.
223         * io/unit.c (filename_from_unit): Likewise.
224         * io/unix.c (unpack_filename): Remove function.
225         (regular_file): Rename to regular_file2, add path argument.
226         (regular_file): New function calling regular_file2.
227         (compare_file_filename): Use fc_strdup.
228         (find_file): Likewise.
229         (delete_file): Likewise.
230         (file_exists): Likewise.
231         (file_size): Likewise.
232         (inquire_sequential): Likewise.
233         (inquire_direct): Likewise.
234         (inquire_formatted): Likewise.
235         (inquire_access): Likewise.
236         * io/unix.h (unpack_filename): Remove prototype.
237         * runtime/main.c (please_free_exe_path_when_done): Change type to
238         bool.
239         (store_exe_path): Use malloced buffer, grow as needed.
241 2014-05-17  Jerry DeLisle  <jvdelisle@gcc.gnu>
243         PR libfortran/52539
244         * io/io.h (gfc_unit): New function pointers *next_char_fn_ptr
245         and *push_char_fn_ptr.
246         *io/list_read.c (next_char): Create macro with this name to call
247         the new function pointer. Split the original next_char function
248         into three new functions. (next_char_default, next_char_internal,
249         next_char_utf8): New functions. (push_char): Create macro with
250         this name to call new function pointer. Split the original
251         push_char into three new functions. (push_char_default,
252         push_char_internal, push_char4): New functions. (set_workers):
253         New function to initilize the function pointers depending on the
254         type of IO to be performed. (list_formatted_read_scalar): Use
255         set_workers function. (finish_list_read): Likewise.
256         (namelist_read): Likewise.
257         (nml_get_obj_data): Use push_char_default.
259 2014-05-16  Janne Blomqvist  <jb@gcc.gnu.org>
261         PR libfortran/61187
262         * io/unix.c (raw_close): Check if s->fd is -1.
263         (fd_to_stream): Check return value of fstat(), handle error.
265 2014-05-12  Janne Blomqvist  <jb@gcc.gnu.org>
267         PR libfortran/61035
268         * intrinsics/getcwd.c (getcwd_i4_sub): Avoid potentially large
269         stack allocation, avoid extra copying in the common case.
271 2014-05-12  Janne Blomqvist  <jb@gcc.gnu.org>
273         * configure.ac (AM_CFLAGS): Use -std=gnu11.
274         (CFLAGS): Likewise.
275         * configure: Regenerated.
277 2014-05-11  Tobias Burnus  <burnus@net-b.de>
279         * caf/libcaf.h (_gfortran_caf_num_images): Change type of
280         second argument to int.
281         * caf/mpi.c (_gfortran_caf_num_images): Ditto.
282         * caf/single.c (_gfortran_caf_num_images): Ditto.
284 2014-05-08  Tobias Burnus  <burnus@net-b.de>
286         * caf/libcaf.h (caf_vector_t, _gfortran_caf_co_sum,
287         _gfortran_caf_co_min, _gfortran_caf_co_max): Declare
288         * caf/single.c
290 2014-05-06  Jerry DeLisle  <jvdelisle@gcc.gnu>
292         PR libfortran/61049
293         * io/list_read.c (list_formatted_read_scalar): Use eat_separator
294         and delete extraneous code.
296 2014-04-30  Tobias Burnus  <burnus@net-b.de>
298         * caf/libcaf.h (_gfortran_caf_this_image, _gfortran_caf_num_images):
299         New prototypes.
300         (_gfortran_caf_init): Change prototype.
301         (mpi_token_t): New typedef.
302         (TOKEN): New define.
303         * caf/mpi.c (_gfortran_caf_this_image, _gfortran_caf_num_images):
304         New functions.
305         (_gfortran_caf_init): Update.
306         (_gfortran_caf_finalize, _gfortran_caf_register,
307         _gfortran_caf_deregister): Use mpi_token_t.
308         * caf/single.c (_gfortran_caf_this_image, _gfortran_caf_num_images):
309         New functions.
310         (_gfortran_caf_init): Update.
311         (_gfortran_caf_finalize, _gfortran_caf_register,
312         _gfortran_caf_deregister): Use mpi_token_t, simplify.
314 2014-04-26  Jerry DeLisle  <jvdelisle@gcc.gnu>
316         PR libfortran/52539
317         * io/list_read.c: Add uchar typedef. (push_char4): New function
318         to save kind=4 character. (next_char_utf8): New function to read
319         a single UTF-8 encoded character value. (read_chracter): Update
320         to use the new functions for reading UTF-8 strings.
321         (list_formatted_read_scalar): Update to handle list directed
322         reads of UTF-8 strings. (nml_read_obj): Likewise update for
323         UTF-8 strings in namelists.
324         * io/write.c (nml_write_obj): Add kind=4 character support for
325         namelist writes.
327 2014-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
329         * configure.ac: Quote usage of ac_cv_func_clock_gettime in if test.
330         * configure: Regenerate.
332 2014-04-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
334         * config/fpu-387.h [__sun__ && __svr4__]: Remove SSE execution
335         check.
337 2014-04-11  Jerry DeLisle  <jvdelisle@gcc.gnu>
339         PR libfortran/60810
340         io/unit.c (is_trim_ok): If internal unit is array, do not trim.
342 2014-03-21  Jerry DeLisle  <jvdelisle@gcc.gnu>
344         PR libfortran/60148
345         * io/transfer.c (data_transfer_init): If std= was specified, set
346         delim status to DELIM_NONE of no other was specified.
348 2014-03-18  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
350         * configure.ac: Check for presence of fcntl.
351         * configure: Regenerate.
352         * config.h.in: Regenerate.
353         * io/unix.c (set_close_on_exec): Check for HAVE_FCNTL.
355 2014-03-17  Jerry DeLisle  <jvdelisle@gcc.gnu>
357         PR libfortran/48600
358         * io/list_read.c (list_formatted_read_scalar): Do not use
359         eat_separator. Explicitly set the comma and end-of-line flags.
360         Check for END condition from finish_separator.
362 2014-03-15  Jerry DeLisle  <jvdelisle@gcc.gnu>
364         PR libfortran/58324
365         * io/list_read.c (finish_list_read): Read one character to check
366         for the end of the file.  If it is the end, then issue the file
367         end error message.  If not, use eat_line to reach the end
368         without giving error.  The next attempt to read will then
369         issue the error as described above.
371 2014-03-12  Jerry DeLisle  <jvdelisle@gcc.gnu>
373         PR libfortran/38199
374         * io/read.c (read_decimal): Quickly skip spaces to avoid calls
375         to next_char.
376         * io/unit.c (is_trim_ok): New helper function to check various
377         conditions to see if its OK to trim the internal unit string.
378         (get_internal_unit): Use LEN_TRIM to shorten selected internal
379         unit strings for optimizing READ. Enable this optimization for
380         formatted READ.
381         * io/list_read.c (finish_list_read): Don't call eat_line for
382         internal units.
384 2014-03-08  Jerry DeLisle  <jvdelisle@gcc.gnu>
386         PR libfortran/38199
387         * io/list_read.c (next_char): Mark unlikely error checks.
388         (eat_spaces): For character array reading, skip ahead over
389         spaces rather than call next_char multiple times.
391 2014-03-08  Tobias Burnus  <burnus@net-b.de>
393         * libgfortran.h (unlikely, likely): Add usage comment.
395 2014-03-08  Dominique d'Humieres  <dominiq@lps.ens.fr>
397         PR libgfortran/60128
398         * io/write_float.def (output_float): Remove unused variable
399         nzero_real. Replace a double space with a single one.
400         (determine_en_precision): Fix wrong handling of the EN format.
402 2014-03-03  Jerry DeLisle  <jvdelisle@gcc.gnu>
404         PR libfortran/60148
405         * io/inquire.c (inquire_via_unit): In the case of
406         DELIM_UNSPECIFIED set inquire return string to "NONE".
407         * io/list_read.c (read_character): In the case of DELIM_NONE and
408         namelists, complete the character read using the namelist
409         variable length.
410         * io/open.c (new_unit): Don't set delim status to none if not
411         specified so that DELIM_UNSPECIFIED can be used later.
412         * io/transfer.c (data_transfer_init): For namelist I/O, if the
413         unit delim status is unspecified set the current status to quote.
414         Otherwise, set current status to the unit status.
415         * io/unit.c (get_internel_unit, init_unit): Remember to set
416         flags_delim initially to DELIM_UNSPECIFIED so defaults come out
417         correctly.
418         * io/write.c (write_character): Add a new function argument
419         "mode" to signify that raw output is to be used vs output with
420         delimiters. If the mode is set to DELIM (1) proceed with
421         delimiters. (list_formatted_write_scalar): Write the separator
422         only if a delimiter was previously specified. Update the call to
423         write_character with the mode argument given.
424         (namelist_write_newline): Use the mode argument. (nml_write_obj):
425         Use the mode argument. Remove use of tmp_delim. Write the
426         semi-colon or comma correctly only when needed with using
427         delimiters. Cleanup whitespace.
428         (namelist_write): If delim is not specified in namelist I/O,
429         default to using quotes. Get rid of the tmp_delim variable and
430         use the new mode argument in write_character.
432 2014-02-21  Tobias Burnus  <burnus@net-b.de>
434         PR fortran/60286
435         * libgfortran/io/inquire.c (yes, no): New static const char vars.
436         (inquire_via_unit): Use them. Use OPEN mode instead of using
437         POSIX's access to query about write=, read= and readwrite=.
439 2014-01-20  Jerry DeLisle  <jvdelisle@gcc.gnu>
440             Dominique d'Humieres  <dominiq@lps.ens.fr>
442         * io/write_float.def (output_float): Remove inadvertent test
443         code from previous patch.
445 2014-01-19  Jerry DeLisle  <jvdelisle@gcc.gnu>
446             Dominique d'Humieres  <dominiq@lps.ens.fr>
448         PR libfortran/59771
449         PR libfortran/59774
450         PR libfortran/59836
451         * io/write_float.def (output_float): Fix wrong handling of the
452         Fw.0 format.
453         (output_float_FMT_G_): Fixes rounding issues with -m32.
455 2014-01-11  Jerry DeLisle  <jvdelisle@gcc.gnu>
456             Dominique d'Humieres  <dominiq@lps.ens.fr>
457             Steven G. Kargl  <kargl@gcc.gnu.org>
459         PR libfortran/59700
460         PR libfortran/59764
461         * io/io.h (struct st_parameter_dt): Assign expanded_read flag to
462         unused bit. Define new variable line_buffer_pos.
463         * io/list_read.c (free_saved, next_char, l_push_char,
464         read_logical, read_real): Replace use of item_count with
465         line_buffer_pos for line_buffer look ahead.
466         (read_logical, read_integer, parse_real, read_real, check_type):
467         Adjust location of free_line to after generating error messages
468         to retain the correct item count for the message.
470 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
472         Update copyright years
474 Copyright (C) 2013-2014 Free Software Foundation, Inc.
476 Copying and distribution of this file, with or without modification,
477 are permitted in any medium without royalty provided the copyright
478 notice and this notice are preserved.