OSDN Git Service

f846b08f9aebfb186e1d5ef84a1d9c48a3183467
[pf3gnuchains/gcc-fork.git] / libgfortran / ChangeLog
1 2011-08-18  Tobias Burnus  <burnus@net-b.de>
2
3         PR fortran/50109
4         * io/list_read.c (eat_separator): Fix skipping over "!" lines.
5
6 2011-07-23  Andreas Schwab  <schwab@linux-m68k.org>
7
8         * intrinsics/ctime.c: Include <stdlib.h>.
9         * intrinsics/getlog.c: Likewise.
10         * runtime/stop.c: Likewise.
11
12 2011-07-23  Tobias Burnus  <burnus@net-b.de>
13
14         PR fortran/49791
15         * io/list_read.c (nml_parse_qualifier): Remove check to
16         enabled extended read for another case.
17
18 2011-07-15  Daniel Carrera  <dcarrera@gmail.com>
19
20         * caf/mpi.c (caf_runtime_error): Change fprintf to vfprintf.
21         * caf/single.c (caf_runtime_error): Ditto.
22
23 2011-07-14  Daniel Carrera  <dcarrera@gmail.com>
24
25         * caf/single.c:  Include stdarg.h header.
26         (caf_runtime_error): New function. Use "exit(EXIT_FAILURE)".
27         (_gfortran_caf_register): Use caf_runtime_error.
28         (_gfortran_caf_sync_images): Use "exit(EXIT_FAILURE)".
29         * caf/mpi.c (caf_runtime_error): Remove "error" parameter.
30         Return EXIT_FAILURE instead.
31         (_gfortran_caf_register): Update call to caf_runtime_error.
32         (_gfortran_caf_sync_all): Ditto.
33         (_gfortran_caf_sync_images): Ditto.
34         (_gfortran_caf_error_stop_str): Use "exit(EXIT_FAILURE)".
35
36 2011-07-13  Janne Blomqvist  <jb@gcc.gnu.org>
37
38         PR libfortran/49296
39         * io/list_read.c (read_logical): Don't error out if a valid value
40         is followed by EOF instead of a normal separator.
41         (read_integer): Likewise.
42
43 2011-07-09  Tobias Burnus  <burnus@net-b.de>
44
45         * runtime/error.c (sys_abort): Change argument list
46         from "()" to "(void)".
47
48 2011-07-09  Tobias Burnus  <burnus@net-b.de>
49             Daniel Carrera  <dcarrera@gmail.com>
50
51         * caf/mpi.c (runtime_error): New function.
52         (_gfortran_caf_register): Use it.
53         (_gfortran_caf_sync_all): Use it, add STAT_STOPPED_IMAGE
54         as possible status value.
55         (_gfortran_caf_sync_images): Ditto.
56
57 2011-07-07  Tobias Burnus  <burnus@net-b.de>
58
59         * libcaf.h (__attribute__, unlikely, likely): New macros.
60         (caf_register_t): Update comment.
61         (_gfortran_caf_register): Add stat, errmsg, errmsg_len arguments.
62         * single.c (_gfortran_caf_register): Ditto; add error diagnostics.
63         * mpi.c (_gfortran_caf_register): Ditto.
64         (caf_is_finalized): New global variable.
65         (_gfortran_caf_finalize): Use it.
66
67 2011-07-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
68
69         * runtime/memory.c (internal_malloc_size):  If size is zero,
70         allocate a single byte.
71         * m4/pack.m4 (pack_'rtype_code`):  Don't check for zero size
72         for the argument of internal_malloc_size.
73         * m4/spread.m4 (spread_'rtype_code`):  Likewise.
74         * m4/eoshift1.m4 (eoshift1):  Don't allocate twice.  Don't check
75         for zero size for the argument of internal_malloc_size.
76         * m4/eoshift3.m4: Don't check for zero size for the argument of
77         internal_malloc_size.
78         * intrinsics/pack_generic.c (pack_internal):  Likewise.
79         (pack_s_internal):  Likewise.
80         * intrinsics/cshift0.c (cshift0):  Likewise.
81         * intrinsics/spread_generic.c (spread_internal):  Likewise.
82         * intrinsics/eoshift0.c (eoshift0):  Likewise.
83         * intrinsics/eoshift2.c (eoshift2):  Likewise.
84         * generated/eoshift1_16.c: Regenerated.
85         * generated/eoshift1_4.c: Regenerated.
86         * generated/eoshift1_8.c: Regenerated.
87         * generated/eoshift3_16.c: Regenerated.
88         * generated/eoshift3_4.c: Regenerated.
89         * generated/eoshift3_8.c: Regenerated.
90         * generated/pack_c10.c: Regenerated.
91         * generated/pack_c16.c: Regenerated.
92         * generated/pack_c4.c: Regenerated.
93         * generated/pack_c8.c: Regenerated.
94         * generated/pack_i16.c: Regenerated.
95         * generated/pack_i1.c: Regenerated.
96         * generated/pack_i2.c: Regenerated.
97         * generated/pack_i4.c: Regenerated.
98         * generated/pack_i8.c: Regenerated.
99         * generated/pack_r10.c: Regenerated.
100         * generated/pack_r16.c: Regenerated.
101         * generated/pack_r4.c: Regenerated.
102         * generated/pack_r8.c: Regenerated.
103         * generated/spread_c10.c: Regenerated.
104         * generated/spread_c16.c: Regenerated.
105         * generated/spread_c4.c: Regenerated.
106         * generated/spread_c8.c: Regenerated.
107         * generated/spread_i16.c: Regenerated.
108         * generated/spread_i1.c: Regenerated.
109         * generated/spread_i2.c: Regenerated.
110         * generated/spread_i4.c: Regenerated.
111         * generated/spread_i8.c: Regenerated.
112         * generated/spread_r10.c: Regenerated.
113         * generated/spread_r16.c: Regenerated.
114         * generated/spread_r4.c: Regenerated.
115         * generated/spread_r8.c: Regenerated.
116
117 2011-06-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
118
119         PR fortran/49479
120         * m4/reshape.m4: If source allocation is smaller than one, set it
121         to one.
122         * intrinsics/reshape_generic.c:  Likewise.
123         * generated/reshape_r16.c: Regenerated.
124         * generated/reshape_c4.c: Regenerated.
125         * generated/reshape_c16.c: Regenerated.
126         * generated/reshape_c8.c: Regenerated.
127         * generated/reshape_r4.c: Regenerated.
128         * generated/reshape_i4.c: Regenerated.
129         * generated/reshape_r10.c: Regenerated.
130         * generated/reshape_r8.c: Regenerated.
131         * generated/reshape_c10.c: Regenerated.
132         * generated/reshape_i8.c: Regenerated.
133         * generated/reshape_i16.c: Regenerated.
134
135 2011-06-18  Janne Blomqvist  <jb@gcc.gnu.org>
136
137         PR libfortran/49296
138         * io/list_read.c (read_character): Accept EOF as a separator when
139         reading string.
140
141 2011-06-17  Daniel Carrera  <dcarrera@gmail.com>
142
143         * caf/single.c (_gfortran_caf_register): Store the address
144         of all static coarrays in a linked list.
145         (_gfortran_caf_finalize): Free memory of staic coarrays.
146         * caf/mpi.c (_gfortran_caf_register): Store the address
147         of all static coarrays in a linked list. Initialize MPI
148         if necessary.
149         (_gfortran_caf_finalize): Free memory of staic coarrays.
150         (_gfortran_caf_init): Check if MPI is already initialized
151         before initializing again.
152         * caf/libcaf.h: Add a type to caf_register_t to distinguish
153         static coarrays and add the type caf_static_t to make the
154         linked list of static coarrays.
155
156 2011-06-11  Janne Blomqvist  <jb@gcc.gnu.org>
157
158         * io/unix.c (buf_seek): Return error if file is not seekable.
159         (buf_tell): Call buf_seek.
160
161 2011-06-11  Janne Blomqvist  <jb@gcc.gnu.org>
162
163         * io/unix.c (fd_to_stream): Figure out if a fd is seekable by
164         trying lseek().
165
166 2011-06-10  Daniel Carrera  <dcarrera@gmail.com>
167
168         * caf/mpi.c (_gfortran_caf_sync_all,
169         _gfortran_caf_sync_images): Functions have void return type
170         and move status into parameter list.
171         * caf/single.c (_gfortran_caf_sync_all,
172         _gfortran_caf_sync_images): Functions have void return type
173         and move status into parameter list.
174         * caf/libcaf.h (_gfortran_caf_sync_all,
175         _gfortran_caf_sync_images): Functions have void return type
176         and move status into parameter list.
177
178 2011-06-03  Richard Henderson  <rth@redhat.com>
179             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
180
181         * config/fpu-387.h [__sun__ && __svr4__] (sigill_hdlr): Correct
182         insn, insn size.
183         (has_sse) [!__x86_64__ && __sun__ && __svr4__]: Use movaps.
184
185 2011-05-29  Janne Blomqvist  <jb@gcc.gnu.org>
186
187         PR libfortran/48931
188         * libgfortran.h (find_addr2line): New prototype.
189         * runtime/backtrace.c (show_backtrace): Use async-signal-safe
190         execve and stored path of addr2line.
191         * runtime/compile_options.c (maybe_find_addr2line): New function.
192         (set_options): Call maybe_find_addr2line if backtracing is enabled.
193         * runtime/main.c (find_addr2line): New function.
194         (init): Call find_addr2line if backtracing is enabled.
195         (cleanup): Free addr2line_path.
196
197 2011-05-29  Janne Blomqvist  <jb@gcc.gnu.org>
198
199         PR libfortran/49214
200         * runtime/backtrace.c (fd_gets): Return NULL if nothing was read.
201
202 2011-05-29  Janne Blomqvist  <jb@gcc.gnu.org>
203
204         PR libfortran/19155
205         * io/read.c (convert_real): Check for invalid input by comparing
206         endptr instead of EINVAL.
207         (read_f): Fixup floating point input without significand.
208
209 2011-05-22  Tobias Burnus  <burnus@net-b.de>
210
211         * runtime/stop.c (stop_string,error_stop_string): Minor cleanup.
212
213 2011-05-22  Janne Blomqvist  <jb@gcc.gnu.org>
214
215         PR libfortran/48931
216         * configure.ac: Check for backtrace_symbols_fd instead of
217         backtrace_symbols, check for readlink.
218         * config.h.in: Regenerated.
219         * configure: Regenerated.
220         * runtime/backtrace.c (local_strcasestr): Remove.
221         (bt_header): New function.
222         (dump_glibc_backtrace): Remove.
223         (fd_gets): New function.
224         (show_backtrace): Rework to use backtrace_symbols_fd and pipes
225         avoiding functions that are not async-signal-safe, reformat
226         output.
227         * runtime/main.c (store_exe_path): Try to check /proc/self/exe
228         first.
229
230 2011-05-20  Janne Blomqvist  <jb@gcc.gnu.org>
231             Uros Bizjak  <ubizjak@gmail.com>
232
233         PR libfortran/48977
234         * configure.host: Swap order of glibc and x86 tests.
235
236 2011-05-20  Janne Blomqvist  <jb@gcc.gnu.org>
237
238         * config/fpu-387.h (set_fpu): Use renamed inexact macro.
239         * config/fpu-aix.h (set_fpu): Clarify error messages, use renamed
240         inexact macro, set TRP_INEXACT for inexact exception instead of
241         TRP_UNDERFLOW.
242         * config/fpu-generic.h (set_fpu): Clarify error messages, use
243         renamed inexact macro.
244         * config/fpu-glibc.h (set_fpu): Likewise.
245         * config/fpu-sysv.h (set_fpu): Likewise.
246
247 2011-05-14  Tobias Burnus  <burnus@net-b.de>
248
249         * runtime/stop.c (error_stop_string, error_stop_numeric):
250         Do not backtrace for ERROR STOP.
251
252 2011-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
253
254         PR libfortran/48915
255         * intrinsics/abort.c (abort): Call sys_abort().
256         * io/unix.c (st_vprintf): Call sys_abort().
257         * libgfortran.h (options_t): Remove dump_core member.
258         (handler): Rename to backtrace_handler.
259         (compile_options_t): Remove dump_core member.
260         (sys_exit): Remove.
261         (sys_abort): New function.
262         * runtime/backtrace.c (show_backtrace): Print a message if
263         backtrace is not available on target, update filter symbol name
264         due to backtrace_handler renaming.
265         * runtime/compile_options.c (backtrace_handler): New
266         implementation based on example in Glibc manual.
267         (set_options): Remove dump_core handling, make signal handler
268         handle more signals.
269         (init_compile_options): Remove dump_core.
270         * runtime/environ.c (variable_table[]): Remove
271         GFORTRAN_ERROR_DUMPCORE element.
272         (show_variables): Update name, call exit().
273         * runtime/error.c (sys_exit): Remove.
274         (sys_abort): New function.
275         (recursion_check): Call sys_abort().
276         (os_error): Call exit().
277         (runtime_error): Likewise.
278         (runtime_error_at): Likewise.
279         (internal_error): Likewise.
280         (generate_error): Likewise.
281         (notify_std): Likewise.
282         * runtime/stop.c (stop_numeric): Call exit().
283         (stop_numeric_f08): Likewise.
284         (stop_string): Likewise.
285         (error_stop_string): Call sys_abort().
286         (error_stop_numeric): Print backtrace, exit with provided code.
287
288 2011-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
289
290         * io/unix.c (st_vprintf,st_printf): Move to runtime/error.c.
291         * libgfortran.h (struct options_t): Remove use_stderr field.
292         (st_vprintf,st_printf): Move prototypes.
293         (estr_write): New prototype.
294         * runtime/error.c (sys_exit): Use estr_write instead of st_printf.
295         (estr_write): New function.
296         (st_vprintf): Move from io/unix.c, use stack allocated buffer,
297         always output to stderr.
298         (st_printf): Move from io/unix.c.
299         (show_locus): Use a local variable instead of static.
300         (os_error): Use estr_write instead of st_printf.
301         (runtime_error): Likewise.
302         (runtime_error_at): Likewise.
303         (runtime_warning_at): Likewise.
304         (internal_error): Likewise.
305         (generate_error): Likewise.
306         (generate_warning): Likewise.
307         (notify_std): Likewise.
308         * runtime/pause.c (do_pause): Likewise.
309         (pause_string): Likewise.
310         * runtime/stop.c (stop_string): Likewise.
311         (error_stop_string): Likewise.
312         * config/fpu_aix.h (set_fpu): Likewise.
313         * config/fpu_generic.h (set_fpu): Likewise.
314         * config/fpu_glibc.h (set_fpu): Likewise.
315         * config/fpu-sysv.h (set_fpu): Likewise.
316         * runtime/backtrace.c (dump_glibc_backtrace): Likewise.
317         (show_backtrace): Likewise.
318         * runtime/environ.c (print_spaces): Likewise.
319         (show_string): Likewise.
320         (show_variables): Likewise.
321         (variable_table[]): Remove GFORTRAN_USE_STDERR entry.
322
323 2011-05-14  Tobias Burnus  <burnus@net-b.de>
324
325         PR fortran/48961
326         * intrinsics/execute_command_line.c (set_cmdstat): Don't abort if
327         synchronously executing with WAIT=.false.
328         (execute_command_line): Fix setting of cmdstat and exitstat.
329
330 2011-05-06  Tobias Burnus  <burnus@net-b.de>
331
332         PR fortran/18918
333         * caf/libcaf.h: Cleanup headers.
334         (_gfortran_caf_critical, _gfortran_caf_end_critical): Make stub.
335         (caf_register_t): New enum.
336         (_gfortran_caf_register, _gfortran_caf_deregister): New prototype.
337         * caf/single.c (_gfortran_caf_critical,
338         _gfortran_caf_end_critical): Remove.
339         (_gfortran_caf_register, _gfortran_caf_deregister): New functions.
340         * caf/mpi.c (_gfortran_caf_critical,
341         _gfortran_caf_end_critical): Remove.
342         (_gfortran_caf_register, _gfortran_caf_deregister): New functions.
343         (caf_world_window): Remove global variable.
344         (_gfortran_caf_init): Fix off-by-one error of this_image.
345
346 2011-05-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
347
348         PR libgfortran/48787
349         * io/write_float.def (output_float): Adjust up and down rounding for
350         cases where 'd' = 0. Gather common code to one location.
351
352 2011-05-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
353
354         PR libgfortran/48787
355         * io/write_float.def (output_float): Gather up integer declarations and
356         add new 'p' for scale factor. Use 'p' in place of the 'dtp' reference
357         everywhere. For ROUND_UP scan the digit string and only perform
358         rounding if something other than '0' is found.
359
360 2011-04-29  Janne Blomqvist  <jb@gcc.gnu.org>
361
362         * io/unix.c (min): New macro.
363         (unpack_filename): Return errno number for errors.
364         (regular_file): Use appropriately sized buffer for path.
365         (compare_file_filename): Likewise.
366         (find_file): Likewise.
367         (delete_file): Likewise.
368         (file_exists): Likewise.
369         (file_size): Likewise.
370         (inquire_sequential): Likewise.
371         (inquire_direct): Likewise.
372         (inquire_formatted): Likewise.
373         (inquire_access): Likewise.
374
375 2011-04-29  Janne Blomqvist  <jb@gcc.gnu.org>
376
377         PR libfortran/48488
378         * io/write.c (write_real, write_real_g0): Update comments.
379
380 2011-04-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
381             Janne Blomqvist  <jb@gcc.gnu.org>
382
383         PR libgfortran/48488
384         PR libgfortran/48602
385         PR libgfortran/48615
386         PR libgfortran/48684
387         PR libgfortran/48787
388         * io/write.c (write_d, write_e, write_f, write_en,
389         write_es): Add precision compemsation parameter to call.
390         (set_fnode_default): Adjust default widths to assure
391         round trip on write and read. (write_real): Adjust call to write_float.
392         (write_real_g0): Calculate compensation for extra precision and adjust
393         call to write_float.
394         * io/write_float.def (output_float_FMT_G_): Use volatile rather than
395         asm volatile to avoid optimization issue. Correctly calculate the
396         number of blanks (nb) to be appended and simplify calculation logic.
397         (write_float): Increase MIN_FIELD_WIDTH by one to accomodate the new
398         default widths. Eliminate the code that attempted to reduce the
399         the precision used in later sprintf functions.  Add call parameter to
400         compensate for extra precision.
401
402 2011-04-20  Jim Meyering  <meyering@redhat.com>
403
404         * intrinsics/move_alloc.c (move_alloc): Remove useless
405         if-before-free test.
406         * io/fbuf.c (fbuf_destroy): Likewise.
407         * io/format.c (save_parsed_format): Likewise.
408         * io/open.c (already_open): Likewise.
409         * io/unit.c (free_internal_unit, close_unit_1): Likewise.
410         * io/unix.c (mem_close): Likewise.
411
412 2011-04-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
413
414         PR libgfortran/48602
415         * io/write_float.def (output_float_FMT_G): Fix reversal in conditional.
416         Use asm volatile to mark temp variable, avoiding optimization errors.
417
418 2011-04-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
419
420         PR libgfortran/48602
421         * io/write_float.def (output_float_FMT_G): Use current rounding mode
422         to set the rounding parameters. (output_float): Skip rounding
423         if value is zero.
424
425 2011-04-16  Janne Blomqvist  <jb@gcc.gnu.org>
426
427         * intrinsics/date_and_time.c (date_and_time): Remove sprintf CPP
428         branch.
429         * io/format.c (format_error): Use snprintf instead of sprintf.
430         * io/list_read.c: Move snprintf fallback macro to libgfortran.h.
431         (convert_integer): Use snprintf instead of sprintf.
432         (parse_repeat): Likewise.
433         (read_logical): Likewise.
434         (read_integer): Likewise.
435         (read_character): Likewise.
436         (parse_real): Likewise.
437         (read_complex): Likewise.
438         (read_real): Likewise.
439         (check_type): Likewise.
440         (nml_parse_qualifier): Add string length argument, use snprintf
441         instead of sprintf.
442         (nml_get_obj_data): Use snprintf instead of sprintf.
443         * io/open.c (new_unit): Remove sprintf CPP branch, use snprintf
444         instead of sprintf.
445         * io/transfer.c (require_type): Use snprintf instead of sprintf.
446         * io/unix.c (tempfile): Likewise.
447         * io/write.c (nml_write_obj): Likewise.
448         * io/write_float.def (output_float): Remove sprintf CPP branch,
449         use snprintf instead of sprintf.
450         * libgfortran.h: Add fallback snprintf macro from io/list_read.c.
451         * runtime/backtrace.c (show_backtrace): Remove sprintf CPP branch.
452         * runtime/main.c (store_exe_path): Use snprintf instead of
453         sprintf.
454
455 2011-04-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
456
457         PR libgfortran/48589
458         * io/write_float.def (write_infnan): Set width properly for G0.
459
460 2011-04-15  Tobias Burnus  <burnus@net-b.de>
461
462         PR fortran/18918
463         * Makefile.am: Build and install caf/single.c as
464         libcaf_single.a.
465         * Makefile.in: Regenerate.
466
467 2011-04-15  Janne Blomqvist  <jb@gcc.gnu.org>
468
469         PR libfortran/47571
470         * configure: Regenerated.
471         * config.h.in: Regenerated.
472         * acinclude.m4: Add alpha*-dec-osf* to gthread blacklist.
473         * configure.ac: Use separate symbol for clock_gettime in librt.
474         * intrinsics/system_clock.c: Use weakrefs only when needed and
475         supported.
476
477 2011-04-12  Janne Blomqvist  <jb@gcc.gnu.org>
478
479         * configure.ac: Use AC_TYPE_* to make sure we have (u)intptr_t,
480         check for ptrdiff_t.
481         * libgfortran.h: Remove (u)intptr_t definitions, use ptrdiff_t for
482         index_type, change cshift0* prototypes.
483         * config.h.in: Regenerated.
484         * configure: Regenerated.
485         * intrinsics/cshift0.c (cshift0): Use ptrdiff_t instead of ssize_t.
486         * io/io.h (array_loop_spec): Use index_type instead of ssize_t.
487         * io/list_read.c (nml_parse_qualifier): Likewise.
488         * io/write.c (nml_write_obj): Likewise.
489         * m4/cshift0.c (cshift0_'rtype_code`): Likewise.
490         * generated/cshift0_*.c: Regenerated.
491
492 2011-04-12  Janne Blomqvist  <jb@gcc.gnu.org>
493
494         * Makefile.am: Remove _GNU_SOURCE from AM_CPPFLAGS.
495         * Makefile.in: Regenerated.
496
497 2011-04-06  Tobias Burnus  <burnus@net-b.de>
498
499         PR fortran/18918
500         * caf/mpi.c (_gfortran_caf_init, _gfortran_caf_finalize):
501         Add global variable caf_mpi_initialized and use it for when
502         finalizing.
503
504 2011-04-04  Tobias Burnus  <burnus@net-b.de>
505
506         * unix.c: Adapt stat DEFINEs since MinGW64 supports LFS.
507         (fallback_access, open_internal4, compare_file_filename,
508         find_file, file_size, inquire_sequential, inquire_direct,
509         inquire_formatted): Use "struct stat" instead of gfstat_t.
510
511 2011-03-27  Tobias Burnus  <burnus@net-b.de>
512
513         PR fortran/18918
514         * caf/libcaf.h: New - coarray communication library.
515         * caf/mpi.c: New.
516         * caf/single.c: New.
517
518 2011-03-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
519
520         PR libgfortran/48030
521         * io/read.c (read_x): Re-implement using fbuf_getc.
522
523 2011-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
524
525         PR bootstrap/48135
526         * configure.ac (gfortran_use_symver): Handle --disable-symvers.
527         * configure: Regenerate.
528
529 2011-03-19  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
530
531         PR fortran/35667
532         * io/io.h (convert_infnan): Declare.
533         * io/read.c (convert_infnan): New.
534         (read_f): Use convert_infnan to convert INFs and NANs.
535         * list_read.c (parse_real, read_real): Likewise.
536
537 2011-03-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
538
539         PR libfortran/47439
540         * io/unix.c (tempfile): Work around poor mktemp() implementations.
541
542 2011-03-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
543
544         PR libfortran/47883
545         * acinclude.m4: Don't use AC_TRY_ macros.
546         * configure.ac: Likewise.
547         * configure: Regenerate.
548
549 2011-03-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
550
551         PR libfortran/48066
552         * m4/ifunction.m4:  If return array is empty, return.
553         * m4/ifunction_logical.m4:  Likewise.
554         * generated/all_l16.c: Regenerated.
555         * generated/all_l1.c: Regenerated.
556         * generated/all_l2.c: Regenerated.
557         * generated/all_l4.c: Regenerated.
558         * generated/all_l8.c: Regenerated.
559         * generated/any_l16.c: Regenerated.
560         * generated/any_l1.c: Regenerated.
561         * generated/any_l2.c: Regenerated.
562         * generated/any_l4.c: Regenerated.
563         * generated/any_l8.c: Regenerated.
564         * generated/count_16_l.c: Regenerated.
565         * generated/count_1_l.c: Regenerated.
566         * generated/count_2_l.c: Regenerated.
567         * generated/count_4_l.c: Regenerated.
568         * generated/count_8_l.c: Regenerated.
569         * generated/maxloc1_16_i16.c: Regenerated.
570         * generated/maxloc1_16_i1.c: Regenerated.
571         * generated/maxloc1_16_i2.c: Regenerated.
572         * generated/maxloc1_16_i4.c: Regenerated.
573         * generated/maxloc1_16_i8.c: Regenerated.
574         * generated/maxloc1_16_r10.c: Regenerated.
575         * generated/maxloc1_16_r16.c: Regenerated.
576         * generated/maxloc1_16_r4.c: Regenerated.
577         * generated/maxloc1_16_r8.c: Regenerated.
578         * generated/maxloc1_4_i16.c: Regenerated.
579         * generated/maxloc1_4_i1.c: Regenerated.
580         * generated/maxloc1_4_i2.c: Regenerated.
581         * generated/maxloc1_4_i4.c: Regenerated.
582         * generated/maxloc1_4_i8.c: Regenerated.
583         * generated/maxloc1_4_r10.c: Regenerated.
584         * generated/maxloc1_4_r16.c: Regenerated.
585         * generated/maxloc1_4_r4.c: Regenerated.
586         * generated/maxloc1_4_r8.c: Regenerated.
587         * generated/maxloc1_8_i16.c: Regenerated.
588         * generated/maxloc1_8_i1.c: Regenerated.
589         * generated/maxloc1_8_i2.c: Regenerated.
590         * generated/maxloc1_8_i4.c: Regenerated.
591         * generated/maxloc1_8_i8.c: Regenerated.
592         * generated/maxloc1_8_r10.c: Regenerated.
593         * generated/maxloc1_8_r16.c: Regenerated.
594         * generated/maxloc1_8_r4.c: Regenerated.
595         * generated/maxloc1_8_r8.c: Regenerated.
596         * generated/maxval_i16.c: Regenerated.
597         * generated/maxval_i1.c: Regenerated.
598         * generated/maxval_i2.c: Regenerated.
599         * generated/maxval_i4.c: Regenerated.
600         * generated/maxval_i8.c: Regenerated.
601         * generated/maxval_r10.c: Regenerated.
602         * generated/maxval_r16.c: Regenerated.
603         * generated/maxval_r4.c: Regenerated.
604         * generated/maxval_r8.c: Regenerated.
605         * generated/minloc1_16_i16.c: Regenerated.
606         * generated/minloc1_16_i1.c: Regenerated.
607         * generated/minloc1_16_i2.c: Regenerated.
608         * generated/minloc1_16_i4.c: Regenerated.
609         * generated/minloc1_16_i8.c: Regenerated.
610         * generated/minloc1_16_r10.c: Regenerated.
611         * generated/minloc1_16_r16.c: Regenerated.
612         * generated/minloc1_16_r4.c: Regenerated.
613         * generated/minloc1_16_r8.c: Regenerated.
614         * generated/minloc1_4_i16.c: Regenerated.
615         * generated/minloc1_4_i1.c: Regenerated.
616         * generated/minloc1_4_i2.c: Regenerated.
617         * generated/minloc1_4_i4.c: Regenerated.
618         * generated/minloc1_4_i8.c: Regenerated.
619         * generated/minloc1_4_r10.c: Regenerated.
620         * generated/minloc1_4_r16.c: Regenerated.
621         * generated/minloc1_4_r4.c: Regenerated.
622         * generated/minloc1_4_r8.c: Regenerated.
623         * generated/minloc1_8_i16.c: Regenerated.
624         * generated/minloc1_8_i1.c: Regenerated.
625         * generated/minloc1_8_i2.c: Regenerated.
626         * generated/minloc1_8_i4.c: Regenerated.
627         * generated/minloc1_8_i8.c: Regenerated.
628         * generated/minloc1_8_r10.c: Regenerated.
629         * generated/minloc1_8_r16.c: Regenerated.
630         * generated/minloc1_8_r4.c: Regenerated.
631         * generated/minloc1_8_r8.c: Regenerated.
632         * generated/minval_i16.c: Regenerated.
633         * generated/minval_i1.c: Regenerated.
634         * generated/minval_i2.c: Regenerated.
635         * generated/minval_i4.c: Regenerated.
636         * generated/minval_i8.c: Regenerated.
637         * generated/minval_r10.c: Regenerated.
638         * generated/minval_r16.c: Regenerated.
639         * generated/minval_r4.c: Regenerated.
640         * generated/minval_r8.c: Regenerated.
641         * generated/product_c10.c: Regenerated.
642         * generated/product_c16.c: Regenerated.
643         * generated/product_c4.c: Regenerated.
644         * generated/product_c8.c: Regenerated.
645         * generated/product_i16.c: Regenerated.
646         * generated/product_i1.c: Regenerated.
647         * generated/product_i2.c: Regenerated.
648         * generated/product_i4.c: Regenerated.
649         * generated/product_i8.c: Regenerated.
650         * generated/product_r10.c: Regenerated.
651         * generated/product_r16.c: Regenerated.
652         * generated/product_r4.c: Regenerated.
653         * generated/product_r8.c: Regenerated.
654         * generated/sum_c10.c: Regenerated.
655         * generated/sum_c16.c: Regenerated.
656         * generated/sum_c4.c: Regenerated.
657         * generated/sum_c8.c: Regenerated.
658         * generated/sum_i16.c: Regenerated.
659         * generated/sum_i1.c: Regenerated.
660         * generated/sum_i2.c: Regenerated.
661         * generated/sum_i4.c: Regenerated.
662         * generated/sum_i8.c: Regenerated.
663         * generated/sum_r10.c: Regenerated.
664         * generated/sum_r16.c: Regenerated.
665         * generated/sum_r4.c: Regenerated.
666         * generated/sum_r8.c: Regenerated.
667
668 2011-03-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
669
670         PR libgfortran/48047
671         * io/write_float.def (write_float): Change MIN_FIELD_WIDTH to 48.
672
673 2011-03-04  Janne Blomqvist  <jb@gcc.gnu.org>
674
675         PR libfortran/47802
676         * intrinsics/ctime.c (strctime): Use builtins to check localtime_r
677         return type.
678
679 2011-03-04  Janne Blomqvist  <jb@gcc.gnu.org>
680
681         PR libfortran/47802
682         * intrinsics/ctime.c (strctime): Don't use return value of
683         localtime_r.
684
685 2011-02-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
686
687         PR libgfortran/47567
688         * io/write_float.def (output_float): Move handling of w = 0 to after
689         output rounding. Check for zero and set zero_flag accordingly. Set
690         width according to zero_flag. Add better comments.
691
692 2011-02-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
693
694         PR libgfortran/47778
695         * io/list_read.c (namelist_read): Intialize the error string buffere.
696         If pprev_nl was used during the previous namelist read and the rank
697         was zero, reset the pointer to NULL for the next namelist read.
698
699 2011-02-26  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
700
701         PR libfortran/45165
702         * unix.c (fallback_access): Fix file descriptor leaks.
703
704 2011-02-25  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
705
706         * acinclude.m4 (LIBGFOR_CHECK_FPSETMASK): Set shell variable
707         tested in configure.host.
708         * configure: Regenerate.
709
710 2011-02-24  Janne Blomqvist  <jb@gcc.gnu.org>
711
712         PR libfortran/47802
713         * config.h.in: Regenerated.
714         * configure: Regenerated.
715         * configure.ac: Remove checks for ctime and ctime_r, add check for
716         strftime.
717         * intrinsics/date_and_time.c (localtime_r): Move fallback
718         implementation to time_1.h.
719         * intrinsics/time_1.h (localtime_r): Fallback implementation.
720         * intrinsics/ctime.c: Include time_1.h.
721         (ctime_r): Remove fallback implementation.
722         (strctime): New function.
723         (fdate): Use strctime instead of ctime_r.
724         (fdate_sub): Likewise.
725         (ctime): Likewise.
726         (ctime_sub): Likewise.
727
728 2011-02-24  Jakub Jelinek  <jakub@redhat.com>
729
730         PR fortran/47878
731         * io/transfer.c (read_sf): Call fbuf_getptr only at the end,
732         and subtract n, dtp->u.p.sf_seen_eor and seen_comma from it.
733
734 2011-02-24  Janne Blomqvist  <jb@gcc.gnu.org>
735
736         PR libfortran/47802
737         * configure.ac: Add test for POSIX getpwuid_r.
738         * intrinsics/getlog.c (getlog): CPP test for
739         HAVE_POSIX_GETPWUID_R.
740         * config.h.in: Regenerated.
741         * configure: Regenerated.
742
743 2011-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
744
745         PR libgfortran/47567
746         * io/write_float.def (output_float): Remove special case handling of
747         zero with width 1.
748
749 2011-02-23  Janne Blomqvist  <jb@gcc.gnu.org>
750             Jerry DeLisle    <jvdelisle@gcc.gnu.org>
751
752         PR libfortran/47694
753         * io/fbuf.h (fbuf_getptr): New inline function.
754         * io/transfer.c (read_sf): Use fbuf_getptr and fbuf_getc to scan
755         through the string instead of fbuf_read.
756
757 2011-02-22  Tobias Burnus  <burnus@net-b.de>
758             Kai-Uwe Eckhardt  <kuehro@gmx.de>
759
760         PR libfortran/47830
761         * intrinsics/c99_functions.c (roundl): Make C valid for
762         HAVE_NEXTAFTERL.
763
764 2011-02-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
765
766         PR libgfortran/47567
767         * io/write_float.def (output_float): Adjust width for F0.d to
768         allow space for negative signs on zero.
769
770 2011-02-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
771
772         PR libgfortran/47667
773         * io/list_read.c (read_logical): Check for end of line before calling
774         eat_line. (read_integer): Likewise. (parse_real): Don't unget the
775         separator. Check for end of line before calling eat_line.
776         (read_complex): Allow line-end before and after parenthesis and comma.
777         Check for end of line before calling eat_line. (read_real): Check for
778         end of line before calling eat_line.
779
780 2011-02-16  Jakub Jelinek  <jakub@redhat.com>
781
782         PR libfortran/47757
783         * gfortran.map (GFORTRAN_1.4): Export
784         _gfortran_{m,s}i{all,any,parity}_i{1,2,4,8,16} and
785         _gfortran_{cshift0,eoshift{0,2}}_16_char4.
786
787 2011-02-15  Tobias Burnus  <burnus@net-b.de>
788
789         PR fortran/47716
790         PR fortran/47648
791         * acinclude.m4 (LIBGFOR_CHECK_FLOAT128): Use check from
792         libquadmath, which uses more features.
793         * configure: Regenerate.
794
795 2011-02-14  Jakub Jelinek  <jakub@redhat.com>
796
797         PR fortran/47642
798         * io/write_float.def (DTOAQ): Use quadmath_snprintf instead of
799         quadmath_flt128tostr.
800         * io/transfer128.c (tmp2): Initialize to quadmath_snprintf instead
801         of quadmath_flt128tostr.
802
803 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
804
805         * Makefile.in: Regenerate.
806         * aclocal.m4: Likewise.
807         * configure: Likewise.
808
809 2011-02-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
810
811         PR libgfortran/47567
812         * io/write_float.def (output_float): Eliminate some redundant code.
813         Adjust width for case of F0.X for values of zero and all other values.
814         Expand cases where '*' is set to give cleaner results.
815
816 2011-02-05  Janne Blomqvist  <jb@gcc.gnu.org>
817
818         PR libfortran/47571
819         * intrinsics/time_1.h (GF_CLOCK_MONOTONIC): Move to system_clock.c.
820         (weak_gettime): Likewise.
821         (gf_gettime): Change API, move weak_gettime() usage to
822         system_clock.c
823         * intrinsics/system_clock.c (GTHREAD_USE_WEAK): Define.
824         (gf_gettime_mono): New function.
825         (system_clock_4): Use gf_gettime_mono().
826         (system_clock_8): Likewise.
827         * intrinsics/date_and_time.c (date_and_time): Update gf_gettime()
828         usage.
829
830 2011-02-02  Janne Blomqvist  <jb@gcc.gnu.org>
831
832         PR libfortran/47571
833         * configure: Regenerated.
834         * configure.ac: Don't add librt to LIBS.
835         * intrinsics/time_1.h (weak_gettime): Weakref trickery for
836         clock_gettime().
837         (gf_gettime): Use weak_gettime() instead of clock_gettime().
838
839 2011-02-01  Janne Blomqvist  <jb@gcc.gnu.org>
840
841         * intrinsics/time_1.h: Include errno.h needed by fallbacks.
842
843 2011-01-31  Janne Blomqvist  <jb@gcc.gnu.org>
844
845         * intrinsics/time_1.h: Fix definition of GF_CLOCK_MONOTONIC macro.
846
847 2011-01-31  Janne Blomqvist  <jb@gcc.gnu.org>
848
849         * configure.ac: Check for clock_gettime().
850         * configure: Regenerated.
851         * config.h.in: Regenerated.
852         * intrinsics/time_1.h (__time_1): Rename to gf_cputime, add
853         times() fallback.
854         (gf_gettime): New function.
855         * intrinsics/cpu_time.c (__cpu_time_1): Update to call gf_cputime.
856         * intrinsics/date_and_time.c (date_and_time): Use gf_gettime.
857         * intrinsics/dtime.c (dtime_sub): Use gf_cputime.
858         * intrinsics/etime.c (etime_sub): Use gf_cputime.
859         * intrinsics/system_clock.c (system_clock_4): Use gf_gettime.
860         (system_clock_8): Use gf_gettime, increase count rate to allow
861         nanosecond precision, remove overflow prone branch.
862
863 2011-01-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
864
865         PR libgfortran/47434
866         * io/write_float.def (write_infnan): Use calculate_sign to determine
867         if the sign should be given and check field widths accordingly.
868
869 2011-01-29  Kai Tietz  <kai.tietz@onevision.com>
870
871         * intrinsics/ctime.c (ctime_r): Improve implementation.
872
873 2011-01-27  Janne Blomqvist  <jb@gcc.gnu.org>
874
875         PR libfortran/47431
876         * config.h.in: Regenerated.
877         * configure: Regenerated.
878         * configure.ac: Add check for ctime_r().
879         * intrinsics/ctime.c (ctime_r): Fallback implementation.
880         (fdate): Use ctime_r() instead of ctime().
881         (fdate_sub): Likewise.
882         (ctime): Likewise.
883         (ctime_sub): Likewise.
884
885 2011-01-27  Janne Blomqvist  <jb@gcc.gnu.org>
886
887         PR libfortran/47432
888         * config.h.in: Regenerated.
889         * configure: Regenerated.
890         * configure.ac: Add check for ttyname_r.
891         * io/unix.h: Add TTY_NAME_MAX, change stream_ttyname prototype.
892         * io/unix.c (stream_ttyname): Use ttyname_r if available, conform
893         to new prototype.
894         * io/inquire.c (inquire_via_unit): Use changed stream_ttyname.
895         * io/intrinsics.c (ttynam_sub): Likewise.
896         (ttynam): Likewise.
897
898 2011-01-27  Janne Blomqvist  <jb@gcc.gnu.org>
899
900         PR libfortran/47491
901         * configure.ac: Call AC_USE_SYSTEM_EXTENSIONS to enable common
902         extensions.
903         * config.h.in: Regenerate.
904         * configure: Regenerate.
905
906 2011-01-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
907
908         PR libgfortran/47285
909         * io/write_float.def (write_infnan): Adjust processor selected width
910         to 3 if NaN.
911
912 2011-01-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
913
914         PR libgfortran/47285
915         * io/write_float.def (output_float): Return SUCCESS or FAILURE and use
916         the result to set the padding.
917
918 2011-01-26  Kai Tietz  <kai.tietz@onevision.com>
919
920         * intrinsics/getlog.c (getlog): Fix label/statement issue.
921
922 2011-01-25  Janne Blomqvist  <jb@gcc.gnu.org>
923
924         PR libfortran/47375
925         * config.h.in: Regenerated.
926         * configure: Regenerated.
927         * configure.ac: Add check for getpwuid_r.
928         * intrinsics/getlog.c (getlog): Use getpwuid_r() if available.
929
930 2011-01-22  Janne Blomqvist  <jb@gcc.gnu.org>
931
932         PR libfortran/46267
933         * config.h.in: Regenerated.
934         * configure: Regenerated.
935         * configure.ac: Check presence of strerror_r.
936         * intrinsics/gerror.c (gerror): Use gf_strerror, modify logic.
937         * io/unix.c (get_oserror): Remove.
938         * libgfortran.h (gf_strerror): Add prototype.
939         (get_oserror): Remove prototype.
940         * runtime/error.c (gf_strerror): New function.
941         (os_error): Use gf_strerror instead of get_oserror.
942         (generate_errror): Likewise.
943
944 2011-01-17  Janne Blomqvist  <jb@gcc.gnu.org>
945
946         PR libfortran/47296
947         * io/unix.c (tempfile): Set opp->file and opp->file_len also if an
948         error occurs.
949
950 2011-01-16  Jakub Jelinek  <jakub@redhat.com>
951
952         PR fortran/46625
953         * io/write_float.def (DTOAQ): Use quadmath_flt128tostr
954         instead of quadmath_dtoa.
955         * io/transfer128.c (tmp1, tmp2): New variables, bring in
956         strtoflt128 and quadmath_flt128tostr.
957         (transfer_real128, transfer_real128_write, transfer_complex128,
958         transfer_complex128_write): Remove tmp1/tmp2 variables.
959         * io/read.c (convert_real): Use strtoflt128 instead of
960         quadmath_strtopQ, adjust for the changed arguments and return
961         value.
962
963 2011-01-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
964
965         PR libgfortran/47296
966         * io/unix.c (unpack_filename): Return non-zero if the filename passed
967         in is NULL.
968
969 2011-01-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
970
971         PR libgfortran/47154
972         * io/list_read.c (namelist_read): Remove calls to hit_eof to avoid the
973         duplicate calls via next_record.
974
975 \f
976 Copyright (C) 2011 Free Software Foundation, Inc.
977
978 Copying and distribution of this file, with or without modification,
979 are permitted in any medium without royalty provided the copyright
980 notice and this notice are preserved.