OSDN Git Service

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