re PR libfortran/24919 ([4.0] CRLF support in libgfortran)
[platform/upstream/gcc.git] / libgfortran / ChangeLog
1 2005-11-27  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2
3         PR libfortran/24919
4         * io/list_read.c (eat_separator, finish_separator,
5         read_character): Handle CRLF separators correctly during reads.
6         (nml_query): Use the HAVE_CRLF macro to print adequate newlines.
7         * io/io.h (st_parameter_dt): Add comment about the possible
8         values for sf_seen_eor.
9         * io/unix.c (tempfile, regular_file): HAVE_CRLF doesn't imply
10         that O_BINARY is defined, so we add that condition.
11         (stream_at_bof): Fix typo in comment.
12         * io/transfer.c (read_sf): Handle correctly CRLF, setting
13         sf_seen_eor value to 2 instead of 1.
14         (formatted_transfer_scalar): Use the sf_seen_eor value to
15         handle CRLF the right way.
16         * io/write.c (nml_write_obj, namelist_write): Use CRLF as newline
17         when HAVE_CRLF is defined.
18
19 2005-11-26  Richard Henderson  <rth@redhat.com>
20
21         * io/list_read.c (nml_parse_qualifier): Use ssize_t instead of int
22         in dtp->u.p.value.
23
24 2005-11-26  Janne Blomqvist  <jb@gcc.gnu.org>
25
26         PR libgfortran/24945
27         * io/open.c (edit_modes): Check for STATUS_UNKNOWN flag.
28         
29 2005-11-25  Richard Henderson  <rth@redhat.com>
30
31         * io/list_read.c (nml_parse_qualifier): Use memcpy to extract
32         values from dtp->u.p.value.
33         * io/io.h (struct st_parameter_dt): Change reversion_flag, first_item,
34         seen_dollar, sf_seen_eor, eor_condition, no_leading_blank, char_flag,
35         input_complete, at_eol, comma_flag, namelist_mode, nml_read_error to
36         single-bit fields.  Move value to where it'll be at least pointer
37         aligned.
38
39 2005-11-23  Alan Modra  <amodra@bigpond.net.au>
40
41         * io/open.c (new_unit): Use the right unit number when checking
42         for stdin, stdout, stderr.
43
44 2005-11-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
45
46         PR libgfortran/24794
47         * io/list_read.c (read_character): Add auto completion on short
48         namelist reads.
49
50 2005-11-21  David Edelsohn  <edelsohn@gnu.org>
51
52         * io/io.h (_LARGE_FILES): Undefine for AIX.
53         (_LARGE_FILE_API): Define for AIX.
54
55 2005-11-21  Jakub Jelinek  <jakub@redhat.com>
56
57         PR fortran/24774
58         PR fortran/14943
59         PR fortran/21647
60         * Makefile.am (AM_CPPFLAGS): Add gcc directories as -I paths,
61         add -D_GNU_SOURCE.
62         * Makefile.in: Regenerated.
63         * acinclude.m4 (LIBGFOR_CHECK_SYNC_FETCH_AND_ADD,
64         LIBGFOR_CHECK_GTHR_DEFAULT, LIBGFOR_CHECK_PRAGMA_WEAK): New macros.
65         * configure.ac: Add them.
66         * configure: Rebuilt.
67         * config.h.in: Rebuilt.
68         * libtool-version: Bump libgfortran.so SONAME to libgfortran.so.1.
69         * libgfortran.h (library_start, show_locus, internal_error,
70         generate_error, find_option): Add st_parameter_common * argument.
71         (library_end): Change into a dummy macro.
72         * io/io.h: Include gthr.h.
73         (SUPPORTS_WEAK): Define if HAVE_PRAGMA_WEAK.
74         (CHARACTER): Remove define.
75         (st_parameter, global_t): Remove typedef.
76         (ioparm, g, ionml, current_unit): Remove variables.
77         (init_error_stream): Remove prototype.
78         (CHARACTER1, CHARACTER2): Define.
79         (st_parameter_common, st_parameter_open, st_parameter_close,
80         st_parameter_filepos, st_parameter_inquire, st_parameter_dt): New
81         typedefs.
82         (IOPARM_LIBRETURN_MASK, IOPARM_LIBRETURN_OK, IOPARM_LIBRETURN_ERROR,
83         IOPARM_LIBRETURN_END, IOPARM_LIBRETURN_EOR, IOPARM_ERR, IOPARM_END,
84         IOPARM_EOR, IOPARM_HAS_IOSTAT, IOPARM_HAS_IOMSG, IOPARM_COMMON_MASK,
85         IOPARM_OPEN_HAS_RECL_IN, IOPARM_OPEN_HAS_FILE, IOPARM_OPEN_HAS_STATUS,
86         IOPARM_OPEN_HAS_ACCESS, IOPARM_OPEN_HAS_FORM, IOPARM_OPEN_HAS_BLANK,
87         IOPARM_OPEN_HAS_POSITION, IOPARM_OPEN_HAS_ACTION,
88         IOPARM_OPEN_HAS_DELIM, IOPARM_OPEN_HAS_PAD, IOPARM_CLOSE_HAS_STATUS,
89         IOPARM_INQUIRE_HAS_EXIST, IOPARM_INQUIRE_HAS_OPENED,
90         IOPARM_INQUIRE_HAS_NUMBER, IOPARM_INQUIRE_HAS_NAMED,
91         IOPARM_INQUIRE_HAS_NEXTREC, IOPARM_INQUIRE_HAS_RECL_OUT,
92         IOPARM_INQUIRE_HAS_FILE, IOPARM_INQUIRE_HAS_ACCESS,
93         IOPARM_INQUIRE_HAS_FORM, IOPARM_INQUIRE_HAS_BLANK,
94         IOPARM_INQUIRE_HAS_POSITION, IOPARM_INQUIRE_HAS_ACTION,
95         IOPARM_INQUIRE_HAS_DELIM, IOPARM_INQUIRE_HAS_PAD,
96         IOPARM_INQUIRE_HAS_NAME, IOPARM_INQUIRE_HAS_SEQUENTIAL,
97         IOPARM_INQUIRE_HAS_DIRECT, IOPARM_INQUIRE_HAS_FORMATTED,
98         IOPARM_INQUIRE_HAS_UNFORMATTED, IOPARM_INQUIRE_HAS_READ,
99         IOPARM_INQUIRE_HAS_WRITE, IOPARM_INQUIRE_HAS_READWRITE,
100         IOPARM_DT_LIST_FORMAT, IOPARM_DT_NAMELIST_READ_MODE,
101         IOPARM_DT_HAS_REC, IOPARM_DT_HAS_SIZE, IOPARM_DT_HAS_IOLENGTH,
102         IOPARM_DT_HAS_FORMAT, IOPARM_DT_HAS_ADVANCE,
103         IOPARM_DT_HAS_INTERNAL_UNIT, IOPARM_DT_HAS_NAMELIST_NAME,
104         IOPARM_DT_IONML_SET): Define.
105         (gfc_unit): Add lock, waiting and close fields.  Change file
106         from flexible array member into pointer to char.
107         (open_external): Add st_parameter_open * argument.
108         (find_file, file_exists): Add file and file_len arguments.
109         (flush_all_units): New prototype.
110         (max_offset, unit_root, unit_lock): New variable.
111         (is_internal_unit, is_array_io, next_array_record,
112         parse_format, next_format, unget_format, format_error,
113         read_block, write_block, next_record, convert_real,
114         read_a, read_f, read_l, read_x, read_radix, read_decimal,
115         list_formatted_read, finish_list_read, namelist_read,
116         namelist_write, write_a, write_b, write_d, write_e, write_en,
117         write_es, write_f, write_i, write_l, write_o, write_x, write_z,
118         list_formatted_write, get_unit): Add st_parameter_dt * argument.
119         (insert_unit): Remove prototype.
120         (find_or_create_unit, unlock_unit): New prototype.
121         (new_unit): Return gfc_unit *.  Add st_parameter_open *
122         and gfc_unit * arguments.
123         (free_fnodes): Remove prototype.
124         (free_format_data): New prototype.
125         (scratch): Remove.
126         (init_at_eol): Remove prototype.
127         (free_ionml): New prototype.
128         (inc_waiting_locked, predec_waiting_locked, dec_waiting_unlocked):
129         New inline functions.
130         * io/unit.c (max_offset, unit_root, unit_lock): New variables.
131         (insert): Adjust os_error caller.
132         (insert_unit): Made static.  Allocate memory here, initialize
133         lock and after inserting it return it, locked.
134         (delete_unit): Adjust for deletion of g.
135         (find_unit_1): New function.
136         (find_unit): Use it.
137         (find_or_create_unit): New function.
138         (get_unit): Add dtp argument, change meaning of the int argument
139         as creation request flag.  Adjust for different st_* calling
140         conventions, lock internal unit's lock before returning it
141         and removal of g.  Call find_unit_1 instead of find_unit.
142         (is_internal_unit, is_array_io): Add dtp argument, adjust for
143         removal of most of global variables.
144         (init_units): Initialize unit_lock.  Adjust insert_unit callers
145         and adjust for g removal.
146         (close_unit_1): New function.
147         (close_unit): Use it.
148         (unlock_unit): New function.
149         (close_units): Lock unit_lock, use close_unit_1 rather than
150         close_unit.
151         * io/close.c (st_close): Add clp argument.  Adjust for new
152         st_* calling conventions and internal function API changes.
153         * io/file_pos.c (st_backspace, st_endfile, st_rewind, st_flush):
154         Add fpp argument.  Adjust for new st_* calling conventions and
155         internal function API changes.
156         (formatted_backspace, unformatted_backspace): Likewise.  Add
157         u argument.
158         * io/open.c (edit_modes, st_open): Add opp argument.  Adjust for
159         new st_* calling conventions and internal function API changes.
160         (already_open): Likewise.  If not HAVE_UNLINK_OPEN_FILE, unlink
161         scratch file.  Instead of calling close_unit just call sclose,
162         free u->file if any and clear a few u fields before calling
163         new_unit.
164         (new_unit): Return gfc_unit *.  Add opp and u arguments.
165         Adjust for new st_* calling conventions and internal function
166         API changes.  Don't allocate unit here, rather than work with
167         already created unit u already locked on entry.  In case
168         of failure, close_unit it.
169         * io/unix.c: Include unix.h.
170         (BUFFER_SIZE, unix_stream): Moved to unix.h.
171         (unit_to_fd): Add unlock_unit call.
172         (tempfile): Add opp argument, use its fields rather than ioparm.
173         (regular_file): Likewise.
174         (open_external): Likewise.  Only unlink file if fd >= 0.
175         (init_error_stream): Add error argument, set structure it points
176         to rather than filling static variable and returning its address.
177         (FIND_FILE0_DECL, FIND_FILE0_ARGS): Define.
178         (find_file0): Use them.  Don't crash if u->s == NULL.
179         (find_file): Add file and file_len arguments, use them instead
180         of ioparm.  Add locking.  Pass either an array of 2 struct stat
181         or file and file_len pair to find_file0.
182         (flush_all_units_1, flush_all_units): New functions.
183         (file_exists): Add file and file_len arguments, use them instead
184         of ioparm.
185         * io/unix.h: New file.
186         * io/lock.c (ioparm, g, ionml): Remove variables.
187         (library_start): Add cmp argument, adjust for new st_* calling
188         conventions.
189         (library_end): Remove.
190         (free_ionml): New function.
191         * io/inquire.c (inquire_via_unit, inquire_via_filename,
192         st_inquire): Add iqp argument, adjust for new st_* calling
193         conventions and internal function API changes.
194         * io/format.c (FARRAY_SIZE): Decrease to 64.
195         (fnode_array, format_data): New typedefs.
196         (avail, array, format_string, string, error, saved_token, value,
197         format_string_len, reversion_ok, saved_format): Remove variables.
198         (colon_node): Add const.
199         (free_fnode, free_fnodes): Remove.
200         (free_format_data): New function.
201         (next_char, unget_char, get_fnode, format_lex, parse_format_list,
202         format_error, parse_format, revert, unget_format, next_test): Add
203         fmt or dtp arguments, pass it all around, adjust for internal
204         function API changes and adjust for removal of global variables.
205         (next_format): Likewise.  Constify return type.
206         (next_format0): Constify return type.
207         * io/transfer.c (current_unit, sf_seen_eor, eor_condition, max_pos,
208         skips, pending_spaces, scratch, line_buffer, advance_status,
209         transfer): Remove variables.
210         (transfer_integer, transfer_real, transfer_logical,
211         transfer_character, transfer_complex, transfer_array, current_mode,
212         read_sf, read_block, read_block_direct, write_block,
213         write_block_direct, unformatted_read, unformatted_write,
214         type_name, write_constant_string, require_type,
215         formatted_transfer_scalar, us_read, us_write, pre_position,
216         data_transfer_init, next_record_r, next_record_w, next_record,
217         finalize_transfer, iolength_transfer, iolength_transfer_init,
218         st_iolength, st_iolength_done, st_read, st_read_done, st_write,
219         st_write_done, st_set_nml_var, st_set_nml_var_dim,
220         next_array_record): Add dtp argument, pass it all around, adjust for
221         internal function API changes and removal of global variables.
222         * io/list_read.c (repeat_count, saved_length, saved_used,
223         input_complete, at_eol, comma_flag, last_char, saved_string,
224         saved_type, namelist_mode, nml_read_error, value, parse_err_msg,
225         nml_err_msg, prev_nl): Remove variables.
226         (push_char, free_saved, next_char, unget_char, eat_spaces,
227         eat_separator, finish_separator, nml_bad_return, convert_integer,
228         parse_repeat, read_logical, read_integer, read_character,
229         parse_real, read_complex, read_real, check_type,
230         list_formatted_read_scalar, list_formatted_read, finish_list_read,
231         find_nml_node, nml_untouch_nodes, nml_match_name, nml_query,
232         namelist_read): Add dtp argument, pass it all around, adjust for
233         internal function API changes and removal of global variables.
234         (nml_parse_qualifier): Likewise.  Add parse_err_msg argument.
235         (nml_read_obj): Likewise.  Add pprev_nl, nml_err_msg, clow and
236         chigh arguments.
237         (nml_get_obj_data): Likewise.  Add pprev_nl and nml_err_msg
238         arguments.
239         (init_at_eol): Removed.
240         * io/read.c (convert_real, read_l, read_a, next_char, read_decimal,
241         read_radix, read_f, read_x): Add dtp argument, pass it all around,
242         adjust for internal function API changes and removal of global
243         variables.
244         (set_integer): Adjust internal_error caller.
245         * io/write.c (no_leading_blank, nml_delim): Remove variables.
246         (write_a, calculate_sign, calculate_G_format, output_float,
247         write_l, write_float, write_int, write_decimal, write_i, write_b,
248         write_o, write_z, write_d, write_e, write_f, write_en, write_es,
249         write_x, write_char, write_logical, write_integer, write_character,
250         write_real, write_complex, write_separator,
251         list_formatted_write_scalar, list_formatted_write, nml_write_obj,
252         namelist_write): Add dtp argument, pass it all around, adjust for
253         internal function API changes and removal of global variables.
254         (extract_int, extract_uint, extract_real): Adjust internal_error
255         callers.
256         * runtime/fpu.c (_GNU_SOURCE): Don't define here.
257         * runtime/error.c: Include ../io/unix.h.
258         (filename, line): Remove variables.
259         (st_printf): Pass address of a local variable to init_error_stream.
260         (show_locus): Add cmp argument.  Use fields it points to rather than
261         filename and line variables.
262         (os_error, runtime_error): Remove show_locus calls.
263         (internal_error): Add cmp argument.  Pass it down to show_locus.
264         (generate_error): Likewise.  Use flags bitmask instead of non-NULL
265         check for iostat and iomsg parameter presence, adjust for st_*
266         calling convention changes.
267         * runtime/stop.c (stop_numeric, stop_string): Remove show_locus
268         calls.
269         * runtime/pause.c (pause_numeric, pause_string): Likewise.
270         * runtime/string.c: Include ../io/io.h.
271         (find_option): Add cmp argument.  Pass it down to generate_error.
272         * intrinsics/flush.c (recursive_flush): Remove.
273         (flush_i4, flush_i8): Use flush_all_units.  Add unlock_unit
274         call.
275         * intrinsics/rand.c: Include ../io/io.h.
276         (rand_seed_lock): New variable.
277         (srand, irand): Add locking.
278         (init): New constructor function.
279         * intrinsics/random.c: Include ../io/io.h.
280         (random_lock): New variable.
281         (random_r4, random_r8, arandom_r4, arandom_r8): Add locking.
282         (random_seed): Likewise.  open failed if fd < 0.  Set i correctly.
283         (init): New constructor function.
284         * intrinsics/system_clock.c (tp0, t0): Remove.
285         (system_clock_4, system_clock_8): Don't subtract tp0/t0 from current
286         time, use just integer arithmetics.
287         * intrinsics/tty.c (isatty_l4, isatty_l8, ttynam_sub): Add
288         unlock_unit calls.
289
290 2005-11-20  Richard Henderson  <rth@redhat.com>
291
292         * Makefile.am: Revert 2005-11-14 change.  Enable -free-vectorize
293         via gmake per-target variables.
294         * Makefile.in, aclocal.m4: Regenerate.
295
296 2005-11-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
297
298         * configure.ac: Add "-I ." to the AM_FCFLAGS.
299         * configure: Regenerate.
300
301 2005-11-18  Hans-Peter Nilsson  <hp@axis.com>
302
303         * config/fpu-glibc.h (set_fpu): Only call fedisableexcept for
304         nonzero FE_ALL_EXCEPT.
305
306 2005-11-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
307
308         PR fortran/24892
309         * io/io.h (unit_access): Add ACCESS_APPEND.
310         * io/open.c (access_opt): Add APPEND value for ACCESS keyword.
311         (st_open): Use that new value to set the POSITION accordingly.
312
313 2005-11-14  Janne Blomqvist  <jb@gcc.gnu.org>
314
315         PR fortran/21468
316         * Makefile.am: Add -ftree-vectorize for compiling matmul.
317         * m4/matmul.m4: Add const and restrict to type declarations as
318         appropriate.
319         * m4/matmull.m4: Likewise.
320         * Makefile.in: Regenerated.
321         * generated/matmul_*.c: Likewise.
322         
323 2005-11-13  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
324
325         * intrinsics/fget.c: New file.
326         * intrinsics/ftell.c: New file.
327         * io/unix.c (stream_offset): New function.
328         * io/io.h: Add prototype for stream_offset.
329         * Makefile.am: Add intrinsics/fget.c and intrinsics/ftell.c.
330         * Makefile.in: Regenerate.
331
332 2005-11-12  Steven G. Kargl  <kargls@comcast.net>
333
334         PR libgfortran/24787
335         *  intrinsics/string_intrinsics.c (string_scan): Off by one; Fix typos
336         in nearby comment.
337
338 2005-11-10  Andreas Jaeger  <aj@suse.de>
339
340         * libgfortran.h: Add proper defines where needed.
341
342 2005-11-10  Andreas Jaeger  <aj@suse.de>
343
344         * libgfortran.h: Add missing prototypes for internal_pack
345         functions.
346
347 2005-11-06  Janne Blomqvist <jb@gcc.gnu.org>
348
349         PR fortran/24174
350         PR fortran/24305
351         * io/io.h: Add argument to prototypes, add prototypes for
352         size_from_*_kind functions.
353         * io/list_read.c (read_complex): Add size argument, use
354         it.
355         (list_formatted_read): Add size argument, cleanup.
356         (list_formatted_read_scalar): Add size argument.
357         (nml_read_obj): Fix for padding.
358         * io/transfer.c: Add argument to transfer function pointer.
359         (unformatted_read): Add size argument.
360         (unformatted_write): Likewise.
361         (formatted_transfer_scalar): Fix for padding with complex(10).
362         (formatted_transfer): Add size argument, cleanup.
363         (transfer_integer): Add size argument to transfer call.
364         (transfer_real): Likewise.
365         (transfer_logical): Likewise.
366         (transfer_character): Likewise.
367         (transfer_complex): Likewise.
368         (transfer_array): New kind argument, use it.
369         (data_transfer_init): Add size argument to formatted_transfer
370         call.
371         (iolength_transfer): Add size argument, cleanup.
372         * io/write.c (write_complex): Add size argument, fix for padding
373         with complex(10).
374         (list_formatted_write): Add size argument, cleanup.
375         (list_formatted_write_scalar): Add size argument, use it.
376         (nml_write_obj): Fix for size vs. kind issue.
377         * io/size_from_kind.c: New file.
378         * Makefile.am: Add io/size_from_kind.c.
379         * configure: Regenerate.
380         * Makefile.in: Regenerate.
381
382 2005-11-06  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
383
384         * intrinsics/ctime.c: New file.
385         * configure.ac: Add check for ctime.
386         * Makefile.am: Add ctime.c
387         * configure: Regenerate.
388         * config.h.in: Regenerate.
389         * Makefile.in: Regenerate.
390
391 2005-11-05  Richard Guenther  <rguenther@suse.de>
392
393         * configure.ac: Use AM_FCFLAGS for extra flags, not FCFLAGS.
394         * configure: Regenerate.
395
396 2005-11-05  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
397
398         * intrinsics/tty.c (ttynam): New function.
399
400 2005-11-04  Steven G. Kargl <kargls@comcast.net>
401
402         PR fortran/24636
403         * runtime/stop.c (stop_numeric): Use stop_code = -1.
404
405 2005-11-04  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
406
407         PR libfortran/22298
408         * runtime/main.c (stupid_function_name_for_static_linking): New
409         function.
410         * runtime/error.c (internal_error): Call
411         stupid_function_name_for_static_linking.
412         * libgfortran.h: Add prototype for
413         stupid_function_name_for_static_linking.
414
415 2005-11-01  Paul Thomas  <pault@gcc.gnu.org>
416
417         PR fortran/14994
418         * libgfortran/intrinsics/date_and_time.c: Add interface to
419         the functions date_and_time for the intrinsic function secnds.
420
421 2005-10-31  Jerry DeLisle  <jvdelisle@verizon.net>
422
423         PR libgfortran/24584
424         * io/list_read.c (free_saved): Set saved_used to zero.
425
426 2005-10-30  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
427
428         PR libfortran/20179
429         * io/unix.c (flush_if_preconnected): New function.
430         * io/io.h: Add prototype for flush_if_preconnected.
431         * io/transfer.c (data_transfer_init): Use flush_if_preconnected
432         to workaround buggy mixed C-Fortran code.
433
434 2005-10-30  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
435
436         * Makefile.am: Add intrinsics/malloc.c file.
437         * Makefile.in: Regenerate.
438         * intrinsics/malloc.c: New file, with implementations for free
439         and malloc library functions.
440
441 2005-10-29  Mike Stump  <mrs@apple.com>
442
443         * Makefile.am (kinds.h): Remove target, if command fails.
444         (selected_int_kind.inc): Likewise.
445         (selected_real_kind.inc): Likewise.
446         * Makefile.in: Regenerate.
447
448 2005-10-28  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
449
450
451         * Makefile.am (intrinsics): Add signal.c.
452         * Makefile.in: Regenerate.
453         * configure.ac: Checks for signal and alarm.
454         * config.h.in: Regenerate.
455         * configure: Regenerate.
456         * intrinsics/signal.c: New file for SIGNAL and ALARM intrinsics.
457
458 2005-10-28  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
459
460         * acinclude.m4 (LIBGFOR_CHECK_FPSETMASK): New check.
461         * configure.ac: Check for floatingpoint.h, fptrap.h and float.h
462         headers. Use LIBGFOR_CHECK_FPSETMASK. Check for fp_trap and
463         fp_enable functions.
464         * configure.host: Add case for systems with fpsetmask and systems
465         with fp_trap/fp_enable.
466         * config/fpu-sysv.h: New file, FPU code using fpsetmask.
467         * config/fpu-aix.h: New file, FPU code for AIX using fp_trap and
468         fp_enable.
469         * aclocal.m4: Regenerate.
470         * configure: Regenerate.
471         * config.h.in: Regenerate.
472
473 2005-10-24  Jerry DeLisle  <jvdelisle@verizon.net>
474
475         PR libgfortran/24224
476         * libgfortran.h: Remove array stride error code.
477         * runtime/error.c: Remove array stride error.
478         * io/io.h: Change name of 'nml_loop_spec' to 'array_loop_spec' to be
479         generic.  Add pointer to array_loop_spec and rank to gfc_unit
480         structure.
481         * io/list_read.c: Revise nml_loop_spec references to array_loop_spec.
482         * io/transfer.c (init_loop_spec): New function to initialize
483         an array_loop_spec.
484         (next_array_record): New function to return the index to the next array
485         record by incrementing through the array_loop_spec.
486         (next_record_r): Use new function.
487         (next_record_w): Use new function.
488         (finalize_transfer): Free memory allocated for array_loop_spec.
489         * io/unit.c (get_array_unit_len): Delete this function. Use new
490         function init_loop_spec to initialize the array_loop_spec.
491
492 2005-10-24  Paul Thomas  <pault@gcc.gnu.org>
493
494         PR fortran/24416
495         * libgfortran/io/list_read.c (namelist_read): Exit with call to
496         free_saved () so that character strings do not accumulate.
497
498 2005-10-23  Jerry DeLisle  <jvdelisle@verizon.net>
499
500         PR libgfortran/24489
501         * io/transfer.c (read_block): Change the order of execution to not read
502         past end-of-record.
503         (read_block_direct): Same change.
504
505 2005-10-23  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
506
507         PR libfortran/23272
508         * acinclude.m4 (LIBGFOR_CHECK_WORKING_STAT): New check.
509         * configure.ac: Use LIBGFOR_CHECK_WORKING_STAT.
510         * Makefile.in: Regenerate.
511         * configure: Regenerate.
512         * config.h.in: Regenerate.
513         * aclocal.m4: Regenerate.
514         * io/unix.c (compare_file_filename): Add fallback case for
515         systems without working stat.
516         * io/open.c (already_open): Correct call to
517         compare_file_filename.
518         * io/io.h: Correct proto for compare_file_filename.
519
520 2005-10-23  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
521
522         * runtime/fpu.c: Add _GNU_SOURCE definition.
523         * config/fpu-glibc.h: Remove __USE_GNU definition.
524
525 2005-10-23  Paul Thomas  <pault@gcc.gnu.org>
526
527         PR fortran/24384
528         * intrinsics/spread_generic.c (spread_internal_scalar): New
529         function that handles the special case of spread with a scalar
530         source. This has new interface functions -
531         (spread_scalar, spread_char_scalar): New functions to interface
532         with the calls specified in gfc_resolve_spread.
533
534 2005-10-21  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
535
536         PR libfortran/24383
537         * io/unix.c: Add fallback definition for SSIZE_MAX.
538
539 2005-10-19  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
540
541         * c99_protos.h: Define preprocessor HAVE_ macros with value 1
542         instead of empty value.
543         * intrinsics/c99_functions.c: Likewise.
544         * intrinsics/getXid.c: Define HAVE_GETPID with value 1 instead of
545         empty value.
546         * intrinsics/sleep.c: Define HAVE_SLEEP with value 1 instead of
547         empty value.
548
549 2005-10-19  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
550
551         PR libfortran/24432
552         * c99_protos.h: Define HAVE_ macros for all provided functions.
553
554 2005-10-14  Uros Bizjak  <uros@kss-loka.si>
555
556         * config/fpu-387.h (set_fpu): Remove extra ":" in stmxcsr.
557         Change cw and cw_sse variables to unsigned.
558         (SSE): New definition.
559         (has_sse): Use it.
560
561 2005-10-13  Thomas Koenig  <Thomas.Koenig@online.de>
562
563         * io/unix.c(fd_alloc_r_at):  Use read() instead of do_read()
564         only in case of special files (e.g. terminals).
565
566 2005-10-13  Uros Bizjak  <uros@kss-loka.si>
567
568         * config/fpu-387.h (set_fpu): Add "=m" for stmxcsr.
569
570 2005-10-12  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
571
572         * Makefile.am: Add fpu.c to the build process, and
573         target-dependent code as fpu-target.h.
574         * Makefile.in: Regenerate.
575         * configure.ac: Add call to configure.host to set
576         FPU_HOST_HEADER.
577         * configure: Regenerate.
578         * configure.host: New script to determine which host-dependent
579         code should go in.
580         * libgfortran.h: Add fpe option, remove previous fpu_ options.
581         Add bitmasks for different FPE traps. Add prototype for set_fpu.
582         * runtime/environ.c: Remove environment variables to control
583         fpu behaviour.
584         * runtime/fpu.c (set_fpe): New function for the front-end.
585         * runtime/main.c (init): Set FPU state.
586         * config: New directory to store host-dependent code.
587         * config/fpu-387.h: New file with code handling the i387 FPU.
588         * config/fpu-glibc.h: New file with code for glibc systems.
589         * config/fpu-generic.h: Fallback for the most generic host. Issue
590         warnings.
591
592 2005-10-12  Janne Blomqvist <jblomqvi@cc.hut.fi>
593
594         * io/unix.c(fd_alloc_r_at): Remove parts of patch of 2005/10/07 that
595         cause input from the terminal to hang.
596
597 2005-10-11  Steven G. Kargl  <kargls@comcast.net>
598
599         PR libgfortran/24313
600         *  c99_functions.c (csqrtf, csqrt): Fix choice of branch cut.  Note
601         csqrt{f} were imported from glibc, and this bug is still present
602         there. glibc PR is 1146.
603
604 2005-10-07  Janne Blomqvist <jblomqvi@cc.hut.fi>
605
606         PR fortran/16339
607         PR fortran/23363
608         * io/io.h: Add read and write members to stream, define access
609         macros.
610         * io/transfer.c (read_block_direct): New function.
611         (write_block_direct): New function.
612         (unformatted_read): Change to use read_block_direct.
613         (unformatted_write): Change to use write_block_direct.
614         * io/unix.c: Remove mmap includes and defines.
615         (writen): Remove.
616         (readn): Remove.
617         (reset_stream): New function.
618         (do_read): New function.
619         (do_write): New function.
620         (fd_flush): Change to use do_write() instead of writen().
621         (fd_alloc_r_at): Change to use do_read().
622         (fd_seek): Change return type to try, as the prototype. Add check
623         to avoid syscall overhead if possible.
624         (fd_read): New function.
625         (fd_write): New function.
626         (fd_open): Set pointers for new functions.
627         (mem_read): New function.
628         (mem_write): New function.
629         (open_internal): Set pointers for new functions.
630         (is_seekable): Clean up comment.
631
632 2005-10-07  Jerry DeLisle  <jvdelisle@verizon.net>
633
634         * io/transfer.c (write_block): Add test for end-of-file condition,
635         removed from mem_alloc_w_at. (next_record_w): Clean up checks for
636         NULL pointer returns from s_alloc_w.
637         * io/unix.c (mem_alloc_w_at): Remove call to generate_error end-of-file.
638         * io/write.c (write_float): Add checks for NULL pointer returns from
639         write_block calls. (write_integer): Same.
640
641 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
642
643         * runtime/memory.c (allocate_size): Malloc 1 byte if size == 0.
644
645 2005-10-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
646
647         PR libfortran/19308
648         PR libfortran/22437
649         * Makefile.am: Add generated files for large real and integers
650         kinds. Add a rule to create the kinds.inc c99_protos.inc files.
651         Use kinds.inc to preprocess Fortran generated files.
652         * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE,
653         GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16,
654         gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16,
655         gfc_array_l16.
656         * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and
657         HAVE_GFC_COMPLEX_* when these types are available.
658         * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16.
659         * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4,
660         m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4,
661         m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4,
662         m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4,
663         m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4,
664         m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4,
665         m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4,
666         m4/sum.m4, m4/transpose.m4: Protect generated functions with
667         appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives.
668         * Makefile.in: Regenerate.
669         * all files in generated/: Regenerate.
670
671 2005-10-01  Jakub Jelinek  <jakub@redhat.com>
672
673         * runtime/memory.c (malloc_t): Remove.
674         (GFC_MALLOC_MAGIC, HEADER_SIZE, DATA_POINTER, DATA_HEADER): Remove.
675         (mem_root, runtime_cleanup, malloc_with_header): Remove.
676         (internal_malloc_size): Use just get_mem if size != 0, return NULL
677         otherwise.
678         (internal_free): Just free if non-NULL.
679         (internal_realloc_size): Remove debugging stuff.
680         (allocate_size): Use malloc directly, remove debugging stuff.
681         (deallocate): Use free directly, fix error message wording.
682
683         * libgfortran.h (GFC_ITOA_BUF_SIZE, GFC_XTOA_BUF_SIZE,
684         GFC_OTOA_BUF_SIZE, GFC_BTOA_BUF_SIZE): Define.
685         (gfc_itoa, xtoa): Add 2 extra arguments.
686         * runtime/environ.c: Include stdio.h.
687         (check_buffered): Use sprintf.
688         * runtime/error.c: Include assert.h.
689         (gfc_itoa, xtoa): Add 2 extra arguments, avoid using static
690         buffers.
691         (st_printf, st_sprintf): Adjust callers.
692         * io/write.c (otoa, btoa): Add 2 extra arguments, avoid using
693         static buffers.
694         (write_int, write_decimal): Add 2 extra arguments to conv
695         function pointer, adjust caller.
696         (write_integer): Adjust gfc_itoa caller.
697
698         * io/unit.c (get_array_unit_len): Return 0 rather than NULL.
699
700         * io/read.c (read_f): Remove spurious pointer dereference.
701
702 2005-09-30  Janne Blomqvist <jblomqvi@cc.hut.fi>
703
704         PR 24112
705         * io/open.c (edit_modes): Check for correct flag.
706
707 2005-09-29  Jakub Jelinek  <jakub@redhat.com>
708
709         * runtime/string.c (find_option): Change 3rd argument to
710         const st_option *.
711         * libgfortran.h (find_option): Likewise.
712         * runtime/environ.c (rounding, precision, signal_choices): Constify.
713         (init_choice, show_choice): Change 2nd argument to const choice *.
714         * io/open.c (access_opt, action_opt, blank_opt, delim_opt, form_opt,
715         position_opt, status_opt, pad_opt): Constify.
716         * io/transfer.c (advance_opt): Likewise.
717         * io/inquire.c (undefined): Likewise.
718         * io/close.c (status_opt): Likewise.
719         * io/format.c (posint_required, period_required, nonneg_required,
720         unexpected_element, unexpected_end, bad_string, bad_hollerith,
721         reversion_error): Likewise.
722         * io/unix.c (yes, no, unknown): Change from const char *
723         into const char [].
724
725 2005-09-27  Steve Ellcey  <sje@cup.hp.com>
726
727         PR target/23552
728         * acinclude.m4 (LIBGFOR_CHECK_FOR_BROKEN_ISFINITE): New.
729         (LIBGFOR_CHECK_FOR_BROKEN_ISNAN): New.
730         (LIBGFOR_CHECK_FOR_BROKEN_FPCLASSIFY): New.
731         * configure.ac (LIBGFOR_CHECK_FOR_BROKEN_ISFINITE): Add use.
732         (LIBGFOR_CHECK_FOR_BROKEN_ISNAN): Add use.
733         (LIBGFOR_CHECK_FOR_BROKEN_FPCLASSIFY): Add use.
734         * configure: Regenerate.
735         * config.h.in: Regenerate.
736         * libgfortan.h (isfinite): undef if broken, set if needed.
737         (isnan): undef if broken, set if needed.
738         (fpclassify): undef if broken, set if needed.
739         * io/write.c: Remove TODO comment about working isfinite.
740         * intrinsics/c99_functions.c (round): Use isfinite instead
741         of fpclassify.
742         * intrinsics/c99_functions.c (roundf): Ditto.
743
744 2005-09-24  Janne Blomqvist <jblomqvi@cc.hut.fi>
745
746         * io.h: Changed prototypes of list_formatted_{read|write}.
747         * list_read.c (list_formatted_read): Renamed to
748         list_formatted_read_scalar and made static.
749         (list_formatted_read): New function.
750         * transfer.c: Prototype for transfer_array. Changed transfer
751         function pointer.
752         (unformatted_read): Add nelems argument, use it.
753         (unformatted_write): Likewise.
754         (formatted_transfer): Changed name to formatted_transfer_scalar.
755         (formatted_transfer): New function.
756         (transfer_integer): Add nelems argument to transfer call, move
757         updating item count to transfer functions.
758         (transfer_real): Likewise.
759         (transfer_logical): Likewise.
760         (transfer_character): Likewise.
761         (transfer_complex): Likewise.
762         (transfer_array): New function.
763         (data_transfer_init): Call formatted_transfer with new argument.
764         (iolength_transfer): New argument, use it.
765         * write.c (list_formatted_write): Renamed to
766         list_formatted_write_scalar, made static.
767         (list_formatted_write): New function.
768
769 2005-09-26  David Edelsohn  <edelsohn@gnu.org>
770
771         * configure.ac: Add check for __clog.
772         * configure: Regenerate.
773
774 2005-09-25  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
775
776         * c99_protos.h: Add prototypes for C99 complex functions.
777         * libgfortran.h: Include complex.h before c99_protos.h.
778         * intrinsics/c99_functions.c: Define HAVE_ macros for the
779         fallback functions we provide.
780         (cabsf, cabs, cabsl, cargf, carg, cargl, cexpf, cexp, cexpl,
781         clogf, clog, clogl, clog10f, clog10, clog10l, cpowf, cpow, cpowl,
782         cqsrtf, csqrt, csqrtl, csinhf, csinh, csinhl, ccoshf, ccosh,
783         ccoshl, ctanhf, ctanh, ctanhl, csinf, csin, csinl, ccosf, ccos,
784         ccosl, ctanf, ctan, ctanl): New fallback functions.
785         * Makefile.am (gfor_math_trig_c, gfor_math_trig_obj,
786         gfor_specific_c, gfor_cmath_src, gfor_cmath_obj): Remove.
787         * Makefile.in: Regenerate.
788         * configure.ac: Remove checks for csin. Add checks for all C99
789         complex functions.
790         * config.h.in: Regenerate.
791         * configure: Regenerate.
792         * aclocal.m4: Regenerate.
793
794 2005-09-25  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
795             Danny Smith  <dannysmith@users.sourceforge.net>
796
797         PR libfortran/23803
798         * intrinsics/getXid.c: Add getpid wrapper for MinGW.
799         * intrinsics/getlog.c: Add getlogin wrapper for MinGW.
800         * intrinsics/hostnm.c: Add gethostname wrapper for MinGW.
801
802 2005-09-24  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
803
804         PR libfortran/23802
805         * intrinsics/sleep.c: Add correct sleep macro for MinGW.
806
807 2005-09-24  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
808
809         PR libfortran/23380
810         * intrinsics/cpu_time.c (__cpu_time_1): Provide a MS Windows
811         version.
812
813 2005-09-14  Jerry DeLisle  <jvdelisle@verizon.net
814
815         PR fortran/21875 Internal Unit Array I/O, NIST
816         * libgfortran.h: Add run time error code for array stride.
817         * runtime/error.c (translate_error): Add error message for
818         array stride.
819         * io/io.h: Add array descriptor pointer to IOPARM structure.
820         Add prtotypes for two new functions.
821         * io/transfer.c (data_transfer_init): Removed initialization and
822         moved to unit.c (get_unit)
823         * io/transfer.c (next_record_r): Include internal unit read
824         functionality.
825         * io/transfer.c (next_record_w): Include internal unit write
826         functionality, including padding of character array records.
827         * io/unit.c (get_array_unit_len): New function to return the number
828         of records in the character array 'file' from the array descriptor.
829         * io/unit.c (get_unit): Gathered initialization code from
830         init_data_transfer for internal units and added initialization of
831         character array unit.
832         * io/unit.c (is_array_io): New function to determine if internal unit
833         is an array.
834         * io/unix.c (mem_alloc_w_at): Add error checks for bad record length
835         and end of file.
836
837 2005-09-13  Richard Sandiford  <richard@codesourcery.com>
838
839         PR target/19269
840         * intrinsics/cshift0.c (cshift0): Add an extra size argument.
841         (cshift0_1, cshift0_2, cshift0_4, cshift0_8): Replace explicit
842         implementations with...
843         (DEFINE_CSHIFT): ...this new macro.  Define character versions too.
844         * intrinsics/eoshift0.c (zeros): Delete.
845         (eoshift0): Add extra size and filler arguments.  Use memset if no
846         bound is provided.
847         (eoshift0_1, eoshift0_2, eoshift0_4, eoshift0_8): Replace explicit
848         implementations with...
849         (DEFINE_EOSHIFT): ...this new macro.  Define character versions too.
850         * intrinsics/eoshift2.c (zeros): Delete.
851         (eoshift2): Add extra size and filler arguments.  Use memset if no
852         bound is provided.
853         (eoshift2_1, eoshift2_2, eoshift2_4, eoshift2_8): Replace explicit
854         implementations with...
855         (DEFINE_EOSHIFT): ...this new macro.  Define character versions too.
856         * intrinsics/pack.c (pack_internal): New static function, reusing
857         the contents of pack and adding an extra size argument.  Change
858         "mptr" rather than "m" when calculating the array size.
859         (pack): Redefine as a forwarder to pack_internal.
860         (pack_s_internal): New static function, reusing the contents of
861         pack_s and adding an extra size argument.
862         (pack_s): Redefine as a forwarder to pack_s_internal.
863         (pack_char, pack_s_char): New functions.
864         * intrinsics/reshape.c (reshape_internal): New static function,
865         reusing the contents of reshape and adding an extra size argument.
866         (reshape): Redefine as a forwarder to reshape_internal.
867         (reshape_char): New function.
868         * intrinsics/spread.c (spread_internal): New static function,
869         reusing the contents of spread and adding an extra size argument.
870         (spread): Redefine as a forwarder to spread_internal.
871         (spread_char): New function.
872         * intrinsics/transpose.c (transpose_internal): New static function,
873         reusing the contents of transpose and adding an extra size argument.
874         (transpose): Redefine as a forwarder to transpose_internal.
875         (transpose_char): New function.
876         * intrinsics/unpack.c (unpack_internal): New static function, reusing
877         the contents of unpack1 and adding extra size and fsize arguments.
878         (unpack1): Redefine as a forwarder to unpack_internal.
879         (unpack0): Call unpack_internal instead of unpack1.
880         (unpack1_char, unpack0_char): New functions.
881         * m4/cshift1.m4 (cshift1): New static function, reusing the contents
882         of cshift1_<kind> and adding an extra size argument.
883         (cshift1_<kind>): Redefine as a forwarder to cshift1.
884         (cshift1_<kind>_char): New function.
885         * m4/eoshift1.m4 (zeros): Delete.
886         (eoshift1): New static function, reusing the contents of
887         eoshift1_<kind> and adding extra size and filler arguments.
888         Fix calculation of hstride.  Use memset if no bound is provided.
889         (eoshift1_<kind>): Redefine as a forwarder to eoshift1.
890         (eoshift1_<kind>_char): New function.
891         * m4/eoshift3.m4 (zeros): Delete.
892         (eoshift3): New static function, reusing the contents of
893         eoshift3_<kind> and adding extra size and filler arguments.
894         Use memset if no bound is provided.
895         (eoshift3_<kind>): Redefine as a forwarder to eoshift3.
896         (eoshift3_<kind>_char): New function.
897         * generated/cshift1_4.c, generated/cshift1_8.c,
898         * generated/eoshift1_4.c, generated/eoshift1_8.c,
899         * generated/eoshift3_4.c, generated/eoshift3_8.c: Regenerate.
900
901 2005-09-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
902
903         PR libfortran/20179
904         * io/unix.c (is_preconnected): Add function to test if a stream
905         corresponds to a preconnected unit.
906         * io/io.h: Add prototype for is_preconnected.
907         * io/transfer.c (data_transfer_init): Do not truncate
908         preconnected units.
909
910 2005-09-10  Janne Blomqvist  <jblomqvi@cc.hut.fi>
911
912         * io/unix.c: Remove mmap code.
913
914 2005-09-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
915
916         PR libfortran/23784
917         * io/close.c (st_close): Call library_end even in case of error.
918
919 2005-09-09  Thomas Koenig  <Thomas.Koenig@online.de>
920
921         * io/io.h:  Add iomsg as last field of st_parameter.
922         * runtime/error.c (generate_error):  If iomsg is present, copy
923         the message there.
924
925 2005-09-09  Richard Sandiford  <richard@codesourcery.com>
926
927         PR fortran/12840
928         * runtime/memory.c (internal_malloc_size): Return a null pointer
929         if the size is zero.
930         (internal_free): Do nothing if the pointer is null.
931         (internal_realloc_size, internal_realloc, internal_realloc64): New.
932
933 2005-09-07  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
934
935         PR libfortran/23262
936         * acinclude.m4 (LIBGFOR_CHECK_CRLF): New check.
937         * configure.ac: Use new check.
938         * configure.in: Regenerate.
939         * config.h.in: Regenerate.
940         * configure: Regenerate.
941         * io/transfer.c (next_record_w): Add case for CRLF as line
942         terminator.
943         * io/unix.c (tempfile, regular_file): Open files with
944         O_BINARY on systems with CRLF.
945
946 2005-09-07  Steve Ellcey  <sje@cup.hp.com>
947
948         PR libfortran/23419
949         * io/write.c (extract_int): Use memcpy to access buffer.
950         (extract_uint): Ditto.
951         (extract_real): Ditto.
952
953 2005-09-05  Thomas Koenig  <Thomas.Koenig@online.de>
954
955         * io/list_read.c:  Adjust size of of value to 32 (to hold
956         kind=16 complex values).
957
958 2005-09-04  Thomas Koenig  <Thomas.Koenig@online.de>
959
960         PR libfortran/23321
961         * io/transfer.c(data_transfer_init):  Check for a too-large
962         record number.  Return if sseek failed.
963
964 2005-09-03  Jakub Jelinek  <jakub@redhat.com>
965
966         * io/read.c (read_x): Take int argument instead of fnode * and
967         digging the N from F->u.n.
968         * io/io.h (read_x): Adjust prototype.
969         * io/transfer.c (formatted_transfer): Adjust callers.  Don't clobber
970         f->u.n for FMT_T.
971
972 2005-09-02  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
973
974         * io/unix.c (stream_ttyname): Protect use of ttyname by
975         HAVE_TTYNAME macro.
976         * configure.ac: Add check for ttyname.
977         * config.h.in: Regenerate.
978         * configure: Regenerate.
979
980 2005-09-02  Andreas Jaeger  <aj@suse.de>
981
982         * libgfortran.h: Add prototype for init_compile_options.
983
984         * io/io.h: Add prototype for notify_std.
985
986 2005-08-31  Steve Ellcey  <sje@cup.hp.com>
987
988         * io/read.c (set_integer): Use memcpy to fill buffer.
989
990 2005-08-31  Steve Ellcey  <sje@cup.hp.com>
991
992         PR target/23556
993         * io/read.c (convert_real): Use memcpy to fill buffer.
994
995 2005-08-29  Thomas Koenig  <Thomas.Koenig@online.de>
996
997         PR libfortran/23598
998         * io/lock.c(library_start):  If ioparm.iostat is present, clear
999         it unconditionally.
1000
1001 2005-08-27  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1002
1003         * acinclude.m4 (LIBGFOR_CHECK_UNLINK_OPEN_FILE): Add check to see
1004         if target can unlink open files.
1005         * configure.ac: Use this new test.
1006         * config.h.in: Regenerate.
1007         * configure: Regenerate.
1008         * Makefile.in: Regenerate.
1009         * aclocal.ac: Regenerate.
1010         * io/io.h: Add prototype for unpack_filename.
1011         * io/close.c (st_close): Delete file after closing unit if
1012         HAVE_UNLINK_OPEN_FILE is not defined.
1013         * io/unix.c (unpack_filename): Unlink scratch file after opening
1014         it only if HAVE_UNLINK_OPEN_FILE is defined.
1015
1016 2005-08-17  Kelley Cook  <kcook@gcc.gnu.org>
1017
1018         * All files: Update FSF address.
1019
1020 2005-08-16  Thomas Koenig  <Thomas.Koenig@online.de>
1021
1022         PR libfortran/23428
1023         * io/transfer.c (iolength_transfer):  Remove __attribute__ ((unused))
1024         from type.  Return correct length for inquire(iolength=)
1025         for complex variables.
1026
1027 2005-08-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1028             Steven Bosscher  <stevenb@suse.de>
1029
1030         PR libfortran/20006
1031         * Makefile.am: Add file runtime/compile_options.c.
1032         * Makefile.in: Regenerate.
1033         * libgfortran.h: Create structure compile_options_t. Define the
1034         compile_options variable and GFC_STD_ macros.
1035         * runtime/compile_options.c: New file.
1036         * runtime/error.c (notify_std): New function.
1037         * runtime/main.c (init): Call init_compile_options during
1038         initialization.
1039         * io/format.c: Use the new notify_std function for the $
1040         descriptor extension.
1041
1042 2005-08-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1043         * Makefile.am: Add file intrinsics/tty.c to Makefile process.
1044         * Makefile.in: Regenerate.
1045         * io/io.h: Prototypes for new functions stream_isatty and
1046         stream_ttyname.
1047         * io/unix (stream_isatty, stream_ttyname): New functions to call
1048         isatty() and ttyname() on a given unit.
1049         * intrinsics/tty.c: New file to implement g77 intrinsics TTYNAM
1050         and ISATTY.
1051
1052 2005-08-08  Jerry DeLisle  <jvdelisle@verizon.net>
1053
1054         PR libfortran/23154
1055         * io/transfer.c (data_transfer_init): Initialize
1056         current_unit->bytes_left for a read.
1057
1058 2005-08-07  Janne Blomqvist  <jblomqvi@cc.hut.fi>
1059
1060         PR fortran/22390
1061         * io/backspace.c: File removed, contents moved to ...
1062         * io/endfile.c: Ditto.
1063         * io/rewind.c: Ditto.
1064         * io/file_pos.c: New file, ... here.
1065         * Makefile.am: Add file_pos.c to list, remove obsolete files.
1066         * Makefile.in: Regenerated.
1067
1068 2005-08-07  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1069
1070         * io/io.h: Change DEFAULT_TEMPDIR to /tmp instead of /var/tmp.
1071         * io/unix.c (tempfile): Look at the TEMP environment variable
1072         to find the temporary files directory. Whitespace correction.
1073
1074 2005-08-06  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1075
1076         * io/unix.c: Add O_RDWR to open() call.
1077
1078 2005-08-04 Paul Thomas  <pault@gcc.gnu.org>
1079
1080         * transfer.c (data_transfer_init): Truncate file in
1081         sequential WRITE when last_record == 0, rather than
1082         current_record.  Cures problem on RH9.
1083
1084 2005-08-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1085
1086         * libgfortran.h: When isfinite is not provided by the system,
1087         define it as a macro, so that it can accept any floating point
1088         type.
1089
1090 2005-08-01  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1091
1092         PR libfortran/23178
1093         * intrinsics/flush.c (flush_i8): Add function flush_i8. Update
1094         copyright years.
1095
1096 2005-07-31  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1097
1098         PR libfortran/21787
1099         * intrinsics/abort.c (abort): Close units before aborting.
1100         Updated copyright years.
1101
1102 2005-07-30  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1103
1104         PR libfortran/22436
1105         * io/write.c (write_real): Add default formats for real(10) and
1106         real(16).
1107
1108 2005-07-30 Paul Thomas  <pault@gcc.gnu.org>
1109
1110         PR fortran/22570 and related issues.
1111         * transfer.c (formatted_transfer): Make sure that there
1112         really is data present before X- or T- editing. Move all
1113         treatment of tabbing during writes to start of next data
1114         producing format. Suppress incorrect zeroing of bytes_left
1115         in slash formating. Insert int cast for assignment of a
1116         difference of two gfc_offsets.
1117
1118 2005-07-23  Jerry DeLisle  <jvdelisle@verizon.net>
1119
1120         * io/write.c (write_float): Revise output of IEEE exceptional
1121         values to comply with F95 and F2003 standards.
1122
1123 2005-07-22 Jerry DeLisle <jvdelisle@verizon.net>
1124
1125         PR libfortran/22570
1126         * io/unit.c (init_units): Replace BLANK_ZERO with
1127         BLANK_UNSPECIFIED.
1128
1129 2005-07-22 Jerry DeLisle <jvdelisle@verizon.net>
1130
1131         PR libfortran/21875  (FM111.f)
1132         * io/read.c (next_char): Return a ' ' character when BLANK_ZERO
1133         or BLANK_NULL are active.
1134         (read_decimal): Interpret ' ' character correctly for BZ or BN.
1135         (read_radix): Interpret ' ' character correctly for BZ or BN.
1136         (read_f): Interpret ' ' character correctly for BZ or BN.
1137
1138 2005-07-22 Paul Thomas  <pault@gcc.gnu.org>
1139
1140         PR libfortran/22570
1141         * read.c (read_x): Correct the condition for doing the
1142         x-editing during formatted input.
1143         * transfer.c (formatted_transfer): Cast offset difference
1144         as int, clean-up arithmetic with new variable, bytes_used,
1145         zero counters for FMT_SLASH,
1146         (data_transfer_init) Zero X- and T-editing counters
1147         unconditionally.
1148         (next_record_w) Zero X- and T-editing counters.
1149         unconditionally.
1150
1151 2005-07-17  Jerry DeLisle  <jvdelisle@verizon.net>
1152
1153         * io/write.c (write_float): Fix field width checks for
1154         printing 'Infinity' or 'Inf'.
1155         (output_float): Fix typo in comment.
1156
1157 2005-07-12 Paul Thomas  <pault@gcc.gnu.org>
1158
1159         PR libfortran/16435
1160         * transfer.c (formatted_transfer): Correct the problems
1161         with X- and T-editting that caused TLs followed by TRs
1162         to overwrite data, which caused NIST FM908.FOR to fail
1163         on many tests.
1164         (data_transfer_init): Zero X- and T-editting counters at
1165         the start of formatted IO.
1166         * write.c (write_x): Write specified number of skips with
1167         specified number of spaces at the end.
1168
1169 2005-07-13 Paul Thomas  <pault@gcc.gnu.org>
1170
1171         * io/read.c (read_complex): Prevent X formatting during reads
1172         from going beyond EOR to fix NIST fm908.FOR failure.
1173         * io/list_read.c (read_complex): Allow complex data in list-
1174         directed reads to have eols either side of the comma to
1175         fix NIST FM906.FOR failure.
1176
1177 2005-07-12  Thomas Koenig  <Thomas.Koenig@online.de>
1178
1179         PR libfortran/21593
1180         * io/unix.c:  Add member special_file to type unix_stream.
1181         (fd_truncate):  Don't call ftruncate or chsize if
1182         s refers to a special file.
1183         (fd_to_stream):  initialize s->special_file.
1184
1185 2005-07-11  David Edelsohn  <edelsohn@gnu.org>
1186
1187         PR libgfortran/22412
1188         * io/write.c (otoa): Bias p by SCRATCH_SIZE, not
1189         sizeof (SCRATCH_SIZE).
1190         (btoa): Same.
1191
1192 2005-07-09  Jerry DeLisle  <jvdelisle@verizon.net>
1193
1194         PR libfortran/21875  (FM111.f)
1195         * io/read.c (next_char): Return a ' ' character when BLANK_ZERO or
1196         BLANK_NULL are active.
1197         (read_decimal): Interpret ' ' character correctly for BZ or BN.
1198         (read_radix): Interpret ' ' character correctly for BZ or BN.
1199         (read_f): Interpret ' ' character correctly for BZ or BN.
1200         * gfortran.dg/test (fmt_read_bz_bn.f90): New test case.
1201
1202 2005-07-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1203             Thomas Koenig  <Thomas.Koenig@online.de>
1204
1205         PR libfortran/22217
1206         * io/write.c (extract_unit):  New function; extract
1207         ints as unsigned signed int of the correct size.
1208         (write_int):  Use it.
1209         * runtime/error.c:  Adjust copyright years.
1210         Adjust size of buffer to maximum that can occur.
1211
1212 2005-07-07  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1213
1214         * libgfortran.h (GFC_ARRAY_DESCRIPTOR): Replace 'type *base' by
1215         'size_t offset'.
1216         * intrinsics/cshift0.c, intrinsics/eoshift0.c,
1217         intrinsics/eoshift2.c,intrinsics/pack_generic.c,
1218         intrinsics/reshape_generic.c, intrinsics/spread_generic.c,
1219         intrinsics/transpose_generic.c, intrinsics/unpack_generic,
1220         m4/cshift1.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/iforeach.m4,
1221         m4/ifunction.m4, m4/matmul.m4, m4/matmull.m4, m4/reshape.m4,
1222         m4,transpose.m4: Set renamed field 'offset' to zero instead of
1223         'base'.
1224         * generated/all_l4.c, generated/all_l8.c,
1225         generated/any_l4.c, generated/any_l8.c, generated/count_4_l4.c,
1226         generated/count_4_l8.c, generated/count_8_l4.c,
1227         generated/count_8_l8.c, generated/chift1_4.c,
1228         generated/cshift1_8.c, generated/eoshift1_4.c,
1229         generated/eoshift1_8.c, generated/eoshift3_4.c,
1230         generated/eoshift3_8.c, generated/matmul_c4.c,
1231         generated/matmul_c8.c, generated/matmul_i4.c, matmul_i8.c,
1232         generated/matmul_l4.c, generated/matmul_l8.c,
1233         generated/matmul_r4.c, generated/matmul_r8.c,
1234         generated/maxloc0_4_i4.c, generated/maxloc0_4_i8.c,
1235         generated/maxloc0_4_r4.c, generated/maxloc0_4_r8.c,
1236         generated/maxloc0_8_i4.c, generated/maxloc0_8_i8.c,
1237         generated/maxloc0_8_r4.c, generated/maxloc0_8_r8.c,
1238         generated/maxloc1_4_i4.c, generated/maxloc1_4_i8.c,
1239         generated/maxloc1_4_r4.c, generated/maxloc1_4_r8.c,
1240         generated/maxloc1_8_i4.c, generated/maxloc1_8_i8.c,
1241         generated/maxloc1_8_r4.c, generated/maxloc1_8_r8.c,
1242         generated/maxval_i4.c, generated/maxval_i8.c,
1243         generated/maxval_r4.c, generated/maxval_r8.c,
1244         generated/minloc0_4_i4.c, generated/minloc0_4_i8.c,
1245         generated/minloc0_4_r4.c, generated/minloc0_4_r8.c,
1246         generated/minloc0_8_i4.c, generated/minloc0_8_i8.c,
1247         generated/minloc0_8_r4.c, generated/minloc0_8_r8.c,
1248         generated/minloc1_4_i4.c, generated/minloc1_4_i8.c,
1249         generated/minloc1_4_r4.c, generated/minloc1_4_r8.c,
1250         generated/minloc1_8_i4.c, generated/minloc1_8_i8.c,
1251         generated/minloc1_8_r4.c, generated/minloc1_8_r8.c,
1252         generated/minval_i4.c, generated/minval_i8.c,
1253         generated/minval_r4.c, generated/minval_r8.c,
1254         generated/product_c4.c, generated/product_c8.c,
1255         generated/product_i4.c, generated/product_i8.c,
1256         generated/product_r4.c, generated/product_r8.c,
1257         generated/reshape_c4.c, generated/reshape_c8.c,
1258         generated/reshape_i4.c, generated/reshape_i8.c,
1259         generated/sum_c4.c, generated/sum_c8.c, generated/sum_i4.c,
1260         generated/sum_i8.c, generated/sum_r4.c, generated/sum_r8.c,
1261         generated/transpose_c4.c, generated/transpose_c8.c,
1262         generated/transpose_i4.c, generated/transpose_i8.c: Regenerate:
1263
1264 2005-07-07  Thomas Koenig  <Thomas.Koenig@online.de>
1265
1266         PR libfortran/21594
1267         * intrinsics/eoshift0.c:  If abs(shift) > len, fill the
1268         the whole array with the boundary value, but don't overrun it.
1269         * intrinsics/eoshift2.c:  Likewise.
1270         * m4/eoshift1.m4:  Likewise.
1271         * m4/eoshift3.m4:  Likewise.
1272         * generated/eoshift1_4.c:  Regenerated.
1273         * generated/eoshift1_8.c:  Regenerated.
1274         * generated/eoshift3_4.c:  Regenerated.
1275         * generated/eoshift3_8.c:  Regenerated.
1276
1277 2005-07-07  Feng Wang  <fengwang@nudt.edu.cn>
1278
1279         PR fortran/16531
1280         * io/transfer.c (formatted_transfer): Enable FMT_A on other types to
1281         support Hollerith constants.
1282
1283 2005-07-01  Andreas Jaeger  <aj@suse.de>
1284
1285         * intrinsics/unpack_generic.c: Remove const from parameter.
1286
1287         * io/transfer.c (formatted_transfer): Remove unused variable.
1288
1289 2005-06-28  Thomas Koenig  <Thomas.Koenig@online.de>
1290
1291         PR libfortran/22142
1292         * m4/eoshift1.m4:  Correct bstride (it needs to be multiplied
1293         by size since it's a char pointer).
1294         * m4/eoshift1_4.c:  Regenerated.
1295         * m4/eoshift1_8.c:  Regenerated.
1296
1297 2005-06-28  Thomas Koenig  <Thomas.Koenig@online.de>
1298
1299         PR libfortran/22142
1300         * m4/eoshift3.m4:  Correct bstride (it needs to be multiplied
1301         by size since it's a char pointer).
1302         * m4/eoshift3_4.c:  Regenerated.
1303         * m4/eoshift3_8.c:  Regenerated.
1304
1305 2005-06-28  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1306
1307         PR libfortran/22170
1308         * io/transfer.c (formatted_transfer): Do not iterate on the
1309         repeat count of a FMT_SLASH, since this is already done in
1310         next_format().
1311
1312 2005-06-25  Thomas Koenig  <Thomas.Koenig@online.de>
1313
1314         PR libfortran/22144
1315         * m4/cshift1.m4: Remove const from argument ret.
1316         Populate return array descriptor if ret->data is NULL.
1317         * m4/eoshift1.m4: Likewise.
1318         * m4/eoshift3.m4: Likewise.
1319         * generated/cshift1_4.c:  Regenerated.
1320         * generated/cshift1_8.c:  Regenerated.
1321         * generated/eoshift1_4.c:  Regenerated.
1322         * generated/eoshift1_8.c:  Regenerated.
1323         * generated/eoshift3_4.c:  Regenerated.
1324         * generated/eoshift3_8.c:  Regenerated.
1325
1326 2005-06-24  Jerry DeLisle <jvdelisle@verizon.net>
1327
1328         PR libfortran/21915
1329         * Makefile.am: Include intrinsics/hyper.c.
1330         * c99_protos.h: Add prototypes for single precision versions of
1331         acosh, asinh, and atanh for platforms that do not have these.
1332         * config.h.in: Add #undef for wrappers.
1333         * configure.ac: Add checks for single precision versions.
1334         * aclocal.m4: Regenerated.
1335         * Makefile.in: Regenerated.
1336         * configure: Regenerated.
1337         * intrinsics/hyper.c: New file, adds new wrapper functions.
1338
1339 2005-06-23  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1340
1341         * intrinsics/c99_functions.c (log10l): New log10l function for
1342         systems where this is not available.
1343         * c99_protos.h: Prototype for log10l function.
1344         * libgfortran.h: Use generated kinds.h to define GFC_INTEGER_*,
1345         GFC_UINTEGER_*, GFC_LOGICAL_*, GFC_REAL_*, GFC_COMPLEX_*. Update
1346         prototypes for gfc_itoa and xtoa.
1347         * io/io.h: Update prototypes for set_integer and max_value.
1348         * io/list_read.c (convert_integer): Use new
1349         GFC_(INTEGER|REAL)_LARGEST type.
1350         * io/read.c (set_integer): Likewise.
1351         (max_value): Likewise.
1352         (convert_real): Likewise.
1353         (real_l): Likewise.
1354         (next_char): Likewise.
1355         (read_decimal): Likewise.
1356         (read_radix): Likewise.
1357         (read_f): Likewise.
1358         * io/write.c (extract_int): Use new GFC_INTEGER_LARGEST type.
1359         (extract_real): Use new GFC_REAL_LARGEST type.
1360         (calculate_exp): Likewise.
1361         (calculate_G_format): Likewise.
1362         (output_float): Likewise. Use log10l for long double values.
1363         Add comment for sprintf format. Use GFC_REAL_LARGEST_FORMAT.
1364         (write_l): Use new GFC_INTEGER_LARGEST type.
1365         (write_float): Use new GFC_REAL_LARGEST type.
1366         (write_int): Remove useless special case for (len < 8).
1367         (write_decimal): Use GFC_INTEGER_LARGEST.
1368         (otoa): Use GFC_UINTEGER_LARGEST as argument.
1369         (btoa): Use GFC_UINTEGER_LARGEST as argument.
1370         * runtime/error.c (gfc_itoa): Use GFC_INTEGER_LARGEST as
1371         argument.
1372         (xtoa): Use GFC_UINTEGER_LARGEST as argument.
1373         * Makefile.am: Use mk-kinds-h.sh to generate header kinds.h
1374         with all Fortran kinds available.
1375         * configure.ac: Check for strtold and log10l.
1376         * Makefile.in: Regenerate.
1377         * aclocal.m4: Regenerate.
1378         * configure: Regenerate.
1379         * config.h.in: Regenerate.
1380         * mk-kinds-h.sh: Configuration script for available integer
1381         and real kinds.
1382
1383
1384 2005-06-18  Janne Blomqvist  <jblomqvi@cc.hut.fi>
1385
1386         * unix.c (stream_at_bof): Don't assume that all non-mmapped files
1387         are non-seekable.
1388         (stream_at_eof): Likewise.
1389
1390 2005-06-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1391
1392         PR libfortran/19155
1393         * io/read.c (convert_real): strtod can set errno to EINVAL on an
1394         empty string, but we shouldn't have an error in that case.
1395
1396 2005-06-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1397
1398         PR libfortran/19216
1399         * io/list_read.c (eat_separator): No need to call next_record,
1400         even in non-namelist_mode.
1401
1402 2005-06-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1403
1404         * io/transfer.c (formatted_transfer): Fix typo in error message.
1405
1406 2005-06-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1407
1408         PR libfortran/16436
1409         * io/transfer.c (read_sf): Correct updating of bytes_left field.
1410         (formatted_transfer): Correct updating of bytes_left field and
1411         reformatting code (comments and whitespace).
1412         * io/unix.c (move_pos_offset): "active" field should not be
1413         changed here. Whitespace corrections.
1414
1415 2005-06-15  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1416
1417         PR libfortran/21950
1418         * intrinsics/c99_functions.c (scalbn): Provide fallback
1419         implementation for scalbn.
1420         * c99_protos.h: Prototype for scalbn.
1421         * configure.ac: Add check for scalbn.
1422         * configure: Regenerate.
1423         * config.h.in: Regenerate.
1424
1425 2005-06-14  Thomas Koenig  <Thomas.Koenig@online.de>
1426
1427         * intrinsics/eoshift0.c:  Removed prototype for eoshift0.
1428         * intrinsics/eoshift2.c:  Removed prototype for eoshift2.
1429
1430 2005-06-14  Tom Tromey  <tromey@redhat.com>
1431
1432         PR libgcj/19877:
1433         * configure, aclocal.m4, Makefile.in: Rebuilt.
1434
1435 2005-06-12  Thomas Koenig  <Thomas.Koenig@online.de>
1436
1437         PR libfortran/21594
1438         * intrinsics/eoshift0.c:  Add prototype for eoshift0.
1439         * intrinsics/eoshift2.c:  Add prototype for eoshift2.
1440
1441 2005-06-12  Steven G. Kargl <kargls@comcast.net>
1442             Thomas Koenig  <Thomas.Koenig@online.de>
1443
1444         PR libfortran/PR21797
1445         * m4/cexp.m4 (csqrt`'q):  Add type qualifyer to
1446         sqrt and fabs.
1447         * generated/exp_c4.c:  Regenerated.
1448
1449 2005-06-12  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1450
1451         PR libfortran/19155
1452         * io/read.c (read_f): Take care of spaces after initial sign.
1453
1454 2005-06-11  Thomas Koenig  <Thomas.Koenig@onlinde.de>
1455
1456         PR libfortran/21333
1457         * Makefile.am: Add in_pack_c4.c, in_pack_c8.c, in_unpack_c4.c
1458         and in_unpack_c8.c.
1459         * Makefile.in: Regenerate.
1460         * libgfortran.h:  Declare internal_pack_c4, internal_pack_c8,
1461         internal_unpack_c4 and internal_unpack_c8.
1462         * m4/in_pack.m4: Use rtype_ccode insteald of rtype_kind
1463         in function name.
1464         Use sizeof (rtype_name) as size for memory allocation.
1465         * m4/in_unpack.m4: Use rtype_ccode insteald of rtype_kind
1466         in function name.
1467         Use sizeof (rtype_name) for calculation of sizes for memcpy.
1468         * runtime/in_pack_generic.c:  For real, integer and logical
1469         call internal_pack_4 if size==4 and internal_pack_8 if
1470         size==8.
1471         For complex, call internal_pack_c4 if size==8 and
1472         internal_pack_c8 if size==16.
1473         * runtime/in_unpack_generic.c: For real, integer and logical
1474         call internal_unpack_4 if size==4 and internal_unpack_8 if
1475         size==8.
1476         For complex, call internal_unpack_c4 if size==8 and
1477         internal_unpack_c8 if size==16.
1478         * generated/in_pack_i4.c:  Regenerated.
1479         * generated/in_pack_i8.c:  Regenerated.
1480         * generated/in_unpack_i4.c:  Regenerated.
1481         * generated/in_unpack_i8.c:  Regenerated.
1482         * generated/in_pack_c4.c:  New file.
1483         * generated/in_pack_c8.c:  New file.
1484         * generated/in_unpack_c4.c:  New file.
1485         * generated/in_unpack_c8.c:  New file.
1486
1487 2005-06-09  Thomas Koenig  <Thomas.Koenig@online.de>
1488
1489         PR libfortran/21480
1490         * m4/reshape.m4:  Use sizeof (rtype_name) for sizes to be passed
1491         to reshape_packed.
1492         * generated/reshape_c4.c:  Regenerated.
1493         * generated/reshape_c8.c:  Regenerated.
1494         * generated/reshape_i4.c:  Regenerated.
1495         * generated/reshape_i8.c:  Regenerated.
1496
1497 2005-06-07  Thomas Koenig  <Thomas.Koenig@online.de>
1498
1499         PR libfortran/21926
1500         * m4/matmul.m4:  Correct zeroing of result for non-packed
1501         arrays with lowest stride is one.
1502         * generated/matmul_c4.c:  Regenerated.
1503         * generated/matmul_c8.c:  Regenerated.
1504         * generated/matmul_i4.c:  Regenerated.
1505         * generated/matmul_i8.c:  Regenerated.
1506         * generated/matmul_r4.c:  Regenerated.
1507         * generated/matmul_r8.c:  Regenerated.
1508
1509 2005-05-30  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1510
1511         PR libfortran/20179
1512         * io/unix.c (fd_close): Add test so that we don't close()
1513         stdout and stderr.
1514
1515 2005-05-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1516
1517         PR libfortran/20006
1518         * io/format.c (parse_format_list): Set repeat count of $ format
1519         node to 1.
1520         * io/transfer.c (read_sf): Add g.seen_dollar to the test
1521         concerning advancing I/O.
1522         (data_transfer_init): Likewise.
1523         (finalize_transfer): Likewise.
1524
1525 2005-05-27  Thomas Koenig  <Thomas.Koenig@online.de>
1526
1527         * runtime/in_pack_generic.c:  Adjust copyright years.
1528         (in_pack_generic):  Change dimension of auxiliary arrays from
1529         GFC_MAX_DIMENSION - 1 to GFC_MAX_DIMENSION.
1530         * runtime/in_unpack_generic.c:  Adjust copyright years.
1531         (in_unpack_generic):  Change dimension of auxiliary arrays from
1532         GFC_MAX_DIMENSION - 1 to GFC_MAX_DIMENSION.
1533
1534 2005-05-26  Thomas Koenig  <Thomas.Koenig@online.de>
1535
1536         PR libfortran/17283
1537         * intrinsics/unpack_generic.c:  Fix name of routine
1538         on top.  Update copyright years.
1539         (unpack1):  Remove const from return array descriptor.
1540         rs:  New variable, for calculating return sizes.
1541         Populate return array descriptor if ret->data is NULL.
1542
1543 2005-05-22  Peter Wainwright  <prw@ceiriog1.demon.co.uk>
1544
1545         PR libfortran/21376
1546         * io/write.c (output_float): Rework logic to avoid call to log10
1547         with argument equal to zero.
1548
1549 2005-05-21  Eric Botcazou  <ebotcazou@libertysurf.fr>
1550
1551         * configure.ac: Check for trunc and truncf in libm.
1552         * configure: Regenerate.
1553         * config.h.in: Likewise.
1554         * intrinsics/c99_functions.c (trunc, truncf): New functions.
1555         * c99_protos.h (trunc, truncf): Declare them.
1556
1557 2005-05-18  Thomas Koenig  <Thomas.Koenig@online.de>
1558
1559         PR libfortran/21127
1560         * Makefile.am:  Really commit.
1561         * Makefile.in:  Really commit.
1562
1563 2005-05-18  Thomas Koenig  <Thomas.Koenig@online.de>
1564
1565         PR libfortran/21127
1566         * Makefile.am:  Add generated/reshape_c4.c and
1567         generated/reshape_c8.c.
1568         * Makefile.in:  Regenerated.
1569         * m4/iparm.m4:  Define rtype_ccode to be c4 or c8 for
1570         complex types, 4 or 8 otherwise.
1571         * m4/reshape.m4:  Use rtype_ccode instead of rtype_kind
1572         in function name.
1573         * generated/reshape_c4.c: New file.
1574         * generated/reshape_c8.c: New file.
1575
1576 2005-05-16  Andreas Jaeger  <aj@suse.de>
1577
1578         * configure.ac: Add additional warning flags.
1579         * configure: Regenerate.
1580
1581         * io/write.c (calculate_G_format): Remove unused parameter.
1582         (output_float): Remove unused parameter.
1583         (write_float): Change callers.
1584         (nml_write_obj): Avoid signed warning.
1585         Make variable const to support -Wwrite-strings.
1586
1587         * io/unix.c (fd_alloc, mmap_open, mmap_sfree, mem_sfree,
1588         mem_truncate): Mark argument as unused.
1589
1590         * io/unit.c (get_unit): Mark argument as unused.
1591         (init_units): Avoid warning about signed comparision.
1592
1593         * io/transfer.c (next_record_r): Remove unused parameter.
1594         (next_record_w): Remove unused parameter.
1595         (next_record): Change callers.
1596         (iolength_transfer): Mark arguments as unused.
1597
1598         * io/open.c: Add initializer.
1599
1600         * io/list_read.c (read_character): Mark argument as unused.
1601         (nml_match_name): Add const to make compile with -Wwrite-strings.
1602
1603         * io/format.c: Add initializer.
1604
1605 2005-05-15  Andreas Jaeger  <aj@suse.de>
1606
1607         * m4/eoshift1.m4: Initialize variables to avoid warnings.
1608         * m4/eoshift3.m4: Initialize variables to avoid warnings.
1609         * generated/eoshift1_4.c, generated/eoshift1_8.c,
1610         generated/eoshift3_4.c, generated/eoshift3_8.c: Regenerated.
1611
1612         * intrinsics/spread_generic.c (spread): Initialize variables to
1613         avoid warnings.
1614
1615         * intrinsics/eoshift0.c (eoshift0): Initialize variables to avoid
1616         warnings.
1617         * intrinsics/eoshift2.c (eoshift2): Initialize variables to avoid
1618         warnings.
1619
1620         * io/list_read.c (nml_get_obj_data): Initialize variables to avoid
1621         warnings.
1622
1623         * intrinsics/pack_generic.c (pack): Remove unneeded calculation.
1624
1625         * m4/matmull.m4 (matmul_): Remove unneeded calculations, fix
1626         pointer cast to avoid warning.
1627         * generated/matmul_l4.c: Regenerated.
1628         * generated/matmul_l8.c: Regenerated.
1629
1630         * Makefile.am: Remove AM_CFLAGS here.
1631         * configure.ac: Define AM_CFLAGS and AM_FCFLAGS so that warnings
1632         are set.  Set additionally -Wstrict-prototypes for CFLAGS.
1633         * Makefile.in: Regenerated.
1634         * aclocal.m4: Regenerated.
1635         * configure: Regenerated.
1636
1637         * intrinsics/system_clock.c (system_clock_4, system_clock_8): Add
1638         missing returns, reformat a bit.
1639
1640         * io/write.c (nml_write_obj): Use %d again - and cast to int,
1641         st_sprintf does not handle %ld.
1642
1643         * io/unit.c (is_internal_unit): Add void as parameter list.
1644
1645         * io/transfer.c: Move prototype declarations before the functions.
1646
1647         * runtime/normalize.c (almostone_r4, almostone_r8): Fix parameter
1648         list.
1649
1650         * intrinsics/random.c (KISS_DEFAULT_SEED): Remove extra semicolon.
1651
1652         * io/transfer.c: Do not use empty initializers for global objects.
1653         Add missing initializers.
1654
1655         * io/lock.c: Do not use empty initializers for global objects.
1656
1657         * io/close.c: Add missing initializers.
1658
1659         * runtime/environ.c: Add missing initializers. Do not use empty
1660         initializers for global object.
1661         (init_string): Mark argument as unused.
1662
1663         * runtime/main.c (cleanup): Fix parameter list.
1664
1665         * io/io.h: Fix parameter lists.
1666
1667         * m4/transpose.m4, m4/matmul.m4: Fix pointer cast to avoid
1668         warning.
1669
1670         * generated/transpose_c4.c, generated/transpose_c8.c,
1671         generated/transpose_i4.c, generated/transpose_i8.c,
1672         generated/matmul_c4.c, generated/matmul_c8.c,
1673         generated/matmul_i4.c, generated/matmul_i8.c,
1674         generated/matmul_r4.c, generated/matmul_r8.c: Regenerated.
1675
1676         * io/write.c (nml_write_obj): Fix 64-bit problem.
1677
1678         * io/list_read.c (nml_get_obj_data): Add missing braces around
1679         initializer to avoid warnings.
1680
1681         * intrinsics/etime.c (etime_sub): Remove unused variable.
1682
1683         * intrinsics/chdir.c, intrinsics/getlog.c, intrinsics/link.c,
1684         intrinsics/symlnk.c, intrinsics/perror.c: Include <string.h> for
1685         prototypes.
1686
1687         * runtime/string.c (compare0): Remove unused variable.
1688         * io/unit.c (init_units): Remove unused variables.
1689         * intrinsics/getcwd.c (getcwd_i4_sub): Remove unused variable.
1690         * intrinsics/unlink.c (unlink_i4_sub): Remove unused variable.
1691         * intrinsics/stat.c (stat_i4_sub, fstat_i8_sub, fstat_i4_sub,
1692         stat_i8_sub): Remove unused variable.
1693
1694 2005-05-12  Thomas Koenig  <Thomas.Koenig@online.de>
1695
1696         PR libfortran/21324
1697         * runtime/memory.c:  Don't define GFC_CLEAR_MEMORY (it's a
1698         performance hog).
1699         * io/open.c (new_unit): Zero freshly allocated memory for
1700         unit structure.
1701         * io/unit.c (init_units):  Zero freshly allocated memory for
1702         STDIN, STDOUT and STDERR.
1703         * io/unix.c (open_internal):  Zero freshly allocated memory
1704         for unix_stream.
1705         (fd_to_stream):  Likewise.
1706
1707 2005-05-11  Bud Davis  <bdavis@gfortran.org>
1708
1709         PR fortran/19478
1710         * io/unix.c (fd_truncate): update positions when ftruncate
1711         fails (like writing to /dev/null).
1712
1713 2005-05-10  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1714
1715         PR libfortran/21471
1716         * open.c (new_unit): Take care of the case where POSITION_APPEND
1717         is specified (sseek to the end, and set u>-endfile).
1718
1719 2005-05-10  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1720
1721         PR fortran/20178
1722         * Makefile.am (gfor_specific_src): Add 'intrinsics/f2c_intrinsics.F90'
1723         to dependencies.
1724         * Makefile.in: Regenerate.
1725         * intrinsics/f2c_specific.F90: New file.
1726
1727 2005-05-10  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1728
1729         PR libfortran/20788
1730         * io/unix.c (fd_to_stream): Add an avoid_mmap argument indicating
1731         we don't we to mmap this stream. Use fd_open instead of mmap_open
1732         in that case.
1733         (open_external): Call fd_to_stream with avoid_mmap = 0.
1734         (input_stream): Call fd_to_stream with avoid_mmap = 1.
1735         (output_stream): Likewise.
1736         (error_stream): Likewise.
1737
1738 2005-05-09  Mike Stump  <mrs@apple.com>
1739
1740         * configure: Regenerate.
1741
1742 2005-05-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1743
1744         PR libfortran/19155
1745         * io/read.c (read_f): Accept 'e', 'E', 'd' and 'D' as first
1746         non-blank characters of a real number.
1747
1748 2005-05-04  Thomas Koenig  <Thomas.Koenig@online.de>
1749
1750         PR libfortran/21354
1751         * m4/cshift1.m4: Change dimension of auxiliary arrays from
1752         GFC_MAX_DIMENSION - 1 to GFC_MAX_DIMENSION.
1753         * m4/eoshift1.m4: Likewise.
1754         * m4/eoshift3.m4: Likewise.
1755         * m4/ifunction.m4: Likewise.
1756         * m4/in_pack.m4: Likewise.
1757         * m4/in_unpack.m4: Likewise.
1758         * intrinsics/cshift0.c: Likewise.
1759         * intrinsics/eoshift0.c: Likewise.
1760         * intrinsics/eoshift2.c: Likewise.
1761         * intrinsics/random.c: Likewise.
1762         * intrinsics/spread_generic.c: Likewise.
1763         * intrinsics/stat.c: Likewise.
1764         * generated/all_l4.c: Regenerated.
1765         * generated/all_l8.c: Regenerated.
1766         * generated/any_l4.c: Regenerated.
1767         * generated/any_l8.c: Regenerated.
1768         * generated/count_4_l4.c: Regenerated.
1769         * generated/count_4_l8.c: Regenerated.
1770         * generated/count_8_l4.c: Regenerated.
1771         * generated/count_8_l8.c: Regenerated.
1772         * generated/cshift1_4.c: Regenerated.
1773         * generated/cshift1_8.c: Regenerated.
1774         * generated/eoshift1_4.c: Regenerated.
1775         * generated/eoshift1_8.c: Regenerated.
1776         * generated/eoshift3_4.c: Regenerated.
1777         * generated/eoshift3_8.c: Regenerated.
1778         * generated/in_pack_i4.c: Regenerated.
1779         * generated/in_pack_i8.c: Regenerated.
1780         * generated/in_unpack_i4.c: Regenerated.
1781         * generated/in_unpack_i8.c: Regenerated.
1782         * generated/maxloc0_4_i4.c: Regenerated.
1783         * generated/maxloc0_4_i8.c: Regenerated.
1784         * generated/maxloc0_4_r4.c: Regenerated.
1785         * generated/maxloc0_4_r8.c: Regenerated.
1786         * generated/maxloc0_8_i4.c: Regenerated.
1787         * generated/maxloc0_8_i8.c: Regenerated.
1788         * generated/maxloc0_8_r4.c: Regenerated.
1789         * generated/maxloc0_8_r8.c: Regenerated.
1790         * generated/maxloc1_4_i4.c: Regenerated.
1791         * generated/maxloc1_4_i8.c: Regenerated.
1792         * generated/maxloc1_4_r4.c: Regenerated.
1793         * generated/maxloc1_4_r8.c: Regenerated.
1794         * generated/maxloc1_8_i4.c: Regenerated.
1795         * generated/maxloc1_8_i8.c: Regenerated.
1796         * generated/maxloc1_8_r4.c: Regenerated.
1797         * generated/maxloc1_8_r8.c: Regenerated.
1798         * generated/maxval_i4.c: Regenerated.
1799         * generated/maxval_i8.c: Regenerated.
1800         * generated/maxval_r4.c: Regenerated.
1801         * generated/maxval_r8.c: Regenerated.
1802         * generated/minloc0_4_i4.c: Regenerated.
1803         * generated/minloc0_4_i8.c: Regenerated.
1804         * generated/minloc0_4_r4.c: Regenerated.
1805         * generated/minloc0_4_r8.c: Regenerated.
1806         * generated/minloc0_8_i4.c: Regenerated.
1807         * generated/minloc0_8_i8.c: Regenerated.
1808         * generated/minloc0_8_r4.c: Regenerated.
1809         * generated/minloc0_8_r8.c: Regenerated.
1810         * generated/minloc1_4_i4.c: Regenerated.
1811         * generated/minloc1_4_i8.c: Regenerated.
1812         * generated/minloc1_4_r4.c: Regenerated.
1813         * generated/minloc1_4_r8.c: Regenerated.
1814         * generated/minloc1_8_i4.c: Regenerated.
1815         * generated/minloc1_8_i8.c: Regenerated.
1816         * generated/minloc1_8_r4.c: Regenerated.
1817         * generated/minloc1_8_r8.c: Regenerated.
1818         * generated/minval_i4.c: Regenerated.
1819         * generated/minval_i8.c: Regenerated.
1820         * generated/minval_r4.c: Regenerated.
1821         * generated/minval_r8.c: Regenerated.
1822         * generated/product_c4.c: Regenerated.
1823         * generated/product_c8.c: Regenerated.
1824         * generated/product_i4.c: Regenerated.
1825         * generated/product_i8.c: Regenerated.
1826         * generated/product_r4.c: Regenerated.
1827         * generated/product_r8.c: Regenerated.
1828         * generated/sum_c4.c: Regenerated.
1829         * generated/sum_c8.c: Regenerated.
1830         * generated/sum_i4.c: Regenerated.
1831         * generated/sum_i8.c: Regenerated.
1832         * generated/sum_r4.c: Regenerated.
1833         * generated/sum_r8.c: Regenerated.
1834
1835 2005-04-30  Thomas Koenig  <Thomas.Koenig@online.de>
1836
1837         PR libfortran/18958
1838         libgfortran.h:  Change typedef of index_type from size_t
1839         to ssize_t.
1840
1841 2005-04-30  Paul Thomas  <pault@gcc.gnu.org>
1842
1843         PR libfortran/18857
1844         * generated/matmul_r8.c: Remove incorrect assertions.
1845         * generated/matmul_c4.c: Regenerate
1846         * generated/matmul_c8.c: Regenerate
1847         * generated/matmul_i4.c: Regenerate
1848         * generated/matmul_i8.c: Regenerate
1849         * generated/matmul_r4.c: Regenerate
1850         * generated/matmul_r8.c: Regenerate
1851
1852 2005-04-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1853
1854         * configure.ac: Check for ftruncate and chsize.
1855         * io/unix.c (fd_truncate): Provide chsize as alternative to
1856         ftruncate.
1857         * config.h.in: Regenerate.
1858         * configure: Regenerate.
1859
1860 2004-04-29  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1861
1862         * intrinsics/rename.c: Add missing #includes.
1863
1864 2004-04-28  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1865
1866         * AUTHORS, COPYING, INSTALL, NEWS, README: Remove.
1867
1868 2005-04-26  David Edelsohn  <edelsohn@gnu.org>
1869
1870         PR libfortran/20930
1871         * io/rewind.c (st_rewind): Flush the stream when resetting the mode
1872         from WRITING to READING.
1873
1874 2005-04-22  Paul Thomas  <pault@gcc.gnu.org>
1875             Jerry DeLisle  <jvdelisle@verizon.net>
1876
1877         * io/write.c (nml_write_obj): Provide 1 more byte for ext_name.
1878         * io/list_read.c (nml_get_obj_data): Put extra brackets in get_mem
1879         call for ext_name.  These fix the bug reported by Jerry DeLisle to
1880         the fortran list and are based on his suggested fix.
1881
1882 2005-04-22  Thomas Koenig  <Thomas.Koenig@online.de>
1883
1884         PR libfortran/20074
1885         PR libfortran/20436
1886         PR libfortran/21108
1887         * m4/reshape.m4 (reshape_`'rtype_kind):  rs, rex:  New
1888         variables, to be used in calculation of return array sizes.
1889         Populate return array descriptor if ret->data is NULL.
1890         Fix condition for early return (it used to test something
1891         undefined if order was used).
1892         Remove duplicate check wether pad is used.
1893         * intrinsics/reshape_generic.c (reshape_generic): Likewise.
1894         Fix a few places where the wrong variables were set.
1895         * generated/reshape_i4.c: Regenerated.
1896         * generated/reshape_i8.c: Regenerated.
1897
1898 2005-04-18  Paul  Thomas <pault@gcc.gnu.org>
1899
1900         * io/list_read.c (nml_touch_nodes, nml_read_obj,
1901         nml_get_obj_data): Fix memory leaks in code for derived types.
1902
1903 2005-04-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1904
1905         PR libfortran/20950
1906         * io/inquire.c (inquire_via_unit): Check for the gfc_unit being
1907         NULL when setting ioparm.sequential.
1908
1909 2005-04-17  Thomas Koenig  <Thomas.Koenig@online.de>
1910
1911         PR libfortran/21075
1912         * m4/reshape.m4 (reshape_`'rtype_kind):  Change dimension
1913         of auxiliary arrays from GFC_MAX_DIMENSIONS - 1 to
1914         GFC_MAX_DIMENSIONS.
1915         * intrinsics/reshape_generic.c (reshape_generic):  Likewise.
1916         * generated/reshape_i4.c:  Regenerated.
1917         * generated/reshape_i8.c:  Regenerated.
1918
1919 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
1920
1921         * io/list_read.c (eat_separator): at_eol = 1 replaced
1922         (zapped at some time?).
1923
1924 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
1925
1926         PR libgfortran/12884
1927         PR libgfortran/17285
1928         PR libgfortran/18122
1929         PR libgfortran/18210
1930         PR libgfortran/18392
1931         PR libgfortran/18591
1932         PR libgfortran/18879
1933         * io/io.h (nml_ls): Declare.
1934         (namelist_info): Modify for arrays.
1935         * io/list_read.c (namelist_read): Reduced to call to new functions.
1936         (match_namelist_name): Simplified.
1937         (nml_query): Handles stdin queries ? and =?. New function.
1938         (nml_get_obj_data): Parses object name. New function.
1939         (touch_nml_nodes): Marks objects for read. New function.
1940         (untouch_nml_nodes): Resets objects. New function.
1941         (parse_qualifier): Parses and checks qualifiers. New function
1942         (nml_read_object): Reads and stores object data. New function.
1943         (eat_separator): No new_record on '/' in namelist.
1944         (finish_separator): No new_record on '/' in namelist.
1945         (read_logical): Error return for namelist.
1946         (read_integer): Error return for namelist.
1947         (read_complex): Error return for namelist.
1948         (read_real): Error return for namelist.
1949         * io/lock.c (library_end): Free extended namelist_info types.
1950         * io/transfer.c (st_set_nml_var): Modified for arrays.
1951         (st_set_nml_var_dim): Dimension descriptors. New function.
1952         * io/write.c (namelist_write): Reduced to call to new functions.
1953         (nml_write_obj): Writes output for object. New function.
1954         (write_integer): Suppress leading blanks for repeat counts.
1955         (write_int): Suppress leading blanks for repeat counts.
1956         (write_float): Suppress leading blanks for repeat counts.
1957         (output_float): Suppress leading blanks for repeat counts.
1958
1959 2005-04-15  Thomas Koenig  <Thomas.Koenig@online.de>
1960
1961         PR libfortran/18495
1962         * intrinsics/spread_generic.c (spread):  Remove const from
1963         return array descriptor.
1964         New variables: rrank (rank of return array),  rs (for
1965         calculating the size of the return array), srank (rank
1966         of the source array).
1967         Generate runtime error if the dim= argument is larger than
1968         the rank of the return array.
1969         Generate runtime error if the needed rank of the return
1970         array is larger than 7.
1971         If ret->data is null, populate the return array descriptor
1972         and initialize the variables for the actual operation.
1973         Otherwise, set ret->dim[0].stride to one if it is zero.
1974         Change second, independent use of variable dim to srank.
1975
1976 2005-04-12  Mike Stump  <mrs@apple.com>
1977
1978         * configure: Regenerate.
1979
1980 2005-04-13  Thomas Koenig  <Thomas.Koenig@online.de>
1981
1982         PR libfortran/19106
1983         * m4/iforeach.c (name`'rtype_qual`_'atype_code):  Add TODO
1984         that setting correct strides is a front end job.
1985         (`m'name`'rtype_qual`_'atype_code):  Likewise.  If mask has
1986         a lowest stride of 0, adjust to 1.
1987         * m4/ifunction.c (name`'rtype_qual`_'atype_code):  Add TODO
1988         that setting correct strides is a front end job.
1989         (`m'name`'rtype_qual`_'atype_code):  Likewise.  If mask has
1990         a lowest stride of 0, adjust to 1.
1991         * maxloc0_4_i4.c: Regenerated
1992         * maxloc0_4_i8.c: Regenerated
1993         * maxloc0_4_r4.c: Regenerated
1994         * maxloc0_4_r8.c: Regenerated
1995         * maxloc0_8_i4.c: Regenerated
1996         * maxloc0_8_i8.c: Regenerated
1997         * maxloc0_8_r4.c: Regenerated
1998         * maxloc0_8_r8.c: Regenerated
1999         * maxloc1_4_i4.c: Regenerated
2000         * maxloc1_4_i8.c: Regenerated
2001         * maxloc1_4_r4.c: Regenerated
2002         * maxloc1_4_r8.c: Regenerated
2003         * maxloc1_8_i4.c: Regenerated
2004         * maxloc1_8_i8.c: Regenerated
2005         * maxloc1_8_r4.c: Regenerated
2006         * maxloc1_8_r8.c: Regenerated
2007         * maxval_i4.c: Regenerated
2008         * maxval_i8.c: Regenerated
2009         * maxval_r4.c: Regenerated
2010         * maxval_r8.c: Regenerated
2011         * minloc0_4_i4.c: Regenerated
2012         * minloc0_4_i8.c: Regenerated
2013         * minloc0_4_r4.c: Regenerated
2014         * minloc0_4_r8.c: Regenerated
2015         * minloc0_8_i4.c: Regenerated
2016         * minloc0_8_i8.c: Regenerated
2017         * minloc0_8_r4.c: Regenerated
2018         * minloc0_8_r8.c: Regenerated
2019         * minloc1_4_i4.c: Regenerated
2020         * minloc1_4_i8.c: Regenerated
2021         * minloc1_4_r4.c: Regenerated
2022         * minloc1_4_r8.c: Regenerated
2023         * minloc1_8_i4.c: Regenerated
2024         * minloc1_8_i8.c: Regenerated
2025         * minloc1_8_r4.c: Regenerated
2026         * minloc1_8_r8.c: Regenerated
2027         * minval_i4.c: Regenerated
2028         * minval_i8.c: Regenerated
2029         * minval_r4.c: Regenerated
2030         * minval_r8.c: Regenerated
2031         * product_c4.c: Regenerated
2032         * product_c8.c: Regenerated
2033         * product_i4.c: Regenerated
2034         * product_i8.c: Regenerated
2035         * product_r4.c: Regenerated
2036         * product_r8.c: Regenerated
2037         * sum_c4.c: Regenerated
2038         * sum_c8.c: Regenerated
2039         * sum_i4.c: Regenerated
2040         * sum_i8.c: Regenerated
2041         * sum_r4.c: Regenerated
2042         * sum_r8.c: Regenerated
2043
2044 2005-04-10  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2045
2046         PR libfortran/20788
2047         * runtime/environ.c (init_unsigned_integer): Function for
2048         environment variables we want to be positive.
2049         (init_integer): Function to allow negative environment
2050         variables (e.g. for GFORTRAN_STDIN_UNIT).
2051
2052 2005-04-10  Thomas Koenig <Thomas.Koenig@online.de>
2053
2054         PR libfortran/17992
2055         PR libfortran/19568
2056         PR libfortran/19595
2057         PR libfortran/20005
2058         PR libfortran/20092
2059         PR libfortran/20131
2060         PR libfortran/20661
2061         PR libfortran/20744
2062         * io/transfer.c (top level): eor_condition: New static variable.
2063         (read_sf): Remove unnecessary zeroing of buffer (there is enough
2064         information in its length).
2065         Return a string of length 0 (to be padded by caller) if EOR was
2066         seen previously.
2067         Remove erroneous special casing of EOR for standard input.
2068         Set eor_condition for non-advancing I/O if an end of line was
2069         detected.
2070         Increment ioparm.size if necessary.
2071         (formatted_transfer):  Skip the function if there is an EOR condition.
2072         (data_transfer_init):  Initialize eor_condition to zero (false).
2073         (next_record_r):  Clear sf_seen_eor if a \n has been seen already.
2074         (finalize_transfer):  If there is an EOR condition, raise the error.
2075
2076 2005-04-09  Bud Davis  <bdavis@gfortran.org>
2077             Steven G. Kargl <kargls@comcast.net>
2078
2079         PR fortran/19872
2080         * io/transfer.c (data_transfer_init): truncate an existing
2081         file on the first write.
2082
2083 2005-04-09  Thomas Koenig  <Thomas.Koenig@online.de>
2084
2085         PR libfortran/19106
2086         PR libfortran/19014
2087         * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): ditto.
2088         If retarray->data is NULL (i.e. the front end does not
2089         know the rank and dimenson of the array), fill in its
2090         properties and allocate memory.
2091         Change the assertions about rank and dimension of retarray into
2092         runtime errors and only check them for retarray->data != NULL.
2093         Do the same for correcting the stride from 0 to 1 in retarray.
2094         (`m'name`'rtype_qual`_'atype_code): Likewise.
2095         * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Likewise.
2096         Change assertion about rank of array to runtime error.
2097         (`m'name`'rtype_qual`_'atype_code): Likewise.
2098         * generated/all_l4.c: Regenerated.
2099         * generated/all_l8.c: Regenerated.
2100         * generated/any_l4.c: Regenerated.
2101         * generated/any_l8.c: Regenerated.
2102         * generated/count_4_l4.c: Regenerated.
2103         * generated/count_4_l8.c: Regenerated.
2104         * generated/count_8_l4.c: Regenerated.
2105         * generated/count_8_l8.c: Regenerated.
2106         * generated/maxloc0_4_i4.c: Regenerated.
2107         * generated/maxloc0_4_i8.c: Regenerated.
2108         * generated/maxloc0_4_r4.c: Regenerated.
2109         * generated/maxloc0_4_r8.c: Regenerated.
2110         * generated/maxloc0_8_i4.c: Regenerated.
2111         * generated/maxloc0_8_i8.c: Regenerated.
2112         * generated/maxloc0_8_r4.c: Regenerated.
2113         * generated/maxloc0_8_r8.c: Regenerated.
2114         * generated/maxloc1_4_i4.c: Regenerated.
2115         * generated/maxloc1_4_i8.c: Regenerated.
2116         * generated/maxloc1_4_r4.c: Regenerated.
2117         * generated/maxloc1_4_r8.c: Regenerated.
2118         * generated/maxloc1_8_i4.c: Regenerated.
2119         * generated/maxloc1_8_i8.c: Regenerated.
2120         * generated/maxloc1_8_r4.c: Regenerated.
2121         * generated/maxloc1_8_r8.c: Regenerated.
2122         * generated/maxval_i4.c: Regenerated.
2123         * generated/maxval_i8.c: Regenerated.
2124         * generated/maxval_r4.c: Regenerated.
2125         * generated/maxval_r8.c: Regenerated.
2126         * generated/minloc0_4_i4.c: Regenerated.
2127         * generated/minloc0_4_i8.c: Regenerated.
2128         * generated/minloc0_4_r4.c: Regenerated.
2129         * generated/minloc0_4_r8.c: Regenerated.
2130         * generated/minloc0_8_i4.c: Regenerated.
2131         * generated/minloc0_8_i8.c: Regenerated.
2132         * generated/minloc0_8_r4.c: Regenerated.
2133         * generated/minloc0_8_r8.c: Regenerated.
2134         * generated/minloc1_4_i4.c: Regenerated.
2135         * generated/minloc1_4_i8.c: Regenerated.
2136         * generated/minloc1_4_r4.c: Regenerated.
2137         * generated/minloc1_4_r8.c: Regenerated.
2138         * generated/minloc1_8_i4.c: Regenerated.
2139         * generated/minloc1_8_i8.c: Regenerated.
2140         * generated/minloc1_8_r4.c: Regenerated.
2141         * generated/minloc1_8_r8.c: Regenerated.
2142         * generated/minval_i4.c: Regenerated.
2143         * generated/minval_i8.c: Regenerated.
2144         * generated/minval_r4.c: Regenerated.
2145         * generated/minval_r8.c: Regenerated.
2146         * generated/product_c4.c: Regenerated.
2147         * generated/product_c8.c: Regenerated.
2148         * generated/product_i4.c: Regenerated.
2149         * generated/product_i8.c: Regenerated.
2150         * generated/product_r4.c: Regenerated.
2151         * generated/product_r8.c: Regenerated.
2152         * generated/sum_c4.c: Regenerated.
2153         * generated/sum_c8.c: Regenerated.
2154         * generated/sum_i4.c: Regenerated.
2155         * generated/sum_i8.c: Regenerated.
2156         * generated/sum_r4.c: Regenerated.
2157         * generated/sum_r8.c: Regenerated.
2158
2159 2005-04-09  Thomas Koenig <Thomas.Koenig@online.de>
2160
2161         PR libfortran/20163
2162         * runtime/string.c (compare0): Use fstrlen() to
2163         strip trailing blanks from option string.
2164
2165 2005-04-09  Andrew Pinski  <pinskia@physics.uc.edu>
2166
2167         PR fortran/13257
2168         * format.c (parse_format_list): Allow an optional comma
2169         between descriptors.
2170
2171 2005-04-08  Eric Botcazou  <ebotcazou@libertysurf.fr>
2172
2173         * io/backspace.c (unformatted_backspace): Do not dereference
2174         the pointer to the stream.
2175
2176 2005-04-07  Andrew Pinski  <pinskia@physics.uc.edu>
2177
2178         PR libfortran/20766
2179         * configure.ac (extra_ldflags_libgfortran): Set for *-darwin* to
2180         "-Wl,-single_module".
2181         * configure: Regenerate.
2182         * Makefile.am (libgfortran_la_LDFLAGS): Add extra_ldflags_libgfortran.
2183         * Makefile.in: Regenerate.
2184
2185 2005-04-05  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2186
2187         PR libfortran/20755
2188         * write.c (write_float): A G edit descriptor may locally change
2189         the scale factor, but it needs to be restored afterwards.
2190
2191 2005-04-03  Dale Ranta  <dir@lanl.gov>
2192             Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2193
2194         PR libfortran/20068
2195         PR libfortran/20125
2196         PR libfortran/20156
2197         PR libfortran/20471
2198         * io/backspace.c (unformatted_backspace): Fix error in arithmetic.
2199         (st_backspace): When in WRITING mode, we flush and falling back
2200         into READING mode. In all cases, correctly position the stream.
2201
2202 2005-03-31  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2203
2204         PR libfortran/20660
2205         * io/inquire.c (inquire_via_unit): Non-opened units should still be
2206         reported by an INQUIRE statement as existing.
2207         * io/transfer.c (data_transfer_init): Never accept negative units.
2208
2209 2005-03-29  Dale Ranta  <dir@lanl.gov>
2210             Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2211
2212         PR libfortran/20163
2213         * io/open.c (st_open): call library_end() before returning even if
2214         an error arises.
2215
2216 2005-03-25  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2217
2218         PR libfortran/19678
2219         * list_read.c (next_char, eat_separator, finish_separator, read_real)
2220         (namelist_read): Add support for '\r' as well as '\n' as EOL
2221         character.
2222
2223         PR libfortran/19679
2224         * list_read.c (read_sf): Add a '\r' in a test to support DOS
2225         line-endings when line length is exceeded.
2226
2227 2005-03-25  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2228
2229         PR libfortran/15332
2230         * io/format.c (parse_format_list): format node for colon edit
2231         descriptor needs a repeat counter set to 1.
2232
2233 2005-02-24  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2234
2235         * config.h.in: Regenerate.
2236
2237 2005-02-23  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2238
2239         PR libfortran/18025
2240         * write.c (output_float): Handling the "F0.d" format similarly as
2241         commercial compilers.
2242
2243 2005-03-22  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2244
2245         * Makefile.am: Added new files.
2246         * Makefile.in: Regenerate.
2247         * aclocal.m4: Regenerate.
2248         * configure.ac: add checks for signal.h headers file, as well as
2249         following functions: chdir, strerror, getlogin, gethostname, kill,
2250         link, symlink, perror, sleep, time.
2251         * configure: Regenerate.
2252         * intrinsics/chdir.c, intrinsics/gerror.c, intrinsics/getlog.c,
2253         intrinsics/hostnm.c, intrinsics/ierrno.c, intrinsics/kill.c,
2254         intrinsics/link.c, intrinsics/perror.c, intrinsics/rename.c,
2255         intrinsics/sleep.c, intrinsics/symlnk.c, intrinsics/time.c: Newly
2256         implementend g77 intrinsics.
2257
2258 2005-03-21  Zack Weinberg  <zack@codesourcery.com>
2259
2260         * configure.ac: Do not invoke TL_AC_GCC_VERSION.
2261         In all substitutions, leave gcc_version to be expanded by the Makefile.
2262         * aclocal.m4, configure: Regenerate.
2263         * Makefile.am: Set gcc_version.
2264         * Makefile.in: Regenerate.
2265
2266 2005-03-16  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2267
2268         PR libfortran/20257
2269         * open.c (new_unit): set record length to max_offset rather than
2270           using a hard-coded limit (which was too low).
2271
2272 2005-03-16  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2273
2274         PR libfortran/20480
2275         * write.c (output_float): special check when writing 0.0 with
2276           EN and ES formats.
2277
2278 2005-03-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2279
2280         PR libfortran/20124
2281         * write.c (output_float): Adds a nzero_real variable to store
2282         the number of leading zeros whatever the format width is. Corrects
2283         the rounding of numbers less than 10^(-width). Fixes typo in an
2284         error message. Updates copyright years
2285
2286 2005-02-27  Toon Moene  <toon@moene.indiv.nluug.nl>
2287
2288         * runtime/environ.c: Update copyright years.
2289
2290 2005-02-27  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2291
2292         * io/write.c: Update copyright years.
2293
2294 2005-02-27  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2295
2296         PR libfortran/20101
2297         * io/write.c (output_float): Added special check for value 0.0 in
2298         PE format.
2299
2300 2004-02-27  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2301
2302         * io/write.c (output_float): Fix typo in condition.
2303
2304 2005-02-25  Peter O'Gorman  <peter@pogma.com>
2305             Toon Moene  <toon@moene.indiv.nluug.nl>
2306
2307         PR libgfortran/17748
2308         * runtime/environ.c: Remove references to environ.
2309         (show_variables): remove GFORTRAN_UNBUFFERED_* and
2310         GFORTRAN_NAME_* because they require environ.
2311         (pattern_scan): Remove function.
2312
2313 2004-02-22  Paul Thomas <paulthomas2@wannado.fr>
2314             Bud Davis  <bdavis@gfortran.org>
2315
2316         * io/list_read.c (read_real): Handle separators properly
2317         in list directed read.
2318
2319 2004-02-21  Bud Davis  <bdavis@gfortran.org>
2320
2321         PR fortran/20086
2322         * io/transfer.c (write_constant_string): accept an 'h' as
2323         the start of a hollerith format string.
2324
2325 2005-02-21  Eric Botcazou  <ebotcazou@libertysurf.fr>
2326
2327         PR libfortran/19302
2328         * intrinsics/c99_functions.c (nextafterf): Special-case infinite
2329         numbers.
2330
2331 2005-02-21  Steven G. Kargl  <kargls@comcast.net>
2332
2333         * io/write.c (output_float):  Typo in error meesage.
2334
2335 2005-02-20  Steven G. Kargl  <kargls@comcast.net>
2336
2337         PR 20085
2338         * intrinsic/args.c (iargc): Off by 1.
2339
2340 2005-02-19  Steven G. Kargl  <kargls@comcast.net>
2341
2342         *  intrinsic/date_and_time.c: Fix conformance problems.
2343
2344 2005-02-01  Paul Thomas <paulthomas2@wanadoo.fr>
2345
2346         PR libgfortran/19363
2347         PR libgfortran/19691
2348         * libgfortran.h (isfinite): Work around broken isfinite(x) in Cygwin.
2349
2350 2005-01-30  Bud Davis  <bdavis@gfortran.org>
2351
2352         PR fortran/19647
2353         * io/inquire.c (inquire_via_unit): Use correct variable for
2354         pad.
2355
2356 2005-01-29  Thomas Koenig  <Thomas.Koenig@online.de>
2357
2358         PR libfortran/19595
2359         * io/transfer.c (data_transfer_init): eor requires advance="NO".
2360
2361 2005-01-25  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2362
2363         PR libfortran/19524
2364         * io/read.c (read_f): Don't free uninitialized pointer.
2365
2366 2005-01-23  James A. Morrison  <phython@gcc.gnu.org>
2367         Paul Brook  <paul@codesourcery.com>
2368
2369         PR fortran/19294
2370         * Makefile.am: Add transpose_c4.c and transpose_c8.c.
2371         * intrinsics/cshift0.c: Use separate optimized loops for complex types.
2372         * m4/transpose.m4: Include type letter in function name.
2373         * Makefile.in: Regenerate.
2374         * generated/transpose_*.c: Regenerate.
2375
2376 2005-01-22  Thomas Koenig  <Thomas.Koenig@online.de>
2377
2378         PR libfortran/19451
2379         * io/transfer.c (finalize_transfer):  Don't do anything if
2380         there is an error condition.
2381
2382 2005-01-22  David Edelsohn  <edelsohn@gnu.org>
2383
2384         PR libgfortran/19052
2385         * libgfortran.h (options_t): Add stderr_unit.
2386         * io/io.h (error_stream): Declare.
2387         * io/open.c (new_unit): Do not terminate abnormally if opening
2388         file preconnected to stdin, stdout, or stderr.
2389         * io/unit.c (init_units): Initialize stderr_unit.
2390         * io/unix.c (error_stream): New function.
2391         * runtime/environ.c (GFORTRAN_STDERR_UNIT): New environment variable.
2392
2393 2005-01-22  Thomas Koenig  <Thomas.Koenig@online.de>
2394
2395         PR libfortran/18982
2396         * io/unix.c (regular_file):  No need to change flags->action
2397         if an error occurs.  Document this.
2398         No need to call stat() for STATUS_OLD, open() will
2399         fail anyway.
2400         For ACTION_UNSPECIFIED, try open for read-write, then for
2401         read-only if open fails with EACCES, then for write-only
2402         if that fails with EACCES again.
2403         * io/unix.c (open_external): Document changed behavior of
2404         regular_file.
2405
2406 2005-01-22  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2407
2408         PR fortran/19194
2409         * io/io.h (st_parameter): Use 'GFC_INTEGER_4' instead of 'int',
2410         use CHARACTER macro for definition of string valued paramters.
2411
2412 2005-01-22  Bud Davis  <bdavis9659@comcast.net>
2413
2414         PR fortran/19314
2415         * io/inquire.c(inquire_via_unit): implement POSITION=.
2416         * io/transfer.c(next_record): update position for
2417         INQUIRE.
2418         * io/rewind.c(st_rewind): update position for
2419         INQUIRE.
2420
2421 2005-01-16  Bud Davis  <bdavis9659@comcast.net>
2422
2423         PR fortran/18778
2424         * io/transfer.c (us_read): no bytes available is not a
2425         runtime error.
2426
2427 2005-01-15  Bud Davis  <bdavis9659@comcast.net>
2428
2429         PR fortran/18983
2430         * io/transfer.c (st_write_done): only truncate when it
2431         is required.
2432
2433 2005-01-12  Toon Moene  <toon@moene.indiv.nluug.nl>
2434
2435         PR libfortran/19280
2436         c99_protos.h: License changed to GPL+exception.
2437         libgfortran.h: Ditto.
2438         intrinsics/abort.c: Ditto.
2439         intrinsics/args.c: Ditto.
2440         intrinsics/associated.c: Ditto.
2441         intrinsics/bessel.c: Ditto.
2442         intrinsics/c99_functions.c: Ditto.
2443         intrinsics/cpu_time.c: Ditto.
2444         intrinsics/cshift0.c: Ditto.
2445         intrinsics/date_and_time.c: Ditto.
2446         intrinsics/env.c: Ditto.
2447         intrinsics/eoshift0.c: Ditto.
2448         intrinsics/eoshift2.c: Ditto.
2449         intrinsics/erf.c: Ditto.
2450         intrinsics/etime.c: Ditto.
2451         intrinsics/exit.c: Ditto.
2452         intrinsics/flush.c: Ditto.
2453         intrinsics/fnum.c: Ditto.
2454         intrinsics/getXid.c: Ditto.
2455         intrinsics/getcwd.c: Ditto.
2456         intrinsics/ishftc.c: Ditto.
2457         intrinsics/mvbits.c: Ditto.
2458         intrinsics/pack_generic.c: Ditto.
2459         intrinsics/rand.c: Ditto.
2460         intrinsics/random.c: Ditto.
2461         intrinsics/reshape_generic.c: Ditto.
2462         intrinsics/reshape_packed.c: Ditto.
2463         intrinsics/size.c: Ditto.
2464         intrinsics/spread_generic.c: Ditto.
2465         intrinsics/stat.c: Ditto.
2466         intrinsics/string_intrinsics.c: Ditto.
2467         intrinsics/system.c: Ditto.
2468         intrinsics/system_clock.c: Ditto.
2469         intrinsics/transpose_generic.c: Ditto.
2470         intrinsics/umask.c: Ditto.
2471         intrinsics/unlink.c: Ditto.
2472         intrinsics/unpack_generic.c: Ditto.
2473         io/backspace.c: Ditto.
2474         io/close.c: Ditto.
2475         io/endfile.c: Ditto.
2476         io/format.c: Ditto.
2477         io/inquire.c: Ditto.
2478         io/io.h: Ditto.
2479         io/list_read.c: Ditto.
2480         io/lock.c: Ditto.
2481         io/open.c: Ditto.
2482         io/read.c: Ditto.
2483         io/rewind.c: Ditto.
2484         io/transfer.c: Ditto.
2485         io/unit.c: Ditto.
2486         io/unix.c: Ditto.
2487         io/write.c: Ditto.
2488         m4/all.m4: Ditto.
2489         m4/any.m4: Ditto.
2490         m4/cexp.m4: Ditto.
2491         m4/chyp.m4: Ditto.
2492         m4/count.m4: Ditto.
2493         m4/cshift1.m4: Ditto.
2494         m4/ctrig.m4: Ditto.
2495         m4/dotprod.m4: Ditto.
2496         m4/dotprodc.m4: Ditto.
2497         m4/dotprodl.m4: Ditto.
2498         m4/eoshift1.m4: Ditto.
2499         m4/eoshift3.m4: Ditto.
2500         m4/exponent.m4: Ditto.
2501         m4/fraction.m4: Ditto.
2502         m4/head.m4: Ditto.
2503         m4/iforeach.m4: Ditto.
2504         m4/ifunction.m4: Ditto.
2505         m4/in_pack.m4: Ditto.
2506         m4/in_unpack.m4: Ditto.
2507         m4/iparm.m4: Ditto.
2508         m4/matmul.m4: Ditto.
2509         m4/matmull.m4: Ditto.
2510         m4/maxloc0.m4: Ditto.
2511         m4/maxloc1.m4: Ditto.
2512         m4/maxval.m4: Ditto.
2513         m4/minloc0.m4: Ditto.
2514         m4/minloc1.m4: Ditto.
2515         m4/minval.m4: Ditto.
2516         m4/mtype.m4: Ditto.
2517         m4/nearest.m4: Ditto.
2518         m4/pow.m4: Ditto.
2519         m4/product.m4: Ditto.
2520         m4/reshape.m4: Ditto.
2521         m4/set_exponent.m4: Ditto.
2522         m4/shape.m4: Ditto.
2523         m4/specific.m4: Ditto.
2524         m4/specific2.m4: Ditto.
2525         m4/sum.m4: Ditto.
2526         m4/transpose.m4: Ditto.
2527         m4/types.m4: Ditto.
2528         runtime/environ.c: Ditto.
2529         runtime/error.c: Ditto.
2530         runtime/in_pack_generic.c: Ditto.
2531         runtime/in_unpack_generic.c: Ditto.
2532         runtime/main.c: Ditto.
2533         runtime/memory.c: Ditto.
2534         runtime/normalize.c: Ditto.
2535         runtime/pause.c: Ditto.
2536         runtime/select.c: Ditto.
2537         runtime/stop.c: Ditto.
2538         runtime/string.c: Ditto.
2539         generated/_abs_c4.f90: Regenerated.
2540         generated/_abs_c8.f90: Regenerated.
2541         generated/_abs_i4.f90: Regenerated.
2542         generated/_abs_i8.f90: Regenerated.
2543         generated/_abs_r4.f90: Regenerated.
2544         generated/_abs_r8.f90: Regenerated.
2545         generated/_acos_r4.f90: Regenerated.
2546         generated/_acos_r8.f90: Regenerated.
2547         generated/_aint_r4.f90: Regenerated.
2548         generated/_aint_r8.f90: Regenerated.
2549         generated/_anint_r4.f90: Regenerated.
2550         generated/_anint_r8.f90: Regenerated.
2551         generated/_asin_r4.f90: Regenerated.
2552         generated/_asin_r8.f90: Regenerated.
2553         generated/_atan2_r4.f90: Regenerated.
2554         generated/_atan2_r8.f90: Regenerated.
2555         generated/_atan_r4.f90: Regenerated.
2556         generated/_atan_r8.f90: Regenerated.
2557         generated/_conjg_c4.f90: Regenerated.
2558         generated/_conjg_c8.f90: Regenerated.
2559         generated/_cos_c4.f90: Regenerated.
2560         generated/_cos_c8.f90: Regenerated.
2561         generated/_cos_r4.f90: Regenerated.
2562         generated/_cos_r8.f90: Regenerated.
2563         generated/_cosh_r4.f90: Regenerated.
2564         generated/_cosh_r8.f90: Regenerated.
2565         generated/_dim_i4.f90: Regenerated.
2566         generated/_dim_i8.f90: Regenerated.
2567         generated/_dim_r4.f90: Regenerated.
2568         generated/_dim_r8.f90: Regenerated.
2569         generated/_exp_c4.f90: Regenerated.
2570         generated/_exp_c8.f90: Regenerated.
2571         generated/_exp_r4.f90: Regenerated.
2572         generated/_exp_r8.f90: Regenerated.
2573         generated/_log10_r4.f90: Regenerated.
2574         generated/_log10_r8.f90: Regenerated.
2575         generated/_log_c4.f90: Regenerated.
2576         generated/_log_c8.f90: Regenerated.
2577         generated/_log_r4.f90: Regenerated.
2578         generated/_log_r8.f90: Regenerated.
2579         generated/_mod_i4.f90: Regenerated.
2580         generated/_mod_i8.f90: Regenerated.
2581         generated/_mod_r4.f90: Regenerated.
2582         generated/_mod_r8.f90: Regenerated.
2583         generated/_sign_i4.f90: Regenerated.
2584         generated/_sign_i8.f90: Regenerated.
2585         generated/_sign_r4.f90: Regenerated.
2586         generated/_sign_r8.f90: Regenerated.
2587         generated/_sin_c4.f90: Regenerated.
2588         generated/_sin_c8.f90: Regenerated.
2589         generated/_sin_r4.f90: Regenerated.
2590         generated/_sin_r8.f90: Regenerated.
2591         generated/_sinh_r4.f90: Regenerated.
2592         generated/_sinh_r8.f90: Regenerated.
2593         generated/_sqrt_c4.f90: Regenerated.
2594         generated/_sqrt_c8.f90: Regenerated.
2595         generated/_sqrt_r4.f90: Regenerated.
2596         generated/_sqrt_r8.f90: Regenerated.
2597         generated/_tan_r4.f90: Regenerated.
2598         generated/_tan_r8.f90: Regenerated.
2599         generated/_tanh_r4.f90: Regenerated.
2600         generated/_tanh_r8.f90: Regenerated.
2601         generated/all_l4.c: Regenerated.
2602         generated/all_l8.c: Regenerated.
2603         generated/any_l4.c: Regenerated.
2604         generated/any_l8.c: Regenerated.
2605         generated/count_4_l4.c: Regenerated.
2606         generated/count_4_l8.c: Regenerated.
2607         generated/count_8_l4.c: Regenerated.
2608         generated/count_8_l8.c: Regenerated.
2609         generated/cshift1_4.c: Regenerated.
2610         generated/cshift1_8.c: Regenerated.
2611         generated/dotprod_c4.c: Regenerated.
2612         generated/dotprod_c8.c: Regenerated.
2613         generated/dotprod_i4.c: Regenerated.
2614         generated/dotprod_i8.c: Regenerated.
2615         generated/dotprod_l4.c: Regenerated.
2616         generated/dotprod_l8.c: Regenerated.
2617         generated/dotprod_r4.c: Regenerated.
2618         generated/dotprod_r8.c: Regenerated.
2619         generated/eoshift1_4.c: Regenerated.
2620         generated/eoshift1_8.c: Regenerated.
2621         generated/eoshift3_4.c: Regenerated.
2622         generated/eoshift3_8.c: Regenerated.
2623         generated/exp_c4.c: Regenerated.
2624         generated/exp_c8.c: Regenerated.
2625         generated/exponent_r4.c: Regenerated.
2626         generated/exponent_r8.c: Regenerated.
2627         generated/fraction_r4.c: Regenerated.
2628         generated/fraction_r8.c: Regenerated.
2629         generated/hyp_c4.c: Regenerated.
2630         generated/hyp_c8.c: Regenerated.
2631         generated/in_pack_i4.c: Regenerated.
2632         generated/in_pack_i8.c: Regenerated.
2633         generated/in_unpack_i4.c: Regenerated.
2634         generated/in_unpack_i8.c: Regenerated.
2635         generated/matmul_c4.c: Regenerated.
2636         generated/matmul_c8.c: Regenerated.
2637         generated/matmul_i4.c: Regenerated.
2638         generated/matmul_i8.c: Regenerated.
2639         generated/matmul_l4.c: Regenerated.
2640         generated/matmul_l8.c: Regenerated.
2641         generated/matmul_r4.c: Regenerated.
2642         generated/matmul_r8.c: Regenerated.
2643         generated/maxloc0_4_i4.c: Regenerated.
2644         generated/maxloc0_4_i8.c: Regenerated.
2645         generated/maxloc0_4_r4.c: Regenerated.
2646         generated/maxloc0_4_r8.c: Regenerated.
2647         generated/maxloc0_8_i4.c: Regenerated.
2648         generated/maxloc0_8_i8.c: Regenerated.
2649         generated/maxloc0_8_r4.c: Regenerated.
2650         generated/maxloc0_8_r8.c: Regenerated.
2651         generated/maxloc1_4_i4.c: Regenerated.
2652         generated/maxloc1_4_i8.c: Regenerated.
2653         generated/maxloc1_4_r4.c: Regenerated.
2654         generated/maxloc1_4_r8.c: Regenerated.
2655         generated/maxloc1_8_i4.c: Regenerated.
2656         generated/maxloc1_8_i8.c: Regenerated.
2657         generated/maxloc1_8_r4.c: Regenerated.
2658         generated/maxloc1_8_r8.c: Regenerated.
2659         generated/maxval_i4.c: Regenerated.
2660         generated/maxval_i8.c: Regenerated.
2661         generated/maxval_r4.c: Regenerated.
2662         generated/maxval_r8.c: Regenerated.
2663         generated/minloc0_4_i4.c: Regenerated.
2664         generated/minloc0_4_i8.c: Regenerated.
2665         generated/minloc0_4_r4.c: Regenerated.
2666         generated/minloc0_4_r8.c: Regenerated.
2667         generated/minloc0_8_i4.c: Regenerated.
2668         generated/minloc0_8_i8.c: Regenerated.
2669         generated/minloc0_8_r4.c: Regenerated.
2670         generated/minloc0_8_r8.c: Regenerated.
2671         generated/minloc1_4_i4.c: Regenerated.
2672         generated/minloc1_4_i8.c: Regenerated.
2673         generated/minloc1_4_r4.c: Regenerated.
2674         generated/minloc1_4_r8.c: Regenerated.
2675         generated/minloc1_8_i4.c: Regenerated.
2676         generated/minloc1_8_i8.c: Regenerated.
2677         generated/minloc1_8_r4.c: Regenerated.
2678         generated/minloc1_8_r8.c: Regenerated.
2679         generated/minval_i4.c: Regenerated.
2680         generated/minval_i8.c: Regenerated.
2681         generated/minval_r4.c: Regenerated.
2682         generated/minval_r8.c: Regenerated.
2683         generated/nearest_r4.c: Regenerated.
2684         generated/nearest_r8.c: Regenerated.
2685         generated/pow_c4_i4.c: Regenerated.
2686         generated/pow_c4_i8.c: Regenerated.
2687         generated/pow_c8_i4.c: Regenerated.
2688         generated/pow_c8_i8.c: Regenerated.
2689         generated/pow_i4_i4.c: Regenerated.
2690         generated/pow_i4_i8.c: Regenerated.
2691         generated/pow_i8_i4.c: Regenerated.
2692         generated/pow_i8_i8.c: Regenerated.
2693         generated/pow_r4_i4.c: Regenerated.
2694         generated/pow_r4_i8.c: Regenerated.
2695         generated/pow_r8_i4.c: Regenerated.
2696         generated/pow_r8_i8.c: Regenerated.
2697         generated/product_c4.c: Regenerated.
2698         generated/product_c8.c: Regenerated.
2699         generated/product_i4.c: Regenerated.
2700         generated/product_i8.c: Regenerated.
2701         generated/product_r4.c: Regenerated.
2702         generated/product_r8.c: Regenerated.
2703         generated/reshape_i4.c: Regenerated.
2704         generated/reshape_i8.c: Regenerated.
2705         generated/set_exponent_r4.c: Regenerated.
2706         generated/set_exponent_r8.c: Regenerated.
2707         generated/shape_i4.c: Regenerated.
2708         generated/shape_i8.c: Regenerated.
2709         generated/sum_c4.c: Regenerated.
2710         generated/sum_c8.c: Regenerated.
2711         generated/sum_i4.c: Regenerated.
2712         generated/sum_i8.c: Regenerated.
2713         generated/sum_r4.c: Regenerated.
2714         generated/sum_r8.c: Regenerated.
2715         generated/transpose_i4.c: Regenerated.
2716         generated/transpose_i8.c: Regenerated.
2717         generated/trig_c4.c: Regenerated.
2718         generated/trig_c8.c: Regenerated.
2719
2720 2005-01-07  Bud Davis  <bdavis9659@comcast.net>
2721
2722         PR fortran/18398
2723         * transfer.c (next_record_r): always skip the
2724         eol search if it was found during sf_read.
2725
2726 2004-12-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2727
2728         * libgfortran/libgfortran.h (GFC_UINTEGER_1, GFC_UINTEGER_2):
2729         Define.
2730         * intrinsics/ishftc.c: Update copyright years.
2731         (ishftc8): Change 'shift' and 'size' to GFC_INTEGER_4.
2732         * intrinsics/mvbits.c: Correct non-ASCII character in my name.
2733         Add implementations for GFC_INTEGER_1 and GFC_INTEGER_2.
2734
2735 2004-12-23  Bud Davis  <bdavis9659@comcast.net>
2736
2737         PR fortran/19071
2738         * io/tranfer.c (formatted_transfer): moved check for
2739         format reversion inside the processing loop.
2740
2741 2004-12-19  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
2742
2743         PR libfortran/19074
2744         * libgfortran.h (itoa): Rename to gfc_itoa.
2745         * io/write.c (itoa): Same.
2746         * runtime/environ.c (itoa): Same.
2747         * runtime/error.c (itoa): Same.
2748
2749 2004-12-15  Bud Davis  <bdavis9659@comcast.net>
2750             Steven G. Kargl  <kargls@comcast.net>
2751
2752         PR fortran/17597
2753         * io/list_read.c (read_real): do not push back a comma when
2754         it delimits a real value without a decimal point
2755
2756 2004-12-14  Steve Ellcey  <sje@cup.hp.com>
2757
2758         * libgfortran/io/transfer.c (us_read): Use memcpy/memset
2759         instead of assignment to fill unaligned buffer.
2760         (us_write): Ditto.
2761         (next_record_w): Ditto.
2762
2763 2004-12-14  Steven G. Kargl  <kargls@comcast.net>
2764
2765         PR libfortran/18966
2766         * gfortran.h: typedef GFC_INTEGER_1 and GFC_INTEGER_2
2767         * intrinsics/cshift0.c (cshift0_1,cshift0_2): New functions.
2768         * intrinsics/eoshift0.c (eoshift0_1,eoshift0_2): New functions.
2769         * intrinsics/eoshift2.c (eoshift2_1,eoshift2_2): New functions.
2770
2771 2004-12-13  David Edelsohn  <edelsohn@gnu.org>
2772
2773         * io/transfer.c (read_sf): Change bitwise "and" to logical "and".
2774
2775 2004-12-12  Richard Henderson  <rth@redhat.com>
2776
2777         * intrinsics/cshift0.c, intrinsics/eoshift0.c, intrinsics/eoshift2.c,
2778         intrinsics/pack_generic.c, intrinsics/reshape_generic.c,
2779         intrinsics/spread_generic.c, intrinsics/transpose_generic.c,
2780         intrinsics/unpack_generic.c, m4/cshift1.m4, m4/dotprod.m4,
2781         m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4,
2782         m4/iforeach.m4, m4/ifunction.m4, m4/matmul.m4, m4/matmull.m4,
2783         m4/reshape.m4, m4/shape.m4, m4/transpose.m4: Use standard prefix
2784         instead of "__".
2785         * generated/*: Rebuild.
2786
2787 2004-12-12  Richard Henderson  <rth@redhat.com>
2788
2789         * acinclude.m4 (LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY): New.
2790         (LIBGFOR_CHECK_ATTRIBUTE_DLLEXPORT): New.
2791         (LIBGFOR_CHECK_ATTRIBUTE_ALIAS): New.
2792         * configure.ac: Use them.
2793         * configure, config.h.in, aclocal.m4: Rebuild.
2794         * libgfortran.h (prefix): Remove.
2795         (PREFIX, IPREFIX): New.
2796         (sym_rename, sym_rename1, sym_rename2): New.
2797         (internal_proto, export_proto, export_proto_np): New.
2798         (iexport_proto, iexport): New.
2799         (iexport_data_proto, iexport_data): New.
2800         * intrinsics/abort.c, intrinsics/args.c, intrinsics/associated.c,
2801         intrinsics/cpu_time.c, intrinsics/cshift0.c,
2802         intrinsics/date_and_time.c, intrinsics/env.c, intrinsics/eoshift0.c,
2803         intrinsics/eoshift2.c, intrinsics/etime.c, intrinsics/exit.c,
2804         intrinsics/flush.c, intrinsics/fnum.c, intrinsics/getXid.c,
2805         intrinsics/getcwd.c, intrinsics/ishftc.c, intrinsics/mvbits.c,
2806         intrinsics/pack_generic.c, intrinsics/rand.c, intrinsics/random.c,
2807         intrinsics/reshape_generic.c, intrinsics/size.c,
2808         intrinsics/spread_generic.c, intrinsics/stat.c,
2809         intrinsics/string_intrinsics.c, intrinsics/system.c,
2810         intrinsics/system_clock.c, intrinsics/transpose_generic.c,
2811         intrinsics/umask.c, intrinsics/unlink.c, intrinsics/unpack_generic.c,
2812         io/backspace.c, io/close.c, io/endfile.c, io/inquire.c, io/io.h,
2813         io/open.c, io/rewind.c, io/transfer.c, libgfortran.h, m4/cshift1.m4,
2814         m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4,
2815         m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/iforeach.m4,
2816         m4/ifunction.m4, m4/matmul.m4, m4/matmull.m4, m4/nearest.m4,
2817         m4/pow.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4,
2818         m4/transpose.m4, runtime/environ.c, runtime/error.c,
2819         runtime/in_pack_generic.c, runtime/in_unpack_generic.c,
2820         runtime/main.c, runtime/memory.c, runtime/pause.c, runtime/select.c,
2821         runtime/stop.c: Use them to mark symbols internal or external.
2822         * generated/*: Rebuild.
2823
2824 2004-12-09  David Edelsohn  <edelsohn@gnu.org>
2825
2826         PR bootstrap/18895
2827         Revert 2004-12-07 change.
2828         * Makefile.am (AM_MAKEFLAGS): Delete.
2829         * Makefile.in: Regenerate.
2830
2831 2004-12-07  Steve Ellcey  <sje@cup.hp.com>
2832
2833         * libgfortran/Makefile.am (AM_MAKEFLAGS): New.
2834         * libgfortran/Makefile.in: Regenerate
2835
2836 2004-12-07  Steve Ellcey  <sje@cup.hp.com>
2837
2838         * io/io.h (open_external): Change prototype.
2839         * io/unix.c (regular_file): Change prototype and set flags->action if
2840         needed.
2841         (open_external): Ditto.
2842         * io/open.c (new_unit): Let open_external set flags->action.
2843
2844 2004-12-07  Eric Botcazou  <ebotcazou@libertysurf.fr>
2845
2846         * configure.ac: Check for ieeefp.h.  Check for fabsf in libm.
2847         * configure: Regenerate.
2848         * config.h.in: Likewise.
2849         * c99_protos.h: New file.
2850         * libgfortran.h: Include c99_protos.h and conditionally ieeefp.h.
2851         * intrinsics/c99_functions.c (fabsf): New function.
2852
2853 2004-12-06  Richard Henderson  <rth@redhat.com>
2854
2855         * intrinsics/cshift0.c, intrinsics/eoshift0.c, intrinsics/eoshift2.c,
2856         intrinsics/pack_generic.c, intrinsics/string_intrinsics.c,
2857         intrinsics/transpose_generic.c, m4/ifunction.m4, m4/matmul.m4,
2858         m4/matmull.m4, m4/transpose.m4: Use internal_malloc_size instead
2859         of internal_malloc.
2860         * generated/*: Rebuild.
2861
2862 2004-12-06  Richard Henderson  <rth@redhat.com>
2863
2864         * intrinsics/c99_functions.c, intrinsics/eoshift0.c,
2865         intrinsics/eoshift2.c, intrinsics/exit.c, intrinsics/flush.c,
2866         intrinsics/ishftc.c, intrinsics/mvbits.c, intrinsics/pack_generic.c,
2867         intrinsics/random.c, intrinsics/reshape_generic.c, intrinsics/size.c,
2868         intrinsics/spread_generic.c, intrinsics/stat.c,
2869         intrinsics/string_intrinsics.c, intrinsics/system_clock.c,
2870         intrinsics/transpose_generic.c, intrinsics/unlink.c,
2871         intrinsics/unpack_generic.c, io/backspace.c, io/format.c,
2872         io/list_read.c, io/lock.c, io/open.c, io/transfer.c, io/unix.c,
2873         io/write.c, runtime/environ.c, runtime/error.c,
2874         runtime/in_pack_generic.c, runtime/in_unpack_generic.c, runtime/main.c,
2875         runtime/memory.c, runtime/pause.c, runtime/stop.c,
2876         runtime/string.c: Whitespace fixes.
2877
2878 2004-12-06  Richard Henderson  <rth@redhat.com>
2879
2880         * Makefile.am: Generate all m4 output under $(srcdir).
2881         * Makefile.in: Regenerate.
2882
2883 2004-12-02  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2884
2885         PR fortran/18710
2886         * io/transfer.c (unformatted_read, unformatted_write): width of
2887         a COMPLEX is twice its kind.
2888
2889 2004-12-02  Richard Sandiford  <rsandifo@redhat.com>
2890
2891         * configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
2892         * configure, aclocal.m4, Makefile.in: Regenerate.
2893
2894 2004-12-02  Bud Davis  <bdavis9659@comcast.net>
2895
2896         PR libfortran/18284
2897         * io/unix.c (fd_alloc_w_at): Update file_length when extending.
2898         * io/backspace.c (formatted_backspace): Reset endfile after backspace.
2899
2900 2004-12-02  Bud Davis  <bdavis9659@comcast.net>
2901
2902         * io/inquire.c (inquire_via_unit): do not allow a direct access
2903         file to be opened for sequential I/O.
2904
2905 2004-12-02  Steven G. Kargl  <kargls@comcast.net>
2906         Paul Brook  <paul@codesourcery.com>
2907
2908         * intrinsics/flush.c: New file.
2909         * intrinsics/fnum.c: ditto
2910         * intrinsics/stat.c: ditto
2911         * io/io.h (unit_to_fd): Add prototype.
2912         * io/unix.c (unit_to_fd): New function.
2913         * configure.ac: Add test for members of struct stat.  Check for
2914         sys/types.h and sys/stat.h
2915         * Makefile.am: Add intrinsics/{flush.c,fnum.c,stat.c}
2916         * configure.in: Regenerate.
2917         * config.h.in: Regenerate.
2918         * Makefile.in: Regenerate.
2919
2920 2004-12-01  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
2921
2922         * Makefile.am (AM_CPPFLAGS): Use -iquote instead of -I.
2923
2924 2004-11-28  Bud Davis  <bdavis9659@comcast.net>
2925
2926         * io/unix.c (mmap_alloc_w_a): check for a write to a location
2927         less than the mapped area.
2928
2929 2004-11-27  Bud Davis  <bdavis9659@comcast.net>
2930
2931         PR fortran/18364
2932         *  io/endfile.c (st_endfile): flush the stream before truncating.
2933
2934 2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>
2935
2936         * configure: Regenerate for libtool change.
2937
2938 2004-11-22  Steven Bosscher  <stevenb@suse.de>
2939
2940         PR libfortran/15960
2941         * configure.ac: Check for finite in libm.
2942         * libgfortran.h: Define isfinite macro if not defined.
2943         * intrinsics/c99_functions.c: Use defined(fpclassify) instead of
2944         HAVE_FPCLASSIFY.
2945         * io/write.c (write_float): Use isfinite instead of finite.
2946         * configure, config.h.in: Rebuilt.
2947
2948 2004-11-20  Roger Sayle  <roger@eyesopen.com>
2949
2950         * io/write.c (write_float, list_formatted_write): Fix indentation.
2951
2952 2004-11-20  Eric Botcazou  <ebotcazou@libertysurf.fr>
2953
2954         PR target/16135
2955         * acinclude.m4 (LIBGFOR_TARGET_ILP32): New check.
2956         * configure.ac: Include LIBGFOR_TARGET_ILP32.
2957         * configure: Regenerate.
2958         * config.h.in: Likewise.
2959         * libgfortran.h: Provide default definitions for C99 types
2960         on ILP32 targets that don't have them.
2961
2962         PR target/17999
2963         * configure.ac: Check for snprintf.
2964         * configure: Regenerate.
2965         * config.h.in: Likewise.
2966         * intrinsics/date_and_time.c (date_and_time): Do not
2967         use snprinf if it is not available.
2968         * io/write.c (output_float): Likewise.
2969
2970 2004-11-20  Steven G. Kargl  <kargls@comcast.net>
2971
2972         * Makefile.am: Add intrinsics/{umask.c,unlink.c,exit.c}
2973         * Makefile.in: Regenerated
2974         * intrinsics/umask.c: New file
2975         * intrinsics/unlink.c: ditto
2976         * intrinsics/exit.c: ditto
2977
2978 2004-11-18  Victor Leikehman  <lei@il.ibm.com>
2979
2980         * m4/matmul.m4: Loops reordered to improve cache behavior.
2981         * generated/matmul_??.c: Regenerated.
2982
2983 2004-11-10  Paul Brook  <paul@codesourcery.com>
2984
2985         PR fortran/18218
2986         * configure.ac: Check for strtof.
2987         * configure: Regenerate.
2988         * config.h.in: Regenerate.
2989         * io/read.c (convert_real): Use strtof if available.
2990         (convert_precision_real): Remove.
2991         (read_f): Avoid poor exponentiation algorithm.
2992
2993 2004-11-05  Andreas Schwab  <schwab@suse.de>
2994
2995         * configure.ac: Use AC_PROG_FC, FC and FCFLAGS instead of
2996         AC_PROG_F77, F77 and FFLAGS.
2997         * Makefile.am (selected_int_kind.inc, selected_real_kind.inc): Use
2998         FCCOMPILE instead of F77COMPILE.
2999         * configure, Makefile.in: Regenerate.
3000
3001 2004-11-05  Kelley Cook  <kcook@gcc.gnu.org>
3002
3003         * acinclude.m4: Properly quote AC_CACHE_CHECK.
3004         * Makefile.am: Add in ACLOCAL_AMFLAGS.
3005         * aclocal.m4, configure, Makefile.in: Regenerate.
3006
3007 2004-10-30  Aaron W. LaFramboise <aaronavay62@aaronwl.com>
3008
3009         * config.h.in: Regenerate.
3010         * configure: Regenerate.
3011         * configure.ac (AC_CHECK_FUNCS): Add mkstemp.
3012         * io/unix.c (S_IRGRP): Define if undefined.
3013         (S_IWGRP): Same.
3014         (S_IROTH): Same.
3015         (S_IWOTH): Same.
3016         (tempfile): Use mktemp if mkstemp missing, fix typos.
3017
3018 2004-10-30  Aaron W. LaFramboise <aaronavay62@aaronwl.com>
3019
3020         *  intrinsics/system.c ("libgfortran.h"): Move after system headers.
3021
3022 2004-10-30  Canqun Yang  <canqun@nudt.edu.cn>
3023
3024         * intrinsics/rand.c (irand): Handle NULL argument.
3025
3026 2004-10-07  Paul Brook  <paul@codesourcery.com>
3027
3028         * io/transfer.c (finalize_transfer): Free internal streams.
3029         * io/unix.c (mem_close): Free stream object.
3030
3031 2004-10-07  Paul Brook  <paul@codesourcery.com>
3032
3033         * intrinsics/string_intrinsics.c (string_verify): Fix off by one
3034         error.
3035
3036 2004-10-06  Paul Brook  <paul@codesourcery.com>
3037
3038         PR libfortran/17709
3039         * io/transfer.c (data_transfer_init): Reset sf_seen_eor.
3040
3041 2004-10-04  Andrew Pinski  <pinskia@physics.uc.edu>
3042
3043         * intrinsics/mvbits.c: Commit the file.
3044
3045 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3046
3047         PR fortran/17283
3048         * intrinsics/pack_generic.c (__pack): Allocate memory for return array
3049         if not done by caller.
3050         (__pack_s): New function.
3051         * runtime/memory.c (internal_malloc, internal_malloc64): Allow
3052         allocating zero memory.
3053
3054         PR fortran/17631
3055         * Makefile.am (gfor_helper_src): Add intrinsics/mvbits.h.
3056         * Makefile.in: Regenerate.
3057         * intrinsics/mvbits.h: New file.
3058
3059         PR fortran/17776
3060         * intrinsics/system.c: New file.
3061         * Makefile.am: Add dependency for the new file.
3062         * Makefile.in: Regenerate.
3063
3064 2004-10-04  Paul Brook  <paul@codesourcery.com>
3065         Bud Davis  <bdavis9659@comcast.net>
3066
3067         PR fortran/17706
3068         PR fortran/16434
3069         * io/format.c (parse_format_list): Set repeat count for S, SP, SS,
3070         BN and BZ formats.
3071         * io/write.c (output_float): Don't output minus zero.
3072
3073 2004-10-03  Aaron W. LaFramboise <aaronavay62@aaronwl.com>
3074
3075         * intrinsics/abort.c ("libgfortran.h"): Move.
3076         * intrinsics/date_and_time.c ("libgfortran.h"): Same.
3077         * intrinsics/write.c ("libgfortran.h"): Same.
3078
3079 2004-09-26  Tobias Schlueter  <tobis.schlueter@physik.uni-muenchen.de>
3080
3081         PR libfortran/16137
3082         * config.h.in (HAVE_POWF): Undefine.
3083         * configure.ac: Check for 'powf' in library.
3084         * configure: Regenerate.
3085         * intrinsics/c99_functions.c (powf): New function.
3086
3087 2004-09-24  Tobias Schlueter  <tobis.schlueter@physik.uni-muenchen.de>
3088
3089         * intrinsics/etime.c (etime_): New function.
3090
3091 2004-09-21  Steven G. Kargl  <kargls@comcast.net>
3092
3093         * libgfortran.h: define gfc_alloca()
3094         * intrinsics/env.c (getenv, get_environment_variable_i4): Use it.
3095
3096 2004-09-21  Bud Davis  <bdavis9659@comcast.net>
3097
3098         PR fortran/17286
3099         * io/list_read.c (namelist_read): ignore spaces after
3100         the '=' for namelist reads.
3101
3102 2004-09-15  Aaron W. LaFramboise <aaronavay62@aaronwl.com>
3103
3104         * config.h.in: Regenerate.
3105         * configure: Regenerate.
3106         * configure.ac (AC_CHECK_HEADERS): Check for sys/mman.h.
3107         * unix.c: Include stdio.h.
3108         (HAVE_SYS_MMAN_H): Check.
3109         (PROT_READ, PROT_WRITE): Provide default definitions.
3110
3111 2004-09-15  Steven G. Kargl  <kargls@comcast.net>
3112
3113         * intrincics/getcwd.c: New file.
3114         * Makefile.am: Add getcwd.c.
3115         * Makefile.in: Regenerated.
3116
3117 2004-09-15  Steven G. Kargl  <kargls@comcast.net>
3118         Paul Brook  <paul@codesourcery.com>
3119
3120         * intrinsics/env.c (getenv, get_environmental_variable): Remove
3121         trailing white space.  Use alloca.  Honour trim_name.
3122
3123 2004-09-13  Bud Davis  <bdavis9659@comcast.net>
3124
3125         PR fortran/17090
3126
3127         * io/list_read.c (list_formatted_read): Handle trailing spaces
3128         at end of line.
3129
3130 2004-09-06  Steven G. Kargl  <kargls@comcast.net>
3131
3132         * io/write.c (output_float): Typo in comment.  Remove debugging
3133         printf.  Fix format for FP of form 1e10.
3134
3135 2004-09-03  Richard Henderson  <rth@redhat.com>
3136
3137         * intrinsics/cshift0.c (DEF_COPY_LOOP, copy_loop_int, copy_loop_long,
3138         copy_loop_double, copy_loop_ldouble): New.
3139         (__cshift0): Make shift type ssize_t.  Use % operator instead of
3140         div.  Use specialized versions of copy loop depending on the shape.
3141
3142 2004-09-02  Paul Brook  <paul@codesourcery.com>
3143
3144         * io/format.c (parse_format_list): Set repeat count for P descriptors.
3145         * write.c (output_float): Fix condition.  Correctly handle nonzero
3146         scale factor.
3147
3148 2004-09-01  Eric Botcazou  <ebotcazou@libertysurf.fr>
3149
3150         * mk-sik-inc.sh: Use a temporary string instead of 'echo -n'.
3151         * mk-srk-inc.sh: Likewise.
3152
3153 2004-09-01  Paul Brook  <paul@codesourcery.com>
3154
3155         * runtime/error.c (generate_error): Set both iostat and
3156         library_return.
3157
3158 2004-08-31  Paul Brook  <paul@codesourcery.com>
3159
3160         PR libfortran/16805
3161         * io/list_read.c (next_char): Don't signal EOF for internal files.
3162         * io/unix.c (mem_alloc_r_at): Don't return NULL for incomplete reads.
3163
3164 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3165
3166         * io/unit.c: Separate copyright years by ','.
3167         (compare, insert_unit, delete_unit, is_internal_unit, close_units):
3168         Remove blank line in beginning of function.
3169         (get_unit): Simplify code.
3170
3171 2004-08-31  Paul Brook  <paul@codesourcery.com>
3172
3173         * io/unit.c (get_unit): Remove superfluous if.
3174
3175 2004-08-31  Paul Brook  <paul@codesourcery.com>
3176
3177         * io/transfer.c (read_sf): Rename uinty to readlen.  Detect EOF.
3178         (finalize_transfer): Move setjmp after namlist IO.
3179         * io/unix.c (mem_alloc_r_at): Calculate remaining length correctly.
3180
3181 2004-08-31  Paul Brook  <paul@codesourcery.com>
3182
3183         * list_read.c (eat_separator): Set at_eo when a '/' is seen.
3184
3185 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3186
3187         * libgfortran.h: Replace 'gfc_strlen_type' by
3188         'gfc_charlen_type'. Update comment accordingly.
3189         * intrinsics/args.c, intrinsics/env.c, io/io.h, io/transfer.c:
3190         Replace all occurences of 'gfc_strlen_type' by 'gfc_charlen_type'.
3191
3192 2004-08-31  Paul Brook  <paul@codesourcery.com>
3193
3194         * libgfortran.h: Add comments.
3195
3196 2004-08-30  Richard Henderson  <rth@redhat.com>
3197
3198         * Makefile.am (gfor_helper_src): Split selected_kind.f90.
3199         (gfor_built_src): Add selected_int_kind.inc selected_real_kind.inc.
3200         (selected_int_kind.inc selected_real_kind.inc): New rules.
3201         * Makefile.in: Regenerate.
3202         * mk-sik-inc.sh, mk-srk-inc.sh: New files.
3203         * intrinsics/selected_int_kind.f90: Split from selected_kind.f90,
3204         include table of detected kinds.
3205         * intrinsics/selected_real_kind.f90: Similarly.
3206
3207 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
3208         Paul Brook  <paul@codesourcery.com>
3209
3210         * intrinsics/bessel.c: New file.
3211         * intrinsics/erf.c: New file.
3212         * Makefie.am: Add intrinsics/bessel.c and intrinsics/erf.c.
3213         * configure.ac: Test for C99 Bessel and Error functions.
3214         * Makefile.in: Regenerate.
3215         * config.h.in: Regenerate.
3216         * configure: Regenerate.
3217
3218 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
3219         Paul Brook  <paul@codesourcery.com>
3220
3221         * Makefile.am: Add intrinsics/getXid.c.
3222         * configure.ac: Add tests for get{g,p,u}id.
3223         * config.h.in: Regenerate.
3224         * Makefile.in: Regenerate.
3225         * configure: Regenerate.
3226
3227 2004-08-28  Paul Brook  <paul@codesourcery.com>
3228
3229         PR libfortran/17195
3230         * libgfortran.h (rtoa): Remove prototype.
3231         * runtime/error.c (rtoa): Remove.
3232         * io/write.c (calculate_G_format): Don't add blanks if E format is
3233         used.  Add correct number of blanks when exponent width is specified.
3234         (output_float): Rewrite.
3235
3236 2004-08-27  Paul Brook  <paul@codesourcery.com>
3237
3238         * io/rewind.c (st_rewind): Reset unit to read mode.
3239
3240 2004-08-27  Bud Davis  <bdavis9659@comcast.net>
3241
3242         PR fortran/16597
3243         * io/io.h: created typedef for unit_mode.
3244         * io/io.h (gfc_unit): added mode to unit structure.
3245         * io/transfer.c (data_transfer_init): flush if a write then
3246         read is done on a unit (direct access files).
3247         * io/rewind.c (st_rewind): Used unit mode instead of global.
3248
3249 2004-08-24  Bud Davis  <bdavis9659@comcast.net>
3250
3251         PR fortran/17143
3252         * runtime/error.c (itoa): keep from overflowing during
3253         mod operation by using unsigned variable.
3254
3255 2004-08-24  Bud Davis  <bdavis9659@comcast.net>
3256
3257         PR fortran/17164
3258         * runtime/string_intrinsics.c (string_index):check for
3259         substring longer than string.
3260
3261 2004-08-24  David Edelsohn  <edelsohn@gnu.org>
3262
3263         * Makefile.am (libgfortran_la_LDFLAGS): Add -lm.
3264         * Makefile.in: Rebuilt.
3265
3266 2004-08-23  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3267
3268         * io/io.h, io/list_read.c, io/open.c, io/transfer.c, io/write.c:
3269         Fix formatting issues, update copyright years.
3270
3271 2004-08-21  Bud Davis  <bdavis9659@comcast.net>
3272
3273         PR 16908
3274         * io/transfer.c (next_record_w): Do not blank pad.
3275         * io/transfer.c (next_record): Take into account partial records.
3276
3277 2004-08-18  Victor Leikehman  <lei@il.ibm.com>
3278
3279         PR fortran/13278
3280         * io/transfer.c (st_set_nml_var)
3281         * io/write.c (namelist_write): Allow var_name and var_name_len to be
3282         null. For strings, use string_length field instead of len.
3283         * io/io.h (struct namelist_type): New field string_length.
3284         (st_set_nml_var_char): New argument string_length.
3285
3286 2004-08-13  Bud Davis  <bdavis9659@comcast.net>
3287
3288         PR gfortran/16935
3289         * io/open.c (st_open): use flags instead of the unit structure.
3290
3291 2004-08-10  Victor Leikehman  <lei@il.ibm.com>
3292
3293         * io/list_read.c (namelist_read): Convert variable names
3294         to lower case, so that mixed-case names are recognized.
3295         Don't read beyond terminating slash.
3296
3297 2004-08-09  Richard Henderson  <rth@redhat.com>
3298             Roger Sayle  <roger@eyesopen.com>
3299
3300         * intrinsics/c99_functions.c (nextafterf): New implementation that
3301         works correctly with denormalized numbers.
3302
3303 2004-08-09  Victor Leikehman  <lei@il.ibm.com>
3304
3305         * m4/matmul.m4, m4/matmull.m4, intrinsics/eoshift0.c,
3306         intrinsics/eoshift2.c, intrinsics/transpose_generic.c:
3307         Allocate space if return value has NULL in its data field.
3308         * generated/*.c: Regenerate.
3309
3310 2004-08-06  Janne Blomqvist  <jblomqvi@cc.hut.fi>
3311
3312         * intrinsics/env.c: New file.
3313         * Makefile.am: Add env.c to build.
3314         * Makefile.in: Regenerate.
3315
3316 2004-08-05  Victor Leikehman  <lei@il.ibm.com>
3317
3318         PR libgfortran/16704
3319         * io/read.c (read_radix): Understand letters f and F as hex digits.
3320
3321 2004-08-04  Victor Leikehman  <lei@il.ibm.com>
3322
3323         * libgfortran.h (array_t, size0) New declarations.
3324         * m4/ifunction.m4, m4/transpose.m4, intrinsics/cshift0.c: Allocate
3325         space if return value descriptor has NULL in its data field,
3326         and initialize bounds and stride.
3327         * intrinsics/size.c (array_t, size0): Declarations moved to
3328         libgfortran.h.
3329         * generated/*.c: Regenerate.
3330
3331 2004-08-03  Roger Sayle  <roger@eyesopen.com>
3332
3333         PR libgfortran/16137
3334         * configure.ac: Add tests for acosf, asinf, atan2f, atanf, ceilf,
3335         copysignf, cosf, coshf, expf, floorf, frexpf, hypotf, logf, log10f,
3336         scalbnf, sinf, sinhf, sqrtf, tanf and tanhf in libm.
3337         * config.h.in: Regenerate.
3338         * configure: Regenerate.
3339
3340         * instrinsics/c99_functions.c (acosf, asinf, atan2f, atanf, ceilf,
3341         copysignf, cosf, coshf, expf, floorf, frexpf, hypotf, logf, log10f,
3342         nextafterf, scalbnf, sinf, sinhf, sqrtf, tanf, tanhf): New stub
3343         implementations for targets that don't support C99 float functions.
3344
3345 2004-08-01  Roger Sayle  <roger@eyesopen.com>
3346
3347         * io/write.c (write_float): Use the slightly more portable isnan
3348         in preference to isinf.
3349
3350 2004-07-18  Bud Davis  <bdavis9659@comcast.net>
3351
3352         * configure.ac: Add check for LFS support.
3353         * configure: Regenerate
3354
3355 2004-07-11  Paul Brook  <paul@codesourcery.com>
3356
3357         PR fortran/16303
3358         * m4/cexp.m4 (carg): Return -pi to pi.
3359         * generated/exp_c?.c: Regenerate.
3360
3361 2004-07-08  Andreas Krebbel  <krebbel1@de.ibm.com>
3362
3363         PR fortran/16291
3364         * libgfortran/io/write.c: (write_float): Added length check.
3365         Remove pointless memset calls.
3366
3367 2004-07-04  Bud Davis  <bdavis9659@comcast.net>
3368             Paul Brook  <paul@codesourcery.com>
3369
3370         PR fortran/15472
3371         * io/transfer.c(us_write): set recl for seq unform writes to max size.
3372         * io/transfer.c(data_transfer_init): handle un-opened seq unform unit.
3373         * io/unix.c(fd_alloc_w_at): handle requests at start, fd_flush at
3374         right time.
3375         * io/unix.c(is_seekable): set based upon the file/device, not the
3376         method being used to access it (fd or mmap).
3377         * io/unix.c(fd_flush): don't set file_size if !seekable.
3378         * io/unix.c(fd_truncate: ditto.
3379
3380 2004-07-04  Janne Blomqvist  <jblomqvi@cc.hut.fi>
3381         Paul Brook  <paul@codesourcery.com>
3382
3383         PR fortran/15280
3384         PR fortran/15665
3385         * libgfortran.h (gfc_strlen_type): Define.
3386         * intrinsics/args.c (getarg): Rename ...
3387         (getarg_i4): ... to this.
3388         (getarg_i8, get_command_argument_i4, get_command_argument_i8,
3389         get_command_i4, get_command_i8): New functions.
3390
3391 2004-07-04  Matthias Klose  <doko@debian.org>
3392
3393         * libtool-version: New.
3394         * Makefile.am (libgfortran_la_LDFLAGS): Use -version-info for soname.
3395         * Makefile.in: Regenerate.
3396         * configure.ac: Remove libtool_VERSION macro
3397         * configure: Regenerate
3398
3399 2004-06-30  Steve Kargl  <sgk@troutmask.apl.washington.edu>
3400             Steven Bosscher  <stevenb@suse.de>
3401
3402         * intrinsics/rand.c (rand): Wrap the irand() call from the previous
3403         commit in prefix.
3404
3405 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3406         Paul Brook  <paul@codesourcery.com>
3407
3408         * runtime/normalize.c (normalize_r4_i4, normalize_r8_i8): Fix
3409         comments.
3410         * intrinsics/rand.c (rand): Call irand() in call to normalize_r4_i4.
3411
3412 2004-06-27  Bud Davis  <bdavis9659@comcast.net>
3413
3414         PR gfortran/12839
3415         * io/write.c (write_float): check signbit for Infinity.
3416
3417 2004-06-26  Bud Davis  <bdavis9659@comcast.net>
3418
3419         PR gfortran/16196
3420         * unix.c(regular_file): create file if it does not exist.
3421
3422 2004-06-24  Andrew Pinski  <apinski@apple.com>
3423
3424         * configure.ac: Remove check for libmx.
3425         * configure: Regenerate.
3426
3427 2004-06-22  Janne Blomqvist  <jblomqvi@cc.hut.fi>
3428
3429         PR fortran/15750
3430         * inquire.c (st_inquire): Add comment
3431         * io.h (st_parameter): Add iolength.
3432         (st_iolength, st_iolength_done): Declare.
3433         * transfer.c (iolength_transfer, iolength_transfer_init,
3434         st_iolength, st_iolength_done): New functions.
3435
3436 2004-06-21  Steven G. Kargl  <kargls@comcast.net>
3437
3438         * etime.c (etime_sub): Remove array rank check;
3439         Add check for sufficient space.
3440
3441 2004-06-19  Bud Davis  <bdavis9659@comcast.net>
3442
3443         PR gfortran/16080
3444         * io/list_read.c(set_value): fixed spelling.
3445
3446 2004-06-19  Bud Davis  <bdavis9659@comcast.net>
3447
3448         PR gfortran/16080
3449         * io/list_read.c(set_value): don't copy if the string is null.
3450
3451 2004-06-14  Bud Davis  <bdavis9659@comcast.net>
3452
3453         PR gfortran/15292
3454         * intrinsics/c99_functions.c: Use fpclassify if it exists.
3455
3456 2004-06-13  Paul Brook  <paul@codesourcery.com>
3457
3458         * Makefile.am (gfor_helper_src): Add runtime/normalize.f90.
3459         * configure.ac: Add checks for nextafter and nextafterf.
3460         * Makefile.in, config.h.in, configure: Regenerate.
3461         * libgfortran.h (normalize_r4_i4, normalize_r8_i8): Declare.
3462         * intrinsics/rand.c (rand): Use normalize_r4_i4.
3463         * intrinsics/random.c (random_r4): Use normalize_r4_i4.
3464         (random_r8): Use normalize_r8_i8.
3465         * runtime/normalize.c: New file.
3466
3467 2004-06-13  Steven G. Kargl  <kargls@comcast.net>
3468             Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3469
3470         * random.c: Fix several spelling and formatting mistakes in
3471         comments.
3472         (random_r8): Fix loop to make random numbers range in [0,1(.
3473
3474
3475 2004-06-13  Steven G. Kargl  <kargls@comcast.net>
3476
3477         * random.c (random_r4): Burn a random number.
3478         (random_r8): fix infinite loop.
3479
3480 2004-06-12  Bud Davis  <bdavis9659@comcast.net>
3481             Steve Kargl  <sgk@troutmask.apl.washington.edu>
3482
3483         PR gfortran/15292
3484         * intrinsics/c99_functions.c: New file.
3485         * Makefile.am: Add new file.
3486         * configure.ac: Added test for round/roundf.
3487         * Makefile.in: Regenerate.
3488         * configure: Regenerate.
3489         * configure.h.in: Regenerate.
3490
3491 2004-06-12  Steven G. Kargl  <kargls@comcast.net>
3492
3493         * Makefile.am: Add rand.c and etime.c
3494         * Makefile.in: Regenerated.
3495         * aclocal.in: Regenerated.
3496         * cpu_time.c (second_sub, second): New functions.
3497         * rand.c (irand, rand, srand): New file.
3498         * etime.c (etime_sub, etime): New file.
3499
3500 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3501             Steven Bosscher  <stevenb@suse.de>
3502
3503         PR fortran/14923
3504         * intrinsics/date_and_time.c: New file.
3505         * Makefile.am (gfor_helper_src): Add intrinsics/date_and_time.c.
3506         * Makefile.in, aclocal.m4: Regenerate.
3507         * libgfortran.h: Prototype date_and_time().
3508
3509 2004-06-12  Bud Davis  <bdavis9659@comcast.net>
3510
3511         PR fortran/15665
3512         * intrinsics/args.c: Implement GETARG and IARGC.
3513         * Makefile.am: Add it.
3514         * Makefile.in: Regenerate.
3515
3516 2004-06-12  Bud Davis  <bdavis9659@comcast.net>
3517
3518         PR gfortran/12839
3519         * io/write.c(write_float): Format inf and nan IAW F2003.
3520
3521 2004-06-09  Bud Davis  <bdavis9659@comcaste.net>
3522
3523         PR gfortran/14897
3524         * io/transfer.c (formatted_transfer): position is unique
3525          for T and TL edit descriptors.
3526         (data_transfer_init): set record length to size of internal
3527          file.
3528
3529 2004-06-09  Bud Davis  <bdavis9659@comcast.net>
3530
3531         PR gfortran/15755
3532         * io/backspace.c(st_backspace): call correct routine for
3533         formatted and un-formatted units.
3534
3535 2004-05-30  Andreas Jaeger  <aj@suse.de>, Steven Bosscher <stevenb@suse.de>
3536
3537         PR gfortran/11800
3538         * Makefile.am (AM_CPPFLAGS): Renamed from INCLUDES.
3539         (lib_LTLIBRARIES): Rename to ...
3540         (toolexeclib_LTLIBRARIES): this for multilib support.
3541         * configure.in: Rename to ...
3542         * configure.ac: this.  Update to modern autoconf style, enable
3543         multilibs, support --enable-version-specific-runtime-libs.
3544         * Makefile.in: Regenerated.
3545         * configure: Regenerated.
3546         * aclocal.m4: Regenerated.
3547
3548 2004-05-30  Steven G. Kargl  <kargls@comcast.net>
3549
3550         * libgfortran.h (random_seed): Update prototype.
3551         * intrinsics/random.c: Disable old implementation and add new one.
3552
3553 2004-05-30  Andreas Jaeger  <aj@suse.de>
3554
3555         * intrinsics/random.c: Include unistd.h for close and read
3556         prototypes, remove unneeded inclusion of assert.h.
3557
3558         * intrinsics/abort.c: Include stdlib.h for abort prototype, remove
3559         unneeded inclusion of assert.h.
3560
3561 2004-05-27  Tobias Schlueter  <tobias.shclueter@physik.uni-muenchen.de>
3562
3563         PR fortran/15234
3564         * intrinsics/associated.c: Remove enum.
3565         (associated): Replace TRUE/FALSE by 1/0.
3566
3567 2004-05-23  Steven G. Kargl  <kargls@comcast.net>
3568
3569         * random.c (random_seed): Use correct variable.
3570
3571 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
3572
3573         * intrinsics/system_clock: New file.
3574         * Makefile.am: Add intrinsics/system_clock.c.
3575         * Makefile.in: Regenerate.
3576
3577 2004-05-21  Roger Sayle  <roger@eyesopen.com>
3578
3579         * io/format.c (parse_format_list): Allow the comma after a string
3580         literal to be optional.
3581
3582 2004-05-18  Paul Brook  <paul@codesourcery.com>
3583         Feng Wang  <fengwang@nudt.edu.cn>
3584
3585         * Makefile.am (i_pow_c): Set it. Add build rule.
3586         (gfor_built_src): Use it.
3587         (m4_files): add m4/pow.m4.
3588         * Makefile.in: Regenerate.
3589         * m4/pow.m4: New file.
3590         * generated/pow_*.c: Regenerate.
3591
3592 2004-05-18  Paul Brook  <paul@codesourcery.com>
3593
3594         * Makefile.am: Remove references to types.m4.
3595         * m4/iparm.m4: Merge with types.m4.
3596         * m4/types.m4: Remove.
3597         * m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4,
3598         m4/eoshift1.m4, m4/eoshift3.m4, m4/iforeach.m4, m4/ifunction.m4,
3599         m4/in_pack.m4, m4/in_unpack.m4, m4/iparm.m4, m4/matmul.m4,
3600         m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4,
3601         m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/reshape.m4,
3602         m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/transpose.m4):
3603         Update to use new iparm.m4.
3604         * generated/*.c: Regenerate.
3605
3606 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3607
3608         PR fortran/15235
3609         * gfortran.h (offset_t): Rename to ...
3610         (gfc_offset): ... this.
3611         * io/backspace.c (formatted_backspace, unformatted_backspace),
3612         io/io.h (stream, gfc_unit, global_t, file_length, file_position),
3613         transfer.c (us_read, us_write, next_record_r, next_record_w),
3614         io/unit.c (init_units), unix.c (unix_stream, fd_alloc,
3615         fd_alloc_r_at, fd_alloc_w_at, fd_seek, mmap_alloc,
3616         mmap_alloc_r_at, mmap_alloc_w_at, mmap_seek, mem_alloc_r_at,
3617         mem_alloc_w_at, mem_seek, file_length, file_position): Replace all
3618         occurences of offset_t by gfc_offset.
3619
3620 2004-05-16  Paul Brook  <paul@codesourcery.com>
3621
3622         * io/format.c (write_real): Don't include padding in format.
3623
3624 2004-05-16  Paul Brook  <paul@codesourcery.com>
3625
3626         * io/format.c (format_lex): Make c an int.
3627
3628 2004-05-16  Janne Blomqvist  <jblomqvi@cc.hut.fi>
3629         Paul Brook  <paul@codesourcery.com>
3630
3631         * io/write.c (write_logical): Don't print extra blank.
3632         (write_integer): Base field width on kind.
3633         (list_formatted_write): Output initial blank.
3634
3635 2004-05-16  Janne Blomqvist  <jblomqvi@cc.hut.fi>
3636
3637         * io/io.h (flush): Add prototype.
3638         * io/transfer.c (finalize_transfer): Flush partial records.
3639         * io/unix.c (flush): New function.
3640
3641 2004-05-15  Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3642
3643         PR fortran/15234
3644         * io/io.h (unit_t): Rename to ...
3645         (gfc_unit) ... this.
3646         (unit_root, current_unit, find_file, find_unit, get_unit): Now
3647         of type gfc_unit.
3648         (delete_file, insert_unit, close_unit): Argument now of type
3649         gfc_unit.
3650         * backspace.c (st_backspace), close.c (st_close), endfile.c
3651         (st_endfile), inquire.c (inquire_via_unit, st_inquire), open.c
3652         (test_endfile, edit_modes, new_unit, already_open, st_open),
3653         rewind.c (st_rewind), transfer.c (current_unit), unit.c
3654         (internal_unit, unit_cache, rotate_left, rotate_right, insert,
3655         insert_unit, delete_root, delete_treap, delete_unit, find_unit,
3656         get_unit, init_units, close_unit), unix.c (find_file0,
3657         find_file, delete_file): Replace all occurences of unit_t by
3658         gfc_unit.
3659
3660 2004-05-15  Bud Davis  <bdavis9659@comcast.net>
3661
3662         PR fortran/15311
3663         * io/write.c (write_a): right justify A edit output.
3664
3665 2004-05-14  Bud Davis  <bdavis9659@comcast.net>
3666
3667         PR fortran/15149
3668         * libgfortan.h,intrinsics/random.c: Made random_seed visible.
3669         * runtime/main.c(init): Call random_seed as part of MAIN init.
3670
3671 2004-05-13  Tobias Schlter  <tobias.schlueter@physik.uni-muenchen.de>
3672
3673         * io/format.c: (parse_format_list): No comma is required after
3674         P descriptor.
3675
3676 2004-05-13  Bud Davis  <bdavis9659@comcast.net>
3677
3678         PR fortran/15204
3679         * io/intrinsic/string_intrinsics.c (adjustr): rework logic.
3680
3681 2004-05-06  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3682             Steven Bosscher  <stevenb@suse.de>
3683
3684         PR libfortran/15234
3685         * libgfortran.h: Include <inttypes.h> if available.
3686
3687 2004-05-03  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3688
3689         * io/unix.c (MAP_FAILED): Define if missing.
3690         (mmap_alloc): Cast MAP_FAILED to char *.
3691         (mmap_open): Likewise.
3692
3693 2004-04-26  Bud Davis  <bdavis9659@comcast.net>
3694
3695         * generated/_abs_i8.f90: New file.
3696         * generated/_abs_c4.f90: New file.
3697         * generated/_abs_c8.f90: New file.
3698         * Makefile.am: Add them.
3699         * Makefile.in: Regenerate.
3700 `
3701 2004-04-26  Bud Davis  <bdavis9659@comcast.net>
3702
3703         PR fortran/14056
3704         * generated/_abs_i4.f90: New file.
3705         * Makefile.am: Add it.
3706         * Makefile.in: Regenerate.
3707
3708 2004-04-25  Bud Davis  <bdavis9659@comcast.net>
3709
3710         PR fortran/14942
3711         * io/list_read.c(list_formatted_read): finish consuming the
3712         spaces and seperators at eoln to get ready for next item.
3713
3714 2004-04-23  Bud Davis  <bdavis9659@comcast.net>
3715
3716         PR fortran/15113
3717         * io/read.c(read_a): Handle field width > destination and no field width.
3718
3719 2004-04-22  Bud Davis  <bdavis9659@comcast.net>
3720
3721         PR fortran/14906
3722         * io/format.c (format_item): gracefully handle a ')'
3723         when it is the first character encountered in the string.
3724
3725 2004-04-11  Bud Davis  <bdavis9659@comcast.net>
3726
3727         PR fortran/14904
3728         * io/transfer.c (next_record): Update last_record when
3729         more than one record is written to a direct access file
3730         with one write statement.
3731
3732 2004-04-11  Bud Davis  <bdavis9659@comcast.net>
3733
3734         PR fortran/14901
3735         * io/transfer.c (next_record_w) : No '\n' if internal.
3736         * io/unix.c (empty_internal_buffer) : Init to spaces, not '\n'.
3737
3738 2004-04-11  Bud Davis  <bdavis9659@comcast.net>
3739
3740         * io.h (ioparm): Interface from FE is 32 bit, irregardless of offset_t.
3741         Will need to change this later to support direct access files > 2gb.
3742
3743 2004-04-03  Bud Davis  <bdavis9659@comcast.net>
3744
3745         PR gfortran/14762
3746         * io/transfer.c (next_record_r) : Skip to next record.
3747
3748 2004-04-03  Bud Davis  <bdavis9659@comcast.net>
3749
3750         PR gfortran/14836
3751         * io/transfer.c (next_record): Update last_record for DIRECT
3752
3753 2004-04-03  Bud Davis  <bdavis9659@comcast.net>
3754
3755         PR gfortran/14837
3756         * io/unix.c (find_file0): Use fd field of struct
3757
3758 2004-04-03  Bud Davis  <bdavis9659@comcast.net>
3759
3760         PR 14831
3761         * io/inquire.c (inquire_via_unit): Changed return string for
3762         BLANK=NULL. Use correct variable for ACTION.
3763
3764 2004-04-01  Bud Davis  <bdavis9659@comcast.net>
3765
3766         PR 14746
3767         * io/read.c (read_f): Allow a decimal without a leading digit.
3768         * io/write.c (output_float): remove a leading '0' to keep from
3769         overflowing the field (F edit descriptor).
3770
3771 2004-04-01  Bud Davis  <bdavis9659@comcast.net>
3772
3773         PR gfortran/14565
3774         * io/open.c (new_unit),
3775         * io/io.h : new_unit is now visible
3776         * io/transfer.c (data_transfer_init): open unit if no OPEN statement.
3777         * io/transfer.c (data_transfer_init): remove compile warnings.
3778         * io/rewind.c (st_rewind): ftruncate if writing.
3779
3780 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
3781
3782         * write.c (write_l): Use extract_int for 'L' edit descriptor.
3783
3784 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
3785
3786         PR 13919
3787         * io/io.h (global_t):
3788         * io/list_read.c (next_char,list_formatted_read,ist_formatted_read):
3789           Move eof_jmp to a global structure.
3790         * io/transfer.c(finalize_transfer) : Set up eof_jump for callers.
3791
3792 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
3793
3794         * m4/cexp.m4 (csqrt): Actually use the passed value.
3795         * generated/exp_c?.c: Regenerate.
3796
3797 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
3798
3799         PR 12921
3800         * io.h, transfer.c, open.c : recl_in changed from ptr to variable.
3801         * open.c (new_unit): Moved test for positioned direct access error.
3802         (init_units): Corrected calculation of max records.
3803
3804 2004-02-06  Feng Wang  <fengwang@nudt.edu.cn>
3805
3806         * Makefile.am: Add m4/dotprodc.m4. And fix spelling.
3807         * Makefile.in: Regenerate.
3808         * m4/dotprodc.m4: New file. Implement complex dot_product.
3809         * m4/dotprod.m4: Delete the complex implementation.
3810         * generated/dotprod_*: Update.
3811
3812 2004-02-07  Bud Davis  <bdavis9659@comcast.net>
3813
3814         * transfer.c (write_constant_string): Do not delete H's in hollerith
3815         formats.
3816
3817 2004-01-05  Andrew Pinski  <apinski@apple.com>
3818
3819         * configure.in: Check for csin in -lmx also.
3820         * configure: Regenerate.
3821
3822 2004-01-01  Paul Brook  <paul@codesourcery.com>
3823
3824         * io/list_read.c (find_nml_node): Make static.
3825         (match_namelist_name): Ditto.
3826         * io/read.c (convert_precision_real): Make static, fix spelling.
3827         * io/transfer.c (extract_real): Remove unused prototype.
3828         (st_set_nml_var): Make static.
3829         * io/write.c (extract_real): Make static.
3830
3831 2003-12-12  Huang Chun <chunhuang73@hotmal.com>
3832
3833         * intrinsics/string_intrinsics.c (string_index): Fix logics thinko.
3834
3835 2003-12-05  Melvin Hadasht  <melvin.hadasht@free.fr>
3836
3837         * io/transfer.c (data_transfer_init): Give a runtime error for list
3838         formatted reads and writes from/to files opened for unformatted IO.
3839
3840 2003-11-30  Paul Brook  <paul@nowt.org>
3841
3842         * runtime/memory.c (push_context): Remove.
3843         (pop_context): Remove.
3844         * libgfortran.h: Remove prototypes.
3845
3846 2003-11-27  Paul Brook  <paul@nowt.org>
3847
3848         * runtime/memory.c (deallocate): Nullify pointer after freeing.
3849
3850 2003-11-27  Paul Brook  <paul@nowt.org>
3851
3852         * intrinsics/string_intrinsics.c: Use new memory allocation interface.
3853         * libgfortran.h: Ditto.
3854         * m4/in_pack.m4: Ditto.
3855         * runtime/in_pack_generic.c: Ditto.
3856         * runtime/memory.c: Ditto.
3857
3858 2003-11-26  Richard Henderson  <rth@redhat.com>
3859
3860         * m4/exponent.m4, m4/fraction.m4: New.
3861         * m4/nearest.m4, m4/set_exponent.m4: New.
3862         * generated/*: Update.
3863         * Makefile.am: Add them.
3864         (AM_CFLAGS): New.  Use -std=gnu99.
3865         * Makefile.in: Regenerate.
3866
3867 2003-11-08  Paul Brook  <paul@nowt.org>
3868
3869         PR fortran/12704
3870         * m4/maxloc0.m4: Use default value of 1. Handle zero sized arrays.
3871         * m4/maxloc1.m4: Ditto.
3872         * m4/minloc0.m4: Ditto.
3873         * m4/minloc1.m4: Ditto.
3874         * m4/ifunction.m4: Set return value for zero sized arrays.
3875         * m4/iforeach.m4: Ditto.
3876         * m4/all.m4, m4/any.m4, m4/count.m4, m4/maxloc1.m4, m4/minloc1.m4,
3877         m4/mxaval.m4, m4/minval.m4, m4/product.m4, m4/sum.m4: Ditto.
3878         * generated/*: Update.
3879
3880 2003-10-30  Toon Moene  <toon@moene.indiv.nluug.nl>
3881
3882         PR fortran/12702
3883         * io/list_read.c (eat_spaces): Treat tab as space.
3884
3885 2003-10-30  Lars Segerlund  <Lars.Segerlund@comsys.se>
3886
3887         * intrinsics/random.c: Add reference to paper containing algorithm.
3888         (random_seed): Extra error checking and proper handling of arrays.
3889         (arandom_r4, arandom_r8): Implement.
3890
3891 2003-10-29  Toon Moene  <toon@moene.indiv.nluug.nl>
3892
3893         PR fortran/12703
3894         * runtime/memory.c (allocate_size): Allow allocation
3895         of zero-sized objects.
3896
3897 2003-10-29  Toon Moene  <toon@moene.indiv.nluug.nl>
3898
3899         PR fortran/12701
3900         * open.c (new_unit): Open without a file name opens
3901         a file with name fort.<unit>.
3902
3903 2003-10-12  Feng Wang  <wf_cs@yahoo.com>
3904
3905         * intrinsics/cshift0.c: New file.
3906         * m4/cshift1.m4: New file
3907         * generated/cshift*.c: New files.
3908         * Makefile.am: Add them.
3909         * Makefile.in: Regenerate.
3910
3911 2003-10-12  XiaoQiang Zhang  <zhangapache@yahoo.com>
3912
3913         * io/list_read.c (read_character): Remove unwanted call to free_saved.
3914
3915 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
3916
3917         * intrinsics/string_intrinsics.c (string_trim): New function.
3918         (string_repeat): New function.
3919
3920 2003-10-11  Paul Brook  <paul@nowt.org>
3921
3922         * intrinsics/dprod_r8.f90: New file.
3923         * Makefile.am (gfor_specific_src): Add it.
3924         (gfor_built_specific_src): Rename from gfor_build_specific_c.
3925         Add new intrinsics.
3926         (gfor_specific2_src): Rename from gfor_built_specific2_c.
3927         Add new intrinsics.
3928         * Makefile.in: Regenerate.
3929         * generated/_aint_*.f90: New files.
3930         * generated/_anint*.f90: New files.
3931         * generated/_atan2*.f90: New files.
3932         * generated/_mod*.f90: New files.
3933
3934 2003-09-20  Kejia Zhao  <kejia_zh@yahoo.com.cn>
3935
3936         * intrinsics/selected_kind.f90: New file.
3937         * Makefile.am: Add it.
3938         * Makefile.in: regenerate.
3939
3940 2003-09-19  Lars Segerlund  <Lars.Segerlund@comsys.se>
3941         Paul Brook  <paul@nowt.org>
3942
3943         * intrinsics/random.c: New file.
3944         * Makefile.am (gfor_hemper_src): Add it.
3945         (gfor_specific_c): Fix typo.
3946
3947 2003-09-19  Paul Brook  <paul@nowt.org>
3948
3949         * All: rename g95->gfc.
3950
3951 2003-09-18  XiaoQiang Zhang  <zhangapache@yahoo.com>
3952
3953         * io/write.c (output_float): Fix bug of FMT_E, Add comments.
3954
3955 2003-09-09  XiaoQiang Zhang  <zhangapache@yahoo.com>
3956
3957         * io/write.c (write_float): Dectection of positive infinite number,
3958         Not a Number(NaN) and negative infinite number.
3959         (ioutput_float): Bug fix for FMT_E and FMT_D processing to
3960         output a very_very small number ( < 0.1e-100 ).
3961
3962 2003-09-07  XiaoQiang Zhang  <zhangapache@yahoo.com>
3963
3964         * libgfortran.h (xtoa, itoa): Parameter modified.
3965         * io/io.h (namelist_info): Declaration to support namelist I/O
3966         (st_parameter): Add namelist related component
3967         (ionml, empty_internal_buffer, st_set_nml_var_int,
3968         st_set_nml_var_float, st_set_nml_var_char, st_set_nml_var_complex,
3969         st_set_nml_var_log): Declaration
3970         (set_integer, set_integer): Parameter changed
3971         * io/format.c (free_nodes): Fix annoying bug of lefting "deallocated"
3972          fnodes
3973         (parse_format_list): Fix bug about FMT_SLASH
3974         * io/list_read.c (push_char): Totally clear old saved_string, zeroize
3975         newly allocated saved_string
3976         (next_char): Add detection of End_Of_Line support
3977         (convert_integer): Now can process 64 bits interger
3978         (read_real): Bug fixed
3979         (init_at_eol, find_nml_node, match_namelist_name): Add new functions
3980         (match_namelist_name): New implemention
3981         * io/lock.c (ionml): New global variable
3982         (library_end): Free memory in ionml
3983         * io/open.c (st_open): Variable initializtion
3984         * io/read.c (max_value): 64 bits interger support
3985         (convert_precsion_real): New procedure to replace "strtod" with more
3986          features
3987         (read_f, read_radix): Input bug fix
3988         * io/transfer.c: (sf_seen_eor): New static variable
3989         (read_sf): Zeroize base buffer; fix bugs: single read statement can
3990         not get input in mutli line when read from stdin
3991         (formatted_transfer): Fix bug of FMT_O, FMT_B, FMT_Z for INTEGER type
3992          request
3993         (data_transfer_init): Clear internal buffer for Internel File I/O.
3994         Internal File now worked. Detect some error condition for namelist.
3995         Some minor bug fix
3996         (next_record_w): Internal file and Namelist I/O support.
3997         (st_set_nml_var, st_set_nml_var_float, st_set_nml_var_char,
3998         st_set_nml_var_complex, st_set_nml_var_log): Implemention.
3999         * io/unit.c (implicit_unit): Deletion
4000         (get_unit): Now cannot open a unit implicitly.
4001         * io/unix.c (mmap_alloc): Fix fatal error in calculating the length of
4002         mapped buffer.
4003         (mem_alloc_r_at): Internal file I/O support added
4004         (empty_internal_buffer): New function
4005         * io/write.c (extract_int): Support 64 bits interger processing
4006         (output_float): Varibale initialization
4007         (write_float): Infinite real number detection.
4008         (write_int): 64 bits integer I/O support
4009         (write_decimal): New function to output decimal number
4010         (otoa, btoa): Better implemention and 64 bits interger support
4011         (namelist_write): New function
4012         * runtime/error.c (itoa, xtoa): Better implemention and 64 bits
4013         interger support
4014
4015 2003-08-15  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4016
4017         * libgfortran.h (os_error, runtime_error,internal_error, sys_exit,
4018         get_mem ): Add attribute.
4019         * intrinsics/spread_generic.c (__spread): Fix spelling.
4020         * io/inquire.c (inquire_via_filename): Add const.
4021         * io/io.h (sys_exit): Add attribute.
4022         * io/io.h (move_pos_offset): Add move_pos_offset.
4023         * io/io.h (compare_file_filename, inquire_sequential, inquire_direct,
4024         inquire_formatted, inquire_unformatted, inquire_read, inquire_write,
4025         inquire_readwrite, convert_real, write_a, write_b, write_d, write_e,
4026         write_en, write_es, write_f, write_i, write_l, write_o, write_x,
4027         write_z): Add const.
4028         * io/read.c (convert_real): Add const.
4029         * io/transfer.c (type_name): Add const.
4030         * io/unix.c (unpack_filename, compare_file_filename,inquire_sequential,
4031         inquire_direct, inquire_formatted, inquire_unformatted, inquire_access,
4032         inquire_read, inquire_write, inquire_readwrite): Add const.
4033         * io/write.c (output_float): Remove unused variable.
4034         * io/write.c (write_a, extract_int, extract_real, output_float,
4035         write_float, write_int, write_i, write_b, write_o, write_z, write_d,
4036         write_e, write_f, write_en, write_es, write_logical, write_integer,
4037         write_character, write_real, write_complex): Add const.
4038         * runtime/error.c (rtoa): Remove unused variable.
4039         * runtime/select.c (select_string): Add const.
4040         * runtime/stop.c (stop_string): Add const.
4041
4042 2003-08-10  Paul Brook  <paul@nowt.org>
4043
4044         * Makefile.am (gfor_helper_src): Add intrinsics/abort.c.
4045         (FFLAGS): Add -fno-underscoring.
4046         * Makefile.in: Regenerate.
4047         * intrinsics/abort.c: New file.
4048
4049 2003-08-10  Erik Schnetter  <schnetter@uni-tuebingen.de>
4050
4051         * fmain.c (main): Do not call init and cleanup; call set_args instead.
4052         * libgfortran.h (init, cleanup): Remove declarations.
4053         (set_args): Add declaration.
4054         * runtime/main.c (init, cleanup): Make them static, and give them
4055         the constructor and destructor attributes.
4056         (set_args): New function.
4057
4058 2003-08-10  Paul Brook  <paul@nowt.org>
4059
4060         * intrinsics/strinf_intrinsics.c (compare_string): Return value based
4061         on which string is longest.
4062
4063 2003-08-10  Paul Brook  <paul@nowt.org>
4064
4065         * Makefile.am (EXTRA_DIST): Remove old files.
4066         * Makefile.in: Regenerate.
4067
4068 2003-07-26  Paul Brook  <paul@nowt.org>
4069
4070         Rename library to libgfortran.
4071         * libgfortran.h: Change prefix to _libgfortran_.
4072
4073 2003-07-24  Paul Brook  <paul@nowt.org>
4074
4075         * configure.in: Don't pull in system libtool.  Use toplevel
4076         auxiliary files.
4077
4078 2003-07-22  Paul Brook  <paul@nowt.org>
4079
4080         Regenerate all configury files.
4081
4082 2003-07-09  Chun Huang  <compiler@sohu.com>
4083
4084         * intrinsics/string_intrinsic.c (string_scan): New function.
4085         (string_verify): New function.
4086
4087 2003-06-25  Paul Brook  <paul@nowt.org>
4088
4089         * io/unix.c (mem_alloc_r_at, mem_alloc_w_at): Advance logical_offset.
4090         (mem_seek): Don't bother setting physical_offset.
4091
4092 2003-06-20  Paul Brook  <paul@nowt.org>
4093
4094         * libgfor.h (stop_numeric): Declare.
4095         * runtime/pause.c: New file.
4096         * Makefile.am: Add it.
4097
4098 2003-06-08  Paul Brook  <paul@nowt.org>
4099
4100         * m4/cexp.m4 (cabs): Use correct typed version.
4101         (csqrt): New function.
4102
4103 2003-06-07  Canqun Yang  <canqun@yahoo.com.cn>
4104
4105         Spotted by Benjamin and Tobias:
4106         * io/list_read.c: Add Separator '\t'.
4107         (parse_real, read_real): Accept real values starting with an optional
4108         sign follows a decimal point.
4109
4110 2003-06-06  Steven Bosscher  <steven@gcc.gnu.org>
4111
4112         * Makefile.am: Don't put cmath objects in subdir.
4113         * configure.in: Rename MATHOBJ to MATH_OBJ.
4114
4115 2003-06-02  Kejia Zhao  <Kejia_zh@yahoo.com.cn>
4116
4117         * intrinsics/associated.c: New file.
4118         * Makefile.am: Add it. Regenerate Makefile.in.
4119         * libgfor.h: Define g95_array_void, G95_DESCRIPTOR_DATA, and
4120         G95_DESCRIPTOR_DTYPE.
4121
4122 2003-06-01  Canqun Yang  <canqun@yahoo.com.cn>
4123
4124         * io/write.c (calcuate_exp): Rewrite it to avoid overflow.
4125         (calculate_G_format): Rewrite it to eliminate an infinte loop and set
4126         the scale_factor to 0 for F editing.
4127
4128 2003-05-11  Tobias Schlter  <innenminister@gmx.de>
4129
4130         * libgfor.h: Only include stdint.h if it exists.
4131
4132 2003-05-07  Paul Brook  <paul@nowt.org>
4133
4134         * libgfor.h: Use stdint.h types.
4135         * intrinsics/ishift.c: Ditto.
4136         * runtime/memory.c (malloc_t): Reorder fields for better alignment.
4137
4138 2003-05-05  Steven Bosscher  <steven@gcc.gnu.org>
4139
4140         * libgfor.h (offsetof): Define if nobody else does.
4141         * runtime/memory.c (HEADER_SIZE): Use it.
4142
4143 2003-05-01  Tobias Schlter  <innenminister@gmx.de>
4144
4145         * configure.in: Require autoconf 2.54.
4146
4147 2003-04-28  Tobias Schlter  <innenminister@gmx.de>
4148         Paul Brook  <paul@nowt.org>
4149
4150         * intrinsics/reshape_generic.c: Copy the whole element, not just the
4151         first byte.
4152         * m4/transpose.m4: New file.
4153         * Makefile.am: Add them.
4154         Regenerate generated files.
4155
4156 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
4157
4158         * io/format.c (parse_format_list): Allow 'X' without integer
4159         prefix.  This is an extension.  Interpretation is '1X'.
4160
4161 2003-04-18  Tobias Schlter  <Tobias.Schlueter@physik.uni-muenchen.de>
4162
4163         * io/format.c (parse_format_list): Allow '0P'.
4164
4165 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
4166
4167         * Makefile.in: Re-regenerate for automake 1.7.3.
4168
4169 2003-04-18  Canqun Yang  <canqun@yahoo.com.cn>
4170
4171         Port implementation for CHARACTER SELECT from Andy's tree.
4172         * runtime/select.c: New file
4173         * Makefile.am: Add it.
4174         * Makefile.in: Regenerate.
4175
4176 2003-04-17  Xiaoqiang Zhang <zhangapache@yahoo.com>
4177
4178         * io/transfer.c (formatted_transfer): Modified
4179         * io/unix.c (move_pos_offset): New Function.
4180         * io/format.c (parse_format_list): Modified.
4181
4182 2003-04-15  Xiaoqiang Zhang <zhangapache@yahoo.com>
4183
4184         * io/write.c (write_float,write_real): New implemention of
4185         FMT_G and default float editing.
4186         (calculate_exp,calculate_G_format,output_float): New Function.
4187         (write_float,write_real,write_logical): Modified
4188         * libgfor.h (default_rtoa): Remove Declaration.
4189         * runtime/error.c (default_rtoa): Remove Function.
4190
4191 2003-04-15  Steven Bosscher  <steven@gcc.gnu.org>
4192
4193         Spotted by Yang:
4194         * io/write.c (extract_real): Add missing break statement.
4195
4196 2003-04-13  Steven Bosscher  <steven@gcc.gnu.org>
4197
4198         * cpu_time.c: Make sure we have a definition of HZ.  Don't
4199         rely on CLOCKS_PER_SEC, it is always 1000000, on any system.
4200
4201 2003-04-13  Steven Bosscher  <steven@gcc.gnu.org>
4202             Paul Brook  <paul@nowt.org>
4203
4204         * configure.in: Check for process time headers and GETTIMEOFDAY.
4205         * makefile.am: Add intrinsics/cpu_time.c.
4206         * acinclude.m4: New file.
4207         * intrinsics/cpu_time.c: New file.
4208         * m4/dotprodl.m4: Fix typo.
4209         Regenerate generated files.
4210
4211 2003-04-11  Xiaoqiang Zhang <zhangapache@yahoo.com>
4212
4213         * io/write.c (extract_real): Ouput floating point value.
4214         (write_float): New Function.
4215         (write_e, write_f, write_en, write_es): Modified
4216         * io/transfer.c (formatted_transfer): Modified.
4217         * libgfor.h (default_rtoa): Declaration.
4218         (rtoa): Declaration.
4219         * runtime/error.c (default_rtoa): New Function.
4220         (rtoa): New Function.
4221
4222 2003-04-05  Paul Brook  <paul@nowt.org>
4223
4224         * intrinsics/spread_generic.c: New file.
4225         * Makefile.am: Add it. Regenerate Makefile.in.
4226
4227 2003-03-29  Paul Brook  <paul@nowt.org>
4228
4229         * intrinsics/pack_generic.c: New file.
4230         * intrinsics/unpack_generic.c: New file.
4231         * Makefile.am: Add them. Regenerate Makefile.in.
4232
4233 2003-03-25  Paul Brook  <paul@nowt.org>
4234
4235         * intrinsics/eoshift0.c: New file.
4236         * intrinsics/eoshift2.c: New file.
4237         * m4/eoshift1.m4: New file.
4238         * m4/eoshift3.m4: New file.
4239         * Makefile.am: Add them.
4240         * in_unpack_generic.c: Initialize src.
4241         Regenerate generated files.
4242
4243 2003-03-14  Paul Brook  <paul@nowt.org>
4244
4245         * m4/shape.m4: Work properly with array temporaries.
4246         * m4/in_pack.m4: Skip redundant checks for array temporaries.
4247         * runtime/in_pack_generic.c: Ditto.
4248
4249 2003-03-12  Paul Brook  <paul@nowt.org>
4250
4251         * m4/shape.m4: Work properly with noncontiguous arrays.
4252
4253 2003-03-08  Paul Brook  <paul@nowt.org>
4254
4255         * m4/in_pack.m4: Correctly handle zero sized and assumed size arrays.
4256         * runtime/in_pack_generic.c: Ditto.
4257
4258 2003-02-08  Paul Brook  <paul@nowt.org>
4259
4260         * intrinsics/reshape_generic.c: Use runtime_error to report errors.
4261         * io/close.c (st_close): Return void.
4262         * io/open.c (st_open): Return void.
4263         * libgfor.h (g95_array_char): Declare.
4264         (internal_malloc_size): Ditto.
4265         (internal_pack*, internal_unpack*): Ditto.
4266         * m4/in_pack.m4: Allocate storage if neccessary.  Fix logic for packed
4267         arrays.
4268         * m4/in_unpack.m4: Include file fixes.
4269         * m4/reshape.m4: Increment the correct source pointer.
4270         * Makefile.am (maxloc): Fix typo.
4271         * runtime/in_pack_generic.c: Call optimized functions. Allocate
4272         storage if neccessary. Fix logic for packed arrays.
4273         * runtime/in_unpack_generic.c: Call optimized functions.
4274         * runtime/main.c: Use runtime_error to report errors.
4275         * memory.c (internal_malloc_size): Make non-static.
4276
4277 2003-02-02  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4278
4279         * reshape_packed.c, lock.c: Add #include <string.h>.
4280         * libgfor.h, format.c, inquire.c, io.h, transfer.c, unix.c,
4281         environ.c, error.c, memory.c, string.c: Add const.
4282         * error.c (show_locus): Add void.
4283
4284 2003-02-21  Paul Brook  <paul@nowt.org>
4285
4286         * m4/in_pack.m4: Avoid returning const * parameter.
4287         * Makefile.am: Only regenerate files in maintainer mode.
4288
4289 2003-02-20  Paul Brook  <paul@nowt.org>
4290
4291         Add array repacking support functions.
4292         * m4/in_pack.m4, m4/in_unpack.m4: New files.
4293         * runtime/in_pack_generic.c, runtime/in_unpack_generic.c: New files.
4294         * Makefile.am: Build them.  Regenerate configury files.
4295         * generated/: New directory for generated files (need to move
4296         everything else there).
4297
4298 2003-02-07  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4299
4300         * m4/cexp.m4: Fix typo.
4301
4302 2003-01-26  Paul Brook  <paul@nowt.org>
4303
4304         * intrinsics/: Add missing generated files.
4305
4306 2003-01-26  Paul Brook  <paul@nowt.org>
4307
4308         * Makefile.am: Put -I before the filename.
4309
4310 2003-01-24  Paul Brook  <paul@nowt.org>
4311
4312         * configure.in: Add AM_MAINTAINER_MODE.
4313
4314 2003-01-23  Paul Brook  <paul@nowt.org>
4315
4316         * configure.in, Makefile.am: Modify to work with unmodified autoconf
4317         and auotmake.
4318         Also regenerate other configury files.
4319
4320 2003-01-21  Paul Brook  <paul@nowt.org>
4321
4322         * io/read.c: Don't use stdint.h, it doesn't exist on cygwin.
4323
4324 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4325
4326         * io/read.c (read_f): Don't use alloca, but safe get_mem instead.
4327         Don't include "alloca.h".
4328
4329 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4330
4331         * intrinsics/string.c: Rename to intrinsics/string_intrinsics.c.
4332         * Makefile.am: Adjust file name.
4333         * Makefile.in: Regenerate.
4334         * gfortypes.h: Kill, include everything in...
4335         * libgfor.h: ...here.  Include config.h
4336         * fmain.c, intrinsics/ishftc.c, intrinsic/reshape_generic.c,
4337         intrinsics/reshape_i4.c, intrinsics/reshape_i8.c,
4338         intrinsics/reshape_packed.c, intrinsics/size.c,
4339         m4/reshape.m4, runtime/main.c, runtime/memory.c: Use macro
4340         for prefix for all functions instead of hardcoded.
4341
4342 2003-01-19  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4343
4344         * io/lock.c (library_end): Propagate library return
4345         code.
4346
4347 2003-01-19  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4348
4349         Port fixes from Andy's tree:
4350         * io/read.c (read_decimal): Reverse sense of overflow
4351         comparison during integer reads.
4352         * io/format.c (revert): Fix comment.
4353         (next_format): Fix format revision.
4354         * io/unix.c: Fix and simplify mmap version of stream
4355         functions.
4356
4357 2003-01-11  Paul Brook  <paul@nowt.org>
4358
4359         * configure, Makefile.in: Regenerate.
4360
4361 2003-01-11  Paul Brook  <paul@nowt.org>
4362
4363         * runtime/stop.c: Rewrite.
4364
4365 2003-01-08  Paul Brook  <paul@nowt.org>
4366
4367         * configure, Makefile.in: Regenerate.
4368
4369 2003-01-05  Paul Brook  <paul@nowt.org>
4370
4371         * (*.m4) Move to m4/.
4372         * intrinsics/string.c (_gfor_string_index): New Function.
4373
4374 2002-12-29  Paul Brook  <paul@nowt.org>
4375
4376         * intrinsics/reshape.*: New files.
4377         * gcc_config.patch: Update to new GCC configure system.
4378
4379 2002-10-10  Paul Brook  <paul@nowt.org>
4380
4381         * intrinsics/size.c: New file.
4382         * intrinsics/shape.m4: New file.
4383         * Makefile.am: Add above files.
4384
4385 2002-10-02  Paul Brook  <paul@nowt.org>
4386
4387         * fmain.c (main): Move here.
4388         * libgfor.c: From here.
4389         * libgfor.h (gfor_init, gfor_runtime_cleanup): Declare.
4390         * Makefile.am: Build libgforbegin.
4391         * gcc_config.patch: Remove stray -march=athlon.
4392         * dotprodl.m4: Fix use of L8_TO_L4 macro.
4393         * ifunction.m4: Move variable declarations to allow compilation with
4394         gcc < 3.0
4395         * specific.m4, specific4.m4: Fix typo typecode->type_code.
4396         * README: Document use of patch -p1.
4397
4398 2002-09-12  Paul Brook  <paul@nowt.org>
4399
4400         * math/*: Add complex math library functions.
4401         * intrinsics/specific(2).m4: Generate Specific intrinsic functions.
4402         * Makefile.am: Add details for above.
4403         * configure.in: Use AC_PROG_F95.  Test for the presence of csin.
4404
4405 2002-09-09  Paul Brook  <paul@nowt.org>
4406
4407         * libgfor.c (determine_endianness): Use an array rather than a struct.
4408         * intrinsics/dotprod*, matmul*: Implement DOT_PRODUCT and MATMUL.
4409
4410 2002-09-09  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4411
4412         * libgfor.c: Add fatal signal handler.
4413         Romove superfluous abort() calls.
4414
4415 2002-09-07  Paul Brook <paul@nowt.org>
4416
4417         * Makefile.am, intrinsics: Major rewrite.
4418
4419 2002-09-02  Paul Brook <paul@nowt.org>
4420
4421         * Makefile.am: Added -I$(srcdir) to m4 rule.
4422
4423 2002-08-30  Paul Brook <paul@nowt.org>
4424
4425         * io/*: Integrated libgforio.
4426         * Makefile.am, configure.in: Make compatable with GCC. Build code for
4427         intrinsics in the intrisics directory.
4428         * intrinsics/intrinsics.m4: Move here. Strip directories from the
4429         filename. Add 'and' and 'all' intrinsics.
4430
4431 2002-08-17  Paul Brook <paul@nowt.org>
4432
4433         * ALL: First release as more than just a single file