OSDN Git Service

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