OSDN Git Service

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