OSDN Git Service

* Makefile.am: Revert 2005-11-14 change. Enable -free-vectorize
[pf3gnuchains/gcc-fork.git] / libgfortran / ChangeLog
1 2005-11-20  Richard Henderson  <rth@redhat.com>
2
3         * Makefile.am: Revert 2005-11-14 change.  Enable -free-vectorize
4         via gmake per-target variables.
5         * Makefile.in, aclocal.m4: Regenerate.
6
7 2005-11-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
8
9         * configure.ac: Add "-I ." to the AM_FCFLAGS.
10         * configure: Regenerate.
11
12 2005-11-18  Hans-Peter Nilsson  <hp@axis.com>
13
14         * config/fpu-glibc.h (set_fpu): Only call fedisableexcept for
15         nonzero FE_ALL_EXCEPT.
16
17 2005-11-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
18
19         PR fortran/24892
20         * io/io.h (unit_access): Add ACCESS_APPEND.
21         * io/open.c (access_opt): Add APPEND value for ACCESS keyword.
22         (st_open): Use that new value to set the POSITION accordingly.
23
24 2005-11-14  Janne Blomqvist  <jb@gcc.gnu.org>
25
26         PR fortran/21468
27         * Makefile.am: Add -ftree-vectorize for compiling matmul.
28         * m4/matmul.m4: Add const and restrict to type declarations as
29         appropriate.
30         * m4/matmull.m4: Likewise.
31         * Makefile.in: Regenerated.
32         * generated/matmul_*.c: Likewise.
33         
34 2005-11-13  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
35
36         * intrinsics/fget.c: New file.
37         * intrinsics/ftell.c: New file.
38         * io/unix.c (stream_offset): New function.
39         * io/io.h: Add prototype for stream_offset.
40         * Makefile.am: Add intrinsics/fget.c and intrinsics/ftell.c.
41         * Makefile.in: Regenerate.
42
43 2005-11-12  Steven G. Kargl  <kargls@comcast.net>
44
45         PR libgfortran/24787
46         *  intrinsics/string_intrinsics.c (string_scan): Off by one; Fix typos
47         in nearby comment.
48
49 2005-11-10  Andreas Jaeger  <aj@suse.de>
50
51         * libgfortran.h: Add proper defines where needed.
52
53 2005-11-10  Andreas Jaeger  <aj@suse.de>
54
55         * libgfortran.h: Add missing prototypes for internal_pack
56         functions.
57
58 2005-11-06  Janne Blomqvist <jb@gcc.gnu.org>
59
60         PR fortran/24174
61         PR fortran/24305
62         * io/io.h: Add argument to prototypes, add prototypes for
63         size_from_*_kind functions.
64         * io/list_read.c (read_complex): Add size argument, use
65         it.
66         (list_formatted_read): Add size argument, cleanup.
67         (list_formatted_read_scalar): Add size argument.
68         (nml_read_obj): Fix for padding.
69         * io/transfer.c: Add argument to transfer function pointer.
70         (unformatted_read): Add size argument.
71         (unformatted_write): Likewise.
72         (formatted_transfer_scalar): Fix for padding with complex(10).
73         (formatted_transfer): Add size argument, cleanup.
74         (transfer_integer): Add size argument to transfer call.
75         (transfer_real): Likewise.
76         (transfer_logical): Likewise.
77         (transfer_character): Likewise.
78         (transfer_complex): Likewise.
79         (transfer_array): New kind argument, use it.
80         (data_transfer_init): Add size argument to formatted_transfer
81         call.
82         (iolength_transfer): Add size argument, cleanup.
83         * io/write.c (write_complex): Add size argument, fix for padding
84         with complex(10).
85         (list_formatted_write): Add size argument, cleanup.
86         (list_formatted_write_scalar): Add size argument, use it.
87         (nml_write_obj): Fix for size vs. kind issue.
88         * io/size_from_kind.c: New file.
89         * Makefile.am: Add io/size_from_kind.c.
90         * configure: Regenerate.
91         * Makefile.in: Regenerate.
92
93 2005-11-06  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
94
95         * intrinsics/ctime.c: New file.
96         * configure.ac: Add check for ctime.
97         * Makefile.am: Add ctime.c
98         * configure: Regenerate.
99         * config.h.in: Regenerate.
100         * Makefile.in: Regenerate.
101
102 2005-11-05  Richard Guenther  <rguenther@suse.de>
103
104         * configure.ac: Use AM_FCFLAGS for extra flags, not FCFLAGS.
105         * configure: Regenerate.
106
107 2005-11-05  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
108
109         * intrinsics/tty.c (ttynam): New function.
110
111 2005-11-04  Steven G. Kargl <kargls@comcast.net>
112
113         PR fortran/24636
114         * runtime/stop.c (stop_numeric): Use stop_code = -1.
115
116 2005-11-04  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
117
118         PR libfortran/22298
119         * runtime/main.c (stupid_function_name_for_static_linking): New
120         function.
121         * runtime/error.c (internal_error): Call
122         stupid_function_name_for_static_linking.
123         * libgfortran.h: Add prototype for
124         stupid_function_name_for_static_linking.
125
126 2005-11-01  Paul Thomas  <pault@gcc.gnu.org>
127
128         PR fortran/14994
129         * libgfortran/intrinsics/date_and_time.c: Add interface to
130         the functions date_and_time for the intrinsic function secnds.
131
132 2005-10-31  Jerry DeLisle  <jvdelisle@verizon.net>
133
134         PR libgfortran/24584
135         * io/list_read.c (free_saved): Set saved_used to zero.
136
137 2005-10-30  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
138
139         PR libfortran/20179
140         * io/unix.c (flush_if_preconnected): New function.
141         * io/io.h: Add prototype for flush_if_preconnected.
142         * io/transfer.c (data_transfer_init): Use flush_if_preconnected
143         to workaround buggy mixed C-Fortran code.
144
145 2005-10-30  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
146
147         * Makefile.am: Add intrinsics/malloc.c file.
148         * Makefile.in: Regenerate.
149         * intrinsics/malloc.c: New file, with implementations for free
150         and malloc library functions.
151
152 2005-10-29  Mike Stump  <mrs@apple.com>
153
154         * Makefile.am (kinds.h): Remove target, if command fails.
155         (selected_int_kind.inc): Likewise.
156         (selected_real_kind.inc): Likewise.
157         * Makefile.in: Regenerate.
158
159 2005-10-28  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
160
161
162         * Makefile.am (intrinsics): Add signal.c.
163         * Makefile.in: Regenerate.
164         * configure.ac: Checks for signal and alarm.
165         * config.h.in: Regenerate.
166         * configure: Regenerate.
167         * intrinsics/signal.c: New file for SIGNAL and ALARM intrinsics.
168
169 2005-10-28  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
170
171         * acinclude.m4 (LIBGFOR_CHECK_FPSETMASK): New check.
172         * configure.ac: Check for floatingpoint.h, fptrap.h and float.h
173         headers. Use LIBGFOR_CHECK_FPSETMASK. Check for fp_trap and
174         fp_enable functions.
175         * configure.host: Add case for systems with fpsetmask and systems
176         with fp_trap/fp_enable.
177         * config/fpu-sysv.h: New file, FPU code using fpsetmask.
178         * config/fpu-aix.h: New file, FPU code for AIX using fp_trap and
179         fp_enable.
180         * aclocal.m4: Regenerate.
181         * configure: Regenerate.
182         * config.h.in: Regenerate.
183
184 2005-10-24  Jerry DeLisle  <jvdelisle@verizon.net>
185
186         PR libgfortran/24224
187         * libgfortran.h: Remove array stride error code.
188         * runtime/error.c: Remove array stride error.
189         * io/io.h: Change name of 'nml_loop_spec' to 'array_loop_spec' to be
190         generic.  Add pointer to array_loop_spec and rank to gfc_unit
191         structure.
192         * io/list_read.c: Revise nml_loop_spec references to array_loop_spec.
193         * io/transfer.c (init_loop_spec): New function to initialize
194         an array_loop_spec.
195         (next_array_record): New function to return the index to the next array
196         record by incrementing through the array_loop_spec.
197         (next_record_r): Use new function.
198         (next_record_w): Use new function.
199         (finalize_transfer): Free memory allocated for array_loop_spec.
200         * io/unit.c (get_array_unit_len): Delete this function. Use new
201         function init_loop_spec to initialize the array_loop_spec.
202
203 2005-10-24  Paul Thomas  <pault@gcc.gnu.org>
204
205         PR fortran/24416
206         * libgfortran/io/list_read.c (namelist_read): Exit with call to
207         free_saved () so that character strings do not accumulate.
208
209 2005-10-23  Jerry DeLisle  <jvdelisle@verizon.net>
210
211         PR libgfortran/24489
212         * io/transfer.c (read_block): Change the order of execution to not read
213         past end-of-record.
214         (read_block_direct): Same change.
215
216 2005-10-23  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
217
218         PR libfortran/23272
219         * acinclude.m4 (LIBGFOR_CHECK_WORKING_STAT): New check.
220         * configure.ac: Use LIBGFOR_CHECK_WORKING_STAT.
221         * Makefile.in: Regenerate.
222         * configure: Regenerate.
223         * config.h.in: Regenerate.
224         * aclocal.m4: Regenerate.
225         * io/unix.c (compare_file_filename): Add fallback case for
226         systems without working stat.
227         * io/open.c (already_open): Correct call to
228         compare_file_filename.
229         * io/io.h: Correct proto for compare_file_filename.
230
231 2005-10-23  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
232
233         * runtime/fpu.c: Add _GNU_SOURCE definition.
234         * config/fpu-glibc.h: Remove __USE_GNU definition.
235
236 2005-10-23  Paul Thomas  <pault@gcc.gnu.org>
237
238         PR fortran/24384
239         * intrinsics/spread_generic.c (spread_internal_scalar): New
240         function that handles the special case of spread with a scalar
241         source. This has new interface functions -
242         (spread_scalar, spread_char_scalar): New functions to interface
243         with the calls specified in gfc_resolve_spread.
244
245 2005-10-21  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
246
247         PR libfortran/24383
248         * io/unix.c: Add fallback definition for SSIZE_MAX.
249
250 2005-10-19  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
251
252         * c99_protos.h: Define preprocessor HAVE_ macros with value 1
253         instead of empty value.
254         * intrinsics/c99_functions.c: Likewise.
255         * intrinsics/getXid.c: Define HAVE_GETPID with value 1 instead of
256         empty value.
257         * intrinsics/sleep.c: Define HAVE_SLEEP with value 1 instead of
258         empty value.
259
260 2005-10-19  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
261
262         PR libfortran/24432
263         * c99_protos.h: Define HAVE_ macros for all provided functions.
264
265 2005-10-14  Uros Bizjak  <uros@kss-loka.si>
266
267         * config/fpu-387.h (set_fpu): Remove extra ":" in stmxcsr.
268         Change cw and cw_sse variables to unsigned.
269         (SSE): New definition.
270         (has_sse): Use it.
271
272 2005-10-13  Thomas Koenig  <Thomas.Koenig@online.de>
273
274         * io/unix.c(fd_alloc_r_at):  Use read() instead of do_read()
275         only in case of special files (e.g. terminals).
276
277 2005-10-13  Uros Bizjak  <uros@kss-loka.si>
278
279         * config/fpu-387.h (set_fpu): Add "=m" for stmxcsr.
280
281 2005-10-12  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
282
283         * Makefile.am: Add fpu.c to the build process, and
284         target-dependent code as fpu-target.h.
285         * Makefile.in: Regenerate.
286         * configure.ac: Add call to configure.host to set
287         FPU_HOST_HEADER.
288         * configure: Regenerate.
289         * configure.host: New script to determine which host-dependent
290         code should go in.
291         * libgfortran.h: Add fpe option, remove previous fpu_ options.
292         Add bitmasks for different FPE traps. Add prototype for set_fpu.
293         * runtime/environ.c: Remove environment variables to control
294         fpu behaviour.
295         * runtime/fpu.c (set_fpe): New function for the front-end.
296         * runtime/main.c (init): Set FPU state.
297         * config: New directory to store host-dependent code.
298         * config/fpu-387.h: New file with code handling the i387 FPU.
299         * config/fpu-glibc.h: New file with code for glibc systems.
300         * config/fpu-generic.h: Fallback for the most generic host. Issue
301         warnings.
302
303 2005-10-12  Janne Blomqvist <jblomqvi@cc.hut.fi>
304
305         * io/unix.c(fd_alloc_r_at): Remove parts of patch of 2005/10/07 that
306         cause input from the terminal to hang.
307
308 2005-10-11  Steven G. Kargl  <kargls@comcast.net>
309
310         PR libgfortran/24313
311         *  c99_functions.c (csqrtf, csqrt): Fix choice of branch cut.  Note
312         csqrt{f} were imported from glibc, and this bug is still present
313         there. glibc PR is 1146.
314
315 2005-10-07  Janne Blomqvist <jblomqvi@cc.hut.fi>
316
317         PR fortran/16339
318         PR fortran/23363
319         * io/io.h: Add read and write members to stream, define access
320         macros.
321         * io/transfer.c (read_block_direct): New function.
322         (write_block_direct): New function.
323         (unformatted_read): Change to use read_block_direct.
324         (unformatted_write): Change to use write_block_direct.
325         * io/unix.c: Remove mmap includes and defines.
326         (writen): Remove.
327         (readn): Remove.
328         (reset_stream): New function.
329         (do_read): New function.
330         (do_write): New function.
331         (fd_flush): Change to use do_write() instead of writen().
332         (fd_alloc_r_at): Change to use do_read().
333         (fd_seek): Change return type to try, as the prototype. Add check
334         to avoid syscall overhead if possible.
335         (fd_read): New function.
336         (fd_write): New function.
337         (fd_open): Set pointers for new functions.
338         (mem_read): New function.
339         (mem_write): New function.
340         (open_internal): Set pointers for new functions.
341         (is_seekable): Clean up comment.
342
343 2005-10-07  Jerry DeLisle  <jvdelisle@verizon.net>
344
345         * io/transfer.c (write_block): Add test for end-of-file condition,
346         removed from mem_alloc_w_at. (next_record_w): Clean up checks for
347         NULL pointer returns from s_alloc_w.
348         * io/unix.c (mem_alloc_w_at): Remove call to generate_error end-of-file.
349         * io/write.c (write_float): Add checks for NULL pointer returns from
350         write_block calls. (write_integer): Same.
351
352 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
353
354         * runtime/memory.c (allocate_size): Malloc 1 byte if size == 0.
355
356 2005-10-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
357
358         PR libfortran/19308
359         PR libfortran/22437
360         * Makefile.am: Add generated files for large real and integers
361         kinds. Add a rule to create the kinds.inc c99_protos.inc files.
362         Use kinds.inc to preprocess Fortran generated files.
363         * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE,
364         GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16,
365         gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16,
366         gfc_array_l16.
367         * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and
368         HAVE_GFC_COMPLEX_* when these types are available.
369         * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16.
370         * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4,
371         m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4,
372         m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4,
373         m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4,
374         m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4,
375         m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4,
376         m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4,
377         m4/sum.m4, m4/transpose.m4: Protect generated functions with
378         appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives.
379         * Makefile.in: Regenerate.
380         * all files in generated/: Regenerate.
381
382 2005-10-01  Jakub Jelinek  <jakub@redhat.com>
383
384         * runtime/memory.c (malloc_t): Remove.
385         (GFC_MALLOC_MAGIC, HEADER_SIZE, DATA_POINTER, DATA_HEADER): Remove.
386         (mem_root, runtime_cleanup, malloc_with_header): Remove.
387         (internal_malloc_size): Use just get_mem if size != 0, return NULL
388         otherwise.
389         (internal_free): Just free if non-NULL.
390         (internal_realloc_size): Remove debugging stuff.
391         (allocate_size): Use malloc directly, remove debugging stuff.
392         (deallocate): Use free directly, fix error message wording.
393
394         * libgfortran.h (GFC_ITOA_BUF_SIZE, GFC_XTOA_BUF_SIZE,
395         GFC_OTOA_BUF_SIZE, GFC_BTOA_BUF_SIZE): Define.
396         (gfc_itoa, xtoa): Add 2 extra arguments.
397         * runtime/environ.c: Include stdio.h.
398         (check_buffered): Use sprintf.
399         * runtime/error.c: Include assert.h.
400         (gfc_itoa, xtoa): Add 2 extra arguments, avoid using static
401         buffers.
402         (st_printf, st_sprintf): Adjust callers.
403         * io/write.c (otoa, btoa): Add 2 extra arguments, avoid using
404         static buffers.
405         (write_int, write_decimal): Add 2 extra arguments to conv
406         function pointer, adjust caller.
407         (write_integer): Adjust gfc_itoa caller.
408
409         * io/unit.c (get_array_unit_len): Return 0 rather than NULL.
410
411         * io/read.c (read_f): Remove spurious pointer dereference.
412
413 2005-09-30  Janne Blomqvist <jblomqvi@cc.hut.fi>
414
415         PR 24112
416         * io/open.c (edit_modes): Check for correct flag.
417
418 2005-09-29  Jakub Jelinek  <jakub@redhat.com>
419
420         * runtime/string.c (find_option): Change 3rd argument to
421         const st_option *.
422         * libgfortran.h (find_option): Likewise.
423         * runtime/environ.c (rounding, precision, signal_choices): Constify.
424         (init_choice, show_choice): Change 2nd argument to const choice *.
425         * io/open.c (access_opt, action_opt, blank_opt, delim_opt, form_opt,
426         position_opt, status_opt, pad_opt): Constify.
427         * io/transfer.c (advance_opt): Likewise.
428         * io/inquire.c (undefined): Likewise.
429         * io/close.c (status_opt): Likewise.
430         * io/format.c (posint_required, period_required, nonneg_required,
431         unexpected_element, unexpected_end, bad_string, bad_hollerith,
432         reversion_error): Likewise.
433         * io/unix.c (yes, no, unknown): Change from const char *
434         into const char [].
435
436 2005-09-27  Steve Ellcey  <sje@cup.hp.com>
437
438         PR target/23552
439         * acinclude.m4 (LIBGFOR_CHECK_FOR_BROKEN_ISFINITE): New.
440         (LIBGFOR_CHECK_FOR_BROKEN_ISNAN): New.
441         (LIBGFOR_CHECK_FOR_BROKEN_FPCLASSIFY): New.
442         * configure.ac (LIBGFOR_CHECK_FOR_BROKEN_ISFINITE): Add use.
443         (LIBGFOR_CHECK_FOR_BROKEN_ISNAN): Add use.
444         (LIBGFOR_CHECK_FOR_BROKEN_FPCLASSIFY): Add use.
445         * configure: Regenerate.
446         * config.h.in: Regenerate.
447         * libgfortan.h (isfinite): undef if broken, set if needed.
448         (isnan): undef if broken, set if needed.
449         (fpclassify): undef if broken, set if needed.
450         * io/write.c: Remove TODO comment about working isfinite.
451         * intrinsics/c99_functions.c (round): Use isfinite instead
452         of fpclassify.
453         * intrinsics/c99_functions.c (roundf): Ditto.
454
455 2005-09-24  Janne Blomqvist <jblomqvi@cc.hut.fi>
456
457         * io.h: Changed prototypes of list_formatted_{read|write}.
458         * list_read.c (list_formatted_read): Renamed to
459         list_formatted_read_scalar and made static.
460         (list_formatted_read): New function.
461         * transfer.c: Prototype for transfer_array. Changed transfer
462         function pointer.
463         (unformatted_read): Add nelems argument, use it.
464         (unformatted_write): Likewise.
465         (formatted_transfer): Changed name to formatted_transfer_scalar.
466         (formatted_transfer): New function.
467         (transfer_integer): Add nelems argument to transfer call, move
468         updating item count to transfer functions.
469         (transfer_real): Likewise.
470         (transfer_logical): Likewise.
471         (transfer_character): Likewise.
472         (transfer_complex): Likewise.
473         (transfer_array): New function.
474         (data_transfer_init): Call formatted_transfer with new argument.
475         (iolength_transfer): New argument, use it.
476         * write.c (list_formatted_write): Renamed to
477         list_formatted_write_scalar, made static.
478         (list_formatted_write): New function.
479
480 2005-09-26  David Edelsohn  <edelsohn@gnu.org>
481
482         * configure.ac: Add check for __clog.
483         * configure: Regenerate.
484
485 2005-09-25  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
486
487         * c99_protos.h: Add prototypes for C99 complex functions.
488         * libgfortran.h: Include complex.h before c99_protos.h.
489         * intrinsics/c99_functions.c: Define HAVE_ macros for the
490         fallback functions we provide.
491         (cabsf, cabs, cabsl, cargf, carg, cargl, cexpf, cexp, cexpl,
492         clogf, clog, clogl, clog10f, clog10, clog10l, cpowf, cpow, cpowl,
493         cqsrtf, csqrt, csqrtl, csinhf, csinh, csinhl, ccoshf, ccosh,
494         ccoshl, ctanhf, ctanh, ctanhl, csinf, csin, csinl, ccosf, ccos,
495         ccosl, ctanf, ctan, ctanl): New fallback functions.
496         * Makefile.am (gfor_math_trig_c, gfor_math_trig_obj,
497         gfor_specific_c, gfor_cmath_src, gfor_cmath_obj): Remove.
498         * Makefile.in: Regenerate.
499         * configure.ac: Remove checks for csin. Add checks for all C99
500         complex functions.
501         * config.h.in: Regenerate.
502         * configure: Regenerate.
503         * aclocal.m4: Regenerate.
504
505 2005-09-25  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
506             Danny Smith  <dannysmith@users.sourceforge.net>
507
508         PR libfortran/23803
509         * intrinsics/getXid.c: Add getpid wrapper for MinGW.
510         * intrinsics/getlog.c: Add getlogin wrapper for MinGW.
511         * intrinsics/hostnm.c: Add gethostname wrapper for MinGW.
512
513 2005-09-24  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
514
515         PR libfortran/23802
516         * intrinsics/sleep.c: Add correct sleep macro for MinGW.
517
518 2005-09-24  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
519
520         PR libfortran/23380
521         * intrinsics/cpu_time.c (__cpu_time_1): Provide a MS Windows
522         version.
523
524 2005-09-14  Jerry DeLisle  <jvdelisle@verizon.net
525
526         PR fortran/21875 Internal Unit Array I/O, NIST
527         * libgfortran.h: Add run time error code for array stride.
528         * runtime/error.c (translate_error): Add error message for
529         array stride.
530         * io/io.h: Add array descriptor pointer to IOPARM structure.
531         Add prtotypes for two new functions.
532         * io/transfer.c (data_transfer_init): Removed initialization and
533         moved to unit.c (get_unit)
534         * io/transfer.c (next_record_r): Include internal unit read
535         functionality.
536         * io/transfer.c (next_record_w): Include internal unit write
537         functionality, including padding of character array records.
538         * io/unit.c (get_array_unit_len): New function to return the number
539         of records in the character array 'file' from the array descriptor.
540         * io/unit.c (get_unit): Gathered initialization code from
541         init_data_transfer for internal units and added initialization of
542         character array unit.
543         * io/unit.c (is_array_io): New function to determine if internal unit
544         is an array.
545         * io/unix.c (mem_alloc_w_at): Add error checks for bad record length
546         and end of file.
547
548 2005-09-13  Richard Sandiford  <richard@codesourcery.com>
549
550         PR target/19269
551         * intrinsics/cshift0.c (cshift0): Add an extra size argument.
552         (cshift0_1, cshift0_2, cshift0_4, cshift0_8): Replace explicit
553         implementations with...
554         (DEFINE_CSHIFT): ...this new macro.  Define character versions too.
555         * intrinsics/eoshift0.c (zeros): Delete.
556         (eoshift0): Add extra size and filler arguments.  Use memset if no
557         bound is provided.
558         (eoshift0_1, eoshift0_2, eoshift0_4, eoshift0_8): Replace explicit
559         implementations with...
560         (DEFINE_EOSHIFT): ...this new macro.  Define character versions too.
561         * intrinsics/eoshift2.c (zeros): Delete.
562         (eoshift2): Add extra size and filler arguments.  Use memset if no
563         bound is provided.
564         (eoshift2_1, eoshift2_2, eoshift2_4, eoshift2_8): Replace explicit
565         implementations with...
566         (DEFINE_EOSHIFT): ...this new macro.  Define character versions too.
567         * intrinsics/pack.c (pack_internal): New static function, reusing
568         the contents of pack and adding an extra size argument.  Change
569         "mptr" rather than "m" when calculating the array size.
570         (pack): Redefine as a forwarder to pack_internal.
571         (pack_s_internal): New static function, reusing the contents of
572         pack_s and adding an extra size argument.
573         (pack_s): Redefine as a forwarder to pack_s_internal.
574         (pack_char, pack_s_char): New functions.
575         * intrinsics/reshape.c (reshape_internal): New static function,
576         reusing the contents of reshape and adding an extra size argument.
577         (reshape): Redefine as a forwarder to reshape_internal.
578         (reshape_char): New function.
579         * intrinsics/spread.c (spread_internal): New static function,
580         reusing the contents of spread and adding an extra size argument.
581         (spread): Redefine as a forwarder to spread_internal.
582         (spread_char): New function.
583         * intrinsics/transpose.c (transpose_internal): New static function,
584         reusing the contents of transpose and adding an extra size argument.
585         (transpose): Redefine as a forwarder to transpose_internal.
586         (transpose_char): New function.
587         * intrinsics/unpack.c (unpack_internal): New static function, reusing
588         the contents of unpack1 and adding extra size and fsize arguments.
589         (unpack1): Redefine as a forwarder to unpack_internal.
590         (unpack0): Call unpack_internal instead of unpack1.
591         (unpack1_char, unpack0_char): New functions.
592         * m4/cshift1.m4 (cshift1): New static function, reusing the contents
593         of cshift1_<kind> and adding an extra size argument.
594         (cshift1_<kind>): Redefine as a forwarder to cshift1.
595         (cshift1_<kind>_char): New function.
596         * m4/eoshift1.m4 (zeros): Delete.
597         (eoshift1): New static function, reusing the contents of
598         eoshift1_<kind> and adding extra size and filler arguments.
599         Fix calculation of hstride.  Use memset if no bound is provided.
600         (eoshift1_<kind>): Redefine as a forwarder to eoshift1.
601         (eoshift1_<kind>_char): New function.
602         * m4/eoshift3.m4 (zeros): Delete.
603         (eoshift3): New static function, reusing the contents of
604         eoshift3_<kind> and adding extra size and filler arguments.
605         Use memset if no bound is provided.
606         (eoshift3_<kind>): Redefine as a forwarder to eoshift3.
607         (eoshift3_<kind>_char): New function.
608         * generated/cshift1_4.c, generated/cshift1_8.c,
609         * generated/eoshift1_4.c, generated/eoshift1_8.c,
610         * generated/eoshift3_4.c, generated/eoshift3_8.c: Regenerate.
611
612 2005-09-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
613
614         PR libfortran/20179
615         * io/unix.c (is_preconnected): Add function to test if a stream
616         corresponds to a preconnected unit.
617         * io/io.h: Add prototype for is_preconnected.
618         * io/transfer.c (data_transfer_init): Do not truncate
619         preconnected units.
620
621 2005-09-10  Janne Blomqvist  <jblomqvi@cc.hut.fi>
622
623         * io/unix.c: Remove mmap code.
624
625 2005-09-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
626
627         PR libfortran/23784
628         * io/close.c (st_close): Call library_end even in case of error.
629
630 2005-09-09  Thomas Koenig  <Thomas.Koenig@online.de>
631
632         * io/io.h:  Add iomsg as last field of st_parameter.
633         * runtime/error.c (generate_error):  If iomsg is present, copy
634         the message there.
635
636 2005-09-09  Richard Sandiford  <richard@codesourcery.com>
637
638         PR fortran/12840
639         * runtime/memory.c (internal_malloc_size): Return a null pointer
640         if the size is zero.
641         (internal_free): Do nothing if the pointer is null.
642         (internal_realloc_size, internal_realloc, internal_realloc64): New.
643
644 2005-09-07  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
645
646         PR libfortran/23262
647         * acinclude.m4 (LIBGFOR_CHECK_CRLF): New check.
648         * configure.ac: Use new check.
649         * configure.in: Regenerate.
650         * config.h.in: Regenerate.
651         * configure: Regenerate.
652         * io/transfer.c (next_record_w): Add case for CRLF as line
653         terminator.
654         * io/unix.c (tempfile, regular_file): Open files with
655         O_BINARY on systems with CRLF.
656
657 2005-09-07  Steve Ellcey  <sje@cup.hp.com>
658
659         PR libfortran/23419
660         * io/write.c (extract_int): Use memcpy to access buffer.
661         (extract_uint): Ditto.
662         (extract_real): Ditto.
663
664 2005-09-05  Thomas Koenig  <Thomas.Koenig@online.de>
665
666         * io/list_read.c:  Adjust size of of value to 32 (to hold
667         kind=16 complex values).
668
669 2005-09-04  Thomas Koenig  <Thomas.Koenig@online.de>
670
671         PR libfortran/23321
672         * io/transfer.c(data_transfer_init):  Check for a too-large
673         record number.  Return if sseek failed.
674
675 2005-09-03  Jakub Jelinek  <jakub@redhat.com>
676
677         * io/read.c (read_x): Take int argument instead of fnode * and
678         digging the N from F->u.n.
679         * io/io.h (read_x): Adjust prototype.
680         * io/transfer.c (formatted_transfer): Adjust callers.  Don't clobber
681         f->u.n for FMT_T.
682
683 2005-09-02  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
684
685         * io/unix.c (stream_ttyname): Protect use of ttyname by
686         HAVE_TTYNAME macro.
687         * configure.ac: Add check for ttyname.
688         * config.h.in: Regenerate.
689         * configure: Regenerate.
690
691 2005-09-02  Andreas Jaeger  <aj@suse.de>
692
693         * libgfortran.h: Add prototype for init_compile_options.
694
695         * io/io.h: Add prototype for notify_std.
696
697 2005-08-31  Steve Ellcey  <sje@cup.hp.com>
698
699         * io/read.c (set_integer): Use memcpy to fill buffer.
700
701 2005-08-31  Steve Ellcey  <sje@cup.hp.com>
702
703         PR target/23556
704         * io/read.c (convert_real): Use memcpy to fill buffer.
705
706 2005-08-29  Thomas Koenig  <Thomas.Koenig@online.de>
707
708         PR libfortran/23598
709         * io/lock.c(library_start):  If ioparm.iostat is present, clear
710         it unconditionally.
711
712 2005-08-27  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
713
714         * acinclude.m4 (LIBGFOR_CHECK_UNLINK_OPEN_FILE): Add check to see
715         if target can unlink open files.
716         * configure.ac: Use this new test.
717         * config.h.in: Regenerate.
718         * configure: Regenerate.
719         * Makefile.in: Regenerate.
720         * aclocal.ac: Regenerate.
721         * io/io.h: Add prototype for unpack_filename.
722         * io/close.c (st_close): Delete file after closing unit if
723         HAVE_UNLINK_OPEN_FILE is not defined.
724         * io/unix.c (unpack_filename): Unlink scratch file after opening
725         it only if HAVE_UNLINK_OPEN_FILE is defined.
726
727 2005-08-17  Kelley Cook  <kcook@gcc.gnu.org>
728
729         * All files: Update FSF address.
730
731 2005-08-16  Thomas Koenig  <Thomas.Koenig@online.de>
732
733         PR libfortran/23428
734         * io/transfer.c (iolength_transfer):  Remove __attribute__ ((unused))
735         from type.  Return correct length for inquire(iolength=)
736         for complex variables.
737
738 2005-08-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
739             Steven Bosscher  <stevenb@suse.de>
740
741         PR libfortran/20006
742         * Makefile.am: Add file runtime/compile_options.c.
743         * Makefile.in: Regenerate.
744         * libgfortran.h: Create structure compile_options_t. Define the
745         compile_options variable and GFC_STD_ macros.
746         * runtime/compile_options.c: New file.
747         * runtime/error.c (notify_std): New function.
748         * runtime/main.c (init): Call init_compile_options during
749         initialization.
750         * io/format.c: Use the new notify_std function for the $
751         descriptor extension.
752
753 2005-08-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
754         * Makefile.am: Add file intrinsics/tty.c to Makefile process.
755         * Makefile.in: Regenerate.
756         * io/io.h: Prototypes for new functions stream_isatty and
757         stream_ttyname.
758         * io/unix (stream_isatty, stream_ttyname): New functions to call
759         isatty() and ttyname() on a given unit.
760         * intrinsics/tty.c: New file to implement g77 intrinsics TTYNAM
761         and ISATTY.
762
763 2005-08-08  Jerry DeLisle  <jvdelisle@verizon.net>
764
765         PR libfortran/23154
766         * io/transfer.c (data_transfer_init): Initialize
767         current_unit->bytes_left for a read.
768
769 2005-08-07  Janne Blomqvist  <jblomqvi@cc.hut.fi>
770
771         PR fortran/22390
772         * io/backspace.c: File removed, contents moved to ...
773         * io/endfile.c: Ditto.
774         * io/rewind.c: Ditto.
775         * io/file_pos.c: New file, ... here.
776         * Makefile.am: Add file_pos.c to list, remove obsolete files.
777         * Makefile.in: Regenerated.
778
779 2005-08-07  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
780
781         * io/io.h: Change DEFAULT_TEMPDIR to /tmp instead of /var/tmp.
782         * io/unix.c (tempfile): Look at the TEMP environment variable
783         to find the temporary files directory. Whitespace correction.
784
785 2005-08-06  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
786
787         * io/unix.c: Add O_RDWR to open() call.
788
789 2005-08-04 Paul Thomas  <pault@gcc.gnu.org>
790
791         * transfer.c (data_transfer_init): Truncate file in
792         sequential WRITE when last_record == 0, rather than
793         current_record.  Cures problem on RH9.
794
795 2005-08-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
796
797         * libgfortran.h: When isfinite is not provided by the system,
798         define it as a macro, so that it can accept any floating point
799         type.
800
801 2005-08-01  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
802
803         PR libfortran/23178
804         * intrinsics/flush.c (flush_i8): Add function flush_i8. Update
805         copyright years.
806
807 2005-07-31  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
808
809         PR libfortran/21787
810         * intrinsics/abort.c (abort): Close units before aborting.
811         Updated copyright years.
812
813 2005-07-30  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
814
815         PR libfortran/22436
816         * io/write.c (write_real): Add default formats for real(10) and
817         real(16).
818
819 2005-07-30 Paul Thomas  <pault@gcc.gnu.org>
820
821         PR fortran/22570 and related issues.
822         * transfer.c (formatted_transfer): Make sure that there
823         really is data present before X- or T- editing. Move all
824         treatment of tabbing during writes to start of next data
825         producing format. Suppress incorrect zeroing of bytes_left
826         in slash formating. Insert int cast for assignment of a
827         difference of two gfc_offsets.
828
829 2005-07-23  Jerry DeLisle  <jvdelisle@verizon.net>
830
831         * io/write.c (write_float): Revise output of IEEE exceptional
832         values to comply with F95 and F2003 standards.
833
834 2005-07-22 Jerry DeLisle <jvdelisle@verizon.net>
835
836         PR libfortran/22570
837         * io/unit.c (init_units): Replace BLANK_ZERO with
838         BLANK_UNSPECIFIED.
839
840 2005-07-22 Jerry DeLisle <jvdelisle@verizon.net>
841
842         PR libfortran/21875  (FM111.f)
843         * io/read.c (next_char): Return a ' ' character when BLANK_ZERO
844         or BLANK_NULL are active.
845         (read_decimal): Interpret ' ' character correctly for BZ or BN.
846         (read_radix): Interpret ' ' character correctly for BZ or BN.
847         (read_f): Interpret ' ' character correctly for BZ or BN.
848
849 2005-07-22 Paul Thomas  <pault@gcc.gnu.org>
850
851         PR libfortran/22570
852         * read.c (read_x): Correct the condition for doing the
853         x-editing during formatted input.
854         * transfer.c (formatted_transfer): Cast offset difference
855         as int, clean-up arithmetic with new variable, bytes_used,
856         zero counters for FMT_SLASH,
857         (data_transfer_init) Zero X- and T-editing counters
858         unconditionally.
859         (next_record_w) Zero X- and T-editing counters.
860         unconditionally.
861
862 2005-07-17  Jerry DeLisle  <jvdelisle@verizon.net>
863
864         * io/write.c (write_float): Fix field width checks for
865         printing 'Infinity' or 'Inf'.
866         (output_float): Fix typo in comment.
867
868 2005-07-12 Paul Thomas  <pault@gcc.gnu.org>
869
870         PR libfortran/16435
871         * transfer.c (formatted_transfer): Correct the problems
872         with X- and T-editting that caused TLs followed by TRs
873         to overwrite data, which caused NIST FM908.FOR to fail
874         on many tests.
875         (data_transfer_init): Zero X- and T-editting counters at
876         the start of formatted IO.
877         * write.c (write_x): Write specified number of skips with
878         specified number of spaces at the end.
879
880 2005-07-13 Paul Thomas  <pault@gcc.gnu.org>
881
882         * io/read.c (read_complex): Prevent X formatting during reads
883         from going beyond EOR to fix NIST fm908.FOR failure.
884         * io/list_read.c (read_complex): Allow complex data in list-
885         directed reads to have eols either side of the comma to
886         fix NIST FM906.FOR failure.
887
888 2005-07-12  Thomas Koenig  <Thomas.Koenig@online.de>
889
890         PR libfortran/21593
891         * io/unix.c:  Add member special_file to type unix_stream.
892         (fd_truncate):  Don't call ftruncate or chsize if
893         s refers to a special file.
894         (fd_to_stream):  initialize s->special_file.
895
896 2005-07-11  David Edelsohn  <edelsohn@gnu.org>
897
898         PR libgfortran/22412
899         * io/write.c (otoa): Bias p by SCRATCH_SIZE, not
900         sizeof (SCRATCH_SIZE).
901         (btoa): Same.
902
903 2005-07-09  Jerry DeLisle  <jvdelisle@verizon.net>
904
905         PR libfortran/21875  (FM111.f)
906         * io/read.c (next_char): Return a ' ' character when BLANK_ZERO or
907         BLANK_NULL are active.
908         (read_decimal): Interpret ' ' character correctly for BZ or BN.
909         (read_radix): Interpret ' ' character correctly for BZ or BN.
910         (read_f): Interpret ' ' character correctly for BZ or BN.
911         * gfortran.dg/test (fmt_read_bz_bn.f90): New test case.
912
913 2005-07-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
914             Thomas Koenig  <Thomas.Koenig@online.de>
915
916         PR libfortran/22217
917         * io/write.c (extract_unit):  New function; extract
918         ints as unsigned signed int of the correct size.
919         (write_int):  Use it.
920         * runtime/error.c:  Adjust copyright years.
921         Adjust size of buffer to maximum that can occur.
922
923 2005-07-07  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
924
925         * libgfortran.h (GFC_ARRAY_DESCRIPTOR): Replace 'type *base' by
926         'size_t offset'.
927         * intrinsics/cshift0.c, intrinsics/eoshift0.c,
928         intrinsics/eoshift2.c,intrinsics/pack_generic.c,
929         intrinsics/reshape_generic.c, intrinsics/spread_generic.c,
930         intrinsics/transpose_generic.c, intrinsics/unpack_generic,
931         m4/cshift1.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/iforeach.m4,
932         m4/ifunction.m4, m4/matmul.m4, m4/matmull.m4, m4/reshape.m4,
933         m4,transpose.m4: Set renamed field 'offset' to zero instead of
934         'base'.
935         * generated/all_l4.c, generated/all_l8.c,
936         generated/any_l4.c, generated/any_l8.c, generated/count_4_l4.c,
937         generated/count_4_l8.c, generated/count_8_l4.c,
938         generated/count_8_l8.c, generated/chift1_4.c,
939         generated/cshift1_8.c, generated/eoshift1_4.c,
940         generated/eoshift1_8.c, generated/eoshift3_4.c,
941         generated/eoshift3_8.c, generated/matmul_c4.c,
942         generated/matmul_c8.c, generated/matmul_i4.c, matmul_i8.c,
943         generated/matmul_l4.c, generated/matmul_l8.c,
944         generated/matmul_r4.c, generated/matmul_r8.c,
945         generated/maxloc0_4_i4.c, generated/maxloc0_4_i8.c,
946         generated/maxloc0_4_r4.c, generated/maxloc0_4_r8.c,
947         generated/maxloc0_8_i4.c, generated/maxloc0_8_i8.c,
948         generated/maxloc0_8_r4.c, generated/maxloc0_8_r8.c,
949         generated/maxloc1_4_i4.c, generated/maxloc1_4_i8.c,
950         generated/maxloc1_4_r4.c, generated/maxloc1_4_r8.c,
951         generated/maxloc1_8_i4.c, generated/maxloc1_8_i8.c,
952         generated/maxloc1_8_r4.c, generated/maxloc1_8_r8.c,
953         generated/maxval_i4.c, generated/maxval_i8.c,
954         generated/maxval_r4.c, generated/maxval_r8.c,
955         generated/minloc0_4_i4.c, generated/minloc0_4_i8.c,
956         generated/minloc0_4_r4.c, generated/minloc0_4_r8.c,
957         generated/minloc0_8_i4.c, generated/minloc0_8_i8.c,
958         generated/minloc0_8_r4.c, generated/minloc0_8_r8.c,
959         generated/minloc1_4_i4.c, generated/minloc1_4_i8.c,
960         generated/minloc1_4_r4.c, generated/minloc1_4_r8.c,
961         generated/minloc1_8_i4.c, generated/minloc1_8_i8.c,
962         generated/minloc1_8_r4.c, generated/minloc1_8_r8.c,
963         generated/minval_i4.c, generated/minval_i8.c,
964         generated/minval_r4.c, generated/minval_r8.c,
965         generated/product_c4.c, generated/product_c8.c,
966         generated/product_i4.c, generated/product_i8.c,
967         generated/product_r4.c, generated/product_r8.c,
968         generated/reshape_c4.c, generated/reshape_c8.c,
969         generated/reshape_i4.c, generated/reshape_i8.c,
970         generated/sum_c4.c, generated/sum_c8.c, generated/sum_i4.c,
971         generated/sum_i8.c, generated/sum_r4.c, generated/sum_r8.c,
972         generated/transpose_c4.c, generated/transpose_c8.c,
973         generated/transpose_i4.c, generated/transpose_i8.c: Regenerate:
974
975 2005-07-07  Thomas Koenig  <Thomas.Koenig@online.de>
976
977         PR libfortran/21594
978         * intrinsics/eoshift0.c:  If abs(shift) > len, fill the
979         the whole array with the boundary value, but don't overrun it.
980         * intrinsics/eoshift2.c:  Likewise.
981         * m4/eoshift1.m4:  Likewise.
982         * m4/eoshift3.m4:  Likewise.
983         * generated/eoshift1_4.c:  Regenerated.
984         * generated/eoshift1_8.c:  Regenerated.
985         * generated/eoshift3_4.c:  Regenerated.
986         * generated/eoshift3_8.c:  Regenerated.
987
988 2005-07-07  Feng Wang  <fengwang@nudt.edu.cn>
989
990         PR fortran/16531
991         * io/transfer.c (formatted_transfer): Enable FMT_A on other types to
992         support Hollerith constants.
993
994 2005-07-01  Andreas Jaeger  <aj@suse.de>
995
996         * intrinsics/unpack_generic.c: Remove const from parameter.
997
998         * io/transfer.c (formatted_transfer): Remove unused variable.
999
1000 2005-06-28  Thomas Koenig  <Thomas.Koenig@online.de>
1001
1002         PR libfortran/22142
1003         * m4/eoshift1.m4:  Correct bstride (it needs to be multiplied
1004         by size since it's a char pointer).
1005         * m4/eoshift1_4.c:  Regenerated.
1006         * m4/eoshift1_8.c:  Regenerated.
1007
1008 2005-06-28  Thomas Koenig  <Thomas.Koenig@online.de>
1009
1010         PR libfortran/22142
1011         * m4/eoshift3.m4:  Correct bstride (it needs to be multiplied
1012         by size since it's a char pointer).
1013         * m4/eoshift3_4.c:  Regenerated.
1014         * m4/eoshift3_8.c:  Regenerated.
1015
1016 2005-06-28  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1017
1018         PR libfortran/22170
1019         * io/transfer.c (formatted_transfer): Do not iterate on the
1020         repeat count of a FMT_SLASH, since this is already done in
1021         next_format().
1022
1023 2005-06-25  Thomas Koenig  <Thomas.Koenig@online.de>
1024
1025         PR libfortran/22144
1026         * m4/cshift1.m4: Remove const from argument ret.
1027         Populate return array descriptor if ret->data is NULL.
1028         * m4/eoshift1.m4: Likewise.
1029         * m4/eoshift3.m4: Likewise.
1030         * generated/cshift1_4.c:  Regenerated.
1031         * generated/cshift1_8.c:  Regenerated.
1032         * generated/eoshift1_4.c:  Regenerated.
1033         * generated/eoshift1_8.c:  Regenerated.
1034         * generated/eoshift3_4.c:  Regenerated.
1035         * generated/eoshift3_8.c:  Regenerated.
1036
1037 2005-06-24  Jerry DeLisle <jvdelisle@verizon.net>
1038
1039         PR libfortran/21915
1040         * Makefile.am: Include intrinsics/hyper.c.
1041         * c99_protos.h: Add prototypes for single precision versions of
1042         acosh, asinh, and atanh for platforms that do not have these.
1043         * config.h.in: Add #undef for wrappers.
1044         * configure.ac: Add checks for single precision versions.
1045         * aclocal.m4: Regenerated.
1046         * Makefile.in: Regenerated.
1047         * configure: Regenerated.
1048         * intrinsics/hyper.c: New file, adds new wrapper functions.
1049
1050 2005-06-23  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1051
1052         * intrinsics/c99_functions.c (log10l): New log10l function for
1053         systems where this is not available.
1054         * c99_protos.h: Prototype for log10l function.
1055         * libgfortran.h: Use generated kinds.h to define GFC_INTEGER_*,
1056         GFC_UINTEGER_*, GFC_LOGICAL_*, GFC_REAL_*, GFC_COMPLEX_*. Update
1057         prototypes for gfc_itoa and xtoa.
1058         * io/io.h: Update prototypes for set_integer and max_value.
1059         * io/list_read.c (convert_integer): Use new
1060         GFC_(INTEGER|REAL)_LARGEST type.
1061         * io/read.c (set_integer): Likewise.
1062         (max_value): Likewise.
1063         (convert_real): Likewise.
1064         (real_l): Likewise.
1065         (next_char): Likewise.
1066         (read_decimal): Likewise.
1067         (read_radix): Likewise.
1068         (read_f): Likewise.
1069         * io/write.c (extract_int): Use new GFC_INTEGER_LARGEST type.
1070         (extract_real): Use new GFC_REAL_LARGEST type.
1071         (calculate_exp): Likewise.
1072         (calculate_G_format): Likewise.
1073         (output_float): Likewise. Use log10l for long double values.
1074         Add comment for sprintf format. Use GFC_REAL_LARGEST_FORMAT.
1075         (write_l): Use new GFC_INTEGER_LARGEST type.
1076         (write_float): Use new GFC_REAL_LARGEST type.
1077         (write_int): Remove useless special case for (len < 8).
1078         (write_decimal): Use GFC_INTEGER_LARGEST.
1079         (otoa): Use GFC_UINTEGER_LARGEST as argument.
1080         (btoa): Use GFC_UINTEGER_LARGEST as argument.
1081         * runtime/error.c (gfc_itoa): Use GFC_INTEGER_LARGEST as
1082         argument.
1083         (xtoa): Use GFC_UINTEGER_LARGEST as argument.
1084         * Makefile.am: Use mk-kinds-h.sh to generate header kinds.h
1085         with all Fortran kinds available.
1086         * configure.ac: Check for strtold and log10l.
1087         * Makefile.in: Regenerate.
1088         * aclocal.m4: Regenerate.
1089         * configure: Regenerate.
1090         * config.h.in: Regenerate.
1091         * mk-kinds-h.sh: Configuration script for available integer
1092         and real kinds.
1093
1094
1095 2005-06-18  Janne Blomqvist  <jblomqvi@cc.hut.fi>
1096
1097         * unix.c (stream_at_bof): Don't assume that all non-mmapped files
1098         are non-seekable.
1099         (stream_at_eof): Likewise.
1100
1101 2005-06-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1102
1103         PR libfortran/19155
1104         * io/read.c (convert_real): strtod can set errno to EINVAL on an
1105         empty string, but we shouldn't have an error in that case.
1106
1107 2005-06-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1108
1109         PR libfortran/19216
1110         * io/list_read.c (eat_separator): No need to call next_record,
1111         even in non-namelist_mode.
1112
1113 2005-06-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1114
1115         * io/transfer.c (formatted_transfer): Fix typo in error message.
1116
1117 2005-06-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1118
1119         PR libfortran/16436
1120         * io/transfer.c (read_sf): Correct updating of bytes_left field.
1121         (formatted_transfer): Correct updating of bytes_left field and
1122         reformatting code (comments and whitespace).
1123         * io/unix.c (move_pos_offset): "active" field should not be
1124         changed here. Whitespace corrections.
1125
1126 2005-06-15  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1127
1128         PR libfortran/21950
1129         * intrinsics/c99_functions.c (scalbn): Provide fallback
1130         implementation for scalbn.
1131         * c99_protos.h: Prototype for scalbn.
1132         * configure.ac: Add check for scalbn.
1133         * configure: Regenerate.
1134         * config.h.in: Regenerate.
1135
1136 2005-06-14  Thomas Koenig  <Thomas.Koenig@online.de>
1137
1138         * intrinsics/eoshift0.c:  Removed prototype for eoshift0.
1139         * intrinsics/eoshift2.c:  Removed prototype for eoshift2.
1140
1141 2005-06-14  Tom Tromey  <tromey@redhat.com>
1142
1143         PR libgcj/19877:
1144         * configure, aclocal.m4, Makefile.in: Rebuilt.
1145
1146 2005-06-12  Thomas Koenig  <Thomas.Koenig@online.de>
1147
1148         PR libfortran/21594
1149         * intrinsics/eoshift0.c:  Add prototype for eoshift0.
1150         * intrinsics/eoshift2.c:  Add prototype for eoshift2.
1151
1152 2005-06-12  Steven G. Kargl <kargls@comcast.net>
1153             Thomas Koenig  <Thomas.Koenig@online.de>
1154
1155         PR libfortran/PR21797
1156         * m4/cexp.m4 (csqrt`'q):  Add type qualifyer to
1157         sqrt and fabs.
1158         * generated/exp_c4.c:  Regenerated.
1159
1160 2005-06-12  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1161
1162         PR libfortran/19155
1163         * io/read.c (read_f): Take care of spaces after initial sign.
1164
1165 2005-06-11  Thomas Koenig  <Thomas.Koenig@onlinde.de>
1166
1167         PR libfortran/21333
1168         * Makefile.am: Add in_pack_c4.c, in_pack_c8.c, in_unpack_c4.c
1169         and in_unpack_c8.c.
1170         * Makefile.in: Regenerate.
1171         * libgfortran.h:  Declare internal_pack_c4, internal_pack_c8,
1172         internal_unpack_c4 and internal_unpack_c8.
1173         * m4/in_pack.m4: Use rtype_ccode insteald of rtype_kind
1174         in function name.
1175         Use sizeof (rtype_name) as size for memory allocation.
1176         * m4/in_unpack.m4: Use rtype_ccode insteald of rtype_kind
1177         in function name.
1178         Use sizeof (rtype_name) for calculation of sizes for memcpy.
1179         * runtime/in_pack_generic.c:  For real, integer and logical
1180         call internal_pack_4 if size==4 and internal_pack_8 if
1181         size==8.
1182         For complex, call internal_pack_c4 if size==8 and
1183         internal_pack_c8 if size==16.
1184         * runtime/in_unpack_generic.c: For real, integer and logical
1185         call internal_unpack_4 if size==4 and internal_unpack_8 if
1186         size==8.
1187         For complex, call internal_unpack_c4 if size==8 and
1188         internal_unpack_c8 if size==16.
1189         * generated/in_pack_i4.c:  Regenerated.
1190         * generated/in_pack_i8.c:  Regenerated.
1191         * generated/in_unpack_i4.c:  Regenerated.
1192         * generated/in_unpack_i8.c:  Regenerated.
1193         * generated/in_pack_c4.c:  New file.
1194         * generated/in_pack_c8.c:  New file.
1195         * generated/in_unpack_c4.c:  New file.
1196         * generated/in_unpack_c8.c:  New file.
1197
1198 2005-06-09  Thomas Koenig  <Thomas.Koenig@online.de>
1199
1200         PR libfortran/21480
1201         * m4/reshape.m4:  Use sizeof (rtype_name) for sizes to be passed
1202         to reshape_packed.
1203         * generated/reshape_c4.c:  Regenerated.
1204         * generated/reshape_c8.c:  Regenerated.
1205         * generated/reshape_i4.c:  Regenerated.
1206         * generated/reshape_i8.c:  Regenerated.
1207
1208 2005-06-07  Thomas Koenig  <Thomas.Koenig@online.de>
1209
1210         PR libfortran/21926
1211         * m4/matmul.m4:  Correct zeroing of result for non-packed
1212         arrays with lowest stride is one.
1213         * generated/matmul_c4.c:  Regenerated.
1214         * generated/matmul_c8.c:  Regenerated.
1215         * generated/matmul_i4.c:  Regenerated.
1216         * generated/matmul_i8.c:  Regenerated.
1217         * generated/matmul_r4.c:  Regenerated.
1218         * generated/matmul_r8.c:  Regenerated.
1219
1220 2005-05-30  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1221
1222         PR libfortran/20179
1223         * io/unix.c (fd_close): Add test so that we don't close()
1224         stdout and stderr.
1225
1226 2005-05-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1227
1228         PR libfortran/20006
1229         * io/format.c (parse_format_list): Set repeat count of $ format
1230         node to 1.
1231         * io/transfer.c (read_sf): Add g.seen_dollar to the test
1232         concerning advancing I/O.
1233         (data_transfer_init): Likewise.
1234         (finalize_transfer): Likewise.
1235
1236 2005-05-27  Thomas Koenig  <Thomas.Koenig@online.de>
1237
1238         * runtime/in_pack_generic.c:  Adjust copyright years.
1239         (in_pack_generic):  Change dimension of auxiliary arrays from
1240         GFC_MAX_DIMENSION - 1 to GFC_MAX_DIMENSION.
1241         * runtime/in_unpack_generic.c:  Adjust copyright years.
1242         (in_unpack_generic):  Change dimension of auxiliary arrays from
1243         GFC_MAX_DIMENSION - 1 to GFC_MAX_DIMENSION.
1244
1245 2005-05-26  Thomas Koenig  <Thomas.Koenig@online.de>
1246
1247         PR libfortran/17283
1248         * intrinsics/unpack_generic.c:  Fix name of routine
1249         on top.  Update copyright years.
1250         (unpack1):  Remove const from return array descriptor.
1251         rs:  New variable, for calculating return sizes.
1252         Populate return array descriptor if ret->data is NULL.
1253
1254 2005-05-22  Peter Wainwright  <prw@ceiriog1.demon.co.uk>
1255
1256         PR libfortran/21376
1257         * io/write.c (output_float): Rework logic to avoid call to log10
1258         with argument equal to zero.
1259
1260 2005-05-21  Eric Botcazou  <ebotcazou@libertysurf.fr>
1261
1262         * configure.ac: Check for trunc and truncf in libm.
1263         * configure: Regenerate.
1264         * config.h.in: Likewise.
1265         * intrinsics/c99_functions.c (trunc, truncf): New functions.
1266         * c99_protos.h (trunc, truncf): Declare them.
1267
1268 2005-05-18  Thomas Koenig  <Thomas.Koenig@online.de>
1269
1270         PR libfortran/21127
1271         * Makefile.am:  Really commit.
1272         * Makefile.in:  Really commit.
1273
1274 2005-05-18  Thomas Koenig  <Thomas.Koenig@online.de>
1275
1276         PR libfortran/21127
1277         * Makefile.am:  Add generated/reshape_c4.c and
1278         generated/reshape_c8.c.
1279         * Makefile.in:  Regenerated.
1280         * m4/iparm.m4:  Define rtype_ccode to be c4 or c8 for
1281         complex types, 4 or 8 otherwise.
1282         * m4/reshape.m4:  Use rtype_ccode instead of rtype_kind
1283         in function name.
1284         * generated/reshape_c4.c: New file.
1285         * generated/reshape_c8.c: New file.
1286
1287 2005-05-16  Andreas Jaeger  <aj@suse.de>
1288
1289         * configure.ac: Add additional warning flags.
1290         * configure: Regenerate.
1291
1292         * io/write.c (calculate_G_format): Remove unused parameter.
1293         (output_float): Remove unused parameter.
1294         (write_float): Change callers.
1295         (nml_write_obj): Avoid signed warning.
1296         Make variable const to support -Wwrite-strings.
1297
1298         * io/unix.c (fd_alloc, mmap_open, mmap_sfree, mem_sfree,
1299         mem_truncate): Mark argument as unused.
1300
1301         * io/unit.c (get_unit): Mark argument as unused.
1302         (init_units): Avoid warning about signed comparision.
1303
1304         * io/transfer.c (next_record_r): Remove unused parameter.
1305         (next_record_w): Remove unused parameter.
1306         (next_record): Change callers.
1307         (iolength_transfer): Mark arguments as unused.
1308
1309         * io/open.c: Add initializer.
1310
1311         * io/list_read.c (read_character): Mark argument as unused.
1312         (nml_match_name): Add const to make compile with -Wwrite-strings.
1313
1314         * io/format.c: Add initializer.
1315
1316 2005-05-15  Andreas Jaeger  <aj@suse.de>
1317
1318         * m4/eoshift1.m4: Initialize variables to avoid warnings.
1319         * m4/eoshift3.m4: Initialize variables to avoid warnings.
1320         * generated/eoshift1_4.c, generated/eoshift1_8.c,
1321         generated/eoshift3_4.c, generated/eoshift3_8.c: Regenerated.
1322
1323         * intrinsics/spread_generic.c (spread): Initialize variables to
1324         avoid warnings.
1325
1326         * intrinsics/eoshift0.c (eoshift0): Initialize variables to avoid
1327         warnings.
1328         * intrinsics/eoshift2.c (eoshift2): Initialize variables to avoid
1329         warnings.
1330
1331         * io/list_read.c (nml_get_obj_data): Initialize variables to avoid
1332         warnings.
1333
1334         * intrinsics/pack_generic.c (pack): Remove unneeded calculation.
1335
1336         * m4/matmull.m4 (matmul_): Remove unneeded calculations, fix
1337         pointer cast to avoid warning.
1338         * generated/matmul_l4.c: Regenerated.
1339         * generated/matmul_l8.c: Regenerated.
1340
1341         * Makefile.am: Remove AM_CFLAGS here.
1342         * configure.ac: Define AM_CFLAGS and AM_FCFLAGS so that warnings
1343         are set.  Set additionally -Wstrict-prototypes for CFLAGS.
1344         * Makefile.in: Regenerated.
1345         * aclocal.m4: Regenerated.
1346         * configure: Regenerated.
1347
1348         * intrinsics/system_clock.c (system_clock_4, system_clock_8): Add
1349         missing returns, reformat a bit.
1350
1351         * io/write.c (nml_write_obj): Use %d again - and cast to int,
1352         st_sprintf does not handle %ld.
1353
1354         * io/unit.c (is_internal_unit): Add void as parameter list.
1355
1356         * io/transfer.c: Move prototype declarations before the functions.
1357
1358         * runtime/normalize.c (almostone_r4, almostone_r8): Fix parameter
1359         list.
1360
1361         * intrinsics/random.c (KISS_DEFAULT_SEED): Remove extra semicolon.
1362
1363         * io/transfer.c: Do not use empty initializers for global objects.
1364         Add missing initializers.
1365
1366         * io/lock.c: Do not use empty initializers for global objects.
1367
1368         * io/close.c: Add missing initializers.
1369
1370         * runtime/environ.c: Add missing initializers. Do not use empty
1371         initializers for global object.
1372         (init_string): Mark argument as unused.
1373
1374         * runtime/main.c (cleanup): Fix parameter list.
1375
1376         * io/io.h: Fix parameter lists.
1377
1378         * m4/transpose.m4, m4/matmul.m4: Fix pointer cast to avoid
1379         warning.
1380
1381         * generated/transpose_c4.c, generated/transpose_c8.c,
1382         generated/transpose_i4.c, generated/transpose_i8.c,
1383         generated/matmul_c4.c, generated/matmul_c8.c,
1384         generated/matmul_i4.c, generated/matmul_i8.c,
1385         generated/matmul_r4.c, generated/matmul_r8.c: Regenerated.
1386
1387         * io/write.c (nml_write_obj): Fix 64-bit problem.
1388
1389         * io/list_read.c (nml_get_obj_data): Add missing braces around
1390         initializer to avoid warnings.
1391
1392         * intrinsics/etime.c (etime_sub): Remove unused variable.
1393
1394         * intrinsics/chdir.c, intrinsics/getlog.c, intrinsics/link.c,
1395         intrinsics/symlnk.c, intrinsics/perror.c: Include <string.h> for
1396         prototypes.
1397
1398         * runtime/string.c (compare0): Remove unused variable.
1399         * io/unit.c (init_units): Remove unused variables.
1400         * intrinsics/getcwd.c (getcwd_i4_sub): Remove unused variable.
1401         * intrinsics/unlink.c (unlink_i4_sub): Remove unused variable.
1402         * intrinsics/stat.c (stat_i4_sub, fstat_i8_sub, fstat_i4_sub,
1403         stat_i8_sub): Remove unused variable.
1404
1405 2005-05-12  Thomas Koenig  <Thomas.Koenig@online.de>
1406
1407         PR libfortran/21324
1408         * runtime/memory.c:  Don't define GFC_CLEAR_MEMORY (it's a
1409         performance hog).
1410         * io/open.c (new_unit): Zero freshly allocated memory for
1411         unit structure.
1412         * io/unit.c (init_units):  Zero freshly allocated memory for
1413         STDIN, STDOUT and STDERR.
1414         * io/unix.c (open_internal):  Zero freshly allocated memory
1415         for unix_stream.
1416         (fd_to_stream):  Likewise.
1417
1418 2005-05-11  Bud Davis  <bdavis@gfortran.org>
1419
1420         PR fortran/19478
1421         * io/unix.c (fd_truncate): update positions when ftruncate
1422         fails (like writing to /dev/null).
1423
1424 2005-05-10  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1425
1426         PR libfortran/21471
1427         * open.c (new_unit): Take care of the case where POSITION_APPEND
1428         is specified (sseek to the end, and set u>-endfile).
1429
1430 2005-05-10  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1431
1432         PR fortran/20178
1433         * Makefile.am (gfor_specific_src): Add 'intrinsics/f2c_intrinsics.F90'
1434         to dependencies.
1435         * Makefile.in: Regenerate.
1436         * intrinsics/f2c_specific.F90: New file.
1437
1438 2005-05-10  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1439
1440         PR libfortran/20788
1441         * io/unix.c (fd_to_stream): Add an avoid_mmap argument indicating
1442         we don't we to mmap this stream. Use fd_open instead of mmap_open
1443         in that case.
1444         (open_external): Call fd_to_stream with avoid_mmap = 0.
1445         (input_stream): Call fd_to_stream with avoid_mmap = 1.
1446         (output_stream): Likewise.
1447         (error_stream): Likewise.
1448
1449 2005-05-09  Mike Stump  <mrs@apple.com>
1450
1451         * configure: Regenerate.
1452
1453 2005-05-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1454
1455         PR libfortran/19155
1456         * io/read.c (read_f): Accept 'e', 'E', 'd' and 'D' as first
1457         non-blank characters of a real number.
1458
1459 2005-05-04  Thomas Koenig  <Thomas.Koenig@online.de>
1460
1461         PR libfortran/21354
1462         * m4/cshift1.m4: Change dimension of auxiliary arrays from
1463         GFC_MAX_DIMENSION - 1 to GFC_MAX_DIMENSION.
1464         * m4/eoshift1.m4: Likewise.
1465         * m4/eoshift3.m4: Likewise.
1466         * m4/ifunction.m4: Likewise.
1467         * m4/in_pack.m4: Likewise.
1468         * m4/in_unpack.m4: Likewise.
1469         * intrinsics/cshift0.c: Likewise.
1470         * intrinsics/eoshift0.c: Likewise.
1471         * intrinsics/eoshift2.c: Likewise.
1472         * intrinsics/random.c: Likewise.
1473         * intrinsics/spread_generic.c: Likewise.
1474         * intrinsics/stat.c: Likewise.
1475         * generated/all_l4.c: Regenerated.
1476         * generated/all_l8.c: Regenerated.
1477         * generated/any_l4.c: Regenerated.
1478         * generated/any_l8.c: Regenerated.
1479         * generated/count_4_l4.c: Regenerated.
1480         * generated/count_4_l8.c: Regenerated.
1481         * generated/count_8_l4.c: Regenerated.
1482         * generated/count_8_l8.c: Regenerated.
1483         * generated/cshift1_4.c: Regenerated.
1484         * generated/cshift1_8.c: Regenerated.
1485         * generated/eoshift1_4.c: Regenerated.
1486         * generated/eoshift1_8.c: Regenerated.
1487         * generated/eoshift3_4.c: Regenerated.
1488         * generated/eoshift3_8.c: Regenerated.
1489         * generated/in_pack_i4.c: Regenerated.
1490         * generated/in_pack_i8.c: Regenerated.
1491         * generated/in_unpack_i4.c: Regenerated.
1492         * generated/in_unpack_i8.c: Regenerated.
1493         * generated/maxloc0_4_i4.c: Regenerated.
1494         * generated/maxloc0_4_i8.c: Regenerated.
1495         * generated/maxloc0_4_r4.c: Regenerated.
1496         * generated/maxloc0_4_r8.c: Regenerated.
1497         * generated/maxloc0_8_i4.c: Regenerated.
1498         * generated/maxloc0_8_i8.c: Regenerated.
1499         * generated/maxloc0_8_r4.c: Regenerated.
1500         * generated/maxloc0_8_r8.c: Regenerated.
1501         * generated/maxloc1_4_i4.c: Regenerated.
1502         * generated/maxloc1_4_i8.c: Regenerated.
1503         * generated/maxloc1_4_r4.c: Regenerated.
1504         * generated/maxloc1_4_r8.c: Regenerated.
1505         * generated/maxloc1_8_i4.c: Regenerated.
1506         * generated/maxloc1_8_i8.c: Regenerated.
1507         * generated/maxloc1_8_r4.c: Regenerated.
1508         * generated/maxloc1_8_r8.c: Regenerated.
1509         * generated/maxval_i4.c: Regenerated.
1510         * generated/maxval_i8.c: Regenerated.
1511         * generated/maxval_r4.c: Regenerated.
1512         * generated/maxval_r8.c: Regenerated.
1513         * generated/minloc0_4_i4.c: Regenerated.
1514         * generated/minloc0_4_i8.c: Regenerated.
1515         * generated/minloc0_4_r4.c: Regenerated.
1516         * generated/minloc0_4_r8.c: Regenerated.
1517         * generated/minloc0_8_i4.c: Regenerated.
1518         * generated/minloc0_8_i8.c: Regenerated.
1519         * generated/minloc0_8_r4.c: Regenerated.
1520         * generated/minloc0_8_r8.c: Regenerated.
1521         * generated/minloc1_4_i4.c: Regenerated.
1522         * generated/minloc1_4_i8.c: Regenerated.
1523         * generated/minloc1_4_r4.c: Regenerated.
1524         * generated/minloc1_4_r8.c: Regenerated.
1525         * generated/minloc1_8_i4.c: Regenerated.
1526         * generated/minloc1_8_i8.c: Regenerated.
1527         * generated/minloc1_8_r4.c: Regenerated.
1528         * generated/minloc1_8_r8.c: Regenerated.
1529         * generated/minval_i4.c: Regenerated.
1530         * generated/minval_i8.c: Regenerated.
1531         * generated/minval_r4.c: Regenerated.
1532         * generated/minval_r8.c: Regenerated.
1533         * generated/product_c4.c: Regenerated.
1534         * generated/product_c8.c: Regenerated.
1535         * generated/product_i4.c: Regenerated.
1536         * generated/product_i8.c: Regenerated.
1537         * generated/product_r4.c: Regenerated.
1538         * generated/product_r8.c: Regenerated.
1539         * generated/sum_c4.c: Regenerated.
1540         * generated/sum_c8.c: Regenerated.
1541         * generated/sum_i4.c: Regenerated.
1542         * generated/sum_i8.c: Regenerated.
1543         * generated/sum_r4.c: Regenerated.
1544         * generated/sum_r8.c: Regenerated.
1545
1546 2005-04-30  Thomas Koenig  <Thomas.Koenig@online.de>
1547
1548         PR libfortran/18958
1549         libgfortran.h:  Change typedef of index_type from size_t
1550         to ssize_t.
1551
1552 2005-04-30  Paul Thomas  <pault@gcc.gnu.org>
1553
1554         PR libfortran/18857
1555         * generated/matmul_r8.c: Remove incorrect assertions.
1556         * generated/matmul_c4.c: Regenerate
1557         * generated/matmul_c8.c: Regenerate
1558         * generated/matmul_i4.c: Regenerate
1559         * generated/matmul_i8.c: Regenerate
1560         * generated/matmul_r4.c: Regenerate
1561         * generated/matmul_r8.c: Regenerate
1562
1563 2005-04-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1564
1565         * configure.ac: Check for ftruncate and chsize.
1566         * io/unix.c (fd_truncate): Provide chsize as alternative to
1567         ftruncate.
1568         * config.h.in: Regenerate.
1569         * configure: Regenerate.
1570
1571 2004-04-29  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1572
1573         * intrinsics/rename.c: Add missing #includes.
1574
1575 2004-04-28  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1576
1577         * AUTHORS, COPYING, INSTALL, NEWS, README: Remove.
1578
1579 2005-04-26  David Edelsohn  <edelsohn@gnu.org>
1580
1581         PR libfortran/20930
1582         * io/rewind.c (st_rewind): Flush the stream when resetting the mode
1583         from WRITING to READING.
1584
1585 2005-04-22  Paul Thomas  <pault@gcc.gnu.org>
1586             Jerry DeLisle  <jvdelisle@verizon.net>
1587
1588         * io/write.c (nml_write_obj): Provide 1 more byte for ext_name.
1589         * io/list_read.c (nml_get_obj_data): Put extra brackets in get_mem
1590         call for ext_name.  These fix the bug reported by Jerry DeLisle to
1591         the fortran list and are based on his suggested fix.
1592
1593 2005-04-22  Thomas Koenig  <Thomas.Koenig@online.de>
1594
1595         PR libfortran/20074
1596         PR libfortran/20436
1597         PR libfortran/21108
1598         * m4/reshape.m4 (reshape_`'rtype_kind):  rs, rex:  New
1599         variables, to be used in calculation of return array sizes.
1600         Populate return array descriptor if ret->data is NULL.
1601         Fix condition for early return (it used to test something
1602         undefined if order was used).
1603         Remove duplicate check wether pad is used.
1604         * intrinsics/reshape_generic.c (reshape_generic): Likewise.
1605         Fix a few places where the wrong variables were set.
1606         * generated/reshape_i4.c: Regenerated.
1607         * generated/reshape_i8.c: Regenerated.
1608
1609 2005-04-18  Paul  Thomas <pault@gcc.gnu.org>
1610
1611         * io/list_read.c (nml_touch_nodes, nml_read_obj,
1612         nml_get_obj_data): Fix memory leaks in code for derived types.
1613
1614 2005-04-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1615
1616         PR libfortran/20950
1617         * io/inquire.c (inquire_via_unit): Check for the gfc_unit being
1618         NULL when setting ioparm.sequential.
1619
1620 2005-04-17  Thomas Koenig  <Thomas.Koenig@online.de>
1621
1622         PR libfortran/21075
1623         * m4/reshape.m4 (reshape_`'rtype_kind):  Change dimension
1624         of auxiliary arrays from GFC_MAX_DIMENSIONS - 1 to
1625         GFC_MAX_DIMENSIONS.
1626         * intrinsics/reshape_generic.c (reshape_generic):  Likewise.
1627         * generated/reshape_i4.c:  Regenerated.
1628         * generated/reshape_i8.c:  Regenerated.
1629
1630 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
1631
1632         * io/list_read.c (eat_separator): at_eol = 1 replaced
1633         (zapped at some time?).
1634
1635 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
1636
1637         PR libgfortran/12884
1638         PR libgfortran/17285
1639         PR libgfortran/18122
1640         PR libgfortran/18210
1641         PR libgfortran/18392
1642         PR libgfortran/18591
1643         PR libgfortran/18879
1644         * io/io.h (nml_ls): Declare.
1645         (namelist_info): Modify for arrays.
1646         * io/list_read.c (namelist_read): Reduced to call to new functions.
1647         (match_namelist_name): Simplified.
1648         (nml_query): Handles stdin queries ? and =?. New function.
1649         (nml_get_obj_data): Parses object name. New function.
1650         (touch_nml_nodes): Marks objects for read. New function.
1651         (untouch_nml_nodes): Resets objects. New function.
1652         (parse_qualifier): Parses and checks qualifiers. New function
1653         (nml_read_object): Reads and stores object data. New function.
1654         (eat_separator): No new_record on '/' in namelist.
1655         (finish_separator): No new_record on '/' in namelist.
1656         (read_logical): Error return for namelist.
1657         (read_integer): Error return for namelist.
1658         (read_complex): Error return for namelist.
1659         (read_real): Error return for namelist.
1660         * io/lock.c (library_end): Free extended namelist_info types.
1661         * io/transfer.c (st_set_nml_var): Modified for arrays.
1662         (st_set_nml_var_dim): Dimension descriptors. New function.
1663         * io/write.c (namelist_write): Reduced to call to new functions.
1664         (nml_write_obj): Writes output for object. New function.
1665         (write_integer): Suppress leading blanks for repeat counts.
1666         (write_int): Suppress leading blanks for repeat counts.
1667         (write_float): Suppress leading blanks for repeat counts.
1668         (output_float): Suppress leading blanks for repeat counts.
1669
1670 2005-04-15  Thomas Koenig  <Thomas.Koenig@online.de>
1671
1672         PR libfortran/18495
1673         * intrinsics/spread_generic.c (spread):  Remove const from
1674         return array descriptor.
1675         New variables: rrank (rank of return array),  rs (for
1676         calculating the size of the return array), srank (rank
1677         of the source array).
1678         Generate runtime error if the dim= argument is larger than
1679         the rank of the return array.
1680         Generate runtime error if the needed rank of the return
1681         array is larger than 7.
1682         If ret->data is null, populate the return array descriptor
1683         and initialize the variables for the actual operation.
1684         Otherwise, set ret->dim[0].stride to one if it is zero.
1685         Change second, independent use of variable dim to srank.
1686
1687 2005-04-12  Mike Stump  <mrs@apple.com>
1688
1689         * configure: Regenerate.
1690
1691 2005-04-13  Thomas Koenig  <Thomas.Koenig@online.de>
1692
1693         PR libfortran/19106
1694         * m4/iforeach.c (name`'rtype_qual`_'atype_code):  Add TODO
1695         that setting correct strides is a front end job.
1696         (`m'name`'rtype_qual`_'atype_code):  Likewise.  If mask has
1697         a lowest stride of 0, adjust to 1.
1698         * m4/ifunction.c (name`'rtype_qual`_'atype_code):  Add TODO
1699         that setting correct strides is a front end job.
1700         (`m'name`'rtype_qual`_'atype_code):  Likewise.  If mask has
1701         a lowest stride of 0, adjust to 1.
1702         * maxloc0_4_i4.c: Regenerated
1703         * maxloc0_4_i8.c: Regenerated
1704         * maxloc0_4_r4.c: Regenerated
1705         * maxloc0_4_r8.c: Regenerated
1706         * maxloc0_8_i4.c: Regenerated
1707         * maxloc0_8_i8.c: Regenerated
1708         * maxloc0_8_r4.c: Regenerated
1709         * maxloc0_8_r8.c: Regenerated
1710         * maxloc1_4_i4.c: Regenerated
1711         * maxloc1_4_i8.c: Regenerated
1712         * maxloc1_4_r4.c: Regenerated
1713         * maxloc1_4_r8.c: Regenerated
1714         * maxloc1_8_i4.c: Regenerated
1715         * maxloc1_8_i8.c: Regenerated
1716         * maxloc1_8_r4.c: Regenerated
1717         * maxloc1_8_r8.c: Regenerated
1718         * maxval_i4.c: Regenerated
1719         * maxval_i8.c: Regenerated
1720         * maxval_r4.c: Regenerated
1721         * maxval_r8.c: Regenerated
1722         * minloc0_4_i4.c: Regenerated
1723         * minloc0_4_i8.c: Regenerated
1724         * minloc0_4_r4.c: Regenerated
1725         * minloc0_4_r8.c: Regenerated
1726         * minloc0_8_i4.c: Regenerated
1727         * minloc0_8_i8.c: Regenerated
1728         * minloc0_8_r4.c: Regenerated
1729         * minloc0_8_r8.c: Regenerated
1730         * minloc1_4_i4.c: Regenerated
1731         * minloc1_4_i8.c: Regenerated
1732         * minloc1_4_r4.c: Regenerated
1733         * minloc1_4_r8.c: Regenerated
1734         * minloc1_8_i4.c: Regenerated
1735         * minloc1_8_i8.c: Regenerated
1736         * minloc1_8_r4.c: Regenerated
1737         * minloc1_8_r8.c: Regenerated
1738         * minval_i4.c: Regenerated
1739         * minval_i8.c: Regenerated
1740         * minval_r4.c: Regenerated
1741         * minval_r8.c: Regenerated
1742         * product_c4.c: Regenerated
1743         * product_c8.c: Regenerated
1744         * product_i4.c: Regenerated
1745         * product_i8.c: Regenerated
1746         * product_r4.c: Regenerated
1747         * product_r8.c: Regenerated
1748         * sum_c4.c: Regenerated
1749         * sum_c8.c: Regenerated
1750         * sum_i4.c: Regenerated
1751         * sum_i8.c: Regenerated
1752         * sum_r4.c: Regenerated
1753         * sum_r8.c: Regenerated
1754
1755 2005-04-10  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1756
1757         PR libfortran/20788
1758         * runtime/environ.c (init_unsigned_integer): Function for
1759         environment variables we want to be positive.
1760         (init_integer): Function to allow negative environment
1761         variables (e.g. for GFORTRAN_STDIN_UNIT).
1762
1763 2005-04-10  Thomas Koenig <Thomas.Koenig@online.de>
1764
1765         PR libfortran/17992
1766         PR libfortran/19568
1767         PR libfortran/19595
1768         PR libfortran/20005
1769         PR libfortran/20092
1770         PR libfortran/20131
1771         PR libfortran/20661
1772         PR libfortran/20744
1773         * io/transfer.c (top level): eor_condition: New static variable.
1774         (read_sf): Remove unnecessary zeroing of buffer (there is enough
1775         information in its length).
1776         Return a string of length 0 (to be padded by caller) if EOR was
1777         seen previously.
1778         Remove erroneous special casing of EOR for standard input.
1779         Set eor_condition for non-advancing I/O if an end of line was
1780         detected.
1781         Increment ioparm.size if necessary.
1782         (formatted_transfer):  Skip the function if there is an EOR condition.
1783         (data_transfer_init):  Initialize eor_condition to zero (false).
1784         (next_record_r):  Clear sf_seen_eor if a \n has been seen already.
1785         (finalize_transfer):  If there is an EOR condition, raise the error.
1786
1787 2005-04-09  Bud Davis  <bdavis@gfortran.org>
1788             Steven G. Kargl <kargls@comcast.net>
1789
1790         PR fortran/19872
1791         * io/transfer.c (data_transfer_init): truncate an existing
1792         file on the first write.
1793
1794 2005-04-09  Thomas Koenig  <Thomas.Koenig@online.de>
1795
1796         PR libfortran/19106
1797         PR libfortran/19014
1798         * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): ditto.
1799         If retarray->data is NULL (i.e. the front end does not
1800         know the rank and dimenson of the array), fill in its
1801         properties and allocate memory.
1802         Change the assertions about rank and dimension of retarray into
1803         runtime errors and only check them for retarray->data != NULL.
1804         Do the same for correcting the stride from 0 to 1 in retarray.
1805         (`m'name`'rtype_qual`_'atype_code): Likewise.
1806         * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Likewise.
1807         Change assertion about rank of array to runtime error.
1808         (`m'name`'rtype_qual`_'atype_code): Likewise.
1809         * generated/all_l4.c: Regenerated.
1810         * generated/all_l8.c: Regenerated.
1811         * generated/any_l4.c: Regenerated.
1812         * generated/any_l8.c: Regenerated.
1813         * generated/count_4_l4.c: Regenerated.
1814         * generated/count_4_l8.c: Regenerated.
1815         * generated/count_8_l4.c: Regenerated.
1816         * generated/count_8_l8.c: Regenerated.
1817         * generated/maxloc0_4_i4.c: Regenerated.
1818         * generated/maxloc0_4_i8.c: Regenerated.
1819         * generated/maxloc0_4_r4.c: Regenerated.
1820         * generated/maxloc0_4_r8.c: Regenerated.
1821         * generated/maxloc0_8_i4.c: Regenerated.
1822         * generated/maxloc0_8_i8.c: Regenerated.
1823         * generated/maxloc0_8_r4.c: Regenerated.
1824         * generated/maxloc0_8_r8.c: Regenerated.
1825         * generated/maxloc1_4_i4.c: Regenerated.
1826         * generated/maxloc1_4_i8.c: Regenerated.
1827         * generated/maxloc1_4_r4.c: Regenerated.
1828         * generated/maxloc1_4_r8.c: Regenerated.
1829         * generated/maxloc1_8_i4.c: Regenerated.
1830         * generated/maxloc1_8_i8.c: Regenerated.
1831         * generated/maxloc1_8_r4.c: Regenerated.
1832         * generated/maxloc1_8_r8.c: Regenerated.
1833         * generated/maxval_i4.c: Regenerated.
1834         * generated/maxval_i8.c: Regenerated.
1835         * generated/maxval_r4.c: Regenerated.
1836         * generated/maxval_r8.c: Regenerated.
1837         * generated/minloc0_4_i4.c: Regenerated.
1838         * generated/minloc0_4_i8.c: Regenerated.
1839         * generated/minloc0_4_r4.c: Regenerated.
1840         * generated/minloc0_4_r8.c: Regenerated.
1841         * generated/minloc0_8_i4.c: Regenerated.
1842         * generated/minloc0_8_i8.c: Regenerated.
1843         * generated/minloc0_8_r4.c: Regenerated.
1844         * generated/minloc0_8_r8.c: Regenerated.
1845         * generated/minloc1_4_i4.c: Regenerated.
1846         * generated/minloc1_4_i8.c: Regenerated.
1847         * generated/minloc1_4_r4.c: Regenerated.
1848         * generated/minloc1_4_r8.c: Regenerated.
1849         * generated/minloc1_8_i4.c: Regenerated.
1850         * generated/minloc1_8_i8.c: Regenerated.
1851         * generated/minloc1_8_r4.c: Regenerated.
1852         * generated/minloc1_8_r8.c: Regenerated.
1853         * generated/minval_i4.c: Regenerated.
1854         * generated/minval_i8.c: Regenerated.
1855         * generated/minval_r4.c: Regenerated.
1856         * generated/minval_r8.c: Regenerated.
1857         * generated/product_c4.c: Regenerated.
1858         * generated/product_c8.c: Regenerated.
1859         * generated/product_i4.c: Regenerated.
1860         * generated/product_i8.c: Regenerated.
1861         * generated/product_r4.c: Regenerated.
1862         * generated/product_r8.c: Regenerated.
1863         * generated/sum_c4.c: Regenerated.
1864         * generated/sum_c8.c: Regenerated.
1865         * generated/sum_i4.c: Regenerated.
1866         * generated/sum_i8.c: Regenerated.
1867         * generated/sum_r4.c: Regenerated.
1868         * generated/sum_r8.c: Regenerated.
1869
1870 2005-04-09  Thomas Koenig <Thomas.Koenig@online.de>
1871
1872         PR libfortran/20163
1873         * runtime/string.c (compare0): Use fstrlen() to
1874         strip trailing blanks from option string.
1875
1876 2005-04-09  Andrew Pinski  <pinskia@physics.uc.edu>
1877
1878         PR fortran/13257
1879         * format.c (parse_format_list): Allow an optional comma
1880         between descriptors.
1881
1882 2005-04-08  Eric Botcazou  <ebotcazou@libertysurf.fr>
1883
1884         * io/backspace.c (unformatted_backspace): Do not dereference
1885         the pointer to the stream.
1886
1887 2005-04-07  Andrew Pinski  <pinskia@physics.uc.edu>
1888
1889         PR libfortran/20766
1890         * configure.ac (extra_ldflags_libgfortran): Set for *-darwin* to
1891         "-Wl,-single_module".
1892         * configure: Regenerate.
1893         * Makefile.am (libgfortran_la_LDFLAGS): Add extra_ldflags_libgfortran.
1894         * Makefile.in: Regenerate.
1895
1896 2005-04-05  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1897
1898         PR libfortran/20755
1899         * write.c (write_float): A G edit descriptor may locally change
1900         the scale factor, but it needs to be restored afterwards.
1901
1902 2005-04-03  Dale Ranta  <dir@lanl.gov>
1903             Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1904
1905         PR libfortran/20068
1906         PR libfortran/20125
1907         PR libfortran/20156
1908         PR libfortran/20471
1909         * io/backspace.c (unformatted_backspace): Fix error in arithmetic.
1910         (st_backspace): When in WRITING mode, we flush and falling back
1911         into READING mode. In all cases, correctly position the stream.
1912
1913 2005-03-31  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1914
1915         PR libfortran/20660
1916         * io/inquire.c (inquire_via_unit): Non-opened units should still be
1917         reported by an INQUIRE statement as existing.
1918         * io/transfer.c (data_transfer_init): Never accept negative units.
1919
1920 2005-03-29  Dale Ranta  <dir@lanl.gov>
1921             Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1922
1923         PR libfortran/20163
1924         * io/open.c (st_open): call library_end() before returning even if
1925         an error arises.
1926
1927 2005-03-25  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1928
1929         PR libfortran/19678
1930         * list_read.c (next_char, eat_separator, finish_separator, read_real)
1931         (namelist_read): Add support for '\r' as well as '\n' as EOL
1932         character.
1933
1934         PR libfortran/19679
1935         * list_read.c (read_sf): Add a '\r' in a test to support DOS
1936         line-endings when line length is exceeded.
1937
1938 2005-03-25  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1939
1940         PR libfortran/15332
1941         * io/format.c (parse_format_list): format node for colon edit
1942         descriptor needs a repeat counter set to 1.
1943
1944 2005-02-24  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1945
1946         * config.h.in: Regenerate.
1947
1948 2005-02-23  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1949
1950         PR libfortran/18025
1951         * write.c (output_float): Handling the "F0.d" format similarly as
1952         commercial compilers.
1953
1954 2005-03-22  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1955
1956         * Makefile.am: Added new files.
1957         * Makefile.in: Regenerate.
1958         * aclocal.m4: Regenerate.
1959         * configure.ac: add checks for signal.h headers file, as well as
1960         following functions: chdir, strerror, getlogin, gethostname, kill,
1961         link, symlink, perror, sleep, time.
1962         * configure: Regenerate.
1963         * intrinsics/chdir.c, intrinsics/gerror.c, intrinsics/getlog.c,
1964         intrinsics/hostnm.c, intrinsics/ierrno.c, intrinsics/kill.c,
1965         intrinsics/link.c, intrinsics/perror.c, intrinsics/rename.c,
1966         intrinsics/sleep.c, intrinsics/symlnk.c, intrinsics/time.c: Newly
1967         implementend g77 intrinsics.
1968
1969 2005-03-21  Zack Weinberg  <zack@codesourcery.com>
1970
1971         * configure.ac: Do not invoke TL_AC_GCC_VERSION.
1972         In all substitutions, leave gcc_version to be expanded by the Makefile.
1973         * aclocal.m4, configure: Regenerate.
1974         * Makefile.am: Set gcc_version.
1975         * Makefile.in: Regenerate.
1976
1977 2005-03-16  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1978
1979         PR libfortran/20257
1980         * open.c (new_unit): set record length to max_offset rather than
1981           using a hard-coded limit (which was too low).
1982
1983 2005-03-16  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1984
1985         PR libfortran/20480
1986         * write.c (output_float): special check when writing 0.0 with
1987           EN and ES formats.
1988
1989 2005-03-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1990
1991         PR libfortran/20124
1992         * write.c (output_float): Adds a nzero_real variable to store
1993         the number of leading zeros whatever the format width is. Corrects
1994         the rounding of numbers less than 10^(-width). Fixes typo in an
1995         error message. Updates copyright years
1996
1997 2005-02-27  Toon Moene  <toon@moene.indiv.nluug.nl>
1998
1999         * runtime/environ.c: Update copyright years.
2000
2001 2005-02-27  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2002
2003         * io/write.c: Update copyright years.
2004
2005 2005-02-27  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2006
2007         PR libfortran/20101
2008         * io/write.c (output_float): Added special check for value 0.0 in
2009         PE format.
2010
2011 2004-02-27  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2012
2013         * io/write.c (output_float): Fix typo in condition.
2014
2015 2005-02-25  Peter O'Gorman  <peter@pogma.com>
2016             Toon Moene  <toon@moene.indiv.nluug.nl>
2017
2018         PR libgfortran/17748
2019         * runtime/environ.c: Remove references to environ.
2020         (show_variables): remove GFORTRAN_UNBUFFERED_* and
2021         GFORTRAN_NAME_* because they require environ.
2022         (pattern_scan): Remove function.
2023
2024 2004-02-22  Paul Thomas <paulthomas2@wannado.fr>
2025             Bud Davis  <bdavis@gfortran.org>
2026
2027         * io/list_read.c (read_real): Handle separators properly
2028         in list directed read.
2029
2030 2004-02-21  Bud Davis  <bdavis@gfortran.org>
2031
2032         PR fortran/20086
2033         * io/transfer.c (write_constant_string): accept an 'h' as
2034         the start of a hollerith format string.
2035
2036 2005-02-21  Eric Botcazou  <ebotcazou@libertysurf.fr>
2037
2038         PR libfortran/19302
2039         * intrinsics/c99_functions.c (nextafterf): Special-case infinite
2040         numbers.
2041
2042 2005-02-21  Steven G. Kargl  <kargls@comcast.net>
2043
2044         * io/write.c (output_float):  Typo in error meesage.
2045
2046 2005-02-20  Steven G. Kargl  <kargls@comcast.net>
2047
2048         PR 20085
2049         * intrinsic/args.c (iargc): Off by 1.
2050
2051 2005-02-19  Steven G. Kargl  <kargls@comcast.net>
2052
2053         *  intrinsic/date_and_time.c: Fix conformance problems.
2054
2055 2005-02-01  Paul Thomas <paulthomas2@wanadoo.fr>
2056
2057         PR libgfortran/19363
2058         PR libgfortran/19691
2059         * libgfortran.h (isfinite): Work around broken isfinite(x) in Cygwin.
2060
2061 2005-01-30  Bud Davis  <bdavis@gfortran.org>
2062
2063         PR fortran/19647
2064         * io/inquire.c (inquire_via_unit): Use correct variable for
2065         pad.
2066
2067 2005-01-29  Thomas Koenig  <Thomas.Koenig@online.de>
2068
2069         PR libfortran/19595
2070         * io/transfer.c (data_transfer_init): eor requires advance="NO".
2071
2072 2005-01-25  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2073
2074         PR libfortran/19524
2075         * io/read.c (read_f): Don't free uninitialized pointer.
2076
2077 2005-01-23  James A. Morrison  <phython@gcc.gnu.org>
2078         Paul Brook  <paul@codesourcery.com>
2079
2080         PR fortran/19294
2081         * Makefile.am: Add transpose_c4.c and transpose_c8.c.
2082         * intrinsics/cshift0.c: Use separate optimized loops for complex types.
2083         * m4/transpose.m4: Include type letter in function name.
2084         * Makefile.in: Regenerate.
2085         * generated/transpose_*.c: Regenerate.
2086
2087 2005-01-22  Thomas Koenig  <Thomas.Koenig@online.de>
2088
2089         PR libfortran/19451
2090         * io/transfer.c (finalize_transfer):  Don't do anything if
2091         there is an error condition.
2092
2093 2005-01-22  David Edelsohn  <edelsohn@gnu.org>
2094
2095         PR libgfortran/19052
2096         * libgfortran.h (options_t): Add stderr_unit.
2097         * io/io.h (error_stream): Declare.
2098         * io/open.c (new_unit): Do not terminate abnormally if opening
2099         file preconnected to stdin, stdout, or stderr.
2100         * io/unit.c (init_units): Initialize stderr_unit.
2101         * io/unix.c (error_stream): New function.
2102         * runtime/environ.c (GFORTRAN_STDERR_UNIT): New environment variable.
2103
2104 2005-01-22  Thomas Koenig  <Thomas.Koenig@online.de>
2105
2106         PR libfortran/18982
2107         * io/unix.c (regular_file):  No need to change flags->action
2108         if an error occurs.  Document this.
2109         No need to call stat() for STATUS_OLD, open() will
2110         fail anyway.
2111         For ACTION_UNSPECIFIED, try open for read-write, then for
2112         read-only if open fails with EACCES, then for write-only
2113         if that fails with EACCES again.
2114         * io/unix.c (open_external): Document changed behavior of
2115         regular_file.
2116
2117 2005-01-22  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2118
2119         PR fortran/19194
2120         * io/io.h (st_parameter): Use 'GFC_INTEGER_4' instead of 'int',
2121         use CHARACTER macro for definition of string valued paramters.
2122
2123 2005-01-22  Bud Davis  <bdavis9659@comcast.net>
2124
2125         PR fortran/19314
2126         * io/inquire.c(inquire_via_unit): implement POSITION=.
2127         * io/transfer.c(next_record): update position for
2128         INQUIRE.
2129         * io/rewind.c(st_rewind): update position for
2130         INQUIRE.
2131
2132 2005-01-16  Bud Davis  <bdavis9659@comcast.net>
2133
2134         PR fortran/18778
2135         * io/transfer.c (us_read): no bytes available is not a
2136         runtime error.
2137
2138 2005-01-15  Bud Davis  <bdavis9659@comcast.net>
2139
2140         PR fortran/18983
2141         * io/transfer.c (st_write_done): only truncate when it
2142         is required.
2143
2144 2005-01-12  Toon Moene  <toon@moene.indiv.nluug.nl>
2145
2146         PR libfortran/19280
2147         c99_protos.h: License changed to GPL+exception.
2148         libgfortran.h: Ditto.
2149         intrinsics/abort.c: Ditto.
2150         intrinsics/args.c: Ditto.
2151         intrinsics/associated.c: Ditto.
2152         intrinsics/bessel.c: Ditto.
2153         intrinsics/c99_functions.c: Ditto.
2154         intrinsics/cpu_time.c: Ditto.
2155         intrinsics/cshift0.c: Ditto.
2156         intrinsics/date_and_time.c: Ditto.
2157         intrinsics/env.c: Ditto.
2158         intrinsics/eoshift0.c: Ditto.
2159         intrinsics/eoshift2.c: Ditto.
2160         intrinsics/erf.c: Ditto.
2161         intrinsics/etime.c: Ditto.
2162         intrinsics/exit.c: Ditto.
2163         intrinsics/flush.c: Ditto.
2164         intrinsics/fnum.c: Ditto.
2165         intrinsics/getXid.c: Ditto.
2166         intrinsics/getcwd.c: Ditto.
2167         intrinsics/ishftc.c: Ditto.
2168         intrinsics/mvbits.c: Ditto.
2169         intrinsics/pack_generic.c: Ditto.
2170         intrinsics/rand.c: Ditto.
2171         intrinsics/random.c: Ditto.
2172         intrinsics/reshape_generic.c: Ditto.
2173         intrinsics/reshape_packed.c: Ditto.
2174         intrinsics/size.c: Ditto.
2175         intrinsics/spread_generic.c: Ditto.
2176         intrinsics/stat.c: Ditto.
2177         intrinsics/string_intrinsics.c: Ditto.
2178         intrinsics/system.c: Ditto.
2179         intrinsics/system_clock.c: Ditto.
2180         intrinsics/transpose_generic.c: Ditto.
2181         intrinsics/umask.c: Ditto.
2182         intrinsics/unlink.c: Ditto.
2183         intrinsics/unpack_generic.c: Ditto.
2184         io/backspace.c: Ditto.
2185         io/close.c: Ditto.
2186         io/endfile.c: Ditto.
2187         io/format.c: Ditto.
2188         io/inquire.c: Ditto.
2189         io/io.h: Ditto.
2190         io/list_read.c: Ditto.
2191         io/lock.c: Ditto.
2192         io/open.c: Ditto.
2193         io/read.c: Ditto.
2194         io/rewind.c: Ditto.
2195         io/transfer.c: Ditto.
2196         io/unit.c: Ditto.
2197         io/unix.c: Ditto.
2198         io/write.c: Ditto.
2199         m4/all.m4: Ditto.
2200         m4/any.m4: Ditto.
2201         m4/cexp.m4: Ditto.
2202         m4/chyp.m4: Ditto.
2203         m4/count.m4: Ditto.
2204         m4/cshift1.m4: Ditto.
2205         m4/ctrig.m4: Ditto.
2206         m4/dotprod.m4: Ditto.
2207         m4/dotprodc.m4: Ditto.
2208         m4/dotprodl.m4: Ditto.
2209         m4/eoshift1.m4: Ditto.
2210         m4/eoshift3.m4: Ditto.
2211         m4/exponent.m4: Ditto.
2212         m4/fraction.m4: Ditto.
2213         m4/head.m4: Ditto.
2214         m4/iforeach.m4: Ditto.
2215         m4/ifunction.m4: Ditto.
2216         m4/in_pack.m4: Ditto.
2217         m4/in_unpack.m4: Ditto.
2218         m4/iparm.m4: Ditto.
2219         m4/matmul.m4: Ditto.
2220         m4/matmull.m4: Ditto.
2221         m4/maxloc0.m4: Ditto.
2222         m4/maxloc1.m4: Ditto.
2223         m4/maxval.m4: Ditto.
2224         m4/minloc0.m4: Ditto.
2225         m4/minloc1.m4: Ditto.
2226         m4/minval.m4: Ditto.
2227         m4/mtype.m4: Ditto.
2228         m4/nearest.m4: Ditto.
2229         m4/pow.m4: Ditto.
2230         m4/product.m4: Ditto.
2231         m4/reshape.m4: Ditto.
2232         m4/set_exponent.m4: Ditto.
2233         m4/shape.m4: Ditto.
2234         m4/specific.m4: Ditto.
2235         m4/specific2.m4: Ditto.
2236         m4/sum.m4: Ditto.
2237         m4/transpose.m4: Ditto.
2238         m4/types.m4: Ditto.
2239         runtime/environ.c: Ditto.
2240         runtime/error.c: Ditto.
2241         runtime/in_pack_generic.c: Ditto.
2242         runtime/in_unpack_generic.c: Ditto.
2243         runtime/main.c: Ditto.
2244         runtime/memory.c: Ditto.
2245         runtime/normalize.c: Ditto.
2246         runtime/pause.c: Ditto.
2247         runtime/select.c: Ditto.
2248         runtime/stop.c: Ditto.
2249         runtime/string.c: Ditto.
2250         generated/_abs_c4.f90: Regenerated.
2251         generated/_abs_c8.f90: Regenerated.
2252         generated/_abs_i4.f90: Regenerated.
2253         generated/_abs_i8.f90: Regenerated.
2254         generated/_abs_r4.f90: Regenerated.
2255         generated/_abs_r8.f90: Regenerated.
2256         generated/_acos_r4.f90: Regenerated.
2257         generated/_acos_r8.f90: Regenerated.
2258         generated/_aint_r4.f90: Regenerated.
2259         generated/_aint_r8.f90: Regenerated.
2260         generated/_anint_r4.f90: Regenerated.
2261         generated/_anint_r8.f90: Regenerated.
2262         generated/_asin_r4.f90: Regenerated.
2263         generated/_asin_r8.f90: Regenerated.
2264         generated/_atan2_r4.f90: Regenerated.
2265         generated/_atan2_r8.f90: Regenerated.
2266         generated/_atan_r4.f90: Regenerated.
2267         generated/_atan_r8.f90: Regenerated.
2268         generated/_conjg_c4.f90: Regenerated.
2269         generated/_conjg_c8.f90: Regenerated.
2270         generated/_cos_c4.f90: Regenerated.
2271         generated/_cos_c8.f90: Regenerated.
2272         generated/_cos_r4.f90: Regenerated.
2273         generated/_cos_r8.f90: Regenerated.
2274         generated/_cosh_r4.f90: Regenerated.
2275         generated/_cosh_r8.f90: Regenerated.
2276         generated/_dim_i4.f90: Regenerated.
2277         generated/_dim_i8.f90: Regenerated.
2278         generated/_dim_r4.f90: Regenerated.
2279         generated/_dim_r8.f90: Regenerated.
2280         generated/_exp_c4.f90: Regenerated.
2281         generated/_exp_c8.f90: Regenerated.
2282         generated/_exp_r4.f90: Regenerated.
2283         generated/_exp_r8.f90: Regenerated.
2284         generated/_log10_r4.f90: Regenerated.
2285         generated/_log10_r8.f90: Regenerated.
2286         generated/_log_c4.f90: Regenerated.
2287         generated/_log_c8.f90: Regenerated.
2288         generated/_log_r4.f90: Regenerated.
2289         generated/_log_r8.f90: Regenerated.
2290         generated/_mod_i4.f90: Regenerated.
2291         generated/_mod_i8.f90: Regenerated.
2292         generated/_mod_r4.f90: Regenerated.
2293         generated/_mod_r8.f90: Regenerated.
2294         generated/_sign_i4.f90: Regenerated.
2295         generated/_sign_i8.f90: Regenerated.
2296         generated/_sign_r4.f90: Regenerated.
2297         generated/_sign_r8.f90: Regenerated.
2298         generated/_sin_c4.f90: Regenerated.
2299         generated/_sin_c8.f90: Regenerated.
2300         generated/_sin_r4.f90: Regenerated.
2301         generated/_sin_r8.f90: Regenerated.
2302         generated/_sinh_r4.f90: Regenerated.
2303         generated/_sinh_r8.f90: Regenerated.
2304         generated/_sqrt_c4.f90: Regenerated.
2305         generated/_sqrt_c8.f90: Regenerated.
2306         generated/_sqrt_r4.f90: Regenerated.
2307         generated/_sqrt_r8.f90: Regenerated.
2308         generated/_tan_r4.f90: Regenerated.
2309         generated/_tan_r8.f90: Regenerated.
2310         generated/_tanh_r4.f90: Regenerated.
2311         generated/_tanh_r8.f90: Regenerated.
2312         generated/all_l4.c: Regenerated.
2313         generated/all_l8.c: Regenerated.
2314         generated/any_l4.c: Regenerated.
2315         generated/any_l8.c: Regenerated.
2316         generated/count_4_l4.c: Regenerated.
2317         generated/count_4_l8.c: Regenerated.
2318         generated/count_8_l4.c: Regenerated.
2319         generated/count_8_l8.c: Regenerated.
2320         generated/cshift1_4.c: Regenerated.
2321         generated/cshift1_8.c: Regenerated.
2322         generated/dotprod_c4.c: Regenerated.
2323         generated/dotprod_c8.c: Regenerated.
2324         generated/dotprod_i4.c: Regenerated.
2325         generated/dotprod_i8.c: Regenerated.
2326         generated/dotprod_l4.c: Regenerated.
2327         generated/dotprod_l8.c: Regenerated.
2328         generated/dotprod_r4.c: Regenerated.
2329         generated/dotprod_r8.c: Regenerated.
2330         generated/eoshift1_4.c: Regenerated.
2331         generated/eoshift1_8.c: Regenerated.
2332         generated/eoshift3_4.c: Regenerated.
2333         generated/eoshift3_8.c: Regenerated.
2334         generated/exp_c4.c: Regenerated.
2335         generated/exp_c8.c: Regenerated.
2336         generated/exponent_r4.c: Regenerated.
2337         generated/exponent_r8.c: Regenerated.
2338         generated/fraction_r4.c: Regenerated.
2339         generated/fraction_r8.c: Regenerated.
2340         generated/hyp_c4.c: Regenerated.
2341         generated/hyp_c8.c: Regenerated.
2342         generated/in_pack_i4.c: Regenerated.
2343         generated/in_pack_i8.c: Regenerated.
2344         generated/in_unpack_i4.c: Regenerated.
2345         generated/in_unpack_i8.c: Regenerated.
2346         generated/matmul_c4.c: Regenerated.
2347         generated/matmul_c8.c: Regenerated.
2348         generated/matmul_i4.c: Regenerated.
2349         generated/matmul_i8.c: Regenerated.
2350         generated/matmul_l4.c: Regenerated.
2351         generated/matmul_l8.c: Regenerated.
2352         generated/matmul_r4.c: Regenerated.
2353         generated/matmul_r8.c: Regenerated.
2354         generated/maxloc0_4_i4.c: Regenerated.
2355         generated/maxloc0_4_i8.c: Regenerated.
2356         generated/maxloc0_4_r4.c: Regenerated.
2357         generated/maxloc0_4_r8.c: Regenerated.
2358         generated/maxloc0_8_i4.c: Regenerated.
2359         generated/maxloc0_8_i8.c: Regenerated.
2360         generated/maxloc0_8_r4.c: Regenerated.
2361         generated/maxloc0_8_r8.c: Regenerated.
2362         generated/maxloc1_4_i4.c: Regenerated.
2363         generated/maxloc1_4_i8.c: Regenerated.
2364         generated/maxloc1_4_r4.c: Regenerated.
2365         generated/maxloc1_4_r8.c: Regenerated.
2366         generated/maxloc1_8_i4.c: Regenerated.
2367         generated/maxloc1_8_i8.c: Regenerated.
2368         generated/maxloc1_8_r4.c: Regenerated.
2369         generated/maxloc1_8_r8.c: Regenerated.
2370         generated/maxval_i4.c: Regenerated.
2371         generated/maxval_i8.c: Regenerated.
2372         generated/maxval_r4.c: Regenerated.
2373         generated/maxval_r8.c: Regenerated.
2374         generated/minloc0_4_i4.c: Regenerated.
2375         generated/minloc0_4_i8.c: Regenerated.
2376         generated/minloc0_4_r4.c: Regenerated.
2377         generated/minloc0_4_r8.c: Regenerated.
2378         generated/minloc0_8_i4.c: Regenerated.
2379         generated/minloc0_8_i8.c: Regenerated.
2380         generated/minloc0_8_r4.c: Regenerated.
2381         generated/minloc0_8_r8.c: Regenerated.
2382         generated/minloc1_4_i4.c: Regenerated.
2383         generated/minloc1_4_i8.c: Regenerated.
2384         generated/minloc1_4_r4.c: Regenerated.
2385         generated/minloc1_4_r8.c: Regenerated.
2386         generated/minloc1_8_i4.c: Regenerated.
2387         generated/minloc1_8_i8.c: Regenerated.
2388         generated/minloc1_8_r4.c: Regenerated.
2389         generated/minloc1_8_r8.c: Regenerated.
2390         generated/minval_i4.c: Regenerated.
2391         generated/minval_i8.c: Regenerated.
2392         generated/minval_r4.c: Regenerated.
2393         generated/minval_r8.c: Regenerated.
2394         generated/nearest_r4.c: Regenerated.
2395         generated/nearest_r8.c: Regenerated.
2396         generated/pow_c4_i4.c: Regenerated.
2397         generated/pow_c4_i8.c: Regenerated.
2398         generated/pow_c8_i4.c: Regenerated.
2399         generated/pow_c8_i8.c: Regenerated.
2400         generated/pow_i4_i4.c: Regenerated.
2401         generated/pow_i4_i8.c: Regenerated.
2402         generated/pow_i8_i4.c: Regenerated.
2403         generated/pow_i8_i8.c: Regenerated.
2404         generated/pow_r4_i4.c: Regenerated.
2405         generated/pow_r4_i8.c: Regenerated.
2406         generated/pow_r8_i4.c: Regenerated.
2407         generated/pow_r8_i8.c: Regenerated.
2408         generated/product_c4.c: Regenerated.
2409         generated/product_c8.c: Regenerated.
2410         generated/product_i4.c: Regenerated.
2411         generated/product_i8.c: Regenerated.
2412         generated/product_r4.c: Regenerated.
2413         generated/product_r8.c: Regenerated.
2414         generated/reshape_i4.c: Regenerated.
2415         generated/reshape_i8.c: Regenerated.
2416         generated/set_exponent_r4.c: Regenerated.
2417         generated/set_exponent_r8.c: Regenerated.
2418         generated/shape_i4.c: Regenerated.
2419         generated/shape_i8.c: Regenerated.
2420         generated/sum_c4.c: Regenerated.
2421         generated/sum_c8.c: Regenerated.
2422         generated/sum_i4.c: Regenerated.
2423         generated/sum_i8.c: Regenerated.
2424         generated/sum_r4.c: Regenerated.
2425         generated/sum_r8.c: Regenerated.
2426         generated/transpose_i4.c: Regenerated.
2427         generated/transpose_i8.c: Regenerated.
2428         generated/trig_c4.c: Regenerated.
2429         generated/trig_c8.c: Regenerated.
2430
2431 2005-01-07  Bud Davis  <bdavis9659@comcast.net>
2432
2433         PR fortran/18398
2434         * transfer.c (next_record_r): always skip the
2435         eol search if it was found during sf_read.
2436
2437 2004-12-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2438
2439         * libgfortran/libgfortran.h (GFC_UINTEGER_1, GFC_UINTEGER_2):
2440         Define.
2441         * intrinsics/ishftc.c: Update copyright years.
2442         (ishftc8): Change 'shift' and 'size' to GFC_INTEGER_4.
2443         * intrinsics/mvbits.c: Correct non-ASCII character in my name.
2444         Add implementations for GFC_INTEGER_1 and GFC_INTEGER_2.
2445
2446 2004-12-23  Bud Davis  <bdavis9659@comcast.net>
2447
2448         PR fortran/19071
2449         * io/tranfer.c (formatted_transfer): moved check for
2450         format reversion inside the processing loop.
2451
2452 2004-12-19  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
2453
2454         PR libfortran/19074
2455         * libgfortran.h (itoa): Rename to gfc_itoa.
2456         * io/write.c (itoa): Same.
2457         * runtime/environ.c (itoa): Same.
2458         * runtime/error.c (itoa): Same.
2459
2460 2004-12-15  Bud Davis  <bdavis9659@comcast.net>
2461             Steven G. Kargl  <kargls@comcast.net>
2462
2463         PR fortran/17597
2464         * io/list_read.c (read_real): do not push back a comma when
2465         it delimits a real value without a decimal point
2466
2467 2004-12-14  Steve Ellcey  <sje@cup.hp.com>
2468
2469         * libgfortran/io/transfer.c (us_read): Use memcpy/memset
2470         instead of assignment to fill unaligned buffer.
2471         (us_write): Ditto.
2472         (next_record_w): Ditto.
2473
2474 2004-12-14  Steven G. Kargl  <kargls@comcast.net>
2475
2476         PR libfortran/18966
2477         * gfortran.h: typedef GFC_INTEGER_1 and GFC_INTEGER_2
2478         * intrinsics/cshift0.c (cshift0_1,cshift0_2): New functions.
2479         * intrinsics/eoshift0.c (eoshift0_1,eoshift0_2): New functions.
2480         * intrinsics/eoshift2.c (eoshift2_1,eoshift2_2): New functions.
2481
2482 2004-12-13  David Edelsohn  <edelsohn@gnu.org>
2483
2484         * io/transfer.c (read_sf): Change bitwise "and" to logical "and".
2485
2486 2004-12-12  Richard Henderson  <rth@redhat.com>
2487
2488         * intrinsics/cshift0.c, intrinsics/eoshift0.c, intrinsics/eoshift2.c,
2489         intrinsics/pack_generic.c, intrinsics/reshape_generic.c,
2490         intrinsics/spread_generic.c, intrinsics/transpose_generic.c,
2491         intrinsics/unpack_generic.c, m4/cshift1.m4, m4/dotprod.m4,
2492         m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4,
2493         m4/iforeach.m4, m4/ifunction.m4, m4/matmul.m4, m4/matmull.m4,
2494         m4/reshape.m4, m4/shape.m4, m4/transpose.m4: Use standard prefix
2495         instead of "__".
2496         * generated/*: Rebuild.
2497
2498 2004-12-12  Richard Henderson  <rth@redhat.com>
2499
2500         * acinclude.m4 (LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY): New.
2501         (LIBGFOR_CHECK_ATTRIBUTE_DLLEXPORT): New.
2502         (LIBGFOR_CHECK_ATTRIBUTE_ALIAS): New.
2503         * configure.ac: Use them.
2504         * configure, config.h.in, aclocal.m4: Rebuild.
2505         * libgfortran.h (prefix): Remove.
2506         (PREFIX, IPREFIX): New.
2507         (sym_rename, sym_rename1, sym_rename2): New.
2508         (internal_proto, export_proto, export_proto_np): New.
2509         (iexport_proto, iexport): New.
2510         (iexport_data_proto, iexport_data): New.
2511         * intrinsics/abort.c, intrinsics/args.c, intrinsics/associated.c,
2512         intrinsics/cpu_time.c, intrinsics/cshift0.c,
2513         intrinsics/date_and_time.c, intrinsics/env.c, intrinsics/eoshift0.c,
2514         intrinsics/eoshift2.c, intrinsics/etime.c, intrinsics/exit.c,
2515         intrinsics/flush.c, intrinsics/fnum.c, intrinsics/getXid.c,
2516         intrinsics/getcwd.c, intrinsics/ishftc.c, intrinsics/mvbits.c,
2517         intrinsics/pack_generic.c, intrinsics/rand.c, intrinsics/random.c,
2518         intrinsics/reshape_generic.c, intrinsics/size.c,
2519         intrinsics/spread_generic.c, intrinsics/stat.c,
2520         intrinsics/string_intrinsics.c, intrinsics/system.c,
2521         intrinsics/system_clock.c, intrinsics/transpose_generic.c,
2522         intrinsics/umask.c, intrinsics/unlink.c, intrinsics/unpack_generic.c,
2523         io/backspace.c, io/close.c, io/endfile.c, io/inquire.c, io/io.h,
2524         io/open.c, io/rewind.c, io/transfer.c, libgfortran.h, m4/cshift1.m4,
2525         m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4,
2526         m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/iforeach.m4,
2527         m4/ifunction.m4, m4/matmul.m4, m4/matmull.m4, m4/nearest.m4,
2528         m4/pow.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4,
2529         m4/transpose.m4, runtime/environ.c, runtime/error.c,
2530         runtime/in_pack_generic.c, runtime/in_unpack_generic.c,
2531         runtime/main.c, runtime/memory.c, runtime/pause.c, runtime/select.c,
2532         runtime/stop.c: Use them to mark symbols internal or external.
2533         * generated/*: Rebuild.
2534
2535 2004-12-09  David Edelsohn  <edelsohn@gnu.org>
2536
2537         PR bootstrap/18895
2538         Revert 2004-12-07 change.
2539         * Makefile.am (AM_MAKEFLAGS): Delete.
2540         * Makefile.in: Regenerate.
2541
2542 2004-12-07  Steve Ellcey  <sje@cup.hp.com>
2543
2544         * libgfortran/Makefile.am (AM_MAKEFLAGS): New.
2545         * libgfortran/Makefile.in: Regenerate
2546
2547 2004-12-07  Steve Ellcey  <sje@cup.hp.com>
2548
2549         * io/io.h (open_external): Change prototype.
2550         * io/unix.c (regular_file): Change prototype and set flags->action if
2551         needed.
2552         (open_external): Ditto.
2553         * io/open.c (new_unit): Let open_external set flags->action.
2554
2555 2004-12-07  Eric Botcazou  <ebotcazou@libertysurf.fr>
2556
2557         * configure.ac: Check for ieeefp.h.  Check for fabsf in libm.
2558         * configure: Regenerate.
2559         * config.h.in: Likewise.
2560         * c99_protos.h: New file.
2561         * libgfortran.h: Include c99_protos.h and conditionally ieeefp.h.
2562         * intrinsics/c99_functions.c (fabsf): New function.
2563
2564 2004-12-06  Richard Henderson  <rth@redhat.com>
2565
2566         * intrinsics/cshift0.c, intrinsics/eoshift0.c, intrinsics/eoshift2.c,
2567         intrinsics/pack_generic.c, intrinsics/string_intrinsics.c,
2568         intrinsics/transpose_generic.c, m4/ifunction.m4, m4/matmul.m4,
2569         m4/matmull.m4, m4/transpose.m4: Use internal_malloc_size instead
2570         of internal_malloc.
2571         * generated/*: Rebuild.
2572
2573 2004-12-06  Richard Henderson  <rth@redhat.com>
2574
2575         * intrinsics/c99_functions.c, intrinsics/eoshift0.c,
2576         intrinsics/eoshift2.c, intrinsics/exit.c, intrinsics/flush.c,
2577         intrinsics/ishftc.c, intrinsics/mvbits.c, intrinsics/pack_generic.c,
2578         intrinsics/random.c, intrinsics/reshape_generic.c, intrinsics/size.c,
2579         intrinsics/spread_generic.c, intrinsics/stat.c,
2580         intrinsics/string_intrinsics.c, intrinsics/system_clock.c,
2581         intrinsics/transpose_generic.c, intrinsics/unlink.c,
2582         intrinsics/unpack_generic.c, io/backspace.c, io/format.c,
2583         io/list_read.c, io/lock.c, io/open.c, io/transfer.c, io/unix.c,
2584         io/write.c, runtime/environ.c, runtime/error.c,
2585         runtime/in_pack_generic.c, runtime/in_unpack_generic.c, runtime/main.c,
2586         runtime/memory.c, runtime/pause.c, runtime/stop.c,
2587         runtime/string.c: Whitespace fixes.
2588
2589 2004-12-06  Richard Henderson  <rth@redhat.com>
2590
2591         * Makefile.am: Generate all m4 output under $(srcdir).
2592         * Makefile.in: Regenerate.
2593
2594 2004-12-02  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2595
2596         PR fortran/18710
2597         * io/transfer.c (unformatted_read, unformatted_write): width of
2598         a COMPLEX is twice its kind.
2599
2600 2004-12-02  Richard Sandiford  <rsandifo@redhat.com>
2601
2602         * configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
2603         * configure, aclocal.m4, Makefile.in: Regenerate.
2604
2605 2004-12-02  Bud Davis  <bdavis9659@comcast.net>
2606
2607         PR libfortran/18284
2608         * io/unix.c (fd_alloc_w_at): Update file_length when extending.
2609         * io/backspace.c (formatted_backspace): Reset endfile after backspace.
2610
2611 2004-12-02  Bud Davis  <bdavis9659@comcast.net>
2612
2613         * io/inquire.c (inquire_via_unit): do not allow a direct access
2614         file to be opened for sequential I/O.
2615
2616 2004-12-02  Steven G. Kargl  <kargls@comcast.net>
2617         Paul Brook  <paul@codesourcery.com>
2618
2619         * intrinsics/flush.c: New file.
2620         * intrinsics/fnum.c: ditto
2621         * intrinsics/stat.c: ditto
2622         * io/io.h (unit_to_fd): Add prototype.
2623         * io/unix.c (unit_to_fd): New function.
2624         * configure.ac: Add test for members of struct stat.  Check for
2625         sys/types.h and sys/stat.h
2626         * Makefile.am: Add intrinsics/{flush.c,fnum.c,stat.c}
2627         * configure.in: Regenerate.
2628         * config.h.in: Regenerate.
2629         * Makefile.in: Regenerate.
2630
2631 2004-12-01  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
2632
2633         * Makefile.am (AM_CPPFLAGS): Use -iquote instead of -I.
2634
2635 2004-11-28  Bud Davis  <bdavis9659@comcast.net>
2636
2637         * io/unix.c (mmap_alloc_w_a): check for a write to a location
2638         less than the mapped area.
2639
2640 2004-11-27  Bud Davis  <bdavis9659@comcast.net>
2641
2642         PR fortran/18364
2643         *  io/endfile.c (st_endfile): flush the stream before truncating.
2644
2645 2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>
2646
2647         * configure: Regenerate for libtool change.
2648
2649 2004-11-22  Steven Bosscher  <stevenb@suse.de>
2650
2651         PR libfortran/15960
2652         * configure.ac: Check for finite in libm.
2653         * libgfortran.h: Define isfinite macro if not defined.
2654         * intrinsics/c99_functions.c: Use defined(fpclassify) instead of
2655         HAVE_FPCLASSIFY.
2656         * io/write.c (write_float): Use isfinite instead of finite.
2657         * configure, config.h.in: Rebuilt.
2658
2659 2004-11-20  Roger Sayle  <roger@eyesopen.com>
2660
2661         * io/write.c (write_float, list_formatted_write): Fix indentation.
2662
2663 2004-11-20  Eric Botcazou  <ebotcazou@libertysurf.fr>
2664
2665         PR target/16135
2666         * acinclude.m4 (LIBGFOR_TARGET_ILP32): New check.
2667         * configure.ac: Include LIBGFOR_TARGET_ILP32.
2668         * configure: Regenerate.
2669         * config.h.in: Likewise.
2670         * libgfortran.h: Provide default definitions for C99 types
2671         on ILP32 targets that don't have them.
2672
2673         PR target/17999
2674         * configure.ac: Check for snprintf.
2675         * configure: Regenerate.
2676         * config.h.in: Likewise.
2677         * intrinsics/date_and_time.c (date_and_time): Do not
2678         use snprinf if it is not available.
2679         * io/write.c (output_float): Likewise.
2680
2681 2004-11-20  Steven G. Kargl  <kargls@comcast.net>
2682
2683         * Makefile.am: Add intrinsics/{umask.c,unlink.c,exit.c}
2684         * Makefile.in: Regenerated
2685         * intrinsics/umask.c: New file
2686         * intrinsics/unlink.c: ditto
2687         * intrinsics/exit.c: ditto
2688
2689 2004-11-18  Victor Leikehman  <lei@il.ibm.com>
2690
2691         * m4/matmul.m4: Loops reordered to improve cache behavior.
2692         * generated/matmul_??.c: Regenerated.
2693
2694 2004-11-10  Paul Brook  <paul@codesourcery.com>
2695
2696         PR fortran/18218
2697         * configure.ac: Check for strtof.
2698         * configure: Regenerate.
2699         * config.h.in: Regenerate.
2700         * io/read.c (convert_real): Use strtof if available.
2701         (convert_precision_real): Remove.
2702         (read_f): Avoid poor exponentiation algorithm.
2703
2704 2004-11-05  Andreas Schwab  <schwab@suse.de>
2705
2706         * configure.ac: Use AC_PROG_FC, FC and FCFLAGS instead of
2707         AC_PROG_F77, F77 and FFLAGS.
2708         * Makefile.am (selected_int_kind.inc, selected_real_kind.inc): Use
2709         FCCOMPILE instead of F77COMPILE.
2710         * configure, Makefile.in: Regenerate.
2711
2712 2004-11-05  Kelley Cook  <kcook@gcc.gnu.org>
2713
2714         * acinclude.m4: Properly quote AC_CACHE_CHECK.
2715         * Makefile.am: Add in ACLOCAL_AMFLAGS.
2716         * aclocal.m4, configure, Makefile.in: Regenerate.
2717
2718 2004-10-30  Aaron W. LaFramboise <aaronavay62@aaronwl.com>
2719
2720         * config.h.in: Regenerate.
2721         * configure: Regenerate.
2722         * configure.ac (AC_CHECK_FUNCS): Add mkstemp.
2723         * io/unix.c (S_IRGRP): Define if undefined.
2724         (S_IWGRP): Same.
2725         (S_IROTH): Same.
2726         (S_IWOTH): Same.
2727         (tempfile): Use mktemp if mkstemp missing, fix typos.
2728
2729 2004-10-30  Aaron W. LaFramboise <aaronavay62@aaronwl.com>
2730
2731         *  intrinsics/system.c ("libgfortran.h"): Move after system headers.
2732
2733 2004-10-30  Canqun Yang  <canqun@nudt.edu.cn>
2734
2735         * intrinsics/rand.c (irand): Handle NULL argument.
2736
2737 2004-10-07  Paul Brook  <paul@codesourcery.com>
2738
2739         * io/transfer.c (finalize_transfer): Free internal streams.
2740         * io/unix.c (mem_close): Free stream object.
2741
2742 2004-10-07  Paul Brook  <paul@codesourcery.com>
2743
2744         * intrinsics/string_intrinsics.c (string_verify): Fix off by one
2745         error.
2746
2747 2004-10-06  Paul Brook  <paul@codesourcery.com>
2748
2749         PR libfortran/17709
2750         * io/transfer.c (data_transfer_init): Reset sf_seen_eor.
2751
2752 2004-10-04  Andrew Pinski  <pinskia@physics.uc.edu>
2753
2754         * intrinsics/mvbits.c: Commit the file.
2755
2756 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2757
2758         PR fortran/17283
2759         * intrinsics/pack_generic.c (__pack): Allocate memory for return array
2760         if not done by caller.
2761         (__pack_s): New function.
2762         * runtime/memory.c (internal_malloc, internal_malloc64): Allow
2763         allocating zero memory.
2764
2765         PR fortran/17631
2766         * Makefile.am (gfor_helper_src): Add intrinsics/mvbits.h.
2767         * Makefile.in: Regenerate.
2768         * intrinsics/mvbits.h: New file.
2769
2770         PR fortran/17776
2771         * intrinsics/system.c: New file.
2772         * Makefile.am: Add dependency for the new file.
2773         * Makefile.in: Regenerate.
2774
2775 2004-10-04  Paul Brook  <paul@codesourcery.com>
2776         Bud Davis  <bdavis9659@comcast.net>
2777
2778         PR fortran/17706
2779         PR fortran/16434
2780         * io/format.c (parse_format_list): Set repeat count for S, SP, SS,
2781         BN and BZ formats.
2782         * io/write.c (output_float): Don't output minus zero.
2783
2784 2004-10-03  Aaron W. LaFramboise <aaronavay62@aaronwl.com>
2785
2786         * intrinsics/abort.c ("libgfortran.h"): Move.
2787         * intrinsics/date_and_time.c ("libgfortran.h"): Same.
2788         * intrinsics/write.c ("libgfortran.h"): Same.
2789
2790 2004-09-26  Tobias Schlueter  <tobis.schlueter@physik.uni-muenchen.de>
2791
2792         PR libfortran/16137
2793         * config.h.in (HAVE_POWF): Undefine.
2794         * configure.ac: Check for 'powf' in library.
2795         * configure: Regenerate.
2796         * intrinsics/c99_functions.c (powf): New function.
2797
2798 2004-09-24  Tobias Schlueter  <tobis.schlueter@physik.uni-muenchen.de>
2799
2800         * intrinsics/etime.c (etime_): New function.
2801
2802 2004-09-21  Steven G. Kargl  <kargls@comcast.net>
2803
2804         * libgfortran.h: define gfc_alloca()
2805         * intrinsics/env.c (getenv, get_environment_variable_i4): Use it.
2806
2807 2004-09-21  Bud Davis  <bdavis9659@comcast.net>
2808
2809         PR fortran/17286
2810         * io/list_read.c (namelist_read): ignore spaces after
2811         the '=' for namelist reads.
2812
2813 2004-09-15  Aaron W. LaFramboise <aaronavay62@aaronwl.com>
2814
2815         * config.h.in: Regenerate.
2816         * configure: Regenerate.
2817         * configure.ac (AC_CHECK_HEADERS): Check for sys/mman.h.
2818         * unix.c: Include stdio.h.
2819         (HAVE_SYS_MMAN_H): Check.
2820         (PROT_READ, PROT_WRITE): Provide default definitions.
2821
2822 2004-09-15  Steven G. Kargl  <kargls@comcast.net>
2823
2824         * intrincics/getcwd.c: New file.
2825         * Makefile.am: Add getcwd.c.
2826         * Makefile.in: Regenerated.
2827
2828 2004-09-15  Steven G. Kargl  <kargls@comcast.net>
2829         Paul Brook  <paul@codesourcery.com>
2830
2831         * intrinsics/env.c (getenv, get_environmental_variable): Remove
2832         trailing white space.  Use alloca.  Honour trim_name.
2833
2834 2004-09-13  Bud Davis  <bdavis9659@comcast.net>
2835
2836         PR fortran/17090
2837
2838         * io/list_read.c (list_formatted_read): Handle trailing spaces
2839         at end of line.
2840
2841 2004-09-06  Steven G. Kargl  <kargls@comcast.net>
2842
2843         * io/write.c (output_float): Typo in comment.  Remove debugging
2844         printf.  Fix format for FP of form 1e10.
2845
2846 2004-09-03  Richard Henderson  <rth@redhat.com>
2847
2848         * intrinsics/cshift0.c (DEF_COPY_LOOP, copy_loop_int, copy_loop_long,
2849         copy_loop_double, copy_loop_ldouble): New.
2850         (__cshift0): Make shift type ssize_t.  Use % operator instead of
2851         div.  Use specialized versions of copy loop depending on the shape.
2852
2853 2004-09-02  Paul Brook  <paul@codesourcery.com>
2854
2855         * io/format.c (parse_format_list): Set repeat count for P descriptors.
2856         * write.c (output_float): Fix condition.  Correctly handle nonzero
2857         scale factor.
2858
2859 2004-09-01  Eric Botcazou  <ebotcazou@libertysurf.fr>
2860
2861         * mk-sik-inc.sh: Use a temporary string instead of 'echo -n'.
2862         * mk-srk-inc.sh: Likewise.
2863
2864 2004-09-01  Paul Brook  <paul@codesourcery.com>
2865
2866         * runtime/error.c (generate_error): Set both iostat and
2867         library_return.
2868
2869 2004-08-31  Paul Brook  <paul@codesourcery.com>
2870
2871         PR libfortran/16805
2872         * io/list_read.c (next_char): Don't signal EOF for internal files.
2873         * io/unix.c (mem_alloc_r_at): Don't return NULL for incomplete reads.
2874
2875 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2876
2877         * io/unit.c: Separate copyright years by ','.
2878         (compare, insert_unit, delete_unit, is_internal_unit, close_units):
2879         Remove blank line in beginning of function.
2880         (get_unit): Simplify code.
2881
2882 2004-08-31  Paul Brook  <paul@codesourcery.com>
2883
2884         * io/unit.c (get_unit): Remove superfluous if.
2885
2886 2004-08-31  Paul Brook  <paul@codesourcery.com>
2887
2888         * io/transfer.c (read_sf): Rename uinty to readlen.  Detect EOF.
2889         (finalize_transfer): Move setjmp after namlist IO.
2890         * io/unix.c (mem_alloc_r_at): Calculate remaining length correctly.
2891
2892 2004-08-31  Paul Brook  <paul@codesourcery.com>
2893
2894         * list_read.c (eat_separator): Set at_eo when a '/' is seen.
2895
2896 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2897
2898         * libgfortran.h: Replace 'gfc_strlen_type' by
2899         'gfc_charlen_type'. Update comment accordingly.
2900         * intrinsics/args.c, intrinsics/env.c, io/io.h, io/transfer.c:
2901         Replace all occurences of 'gfc_strlen_type' by 'gfc_charlen_type'.
2902
2903 2004-08-31  Paul Brook  <paul@codesourcery.com>
2904
2905         * libgfortran.h: Add comments.
2906
2907 2004-08-30  Richard Henderson  <rth@redhat.com>
2908
2909         * Makefile.am (gfor_helper_src): Split selected_kind.f90.
2910         (gfor_built_src): Add selected_int_kind.inc selected_real_kind.inc.
2911         (selected_int_kind.inc selected_real_kind.inc): New rules.
2912         * Makefile.in: Regenerate.
2913         * mk-sik-inc.sh, mk-srk-inc.sh: New files.
2914         * intrinsics/selected_int_kind.f90: Split from selected_kind.f90,
2915         include table of detected kinds.
2916         * intrinsics/selected_real_kind.f90: Similarly.
2917
2918 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
2919         Paul Brook  <paul@codesourcery.com>
2920
2921         * intrinsics/bessel.c: New file.
2922         * intrinsics/erf.c: New file.
2923         * Makefie.am: Add intrinsics/bessel.c and intrinsics/erf.c.
2924         * configure.ac: Test for C99 Bessel and Error functions.
2925         * Makefile.in: Regenerate.
2926         * config.h.in: Regenerate.
2927         * configure: Regenerate.
2928
2929 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
2930         Paul Brook  <paul@codesourcery.com>
2931
2932         * Makefile.am: Add intrinsics/getXid.c.
2933         * configure.ac: Add tests for get{g,p,u}id.
2934         * config.h.in: Regenerate.
2935         * Makefile.in: Regenerate.
2936         * configure: Regenerate.
2937
2938 2004-08-28  Paul Brook  <paul@codesourcery.com>
2939
2940         PR libfortran/17195
2941         * libgfortran.h (rtoa): Remove prototype.
2942         * runtime/error.c (rtoa): Remove.
2943         * io/write.c (calculate_G_format): Don't add blanks if E format is
2944         used.  Add correct number of blanks when exponent width is specified.
2945         (output_float): Rewrite.
2946
2947 2004-08-27  Paul Brook  <paul@codesourcery.com>
2948
2949         * io/rewind.c (st_rewind): Reset unit to read mode.
2950
2951 2004-08-27  Bud Davis  <bdavis9659@comcast.net>
2952
2953         PR fortran/16597
2954         * io/io.h: created typedef for unit_mode.
2955         * io/io.h (gfc_unit): added mode to unit structure.
2956         * io/transfer.c (data_transfer_init): flush if a write then
2957         read is done on a unit (direct access files).
2958         * io/rewind.c (st_rewind): Used unit mode instead of global.
2959
2960 2004-08-24  Bud Davis  <bdavis9659@comcast.net>
2961
2962         PR fortran/17143
2963         * runtime/error.c (itoa): keep from overflowing during
2964         mod operation by using unsigned variable.
2965
2966 2004-08-24  Bud Davis  <bdavis9659@comcast.net>
2967
2968         PR fortran/17164
2969         * runtime/string_intrinsics.c (string_index):check for
2970         substring longer than string.
2971
2972 2004-08-24  David Edelsohn  <edelsohn@gnu.org>
2973
2974         * Makefile.am (libgfortran_la_LDFLAGS): Add -lm.
2975         * Makefile.in: Rebuilt.
2976
2977 2004-08-23  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2978
2979         * io/io.h, io/list_read.c, io/open.c, io/transfer.c, io/write.c:
2980         Fix formatting issues, update copyright years.
2981
2982 2004-08-21  Bud Davis  <bdavis9659@comcast.net>
2983
2984         PR 16908
2985         * io/transfer.c (next_record_w): Do not blank pad.
2986         * io/transfer.c (next_record): Take into account partial records.
2987
2988 2004-08-18  Victor Leikehman  <lei@il.ibm.com>
2989
2990         PR fortran/13278
2991         * io/transfer.c (st_set_nml_var)
2992         * io/write.c (namelist_write): Allow var_name and var_name_len to be
2993         null. For strings, use string_length field instead of len.
2994         * io/io.h (struct namelist_type): New field string_length.
2995         (st_set_nml_var_char): New argument string_length.
2996
2997 2004-08-13  Bud Davis  <bdavis9659@comcast.net>
2998
2999         PR gfortran/16935
3000         * io/open.c (st_open): use flags instead of the unit structure.
3001
3002 2004-08-10  Victor Leikehman  <lei@il.ibm.com>
3003
3004         * io/list_read.c (namelist_read): Convert variable names
3005         to lower case, so that mixed-case names are recognized.
3006         Don't read beyond terminating slash.
3007
3008 2004-08-09  Richard Henderson  <rth@redhat.com>
3009             Roger Sayle  <roger@eyesopen.com>
3010
3011         * intrinsics/c99_functions.c (nextafterf): New implementation that
3012         works correctly with denormalized numbers.
3013
3014 2004-08-09  Victor Leikehman  <lei@il.ibm.com>
3015
3016         * m4/matmul.m4, m4/matmull.m4, intrinsics/eoshift0.c,
3017         intrinsics/eoshift2.c, intrinsics/transpose_generic.c:
3018         Allocate space if return value has NULL in its data field.
3019         * generated/*.c: Regenerate.
3020
3021 2004-08-06  Janne Blomqvist  <jblomqvi@cc.hut.fi>
3022
3023         * intrinsics/env.c: New file.
3024         * Makefile.am: Add env.c to build.
3025         * Makefile.in: Regenerate.
3026
3027 2004-08-05  Victor Leikehman  <lei@il.ibm.com>
3028
3029         PR libgfortran/16704
3030         * io/read.c (read_radix): Understand letters f and F as hex digits.
3031
3032 2004-08-04  Victor Leikehman  <lei@il.ibm.com>
3033
3034         * libgfortran.h (array_t, size0) New declarations.
3035         * m4/ifunction.m4, m4/transpose.m4, intrinsics/cshift0.c: Allocate
3036         space if return value descriptor has NULL in its data field,
3037         and initialize bounds and stride.
3038         * intrinsics/size.c (array_t, size0): Declarations moved to
3039         libgfortran.h.
3040         * generated/*.c: Regenerate.
3041
3042 2004-08-03  Roger Sayle  <roger@eyesopen.com>
3043
3044         PR libgfortran/16137
3045         * configure.ac: Add tests for acosf, asinf, atan2f, atanf, ceilf,
3046         copysignf, cosf, coshf, expf, floorf, frexpf, hypotf, logf, log10f,
3047         scalbnf, sinf, sinhf, sqrtf, tanf and tanhf in libm.
3048         * config.h.in: Regenerate.
3049         * configure: Regenerate.
3050
3051         * instrinsics/c99_functions.c (acosf, asinf, atan2f, atanf, ceilf,
3052         copysignf, cosf, coshf, expf, floorf, frexpf, hypotf, logf, log10f,
3053         nextafterf, scalbnf, sinf, sinhf, sqrtf, tanf, tanhf): New stub
3054         implementations for targets that don't support C99 float functions.
3055
3056 2004-08-01  Roger Sayle  <roger@eyesopen.com>
3057
3058         * io/write.c (write_float): Use the slightly more portable isnan
3059         in preference to isinf.
3060
3061 2004-07-18  Bud Davis  <bdavis9659@comcast.net>
3062
3063         * configure.ac: Add check for LFS support.
3064         * configure: Regenerate
3065
3066 2004-07-11  Paul Brook  <paul@codesourcery.com>
3067
3068         PR fortran/16303
3069         * m4/cexp.m4 (carg): Return -pi to pi.
3070         * generated/exp_c?.c: Regenerate.
3071
3072 2004-07-08  Andreas Krebbel  <krebbel1@de.ibm.com>
3073
3074         PR fortran/16291
3075         * libgfortran/io/write.c: (write_float): Added length check.
3076         Remove pointless memset calls.
3077
3078 2004-07-04  Bud Davis  <bdavis9659@comcast.net>
3079             Paul Brook  <paul@codesourcery.com>
3080
3081         PR fortran/15472
3082         * io/transfer.c(us_write): set recl for seq unform writes to max size.
3083         * io/transfer.c(data_transfer_init): handle un-opened seq unform unit.
3084         * io/unix.c(fd_alloc_w_at): handle requests at start, fd_flush at
3085         right time.
3086         * io/unix.c(is_seekable): set based upon the file/device, not the
3087         method being used to access it (fd or mmap).
3088         * io/unix.c(fd_flush): don't set file_size if !seekable.
3089         * io/unix.c(fd_truncate: ditto.
3090
3091 2004-07-04  Janne Blomqvist  <jblomqvi@cc.hut.fi>
3092         Paul Brook  <paul@codesourcery.com>
3093
3094         PR fortran/15280
3095         PR fortran/15665
3096         * libgfortran.h (gfc_strlen_type): Define.
3097         * intrinsics/args.c (getarg): Rename ...
3098         (getarg_i4): ... to this.
3099         (getarg_i8, get_command_argument_i4, get_command_argument_i8,
3100         get_command_i4, get_command_i8): New functions.
3101
3102 2004-07-04  Matthias Klose  <doko@debian.org>
3103
3104         * libtool-version: New.
3105         * Makefile.am (libgfortran_la_LDFLAGS): Use -version-info for soname.
3106         * Makefile.in: Regenerate.
3107         * configure.ac: Remove libtool_VERSION macro
3108         * configure: Regenerate
3109
3110 2004-06-30  Steve Kargl  <sgk@troutmask.apl.washington.edu>
3111             Steven Bosscher  <stevenb@suse.de>
3112
3113         * intrinsics/rand.c (rand): Wrap the irand() call from the previous
3114         commit in prefix.
3115
3116 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3117         Paul Brook  <paul@codesourcery.com>
3118
3119         * runtime/normalize.c (normalize_r4_i4, normalize_r8_i8): Fix
3120         comments.
3121         * intrinsics/rand.c (rand): Call irand() in call to normalize_r4_i4.
3122
3123 2004-06-27  Bud Davis  <bdavis9659@comcast.net>
3124
3125         PR gfortran/12839
3126         * io/write.c (write_float): check signbit for Infinity.
3127
3128 2004-06-26  Bud Davis  <bdavis9659@comcast.net>
3129
3130         PR gfortran/16196
3131         * unix.c(regular_file): create file if it does not exist.
3132
3133 2004-06-24  Andrew Pinski  <apinski@apple.com>
3134
3135         * configure.ac: Remove check for libmx.
3136         * configure: Regenerate.
3137
3138 2004-06-22  Janne Blomqvist  <jblomqvi@cc.hut.fi>
3139
3140         PR fortran/15750
3141         * inquire.c (st_inquire): Add comment
3142         * io.h (st_parameter): Add iolength.
3143         (st_iolength, st_iolength_done): Declare.
3144         * transfer.c (iolength_transfer, iolength_transfer_init,
3145         st_iolength, st_iolength_done): New functions.
3146
3147 2004-06-21  Steven G. Kargl  <kargls@comcast.net>
3148
3149         * etime.c (etime_sub): Remove array rank check;
3150         Add check for sufficient space.
3151
3152 2004-06-19  Bud Davis  <bdavis9659@comcast.net>
3153
3154         PR gfortran/16080
3155         * io/list_read.c(set_value): fixed spelling.
3156
3157 2004-06-19  Bud Davis  <bdavis9659@comcast.net>
3158
3159         PR gfortran/16080
3160         * io/list_read.c(set_value): don't copy if the string is null.
3161
3162 2004-06-14  Bud Davis  <bdavis9659@comcast.net>
3163
3164         PR gfortran/15292
3165         * intrinsics/c99_functions.c: Use fpclassify if it exists.
3166
3167 2004-06-13  Paul Brook  <paul@codesourcery.com>
3168
3169         * Makefile.am (gfor_helper_src): Add runtime/normalize.f90.
3170         * configure.ac: Add checks for nextafter and nextafterf.
3171         * Makefile.in, config.h.in, configure: Regenerate.
3172         * libgfortran.h (normalize_r4_i4, normalize_r8_i8): Declare.
3173         * intrinsics/rand.c (rand): Use normalize_r4_i4.
3174         * intrinsics/random.c (random_r4): Use normalize_r4_i4.
3175         (random_r8): Use normalize_r8_i8.
3176         * runtime/normalize.c: New file.
3177
3178 2004-06-13  Steven G. Kargl  <kargls@comcast.net>
3179             Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3180
3181         * random.c: Fix several spelling and formatting mistakes in
3182         comments.
3183         (random_r8): Fix loop to make random numbers range in [0,1(.
3184
3185
3186 2004-06-13  Steven G. Kargl  <kargls@comcast.net>
3187
3188         * random.c (random_r4): Burn a random number.
3189         (random_r8): fix infinite loop.
3190
3191 2004-06-12  Bud Davis  <bdavis9659@comcast.net>
3192             Steve Kargl  <sgk@troutmask.apl.washington.edu>
3193
3194         PR gfortran/15292
3195         * intrinsics/c99_functions.c: New file.
3196         * Makefile.am: Add new file.
3197         * configure.ac: Added test for round/roundf.
3198         * Makefile.in: Regenerate.
3199         * configure: Regenerate.
3200         * configure.h.in: Regenerate.
3201
3202 2004-06-12  Steven G. Kargl  <kargls@comcast.net>
3203
3204         * Makefile.am: Add rand.c and etime.c
3205         * Makefile.in: Regenerated.
3206         * aclocal.in: Regenerated.
3207         * cpu_time.c (second_sub, second): New functions.
3208         * rand.c (irand, rand, srand): New file.
3209         * etime.c (etime_sub, etime): New file.
3210
3211 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3212             Steven Bosscher  <stevenb@suse.de>
3213
3214         PR fortran/14923
3215         * intrinsics/date_and_time.c: New file.
3216         * Makefile.am (gfor_helper_src): Add intrinsics/date_and_time.c.
3217         * Makefile.in, aclocal.m4: Regenerate.
3218         * libgfortran.h: Prototype date_and_time().
3219
3220 2004-06-12  Bud Davis  <bdavis9659@comcast.net>
3221
3222         PR fortran/15665
3223         * intrinsics/args.c: Implement GETARG and IARGC.
3224         * Makefile.am: Add it.
3225         * Makefile.in: Regenerate.
3226
3227 2004-06-12  Bud Davis  <bdavis9659@comcast.net>
3228
3229         PR gfortran/12839
3230         * io/write.c(write_float): Format inf and nan IAW F2003.
3231
3232 2004-06-09  Bud Davis  <bdavis9659@comcaste.net>
3233
3234         PR gfortran/14897
3235         * io/transfer.c (formatted_transfer): position is unique
3236          for T and TL edit descriptors.
3237         (data_transfer_init): set record length to size of internal
3238          file.
3239
3240 2004-06-09  Bud Davis  <bdavis9659@comcast.net>
3241
3242         PR gfortran/15755
3243         * io/backspace.c(st_backspace): call correct routine for
3244         formatted and un-formatted units.
3245
3246 2004-05-30  Andreas Jaeger  <aj@suse.de>, Steven Bosscher <stevenb@suse.de>
3247
3248         PR gfortran/11800
3249         * Makefile.am (AM_CPPFLAGS): Renamed from INCLUDES.
3250         (lib_LTLIBRARIES): Rename to ...
3251         (toolexeclib_LTLIBRARIES): this for multilib support.
3252         * configure.in: Rename to ...
3253         * configure.ac: this.  Update to modern autoconf style, enable
3254         multilibs, support --enable-version-specific-runtime-libs.
3255         * Makefile.in: Regenerated.
3256         * configure: Regenerated.
3257         * aclocal.m4: Regenerated.
3258
3259 2004-05-30  Steven G. Kargl  <kargls@comcast.net>
3260
3261         * libgfortran.h (random_seed): Update prototype.
3262         * intrinsics/random.c: Disable old implementation and add new one.
3263
3264 2004-05-30  Andreas Jaeger  <aj@suse.de>
3265
3266         * intrinsics/random.c: Include unistd.h for close and read
3267         prototypes, remove unneeded inclusion of assert.h.
3268
3269         * intrinsics/abort.c: Include stdlib.h for abort prototype, remove
3270         unneeded inclusion of assert.h.
3271
3272 2004-05-27  Tobias Schlueter  <tobias.shclueter@physik.uni-muenchen.de>
3273
3274         PR fortran/15234
3275         * intrinsics/associated.c: Remove enum.
3276         (associated): Replace TRUE/FALSE by 1/0.
3277
3278 2004-05-23  Steven G. Kargl  <kargls@comcast.net>
3279
3280         * random.c (random_seed): Use correct variable.
3281
3282 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
3283
3284         * intrinsics/system_clock: New file.
3285         * Makefile.am: Add intrinsics/system_clock.c.
3286         * Makefile.in: Regenerate.
3287
3288 2004-05-21  Roger Sayle  <roger@eyesopen.com>
3289
3290         * io/format.c (parse_format_list): Allow the comma after a string
3291         literal to be optional.
3292
3293 2004-05-18  Paul Brook  <paul@codesourcery.com>
3294         Feng Wang  <fengwang@nudt.edu.cn>
3295
3296         * Makefile.am (i_pow_c): Set it. Add build rule.
3297         (gfor_built_src): Use it.
3298         (m4_files): add m4/pow.m4.
3299         * Makefile.in: Regenerate.
3300         * m4/pow.m4: New file.
3301         * generated/pow_*.c: Regenerate.
3302
3303 2004-05-18  Paul Brook  <paul@codesourcery.com>
3304
3305         * Makefile.am: Remove references to types.m4.
3306         * m4/iparm.m4: Merge with types.m4.
3307         * m4/types.m4: Remove.
3308         * m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4,
3309         m4/eoshift1.m4, m4/eoshift3.m4, m4/iforeach.m4, m4/ifunction.m4,
3310         m4/in_pack.m4, m4/in_unpack.m4, m4/iparm.m4, m4/matmul.m4,
3311         m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4,
3312         m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/reshape.m4,
3313         m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/transpose.m4):
3314         Update to use new iparm.m4.
3315         * generated/*.c: Regenerate.
3316
3317 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3318
3319         PR fortran/15235
3320         * gfortran.h (offset_t): Rename to ...
3321         (gfc_offset): ... this.
3322         * io/backspace.c (formatted_backspace, unformatted_backspace),
3323         io/io.h (stream, gfc_unit, global_t, file_length, file_position),
3324         transfer.c (us_read, us_write, next_record_r, next_record_w),
3325         io/unit.c (init_units), unix.c (unix_stream, fd_alloc,
3326         fd_alloc_r_at, fd_alloc_w_at, fd_seek, mmap_alloc,
3327         mmap_alloc_r_at, mmap_alloc_w_at, mmap_seek, mem_alloc_r_at,
3328         mem_alloc_w_at, mem_seek, file_length, file_position): Replace all
3329         occurences of offset_t by gfc_offset.
3330
3331 2004-05-16  Paul Brook  <paul@codesourcery.com>
3332
3333         * io/format.c (write_real): Don't include padding in format.
3334
3335 2004-05-16  Paul Brook  <paul@codesourcery.com>
3336
3337         * io/format.c (format_lex): Make c an int.
3338
3339 2004-05-16  Janne Blomqvist  <jblomqvi@cc.hut.fi>
3340         Paul Brook  <paul@codesourcery.com>
3341
3342         * io/write.c (write_logical): Don't print extra blank.
3343         (write_integer): Base field width on kind.
3344         (list_formatted_write): Output initial blank.
3345
3346 2004-05-16  Janne Blomqvist  <jblomqvi@cc.hut.fi>
3347
3348         * io/io.h (flush): Add prototype.
3349         * io/transfer.c (finalize_transfer): Flush partial records.
3350         * io/unix.c (flush): New function.
3351
3352 2004-05-15  Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3353
3354         PR fortran/15234
3355         * io/io.h (unit_t): Rename to ...
3356         (gfc_unit) ... this.
3357         (unit_root, current_unit, find_file, find_unit, get_unit): Now
3358         of type gfc_unit.
3359         (delete_file, insert_unit, close_unit): Argument now of type
3360         gfc_unit.
3361         * backspace.c (st_backspace), close.c (st_close), endfile.c
3362         (st_endfile), inquire.c (inquire_via_unit, st_inquire), open.c
3363         (test_endfile, edit_modes, new_unit, already_open, st_open),
3364         rewind.c (st_rewind), transfer.c (current_unit), unit.c
3365         (internal_unit, unit_cache, rotate_left, rotate_right, insert,
3366         insert_unit, delete_root, delete_treap, delete_unit, find_unit,
3367         get_unit, init_units, close_unit), unix.c (find_file0,
3368         find_file, delete_file): Replace all occurences of unit_t by
3369         gfc_unit.
3370
3371 2004-05-15  Bud Davis  <bdavis9659@comcast.net>
3372
3373         PR fortran/15311
3374         * io/write.c (write_a): right justify A edit output.
3375
3376 2004-05-14  Bud Davis  <bdavis9659@comcast.net>
3377
3378         PR fortran/15149
3379         * libgfortan.h,intrinsics/random.c: Made random_seed visible.
3380         * runtime/main.c(init): Call random_seed as part of MAIN init.
3381
3382 2004-05-13  Tobias Schlter  <tobias.schlueter@physik.uni-muenchen.de>
3383