OSDN Git Service

1210aabecdadfaa71dce76945e085eaf9585bbf3
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2005-05-09  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2
3         * match.c (gfc_match_return): Only require space after keyword when
4         it is obligatory.  Only give stdwarn to after matching is successful.
5         * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
6
7 2005-05-08  Kazu Hirata  <kazu@cs.umass.edu>
8
9         * intrinsic.texi: Fix typos.
10
11 2005-05-07  Steven G. Kargl  <kargls@comcast.net>
12
13         * intrinsic.texi:  Document ASSOCIATED and ATAN2.  Update Bessel function
14         description to include information about scalar arguments.
15
16 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
17
18         * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
19         match.h, trans-array.h: Update copyright.
20
21 2005-04-29  Tom Tromey  <tromey@redhat.com>
22
23         * f95-lang.c (poplevel): Updated for change to build_block.
24
25 2005-04-29  Jakub Jelinek  <jakub@redhat.com>
26
27         PR fortran/13082
28         PR fortran/18824
29         * trans-expr.c (gfc_conv_variable): Handle return values in functions
30         with alternate entry points.
31         * resolve.c (resolve_entries): Remove unnecessary string termination
32         after snprintf.  Set result of entry master.
33         If all entries have the same type, set entry master's type
34         to that common type, otherwise set mixed_entry_master attribute.
35         * trans-types.c (gfc_get_mixed_entry_union): New function.
36         (gfc_get_function_type): Use it for mixed_entry_master functions.
37         * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
38         * decl.c (gfc_match_entry): Set entry->result properly for
39         function ENTRY.
40         * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
41         __entry argument.
42         (build_entry_thunks): Handle return values in entry thunks.
43         Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
44         shared between multiple contexts.
45         (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
46         current_function_decl instead of sym->backend_decl.  Skip over
47         entry master's entry id argument.  For mixed_entry_master entries or
48         their results, return a COMPONENT_REF of the fake result.
49         (gfc_trans_deferred_vars): Don't warn about missing return value if
50         at least one entry point uses RESULT.
51         (gfc_generate_function_code): For entry master returning
52         CHARACTER, copy ts.cl->backend_decl to all entry result syms.
53         * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
54         values optional just because they are in entry master.
55
56 2005-04-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
57
58         * gfortran.h (gfc_namespace): Add seen_implicit_none field,
59         Tobias forgot this in previous commit.
60         
61 2005-04-29  Paul Brook   <paul@codesourcery.com>
62
63         * trans-expr.c (gfc_conv_expr_present): Fix broken assert.  Update
64         comment.
65
66 2005-04-29  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
67
68         * gfortran.h (gfc_namespace): Add seen_implicit_none field.
69         * symbol.c (gfc_set_implicit_none): Give error if there's a previous
70         IMPLICIT NONE, set seen_implicit_none.
71         (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
72
73 2005-04-28  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
74
75         * gfortran.h (gfc_gsymbol): Make name a const char *.
76         * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
77         gfc_get_string.
78
79 2005-04-28  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
80
81         PR fortran/20865
82         * resolve.c (resolve_actual_arglist): Issue an error if a statement
83         functions is used as actual argument.
84
85 2005-04-27  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
86
87         PR fortran/21177
88         * interface.c (compare_parameter): Ignore type for EXPR_NULL
89         only if type is BT_UNKNOWN.
90
91 2005-04-25  Paul Brook  <paul@codesourcery.com>
92         Steven G. Kargl  <kargls@comcast.net>
93
94         PR fortran/20879
95         * check.c (gfc_check_ichar_iachar): New function.
96         * instinsic.h (gfc_check_ichar_iachar): Add prototype.
97         * intrinsic.c (add_functions): Use it.
98         * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
99         character expression lengths.
100
101 2005-04-24  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
102
103         PR fortran/20059
104         * trans-common.c (translate_common): Cast offset and
105         common_segment->offset to type int for warning message.
106
107 2005-04-23  DJ Delorie  <dj@redhat.com>
108
109         * trans-decl.c: Adjust warning() callers.
110
111 2005-04-23  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
112
113         * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
114         intermediate representation.  Fix typo in comment.
115
116 2005-04-21  Steven G. Kargl  <kargls@comcast.net>
117
118         * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
119         simplify logic; Add a gcc_assert.
120
121 2005-04-19  Steven G. Kargl  <kargls@comcast.net>
122
123         * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
124
125 2005-04-19  Arnaud Desitter  <arnaud.desitter@ouce.ox.ac.uk>
126             Steven G. Kargl  <kargls@comcast.net>
127
128         * invoke.texi: Update -Waliasing description
129
130 2005-04-19  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
131
132         PR fortran/16861
133         * resolve.c (resolve_variable): If e->symtree is not set, this
134         ought to be a FAILURE, and not a segfault.
135
136 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
137
138         PR fortran/17472
139         PR fortran/18209
140         PR fortran/18396
141         PR fortran/19467
142         PR fortran/19657
143         * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
144         declaration for st_set_nml_var and st_set_nml_var_dim. Remove
145         declarations of old namelist functions.
146         (build_dt): Simplified call to transfer_namelist_element.
147         (nml_get_addr_expr): Generates address expression for start of 
148         object data. New function.
149         (nml_full_name): Qualified name for derived type components. New 
150         function.
151         (transfer_namelist_element): Modified for calls to new functions 
152         and improved derived type handling.
153
154 2005-04-17  Richard Guenther  <rguenth@gcc.gnu.org>
155
156         * scanner.c (gfc_next_char_literal): Reset truncation flag
157         for lines ending in a comment for both fixed and free form.
158         (load_line): Do not set truncated flag if only truncating
159         the EOL marker.
160
161 2005-04-15  Richard Guenther  <rguenth@gcc.gnu.org>
162
163         PR fortran/14569
164         * gfortran.h (gfc_linebuf): Add truncated field.
165         * parse.c (next_statement): Handle warning for truncated
166         lines.
167         * scanner.c (load_line): Return if line was truncated.
168         No longer warn for truncated lines.  Remove unused parameters.
169         (load_file): Store load_line return value to linebuf.
170         (gfc_error_recovery): Do not advance line at the end.
171
172 2005-04-14  Steven G. Kargl  <kargls@comcast.net>
173
174         * gfortran.h (gfc_real_info): Add subnormal struct member.
175         * arith.c (gfc_arith_init_1): Set it.
176         (gfc_check_real_range): Use it.
177         * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
178
179 2005-04-12  Kazu Hirata  <kazu@cs.umass.edu>
180
181         * simplify.c: Fix a comment typo.
182
183 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
184
185         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
186
187 2005-04-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
188
189         * simplify.c (gfc_simplify_nearest): Overhaul.
190
191 2005-04-10  Kazu Hirata  <kazu@cs.umass.edu>
192
193         * interface.c: Fix a comment typo.
194
195 2005-04-10  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
196
197         * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
198         Fortran 95.
199
200 2005-04-09  Steven G. Kargl  <kargls@comcast.net>
201
202         * simplify.c (gfc_simplify_anint): Use mpfr_round()
203         (gfc_simplify_dnint): ditto.
204         (gfc_simplify_nint): ditto.
205
206 2005-04-09  Andrew Pinski  <pinskia@physics.uc.edu>
207
208         PR fortran/13257
209         * io.c (check_format): Allow an optional comma
210         between descriptors.
211
212 2005-04-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
213
214         * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
215         comment according to GNU coding style.
216         (gfc_match_if): Remove gfc_ prefix in call to
217         match_arithmetic_if.
218
219 2005-04-08  Diego Novillo  <dnovillo@redhat.com>
220
221         * match.c (gfc_match_arithmetic_if): Declare static.
222
223 2005-04-08  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
224
225         PR fortran/17229
226         * match.c (gfc_match_arithmetic_if): New function to match an
227         arithmetic IF statement.
228         (gfc_match_if): Use gfc_match_arithmetic_if to match an
229         arithmetic IF statement embedded in a simple IF statement.
230
231 2005-04-07  Steven G. Kargl  <kargls@comcast.net>
232
233         * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
234
235 2005-04-06  Steven G. Kargl  <kargls@comcast.net>
236
237         * invoke.texi: Remove documentation of -std=f90 
238
239 2005-04-06  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
240
241         * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
242         non-pointer assignment.
243
244 2005-04-05  Feng Wang  <fengwang@nudt.edu.cn>
245
246         PR fortran/15959
247         PR fortran/20713
248
249         * array.c (resolve_character_array_constructor): New function. Set
250         constant character array's character length.
251         (gfc_resolve_array_constructor): Use it.
252         * decl.c (add_init_expr_to_sym): Set symbol and initializer character
253         length.
254         (gfc_set_constant_character_len): New function. Set constant character
255         expression according the given length.
256         * match.h (gfc_set_constant_character_len): Add prototype.
257
258 2005-04-04  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
259
260         * intrinsic.texi: BES?? functions are not in the f95 standard.
261
262 2005-04-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
263
264         * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
265
266 2005-04-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
267
268         * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
269         BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
270
271 2005-04-02  Steven G. Kargl  <kargls@comcast.net>
272
273         * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
274
275 2005-04-01  Kazu Hirata  <kazu@cs.umass.edu>
276
277         * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
278         trans.h: Fix comment typos.
279
280 2005-03-29  Steven G. Kargl  <kargls@comcast.net>
281
282         * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
283         flag_default_integer, flag_default_real
284         * invoke.texi: Update documentation
285         * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8   
286         fdefault-integer-8, and fdefault-real-8 definitions.
287         * options.c (gfc_init_options): Set option defaults
288         (gfc_handle_option): Handle command line options.
289         * trans-types.c (gfc_init_kinds): Use options.
290
291 2005-03-29  Keith Besaw  <kbesaw@us.ibm.com>
292
293         * f95-lang.c (builtin_function): Process the attrs parameter
294         and apply the "const" attribute to the builtin if found.
295
296 2005-03-27  Steven G. Kargl  <kargls@comcast.net>
297
298         * intrinsic.texi: Document AIMAG, AINT, ALL
299
300 2005-03-26  Steven G. Kargl  <kargls@comcast.net>
301
302         * arith.c (check_result): Fix illogical logic.
303
304 2005-03-26  Canqun Yang  <canqun@nudt.edu.cn>
305
306         * trans-common.c (create_common): Build RECORD_NODE for common blocks
307         contain no equivalence objects.
308         (add_equivalences): New argument saw_equiv.
309         (trans_common): New local variable saw_equiv.
310         (finish_equivalences): Add a local variable dummy, Always pass true
311         for the 3rd parameter to create_common.
312
313 2005-03-25  Steven G. Kargl  <kargls@comcast.net>
314
315         * intrinsic.texi: Fix "make dvi"
316
317 2005-03-24  Steven G. Kargl  <kargls@comcast.net>
318
319         * intrinsic.texi: New file.
320         * gfortran.texi: Include it; white space change; fix typo.
321
322 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
323
324         * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
325
326 2005-03-23  Steven Bosscher  <stevenb@suse.de>
327
328         * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
329         * trans-array.c (gfc_trans_allocate_array_storage,
330         gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
331         gfc_conv_array_index_ref, gfc_trans_array_bound_check,
332         gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
333         gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
334         gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
335         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
336         gfc_conv_expr_descriptor): Likewise.
337         * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
338         gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
339         * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
340         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
341         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
342         gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
343         gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
344         gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
345         gfc_conv_intrinsic_merge, prepare_arg_info,
346         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
347         * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
348         gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
349         generate_loop_for_rhs_to_temp, compute_inner_temp_size,
350         allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
351         gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
352         Likewise.
353         * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
354         * trans.c (gfc_add_modify_expr): Likewise.
355
356 2005-03-22  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
357
358         * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
359         gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
360         gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
361         gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
362         gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
363         gfc_check_perror): new functions to check newly implemented
364         g77 intrinsics.
365         * gfortran.h: adding symbols for new intrinsics.
366         * intrinsic.c (add_functions): adding new intrinsics.
367         (add_subroutines): adding new intrinsics.
368         * intrinsic.h: prototype for all checking and resolving
369         functions.
370         * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
371         gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
372         gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
373         gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
374         gfc_resolve_kill_sub, gfc_resolve_link_sub,
375         gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
376         gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
377         gfc_resolve_perror): new functions to resolve intrinsics.
378         * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
379         for new symbols.
380
381 2005-03-19  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
382
383         * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
384         in which the variable is declared.
385
386         PR fortran/18525
387         * resolve.c (was_declared): Also check for dummy attribute.
388
389 2005-03-19  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
390
391         * gfortran.h (arith): Remove ARITH_0TO0.
392         * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
393         (gfc_arith_power): Remove special casing of zero to integral
394         power zero.
395
396 2005-03-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
397
398         * Make-lang.in (fortran-warn): Remove -Wno-error.
399         (expr.o-warn, resolve.o-warn, simplify.o-warn,
400         trans-common.o-warn): Specify -Wno-error.
401
402 2005-03-17  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
403
404         * trans-array.c (gfc_trans_static_array_pointer,
405         get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
406         comment and formatting typos.
407
408 2005-03-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
409
410         * invoke.texi: Fix typos.
411
412 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
413
414         * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
415
416 2005-03-15  Feng Wang  <fengwang@nudt.edu.cn>
417
418         * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
419         to zero on label_tree.
420
421 2005-03-15  Feng Wang  <fengwang@nudt.edu.cn>
422
423         PR fortran/18827
424         * io.c (resolve_tag): Add checking on assigned label.
425         (match_dt_format): Does not set symbol assign attribute.
426         * match.c (gfc_match_goto):Does not set symbol assign attribute.
427         * resolve.c (resolve_code): Add checking on assigned label.
428         * trans-common.c (build_field): Deals with common variable assigned
429         a label.
430         * trans-stmt.c (gfc_conv_label_variable): New function.
431         (gfc_trans_label_assign): Use it.
432         (gfc_trans_goto): Ditto.
433         * trans-io.c (set_string): Ditto.
434         * trans.h (gfc_conv_label_variable): Add prototype.
435
436 2005-03-14  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
437
438         PR fortran/20467
439         * symbol.c (check_conflict): A dummy argument can't be a statement
440         function.
441
442 2005-03-14  Zdenek Dvorak  <dvorakz@suse.cz>
443
444         * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
445         the argument of the shift to the unsigned type.
446
447 2005-03-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
448
449         PR fortran/16907
450         * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
451
452 2005-03-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
453
454         PR fortran/20323
455         * resolve.c (gfc_resolve): Check if character lengths are
456         specification expressions.
457
458 2005-03-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
459
460         PR fortran/20361
461         * trans-array.c (gfc_stack_space_left): Remove unused variable.
462         (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
463         code.
464         * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
465         Remove declaration / prototype.
466         * trans-common.c (build_equiv_decl): Give union a name.  Check if
467         it can be put on the stack.
468         * trans-decl.c (gfc_stack_space_left): Move function here.
469         (gfc_build_qualified_array): Fix comment typo.
470         * trans.h (gfc_put_var_on_stack): Add prototype.
471
472 2005-03-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
473
474         * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
475         * decl.c, trans.c: Don't use C++ style comments.
476         * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
477         ifsrc): Give names to enums and use ENUM_BITFIELD.
478         (gfc_access): Remove trailing comma.
479
480 2005-03-05  Steven G. Kargl  <kargls@comcast.net>
481
482         PR 19936
483         * primary.c (match_complex_constant): Mangled complex constant may
484         be an implied do-loop.  Give implied do-loop matcher a chance.
485
486 2005-03-05  Steven G. Kargl  <kargls@comcast.net>
487
488         PR fortran/19754
489         * resolve.c (compare_shapes):  New function.
490         (resolve_operator): Use it.
491
492 2005-03-05  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
493
494         * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
495         type for COMPLEX constants.
496
497 2005-03-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
498
499         PR fortran/19673
500         * trans-expr.c (gfc_conv_function_call): Correctly dereference
501         argument from a pointer function also if it has a result clause.
502
503 2005-03-04  Steven G. Kargl  <kargls@comcast.net>
504
505         * expr.c (gfc_copy_shape_excluding): Change && to ||.
506
507 2005-03-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
508
509         * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
510         clarify comment.
511
512 2005-02-28  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
513         (port from g95)
514
515         PR fortran/19479
516         * simplify.c (gfc_simplify_bound): Rename to ...
517         (simplify_bound): ... this and overhaul.
518
519 2005-02-28  Steven G. Kargl  <kargl@gcc.gnu.org>
520
521         * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
522         (gfc_conv_intrinsic_function): update function calls
523
524 2005-02-27  Steven G. Kargl  <kargl@gcc.gnu.org>
525
526         PR fortran/20058
527         * trans-types.c (gfc_max_integer_kind): Declare
528         (gfc_init_kinds): Initialize it.
529         * gfortran.h (gfc_max_integer_kind): extern it.
530         * primary.c (match_boz_constant): Use it; remove gfortran extension
531         of kind suffixes on BOZ literal constants
532
533
534 2005-02-27  Steven G. Kargl  <kargls@comcast.net>
535
536         * arith.c (gfc_check_real_range):  Remove multiple returns
537         (check_result): New function.
538         (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
539         gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
540
541
542 2005-02-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
543
544         * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
545
546
547 2005-02-24  Tobias Schl"uter  <tobias.schlueter@physik.uni-meunchen.de>
548
549         Unrevert previously reverted patch.  Adding this fix:
550         * module.c (find_true_name): Deal with NULL module.
551
552 2005-02-24  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
553
554         Revert yesterday's patch:
555         2005-02-23  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
556
557                 * gfortran.h (gfc_component, gfc_actual_arglist, ...
558                 ... argument.  Copy string instead of pointing to it.
559
560 2005-02-23  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
561
562         * gfortran.h (gfc_get_namespace): Add second argument to prototype.
563         * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
564         gfc_get_namespace.
565         * module.c (mio_namespace_ref, load_needed): Likewise.
566         * parse.c (parse_interface, parse_contained): Likewise.  Here the
567         correct second argument matters.
568         * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
569         parent's implicit types if this is set.
570         (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
571         * trans-common.c (build_common_decl): Likewise.
572
573         * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
574         formatting.
575         * symbol.c (gfc_set_default_type): Issue error only once, by setting
576         and checking 'untyped' attribute.
577
578         * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
579         fields into new struct 'op' inside the 'value' union.
580         * arith.c (eval_intrinsic): Adapt all users.
581         * dependency.c (gfc_check_dependency): Likewise.
582         * dump-parse-tree.c (gfc_show_expr): Likewise.
583         * expr.c (gfc_get_expr): Don't clear removed fields.
584         (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
585         gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
586         check_intrinsic_op): Adapt to new field names.
587         * interface.c (gfc_extend_expr): Likewise.  Also explicitly
588         nullify 'esym' and 'isym' fields of new function call.
589         * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
590         Adapt to renamed structure fields.
591         * matchexp.c (build_node, match_level_1, match_expr): Likewise.
592         * module.c (mio_expr): Likewise.
593         * resolve.c (resolve_operator): Likewise.
594         (gfc_find_forall_index): Likewise.  Only look through operands
595         if dealing with EXPR_OP
596         * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
597         * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
598         gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
599
600         [ Reverted ]
601         * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
602         'name' a 'const char *'.
603         (gfc_symbol): Likewise, also for 'module'.
604         (gfc_symtree): Make 'name' a 'const char *'.
605         (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
606         (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
607         'char *' argument.
608         (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
609         initialize 'SYM->module'.
610         * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
611         pointer instead of empty string.
612         * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
613         * interface.c (gfc_compare_types): Adapt check to account for possible
614         NULL pointer.
615         (compare_actual_formal): Check for NULL pointer instead of empty
616         string.
617         * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
618         Add 'const' qualifier.
619         (conv_name): Return a heap allocated string.
620         (find_conv): Add 'const' qualifier to 'target'.
621         (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
622         (make_generic): Check for NULL pointer instead of empty string.
623         (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
624         (add_conv): No need to strcpy result from 'conv_name'.
625         (sort_actual): Check for NULL pointer instead of empty  string.
626         * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
627         Adapt prototype.
628         * module.c (compare_true_names): Compare pointers instead of strings
629         for 'module' member.
630         (find_true_name): Initialize string fields with gfc_get_string.
631         (mio_pool_string): New function.
632         (mio_internal_string): Adapt comment.
633         (mio_component_ref, mio_component, mio_actual_arg): Use
634         'mio_pool_string' instead of 'mio_internal_string'.
635         (mio_symbol_interface): Add 'const' qualifier to string arguments.
636         Add level of indirection. Use 'mio_pool_string' instead of
637         'mio_internal_string'.
638         (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
639         (write_common, write_symbol): Use 'mio_pool_string' instead of
640         'mio_internal_string'.
641         (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
642         instead of empty string.
643         (write_operator, write_generic): Pass correct type variable to
644         'mio_symbol_interface'.
645         (write_symtree): Use 'mio_pool_string' instead of
646         'mio_internal_string'.
647         * primary.c (match_keyword_arg): Adapt check to possible
648         case of NULL pointer.  Use 'gfc_get_string' instead of 'strcpy'.
649         * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
650         gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
651         'strcpy'.
652         (ambiguous_symbol): Check for NULL pointer instead of empty string.
653         (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
654         arguments.
655         * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
656         pointer instead of empty string.
657         * trans-decl.c (gfc_sym_mangled_identifier,
658         gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
659         gfc_get_symbol_decl): Likewise.
660         * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
661         argument.  Copy string instead of pointing to it.
662
663 2005-02-23  Kazu Hirata  <kazu@cs.umass.edu>
664
665         * intrinsic.h, st.c: Update copyright.
666
667 2005-02-20  Steven G. Kargl  <kargls@comcast.net>
668
669         * symbol.c: Typos in comments.
670
671 2005-02-20  Steven G. Kargl  <kargls@comcast.net>
672
673         * expr.c (gfc_type_convert_binary): Typo in comment.
674
675 2005-02-19  Steven G. Kargl  <kargls@comcast.net>
676
677         * check.c (gfc_check_selected_int_kind): New function.
678         * intrinsic.h: Prototype it.
679         * intrinsic.c (add_function): Use it.
680         * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
681           BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
682
683 2005-02-19  Steven G. Kargl  <kargls@comcast.net>
684
685         * check.c (gfc_check_int): improve checking of optional kind
686         * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
687
688 2005-02-19  Steven G. Kargl  <kargls@comcast.net>
689
690         * check.c (gfc_check_achar): New function
691         * intrinsic.h: Prototype it.
692         * intrinsic.c (add_function): Use it.
693
694 2005-02-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
695
696         * trans-stmt.c (generate_loop_for_temp_to_lhs,
697         generate_loop_for_rhs_to_temp): Remove if whose condition is
698         always true.
699
700 2005-02-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
701
702         * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
703         (gfc_use_derived): ... this function.
704
705 2005-02-09  Richard Henderson  <rth@redhat.com>
706
707         * f95-lang.c (gfc_init_builtin_functions): Call
708         build_common_builtin_nodes; do not define any functions handled
709         by it.
710
711 2005-02-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
712
713         * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
714         EXPR_SUBSTRING.
715         (gfc_is_constant_expr): Check 'ref' to determine if substring
716         reference is constant.
717         (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
718         (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
719         and 'op2'.
720         * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
721
722 2005-02-07  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
723
724         * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
725         gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
726         gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
727         gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
728         gfc_add_procedure): Add argument.
729         * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
730         gfc_match_null, match_type_spec, match_attr_spec,
731         gfc_match_formal_arglist, match_result, gfc_match_function_decl):
732         Update callers to match.
733         (gfc_match_entry) : Likewise, fix comment typo.
734         (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
735         access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
736         gfc_match_derived_decl): Update callers.
737         * interface.c (gfc_match_interface): Likewise.
738         * match.c (gfc_match_label, gfc_add_flavor,
739         gfc_match_call, gfc_match_common, gfc_match_block_data,
740         gfc_match_namelist, gfc_match_module, gfc_match_st_function):
741         Likewise.
742         * parse.c (parse_derived, parse_interface, parse_contained),
743         primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
744         * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
745         * symbol.c (check_conflict, check_used): Add new 'name' argument,
746         use when printing error message.
747         (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
748         gfc_add_generic, gfc_add_in_common, gfc_add_data,
749         gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
750         gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
751         gfc_add_procedure): Add new 'name' argument.  Pass along to
752         check_conflict and check_used.
753         (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
754         gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
755         gfc_add_pure, gfc_add_recursive, gfc_add_intent,
756         gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
757         argument in calls to any of the modified functions.
758
759 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
760
761         * gfortran.texi: Don't give last update date.
762
763 2006-01-30  Richard Henderson  <rth@redhat.com>
764
765         * options.c (gfc_init_options): Zero flag_errno_math.
766
767 2005-01-29  Paul Brook  <paul@codesourcery.com>
768
769         PR fortran/18565
770         * check.c (real_or_complex_check): New function.
771         (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
772         * intrinsic.c (add_functions): Use new check functions.
773         * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
774         Add prototypes.
775
776 2005-01-29  Steven G. Kargl  <kargls@comcast.net>
777
778         PR fortran/19589
779         * expr.c (gfc_check_assign):  Check for conformance of logical operands
780
781 2004-01-27  Steven Bosscher  <stevenb@suse.de>
782
783         * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
784         TREE_USED for all labels.
785         (gfc_trans_entry_master_switch): Use it instead of building a
786         label by hand.
787         * trans-io.c (add_case): Likewise.
788         * trans-stmt.c (gfc_trans_integer_select): Likewise.
789
790 2004-01-23  Paul Brook  <paul@codesourcery.com>
791         Steven G. Kargl  <kargls@comcast.net>
792
793         PR fortran/17941
794         * arith.c (gfc_convert_real): Remove sign handling.
795         * primary.c (match_digits): Allow whitespace after initial sign.
796         (match_real_const): Handle signs here.  Allow whitespace after
797         initial sign.  Remove dead code.
798         (match_const_complex_part): Remove.
799         (match_complex_part): Use match_{real,integer}_const.
800         (match_complex_constant): Cross-promote integer types.
801
802 2005-01-23  James A. Morrison  <phython@gcc.gnu.org>
803
804         PR fortran/19294
805         * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
806         transpose_c8 for complex types.
807
808 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
809
810         * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
811         trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
812         trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
813         Follow spelling conventions.
814
815 2005-01-22  Bud Davis  <bdavis9659@comcast.net>
816
817         PR fortran/19313
818         * trans-io.c (gfc_trans_inquire): Added code to support
819         pad.
820
821 2005-01-22  Steven G. Kargl  <kargls@comcast.net>
822
823         * intrinsic.c (make_alias):  Add standard argument.
824         (add_functions): Update make_alias calls.
825
826 2005-01-22  Paul Brook  <paul@codesourcery.com>
827
828         * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
829
830 2005-01-22  Paul Brook  <paul@codesourcery.com>
831
832         * gfortran.h (gfc_check_access): Add prototype.
833         * match.c (gfc_match_namelist): Remove TODO.
834         * module.c (check_access): Rename ...
835         (gfc_check_access): ... to this.  Boolify.  Update callers.
836         * resolve.c (resolve_symbol): Check for private objects in public
837         namelists.
838
839 2005-01-22  Paul Brook  <paul@codesourcery.com>
840
841         * primary.c (gfc_match_rvalue): Only apply implicit type if variable
842         does not have an explicit type.
843         (gfc_match_variable): Resolve implicit derived types in all cases.
844         Resolve contained function types from their own namespace, not the
845         parent.
846         * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
847         checking.  Resolve from the contained namespace, not the parent.
848
849 2005-01-22  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
850
851         PR fortran/19543
852         * trans-const.c (gfc_conv_constant_to_tree): Give logical
853         constants the correct type.
854
855         PR fortran/19194
856         * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
857         length parameters.
858         (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
859         pointer fields.
860
861 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
862
863         * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
864         gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
865         match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
866         scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
867         trans-io.c, trans-stmt.c, trans.c: Update copyright.
868
869 2005-01-17  Ira Rosen  <irar@il.ibm.com>
870
871         * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
872
873 2005-01-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
874
875         PR fortran/19182
876         * error.c (error_char): Line-buffer errors / warnings.
877
878 2005-01-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
879
880         * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
881         unsigned issue.  Use build_int_cst instead of converting
882         integer_zero_node.  Remove unnecessary conversion.
883
884         * trans-types.c (gfc_get_character_type_len): : Use
885         gfc_charlen_type_node as basic type for the range field.
886
887         * trans-intrinsic.c (build_fixbound_expr,
888         gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
889         gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
890         gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
891         of converting 'integer_zero_node' or 'integer_one_node'
892         respectively.
893         (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
894         evade re-building.
895         (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
896         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
897         'build_int_cst' instead of converting 'integer_zero_node' or
898         'integer_one_node' respectively.
899
900         * trans-intrinsic.c (gfc_conv_intrinsic_index,
901         gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
902         'gfc'-prefix from local variable, remove dead code, use correct
903         type when inserting argument.
904
905         * trans-intrinsic.c, trans-types.c: Update copyright years.
906
907 2005-01-16  Steven G. Kargl  <kargls@comcast.net>
908
909         PR 19168
910         * resolve.c (check_case_overlap): Typo in comment.
911         (validate_case_label_expr):  Fix up kinds of case values
912         (resolve_select): Properly handle kind mismatches.
913
914 2004-01-16  Paul Brook  <paul@codesourcery.com>
915
916         PR fortran/17675
917         * trans-common.c (translate_common): Remove duplicate function call.
918         (finish_equivalences): Preserve alignment when biasing offsets.
919
920 2005-01-15  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de
921
922         * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
923         ASCII-like character encoding.
924
925 2005-01-14  Steven G. Kargl  <kargls@comcast.net>
926
927         * resolve.c (compare_case): Cleanup.
928
929 2005-01-14  Steven G. Kargl  <kargls@comcast.net>
930
931         * resolve.c (compare_case): Give arguments correct type.
932
933 2005-01-13  Kazu Hirata  <kazu@cs.umass.edu>
934
935         * iresolve.c, trans-common.c, trans-types.c: Fix comment
936         typos.
937
938 2005-01-09  Paul Brook  <paul@codesourcery.com>
939
940         PR fortran/17675
941         * trans-common.c (current_common, current_offset): Remove.
942         (create_common): Add head argument.
943         (align_segment): New function.
944         (apply_segment_offset): New function.
945         (translate_common): Merge code from new_segment.  Handle alignment.
946         (new_segment): Remove.
947         (finish_equivalences): Ensure proper alignment.
948
949 2005-01-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
950
951         * trans-const.c: Don't include unused math.h.
952
953         * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
954         gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
955         gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
956         trailing whitespace.
957         (prepare_arg_info): Fix formatting, indenting and remove trailing
958         whitespace.
959         (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
960         trailing whitespace.
961
962         * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
963         gfc_constant_result, gfc_range_check, gfc_arith_power,
964         eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
965         gfc_real2complex, gfc_complex2int, gfc_complex2real,
966         gfc_complex2complex): Fix whitespace issues.
967         * check.c (must_be, type_check, numeric_check, int_or_real_check,
968         logical_array_check, array_check, scalar_check, nonoptional_check,
969         variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
970         gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
971         gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
972         gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
973         gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
974         gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
975         gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
976         gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
977         gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
978         gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
979         gfc_check_lbound, gfc_check_logical, min_max_args,
980         gfc_check_min_max_integer, gfc_check_min_max_real,
981         gfc_check_min_max_double, gfc_check_matmul,
982         gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
983         gfc_check_pack, gfc_check_precision, gfc_check_radix,
984         gfc_check_range, gfc_check_real, gfc_check_repeat,
985         gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
986         gfc_check_set_exponent): Fix formatting issues.
987         (gfc_check_size, gfc_check_sign): Alphabetize function order,
988         remove whitespace-only line.
989         (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
990         gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
991         gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
992         gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
993         gfc_check_random_number, gfc_check_random_seed,
994         gfc_check_second_sub, gfc_check_system_clock,
995         gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
996         gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
997         gfc_check_unlink_sub): Fix formatting issues.
998
999 2005-01-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1000
1001         * gfortran.h: Remove outdated comment.  Don't include stdio.h
1002         explicitly.
1003
1004 2005-01-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1005
1006         * gfortranspec.c (lang_specific_driver): Change year to 2005 in
1007         output of 'gfortran --version'.
1008
1009 2005-01-03  Steven G. Kargl  <kargls@comcast.net>
1010
1011         * arith.c: Add system.h; remove string.h
1012         * decl.c: Ditto
1013         * matchexp.c: Ditto
1014         * parse.c: Ditto
1015         * resolve.c: Ditto
1016         * st.c: Ditto
1017         * check.c: Remove stdlib.h and stdarg.h
1018         * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
1019         * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
1020         * f95-lang.c: Add system.h; remove stdio.h
1021         * interface.c: Add system.h; remove stdlib.h and string.h
1022         * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
1023         * io.c: Remove string.h
1024         * simplify.c: Ditto
1025         * match.c: Remove stdarg.h and string.h
1026         * misc.c: Update copyright; add system.h; remove stdlib.h,
1027         string.h, and sys/stat.h
1028         * module.c: Add system.h; remove string.h, stdio.h, errno.h,
1029         unistd.h, and time.h
1030         * option.c: Remove string.h and stdlib.h
1031         * primary.c: Ditto
1032         * scanner.c: Update copyright; add system.h; remove stdlib.h,
1033         stdio.h, string.h, and strings.h
1034         * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
1035         * trans-array.c: Remove stdio.h and gmp.h
1036         * trans-const.c: Ditto
1037         * trans-expr.c: Ditto
1038         * trans-io.c: Ditto
1039         * trans-stmt.c: Ditto
1040         * trans.c: Ditto
1041         * trans-intrinsic.c: Remove stdio.h and string.h
1042
1043 2004-12-29  Steven G. Kargl  <kargls@comcast.net>
1044
1045         * gfortran.h (gfc_case): fix typo in comment.
1046
1047 2004-12-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1048
1049         * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
1050         logical shift.  Call fold.  Remove 0-bit shift shortcut.
1051         (gfc_conv_intrinsic_ishftc): Convert first argument to at least
1052         4 bytes bits.  Convert 2nd and 3rd argument to 4 bytes.  Convert
1053         result if width(arg 1) < 4 bytes.  Call fold.
1054
1055         PR fortran/19032
1056         * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
1057         in front of function to match the standard.  Correct handling
1058         of MODULO.
1059
1060 2004-12-27  Andrew Pinski  <pinskia@physics.uc.edu>
1061
1062         * trans-expr.c (gfc_conv_cst_int_power): Only check for
1063         flag_unsafe_math_optimizations if we have a float type.
1064
1065 2004-12-23  Steven G. Kargl  <kargls@comcast.net>
1066
1067         * gfortran.texi: Fix typo.
1068
1069 2004-12-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1070
1071         * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
1072         comment typo.
1073
1074 2004-12-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1075
1076         PR fortran/18993
1077         * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
1078         (gfc_match_nullify): Make sure that ')' is in front of the end of
1079         statement.
1080
1081         * scanner.c (skip_fixed_comments): Fix typo in comment preceding
1082         function.
1083
1084 2004-12-14  Richard Henderson  <rth@redhat.com>
1085
1086         * gfortran.h (gfc_expr.function.name): Make const.
1087         (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1088         (gfc_get_string): Update prototype.
1089         * iresolve.c: Include tree.h.
1090         (string_node, HASH_SIZE, string_head, hash): Remove.
1091         (gfc_get_string): Use vsnprintf, get_identifier.
1092         (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1093         * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
1094         (gfc_done_1): Don't call gfc_iresolve_done_1.
1095         * module.c (mio_allocated_string): Take and return const char *,
1096         instead of modifying char**.
1097         (mio_expr): Update to match.
1098         * resolve.c (pure_function): Constify name argument.
1099         (resolve_function): Constify name.
1100         * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
1101
1102 2004-12-12  Richard Henderson  <rth@redhat.com>
1103
1104         * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
1105         gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
1106         gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
1107         gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
1108         gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
1109         gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
1110         gfc_resolve_unpack: Use PREFIX.
1111
1112 2004-12-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1113
1114         PR fortran/18869
1115         * match.c (gfc_match_common): Skip whitespace.
1116
1117 2004-12-12  Steven G. Kargl  <kargls@comcast.net>
1118
1119         PR fortran/16581
1120         * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
1121         gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
1122         integer kind check; Issue error for -std=f95 when needed.
1123         * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
1124         GFC_STD_F95.
1125         * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
1126         Promote arguments to same kind.
1127
1128 2004-12-12  Steven G. Kargl  <kargls@comcast.net>
1129         Paul Brook  <paul@codesourcery.com>
1130
1131         PR fortran/16222
1132         * resolve.c (gfc_resolve_iterator_expr): New function.
1133         (gfc_resolve_iterator): Use it.  Add real_ok argument.  Convert
1134         start, end and stride to correct type.
1135         (resolve_code): Pass extra argument.
1136         * array.c (resolve_array_list): Pass extra argument.
1137         * gfortran.h (gfc_resolve): Add prototype.
1138         * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
1139         Handle real type iterators.
1140
1141 2004-12-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1142
1143         PR fortran/17175
1144         * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
1145         same kind as C's 'int'.
1146         (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
1147
1148 2004-12-08  Richard Henderson  <rth@redhat.com>
1149
1150         * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
1151         to the output expression.
1152         * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
1153         warning conversion.
1154         (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
1155         to index kind.
1156
1157 2004-12-08  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1158
1159         PR fortran/18826
1160         * resolve.c (resolve_code): Impose correct restrictions on
1161         assigned variable.
1162
1163         * decl.c (gfc_match_end): Use locus of END when eos is an error.
1164
1165 2004-12-02  Steven G. Kargl  <kargls@comcast.net>
1166         Paul Brook  <paul@codesourcery.com>
1167
1168         * check.c (gfc_check_flush, gfc_check_fnum): New functions.
1169         (gfc_check_fstat, gfc_check_fstat_sub): New functions.
1170         (gfc_check_stat, gfc_check_stat_sub): New functions.
1171         * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
1172         * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
1173         fstat, and stat to intrinsics symbol tables.
1174         * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
1175         (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
1176         * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
1177         (gfc_resolve_stat, gfc_resolve_flush): New functions.
1178         (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
1179         * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
1180
1181 2004-12-02  Steven G. Kargl  <kargls@comcast.net>
1182
1183         * intrinsic.c: Fix and add comments, fix function declarations
1184         (OPTIONAL,REQUIRED): New symbols
1185         (add_functions,add_subroutines): Use symbols
1186         (gmp.h): Remove unused include
1187
1188 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
1189
1190         * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
1191         in diagnostics.
1192
1193 2004-11-24  Steven Bosscher  <stevenb@suse.de>
1194
1195         * options.c (gfc_post_options): Don't clear flag_inline_functions.
1196
1197 2004-11-20  Steven G. Kargl  <kargls@comcast.net>
1198
1199         * check.c (gfc_check_getcwd_sub): Fix seg fault.
1200
1201         * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
1202         gfc_check_unlink,gfc_check_unlink_sub): New functions
1203         * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
1204         * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
1205         exit to intrinsics symbol tables.
1206         * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
1207         gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
1208         gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
1209         gfc_resolve_unlink_sub): Add and sort prototypes.
1210         * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
1211         gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
1212         * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
1213
1214 2004-11-16  Paul Brook  <paul@codesourcery.com>
1215
1216         PR fortran/13010
1217         * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
1218         (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
1219         * trans-types.c (gfc_get_dtype): Accept array type rather than element
1220         type.
1221         (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
1222         (gfc_get_array_type_bounds): Ditto.
1223         (gfc_get_derived_type): Recurse into derived type pointers.
1224         * trans-types.h (gfc_get_dtype): Add prototype.
1225         * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
1226
1227 2004-11-15  Paul Brook  <paul@codesourcery.com>
1228
1229         * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
1230
1231 2004-11-10  Paul Brook  <paul@codesourcery.com>
1232
1233         PR fortran/18375
1234         * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
1235         * trans-io.c (transfer_array_component): Ditto.
1236
1237 2004-11-10  Paul Brook  <paul@codesourcery.com>
1238
1239         * invoke.texi: Fix typo.
1240
1241 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
1242
1243         * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
1244         gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
1245         module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
1246         trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
1247         trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
1248
1249 2004-11-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1250
1251         PR fortran/18023
1252         * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
1253
1254 2004-11-06  Kazu Hirata  <kazu@cs.umass.edu>
1255
1256         * gfortranspec.c: Replace GNU CC with GCC.
1257
1258 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1259
1260         * gfortranspec.c (lang_specific_driver): Change year to 2004.
1261
1262 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1263
1264         PR fortran/18111
1265         *  trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
1266         hidden parameters.
1267
1268 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1269
1270         PR fortran/15164
1271         * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
1272         module procedures as if they were module variables.
1273
1274 2004-11-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1275
1276         PR fortran/17535
1277         PR fortran/17583
1278         PR fortran/17713
1279         * module.c (write_symbol1): Set module_name for dummy arguments.
1280
1281 2004-11-02  Paul Brook  <paul@codesourcery.com>
1282
1283         * intrinsic.c (check_intrinsic_standard): Include error locus.
1284         Remove VLA.
1285         (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
1286         locus to check_intrinsic_standard.
1287
1288 2004-10-31  Janne Blomqvist  <jblomqvi@cc.hut.fi>
1289
1290         PR fortran/17590
1291         * gfortran.h: Change GFC_STD_* flags to more appropriate
1292         ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
1293         gfc_option_t): Add field for warning about use of nonstandard
1294         intrinsics.
1295         * intrinsic.c (add_sym): Add parameter for standard version, check
1296         this against current standard.
1297         (add_sym_0): Pass standard parameter to add_sym.
1298         (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
1299         (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
1300         (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
1301         (make_generic): Add parameter for standard, check this
1302         against currently selected standard.
1303         (add_functions, add_subroutines): Add parameter to tell which
1304         standard an intrinsic belongs to.
1305         (check_intrinsic_standard): New function.
1306         (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
1307         (gfc_intrinsic_sub_interface): Ditto.
1308         * lang.opt: Add Wnonstd-intrinsics option.
1309         * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
1310         init new warning.
1311         (set_Wall): Add warning about nonstd intrinsics.
1312         (gfc_handle_option): Change to use new GFC_STD_* flags,
1313         handle new warning.
1314         * invoke.texi: Update manual to include -Wnonstd-intrinsics.
1315
1316 2004-10-30  Andrew Pinski  <pinskia@physics.uc.edu>
1317
1318         * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
1319
1320 2004-10-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1321
1322         * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
1323
1324 2004-10-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1325
1326         * trans.c (gfc_trans_code): Set global locus after recursing. Fix
1327         comment typo.
1328
1329 2004-10-30  Canqun Yang  <canqun@nudt.edu.cn>
1330
1331         * check.c (gfc_check_rand): Allow missing optional argument.
1332         (gfc_check_irand): Ditto.
1333         * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
1334
1335 2004-10-28  Scott Robert Ladd  <scott.ladd@coyotegulch.com>
1336
1337         PR fortran/13490, PR fortran/17912
1338         * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
1339         * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
1340         * gcc/fortran/arith.c: Added support for an "asymmetric integer"
1341         warning when compiling with pedantic.
1342         * gcc/fortran/arith.c: Set minimum integer values to reflect
1343         realities of two's complement signed integers. Added
1344         pedantic minimum.
1345
1346 2004-10-17  Andrew Pinski  <pinskia@physics.uc.edu>
1347
1348         * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
1349         (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
1350         link it in.
1351
1352 2004-10-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1353
1354         * trans-decl.c (generate_local_decl): Simplify logic, fix comment
1355         typo.
1356         (gfc_generate_function_code): Fix formatting issue.
1357
1358 2004-10-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1359
1360         * module.c: Fix formatting issues.
1361
1362 2004-10-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1363
1364         * module.c (mio_interface_rest): Set where member of interface
1365         while loading.
1366
1367 2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
1368
1369         PR fortran/17901
1370         * options.c (gfc_handle_option): Add break after handing the
1371         J/M option.
1372
1373 2004-10-08  Tobias Schlueter  <tobias.shclueter@physik.uni-muenchen.de>
1374
1375         * arith.c: Fix formatting issues.
1376
1377 2004-10-07  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1378
1379         PR fortran/17676
1380         * resolve.c (resolve_operator): Use correct operator name in message.
1381
1382 2004-10-07  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1383
1384         * primary.c (match_boz_constant): Allow kind parameter suffixes.
1385         Move standard warning further to the front.
1386
1387 2004-10-07  Kazu Hirata  <kazu@cs.umass.edu>
1388
1389         * trans-stmt.c: Fix a comment typo.
1390
1391 2004-10-07  Paul Brook  <paul@codesourcery.com>
1392
1393         PR fortran/17678
1394         * trans-array.c (gfc_trans_deferred_array): Leave use associated
1395         variables alone.
1396
1397 2004-10-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1398
1399         PR fortran/17568
1400         * simplify.c (twos_complement): New function.
1401         (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
1402
1403         * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
1404
1405 2004-10-06  Paul Brook  <paul@codesourcery.com>
1406
1407         * trans-stmt.c (gfc_trans_simple_do): New function.
1408         (gfc_trans_do): Use it.  Evaluate iteration bounds before entering
1409         loop.  Update comments.
1410
1411 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1412
1413         PR fortran/17283
1414         * iresolve.c (gfc_resolve_pack): Choose function depending if mask
1415         is scalar.
1416
1417         PR fortran/17631
1418         * intrinsic.c (add_sym_5): Remove.
1419         (add_subroutines): Add resolution function for MVBITS.
1420         * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
1421         MVBITS
1422         * iresolve.c (gfc_resolve_mvbits): New function.
1423         (gfc_resolve_random_number): Remove empty line at end of function.
1424
1425         * trans-const.c (gfc_build_cstring_const): New function.
1426         (gfc_init_cst): Use new function.
1427         * trans-const.h (gfc_build_cstring_const): Add prototype.
1428         * trans-io.c (set_string, set_error_locus): Use new function.
1429         * trans-stmt.c (gfc_trans_goto): Use new function.
1430
1431         PR fortran/17708
1432         * parse.c (accept_statement): Don't treat END DO like END IF and
1433         END SELECT.
1434         (parse_do_block): Generate possible END DO label inside END DO
1435         block.
1436
1437         PR fortran/17776
1438         * check.c (gfc_check_system_sub): New function.
1439         * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
1440         * intrinsic.c (add_functions): Add 'system'.
1441         (add_subroutines): Add 'system'.
1442         * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
1443         Move prototypes to other suborutines.
1444         (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
1445         Add prototype.
1446         (gfc_resolve_system_clock): Fix formatting of prototype.
1447         * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
1448         functions.
1449         * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
1450         GFC_ISYM_SYSTEM.
1451
1452 2004-10-04  Erik Schnetter  <schnetter@aei.mpg.de>
1453
1454         * scanner.c (preprocessor_line): Accept preprocessor lines without
1455         file names.  Check file names for closing quotes.  Handle escaped
1456         quotes in file names.
1457
1458 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1459         Paul Brook  <paul@codesourcery.com>
1460
1461         * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
1462         Use gfc_get_expr_charlen.
1463         * trans-expr.c (gfc_get_expr_charlen): New function.
1464         * trans.h (gfc_get_expr_charlen): Add prototype.
1465
1466 2004-10-04  Kazu Hirata  <kazu@cs.umass.edu>
1467
1468         * trans-intrinsic.c: Fix a comment typo.
1469
1470 2004-10-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1471
1472         * simplify.c (range_check): Remove blank line at beginning of function.
1473         (gfc_simplify_dint): Same at end of function.
1474         (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
1475         (gfc_simplify_bound): Fix indentation.
1476         (gfc_simplify_log10): Simplify calculation.
1477         (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
1478         of function.
1479         (gfc_simplify_nearest): Same at end of function.
1480         (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
1481         function.
1482         (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
1483         gfc_simplify_spacing): Simplify calulations.
1484
1485 2004-10-03  Feng Wang  <fengwang@nudt.edu.cn>
1486
1487         * trans-intrinsic.c: Fix comments on spacing and rrspacing
1488         (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
1489
1490 2004-10-01  Jan Hubicka  <jh@suse.cz>
1491
1492         * f95-lang.c (gfc_expand_function): Update call of
1493         tree_rest_of_compilation.
1494         * trans-decl.c (gfc_generate_constructors): Likewise.
1495
1496 2004-09-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1497
1498         * trans-intrinsic.c: Comment fixes.
1499
1500 2004-09-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1501
1502         * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
1503
1504 2004-09-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1505
1506         * trans-types.c (gfc_return_by_reference): Remove superfluous
1507         assertion.
1508
1509         * intrinsic.h (gfc_resolve_getcwd): Update prototype.
1510         * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
1511
1512         PR fortran/17615
1513         * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
1514         function to determine return type.
1515
1516 2004-09-20  Jan Hubicka  <jh@suse.cz>
1517
1518         * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
1519         tree.
1520         (gfc_generate_function_code): Likewise.
1521
1522 2004-09-20  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1523
1524         PR fortran/15957
1525         * simplify.c (gfc_simplify_reshape): Set shape of return value
1526         correctly.
1527
1528 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
1529             Zack Weinberg  <zack@codesourcery.com>
1530
1531         * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
1532         enumeration constants.
1533
1534 2004-09-17  Paul Brook  <paul@codesourcery.com>
1535
1536         * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
1537         (gfc_linebuf_header_size): Define.
1538         * scanner.c (load_file): Use it.
1539
1540 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
1541
1542         * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
1543         interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
1544         resolve.c, scanner.c, trans-array.c, trans-array.h,
1545         trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
1546         trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1547         trans.h: Fix comment typos.  Follow spelling conventions.
1548
1549 2004-09-16  Victor Leikehman  <lei@il.ibm.com>
1550
1551         PR/15364
1552         * trans-io.c (transfer_array_component): New function.
1553         (transfer_expr): For array fields, call transfer_array_component.
1554
1555 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
1556
1557         * gfortran.texi: Fix a typo.
1558
1559 2004-09-15  Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1560
1561         * parse.c (eof_buf): Rename eof to eof_buf.
1562         (unexpected_eof): Same.
1563         (gfc_parse_file): Same.
1564
1565 2004-09-15  Steven G. Kargl  <kargls@comcast.net>
1566
1567         * check.c (gfc_check_getcwd_sub): New function.
1568         * gfortran.h (GFC_ISYM_GETCWD): New symbol.
1569         * intrinsic.c (add_functions): Add function definition;
1570         Use symbol.
1571         * intrinsic.c (add_subroutines): Add subroutine definitions.
1572         * intrinsic.h: Add prototypes.
1573         * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
1574         New functions.
1575         * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
1576
1577 2004-09-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1578
1579         PR fortran/16485
1580         * module.c (write_symbol): Don't fill in module name here.
1581         (write_symbol0): Fill in here instead.
1582
1583 2004-09-14  Kazu Hirata  <kazu@cs.umass.edu>
1584
1585         * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
1586         trans-array.c, trans-common.c, trans-expr.c,
1587         trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
1588         comment typos.  Follow spelling conventions.
1589
1590 2004-09-09  Paul Brook  <paul@codesourcery.com>
1591
1592         * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
1593
1594 2004-09-08  Paul Brook  <paul@codesourcery.com>
1595
1596         * array.c: Don't include assert.h.
1597         * data.c: Don't include assert.h.  Replace assert and abort with
1598         gcc_assert and gcc_unreachable.
1599         * dependency.c: Ditto.
1600         * f95-lang.c: Ditto.
1601         * iresolve.c: Ditto.
1602         * resolve.c: Ditto.
1603         * simplify.c: Ditto.
1604         * symbol.c: Ditto.
1605         * trans-array.c: Ditto.
1606         * trans-common.c: Ditto.
1607         * trans-const.c: Ditto.
1608         * trans-decl.c: Ditto.
1609         * trans-expr.c: Ditto.
1610         * trans-intrinsic.c: Ditto.
1611         * trans-io.c: Ditto.
1612         * trans-stmt.c: Ditto.
1613         * trans-types.c: Ditto.
1614         * trans.c: Ditto.
1615
1616 2004-09-07  Per Bothner  <per@bothner.com>
1617         Paul Brook  <paul@codesourcery.com>
1618
1619         * error.c (show_locus): Handle mapped locations.
1620         * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
1621         * gfortran.h: Include input.h.
1622         (struct gfc_linebuf): Use source_location.
1623         * scanner.c (get_file): Initialize linemap.
1624         (preprocessor_line): Pass extra argument to get_file.
1625         (load_file): Ditto.  Setup linemap.
1626         (gfc_new_file): Handle mapped locations.
1627         * trans-common.c (build_field, build_equiv_decl, build_common_decl):
1628         Set decl source locations.
1629         (gfc_trans_common): Set blank common block location.
1630         * trans-decl.c (gfc_set_decl_location): New function.
1631         (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
1632         (trans_function_start): Move call to gfc_set_backend_locus..
1633         (build_function_decl): ... to here.
1634         (build_entry_thunks): Set and restore the backend locus.
1635         (gfc_generate_constructors): Remove excess arguments to
1636         init_function_start.
1637         (gfc_generate_block_data): Add comments.  Set the decl locus.
1638         * trans-io.c (set_error_locus): Handle mapped locations.
1639         * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
1640         (gfc_trans_code): Use SET_EXPR_LOCATION.
1641         (gfc_generate_code): Override the location of the new symbol.
1642         * trans.h (gfc_set_decl_location): Add prototype.
1643
1644 2004-08-31  Paul Brook  <paul@codesourcery.com>
1645
1646         * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
1647
1648 2004-09-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1649
1650         PR fortran/15327
1651         * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
1652         strings.
1653
1654 2004-09-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1655
1656         PR fortran/16400
1657         PR fortran/16404
1658         (port from g95)
1659         * resolve.c (resolve_transfer): New function.
1660         (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
1661
1662 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1663
1664         PR fortran/16579
1665         * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
1666         unsigned char.
1667
1668 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1669
1670         * CONTRIB, NEWS, README, TODO: Remove obsolete files.
1671
1672 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1673
1674         PR fortran/17244
1675         * trans-types.c (gfc_return_by_reference): Remove TODO error,
1676         add comment pointing out possible issue WRT compatibility with g77.
1677
1678 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1679
1680         * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
1681         all occurences of 'gfc_strlen_type_node' by
1682         'gfc_charlen_type_node'.
1683         * trans-types.h: Same. Also update comment accordingly.
1684
1685 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1686
1687         * primary.c: Update copyright boilerplate to say GCC.
1688         * f95-lang.c: Change initial comment to say gfortran.
1689
1690 2004-08-31  Paul Brook  <paul@codesourcery.com>
1691
1692         * trans-types.h: Add comments.
1693         (intmax_type_node, string_type_node, const_string_type_node): Remove.
1694
1695 2004-08-30  Richard Henderson  <rth@redhat.com>
1696
1697         * Make-lang.in (fortran/f95-lang.o): Update dependencies.
1698         (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
1699         * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
1700         c_long, c_long_long.
1701         (gfc_logical_info): Add c_bool.
1702         (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
1703         * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
1704         rather than gfc_int[48]_type_node for allocate choice.
1705         * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
1706         local copies of some kind type nodes.
1707         (gfc_build_builtin_function_decls): Likewise.
1708         * trans-expr.c (gfc_conv_power_op): Likewise.
1709         * trans-intrinsic.c (gfc_conv_intrinsic_index,
1710         gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
1711         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
1712         * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
1713         gfc_trans_character_select, gfc_trans_allocate): Likewise.
1714         * trans-io.c (gfc_pint4_type_node): Move into ...
1715         (gfc_build_io_library_fndecls): ... here.  Cache local copies of
1716         some kind type nodes.
1717         * trans-types.c (gfc_type_nodes): Remove.
1718         (gfc_character1_type_node, gfc_strlen_type_node): New.
1719         (gfc_integer_types, gfc_logical_types): New.
1720         (gfc_real_types, gfc_complex_types): New.
1721         (gfc_init_kinds): Fill in real mode_precision.
1722         (gfc_build_int_type, gfc_build_real_type): New.
1723         (gfc_build_complex_type, gfc_build_logical_type): New.
1724         (c_size_t_size): New.
1725         (gfc_init_types): Loop over kinds.
1726         (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
1727         (gfc_get_complex_type, gfc_get_logical_type): Likewise.
1728         (gfc_get_character_type_len): Likewise.
1729         (gfc_type_for_size): Loop over kinds; use a reduced set of
1730         unsigned type nodes.
1731         (gfc_type_for_mode): Loop over kinds.
1732         (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
1733         (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
1734         * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
1735         F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
1736         F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
1737         F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
1738         F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
1739         F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
1740         gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
1741         gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
1742         gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
1743         gfc_complex8_type_node, gfc_complex16_type_node,
1744         gfc_logical1_type_node, gfc_logical2_type_node,
1745         gfc_logical4_type_node, gfc_logical8_type_node,
1746         gfc_logical16_type_node, gfc_strlen_kind): Remove.
1747         (gfc_character1_type_node): Turn in to a variable.
1748         (gfc_strlen_type_node): Likewise.
1749
1750 2004-08-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1751
1752         * gfortran.h (gfc_namespace): Add new field is_block_data.
1753         * parse.c (accept_statement): Remove special handling for BLOCK DATA.
1754         (parse_block_data): Record BLOCK DATA name, set is_block_data field.
1755         * trans.c (gfc_generate_code): Handle BLOCK DATA units.
1756         * trans.h (gfc_generate_block_data): Add prototype.
1757         * trans-decl.c (gfc_generate_block_data): New function.
1758
1759 2004-08-29  Richard Henderson  <rth@redhat.com>
1760
1761         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
1762         * trans-types.c (gfc_init_kinds): Reject integer kinds larger
1763         than two HOST_WIDE_INT.
1764
1765 2004-08-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1766
1767         PR fortran/13910
1768         * decl.c (free_variable, free_value, gfc_free_data, var_list,
1769         var_element, top_var_list, match_data_constant, top_val_list,
1770         gfc_match_data): Move here from match.c.
1771         (match_old_style_init): New function.
1772         (variable_decl): Match old-style initialization.
1773         * expr.c (gfc_get_variable_expr): New function.
1774         * gfortran.h (gfc_get_variable_expr): Add prototype.
1775         * gfortran.texi: Start documentation for supported extensions.
1776         * match.c: Remove the functions moved to decl.c.
1777         * match.h (gfc_match_data): Move prototype to under decl.c.
1778         * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
1779         comments.
1780
1781 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
1782         Paul Brook  <paul@codesourcery.com>
1783
1784         * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
1785         * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
1786         (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1787         (build_builtin_fntypes): New function.
1788         (gfc_init_builtin_functions): Use it.
1789         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
1790         and GFC_ISYM_ERF{,C}.
1791         (gfc_c_int_kind): Declare.
1792         * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
1793         * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
1794         gfc_resolve_g77_math1): Add prototypes.
1795         * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
1796         * mathbuiltins.def: Add comment.  Change third argument.  Use
1797         DEFINE_MATH_BUILTIN_C.  Add bessel and error functions.
1798         * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
1799         (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1800         * trans-types.c (gfc_c_int_kind): Declare.
1801         (gfc_init_kinds): Set it.
1802
1803 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
1804         Paul Brook  <paul@codesourcery.com>
1805
1806         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
1807         (gfc_check_f, gfc_simplify_f): Add f0.
1808         * intrinsic.c (do_check): Call f0.  Flatten.
1809         (add_sym_0): Fix prototype.  Set f0.
1810         (add_functions): Add getgid, getgid and getuid.
1811         (resolve_intrinsic): Remove obsolete comment.
1812         (do_simplify): Call f0.
1813         * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
1814         gfc_resolve_getuid): Add prototypes.
1815         * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
1816         gfc_resolve_getuid): New functions.
1817         * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
1818         GFC_ISYM_GET?ID.
1819
1820 2004-08-28  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1821
1822         * error.c (gfc_error_init_1): Remove blank line in front of
1823         function body. Add missing blank.
1824         (gfc_buffer_error, error_char, error_string): Remove blank line in
1825         front of function body.
1826         (show_locus): Add comma in comment.
1827         (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
1828         gfc_push_error, gfc_pop_error): Remove blank line in front of
1829         function body.
1830         (gfc_get_errors): Typo fix in comment in front of function. Remove
1831         blank line in front of function body.
1832
1833 2004-08-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1834
1835         * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
1836         variable declaration of same name.
1837         * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
1838         intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
1839         resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
1840         Replace all calls to gfc_default_*_kind with variable accesses.
1841         * trans-types.c: Same as above.
1842         (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
1843         static qualifier. Replace all occurences.
1844         (gfc_default_*_kind): Remove functions.
1845
1846 2004-08-26  Richard Henderson  <rth@redhat.com>
1847
1848         * arith.c: Include system.h, not real system headers.
1849         (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
1850         DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
1851         GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
1852         GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
1853         (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
1854         gfc_index_integer_kind, gfc_default_integer_kind,
1855         gfc_default_real_kind,gfc_default_double_kind,
1856         gfc_default_character_kind, gfc_default_logical_kind,
1857         gfc_default_complex_kind, validate_integer, validate_real,
1858         validate_logical, validate_character,
1859         gfc_validate_kind): Move to trans-types.c.
1860         (gfc_set_model_kind): Use gfc_validate_kind.
1861         (gfc_set_model): Just copy the current precision to default.
1862         (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
1863         * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
1864         * gfortran.h: Update file commentary.
1865         * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
1866         (gfc_default_integer_kind_1, gfc_default_real_kind_1,
1867         gfc_default_double_kind_1, gfc_default_character_kind_1,
1868         gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
1869         (gfc_init_kinds): New.
1870         (gfc_init_types): Don't set gfc_index_integer_kind here.
1871         * trans-types.h (gfc_init_kinds): Declare.
1872         * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
1873
1874 2004-08-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1875
1876         * check.c (gfc_check_atan2): New function.
1877         * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
1878         * intrinsic.h (gfc_check_atan2): Add prototype.
1879
1880 2004-08-25  Richard Henderson  <rth@redhat.com>
1881
1882         * arith.c (gfc_validate_kind): Add may_fail argument; abort if
1883         false and we don't validate the kind.
1884         (gfc_check_integer_range, gfc_check_real_range): Update to match.
1885         * check.c (kind_check): Likewise.
1886         * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
1887         (match_char_spec, match_logical_spec): Likewise.
1888         * gfortran.h (gfc_validate_kind): Likewise.
1889         * options.c (gfc_handle_option): Likewise.
1890         * primary.c (match_integer_constant, match_real_constant,
1891         match_string_constant, match_logical_constant,
1892         match_const_complex_part): Likewise.
1893         * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
1894         gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
1895         gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
1896         gfc_simplify_maxexponent, gfc_simplify_minexponent,
1897         gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
1898         gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
1899         gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
1900         gfc_simplify_tiny): Likewise.
1901         * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
1902         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1903         prepare_arg_info): Likewise.
1904
1905 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1906
1907         * expr.c (gfc_check_assign): Add comment. Add new warning.
1908         * trans-expr.c (gfc_conv_function_call): Correctly dereference
1909         result of pointer valued function when not in pointer assignment.
1910
1911 2004-08-25  Paul Brook  <paul@codesourcery.com>
1912
1913         * config-lang.in: Remove dead commented line.
1914         * module.c: Replace g95 with gfortran in comment.
1915
1916 2004-08-25  Paul Brook  <paul@codesourcery.com>
1917
1918         PR fortran/17190
1919         * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
1920
1921 2004-08-25  Paul Brook  <paul@codesourcery.com>
1922
1923         PR fortran/17144
1924         * trans-array.c (gfc_trans_allocate_temp_array): Remove
1925         string_length argument.
1926         (gfc_trans_array_ctor_element): New function.
1927         (gfc_trans_array_constructor_subarray): Use it.
1928         (gfc_trans_array_constructor_value): Ditto.  Handle constant
1929         character arrays.
1930         (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
1931         (gfc_trans_array_constructor): Use them.
1932         (gfc_add_loop_ss_code): Update to new gfc_ss layout.
1933         (gfc_conv_ss_descriptor): Remember section string length.
1934         (gfc_conv_scalarized_array_ref): Ditto.  Remove dead code.
1935         (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
1936         (gfc_conv_expr_descriptor): Ditto.
1937         (gfc_conv_loop_setup): Ditto.  Spelling fixes.
1938         * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
1939         * trans-const.c (gfc_conv_constant):  Update to new gfc_ss layout.
1940         * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
1941         (gfc_conv_variable): Set string_length from section.
1942         (gfc_conv_function_call): Remove extra argument.
1943         (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
1944         * trans-types.c (gfc_get_character_type_len): New function.
1945         (gfc_get_character_type): Use it.
1946         (gfc_get_dtype): Return zero for internal types.
1947         * trans-types.h (gfc_get_character_type_len): Add prototype.
1948         * trans.h (struct gfc_ss): Move string_length out of union.
1949
1950 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1951
1952         * trans.h (build2_v, build3_v): New macros.
1953         (build_v): Remove.
1954         * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
1955         build.
1956         * trans-array.c (gfc_conv_descriptor_data,
1957         gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
1958         gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
1959         gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
1960         gfc_trans_allocate_temp_array,
1961         gfc_trans_array_constructor_subarray,
1962         gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
1963         gfc_trans_array_bound_check, gfc_conv_array_index_offset,
1964         gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
1965         gfc_conv_array_ref, gfc_trans_preloop_setup,
1966         gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
1967         gfc_conv_loop_setup, gfc_array_init_size,
1968         gfc_conv_array_initializer, gfc_trans_array_bounds,
1969         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1970         gfc_conv_expr_descriptor, gfc_conv_array_parameter,
1971         gfc_trans_deferred_array): Use buildN and buildN_v macros instead
1972         of build and build_v as appropriate.
1973         * trans-common.c (create_common): Same.
1974         * trans-decl.c (gfc_trans_auto_character_variable,
1975         gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
1976         * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
1977         gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
1978         gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
1979         gfc_conv_expr_op, gfc_conv_function_call,
1980         gfc_trans_structure_assign): Same.
1981         * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
1982         gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
1983         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1984         gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
1985         gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
1986         gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
1987         gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
1988         gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
1989         gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
1990         gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
1991         gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
1992         gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
1993         gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
1994         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
1995         gfc_conv_intrinsic_iargc): Same.
1996         * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
1997         set_flag, add_case, io_result, transfer_namelist_element,
1998         transfer_expr): Same.
1999         * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
2000         gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
2001         gfc_trans_integer_select, gfc_trans_logical_select,
2002         gfc_trans_character_select, gfc_trans_forall_loop,
2003         gfc_trans_nested_forall_loop, gfc_do_allocate,
2004         generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
2005         compute_inner_temp_size, compute_overall_iter_number,
2006         allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
2007         gfc_trans_forall_1, gfc_evaluate_where_mask,
2008         gfc_trans_where_assign, gfc_trans_allocate): Same.
2009         * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
2010         * trans.c (gfc_add_modify_expr, gfc_finish_block,
2011         gfc_build_array_ref, gfc_build_function_call,
2012         gfc_trans_runtime_check): Same.
2013
2014 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2015
2016         * trans-const.c (gfc_conv_mpz_to_tree): Change call to
2017         build_int_cst to build_int_cst_wide in accordance to Nathan's
2018         previous patch.
2019
2020 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
2021
2022         * trans-array.c (gfc_trans_array_constructor_value): Adjust
2023         build_int_cst calls.
2024         * trans-const.c (gfc_build_string_const, gfc_init_constants,
2025         gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
2026         * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
2027         gfc_trans_entry_master_switch): Likewise.
2028         * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2029         gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2030         * trans-io.c (add_case, set_error_locus,
2031         transfer_namelist_element, transfer_expr): Likewise.
2032         * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2033         gfc_trans_stop, gfc_trans_character_select): Likewise.
2034         * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2035         * trans.c (gfc_trans_runtime_check): Likewise.
2036
2037 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2038
2039         * trans-decl.c, trans-types.c: Add and remove blank lines as
2040         required.
2041
2042 2004-08-24  Richard Henderson  <rth@redhat.com>
2043
2044         * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
2045
2046 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2047
2048         * resolve.c (merge_argument_lists): Revert unintentionally
2049         committed change.
2050
2051 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2052
2053         * trans-decl.c (build_function_decl): Fix spelling in comment.
2054         (build_entry_thunks): Remove code with no function.
2055         (gfc_build_intrinsic_function_decls): Remove empty line.
2056
2057         * resolve.c (resolve_entries): Fix a bunch of comment typos.
2058
2059 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
2060
2061         * f95-lang.c (gfc_init_decl_processing): Adjust
2062         build_common_tree_nodes call.
2063
2064 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2065
2066         * trans-types.c: Spelling and formatting fixes.
2067
2068 2004-08-23  Richard Henderson  <rth@redhat.com>
2069
2070         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
2071         of going through an intermediate string.  Fix 32/64 int/long bug.
2072
2073 2004-08-23  Eric Christopher  <echristo@redhat.com>
2074
2075         * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
2076         usage. Use build_vector_type_for_mode for vector types.
2077
2078 2004-08-22  Richard Henderson  <rth@redhat.com>
2079
2080         PR 13465
2081         * data.c (find_con_by_offset): Search ordered list; handle
2082         elements with repeat counts.
2083         (gfc_assign_data_value_range): New.
2084         * gfortran.h (struct gfc_data_value): Make repeat unsigned.
2085         (gfc_assign_data_value_range): Declare.
2086         * match.c (top_val_list): Extract repeat count into a temporary.
2087         * resolve.c (values): Make left unsigned.
2088         (next_data_value): Don't decrement left.
2089         (check_data_variable): Use gfc_assign_data_value_range.
2090
2091 2004-08-22  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2092
2093         * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
2094
2095 2004-08-22  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2096
2097         * check.c (gfc_check_reduction): Rename to ...
2098         (check_reduction): ... this. Make static. Don't check type of
2099         first argument.
2100         (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
2101         * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
2102         SUM to use new check functions.
2103         (check_specific): Change logic to call new functions.
2104         * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
2105         Add prototypes.
2106         (gfc_check_reduction): Remove prototype.
2107
2108 2004-08-20  Paul Brook  <paul@codesourcery.com>
2109         Canqun Yang  <canqun@nudt.edu.cn>
2110
2111         PR fortran/17077
2112         * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
2113         for automatic arrays.
2114         * trans-types.c (gfc_get_nodesc_array_type): Add comment.
2115
2116 2004-08-19  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2117         (Port from g95)
2118
2119         PR fortran/17074
2120         * match.c (match_simple_forall, match_simple_where): Forward-declare.
2121         (gfc_match_if): Order statement list alphabetically, add WHERE and
2122         FORALL, remove double PAUSE.
2123         (gfc_match_simple_where, match_forall_header,
2124         gfc_match_simple_forall): New functions.
2125         (gfc_match_forall): Use match_forall_header.
2126
2127 2004-08-19  Paul Brook  <paul@codesourcery.com>
2128
2129         PR fortran/17091
2130         * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
2131         * symbol.c (gfc_clear_attr): Use memset.
2132
2133 2004-08-19  Paul Brook  <paul@codesourcery.com>
2134
2135         PR fortran/14976
2136         PR fortran/16228
2137         * data.c (assign_substring_data_value): Remove.
2138         (create_character_intializer): New function.
2139         (gfc_assign_data_value): Track the typespec for the current
2140         subobject.  Use create_character_intializer.
2141
2142 2004-08-19  Erik Schnetter  <schnetter@aei.mpg.de>
2143
2144         PR fortran/16946
2145         * check.c (gfc_check_reduction): New function.
2146         (gfc_check_minval_maxval): Removed.
2147         (gfc_check_product): Removed.
2148         (gfc_check_sum): Removed.
2149         * intrinsic.h: Add/remove declarations for these.
2150         * gfortran.h: Add field f3red to union gfc_check_f.
2151         * intrinsic.c (add_sym_3red): New function.
2152         (add_functions): Register maxval, minval, product, and sum intrinsics
2153         through add_sym_3red.
2154         (check_specific): Handle f3red union field.
2155         * iresolve.c: Whitespace change.
2156
2157 2004-08-18  Paul Brook  <paul@codesourcery.com>
2158
2159         * trans-types.c (gfc_sym_type): Use pointer types for optional args.
2160
2161 2004-08-18  Victor Leikehman  <lei@il.ibm.com>
2162
2163         PR fortran/13278
2164         * trans-io.c (transfer_namelist_element): New. Recursively handle
2165         derived-type variables.  Pass string lengths.
2166         (build_dt): Code moved to build_namelist, with some
2167         changes and additions.
2168         (gfc_build_io_library_fndecls): Declare the fifth
2169         argument in st_set_nml_var_char -- string_length.
2170
2171 2004-08-17  Paul Brook  <paul@codesourcery.com>
2172         Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2173
2174         PR fortran/13082
2175         * decl.c (get_proc_name): Update mystery comment.
2176         (gfc_match_entry): Check for errors earlier.  Add entry point to list.
2177         * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
2178         * gfortran.h (symbol_attribute): Add entry_master.  Document entry.
2179         (struct gfc_entry_list): Define.
2180         (gfc_get_entry_list): Define.
2181         (struct gfc_namespace): Add refs and entries.
2182         (enum gfc_exec_op): Add EXEC_ENTRY.
2183         (struct gfc_code): Add ext.entry.
2184         * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
2185         (mio_symbol_attribute): Don't save/reture addr->entry.
2186         (mio_namespace_ref): Refcount namespaces.
2187         * parse.c (accept_statement): Handle ST_ENTRY.
2188         (gfc_fixup_sibling_symbols): Mark symbol as referenced.
2189         (parse_contained): Fixup sibling references to entry points
2190         after parsing the procedure body.
2191         * resolve.c (resolve_contained_fntype): New function.
2192         (merge_argument_lists, resolve_entries): New functions.
2193         (resolve_contained_functions): Use them.
2194         (resolve_code): Handle EXEC_ENTRY.
2195         (gfc_resolve): Call resolve_entries.
2196         * st.c (gfc_free_statement): Handle EXEC_ENTRY.
2197         * symbol.c (gfc_get_namespace): Refcount namespaces.
2198         (gfc_free_namespace): Ditto.
2199         * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
2200         optional when multiple entry points are present.
2201         * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
2202         (gfc_get_extern_function_decl): Add assertion.  Fix coment.
2203         (create_function_arglist, trans_function_start, build_entry_thunks):
2204         New functions.
2205         (gfc_build_function_decl): Rename ...
2206         (build_function_decl): ... to this.
2207         (gfc_create_function_decl): New function.
2208         (gfc_generate_contained_functions): Use it.
2209         (gfc_trans_entry_master_switch): New function.
2210         (gfc_generate_function_code): Use new functions.
2211         * trans-stmt.c (gfc_trans_entry): New function.
2212         * trans-stmt.h (gfc_trans_entry): Add prototype.
2213         * trans-types.c (gfc_get_function_type): Add entry point argument.
2214         * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
2215         (gfc_generate_module_code): Call gfc_create_function_decl.
2216         * trans.h (gfc_build_function_decl): Remove.
2217         (gfc_create_function_decl): Add prototype.
2218
2219 2004-08-15  Andrew Pinski  <apinski@apple.com>
2220
2221         PR fortran/17030
2222         * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
2223         for cabs{,f} and copysign{,f}.
2224         * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
2225         (gfor_fndecl_math_cabs): Delete.
2226         (gfor_fndecl_math_sign4): Delete.
2227         (gfor_fndecl_math_sign8): Delete.
2228         (gfc_build_intrinsic_function_decls): Remove the
2229         initializing of cabs{,f} and copysign{,f} functions.
2230         * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
2231         instead of the functions definitions.
2232         (gfc_conv_intrinsic_sign): Likewise.
2233         * trans.h (gfor_fndecl_math_cabsf): Delete.
2234         (gfor_fndecl_math_cabs): Delete.
2235         (gfor_fndecl_math_sign4): Delete.
2236         (gfor_fndecl_math_sign8): Delete.
2237
2238 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
2239
2240         * trans-array.c (gfc_trans_array_constructor_value): Use
2241         build_int_cst.
2242         * trans-const.c (gfc_build_string_const,
2243         gfc_init_constants, gfc_conv_mpz_to_tree,
2244         gfc_conv_constant_to_tree): Likewise.
2245         * trans-decl.c (gfc_get_symbol_decl): Likewise.
2246         * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2247         gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2248         * trans-io.c (add_case, set_error_locus, build_dt,
2249         transfer_expr): Likewise.
2250         * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2251         gfc_trans_stop, gfc_trans_character_select): Likewise.
2252         * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2253         * trans.c (gfc_trans_runtime_check): Likewise.
2254
2255 2004-08-14  Paul Brook  <paul@codesourcery.com>
2256
2257         * trans-decl.c (gfc_build_function_decl): Remove dead code.
2258
2259 2004-08-14  Paul Brook  <paul@codesourcery.com>
2260
2261         * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
2262
2263 2004-08-13  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2264
2265         * gfortran.h: Add comments.
2266         * parse.c (parse_contained): Fix comment typo.
2267         * resolve.c (was_declared): Ditto.
2268         * symbol.c: Ditto.
2269
2270 2004-08-11  Paul Brook  <paul@codeourcery.com>
2271
2272         PR fortran/16917
2273         * intrinsic.c (add_functions): Add dfloat as an alias for dble.
2274
2275 2004-08-10  Richard Henderson  <rth@redhat.com>
2276
2277         * f95-lang.c (gfc_init_builtin_functions): Remove
2278          __builtin_stack_alloc, add __builtin_alloca.
2279         * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
2280         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
2281
2282 2004-08-10  Paul Brook  <paul@codesourcery.com>
2283
2284         * trans-io.c (transfer_expr): Handle pointters.
2285
2286 2004-08-10  Paul Brook  <paul@codesourcery.com>
2287
2288         PR fortran/16919
2289         * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
2290         (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
2291         (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
2292         Handle GFC_SS_COMPONENT.
2293         (gfc_conv_ss_startstride): Ditto.  Set ss->shape.
2294         (gfc_conv_loop_setup): Tweak commends. Remove dead code.
2295         Use ss->shape.
2296         (gfc_conv_array_initializer): Call specific initializer routines.
2297         * trans-expr.c (gfc_trans_structure_assign): New function.
2298         (gfc_trans_subarray_assign): New function.
2299         (gfc_trans_subcomponent_assign): New fucntion
2300         (gfc_conv_structure): Use them.
2301         * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
2302         (gfc_ss): Add shape.
2303
2304 2004-08-08  Victor Leikehman  <lei@il.ibm.com>
2305
2306         * simplify.c (gfc_simplify_shape): Bugfix.
2307         * expr.c (gfc_copy_shape_excluding): New function.
2308         * gfortran.h (gfc_get_shape): Bugfix.
2309         (gfc_copy_shape_excluding): Added declaration.
2310         * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2311         gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
2312         gfc_resolve_ubound, gfc_resolve_transpose): Added compile
2313         time resolution of shape.
2314
2315 2004-08-06  Janne Blomqvist  <jblomqvi@cc.hut.fi>
2316
2317         * intrinsic.c (add_subroutines): Add getenv and
2318         get_environment_variable. (add_sym_5s): New function.
2319         * intrinsic.h (gfc_resolve_get_environment_variable): Add
2320         prototype.
2321         * iresolve.c (gfc_resolve_get_environment_variable): New
2322         function.
2323
2324 2004-08-06  Feng Wang  <fengwang@nudt.edu.cn>
2325
2326         * f95-lang.c (gfc_init_builtin_functions): Fix the number of
2327         __builtin_pow[f] arguments.
2328
2329 2004-08-06  Steven G. Kargl  <kargls@comcast.net>
2330
2331         * arith.c: Add #define for model numbers.  Remove global GMP variables.
2332         (natural_logarithm,common_logarithm,exponential,sine,
2333         cosine,arctangent,hypercos,hypersine ): Remove.
2334         (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
2335         (arctangent2,gfc_arith_init_1,gfc_arith_done_1
2336         gfc_check_real_range, gfc_constant_result, gfc_range_check,
2337         gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
2338         gfc_arith_divide,complex_reciprocal,complex_pow_ui,
2339         gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
2340         gfc_convert_complex,gfc_int2real,gfc_int2complex,
2341         gfc_real2int,gfc_real2real,gfc_real2complex,
2342         gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
2343         to MPFR, use new functions.
2344         * arith.h: Remove extern global variables.
2345         (natural_logarithm,common_logarithm,exponential, sine, cosine,
2346         arctangent,hypercos,hypersine): Remove prototypes.
2347         (arctangent2): Update prototype from GMP to MPFR.
2348         (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
2349         * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
2350         * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
2351         * gfortran.h (GFC_REAL_BITS): Remove.
2352         (arith): Add ARITH_NAN.
2353         Include mpfr.h.  Define GFC_RND_MODE.
2354         Rename GCC_GFORTRAN_H GFC_GFC_H.
2355         (gfc_expr): Convert GMP to MPFR.
2356         * module.c: Add arith.h, correct type in comment.
2357         (mio_gmp_real): Convert GMP to MPFR.
2358         (mio_expr):  Use gfc_set_model_kind().
2359         * primary.c:  Update copyright date with 2004.
2360         (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
2361         * simplify.c: Remove global GMP variables
2362         (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
2363         gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
2364         gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
2365         gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
2366         gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
2367         gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
2368         gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
2369         gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
2370         gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
2371         gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
2372         gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
2373         gfc_simplify_rrspacing,gfc_simplify_scale,
2374         gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
2375         gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
2376         gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
2377         gfc_simplify_init_1,gfc_simplify_done_1):  Convert GMP to MPFR.
2378         Use new functions.
2379         * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
2380         gfc_conv_mpf_to_tree.  Convert it to use MPFR
2381         (gfc_conv_constant_to_tree): Use it.
2382         * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
2383         * trans-intrinsic.c: Add arith.h, remove gmp.h
2384         (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
2385
2386 2004-08-06  Victor Leikehman  <lei@il.ibm.com>
2387         Paul Brook  <paul@codesourcery.com>
2388
2389         * trans-array.c (gfc_trans_allocate_array_storage,
2390         gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
2391         gfc_conv_loop_setup): For functions, if the shape of the result
2392         is not known in compile-time, generate an empty array descriptor for
2393         the result and let the callee to allocate the memory.
2394         (gfc_trans_dummy_array_bias): Do nothing for pointers.
2395         (gfc_conv_expr_descriptor): Use function return values directly.
2396         * trans-expr.c (gfc_conv_function_call): Always add byref call
2397         insn to pre chain.
2398         (gfc_trans_pointer_assignment): Add comments.
2399         (gfc_trans_arrayfunc_assign): Don't chain on expression.
2400
2401 2004-08-01  Roger Sayle  <roger@eyesopen.com>
2402
2403         * options.c (gfc_init_options): Don't warn about the use GNU
2404         extensions by default.
2405         (gfc_post_options): Warn about GNU extensions with -pedantic.
2406         (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
2407
2408 2004-07-30  Richard Henderson  <rth@redhat.com>
2409
2410         * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
2411         for TREE_CONSTANTs.
2412
2413 2004-07-25  Richard Henderson  <rth@redhat.com>
2414
2415         * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
2416         and DECL_IGNORED_P on RESULT_DECL.
2417         (gfc_generate_constructors): Likewise.
2418
2419 2004-07-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2420
2421         PR fortran/16465
2422         * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
2423         options.
2424         (ffixed-line-length-80, ffixed-line-length-132): Remove.
2425         * options.c (gfc_handle_options): Deal with changed options.
2426         * scanner.c (load_line): Change second arg to 'char **',
2427         allocate if pointing to NULL. Keep track of buffer's length.
2428         Adapt buffer size to overlong lines. Pad lines to full length
2429         in fixed form.
2430         (load_file): Adapt to new interface of load_line.
2431
2432 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
2433
2434         * trans.h (builtin_function): Declare.
2435
2436 2004-07-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2437
2438         PR fortran/16404
2439         (parts ported from g95)
2440         * parse.h (gfc_state_data): New field do_variable.
2441         (gfc_check_do_variable): Add prototype.
2442         * parse.c (push_state): Initialize field 'do_variable'.
2443         (gfc_check_do_variable): New function.
2444         (parse_do_block): Remember do iterator variable.
2445         (parse_file): Initialize field 'do_variable'.
2446         * match.c (gfc_match_assignment, gfc_match_do,
2447         gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
2448         Add previously missing checks.
2449         (gfc_match_return): Reformat error message.
2450         * io.c (match_out_tag): New function.
2451         (match_open_element, match_close_element,
2452         match_file_element, match_dt_element): Call match_out_tag
2453         instead of match_vtag where appropriate.
2454         (match_io_iterator, match_io_element): Add missing check.
2455         (match_io): Reformat error message.
2456         (match_inquire_element): Call match_out_tag where appropriate.
2457
2458         * parse.c (gfc_check_do_variable): Fix error locus.
2459
2460 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2461
2462         PR fortran/15129
2463         * trans-decl.c (gfc_build_function_decl): Create a new chardecl
2464         for every assumed length character dummy argument.
2465
2466         PR fortran/15140
2467         * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
2468
2469         PR fortran/13792
2470         * simplify.c (gfc_simplify_bound): Copy the bound expression.
2471
2472 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2473
2474         PR fortran/15324
2475         * trans-array.c gfc_trans_g77_array,
2476         gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
2477         for assumed length characters.
2478         (gfc_conv_expr_descriptor): Set se->string_length if dealing
2479         with a character expression.
2480         (gfc_cvonv_array_parameter): Pass string length when passing
2481         character array according to g77 conventions.
2482
2483 2004-07-12  Paul Brook  <paul@codesourcery.com>
2484
2485         * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
2486         * trans-array.c (gfc_trans_auto_array_allocation): Remove
2487         initialization code.
2488         * trans-common.c (create_common): Use gfc_conv_initializer.
2489         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
2490         * trans-expr.c (gfc_conv_initializer): New function.
2491         (gfc_conv_structure): Use it.
2492         * trans.h (gfc_conv_initializer): Add prototype.
2493
2494 2004-07-11  Paul Brook  <paul@codesourcery.com>
2495
2496         PR fortran/15986
2497         * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
2498         variables.
2499         (parse_contained): Mark contained symbols as referenced.
2500
2501 2004-07-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2502
2503         PR fortran/16455
2504         * module.c (gfc_dump_module, gfc_use_module): Print locus
2505         when opening of module file fails.
2506
2507         PR fortran/16404
2508         * io.c (match_io): Flag 'WRITE(...), ...' as extension.
2509
2510         PR fortran/16404
2511         * match.c (gfc_match_program): A program name is obligatory.
2512         (gfc_match_return): RETURN in main program is an extension.
2513         (gfc_match_block_data): A space is required before a block data
2514         name.
2515
2516         PR fortran/16433
2517         * primary.c (match_boz_constant): Call gfc_notify_std only if
2518         we actually have a non-standard boz-literal-constant.
2519
2520         PR fortran/15754
2521         * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
2522         warning if assigning NULL().
2523
2524 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
2525
2526         * f95-lang.c (set_block): Remove.
2527         (gfc_clear_binding_stack): New.
2528         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
2529         (struct binding_level): Remove block_created_by_back_end.
2530         (clear_binding_level): Likewise.
2531         (poplevel): Don't handle block_created_by_back_end.
2532
2533 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2534
2535         * trans-decl.c (gfc_create_module_variable): Nothing to do if
2536         symbol is in common, because we ...
2537         (gfc_generate_module_vars): Call gfc_trans_common.
2538
2539 2004-07-10  Paul Brook  <paul@codesourcery.com>
2540
2541         * trans-array.c (gfc_build_null_descriptor): New function.
2542         (gfc_trans_static_array_pointer): Use it.
2543         * trans-array.h (gfc_build_null_descriptor): Add prototype.
2544         * trans-expr.c (gfc_conv_structure): Handle array pointers.
2545
2546 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2547
2548         PR fortran/16336
2549         * decl.c (gfc_match_save): Use-associated common block
2550         doesn't collide.
2551         * gfortran.h (gfc_common_head): Add new field 'name'.
2552         Fix typo in comment after #endif.
2553         * match.c (gfc_get_common): Add new argument from_common,
2554         mangle name if flag is set, fill in new field in structure
2555         gfc_common_head.
2556         (match_common): Set new arg in call to gfc_get_common,
2557         use-associated common block doesn't collide.
2558         * match.h (gfc_get_common): Adapt prototype.
2559         * module.c (load_commons): Set new arg in call to
2560         gfc_get_common.
2561         * symbol.c (free_common_tree): New function.
2562         (gfc_free_namespace): Call new function.
2563         * trans-common.c (several functions): Remove argument
2564         'name', use name from gfc_common_head instead.
2565
2566 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2567
2568         * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
2569         and RHS match. Return early if the RHS is NULL().
2570
2571         PR fortran/16336
2572         * match.c (match_common): Fix error reporting for used common.
2573
2574         PR fortran/15969
2575         * trans-expr.c (gfc_conv_structure): Handle initialization
2576         of scalar pointer components.
2577
2578         * parse.c (decode_statement): Fix matching of BLOCK DATA.
2579
2580         * trans-decl.c (generate_local_decl): Remove workaround obsoleted
2581         by fix for PR 15481.
2582
2583 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2584
2585         * trans-common.c: Fix whitespace issues, make variable names
2586         more readable.
2587         (create_common): Additionally, make loop logic more obvious.
2588
2589 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2590         Paul Brook  <paul@codesourcery.com>
2591
2592         PR fortran/13415
2593         * trans-common.c (calculate_length): Remove ...
2594         (get_segment_info): Merge into here.  Save field type.
2595         (build_field): Use saved type.
2596         (create_common, new_condition, new_segment, finish_equivalences):
2597         Use new get_segment_info.
2598         * trans-types.c: Update comment.
2599
2600 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2601
2602         PR fortran/14077
2603         * moduele.c (mio_symbol): Don't I/O initial values unless
2604         symbol is a parameter.
2605
2606 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2607
2608         PR fortran/13201
2609         * resolve.c (resolve_symbol): Verify that the shape of a
2610         parameter array is not only explicit, but also constant.
2611         * array.c (gfc_is_compile_time_shape): New function.
2612         * gfortran.h (gfc_is_compile_time_shape): Add prototype.
2613
2614 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2615
2616         PR fortran/15481
2617         PR fortran/13372
2618         PR fortran/13575
2619         PR fortran/15978
2620         * module.c (write_symbol, write_symtree): Remove workaround.
2621         * primary.c (match_actual_arglist): Enhance comment.
2622         (gfc_match_rvalue): Handle function call with first argument
2623         a keyword argument correctly.
2624         * resolve.c (resolve_symbol): Change call to
2625         gfc_set_default_type to issue error if no implicit type
2626         can be found.
2627         * trans-decl.c (gfc_create_module_variable): Remove workaround.
2628
2629 2004-07-08  Paul Brook  <paul@codesourcery.com>
2630
2631         * intrinsic.c (add_sym_4s): New function.
2632         (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
2633
2634 2004-07-04  Janne Blomqvist  <jblomqvi@cc.hut.fi>
2635         Paul Brook  <paul@codesourcery.com>
2636
2637         PR fortran/15280
2638         PR fortran/15665
2639         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
2640         GFC_ISYM_COMMAND_ARGUMENT_COUNT.
2641         * intrinsic.c (add_functions):  Identify iargc.  Add
2642         command_argument_count.
2643         (add_subroutines): Resolve getarg.  Add get_command and
2644         get_command_argument.
2645         * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
2646         gfc_resolve_get_command_argument): Add prototypes.
2647         * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
2648         gfc_resolve_get_command_argument): New functions.
2649         * trans-decl.c (gfor_fndecl_iargc): New variable.
2650         (gfc_build_intrinsic_function_decls): Set it.
2651         * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
2652         (gfc_conv_intrinsic_function): Use it.
2653         * trans.h (gfor_fndecl_iargc): Declare.
2654
2655 2004-07-04  Matthias Klose  <doko@debian.org>
2656
2657         * Make-lang.in: Generate and install gfortran man page.
2658         * invoke.texi: Remove extra '@c man end'.
2659
2660 2004-07-04  Richard Henderson  <rth@redhat.com>
2661
2662         * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
2663
2664 2004-07-04  Paul Brook  <paul@codesourcery.com>
2665
2666         * decl.c (gfc_match_implicit_range): Don't use typespec.
2667         (gfc_match_implicit): Handle character selectors.
2668         * gfortran.h (gfc_set_implicit): Remove prototype.
2669         (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
2670         * parse.c (accept_statement): Don't call gfc_set_implicit.
2671         * symbol.c (new_ts): Remove.
2672         (gfc_set_implicit_none): Use same loop bounds as other functions.
2673         (gfc_set_implicit): Remove.
2674         (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
2675         (gfc_merge_new_implicit): Combine with gfc_set_implicit.
2676
2677 2004-06-30  Richard Henderson  <rth@redhat.com>
2678
2679         * match.c (var_element): Remove unused variable.
2680
2681         * trans-decl.c (gfc_generate_function_code): Don't set
2682         x_whole_function_mode_p.
2683         (gfc_generate_constructors): Likewise.
2684
2685 2004-06-30  Richard Henderson  <rth@redhat.com>
2686
2687         * trans-decl.c (gfc_generate_function_code): Don't set
2688         immediate_size_expand.
2689         (gfc_generate_constructors): Likewise.
2690
2691 2004-06-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2692
2693         PR fortran/16161
2694         * decl.c (gfc_match_type_spec): Rename second argument to
2695         'implicit_flag', reverse meaning. Don't match_char_spec if
2696         'implicit_flag' is set. Rename to ...
2697         (match_type_spec): ... this.
2698         (gfc_match_implicit_none, match_implicit_range): Move here
2699         from match.c.
2700         (gfc_match_implicit): Move here from match.c, try to
2701         match_char_len if match_implicit_range doesn't succeed for
2702         CHARACTER implicits. Call renamed fucntion match_type_spec.
2703         (gfc_match_data_decl, match_prefix): Call renamed function
2704         match_type_spec.
2705         * match.c (gfc_match_implicit_none, match_implicit_range,
2706         gfc_match_implicit): Move to decl.c.
2707         * match.h (gfc_match_implicit_none, gfc_match_implicit):
2708         Move protoypes to section 'decl.c'.
2709         (gfc_match_type_spec): Remove prototype.
2710
2711 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2712
2713         * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
2714         copyright years.
2715
2716 2004-06-29  Steven Bosscher  <stevenb@suse.de>
2717
2718         Make sure types in assignments are compatible.  Mostly mechanical.
2719         * trans-const.h (gfc_index_one_node): New define.
2720         * trans-array.c (gfc_trans_allocate_array_storage,
2721         gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
2722         gfc_trans_array_constructor_value, gfc_trans_array_constructor,
2723         gfc_conv_array_ubound, gfc_conv_array_ref,
2724         gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
2725         gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
2726         gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
2727         gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
2728         types in assignments, conversions and conditionals for expressions.
2729         * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
2730         gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
2731         gfc_conv_function_call, gfc_trans_pointer_assignment,
2732         gfc_trans_scalar_assign): Likewise.
2733         * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
2734         gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
2735         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
2736         gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
2737         gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
2738         gfc_conv_allocated, gfc_conv_associated,
2739         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
2740         * trans-io.c (set_string): Likewise.
2741         * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
2742         gfc_do_allocate, generate_loop_for_temp_to_lhs,
2743         generate_loop_for_rhs_to_temp, compute_inner_temp_size,
2744         compute_overall_iter_number, gfc_trans_assign_need_temp,
2745         gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
2746         gfc_evaluate_where_mask, gfc_trans_where_assign,
2747         gfc_trans_where_2): Likewise.
2748         * trans-types.c (gfc_get_character_type, gfc_build_array_type,
2749         gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
2750
2751         * trans.c (gfc_add_modify_expr): Add sanity check that types
2752         for the lhs and rhs are the same for scalar assignments.
2753
2754 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2755
2756         * dump-parse-tree.c (show_common): New function.
2757         (gfc_show_namespace): Show commons.
2758
2759 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2760         Andrew Vaught  <andyv@firstinter.net>
2761
2762         PR fortran/13249
2763         PR fortran/15481
2764         * decl.c (gfc_match_save): Adapt to new common structures,
2765         don't allow saving USE-associated common.
2766         * dump-parse-tree (gfc_show_attr): (saved_)common are not
2767         symbol attributes any longer.
2768         (gfc_show_symbol): Don't show old-style commons any longer.
2769         (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
2770         interface.
2771         * gfortran.h (symbol_attribute): Remove common and saved_common
2772         attributes.
2773         (gfc_symbol): Remove common_head element.
2774         (gfc_common_head): New struct.
2775         (gfc_get_common_head): New macro.
2776         (gfc_symtree): Add field 'common' to union.
2777         (gfc_namespace): Add field 'common_root'; change type of field
2778         'blank_common' to blank_common.
2779         (gfc_add_data): New prototype.
2780         (gfc_traverse_symtree): Expect a symtree as first argument
2781         instead of namespace.
2782         * match.c (gfc_get_common): New function.
2783         (match_common_name): Change to take char * as argument, adapt,
2784         fix bug with empty name.
2785         (gfc_match_common): Adapt to new data structures. Disallow
2786         redeclaration of USE-associated COMMON-block. Fix bug with
2787         empty common.
2788         (var_element): Adapt to new common structures.
2789         * match.h (gfc_get_common): Declare.
2790         * module.c: Add 2004 to copyright years, add commons to module
2791         file layout description.
2792         (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
2793         for removed attributes.
2794         (mio_symbol): Adapt to new way of storing common relations.
2795         (load_commons): New function.
2796         (read_module): Skip common list on first pass, load_commons at
2797         second.
2798         (write_commons): New function.
2799         (write_module): Call write_commons().
2800         * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
2801         functions related to removed attributes.
2802         (gfc_add_data): New function.
2803         (gfc_clear_attr): Don't set removed attributes.
2804         (gfc_copy_attr): Don't copy removed attributes.
2805         (traverse_symtree): Remove.
2806         (gfc_traverse_symtree): Don't traverse symbol
2807         tree of the passed namespace, but require a symtree to be passed
2808         instead. Unify with traverse_symtree.
2809         (gfc_traverse_ns): Call gfc_traverse_symtree according to new
2810         interface.
2811         (save_symbol): Remove setting of removed attribute.
2812         * trans-common.c (gfc_sym_mangled_common_id): Change to
2813         take 'char *' argument instead of 'gfc_symbol'.
2814         (build_common_decl, new_segment, translate_common): Adapt to new
2815         data structures, add new
2816         argument name.
2817         (create_common): Adapt to new data structures, add new
2818         argument name. Fix typo in intialization of derived types.
2819         (finish_equivalences): Add second argument in call to
2820         create_common.
2821         (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
2822         (gfc_trans_common): Adapt to new data structures.
2823         * trans-decl.c (gfc_create_module_variables): Remove test for
2824         removed attribute.
2825
2826 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2827
2828         * io.c: Add 2004 to copyright years.
2829
2830 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2831         Andrew Vaught  <andyv@firstinter.net>
2832
2833         * gfortran.h (gfc_gsymbol): New typedef.
2834         (gfc_gsym_root): New variable.
2835         (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
2836         * parse.c (global_used): New function.
2837         (parse_block_data): Check for double empty BLOCK DATA,
2838         use global symbol table.
2839         (parse_module): Use global symbol table.
2840         (add_global_procedure, add_global_program): New functions.
2841         (gfc_parse_file): Use global symbol table.
2842         * symbol.c (gfc_gsym_root): New variable.
2843         (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
2844         functions.
2845
2846 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2847
2848         * module.c (mio_gmp_real): Correct writing of negative numbers.
2849
2850 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2851
2852         PR fortran/15963
2853         * expr.c (check_intrinsic_op): Allow comparison of characters.
2854         Make logic easier.
2855
2856 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2857         Andrew Vaught  <andyv@firstinter.net>
2858
2859         * decl.c (contained_procedure): New function.
2860         (match_end): Verify correctness of END STATEMENT in
2861         all cases.
2862
2863 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2864         Andrew Vaught  <andyv@firstinter.net>
2865
2866         PR fortran/15190
2867         * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
2868         (decode_statement): Enforce required space in free-form.
2869
2870 2004-06-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2871
2872         * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
2873         * trans-array.c (gfc_conv_descriptor_data): Add operand
2874         for COMPONENT_REF.
2875         (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
2876         (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
2877         (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
2878         * trans-common.c (create_common): Likewise.
2879         * trans-expr.c (gfc_conv_component_ref): Likewise.
2880         * trans-io.c (set_parameter_value): Likewise.
2881         (set_parameter_ref, set_string, set_flag, io_result): Likewise.
2882         (transfer_expr): Likewise.
2883         * trans-decl.c (gfc_trans_auto_character_variable):
2884         Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
2885         (gfc_gimplify_function): New function.
2886         (gfc_generate_function-code): Properly handle nested functions.
2887         * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
2888
2889 2004-06-22  Janne Blomqvist  <jblomqvi@cc.hut.fi>
2890
2891         PR fortran/15750
2892         * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
2893         (gfc_resolve_inquire): Resolve the iolength tag.  Return
2894         SUCCESS at end of function if no failure has occured.
2895         * resolve.c (resolve_code): Resolve if iolength is encountered.
2896         * trans-io.c: (ioparm_iolength, iocall_iolength,
2897         iocall_iolength_done): New variables.
2898         (last_dt): Add IOLENGTH.
2899         (gfc_build_io_library_fndecls ): Set iolength related variables.
2900         (gfc_trans_iolength): Implement.
2901         (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
2902
2903 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de
2904
2905         PR fortran/15511
2906         * scanner.c (load_line): Don't truncate preprocessor lines.
2907         Reformat error message.
2908         (preprocessor_line): Issue warning in case of malformed
2909         preprocessor line.
2910
2911 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2912
2913         * resolve.c (resolve_symbol): Add comment in function body.
2914         (check_data_variable): Change type of mark to ar_type, adapt code
2915         accordingly.
2916
2917 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2918
2919         * array.c (gfc_insert_constructor): Avoid redundant call to
2920         mpz_comp. Add 2004 to copyright years.
2921
2922 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
2923
2924         * trans.h (stmtblock_t): Change has_scope to unsigned int.
2925
2926 2004-06-20  Steven G. Kargl  <kargls@comcast.net>
2927
2928         * arith.c (gfc_range_check): correct complex underflow.
2929
2930 2004-06-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2931
2932         PR fortran/15962
2933         * match.c (match_case_selector): Call gfc_match_init_expr
2934         instead of gfc_match_expr.
2935         * resolve.c (validate_case_label_expr): No need to check for
2936         constant, since it wouldn't have been matched with the fix to
2937         match.c.
2938
2939 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2940
2941         PR fortran/15211
2942         * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
2943         of strings.
2944
2945 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2946
2947         PR fortran/15510
2948         * trans-deecl.c (generate_local_decl): Do not issue warning for
2949         unused variables if they're use associated.
2950
2951 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2952         Andrew Vaught <andyv@firstinter.net>
2953
2954         PR fortran/14928
2955         * gfortran.h (gfc_check_f): Add new field f3ml.
2956         * check.c (gfc_check_minloc_maxloc): Take argument list instead
2957         of individual arguments, reorder if necessary.
2958         * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
2959         * intrinsic.c (add_sym_3ml): New function.
2960         (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
2961         (check_specific): Catch special case MINLOC, MAXLOC.
2962
2963 2004-06-14  Paul Brook  <paul@codesourcery.com>
2964
2965         * intrinsic.c (add_sym_2s): Use correct function types.
2966
2967 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2968
2969         * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize.  Move data.c
2970         * data.c (gfc_get_section_index):  Remove dependency on trans.h.
2971
2972 2004-06-12  Steven G. Kargl  <kargls@comcast.net>
2973
2974         * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
2975         gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
2976         * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
2977         GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
2978         * trans-intrinsic.c:  Use symbols.
2979         * intrinsic.c (add_sym_2s): New function.
2980         * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
2981         * intrinsic.h: Function prototypes.
2982         * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
2983         gfc_resolve_srand):  New functions.
2984
2985 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2986
2987         PR fortran/14957
2988         * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
2989         contained procedure.
2990
2991 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2992
2993         PR fortran/12841
2994         * interface.c (compare_parameter, compare_actual_formal): Don't
2995         check types and array shapes for NULL()
2996         * trans-expr.c (conv_function_call): No double indirection for
2997         NULL()
2998
2999 2004-06-09  Toon Moene  <toon@moene.indiv.nluug.nl>
3000
3001         * trans-expr.c (gfc_conv_cst_int_power): Compute
3002         x**(-n) by converting it to (1/x)**n instead of
3003         1/x**n.
3004
3005 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3006
3007         PR fortran/13372
3008         * module.c (write_symbol, write_symtree): Don't write symbols
3009         wrongly added to namespace.
3010         * trans-decl.c (gfc_create_module_variable): Don't create a
3011         backend decl for a symbol incorrectly added to namespace.
3012
3013 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3014
3015         PR fortran/13201
3016         * resolve.c (resolve_symbol): Verify that parameter array has an
3017         explicit shape. Fix typos and coding style issues in surrounding
3018         lines.
3019
3020 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3021
3022         PR fortran/15478
3023         * gfortran.texi: The documentation doesn't contain infomration on
3024         how to report bugs, and shouldn't, so remove the line which
3025         says it does.
3026
3027 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3028
3029         * intrinsic.c (sort_actual): Keep track of type of missing
3030         arguments. (Missing from previous commit.)
3031
3032 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3033
3034         * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
3035         * interface.c (compare_actual_formal): Keep type of omitted
3036         optional arguments.
3037         * trans-expr.c (gfc_conv_function_call): Add string length
3038         argument for omitted string argument.
3039
3040 2004-06-03  Paul Brook  <paul@codesourcery.com>
3041
3042         * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
3043         lists instead of compound expr chains.
3044         (gfc_trans_code): Annotate statement lists.
3045
3046 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3047
3048         * trans-array.c: Fix spelling in comments.
3049
3050 2004-06-02  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3051
3052         PR fortran/15557
3053         * data.c (assign_substring_data_value): New function.
3054         (gfc_assign_data_value): Call the new function if we're dealing
3055         with a substring LHS.
3056
3057 2004-06-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3058
3059         PR fortran/15477
3060         * gfortran.h (GFC_VERSION): Remove.
3061         * gfortran.texi (version-gfortran): Remove, replace by version-GCC
3062         where used.
3063
3064 2004-05-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3065
3066         * trans-types.c: Fix spelling & layout in comments.
3067
3068 2004-05-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3069
3070         PR fortran/14067
3071         * trans-const.c (gfc_conv_string_init): Allow variable string
3072         length lower than initialization string length.
3073
3074 2004-05-30  Paul Brook  <paul@codesourcery.com>
3075
3076         PR fortran/15620
3077         * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
3078         * trans-expr.c (gfc_trans_string_copy): New function.
3079         (gfc_conv_statement_function): Use them.  Create temp vars.  Enforce
3080         character lengths.
3081         (gfc_conv_string_parameter): Use gfc_trans_string_copy.
3082         * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
3083         * trans.h (struct gfc_saved_var): Define.
3084         (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
3085
3086 2004-05-30  Steven G. Kargl  <kargls@comcast.net>
3087
3088         * iresolve.c (gfc_resolve_random_number): Clean up conditional.
3089
3090 2004-05-29  Steven G. Kargl  <kargls@comcast.net>
3091
3092         * simplify.c (gfc_simplify_log): Remove useless line of code.
3093
3094 2004-05-29  Paul Brook  <paul@codesourcery.com>
3095
3096         * trans-common.c (find_equivalence): Find multiple rules.
3097
3098 2004-05-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3099
3100         * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
3101         (gfc_current_locus): Declare new global variable.
3102         * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
3103         (gfc_current_locus1): Rename ...
3104         (gfc_current_locus): ... to this.
3105         (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
3106         skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
3107         gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
3108         gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
3109         and gfc_current_locus(), respectively.
3110         * array.c (match_subscript, gfc_match_array_ref, match_array_list,
3111         match_array_cons_element, gfc_match_array_constructor):
3112         Read/modify gfc_current_locus instead of calling gfc_set_locus()
3113         and gfc_current_locus().
3114         * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
3115         match_attr_spec, gfc_match_function_decl, gfc_match_end,
3116         attr_decl1, gfc_match_save): Likewise.
3117         * error.c (error_print, gfc_internal_error): Likewise.
3118         * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
3119         * interface.c (gfc_add_interface): Likewise.
3120         * io.c (gfc_match_format, match_dt_format, match_dt_element,
3121         match_io_iterator, match_io): Likewise.
3122         * match.c (gfc_match_space, gfc_match_eos,
3123         gfc_match_small_literal_int, gfc_match_st_label,
3124         gfc_match_strings, gfc_match_name, gfc_match_iterator,
3125         gfc_match_char, gfc_match, gfc_match_assignment,
3126         gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
3127         gfc_match_nullify, gfc_match_call, match_implicit_range,
3128         gfc_match_implicit, gfc_match_data, match_case_selector,
3129         gfc_match_case, match_forall_iterator): Likewise.
3130         * matchexp.c (gfc_match_defined_op_name, next_operator,
3131         match_level_1, match_mult_operand, match_ext_mult_operand,
3132         match_add_operand, match_ext_add_operand, match_level_2,
3133         match_level_3, match_level_4, match_and_operand, match_or_operand,
3134         match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
3135         * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
3136         * parse.c (match_word, decode_statement, next_free, next_fixed,
3137         add_statement, verify_st_order, parse_if_block, gfc_parse_file):
3138         Likewise.
3139         * primary.c (match_digits, match_integer_constant,
3140         match_boz_constant, match_real_constant, match_substring,
3141         next_string_char, match_charkind_name, match_string_constant,
3142         match_logical_constant, match_const_complex_part,
3143         match_complex_constant, match_actual_arg, match_keyword_arg,
3144         gfc_match_actual_arglist, gfc_match_structure_constructor,
3145         gfc_match_rvalue, gfc_match_variable): Likewise.
3146         * st.c (gfc_get_code): Likewise.
3147         * symbol.c (check_conflict, check_used, check_done,
3148         duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
3149         gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
3150         gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
3151
3152 2004-05-26  Roger Sayle  <roger@eyesopen.com>
3153
3154         * io.c (format_asterisk): Silence compiler warnings by correcting
3155         the number of elements of a "locus" initializer.
3156
3157 2004-05-25  Roger Sayle  <roger@eyesopen.com>
3158
3159         PR fortran/13912
3160         * matchexp.c: Allow unary operators after arithmetic operators
3161         as a GNU extension.
3162         (match_ext_mult_operand, match_ext_add_operand): New functions.
3163         (match_mult_operand): Tweak to call match_ext_mult_operand.
3164         (match_add_operand): Tweak to call match_ext_mult_operand.
3165         (match_level_2): Rearrange to call match_ext_add_operand.
3166
3167 2004-05-25  Paul Brook  <paul@codesourcery.com>
3168
3169         * expr.c (check_inquiry): Remove bogus tests.
3170
3171 2004-05-23  Paul Brook  <paul@codesourcery.com>
3172
3173         PR fortran/13773
3174         * expr.c (restricted_args): Remove redundant checks/argument.
3175         (external_spec_function): Update to match.
3176         (restricted_intrinsic): Rewrite.
3177
3178 2004-05-23  Paul Brook  <paul@codesourcery.com>
3179         Victor Leikehman  <lei@haifasphere.co.il>
3180
3181         * gfortran.h (struct gfc_symbol): Add equiv_built.
3182         * trans-common.c: Change int to HOST_WIDE_INT.  Capitalize error
3183         messages.
3184         (current_length): Remove.
3185         (add_segments): New function.
3186         (build_equiv_decl): Create initialized common blocks.
3187         (build_common_decl): Always add decl to bindings.
3188         (create_common): Create initializers.
3189         (find_segment_info): Reformat to match coding conventions.
3190         (new_condition): Use add_segments.
3191         (add_condition, find_equivalence, add_equivalences): Move iteration
3192         inside functions.  Only process each segment once.
3193         (new_segment, finish_equivalences, translate_common): Simplify.
3194
3195 2004-05-23  Steven G. Kargl  <kargls@comcast.net>
3196
3197         * check.c (gfc_check_random_seed): Issue for too many arguments.
3198
3199 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
3200
3201         * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
3202
3203 2004-05-22  Paul Brook  <paul@codesourcery.com>
3204
3205         * dump-parse-tree.c (gfc_show_equiv): New function.
3206         (gfc_show_namespace): Use it.
3207
3208 2004-05-22  Victor Leikehman  <lei@haifasphere.co.il>
3209
3210         PR fortran/13249
3211         * symbol.c (gfc_add_common): Disable checks to work around other more
3212         fundamental inadequacies.
3213
3214 2004-05-22  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
3215
3216         * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
3217         only for functions.
3218         (gfc_build_function_decl): Likewise.
3219
3220 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
3221
3222         * check.c (gfc_check_system_clock): New function.
3223         * intrinsic.c (add_sym_3s): New function.
3224         (add_subroutines): Use it.
3225         * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
3226         Add prototypes.
3227         * iresolve.c (gfc_resolve_system_clock): New function.
3228
3229 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
3230
3231         * invoke.texi: Document -Wunderflow and spell check.
3232         * lang.opt: Add Wunderflow.
3233         * gfortran.h (gfc_option_t): Add warn_underflow option.
3234         * options.c (gfc_init_options, set_Wall): Use it.
3235         * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
3236         * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
3237         gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
3238         gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
3239         * arith.c (common_logarithm): Fix typo in comment.
3240
3241 2004-05-21  Roger Sayle  <roger@eyesopen.com>
3242
3243         * io.c (check_format): As a GNU extension, allow the comma after a
3244         string literal to be optional in a format.  Use gfc_notify_std to
3245         issue an error/warning as appropriate.
3246
3247 2004-05-21  Roger Sayle  <roger@eyesopen.com>
3248
3249         * io.c (check_format): Use gfc_notify_std to determine whether to
3250         issue an error/warning for omitting the digits from the X format.
3251
3252 2004-05-20  Roger Sayle  <roger@eyesopen.com>
3253
3254         * io.c (check_format): Allow the number before the X format to
3255         be optional when not -pedantic.
3256
3257 2004-05-18  Feng Wang  <fengwang@nudt.edu.cn>
3258         Paul Brook  <paul@codesourcery.com>
3259
3260         * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
3261         Create decls for __builtin_pow{,f}.
3262         * gfortran.h (PREFIX_LEN): Define.
3263         * trans-decl.c (gfor_fndecl_math_powi): Add.
3264         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3265         (gfc_build_intrinsic_function_decls): Create decls for powi.
3266         * trans-expr.c (powi_table): Add.
3267         (gfc_conv_integer_power): Remove.
3268         (gfc_conv_powi): New function.
3269         (gfc_conv_cst_int_power): New function.
3270         (gfc_conv_power_op): Use new powi routines.
3271         * trans.h (struct gfc_powdecl_list): Add.
3272         (gfor_fndecl_math_powi): Add.
3273         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3274
3275 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3276
3277         * trans.c, trans-decl.c: Fix comment typos.
3278
3279 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3280
3281         * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
3282
3283 2004-05-18  Steve Kargl  <kargls@comcast.net>
3284
3285         * arith.c (gfc_int2complex): Fix incorrect range checking.
3286
3287 2004-05-18  Paul Brook  <paul@codesourcery.com>
3288
3289         PR fortran/13930
3290         * decl.c (add_init_expr_to_sym): Remove incorrect check.
3291         (default_initializer): Move to expr.c.
3292         (variable_decl): Don't assign default initializer to variables.
3293         * expr.c (gfc_default_initializer): Move to here.
3294         * gfortran.h (gfc_default_initializer): Add prototype.
3295         * resolve.c (resolve_symbol): Check for illegal initializers.
3296         Assign default initializer.
3297
3298 2004-05-17  Steve Kargl  <kargls@comcast.net>
3299
3300         * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
3301
3302 2004-05-17  Steve Kargl  <kargls@comcast.net>
3303
3304         * arith.c (gfc_real2complex): Range checking wrong part of complex
3305         number.
3306
3307 2004-05-16  Paul Brook  <paul@codesourcery.com>
3308
3309         * options.c (gfc_handle_module_path_options): Fix buffer overrun.
3310
3311 2004-05-16  Paul Brook  <paul@codesourcery.com>
3312
3313         * arith.c (gfc_range_check): Fix logic error.
3314
3315 2004-05-16  Steve Kargl  <sgk@troutmask.apl.washington.edu>
3316
3317         * arith.c: Fix comment typos.
3318
3319 2004-05-15  Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3320
3321         PR fortran/13742
3322         * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
3323         not initialized in a disallowed fashion.
3324         * match.c (gfc_match_common): Likewise.
3325         (var_element): Verify that variable is not in the blank COMMON,
3326         if it is in a common.
3327
3328 2004-05-15  Joseph S. Myers  <jsm@polyomino.org.uk>
3329
3330         * Make-lang.in (f95.generated-manpages): Remove.
3331         (f95.srcextra): New.
3332         (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
3333         f95.maintainer-clean): Generate info and dvi files in objdir/doc.
3334         (f95.dvi): Remove.
3335         (dvi): New.
3336         (f95.install-info): Remove.
3337         (install-info): New.
3338
3339 2004-05-15  Victor Leikehman  <lei@haifasphere.co.il>
3340
3341         * decl.c (add_init_expr_to_sym): Check for variable size arrays.
3342
3343 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3344
3345         * primary.c (match_boz_constant): Use gfc_notify_std() for
3346         issuing a warning or an error.
3347
3348 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3349
3350         PR fortran/13826
3351         * primary.c (match_structure_constructor): Rename ...
3352         (gfc_match_structure_constructor): ... to this. Make non-static.
3353         (gfc_match_rvalue): Call renamed function.
3354         * match.h (gfc_match_structure_constructor): Declare.
3355         * match.c (gfc_match_data_constant): Handle structure
3356         constructor.
3357
3358 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3359
3360         PR fortran/13702
3361         (Port from g95)
3362         * gfortran.h (gfc_linebuf): New typedef.
3363         (linebuf): Remove.
3364         (gfc_file): Revamped, use new gfc_linebuf.
3365         (locus): Revamped, use new types.
3366         (gfc_current_file): Remove.
3367         (gfc_current_form, gfc_source_file): New global variables.
3368         * match.c (gfc_match_space, gfc_match_strings): Use
3369         gfc_current_form to find source form.
3370         * module.c (gfc_dump_module): Use gfc_source_file when printing
3371         module header.
3372         * error.c (show_locus, show_loci) Use new data structures to print
3373         locus.
3374         * scanner.c (first_file, first_duplicated_file, gfc_current_file):
3375         Remove.
3376         (file_head, current_file, gfc_current_form, line_head, line_tail,
3377         gfc_current_locus1, gfc_source_file): New global variables.
3378         (gfc_scanner_init1): Set new global variables.
3379         (gfc_scanner_done1): Free new data structures.
3380         (gfc_current_locus): Return pointer to gfc_current_locus1.
3381         (gfc_set_locus): Set gfc_current_locus1.
3382         (gfc_at_eof): Set new variables.
3383         (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
3384         to new locus structure.
3385         (gfc_check_include): Remove.
3386         (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
3387         (gfc_skip_comments): Use gfc_current_form, find locus with
3388         gfc_current_locus1.
3389         (gfc_next_char): Use gfc_current_form.
3390         (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
3391         (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
3392         comment formatting.
3393         (get_file): New function.
3394         (preprocessor_line, include_line): New functions.
3395         (load_file): Move down, rewrite to match new data structures.
3396         (gfc_new_file): Rewrite to match new data structures.
3397         * parse.c (next_statement): Remove code which is now useless. Use
3398         gfc_source_form and gfc_source_file where appropriate.
3399         * trans-decl.c (gfc_get_label_decl): adapt to new data structures
3400         when determining locus of frontend code.
3401         * trans-io.c (set_error_locus): Same.
3402         * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
3403         * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
3404         preprocessor flags.
3405         (all): Add missing initializers.
3406
3407 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3408
3409         * Make-lang.in (trans-common.o): Remove redundant dependency.
3410         (data.c): Replace object file name ...
3411         (data.o): ... by the correct one.
3412
3413 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3414
3415         * dump-parse-tree.c (gfc_show_array_ref): Print colon only
3416         for ranges when dumping array references.
3417
3418 2004-05-14  Victor Leikehman  <lei@haifasphere.co.il>
3419
3420         * decl.c (variable_decl): Always apply default initializer.
3421
3422 2004-05-08  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3423
3424         PR fortran/15206
3425         * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
3426         handle zero correctly.
3427
3428 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3429
3430         * match.c (gfc_match): Eliminate dead code.
3431
3432 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3433
3434         * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
3435         Detect bad continuation line in fixed form sources.
3436
3437 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3438
3439         PR fortran/15205
3440         * iresolve.c (gfc_resolve_nearest): Add new function.
3441         * intrinsic.h: ... declare it here.
3442         * intrinsic.c (add_functions): ... add it as resolving function
3443         for NEAREST.
3444
3445 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3446
3447         PR fortran/14066
3448         * match.c (gfc_match_do): Allow infinite loops with
3449         label-do-stmt. Do not enforce space after comma.
3450
3451 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3452
3453         PR fortran/15051
3454         * parse.c (parse_interface): Allow empty INTERFACE, remove
3455         seen_body.
3456
3457 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3458
3459         * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
3460         decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
3461         expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
3462         intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
3463         matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
3464         primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
3465         trans-array.c, trans-array.h, trans-common.c, trans-const.c,
3466         trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
3467         trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
3468         trans-types.h, trans.c, trans.h: Update copyright years and
3469         boilerplate.
3470         * data.c: Likewise, also removed two whitespace-only lines.
3471         * gfortranspec.c, lang.opt: Update copyright years.
3472
3473 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3474
3475         PR fortran/14568
3476         * trans-decl.c (generate_local_decl): Don't warn for unused
3477         variables which are in common blocks.
3478
3479 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
3480
3481         * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
3482         trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
3483         trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
3484
3485 2004-05-13  Victor Leikehman  <lei@haifasphere.co.il>
3486
3487         PR fortran/15314
3488         * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
3489
3490 2004-05-13  Joseph S. Myers  <jsm@polyomino.org.uk>
3491
3492         * gfortran.texi: Use @table @emph instead of @itemize @emph.
3493         Remove "set DEVELOPMENT".
3494         (Compiling GFORTRAN): Remove.
3495
3496 2004-05-09  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
3497
3498         * array.c (match_subscript, match_array_ref): Add comments
3499         explaining argument 'init'.
3500         * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
3501         trans-expr.c, trans.c: Fix some typos in comments.
3502         * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
3503         * primary.c (match_digits, match_integer_constant): Add comment
3504         explaining signflag.
3505
3506 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3507
3508         PR fortran/13940
3509         * primary.c: Include system.h and flags.h, needed for pedantic.
3510         (match_boz_constant): Allow "x" for hexadecimal constants, warn if
3511         pedantic is set.
3512
3513 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3514
3515         PR fortran/13940
3516         * match.c (match_data_constant): Handle case where
3517         gfc_find_symbol sets sym to NULL
3518
3519 2004-04-28  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3520
3521         * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
3522         dependency on mathbuiltins.def
3523
3524 2004-04-24  Victor Leikehman  <lei@il.ibm.com>
3525
3526         * trans-io.c (transfer_expr): Implemented recursive printing
3527         of derived types.
3528
3529 2004-04-24  Andrew Pinski  <pinskia@physics.uc.edu>
3530
3531         * gfortranspec.c: Do not include multilib.h.
3532
3533 2004-04-24  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
3534
3535         * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
3536         2004 to copyright years.
3537         * trans-expr.c, trans-decl.c: Comment update, we now generate
3538         GENERIC, not SIMPLE. Add 2004 to copyright years.
3539
3540 2004-04-24  Paul Brook  <paul@codesourcery.com>
3541
3542         * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
3543
3544 2004-04-24  Feng Wang  <fengwang@nudt.edu.cn>
3545
3546         PR 14817
3547         * arith.c (gfc_arith_divide): Fix complex divide.
3548
3549 2004-04-23  Andrew Pinski  <pinskia@physics.uc.edu>
3550
3551         * gfortranspec.c: Include the target headers.
3552
3553 2004-04-18  Feng Wang  <fengwang@nudt.edu.cn>
3554
3555         PR fortran/14921
3556         PR fortran/14540
3557         * arith.c (arctangent2): New function.
3558         * arith.h (arctangent2): Add function prototype.
3559         * simplify.c (gfc_simplify_atan2): Use it.
3560         (gfc_simplify_log): Use it.
3561
3562 2004-04-12  Diego Novillo  <dnovillo@redhat.com>
3563
3564         * fortran/f95-lang.c (gfc_expand_stmt): Remove.
3565         (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
3566
3567 2004-04-11  Bud Davis  <bdavis9659@comcast.net>
3568
3569         PR fortran/14872
3570         * trans-io.c (build_dt): Change REC to value.
3571
3572 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
3573
3574         PR 14394
3575         * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
3576         the real value when converting mpf to string.
3577
3578 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
3579
3580         PR 14395
3581         * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
3582         the result.
3583
3584 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
3585
3586         PR fortran/14377
3587         * simplify.c (simplify_min_max): Convert the type of the result.
3588
3589 2004-04-11  Paul Brook  <paul@codesourcery.com>
3590
3591         * gfortran.texi: Use full target triplet.
3592
3593 2004-04-11  Paul Brook  <paul@codesourcery.com>
3594
3595         * Make-lang.in (GFORTRAN_TEXI): Set it.
3596         (fortran/dfortran.dvi): Use it.  Add fortran to include paths.
3597         (fortran/gfortran.info): Ditto.
3598         * gfortran.texi: Major update.
3599         * invoke.texi: New file.
3600
3601 2004-04-10  Paul Brook  <paul@codesourcery.com>
3602
3603         * trans-array.c (gfc_trans_allocate_temp_array,
3604         gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
3605         * trans-decl.c (gfc_build_dummy_array_decl,
3606         gfc_get_symbol_decl, gfc_build_function_decl,
3607         gfc_create_module_variable): Ditto.
3608         * trans-expr.c (gfc_conv_variable): Ditto.
3609         * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
3610         * trans.h (GFC_DECL_STRING): Remove.
3611         (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
3612         GFC_DECL_ASSIGN): Renumber flags.
3613
3614 2004-04-05  Paul Brook  <paul@codesourcery.com>
3615
3616         PR 13252
3617         PR 14081
3618         * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
3619         and stack_restore.
3620         * gfortran.h (struct gfc_charlen): Add backend_decl.
3621         * trans-array.c (gfc_trans_allocate_temp_array,
3622         gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
3623         (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
3624         Remove old, broken string handling.
3625         (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
3626         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
3627         gfc_trans_deferred_array): Handle character arrays.
3628         * trans-const.c (gfc_conv_const_charlen): New function.
3629         * trans-const.h (gfc_conv_const_charlen): Add prototype.
3630         * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
3631         as static.
3632         (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
3633         (gfc_create_string_length): New function.
3634         (gfc_get_symbol_decl): Create lengths for character variables.
3635         (gfc_get_fake_result_decl): Ditto.
3636         (gfc_build_function_decl): Only set length for assumed length
3637         character arguments.
3638         (gfc_trans_dummy_character): New function.
3639         (gfc_trans_auto_character_variable): Rewrite.
3640         (gfc_trans_deferred_vars): Handle more types of character variable.
3641         (gfc_create_module_variable): String lengths have moved.
3642         (gfc_generate_function_code): Initialize deferred var chain earlier.
3643         * trans-expr.c (gfc_conv_init_string_length): Rename ...
3644         (gfc_trans_init_string_length):  ... to this.
3645         (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
3646         gfc_conv_function_call): Update to new format for character variables.
3647         (gfc_conv_string_length): Remove.
3648         (gfc_conv_string_parameter): Update assertion.
3649         * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
3650         * trans-io.c (set_string): Use new macro names.
3651         * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
3652         * trans-types.c (gfc_get_character_type): Use existing length expr.
3653         (gfc_is_nodesc_array): Make public.
3654         (gfc_get_dtype_cst): Rename ...
3655         (gfc_get_dtype): ... to this.  Handle unknown size arrays.
3656         (gfc_get_nodesc_array_type): Use new name.
3657         (gfc_sym_type): New character variable code.
3658         (gfc_get_derived_type): Ditto.
3659         (gfc_get_function_type): Evaluate character variable lengths.
3660         * trans-types.h (gfc_strlen_kind): Define.
3661         (gfc_is_nodesc_array): Add prototype.
3662         * trans.h: Update prototypes.
3663         (struct lang_type): Update comments.
3664         (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
3665         (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
3666
3667 2004-04-04  Paul Brook  <paul@codesourcery.com>
3668
3669         * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
3670         * options.c (gfc_init.options, gfc_handle_option): Ditto.
3671         * trans-expr.c (gfc_conv_function_call): Ditto.
3672         * trans-types.c (gfc_is_nodesc_array): Ditto
3673         * lang.opt (fg77-calls): Remove.
3674
3675 2004-04-04  Paul Brook  <paul@codesourcery.com>
3676
3677         * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
3678         (gfc_conv_descriptor_base): Rename ...
3679         (gfc_conv_descriptor_offset): ... to this.
3680         (gfc_trans_allocate_array_storage): Set offset to zero.
3681         (gfc_conv_array_base): Rename ...
3682         (gfc_conv_array_offset): ... to this.
3683         (gfc_conv_array_index_ref): Add offset parameter.
3684         (gfc_conv_array_ref): Include offset.
3685         (gfc_trans_preloop_setup): Use existing offset.
3686         (gfc_trans_allocate_temp_array,  gfc_array_allocate,
3687         gfc_trans_auto_array_allocation, gfc_trans_g77_array,
3688         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
3689         gfc_conf_ss_descriptor): Set offset.
3690         * trans-array.h: Rename prototypes.
3691         * trans-const.h (gfc_index_zero_node): Define.
3692         * trans-decl.c (gfc_build_qualified_array): Change base to offset.
3693         * trans-types.c (gfc_get_array_type_bounds): Ditto.
3694         (gfc_get_nodesc_array_type): Calculate offset before upper bound.
3695
3696 2004-03-25  Diego Novillo  <dnovillo@redhat.com>
3697
3698         * convert.c (convert): Don't handle WITH_RECORD_EXPR.
3699
3700 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
3701
3702         PR 14055
3703         * arith.c (gfc_convert_integer,gfc_convert_real):  Removed leading '+'
3704         before conversion by gmp library call.
3705
3706 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
3707
3708         PR 12921
3709         * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
3710
3711 2004-02-24  Richard Henderson  <rth@redhat.com>
3712
3713         * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
3714
3715 2004-02-19  Loren J. Rittle  <ljrittle@acm.org>
3716
3717         * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
3718         (fortran/gfortran.info): ... to here.
3719         (f95.srcinfo): New.
3720
3721 2004-02-16  Richard Henderson  <rth@redhat.com>
3722
3723         * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
3724         * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
3725         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
3726         (gfc_expand_function): Rename from expand_function_body, make static,
3727         don't do anything except invoke tree_rest_of_compilation.
3728         (gfc_be_parse_file): Invoke cgraph.
3729         (gfc_expand_decl): Remove.
3730         (gfc_init_builtin_functions): Add __builtin_init_trampoline and
3731         __builtin_adjust_trampoline.
3732         * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
3733         (gfc_finalize): New.
3734         (gfc_generate_function_code): Use it.  Lower nested functions.
3735         * trans-expr.c (gfc_conv_function_call): Add static chain operand
3736         to call_expr.
3737         * trans.c (gfc_build_function_call): Likewise.
3738         * trans.h (expand_function_body): Remove.
3739
3740 2004-02-15  Victor Leikehman  <lei@il.ibm.com>
3741
3742         PR gfortran/13433
3743         * trans-decl.c (gfc_build_function_decl) For functions
3744         returning CHARACTER pass an extra length argument,
3745         following g77 calling conventions.
3746         * trans-types.c (gfc_get_function_type) Ditto.
3747         * trans-expr.c (gfc_conv_function_call) Ditto.
3748
3749 2004-02-14  Paul Brook  <paul@codesourcery.com>
3750
3751         * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
3752
3753 2004-02-12  Paul Brook  <paul@nowt.org>
3754
3755         * BUGS: Remove.
3756
3757 2004-02-08  Steve Kargl  <sgk@troutmask.apl.washington.edu>
3758
3759         * gfortran.texi: Fix typos.
3760
3761 2004-02-07  Bud Davis  <bdavis9659@comcast.net>
3762
3763         PR gfortran/13909
3764         * intrinsic.c (add_conversions) Use logical conversion instead
3765         of real.
3766         * trans-types.c (gfc_get_logical_type) implemented logical*1
3767         and logical*2.
3768
3769 2004-01-17  Paul Brook  <paul@codesourcery.com>
3770
3771         * lang-specs.h: Remove %<fixed-form.
3772
3773 2004-01-15  Toon Moene  <toon@moene.indiv.nluug.nl>
3774
3775         * lang-specs.h: Enable preprocessing of source files
3776         ending in .F, .fpp, .FPP, .F90 and .F95.
3777
3778 2004-01-13  Toon Moene  <toon@moene.indiv.nluug.nl>
3779
3780         PR fortran/12912
3781         * lang-specs.h: Enable compilation of files ending
3782         in .f, .for and .FOR.
3783
3784 2004-01-11  Paul Brook  <paul@codesourcery.com>
3785
3786         * trans-stmt.c (gfc_trans_if_1): New function.
3787         (gfc_trans_if): Use it.
3788
3789 2004-01-11  Erik Schnetter  <schnetter@uni-tuebingen.de>
3790
3791         * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
3792         (gfc_option_t): Add max_identifier_length.
3793         * lang.opt: Add fmax-identifier-length.
3794         * match.c (parse_name): Use limit.
3795         * options.c (gfc_init_options): Set max_identifier_length.
3796         (gfc_handle_option): Ditto.
3797
3798 2004-01-11  Feng Wang  <fengwang@nudt.edu.cn>
3799
3800         * intrinsic.c (add_functions): Add resolve function to dcmplx.
3801         * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
3802         * iresolve.c (gfc_resolve_dcmplx): New function.
3803
3804 2004-01-10  Paul Brook  <paul@codesourcery.com>
3805
3806         * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
3807         * trans-types.c (gfc_sym_type): Handle external dummy procedures.
3808         (gfc_return_by_reference): Correct condition.
3809         (gfc_get_function_type): Ditto.
3810
3811 2004-01-10  Paul Brook  <paul@codesourcery.com>
3812
3813         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
3814         types.
3815
3816 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
3817
3818         * iresolve.c: Use correct kind.
3819
3820 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
3821
3822         PR fortran/13467
3823         * trans-decl.c (gfc_create_module_variable):  Output array valued
3824         parameters.
3825
3826 2004-01-10  Paul Brook  <paul@codesourcery.com>
3827
3828         * resolve.c (resolve_branch): Get error message right way round.
3829
3830 2004-01-10  Canqun Yang <canqun@nudt.edu.cn>
3831
3832         * trans-array (gfc_conv_loop_setup): Adjust comment to track
3833         reality.
3834         (gfc_array_allocate): Don't count size of element twice.
3835
3836 2004-01-04  Paul Brook  <paul@codesourcery.com>
3837
3838         * lang.opt (i8, r8, std=*): Remove RejectNegative.
3839
3840 2004-01-04  Paul Brook  <paul@codesourcery.com>
3841
3842         * error.c (gfc_notify_std): New function.
3843         * gfortran.h (gfc_notify_std): Declare.
3844         (GFC_STD_*): Define.
3845         (gfc_option_t): Add warn_std and allow_std.
3846         * intrinsic.c (gfc_init_expr_extensions): Fix logic.
3847         (gfc_intrinsic_func_interface): Use gfc_notify_std.
3848         * check.c (check_rest): Use gfc_notify_std.
3849         * match.c (gfc_match_pause): Ditto.
3850         (gfc_match_assign): Ditto.
3851         (gfc_match_goto): Ditto.
3852         * resolve.c (resolve_branch): Ditto.
3853         * lang.opt: Add std=<foo> and w.
3854         * options.c (gfc_init_options): Set allow_std and warn_std.
3855         (gfc_handle_option): Handle OPT_std_* and OPT_w.
3856
3857 2004-01-01  Paul Brook  <paul@codesourcery.com>
3858
3859         * array.c (gfc_append_constructor): Take constructor, not expression.
3860         * data.c (struct gfc_expr_stack): Remove.
3861         (expr_stack): Remove.
3862         (find_con_by_offset): Rename from find_expr_in_con.
3863         (find_con_by_component): Rename from find_component_in_con.
3864         (gfc_get_expr_stack): Remove.
3865         (gfc_assign_data_value): Rewrite.
3866         (gfc_expr_push): Remove.
3867         (gfc_expr_pop): Remove.
3868         (gfc_advance_section): Rename from
3869         gfc_modify_index_and_calculate_offset.  Handle unbounded sections.
3870         (gfc_get_section_index): Handle unbounded sections.
3871         * gfortran.h: Update prototypes.
3872         * resolve.c (check_data_variable): Array section maight not be the
3873         last ref.
3874
3875 2004-01-01  Paul Brook  <paul@codesourcery.com>
3876
3877         PR fortran/13432
3878         * resolve.c (resolve_symbol): Allow assumed length function results.
3879
3880 2004-01-01  Steve Kargl  <sgk@troutmask.apl.washington.edu>
3881
3882         * match.c (gfc_match_pause): Fix spelling.
3883
3884 2004-01-01  Steven Bosscher  <stevenb@suse.de>
3885
3886         PR fortran/13251
3887         * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
3888         reference from the expression.
3889
3890 2003-12-26  Feng Wang  <fengwang@nudt.edu.cn>
3891
3892         * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
3893         dumping.
3894         * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
3895         (gfc_exec_op): New EXEC_LABEL_ASSIGN.
3896         (symbol_attribute):New variable attribute: assign.
3897         * io.c (resolve_tag):Integer variable is allowed.
3898         (match_dt_format): Add ASSIGN statement. Set assign flag.
3899         * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
3900         (gfc_match_assign): Add ASSIGN statement. Set assign flag.
3901         (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
3902         * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
3903         (next_statement): Add ST_LABEL_ASSIGNMENT.
3904         (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
3905         * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
3906         (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
3907         * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
3908         * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
3909         assign.  Put them into the stuct lang_decl.
3910         * trans-io.c (set_string): Add the assign statement.
3911         * trans-stmt.c (gfc_trans_label_assign): New function.
3912         (gfc_trans_goto): Translate ASSIGNED GOTO statement.
3913         * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
3914         * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
3915         * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
3916         (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
3917         (GFC_DECL_ASSIGN(node)): New macro to access flag.
3918
3919 2003-12-31  Huang Chun <chunhuang73@hotmail.com>
3920
3921         PR fortran/13434
3922         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
3923         minval/maxval.
3924
3925 2003-12-22  Toon Moene  <toon@moene.indiv.nluug.nl>
3926
3927         * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
3928         that arguments to subroutines/functions can't alias themselves, nor global
3929         memory.
3930
3931 2003-12-20  Steven Bosscher  <stevenb@suse.de>
3932
3933         * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
3934         * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
3935
3936 2003-12-12  Huang Chun <chunhuang73@hotmail.com>
3937
3938         * primary.c (match_substring): Fix substring bug for start point
3939         or end point is NULL.
3940         * trans-expr.c (gfc_conv_substring): Ditto
3941         * trans-types.c (gfc_sym_type): Get correct type of scalar
3942         character variables.
3943         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
3944         derived type.
3945
3946 2003-12-10  Richard Henderson  <rth@redhat.com>
3947
3948         * options.c (gfc_post_options): Don't ever use rtl inlining.
3949
3950 2003-12-05  Canqun Yang  <canqun@nudt.edu.cn>
3951
3952         * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
3953         * trans-equivalence.c: Remove.
3954         * trans-decl.c (gfc_get_symbol_decl): Update to match.
3955         (gfc_generate_function_code): Ditto.
3956         * trans-array.c (gfc_conv_array_parameter): Ditto.
3957         * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
3958         (F95_ADDITIONAL_OBJS): Add stor-layout.o
3959         * trans.h (gfc_trans_equivalence): Remove.
3960         * gfortran.h (struct gfc_equiv): Add used field.
3961         (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
3962         equiv_offset fields.
3963
3964 2003-12-05  Richard Henderson  <rth@redhat.com>
3965
3966         * trans.c (gfc_build_addr_expr): New.
3967         (gfc_build_indirect_ref, gfc_build_array_ref): New.
3968         * trans.h: Declare them.
3969         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
3970         trans-stmt.c, trans.c (*): Use them.
3971
3972         * f95-lang.c (gfc_post_options): Remove dead prototype.
3973         * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
3974         * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
3975         allocation size.
3976
3977 2003-12-01  Feng Wang  <fengwang@nudt.edu.cn>
3978
3979         * io.c (gfc_match_format): Check for missing format label.
3980
3981 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
3982
3983         PR fortran/13155
3984         * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
3985         from interfaces in modules.
3986
3987 2003-11-30  Paul Brook  <paul@nowt.org>
3988
3989         * trans-array.c (gfc_trans_g77_array): Make non-static.
3990         (gfc_trans_assumed_size): Remove.
3991         (gfc_trans_dummy_array_bias): Explicitly free temporary.
3992         * trans-array.h (gfc_trans_g77_array): Add prototype.
3993         (gfc_trans_assumed_size): Remove.
3994         * trans-decls.c (gfor_fndecl_push_context): Remove.
3995         (gfor_fndecl_pop_context): Remove.
3996         (gfc_build_function)decls): Don't create them.
3997         (gfc_trans_deferred_vars): Update to match. Remove dead code.
3998         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
3999
4000 2003-11-30  Kejia Zhao  <kejia_zh@nudt.edu.cn>
4001
4002         * trans-array.c (gfc_conv_array_parameter): Simplify
4003         array argument passing for array name actual argument.
4004         * trans-expr.c (gfc_conv_function_call): Ditto
4005         * trans-types.c (gfc_is_nodesc_array):Ditto.
4006
4007 2003-11-30  Paul Brook  <paul@nowt.org>
4008
4009         * f95-lang.c (gfc_post_options): Move ...
4010         * options.c (gfc_post_options): .. to here.  Handle inlining options.
4011         * gfortran.h (gfc_post_options): Add prototype.
4012
4013 2003-11-28  Richard Henderson  <rth@redhat.com>
4014
4015         * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
4016
4017 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
4018
4019         * trans.h (has_alternate_specifier): New global variable.
4020         * match.c (gfc_match_call): Handle actual arguments associated with
4021         alternate return indicators.
4022         * trans-expr.c (gfc_conv_function_call): Ditto
4023         * trans-stmt.c (gfc_trans_call): Ditto
4024         (gfc_trans_return): Handle return statement with value.
4025         * trans-decl.c (gfc_generate_function_code): Handle functions with
4026         asterisk dummy.
4027         (gfc_get_fake_result_decl): Ditto
4028         * trans-types.c (gfc_get_function_type): Ditto
4029         * resolve.c (resolve_actual_arglist): Check alternate return indicators.
4030         (resolve_formal_arglist): Check asterisk dummy.
4031
4032 2003-11-27  Paul Brook  <paul@nowt.org>
4033
4034         * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
4035         allocation interface.
4036         (gfc_conv_ array_parameter): Ditto.
4037         (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
4038         * trans-array.c: Update prototype.
4039         * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
4040         (gfc_trans_auto_character_variable): Use new memory alloc interface.
4041         * trans-expr.c (gfc_conv_string_tmp): Ditto.
4042         (gfc_conv_function_call): Use gfc_conv_string_tmp.
4043         * trans-stmt.c (gfc_do_allocate):  Use new memory alloc interface.
4044         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
4045         * trans.h (gfc_ss_info): Remove unused pdata field.
4046         * trans.c (gfc_create_var_np): Change T to V.
4047
4048 2003-11-26  Richard Henderson  <rth@redhat.com>
4049
4050         * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
4051         * trans-intrinsic.c (gfc_intrinsic_map): ... here.  Add SCALE,
4052         FRACTION, NEAREST, SET_EXPONENT.
4053         (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
4054         Fix GTY marking.  Remove unnecessary const's.
4055         (LIBM_FUNCTION): Rename from I_LIB.
4056         (LIBF_FUNCTION): New.
4057         (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
4058         conventions.  Assume the expr signature is correct.  Mark const.
4059         (gfc_conv_intrinsic_exponent): Use library functions.
4060         (gfc_conv_intrinsic_set_exponent): Remove.
4061         (gfc_conv_intrinsic_scale): Remove.
4062         (gfc_conv_intrinsic_nearest): Remove.
4063         (gfc_conv_intrinsic_fraction): Remove.
4064         (gfc_conv_intrinsic_function): Update.
4065         * trans-decl.c (gfor_fndecl_math_exponent4): New.
4066         (gfor_fndecl_math_exponent8): New.
4067         (gfc_build_intrinsic_function_decls): Set them.
4068         * trans.h: Declare them.
4069
4070 2003-11-25  Canqun Yang  <canqun@nudt.edu.cn>
4071
4072         * trans-common.c (gfc_layout_global_equiv): Locate the error for
4073         underflow COMMON block.
4074         (gfc_trans_one_common): Fix bug for size of COMMON block containing
4075         EQUIVALENCE object. Also fix typo in an error message.
4076
4077 2003-11-25  Diego Novillo  <dnovillo@redhat.com>
4078
4079         * Make-lang.in: Add check-gfortran to lang_checks.
4080         (check-f95): Alias for check-gfortran.
4081
4082 2003-11-25  Jason Merrill  <jason@redhat.com>
4083
4084         * Make-lang.in (f95.tags): Create TAGS.sub files in each
4085         directory and TAGS files that include them for each front end.
4086
4087 2003-11-24  Paul Brook  <paul@nowt.org>
4088
4089         PR fortran/13154
4090         * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
4091
4092 2003-11-24  Paul Brook  <paul@nowt.org>
4093
4094         * expr.c (simplify_const_ref): Return SUCCESS for things we don't
4095         handle.
4096         * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
4097
4098 2003-11-24  Paul Brook  <paul@nowt.org>
4099
4100         PR fortran/13105
4101         * array.c (gfc_array_ref_shape): Handle elemental dimensions.
4102         * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
4103
4104 2003-11-20  Richard Henderson  <rth@redhat.com>
4105
4106         * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
4107         (gfc_conv_array_base): Likewise.
4108         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4109         * trans-expr.c (gfc_conv_string_tmp): Likewise.
4110         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
4111         * trans-stmt.c (gfc_trans_character_select): Likewise.
4112
4113 2003-11-13  Paul Brook  <paul@nowt.org>
4114
4115         * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
4116
4117 2003-11-13  Canqun Yang  <canqun@nudt.edu.cn>
4118
4119         * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
4120         (resolve_equivalence): New function.
4121         (resolve_equivalence_derived): New function.
4122
4123 2003-11-12  Richard Henderson  <rth@redhat.com>
4124
4125         * trans.c (gfc_trans_code): Use annotate_with_locus instead of
4126         annotate_all_with_locus.
4127
4128 2003-11-11  Canqun Yang  <canqun@nudt.edu.cn>
4129
4130         * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
4131         * trans-decl.c (gfc_finish_var_decl): Modified.
4132
4133 2003-11-08  Paul Brook  <paul@nowt.org>
4134
4135         PR fortran/12704
4136         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
4137         arrays.
4138
4139 2003-11-06  Paul Brook  <paul@nowt.org>
4140
4141         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
4142
4143 2003-11-02  Canqun Yang  <canqun@nudt.edu.cn>
4144
4145         * match.c (gfc_match_stopcode): Assign '0' to stop_code.
4146
4147 2003-10-27  Anthony Green  <green@redhat.com>
4148
4149         * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
4150         (f95.stagefeedback): Ditto.
4151
4152 2003-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
4153
4154         PR fortran/12682
4155         * Make-lang.in (f95.stageprofile): Add.
4156         (f95.stagefeedback): Add.
4157
4158 2003-10-23  Richard Henderson  <rth@redhat.com>
4159
4160         * f96-lang.c (gfc_gimplify_expr): Remove.
4161         (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
4162         (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
4163
4164 2003-10-23  Richard Henderson  <rth@redhat.com>
4165
4166         * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
4167
4168 2003-10-20  Paul Brook  <paul@nowt.org>
4169
4170         * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
4171         * trans-stmt.c (gfc_trans_do_while): Ditto.
4172
4173 2003-10-17  Paul Brook  <paul@nowt.org>
4174
4175         * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
4176
4177 2003-10-17  Paul Brook  <paul@nowt.org>
4178
4179         * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
4180
4181 2003-10-17  Feng Wang  <wf_cs@yahoo.com>
4182
4183         * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
4184         (gfc_resolve_minloc): Ditto.
4185         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
4186         Return the value after subtracting the lower bound.
4187
4188 2003-10-16  Richard Henderson  <rth@redhat.com>
4189
4190         * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
4191
4192 2003-10-16  Steven Bosscher  <steven@gcc.gnu.org>
4193
4194         * lang.c: Remove -M option for now, it's in the way for C.
4195
4196 2003-10-14  Jason Merrill  <jason@redhat.com>
4197
4198         * Make-lang.in (f95.tags): New rule.
4199
4200 2003-10-13  Richard Henderson  <rth@redhat.com>
4201
4202         * trans.c (gfc_trans_code): Use annotate_all_with_locus.
4203
4204 2003-10-13  Paul Brook  <paul@nowt.org>
4205
4206         * trans-decl.c (generate_local_decl): Don't create junk variables.
4207
4208 2003-10-13  Paul Brook  <paul@nowt.org>
4209
4210         * resolve.c (resolve_formal_arglist): Use function result decl in
4211         preference to function decl.
4212
4213 2003-10-12  Richard Henderson  <rth@redhat.com>
4214
4215         * f95-lang.c (gfc_define_builtin): New const_p argument.  Set
4216         TREE_READONLY.  Update all callers.
4217
4218 2003-10-12  Feng Wang  <wf_cs@yahoo.com>
4219
4220         * iresolve.c (gfc_resolve_cshift): Change to match implementation.
4221         * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
4222         (gfc_is_intrinsic_libcall): Add CSHIFT.
4223
4224 2003-10-12  Richard Henderson  <rth@redhat.com>
4225
4226         * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
4227         (gfc_trans_array_constructor_value): Likewise.
4228         (gfc_conv_array_initializer): Likewise.
4229         * trans-stmt.c (gfc_trans_character_select): Likewise.
4230
4231 2003-11-12  Kejia Zhao  <kejia_zh@yahoo.com.cn>
4232
4233         * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
4234
4235 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
4236
4237         * check.c (gfc_check_repeat): Check arguments are scalar.
4238         (gfc_check_trim): New function.
4239         * intrinsic.h (gfc_check_trim): Add prototype.
4240         * intrinsic.c (add_functions): Use it.
4241         * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
4242         Decalare.
4243         * trans-decl.c: Ditto.
4244         (gfc_build_intrinsic_fucntion_decls): Set them.
4245         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
4246         (gfc_conv_intrinsic_trim): New function.
4247         (gfc_conv_intrinsic_repeat): New function.
4248         (gfc_conv_intrinsic_function): Use them.
4249
4250 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
4251
4252         * trans-types.c (gfc_sym_type): Handle result variables.
4253
4254 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
4255
4256         * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
4257         gfc_get_character_type.
4258
4259 2003-10-11  Feng Wang  <wf_cs@yahoo.com>
4260
4261         * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
4262
4263 2003-10-11  Paul Brook  <paul@nowt.org>
4264
4265         * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
4266         (gfc_resolve_dprod): New function.
4267         (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
4268         * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
4269         (gfc_resolve_dprod): Declare.
4270         * intrinsic.c (add_functions): Use them.
4271         * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
4272
4273 2003-10-06  Richard Henderson  <rth@redhat.com>
4274
4275         * f95-lang.c (gfc_init_builtin_functions): Add clzll.
4276         * trans-intrinsic.c (call_builtin_clz): Use it.
4277
4278 2003-10-05  Paul Brook  <paul@nowt.org>
4279
4280         * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
4281         * trans-decl.c (gfc_generate_function_code): Set
4282         cfun->function_end_locus.
4283
4284 2003-09-24  Jason Merrill  <jason@redhat.com>
4285
4286         * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
4287         TREE_LOCUS.
4288
4289 2003-09-21  Lifang Zeng  <zlf605@hotmail.com>
4290         Paul Brook  <paul@nowt.org>
4291
4292         * Make-lang.in (F95_OBJS): Add fortran/data.o.
4293         * array.c (gfc_inser_constructor): New function.
4294         (gfc_get_constructor): New function.
4295         (gfc_free_constructor): Initialize offset and repeat.
4296         (iterator_stack): Remove.
4297         (expand_info): Add offset, component and repeat fields.
4298         (expand_constructor): Set them.
4299         (expand): Set new fields.
4300         (gfc_copy_constructor): Ditto. Avoid recursion.
4301         * gfortran.h: Add prototypes for new functions.
4302         (gfc_constructor): Add offset, component and repeat.
4303         (iteratio_stack): Move to here.
4304         * resolve.c (check_data_variable): Convert data values into variable
4305         initializers.
4306         (traverse_data_list): Build implicit loop chain.
4307         (gfc_resolve): Ditto.
4308         * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
4309         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
4310         * trans-expr.c (gfc_conv_structure): Handle array initializers.
4311         (gfc_conv_expr): Update to match.
4312         * trans.h (gfc_conv_structure): Declare.
4313         * data.c: New file.
4314
4315 2003-09-20  Kejia Zhao  <kejia_zh@yahoo.com.cn>
4316
4317         * trans.h: Add declarations for gfor_fndecl_si_kind and
4318         gfor_fndecl_sr_kind.
4319         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4320         * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
4321         (g95_conv_intrinsic_sr_kind): New function.
4322         (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
4323         SELECTED_REAL_KIND.
4324
4325 2003-09-17  Lars Segerlund  <Lars.Segerlund@comsys.se>
4326
4327         * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
4328         instead of _4 and _8 as postfix for libgfortran calls.
4329
4330 2003-09-16  Paul Brook  <paul@nowt.org>
4331
4332         * array.c (compare_bounds): New function.
4333         (gfc_compare_array_spec): Use it.
4334
4335 2003-09-14  Paul Brook  <paul@nowt.org>
4336
4337         * primary.c (gfc_match_rvalue): Make sure sym->result is set.
4338         * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
4339
4340 2003-09-14  Paul Brook  <paul@nowt.org>
4341
4342         * check.c (dim_rank_check): Allow assumed bounds if requested.
4343         (gfc_check_lbound): Call it.
4344         (gfc_check_ubound): Ditto.
4345         (gfc_check_size): Change to match.
4346         * simplify.c (gfc_simplify_bound): New function.
4347         (gfc_simplify_lbound): New function.
4348         (gfc_simplify_ubound): New function.
4349         * intrinsic.h: Declare them.
4350         * intrinsic.c (add_functions): Use them.
4351
4352 2003-09-14  Paul Brook  <paul@nowt.org>
4353
4354         * io.c (format_lex): Initialize negative_flag.
4355         (check_format): Intialize repeat.
4356         * trans-io.c (gfc_new_nml_name_expr): Declare static.
4357         (gfc_new_var_expr): Ditto.
4358
4359 2003-09-14  Paul Brook  <paul@nowt.org>
4360
4361         * trans-array.c (gfc_conv_array_initializer): Handle derived types.
4362         * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
4363
4364 2003-09-12  Paul Brook  <paul@nowt.org>
4365
4366         * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
4367
4368 2003-09-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
4369
4370         * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
4371         for a correct expression.
4372
4373 2003-09-10  Kejia Zhao  <kejia_zh@yahoo.com.cn>
4374
4375         * trans-intrinsic.c (real_compnt_info): New struct.
4376         (prepare_arg_info): New function.
4377         (gfc_conv_intrinsic_set_exponent): New function.
4378         (gfc_conv_intrinsic_scale): New function.
4379         (gfc_conv_intrinsic_nearest): New function.
4380         (gfc_conv_intrinsic_fraction): New function.
4381         (gfc_conv_intrinsic_exponent): New function.
4382         (gfc_conv_intrinsic_spacing): New function.
4383         (gfc_conv_intrinsic_rrspacing): New function.
4384         (gfc_conv_intrinsic_function): Use them.
4385
4386 2003-08-24 XiaoQiang Zhang  (zhangapache@yahoo.com>
4387
4388         * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
4389         build_int_2 changed from (high, low) to (low, high).
4390         * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
4391         ioparm_namelist_read_mode, iocall_set_nml_val_int,
4392         iocall_set_nml_val_float, iocall_set_nml_val_char,
4393         iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
4394         (gfc_build_io_library_fndecls): Add variable initialization.
4395         (gfc_new_nml_name_expr, get_new_var_expr): New function.
4396         (build_dt): Add namelist support.
4397         * io.c (value): New variable.
4398         (check_format): Support FMT_H now.
4399
4400 2003-09-07  Paul Brook  <paul@nowt.org>
4401
4402         * io.c (gfc_resolve_dt): Error if format label is not defined.
4403
4404 2003-09-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
4405
4406         * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
4407         about case_switch's break. The other is about building the condition
4408         statement tree, which judges the argument in the range of the
4409         corresponding integer type.
4410         * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
4411         for the large values.
4412
4413 2003-09-05  Paul Brook  <paul@nowt.org>
4414
4415         * f95-lang.c (expand_function_body): Gimplify the function.
4416
4417 2003-09-04  Jeff Law  <law@redhat.com>
4418
4419         * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
4420         index zero!
4421
4422 2003-09-04  Paul Brook  <paul@nowt.org>
4423
4424         * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
4425         (gfc_expand_stmt): New function.
4426         (LANG_HOOKS_RTL_EXPAND_STMT): Define.
4427         (expand_function_body): Use tree_rest_of_compilation.
4428         * trans-decl.c (gfc_generate_function_code): Don't free cfun.
4429
4430 2003-09-03  Jeff Law  <law@redhat.com>
4431
4432         * f95-lang.c (gfc_init_builtin_functions): C arrays start at
4433         index zero!
4434
4435 2003-08-30  Paul Brook  <paul@nowt.org>
4436
4437         * f95-lang.c (builtin_function): Remove #if 0 code.
4438         (gfc_define_builtin): New function.
4439         (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
4440         * mathbuiltins.def: New file.
4441         * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
4442         (gfc_intrinsic_map): Use mathbuiltins.def.
4443         (gfc_intrinsic_builtin_t): Remove.
4444         (gfc_build_intrinsic_lib_fndecls): Update.
4445         * trans-types.c (gfc_init_types): Remove redundant initilaization of
4446         signed_size_type_node.
4447
4448 2003-08-29  Paul Brook  <paul@nowt.org>
4449
4450         * arith.c (gfc_real_kinds): Use correct minimum exponents.
4451
4452 2003-08-22  Kejia Zhao  <kejia_zh@yahoo.com.cn>
4453
4454         * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
4455         (gfc_conv_intrinsic_function): Add MODULO.
4456
4457 2003-08-22  Jason Merrill  <jason@redhat.com>
4458
4459         * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
4460
4461 2003-08-22  Andreas Jaeger  <aj@suse.de>
4462
4463         * Make-lang.in (f95.install-common): Add DESTDIR support.
4464         * (f95.install-info): Likewise.
4465         (f95.uninstall): Likewise.
4466
4467 2003-08-19  Diego Novillo  <dnovillo@redhat.com>
4468
4469         * trans-types.c (gfc_init_types): Initialize
4470         signed_size_type_node with size_type_node.
4471
4472 2003-08-18  Paul Brook  <paul@nowt.org>
4473
4474         * dependency.c (gfc_dependency): New enum.
4475         (check_another_array_ref): Remove.
4476         (gfc_get_array_from_component): Remove.
4477         (get_x): Remove.
4478         (get_range): Remove.
4479         (get_no_of_elements): Use mpz_t, not mpf_t.
4480         (transform_sections): New function.
4481         (gfc_check_range_range): Rename ...
4482         (gfc_check_section_vs_section): ... to this.  Use new function.
4483         (gfc_is_inside_range): Rewrite to match.
4484         (gfc_check_element_vs_section): Ditto.
4485         (gfc_check_element_vs_element): Ditto.
4486         (get_deps): Ditto.
4487         (gfc_dep_resolver): Ditto.  Remove unused parameter.
4488         * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
4489         gfc_check_element_vs_element, gfc_is_inside_range,
4490         gfc_get_array_from_component): Remove prototypes for static functions.
4491         (gfc_dep_resolver): Update prototype.
4492         * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
4493
4494 2003-08-15  Paul Brook  <paul@nowt.org>
4495
4496         * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
4497         return values to parent scope.
4498         (gfc_build_dummy_array_decl): Ditto.
4499
4500 2003-08-14  Paul Brook  <paul@nowt.org>
4501
4502         * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
4503         size of the type, not the pointer.
4504         * resolve.c (resolve_symbol): Give more accurate error message.
4505
4506 2003-08-10  Paul Brook  <paul@nowt.org>
4507
4508         * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
4509
4510 2003-08-10  Paul Brook  <paul@nowt.org>
4511
4512         * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
4513         type components.
4514
4515 2003-08-10  Chun Huang  <compiler@sohu.com>
4516
4517         * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
4518         (resolve_symbol): Ditto.
4519         * trans-expr.c (gfc_conv_statement_function): New function.
4520         (gfc_conv_function_expr): Use it.
4521
4522 2003-08-10  Paul Brook  <paul@nowt.org>
4523
4524         * trans-array.c (gfc_conv_ss_startstride): Handle functions.
4525         (walk_function_expr): Set section rank.
4526         * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
4527
4528 2003-08-10  Paul Brook  <paul@nowt.org>
4529
4530         * intrinsic.c (add_sym): Prefix names with correct string.
4531         (add_sym_0s): New function.
4532         (add_subroutines): Register abort.
4533
4534 2003-08-10  Erik Schnetter  <schnetter@uni-tuebingen.de>
4535
4536         * gfortran.h: Introduce options to control the mangling.
4537         * lang.opt: Likewise.
4538         * options.c (gfc_init_options): Handle the options.
4539         * trans-common.c (gfc_sym_mangled_common_id): New function.
4540         (gfc_build_common_decl): Call it.
4541         * trans-decl.c (gfc_sym_mangled_function_id): New function.
4542         (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
4543
4544 2003-08-09  Paul Brook  <paul@nowt.org>
4545
4546         * module.c (mio_symbol): Always ouput a namespace for formal args.
4547         (load_needed): Namespace now belong to their proper symbol.
4548         (gfc_dump_module): Change G95=>GFORTRAN.
4549
4550 2003-08-05  Paul Brook  <paul@nowt.org>
4551
4552         * options.c: Force -fg77-calls.
4553
4554 2003-08-02  Paul Brook  <paul@nowt.org>
4555
4556         * Makelang.in: Rename G95_* to GFORTRAN_*.
4557         * All sources: Rename G95_* to GFC_*.
4558
4559 2003-08-01  Paul Brook  <paul@nowt.org>
4560
4561         * fortran/Make-lang.in: Use GMPLIBS.
4562         * fortran/config-lang.in: Set need_gmp.
4563         * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
4564
4565 2003-07-27  Andreas Jaeger  <aj@suse.de>
4566
4567         * trans-decl.c (gfc_generate_constructors): Convert prototype to
4568         ISO C90.
4569         * trans-const.c (gfc_init_constants): Likewise.
4570         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
4571
4572         * gfortranspec.c: Convert to ISO C90.
4573         (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
4574
4575 2003-07-26  Paul Brook  <paul@nowt.org>
4576
4577         * lang.opt: Add -fdump-parse-tree.
4578         * options.c (gfc_handle_option): Ditto.
4579         * resolve.c (resolve_forall_iterators): Convert to proper type.
4580         * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
4581
4582 2003-07-26  Paul Brook  <paul@nowt.org>
4583
4584         * Makefile.in: Add build dependencies on files common with rest of gcc.
4585
4586 2003-07-26  Lifang Zeng  <zlf605@hotmail.com>
4587
4588         * trans.h: Declare g95_trans_pointer_assignment.
4589         * trans-expr.c (g95_trans_pointer_assignment): New function.
4590         (g95_trans_pointer_assign): Use it.
4591         * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
4592         (g95_trans_pointer_assign_need_temp): New function.
4593
4594 2003-07-26  Paul Brook  <paul@nowt.org>
4595
4596         * gfortran.texi: Replace references to g95.
4597
4598 2003-07-26  Paul Brook  <paul@nowt.org>
4599
4600         Rename g95_* to gfc_*.
4601
4602 2003-07-25  Paul Brook  <paul@nowt.org>
4603
4604         * gfortran.h: Rename from g95.h.
4605         * trans-types.c (boolean_type_node, booelan_true_node,
4606         boolean_false_node): Remove.
4607         * trans-types.h: Ditto.
4608
4609 2003-07-25  Chun Huang  <compiler@sohu.com>
4610
4611         * parse.c (accept_statement): Implement BLOCK DATA statement.
4612         * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
4613         variables.
4614
4615 2003-07-24  Lifang Zeng  <zlf605@hotmail.com>
4616
4617         * trans-stmt.c (temporary_list): Define.
4618         (g95_trans_assign_need_temp): New function.
4619         (g95_trans_forall_1): Modified for WHERE.
4620         (g95_trans_where_assign): Modified.
4621         (g95_trans_where_2): Modified.
4622         (g95_evaluate_where_mask): Modified.
4623         (g95_trans_where): Modified.
4624         (g95_get_temp_expr): Removed.
4625         (g95_add_to_where_stmt_list): Removed.
4626         (compute_overall_iter_number): Modified for WHERE.
4627         * trans.h: Remove where_stmt_list.
4628
4629 2003-07-24  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4630
4631         * lang.opt: Correct description of options -J and -M.
4632
4633 2003-07-23  Steven Bosscher   <steven@gcc.gnu.org>
4634
4635         * lang.opt: Move help text to here.
4636         * lang-options.h: Remove.
4637
4638 2003-07-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4639         * iresolve.c (g95_resolve_transpose): Proper variable in switch.
4640         * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
4641         on kind.
4642
4643 2003-07-22  Steven Bosscher  <steven@gcc.gnu.org>
4644         Paul Brook  <paul@nowt.org>
4645
4646         * check.c (check_rest): Use global pedantic flag.
4647         * io.c (data_desc): Ditto.
4648         * error.c (g95_warning, g95_warning_now): Use global flag.
4649         * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
4650         (expand_function_body): Update to new prototypes.
4651         (g95_init): Use new option names.
4652         * g95.h (g95_option_t): Standardize names.
4653         (g95_init_options, g95_handle_option): Update prototypes.
4654         * interface.c: Use new option names.
4655         * match.c: Ditto.
4656         * module.c: Ditto.
4657         * parse.c: Ditto.
4658         * primary.c: Ditto.
4659         * resolve.c: Ditto.
4660         * scanner.c: Ditto.
4661         * simplify.c: Ditto.
4662         * symbol.c: Ditto.
4663         * trans-array.c: Ditto.
4664         * trans-expr.c: Ditto.
4665         * trans-types.c: Ditto.
4666         * trans-decl.c: Ditto.
4667         (g95_build_library_function_decl): Remove obsolete VPARAMS.
4668         * trans.h: Ditto.
4669         * options.c (g95_display_help): Remove.
4670         (g95_init_options): Convert to new scheme.
4671         (set_Wall): Ditto
4672         (g95module_option): Ditto, rename from g95_parse_arg.
4673         (g95_handle_module_path_options): New function.
4674         * trans-equivalence.c: Fix error message.
4675         * lang.opt: Corrections.
4676
4677 2003-07-21  Steven Bosscher  <steven@gcc.gnu.org>
4678
4679         * lang.opt: New file.
4680
4681 2003-07-21  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4682
4683         * decl.c (match_attr_spec): Set colon_seen.
4684
4685 2003-07-14  Paul Brook  <paul@nowt.org>
4686
4687         * trans-array.c: Update comment.
4688         (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
4689         * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
4690         minmaxloc,minmaxval): Ditto.
4691         * trans-io.c (g95_trans_transfer): Ditto.
4692         * trans-stmt.c: Remove unneeded prototypes.
4693         (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
4694         (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
4695         (compute_inner_temp_size): Remove bits of dead code. Add comments.
4696         Don't share loopinfo.
4697         (compute_overall_iter_number): Declare as static.
4698         (allocate_temp_for_forall_nest): Ditto.
4699         (g95_trans_forall_1): Don't pass shared loopinfo.
4700         * trans.c (g95_start_block): Expand comment.
4701
4702 2003-07-12  Paul Brook  <paul@nowt.org>
4703
4704         * arith.c (g95_index_integer_kind): Remove unused initializer.
4705         * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
4706         index by size of element.
4707         (generate_loop_for_rhs_to_temp): Ditto.
4708         (allocate_temp_for_forall_nest): Use element size, not index size.
4709
4710 2003-07-11  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4711
4712         * arith.c (g95_index_integer_kind): Add a TODO.
4713         * simplify.c (g95_simplify_nearest): Add a TODO.
4714
4715 2003-07-09  Chun Huang  <compiler@sohu.com>
4716
4717         * trans.h: Add declarations for gfor_fndecl_string_scan and
4718         gfor_fndecl_string_verify.
4719         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4720         * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
4721         (g95_conv_intrinsic_verify): New function.
4722         (g95_conv_intrinsic_function): Add SCAN and VERIFY.
4723         * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
4724         of parameter 'BACK=.TRUE.'
4725
4726 2003-07-05  Lifang Zeng  <zlf605@hotmail.com>
4727
4728         * trans-stmt.c (iter_info, forall_info): Define.
4729         (g95_trans_forall_block): Remove.
4730         (g95_trans_forall_loop): Use forall info blocks.
4731         (g95_trans_nested_forall_loop): New function.
4732         (g95_do_allocate): Handle things other than logical masks.
4733         (generate_loop_for_temp_to_lhs): New function.
4734         (generate_loop_for_rsh_to_temp): New function.
4735         (compute_inner_temp_size): New function.
4736         (compute_overall_iter_number): New function.
4737         (allocate_temp_for_forall_nest): New function.
4738         (g95_trans_forall): Move body ...
4739         (g95_trans_forall_1): ... to here.  Handle loops with temporaries.
4740
4741 2003-07-02  Paul Brook  <paul@nowt.org>
4742
4743         * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
4744         in correct scope.  Change callers to match.
4745         * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
4746         * iresolve.c (g95_resolve_reshape): Only use constant shapes.
4747
4748 2003-07-02  Paul Brook  <paul@nowt.org>
4749
4750         * trans-array.c (g95_conv_loop_setup): Remove dead var.  Use
4751         expression shape for all expressions.
4752         * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
4753
4754 2003-07-03  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4755
4756         * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
4757         g95_parse_arg), intrinsic.c (g95_convert_type): support of
4758         -Wconversion.
4759         * intrinsic.c, g95.h: Add g95_convert_type_warn,
4760         * resolve.c (g95_resolve_index): Call it.
4761
4762 2003-07-02  Paul Brook  <paul@nowt.org>
4763
4764         * iresolve.c (g95_resolve_reshape): Set expression shape.
4765         (g95_resolve_shape): Ditto.
4766         * simplify.c (g95_simplify_shape): Move common code outside condition.
4767         * trans-array.c (g95_conv_array_initializer): Teach it how to count.
4768
4769 2003-07-01  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4770
4771         * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
4772         conformance checks.
4773
4774 2003-06-29  Paul Brook  <paul@nowt.org>
4775
4776         * array.c (g95_simplify_iterator_var): Don't bother with return value.
4777         * expr.c (find_array_element, find_component_ref): New functions.
4778         (remove_subobject_ref): New function.
4779         (simplify_const_ref): Use them.  Rename from simplify_component_ref.
4780         (simplify_ref_chain): New function.
4781         (g95_simplify_expr): Use it.  Simplify parameter variable subobjects.
4782         (g95_specification_expr): Simplify the expression.
4783         * resolve.c (resolve_operator): Check simplifications return code.
4784         (g95_resolve_expr): Ditto.
4785
4786 2003-06-26  Paul Brook  <paul@nowt.org>
4787
4788         * expr.c (simplify_component_ref): New function.
4789         (g95_simplify_expr): Use it.
4790         * resolve.c (resolve_structure_cons): Handle references.
4791
4792 2003-06-25  Paul Brook  <paul@nowt.org>
4793
4794         * trans-io.c (build_dt): Handle internal units.
4795
4796 2003-06-25  Canqun Yang  <canqun@yahoo.com.cn>
4797
4798         * trans-common.c (g95_build_common_decl): Array index range starts at 0.
4799         (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
4800         Use g95_array_index_type instead of integer_type_node.
4801         (g95_build_common_decl, g95_set_common_master_type): Use
4802         g95_character1_type_node instead of char_type_node.
4803         * trans-equivalence.c (g95_layout_local_equiv): As above.
4804
4805 2003-06-24  Steven G. Kargl  <kargls@attbi.com>
4806
4807         * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
4808         remove last remains of -fquiet.
4809
4810 2003-06-22  Paul Brook  <paul@nowt.org>
4811
4812         * resolve.c (resolve_operator): Don't fail if we can't simplify.
4813         (g95_resolve_expr): Ditto.
4814         (resolce_code): Mark as static.
4815         * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
4816         gimplifer doesn't (yet).
4817
4818 2003-06-20  Paul Brook  <paul@nowt.org>
4819
4820         * g95.h: Add ST_PAUSE and EXEC_PAUSE.
4821         * match.c (g95_match_if): Add ST_PAUSE.
4822         (g95_match_stopcode): New function.
4823         (g95_match_pause, g95_match_stop): Use it.
4824         * parse.c (g95_ascii_statement): Handle ST_PAUSE.
4825         (decode_stmt, next_statement, parse_executable): Ditto.
4826         * resolve.c (resolve_code): Ditto.
4827         * st.c (g95_free_statement): Ditto.
4828         * trans-stmt.c (g95_trans_pause): New function.
4829         * trans-stmt.h: Declare it.
4830         * trans.c (g95_trans_code): Use it.
4831         * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
4832         Declare.
4833         (g95_build_builtin_function_decls): Initialize them.
4834         * trans.h: Ditto.
4835         * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
4836
4837 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4838
4839         * io.c (g95_match_open , g95_match_close, g95_match_inquire,
4840         match_filepos): Fix error handling.
4841
4842 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4843
4844         * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
4845         Add assertions on arguments.
4846         * resolve.c (expression_shape): Remove useless &.
4847         * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
4848         g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
4849         g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
4850         g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
4851         g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
4852         g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
4853         (g95_simplify_not, g95_simplify_scale): Add assertions.
4854
4855 2003-06-15  Paul Brook  <paul@nowt.org>
4856
4857         Clean up stuff to work with the ssa optimizers.
4858         * convert.c (convert): Handle BOOLEAN_TYPEs.
4859         * f95-lang.c (g95_truthvalue_conversion): Implement.
4860         * trans-array.c (g95_trans_array_constructor_value): Group multiple
4861         scalar values.
4862         * trans.h (g95_truthvalue_conversion): Declare.
4863         * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
4864         * trans-stmt.c (g95_trans_character_select): Don't create array
4865         assignments.  Mark labels as indirect jump targets.
4866         * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
4867         (g95_get_dtype_cst): Handle LOGICAL types.
4868
4869 2003-06-14  Paul Brook  <paul@nowt.org>
4870
4871         * f95-lang.c (g95_gimplify_expr): New function.
4872         * trans-array.c (g95_trans_array_constructor_value): Don't create
4873         array assignments.
4874         (g95_conv_expr_descriptor): Rename simple->gimple.
4875         * trans-expr.c (conv_expr_op): Use proper logical operators.
4876         * trans-intrinsic.c (build_fixbound_expr): New function.
4877         (build_fix_expr): Ditto.
4878         (g95_conv_intinsic_aint): Use them. Use builtin functions.
4879         (g95_conv_intrinsic_function): Add FLOOR and CEILING.
4880
4881 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4882
4883         * array.c (g95_compare_array_spec): Remove unreachable code.
4884         * expr.c (g95_copy_expr): Likewise.
4885         * intrinsic.c (g95_convert_type): Likewise.
4886         * misc.c (g95_code2string): Likewise.
4887         * simplify.c (g95_simplify_ishft, g95_simplify_real,
4888         g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
4889         * trans-stmt.c (g95_trans_select): Likewise.
4890         * primary.c (extend_ref): Add an assertion.
4891         * simplify.c (g95_convert_constant): Add const.
4892         * intrinsic.h: Remove g95_check_x_ni.
4893         * f95-lang.c (g95_finish): Call g95_release_include_path.
4894
4895 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4896
4897         * resolve.c (resolve_contained_functions): Fix typo introduced on
4898         2003-01-13.
4899
4900 2003-06-09  Paul Brook  <paul@nowt.org>
4901
4902         * g95.h: Include system.h not hwint.h.
4903         * many: use safe-ctype.h not ctype.h.  Change isalpha -> ISALPHA, etc.
4904         * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
4905
4906 2003-06-09  Paul Brook  <paul@nowt.org>
4907
4908         * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
4909         * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
4910         * trans-decl.c (g95_add_decl_to_functions): Make non-static.
4911         (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
4912         (g95_generate_function_code): Translate COMMON and EQUIVALENCE
4913         objects.
4914         * trans.h (g95_trans_equivalence, g95_trans_common,
4915         g95_add_decl_to_function): Declare.
4916         * trans-common.c, trans-equivalence.c: New files.
4917
4918 2003-06-08  Steven Bosscher  <steven@gcc.gnu.org>
4919
4920         * intrinsic.c (g95_intrinsic_extension): Remove.
4921         (add_functions): Substitute g95_check_x for g95_check_x_ni
4922         everywhere.
4923         (g95_init_expr_extensions): New function.
4924         (g95_intrinsic_func_interface): Use it.
4925         * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
4926         * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
4927         g95_check_precision, g95_check_present, g95_check_radix,
4928         g95_check_range, g95_check_selected_real_kind): Do not set
4929         g95_intrinsic_extension.
4930         (g95_check_x_ni): Remove now duplicate of g95_check_x.
4931
4932         * expr.c (check_inquiry): Add FIXME, fixup some code style.
4933
4934 2003-06-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4935
4936         * g95.h (ref_type): Name this type explicitly.
4937         * module.c (MIO_NAME): Add specialisations of mio_name.
4938         (mio_symbol_attribute, mio_typespec, mio_array_ref,
4939         mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
4940         (ab_attribute): Name this type explicitly.
4941         (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
4942
4943 2003-06-05  Kejia Zhao  <kejia_zh@yahoo.com.cn>
4944
4945         * trans-intrinsic.c (g95_conv_allocated): New function.
4946         (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
4947
4948 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
4949
4950         * f95-lang.c: Don't include g95-support.h
4951         (g95_mark_addressable): Add prototype.
4952         (g95_init_decl_processing): Remove C front end hack.
4953         * f95-tree.c: Remove file.
4954         * support.c: Remove file.
4955         * g95-support.h: Remove file.
4956         * trans-types.c (g95_init_types): Set up boolean
4957         type related tree nodes.
4958         * Make-lang.in: Remove rules for dead files and
4959         dependencies on them.
4960
4961 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
4962
4963         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
4964         C front end dependency.  Also, convert.c does not depend on
4965         g95-support.h anymore.
4966         * convert.c: Don't include c-common.h and g95-support.h
4967         * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
4968         (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
4969         stmts_are_full_exprs_p, current_stmt_tree,
4970         current_scope_stmt_stack): Remove.
4971         * g95-support.h (unsigned_conversion_warning): Kill proto.
4972         (boolean_type_node, boolean_true_node, boolean_false_node):
4973         Don't define here.  Instead, make then true tree nodes in
4974         trans-types.
4975         * support.c (c_global_trees): Die, C front end, die!!!
4976         (g95_init_c_decl_hacks): Don't touch intmax_type_node,
4977         uintmax_type_node, string_type_node and const_string_type_node.
4978         (decl_constant_value, overflow_warning): Make static functions.
4979         They are in death row too, though.
4980         (default_conversion, c_expand_asm_operands): Remove.
4981         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
4982         trans.c: Don't include c-common.h.
4983         * trans-types.c (boolean_type_node, boolean_true_node,
4984         boolean_false_node): Make them real tree nodes.
4985         * trans-types.h (intmax_type_node, string_type_node,
4986         const_string_type_node): Hack to work around C dependencies
4987         in builtin-types.def.
4988
4989 2003-06-04  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4990
4991         * decl.c (decl_types): Add some iterators-like sentinels.
4992         * decl.c (match_attr_spec): Use them.
4993         Use "decl_types" instead of "int".
4994         Add cast in call to g95_match_strings.
4995         * dump-parse-tree.c (g95_show_namespace):  Use "g95_intrinsic_op"
4996         instead of "int".
4997         * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
4998         (g95_interface_info): Use "g95_intrinsic_op".
4999         * dump-parse-tree.c (g95_show_namespace): Use them.
5000         * interface.c (g95_check_interfaces): Use them.
5001         * module.c (read_module, write_module): Use them.
5002         * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
5003         Use "g95_intrinsic_op".
5004         * interface.c (check_operator_interface): Use "g95_intrinsic_op".
5005         Add a default case in switch statement.
5006         * intrinsic.h (g95_generic_isym_id): Moved to...
5007         * g95.h (g95_generic_isym_id): here.
5008         (g95_intrinsic_sym): Use "g95_generic_isym_id".
5009         * intrinsic.c (make_generic): Use "g95_generice_isym_id".
5010         * trans-intrinsic.c (g95_intrinsic_map_t,
5011          g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
5012         * match.c (g95_match_intrinsic_op): Add cast in call to
5013         g95_match_strings.
5014
5015 2003-06-03  Steven Bosscher  <steven@gcc.gnu.org>
5016
5017         * support.c (skip_evaluation, warn_conversion, lvalue_p,
5018         lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
5019         constant_fits_type_p, convert_and_check,
5020         unsigned_conversion_warning): Remove these ugly remnants
5021         we inherited from the C front end.
5022         (function_types_compatible): Remove '#if 0'-edcode.
5023         (build_modify_expr): Likewise.
5024         (convert_for_assignment): Don't use the deceased functions.
5025         The parameter fundecl is now unused.
5026         (decl_constant_value): Always just return decl.  In fact
5027         this function is not used at present, but it might be in
5028         the future, when we start using the tree inliner.
5029         (overflow_warning, default_conversion, c_expand_asm_operands):
5030         Abort when these are called, they are part of the C type
5031         checking implementation and therefore poison to Fortran.
5032
5033 2003-06-04  Steven Bosscher  <steven@gcc.gnu.org>
5034
5035         * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
5036         c-pretty-print.o and c-dump.o.  Add a comment on why we
5037         depend on c-semantics.c.
5038         * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
5039         Don't use the C front end tree dumper hook to dump the
5040         language specific tree representation -- we don't have
5041         one.  So instead, inherit the default langhook.
5042
5043 2003-06-02  Paul Brook  <paul@nowt.org>
5044
5045         * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
5046
5047 2003-06-02  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5048
5049         * check.c (g95_check_associated): Use proper types.  Remove
5050         extraneous argument in call to g95_error().
5051
5052 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5053
5054         * resolve.c (resolve_operator): Make logical operands convert to the
5055         type with higher kind.
5056
5057 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5058
5059         * check.c (g95_check_associated): Make sure both pointer and target has
5060         the same type and rank. Null pointer or array section with vector
5061         subscript as target are not allowed.
5062         * trans.h: Declare gfor_fndecl_associated.
5063         * trans-decl.c: (g95_build_builtin_function_decls): Initialize
5064         gfor_fndecl_associated.
5065         * trans-intrinsic.c (g95_conv_associated): New function.
5066         (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
5067
5068 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5069
5070         * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
5071         according to POINTER itself rather than TARGET.
5072         (g95_conv_expr_descriptor): Make lbound start at 1.
5073         * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
5074
5075 2003-06-01  Paul Brook  <paul@nowt.org>
5076
5077         * expr.c (g95_type_convert_binary): Make it match the standard.
5078         * g95.texi: Remove dead link.
5079
5080 2003-06-01  Steven Bosscher  <steven@gcc.gnu.org>
5081
5082         * g95.texi: Cleanup somewhat in preparation for inclusion
5083         in GCC CVS.
5084
5085 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5086             Canqun Yang  <canqun@yahoo.com.cn>
5087
5088         * resolve.c (compare_bound_int, resolve_where_shape): Proper return
5089         type.
5090         (g95_find_forall_index): Return proper value.
5091         (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
5092         compare the return value from g95_find_forall_index.
5093
5094 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5095         * g95.h, io.c (g95_st_label): Remove "length".
5096         (g95_symtree): Remove "link".
5097         (g95_case): Remove "code".
5098         * arith.c, arith.h (g95_compare_string, g95_convert_integer,
5099         g95_convert_real): Make an argument pointer to const.
5100         * decl.c (colon_seen): Add a TODO.
5101         * interface.c (g95_compare_types): Fix typo.
5102         * interface.c (compare_interfaces): Preserve value of "p".
5103         * intrinsic.c (sort_actual): Remove "i".
5104         * match.c (g95_match_assign): Proper type in call to g95_match().
5105         * parse.c (next_free): Avoid duplicate call due to macro.
5106         * parse.c (check_statement_label): wrong type in call to g95_error.
5107         * primary.c (match_real_constant): Add a TODO.
5108         * resolve.c (resolve_select):  Remove useless conditional.
5109         * simplify.c (g95_simplify_repeat): Proper assignment to
5110         "value.character.string".
5111         * simplify.c (g95_simplify_reshape): Wrong variable in call to
5112         g95_error.
5113
5114 2003-05-20  Canqun Yang  <canqun@yahoo.com.cn>
5115
5116         * trans-stmt.c: Remove unnecessary include file defaults.h.
5117
5118 2003-05-19  Lifang Zeng  <zlf605@hotmail.com>
5119
5120         * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
5121         stride.
5122         (g95_trans_forall): Allow arbitrary number of FORALL indexes and
5123         actual variables used as FORALL indexes.
5124
5125 2003-05-15  Paul Brook  <paul@nowt.org>
5126
5127         * trans-array.c (g95_trans_static_array_pointer): Use
5128         null_pointer_node.
5129         (g95_trans_deferred_array): Initialize static array pointers.
5130         * trans-expr.c (g95_conv_function_call): Use formal arglist to
5131         correctly pass POINTER and absent CHARACTER arguments.
5132
5133 2003-05-14  Lifang Zeng  <zlf605@hotmail.com>
5134
5135         * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
5136         (g95_resolve_forall_body): Resolve FORALL body.
5137         (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
5138         (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
5139         (g95_find_forall_index): Check whether the FORALL index appears in
5140         the expression or not.
5141         (resolve_code): Modified.
5142
5143 2003-05-14  Paul Brook  <paul@nowt.org>
5144
5145         * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
5146
5147 2003-05-13  Paul Brook  <paul@nowt.org>
5148
5149         * trans-types.c (g95_max_array_element_size): Now a tree node.
5150         (g95_init_types): Work out max size properly.
5151         (g95_get_dtype_cst): Modify to match.
5152
5153 2003-05-11  Paul Brook  <paul@nowt.org>
5154
5155         * trans-io.c (add_case): Create a label decl for case labels.
5156
5157 2003-05-11  Paul Brook  <paul@nowt.org>
5158
5159         * arith.c (g95_integer_index_kind): New variable.
5160         * f95-lang.c (g95_init): Move frontend initialization here ...
5161         (g95_post_options): ... from here.
5162         * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
5163         * intrinsic.c (add_functions): Use index kinds.
5164         * iresolve.c: Convert to index_kind where needed.
5165         * resolve.c (g95_resolve_index): Make public, use index_kind.
5166         (resolve_array_ref): Adjust to match.
5167         * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
5168         * trans-stmt.c: Ditto.
5169         * trans-types.c: Ditto.
5170         * trans-types.h (g95_array_index_kind): Remove declaration.
5171         * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
5172
5173 2003-05-07  Paul Brook  <paul@nowt.org>
5174
5175         * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
5176         * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
5177         of bound indices.
5178
5179 2003-05-07  Paul Brook  <paul@nowt.org>
5180
5181         * trans-array.c (trans_static_array_pointer,
5182         g95_trans_array_constructor_value, g95_conv_array_initializer,
5183         g95_conv_structure): CONSTRUCTOR nodes only have one operand.
5184         (g95_add_loop_ss_code): Convert subscripts to the correct type.
5185         * trans-stmt.c (g95_trans_character_select): Ditto.
5186         * trans-types.c (g95_init_types): Ditto.
5187
5188 2003-05-07  Steven Bosscher  <steven@gcc.gnu.org>
5189
5190         * f95-lang.c (expand_function_body): Use input_line, not lineno.
5191         * trans-decl.c (g95_generate_function_code,
5192         g95_generate_constructors): Likewise.
5193         * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
5194         g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
5195         Likewise.
5196
5197 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5198         * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
5199         with components point to the DERIVED type itself, and two DERIVED
5200         type with components point to each other.
5201         * trans-expr.c (g95_conv_componet_ref): Modified
5202
5203 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5204         * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
5205         null_pointer_node.
5206         (g95_trans_pointer_assign): Implement Nullify.
5207
5208 2003-05-01  Paul Brook  <paul@nowt.org>
5209
5210         * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
5211         * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
5212
5213 2003-05-01  Paul Brook  <paul@nowr.org>
5214
5215         * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
5216         trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
5217         IS_EMPTY_STMT.
5218
5219 2003-05-01  Canqun Yang  <canqun@yahoo.com.cn>
5220
5221         * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
5222         CASE_LABEL_EXPR.
5223
5224 2003-04-28  Paul Brook  <paul@nowt.org>
5225
5226         * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
5227         as their kind suggests.
5228         (g95_resolve_reshape): Ditto.
5229
5230 2003-04-28  Chun Huang  <compiler@sohu.com>
5231
5232         * trans-expr.c (g95_conv_substring_expr): New function.
5233         (g95_conv_expr): Use it.
5234
5235 2003-04-28  Paul Brook  <paul@nowt.org>
5236
5237         * iresolve.c (g95_resolve_transpose): Make it match the
5238         implementation.
5239         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
5240
5241 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
5242
5243         * trans-types.c (g95_add_field_to_struct): New function to
5244         add a field to a UNION_TYPE or RECORD_TYPE.
5245         * trans-types.h (g95_add_field_to_struct): Prototype.
5246         (g95_get_derived_type): Use g95_add_field_to_struct to add
5247         components.
5248         * trans-io.c (g95_add_field): Remove.
5249         (ADD_FIELD): Use new g95_add_field_to_struct function.
5250         (ADD_STRING): Likewise.
5251         * trans-stmt.c (g95_trans_select): Likewise.
5252         (g95_add_field): Remove duplicated function.
5253
5254 2003-04-18  Canqun Yang  <canqun@yahoo.com.cn>
5255
5256         Port implementation for CHARACTER SELECT from Andy's tree.
5257         * trans-stmt.c (g95_trans_character_select): Implement character
5258         select. (g95_add_field): New function.
5259         * trans-decl.c: Declare 'gfor_gndecl_select_string'.
5260         (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
5261         * g95.h (struct g95_case): Add field 'int n'.
5262         * trans.h: Declare 'gfor_fndecl_select_string'.
5263
5264 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
5265
5266         * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
5267         (g95_insert_bbd): Die on duplicates.
5268         * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
5269
5270 2003-04-14  Steven Bosscher  <steven@gcc.gnu.org>
5271
5272         * g95.texi: Require GMP 4.0 -- like we actually
5273         do.  Explain the testsuite and what-goes-where.
5274         Don't use undefined texinfo symbol.  Break very
5275         long line.  Remove finished item from the list
5276         of open projects.
5277
5278 2003-04-11  Canqun Yang  <canqun@yahoo.com.cn>
5279
5280         * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
5281         LOGICAL type.
5282
5283 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
5284
5285         * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
5286         (g95_trans_forall_body): New function.
5287
5288 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
5289
5290         * resolve.c (resove_where): New function.
5291         (resolve_where_shape): New function.
5292         (resolve_code): Add call to 'resolve_where'
5293         * trans-stmt.c (g95_trans_where): Modified.
5294         (g95_trans_where_2): New function.
5295         (g95_trans_where_assign): New function.
5296         (g95_evaluate_where_mask): New function.
5297         (g95_add_to_stmt_list): New function.
5298         (g95_get_temp_expr): New function.
5299         * trans.h (where_stmt_list): New structure.
5300
5301 2003-04-10  Paul Brook  <paul@nowt.org>
5302
5303         * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
5304         (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
5305
5306 2003-04-10  Steven Bosscher  <steven@gcc.gnu.org>
5307
5308         Update after mainline -> tree-ssa-branch merge.
5309         * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
5310         call.
5311         (g95_init): Update for new lang_hooks definition.
5312         (g95_post_options): New langhook.
5313         (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
5314         * scanner.c (g95_new_file): Comment update.
5315
5316 2003-04-09  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5317
5318         * g95.h, lang-options.h: Add -Wimplicit-interface.
5319         * options.c (g95_init_options, g95_parse_arg): Set it.
5320         * interface.c (check_intents): Warn about call with implicit
5321         interface.
5322         * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
5323         g95_procedure_use.
5324
5325 2003-04-05  Paul Brook  <paul@nowt.org>
5326
5327         * iresolve.c (g95_resolve_spread): Don't resole based on type.
5328         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
5329
5330 2003-03-29  Paul Brook  <paul@nowt.org>
5331
5332         * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
5333         (g95_resolve_unpack): Ditto.
5334         * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
5335         (g95_conv_intrinsic_function): Use it.  Remove PACK and UNPACK.
5336         (g95_is_intrinsic_libcall): Add PACK and UNPACK.
5337
5338 2003-03-25  Paul Brook  <paul@nowt.org>
5339
5340         * arith.c (g95_unary_user, g95_user): Remove dead functions.
5341         * arith.h: Ditto.
5342         * array.c (g95_free_array_ref): Ditto.
5343         * g95.h: Ditto.
5344         * symbol.c (g95_use_derived_tree): Ditto.
5345         * intrinsic.c (add_functions): Use simplification for SCALE.
5346         * primary.c (g95_match_rvalue): Test sym, not symtree.
5347
5348 2003-03-25  Paul Brook  <paul@nowt.org>
5349
5350         * trans-decl.c (build_function_decl): Add parameter before it gets
5351         turned into a constant.
5352         * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
5353         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
5354         * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
5355
5356 2003-03-22  Paul Brook  <paul@nowt.org>
5357
5358         * trans-array.c (g95_conv_array_initializer): Allow scalar
5359         expressions.
5360         * trans-decl.c (g95_finish_var_decl): Result variables are not
5361         module variables.
5362         * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
5363         (g95_conv_intrinsic_function): Use it.
5364         * trans-types.h (g95_type_spec): Remove dead declaration.
5365
5366 2003-03-21  Paul Brook  <paul@nowt.org>
5367
5368         * trans-decl.c (g95_build_function_decl): Mark string parameters.
5369
5370 2003-03-20  Paul Brook  <paul@nowt.org>
5371
5372         * trans-decl.c (g95_build_function_decl): Put character length
5373         parameters at the end of the function declaration.
5374         * trans-expr.c (g95_conv_function_call): Ditto.
5375         * trans-types.c (g95_get_function_type): Ditto.
5376
5377 2003-03-20  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5378
5379         * resolve.c (resolve_formal_arglist): Don't impose intent for
5380         procedure arguments of pure functions.
5381         (resolve_select): Remove redundant assignment.
5382
5383 2003-03-19  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5384
5385         * arith.c (validate_logical), g95.h, options.c (g95_init_options):
5386         Remove option l1.
5387         * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
5388         * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
5389         const.
5390         * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
5391         Order list.
5392         * symbol.c (g95_add_type): Fix typo in comment.
5393
5394
5395 2003-03-16  Paul Brook  <paul@nowt.org>
5396
5397         * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
5398         * expr.c (g95_build_call): Remove.
5399         * f95-lang.c (puchdecl_top_level): New function.
5400         * g95.h (g95_code): Store resolved symbol, not just the name.
5401         * intrinsic.c (g95_intrinsic_namespace): New global namespace.
5402         (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
5403         (g95_get_intrinsic_sub_symbol): New function.
5404         * iresolve.c (g95_resolve_cpu_time): Use it.
5405         (g95_resolve_random_number): Ditto.
5406         * resolve.c: Set code->resolved_sym instead of code->sub_name.
5407         * trans-decl.c (g95_get_extern_function_decl): Give external decls
5408         the correct DECL_CONTEXT.  Add global symbold to the global scope.
5409         * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
5410         fixed.
5411
5412 2003-03-16  Paul Brook  <paul@nowt.org>
5413
5414         * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
5415         * options.c (g95_parse_arg): Ditto.
5416         * module.c (mio_symbol_attribute): Handle the always_explicit bit.
5417         * resolve.c (resolve_formal_arglist): The always_explicit sould be set
5418         for the procedure, not the parameter.
5419         * trans-array.c (g95_trans_g77_array): New function.
5420         (g95_trans_assumed_size): Use it.
5421         (g95_trans_dummy_array_bias): Ditto.
5422         (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
5423         (g95_conv_expr_descriptor): ... to here.  Update callers.
5424         * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
5425         (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
5426         * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
5427         * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
5428         * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
5429         (g95_sym_type): Ditto.
5430
5431 2003-03-15  Paul Brook  <paul@nowt.org>
5432
5433         * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
5434         first chain.
5435         * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
5436
5437 2003-03-14  Paul Brook  <paul@nowt.org>
5438
5439         * trans-array.c (g95_array_is_packed): Remove.
5440         (g95_conv_array_base): Correctly handle all descriptorless cases.
5441         (g95_conv_array_stride): Use descriptorless strides.
5442         (g95_trans_dummy_array_bias): Don't always repack the array.
5443         (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
5444         packed.
5445         * trans-types.c (g95_get_nodesc_array_type): Differentiate between
5446         dummy and non-dummy arrays...
5447         (g95_sym_type, g95_get_derived_type): ... like these.
5448         (g95_get_array_type_bounds): Allow discontiguous arrays.
5449
5450 2003-03-12  Paul Brook  <paul@nowt.org>
5451
5452         * array.c (g95_resolve_array_spec): Fix comment.
5453         * g95.h (symbol_attributes): New flag always_explicit.
5454         * resolve.c (resolve_formal_arglist): Set it always_explicit.
5455         * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
5456         * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
5457         (g95_trans_array_bounds): Allow assumed shape arrays.
5458         (g95_trans_repack_array): Remove.
5459         (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
5460         * trans-decl.c (g95_build_qualified_array): Only ignore absent
5461         bounds for assumed size arrays.
5462         (g95_build_dummy_array_decl): Use descriptorless arrays.
5463         * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
5464         (g95_trans_pointer_assign): Fix typo.
5465         * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
5466         code.
5467         (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
5468         * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
5469         Also modify callers.
5470         * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
5471
5472 2003-03-08  Paul Brook  <paul@nowt.org>
5473
5474         * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
5475         (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
5476         * resolve.c (compare_spec_to_ref): Allow full array sections.
5477
5478 2003-03-08  Paul Brook  <paul@nowt.org>
5479
5480         * expr.c (g95_simplify_expr): Also simplify array index and
5481         substring expressions.
5482         * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
5483         * trans-array.c (g95_trans_array_bounds): New function.
5484         (g95_trans_auto_array_allocation): Use it.
5485         (g95_trans_assumed_size): Rewrite.
5486         * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5487         (gfor_fndecl_repack): Remove.
5488         (g95_build_qualified_array): Handle absent upper bounds.
5489         (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
5490         (g95_get_symbol_decl): Update.
5491         (g95_build_intrinsic_function_decls): Initialize new decls.
5492         * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5493         (gfor_fndecl_repack): Remove.
5494         * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
5495         * trans-types.c: (g95_build_array_type): Merge duplicated code..
5496         (g95_get_nodesc_array_type): Handle absent bounds.
5497         * trans-types.h (g95_get_nodesc_array_type): Declare.
5498
5499 2003-03-04  Paul Brook  <paul@nowt.org>
5500
5501         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
5502         builtin-types.def.
5503
5504 2003-03-02  Paul Brook  <paul@nowt.org>
5505
5506         * options.c (g95_init_options): Drfault to 1.
5507         (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
5508         * trans-array.c (g95_conv_array_data, g95_conv_array_base,
5509         g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
5510         Handle non-constant size automatic arrays.
5511         (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
5512         generic bound functions.
5513         (g95_trans_auto_array_allocation): Don't create a descriptor.
5514         (g95_trans_assumed_size): New function (broken).
5515         (g95_trans_dummy_array_bias): Remove unused var.
5516         * trans-array.h (g95_trans_assumed_size): Declare.
5517         * trans-decl.c (create_index_var): New fuction.
5518         (g95_build_qualified_array): New function.
5519         (g95_get_symbol_decl): Use it.
5520         (g95_trans_deferred_vars): Handle assumed shape seperately.
5521         * trans-types.c (get_element_type): Handle heap allocated arrays.
5522         (g95_is_nodesc_array): Include non-const size arrays.
5523         (g95_get_nodesc_array_type): Ditto.
5524
5525 2003-02-23  Paul Brook  <paul@nowt.org>
5526
5527         * trans-array.c (g95_array_init_size): Should use stride, not size of
5528         last dimension.
5529
5530 2003-02-18  Paul Brook  <paul@nowt.org>
5531
5532         * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
5533         after intrinsic function check.
5534
5535 2003-02-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5536
5537         * io.c (match_io): Fix missing return value and remove useless
5538         assignment.
5539         * match.c (g95_match): Remove useless assignment.
5540         * module.c (parse_string):  Remove useless post increment.
5541         * simplify.c (g95_simplify_verify): Remove useless assignment.
5542
5543 2003-02-15  Paul Brook  <paul@nowt.org>
5544
5545         * expr.c (restricted_intrinsic): Handle bad values gracefully.
5546         * g95.h (symbol_attribute): Add referenced member.
5547         (g95_symbol): Add dummy_order member.
5548         (g95_set_sym_referenced): Declare.
5549         * match.c (g95_match_assignment, g95_match_call): Use it
5550         * primary.c (match_actual_arg, g95_match_rvalue,
5551         g95_match_variable): Ditto.
5552         * symbol.c (next_dummy_order): New variable.
5553         (g95_set_sym_referenced): New function.
5554         (check_done): New function.
5555         (g95_add_*): Use it.
5556         * trans-decl.c: Make formatting conform to GCC standards.
5557         (g95_defer_symbol_init): Add dummy variables in the right order.
5558         (g95_get_symbol_decl): Only accept referenced variables.
5559         (g95_create_module_variable): Module variables are always required.
5560         (generatr_local_decls): New function.
5561         (generate_local_vars): New function.
5562         (g95_generate_function_code): Use it.
5563
5564 2003-02-13  Paul Brook  <paul@nowt.org>
5565
5566         * trans-decl.c (g95_conv_struct_cons): Remove.
5567         (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
5568         * trans-expr.c (g95_conv_structure): New function.
5569         (g95_conv_expr): Use it.
5570
5571 2003-02-09  Paul Brook  <paul@nowt.org>
5572
5573         * trans-array.c (g95_array_init_size): Don't evaluate the linit
5574         expressions multiple times.
5575         (g95_trans_auto_arry_allocation): Use pointer not tmp.
5576
5577 2003-02-08  Paul Brook  <paul@nowt.org>
5578
5579         * module.c (mio_symtree_ref): Declare as static.
5580         (mio_expr): Remove dead code.
5581         (read_module): Set the symtree link for fixups.
5582         * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
5583         (build_round_expr): ... to this.
5584         (g95_conv_intrinsic_aint): New function.
5585         (g95_conv_intrinsic_function): Use it.
5586
5587 2003-02-08  Paul Brook  <paul@nowt.org>
5588
5589         * trans-array.c (g95_trans_array_constructor_value): Use the acutal
5590         offset after modificaton, not the increment expression.
5591         * dependency.c: Kill excess whitespace.
5592
5593 2003-02-07  Sanjiv Gupta  <sanjivg@noida.hcltech.com>
5594
5595         * dependency.h: Remove some function declarations.
5596         * dependency.c (get_no_of_elements): Change this function not to
5597         return int.
5598         * other: Add comments for all modified functions.
5599
5600 2003-02-06  Paul Brook  <paul@nowt.org>
5601
5602         * g95spec.c (lang_specific_functions): Fix initializer warning.
5603         * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
5604         for structure type names.
5605         * trans-decl.c (g95_cons_structure_cons): New function.
5606         (g95_get_symbol_decl): Use it.
5607         * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
5608         referencing code.
5609
5610 2003-02-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5611
5612         * resolve.c (compare_cases): Add const to casts.
5613
5614 2003-01-30  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5615
5616         * g95.h (g95_check_f): Change a1 to f1m.
5617         * intrinsic.c (add_sym_1m, check_specific,
5618         g95_intrinsic_func_interface): Use it.
5619
5620         * module.c (init_pi_tree): Remove useless cast.
5621         (fp2): Fix argument type.
5622
5623         * parse.c (parse_select_block): Add comment.
5624
5625 2003-02-05  Toon Moene  <toon@moene.indiv.nluug.nl>
5626
5627         * lang-options.h: Fix warning involving C90 concatenated
5628         strings.
5629
5630 2003-02-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5631             Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5632
5633         * io.c (format_asterisk): Complete initializer to kill warning.
5634         * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
5635         DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
5636         (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
5637         new defines to complete initializers.  Kills all warnings.
5638
5639         * Make-lang.in: Comment cleanup.
5640
5641 2003-02-05  Paul Brook  <paul@nowt.org>
5642
5643         * array.c (g95_free_constructor): Handle NULL expressions.
5644         * resolve.c (resolve_structure_cons): Ditto.
5645         * decl.c (g95_match_null): New Function.
5646         (variable_decl): Use it.
5647         * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
5648         * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
5649         * trans-types.c (g95_set_decl_attributes): Remove empty function.
5650
5651 2003-02-05  Paul Brook  <paul@nowt.org>
5652
5653         * trans.h (build1_v): New macro.
5654         (build_v): Remove pointless and incorrect prototype.
5655         * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
5656         * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
5657
5658 2003-02-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5659
5660         * Make-lang.in (F95_OBJS): Remove one more dead file.
5661
5662 2003-02-01  Paul Brook  <paul@nowt.org>
5663
5664         * lang-specs.h: Don't pass -ffixed-form to the linker.
5665         * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
5666
5667 2003-02-01  Paul Brook  <paul@nowt.org>
5668
5669         * Make-lang.in (F95_OBJS): Remove dead files.
5670         * trans-array.c (g95_array_init_size): Do the right thing when
5671         ubound=NULL.
5672         * trans-decl.c (g95_generate_function_code): Initialize deffered
5673         symbol list before translating contained subroutines.
5674         * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
5675         scalar invariant values here...
5676         (g95_conv_variable, g95_conv_function_call): ... instead of here ...
5677         * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
5678
5679 2003-01-29  Paul Brook  <paul@nowt.org>
5680
5681         * trans-array.c (g95_add_loop_code): Put pre code in the right block.
5682         (g95_walk_elemental_function_args): Reverse chains before adding.
5683         (g95_reverse_ss): Move about a bit.
5684         * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
5685         function arguments.
5686
5687 2003-01-28  Paul Brook  <paul@nowt.org>
5688
5689         * intrinsic.c (resolve_intrinsic): Use correct union member.
5690         * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
5691         parameters.
5692         * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
5693         use associated variables.
5694         * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
5695         * trans-expr.c (g95_conv_expr_present): ... to here.
5696         * trans.h: Declare it.
5697         * trans-types.c (g95_sym_type): Assume subroutine if not specified.
5698
5699 2003-01-28  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5700
5701         * array.c (expand_iterator): Suppress useless assignment.
5702         * decl.c (match_char_spec): Ditto.
5703         * io.c (match_io_iterator): Ditto.
5704         * primary.c (match_real_constant): Ditto.
5705         * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
5706         Ditto.  Also, use g95_intrinsic_op not int for intrinsic operators.
5707         * matchexp.c (match_add_operand, match_level_5): Likewise.
5708         * module.c (parse_atom, find_enum): Likewise.
5709         * resolve.c: move #include <string.h>
5710         (resolve_select): Fix serious typo.
5711
5712 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.n>
5713
5714         * Make-lang.in: Don't build with broken tree-ssa-pre.
5715
5716 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5717
5718         * resolve.c (resolve_index): Add a TODO.
5719         * symbol.c: Remove useless "#include <ctype.h>".
5720
5721 2003-01-27  Paul Brook  <paul@nowt.org>
5722
5723         * check.c (check_rest): Allow different type kinds as an extension.
5724         * g95.h (g95_resolve_f): Add f1m.
5725         * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
5726         * intrinsic.h: Chenge prototypes for MIN and MAX.
5727         * iresolve.c (g95_resolve_minmax): New function.
5728         (g95_resolve_min, g95_resolve_max): Use it.
5729         * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
5730         arguments once.
5731         (g95_conv_intrinsic_present): Fix logic.
5732
5733 2003-01-27  Steven Bossche  <s.bosscher@student.tudelft.nl>
5734
5735         * g95.h (g95_case): Don't be a tree, be a double linked list.
5736         * match.c (match_case_selector): Remove redundant semantics check.
5737         Clean up a few goto's to make it a tiny little bit faster.
5738         * resolve.c (case_tree): Die.
5739         (compare_cases): Accept and compare unbounded cases too.
5740         (check_case_overlap): Don't build a tree.  Instead, merge-sort the
5741         whole list of g95_cases passed from resolve_select.
5742         (sane_logical_select): Die.
5743         (check_case_expr): Return FAILURE if a CASE label is of the wrong
5744         type kind.
5745         (resolve_select): Fixup case expression for computed GOTOs, put it
5746         in expr, not expr2, for easier handing in the parse tree dumper and
5747         the code generator.  Rewrite the rest of the function: Kill
5748         unreachable case labels and unreachable case blocks.
5749         * dump-parse-tree.c (g95_show_code_node): Always dump expr for
5750         an EXEC_SELECT, not case2 anymore.
5751         * trans-const.c (g95_conv_constant_to_tree): New function.
5752         (g95_conv_constant): Use it.
5753         * trans-const.h: Declare prototype for the new function.
5754         * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
5755         g95_trans_character_select): New static functions.
5756         (g95_trans_select): Rewrite.
5757
5758 2003-01-26  Paul Brook  <paul@nowt.org>
5759
5760         * intrinsic.c (add_fnctions): Properly add dreal.
5761         * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
5762         (g95_conv_intrinsic_function): Use it.
5763         * trans-io.c (build_dt): Abort on internal files (unimplemented).
5764
5765 2003-01-26  Paul Brook  <paul@nowt.org>
5766
5767         Widespread changes to the handling of symbols in expressions.  These
5768         are now linked via g95_symtree nodes.
5769         * parse.c (g95_fixup_sibling symbols): New function.
5770         (parse_contained): Use it.
5771         * g95.h (symbol_attribute): Add contained.  Indicates a symbol is a
5772         contained procedure that has bee correctly fixed up.
5773         (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
5774
5775 2003-01-24  Paul Brook  <paul@nowt.org>
5776
5777         * trans-array.c (g95_walk_expr): Function result attributes are in
5778         sym->result.
5779         * trans-expr.c (g95_conv_function_call,
5780         g95_trans_arrayfunc_assign): Ditto.
5781         * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
5782
5783 2003-01-23  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5784
5785         * expr.c (check_restricted): Fix error message.
5786         * symbol.c (free_st_labels): Plug memleak.
5787
5788 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5789
5790         * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
5791         reduce_binary_aa, reduce_binary, eval_intrinsic,
5792         eval_intrinsic_f2): Use typesafe prototypes for eval functions.
5793         * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
5794         for typesafe intrinsics helper functions.
5795         (g95_intrinsic_sym): Use them.
5796         * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
5797         add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
5798         add_sym_5, add_conv, resolve_intrinsic, do_simplify,
5799         check_specific, g95_intrinsic_func_interface,
5800         g95_intrinsic_sub_interface): Adjust all calls to intrinsics
5801         helper functions.
5802         * trans-decl.c (g95_get_extern_function_decl): Likewise.
5803         * Make-lang.in: Don't disable warnings for strict prototypes
5804         any longer, everything is typesafe now.
5805
5806 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5807
5808         * bbt.c (duplicate_node): Make static.
5809         * module.c (module_name): Make static.
5810         * scanner.c (include_dirs): Make static.
5811
5812 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5813
5814         Hard coded _gfor_'s should not show up anymore.
5815         * g95.h (PREFIX): New macro.
5816         * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
5817         hard-coded "_gfor".
5818         (g95_resolve_random_number): Likewise.
5819         * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
5820         * trans-io.c: Remove 'prefix' macro.  Replace all uses with
5821         the new PREFIX macro from g95.h.
5822
5823 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5824
5825         The troubles of forking... Andy implemented this just now too.
5826         Let's stick to that and keep the trees close.
5827         * g95.h (g95_st_label): 'format' member is now a g95_expr.
5828         * io.c: Revert previous changes.
5829         (g95_match_format): Match the format string as a character
5830         literal expression.
5831         * match.h (g95_statement_label): Declare external.
5832         * parse.c: Revert previous changes.
5833         * symbol.c (g95_free_st_label): Free a g95_expr instead
5834         if a 'char *'.
5835         * trans-io.c: Revert previous changes.
5836         (build_dt): Use set_string to set the format string.
5837
5838 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5839
5840         * io.c (format_string): Make non-static.
5841         (g95_match_format): Remember the format string.
5842         (terminate_io): Add I/O termination for empty I/O lists.
5843         * match.h: Declare external format_string.
5844         * parse.c (check_statement_label): Attack the format string
5845         to a format label for FORMAT statements.
5846         * trans-io.c (g95_add_field): Define prefix macro.  Replace
5847         all uses of PREFIX define with a use of this macro.
5848         (build_dt): Implement formatted I/O for format labels.
5849
5850 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5851
5852         * lang-options.h: Kill "-std=F".
5853         * options.c: Remove unimplemented "-std=F".  Modify
5854         web address.
5855         * misc.c (g95_terminal_width): New function.
5856         * error.c (g95_error_init_1): Use g95_terminal_width.
5857         * g95.h: Add prototype for g95_terminal_width, remove
5858         fmode flag.
5859
5860 2003-01-19  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5861
5862         * Make-lang.in: Fix typo.
5863
5864 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5865
5866         * g95.h (struct g95_case): Remove unused cruft, new member
5867         'where' to keep track of the locus of the default case.
5868         * match.c (g95_match_case): Add locus to the current case.
5869         (match_case_selector): Likewise.
5870         * parse.c (parse_select_block): Move semantics check for
5871         multiple DEFAULT cases out of here to...
5872         * resolve.c (check_case_overlap): ...here.  Return sooner
5873         when possible.
5874         (check_case_expr): Take two g95_cases now, use to sure the
5875         expression kinds are the same.
5876         (resolve_select): Cleanup.
5877
5878 2003-01-18  Paul Brook  <paul@nowt.org>
5879
5880         * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
5881         * trans-decl.c (g95_set_symbol_decl): Handle non-array result
5882         variables.
5883         (g95_get_extern_function_decl): Put decls in the correct context.
5884
5885 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5886
5887         * trans-io.c: Port changes from Andy to set ERR flag.
5888
5889 2003-01-17  Paul Brook  <paul@nowt.org>
5890
5891         * trans-array.c: Add various comments.
5892         (g95_ss_terminator): Declare as const.
5893         (g95_walk_expr): Remove first parameter and update all callers.
5894         (g95_walk_op_expr): Initialize scalar SS properly.
5895         * trans-array.h (g95_walk_expr): Update prototype.
5896         * trans-expr.c: Update for new g95_walk_expr.
5897         * trans-intrinsic.c: Ditto.
5898         * trans-io.c: Ditto.
5899         * trans.h: Various comments for SS chains.
5900
5901 2003-01-17  Paul Brook  <paul@nowt.org>
5902
5903         * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
5904         and RRSPACING.
5905         * intrinsic.c (add_functions): Use them.
5906         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
5907         * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
5908
5909 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5910
5911         Fallout of a small merge conflict:
5912         * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
5913
5914 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5915
5916         * initrinsic.c: New add_sym_* functions for strong typing.
5917         (add_conv): Make prototype strict.
5918         * dump-parse-tree.c, dependency.c: Include config.h
5919         * resolve.c, trans-io.c: Fix typos.
5920
5921 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5922
5923         * dump-parse-tree.c (g95_show_code_node): Show the
5924         condition for a computed GOTO that was transformed
5925         to a SELECT CASE construct.
5926         * resolve.c (check_case_overlap): Revert previous switch
5927         to treaps, it was too slow and didn't catch all trouble.
5928         (resolve_symbol): Be more flexible about module procedures.
5929         * symbol.c (check_conflict): Point to relevant section in
5930         the standard for dubious conflict.  Allow procedure
5931         dummy arguments to be optional again.
5932         * trans-io (add_field): Rename to g95_add_field.  Change
5933         all callers.
5934         * trans-stmt (trans_select): Handle unbounded cases for
5935         integer SELECT CASE constructs.  Fix/add more comment.
5936
5937 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5938
5939         * g95.h: Uses GCC's function attribute macros.
5940         * error.c, module.c, parse.c, g95.h: More function attributes.
5941
5942 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5943         Forgot a file...
5944         * trans-decl.c (get_label_decl): Use TREE_LINENO instead
5945         of DECL_SOURCE_LINE, and TREE_FILENAME instead of
5946         DECL_SOURCE_FILE.
5947
5948 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5949
5950         * f95-lang.c (pushdecl): Use TREE_LINENO instead of
5951         DECL_SOURCE_LINE.
5952         * trans.c (g95_trans_code): Use annotate_all_with_file_line
5953         instead of nowdead wrap_all_with_wfl.
5954
5955 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5956
5957         * parse.c (g95_parse_file): In verbose mode, dump the parse tree
5958         before generating code, so we can still see it even if the code
5959         generation phase dies.
5960
5961 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5962
5963         * decl.c (build_sym): Split out initialization expression parts...
5964         (add_init_expr_to_sym): ...to here.
5965         (variable_decl): Add the symbol following an attribute list to the
5966         symbol tree before parsing the optional initialization expression
5967         if the symbol is not of a derived type.
5968         * primary.c (g95_match_rvalue): Don't assume a symbol always has
5969         a value if it is a PARAMETER.
5970
5971 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5972
5973         * misc.c: Don't #include <mcheck.h>
5974         * module.c: Ditto.  Kill uses of mtrace, muntrace.  If there
5975         ever was a glibc bug, then either this was never reported to
5976         glibc people, or it has been fixed for so long that there's
5977         no information you can find about it, anywhere.
5978
5979 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5980
5981         Fix warnings:
5982         * module.c (attr_bits, bt_types, array_spec_types):
5983         Switch 'const' and 'static'.
5984         * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
5985
5986         GNU'ify source code:
5987         * trans-io.c: Numerous fixes, one fixed warning and a few
5988         TODO markers so that we don't forget about them.
5989
5990 2003-01-13  Paul Brook  <paul@nowt.org>
5991
5992         * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
5993         * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
5994         Add G95_ISYM_SCALE.
5995         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
5996         * match.c (g95_match_stop): Fix dumb == -> != error.
5997
5998 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5999
6000         * dump-parse-tree.c (show_indent): Add line breaks.  This
6001         whole dumping process needs cleanups.
6002         * f95-lang.c (g95_mark_addressable): Fix prototype to match
6003         the langhook.  Fix 'return's accordingly.
6004         * g95-support.h: Adjust prototype.
6005         * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
6006         * lang-options.h: Add '-fsyntax-only'.
6007         * options.c (g95_init_options): Init 'no_backend'.
6008         (g95_parse_arg): Deal with '-fsyntax-only'.
6009         * parse.c (g95_parse_file): Do not generate code if 'no_backend'
6010         is set.
6011
6012 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6013         Patch from Arnaud
6014         * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
6015         arguments.  Also make sure that if a symbol is marked INTRINSIC,
6016         an intrinsic with the symbol's name actually exists.
6017         (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
6018         Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
6019         ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
6020
6021 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6022
6023         * resolve.c (resolve_contained_functions): Fix condition, don't
6024         throw internal_error if a child namespace has no name.  Apparently
6025         this can be the case?
6026
6027 2003-01-11  Paul Brook  <paul@nowt.org>
6028
6029         Port changes from Andy's tree:
6030         * g95.h (g95_code): Add stop_code.
6031         * match.c (g95_match_stop): Detter syntax checking.
6032         * resolve.c (resolve_generic_f0): Return match type.
6033         (resolve_generic_f): Remove dead/duplicated code.
6034         (resolve_specific_f): Ditto.
6035         * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
6036         * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
6037         * trans-stmt.c (g95_trans_stop): Handle new STOP format.
6038
6039 2003-01-11  Paul Brook  <paul@nowt.org>
6040
6041         * trans-array.c: Various documentation/comment changes.
6042         * trans-stmt.c: Ditto.
6043
6044
6045 2003-01-10  Paul Brook  <paul@nowt.org>
6046
6047         * options.c/h: Add -fdump-parse-tree as alias of -v.
6048
6049 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6050
6051         * dump-parse-tree.c (g95_show_namespace): Fixed another
6052         typo.  Sorry, it's Friday...
6053
6054 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6055
6056         Spotted by Tobi:
6057         * trans-array.c, trans-array.h, trans.c, trans-const.c,
6058         trans-const.h, trans-decl.c, trans-expr.c, trans.h
6059         trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
6060         trans-types.c: Fix bogus copyright years, add 2003.
6061         * trans-types.h: Give copyright header.
6062
6063 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6064
6065         * dump-parse-tree.c (g95_show_namespace): Fixed typo.
6066         * expr.c, options.c, scanner.c: Add some more 'const' markers.
6067         * intrinsic.c: Some constant strings moved to read-only memory.
6068         * io.c (format_asterisk): Move to...
6069         * g95.h: ...here.
6070
6071 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6072
6073         * dump-parse-tree.c (g95_show_namespace): Dump implicit
6074         types for ranges instead of per-letter.  Indent the
6075         'CONTAINS' just like everything else.
6076         * resolve.c (resolve_contained_functions): Clarify comment.
6077         Explain non-obvious conditional expression.  Improve
6078         diagnostics if tyoe cannot be resolved.
6079         Port semi-fix from Andy's tree:
6080         (was_declared): Move up before first use.
6081         (generic_sym, specific_sym): New functions.  Code moved
6082         out if procedure_kind.
6083         (procedure_kind): Simplify using new functions.
6084         (resolve_generic_f): Make sure the functions we find in
6085         a parent namespace is generic.
6086         (resolve_specific_f): Ditto for specific functions.
6087
6088 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6089
6090         * trans-stmt.c, trans.c: Fix some code style issues. Add
6091         some more comment (but still not enough!).
6092
6093 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6094
6095         * symbol.c (flavors, procedures, intents, acces_types,
6096         access_types, ifsrc_types): Make const.
6097         * misc.c (g95_string2code): Make 'm' param 'const'.
6098         * module.c (find_enum, write_atom, mio_name): Make
6099         'm' param 'const'.
6100         (attr_bits, bt_types, array_spec_types, array_ref_types,
6101         ref_types, expr_types): Make const.
6102         * g95.h: Adjust external decls.
6103
6104 2003-01-09  Paul Brook  <paul@nowt.org>
6105
6106         * Testsuite: Add a load of new cases.
6107
6108 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6109
6110         * Make-file.in: Add dependency on back end header files;
6111         a parallel build should work now.
6112         * f95-lang-c (lang_identifier): Remove bogus comment.
6113         (g95_be_parse_file): Fix prototype.
6114         (g95_init): Make static.
6115         (g95_finish): Make static.
6116         * error.c (g95_syntax_error): Kill. Make define in...
6117         * g95.h (g95_syntax_error): Define.
6118         (g95.options): Make 'source' member 'const'.
6119         * interface.c (g95_match_interface): Explain
6120         hard-to-read condition.
6121         (g95_match_end_interface): Ditto.
6122         * trans_const.c (g95_build_string_const): Make 's' parameter
6123         'const'.
6124         * trans_const.h: Adjust protoype accordingly.
6125         * trans-decl.c: Include tree-dump.h
6126         (g95_generate_function_code): Build fixes for recent changes
6127         in the tree-ssa branch.
6128
6129 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6130
6131         * format.c: Kill, move code from here...
6132         * io.c: ...to here.
6133         * Make-lang.in: Adjust.
6134         * MANIFEST: Ditto.
6135         * match.h: Ditto.
6136         * BUGS: Mention where to submit bugs.  Move old content...
6137         * TODO: ...to here.  New file.
6138
6139 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6140         Fix most warnings, and suppress the ones we can't fix for now.
6141         * Make-lang.in: Suppress warnings about bad proto's in g95.h,
6142         these warnings just clutter the screen and there's not much
6143         we can do about them for now anyway.
6144         * check.c, iresolve.c: Mark unused function parameters.
6145         * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
6146         they should be resolved before they get here.
6147         * error.c: Remove unused FILE *status_out.
6148         * f95-lang.c (g95_init): Remove bogus cast.
6149         * Many files: Make things 'const' where required.
6150         * g95.h: Fix prototypes for all modified functions above.
6151         (g95_options): Remove 'object' member.
6152
6153 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6154
6155         * Make-file.in: Cleanup bogus targets.  Add more comment.
6156         * lang-options.h: New option '-w'.
6157         * g95.h: add no_options field to struct g95_options.
6158         * options.c (g95_init_options): Default no_warnings to off.
6159         (g95_parse_arg): Recognise the '-w' switch and its alias,
6160         '-fno-warnings'.
6161         * error.c (g95_warning, g95_warning_now): Don't emit warning if
6162         no_warning option is set.
6163         * iresolve.c (g95_resolve_shape): Fix warning.
6164
6165 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6166
6167         * primary.c (g95_next_string_char): Rename next_string_char, and
6168         make static.  Adjust callers accordingly.
6169         * resolve.c (resolve_generic_f0): Return try, not match.  Adjust
6170         callers accordingly.
6171         * g95.h: Split out all g95_match* functions to...
6172         * match.h: ...here. New file.
6173         * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
6174         matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
6175
6176 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6177
6178         * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
6179         g95_merge_new_implicit): New functions.
6180         (g95_match_implicit_none, g95_match_implicit): Move from here...
6181         * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
6182         Modify to use the new functions in symbol.c.
6183         * g95.h: Add and move prototypes.
6184
6185 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6186
6187         * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
6188         node compare function.
6189         (g95_insert_bbt): Likewise.
6190         (g95_insert_bbt_with_overlap): Likewise.
6191         (g95_delete_bbt): Likewise.
6192         (delete_treap): Likewise. Also fix a potential bug when calling it.
6193         * module.c (compare_pointers): Change proto to compare_fn.
6194         (compare_integers): Likewise.
6195         (compare_true_names): Likewise.
6196         (find_true_name): Adjust call to compare_true_names to match proto.
6197         (require_atom, write_atom, mio_name): Fix 'const' warnings.
6198         (init_pi_tree): Make compare a compare_fn instead of (int *).
6199         * resolve.c (compare_cases): Change proto to compare_fn.
6200         * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
6201         it static, and rename to compare_symtree.
6202         (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
6203         function.
6204         * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
6205         of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
6206
6207 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6208         * Make-lang.in: Fix spaces/tabs issues from previous patch.
6209         * patch.options: Blow away Paul's checkin mistake :-)
6210         * io.c (terminate_io): Fix memory leak (Arnaud).
6211
6212 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6213
6214         * Make-lang.in: Teach about building DVI, info manual.
6215         * g95.texi: New file.
6216
6217 2003-01-02  Paul Brook  <paul@nowt.org>
6218
6219         * trans-array.c (g95_reverse_ss): Make static and don't use.
6220         (g95_conv_ss_descriptor): Don't use g95_loopinfo
6221         (g95_conv_array_parameters): Modify for pointer assignments.
6222         (g95_walk_subexpr): New function.
6223         (g95_walk_expr*): Use it.
6224         * trans-array.h (g95_reverse_ss): Remove prototype.
6225         * trans-expr.c (g95_trans_pointer_assign): Implement.
6226         (Many): Set se.want_pointer before calling g95_conv_array_parameter.
6227         * trans-intrinsic.c: Sync with scalarizer changes.
6228         * trans-io.c: Ditto.
6229
6230 2002-12-29  Paul Brook  <paul@nowt.org>
6231
6232         * trans-array.c: Document calling convention for arrays.
6233
6234 2002-12-19  Paul Brook  <paul@nowt.org>
6235
6236         * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
6237         assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
6238         optional parameters for some intrinsics.
6239         (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
6240         * trans-expr.c (g95_conv_function_call): Pass NULL for absent
6241         optional parameters.
6242         * trans.h (g95_se): Add ignore_optional flag.
6243
6244 2002-12-15  Paul Brook  <paul@nowt.org>
6245
6246         * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
6247         * trans-decl.c (g95_generate_function_code): Use TDI_original.
6248
6249 2002-12-14  Paul Brook  <paul@nowt.org>
6250
6251         * trans-stmt.c (g95_trans_call): Use resolved symbol name.
6252
6253 2002-12-12  Paul Brook  <paul@nowt.org>
6254
6255         * trans-array.c (g95_trans_array_constructor_subarray): Fully
6256         initialize the scalarizer.
6257         (various): Update to new format of g95_expr->value.constructor.
6258
6259 2002-12-08  Paul Brook  <paul@nowt.org>
6260
6261         * trans-array.c (g95_put_offset_into_var): New function.
6262         (g95_trans_array_constructor_subarray): New function.
6263         (g95_trans_array_constructor_value): Use it.
6264         (g95_array_cons_size): Don't abort() on array components.
6265
6266 2002-12-08  Paul Brook  <paul@nowt.org>
6267
6268         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
6269         * support.c: Update #includes.
6270         (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
6271         * trans-array.c: Update #includes.
6272         * trans.c: Ditto.
6273         * trans-const.c: Ditto.
6274         * trans-io.c: Ditto.
6275         * trans-types.c: Ditto.
6276         (g95_init_types): Set size_type_node.
6277         * trans-decl.c: Update #includes.
6278         (gfor_fndecl_adjust{l,r}): Declare and initialize.
6279         * trans-stmt.c: Update #includes.
6280         (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
6281         (g95_trans_select): Fix check for unbounded ranges.
6282         * trans-expr.c: Update #includes.
6283         (g95_conv_string_tmp): New function.
6284         (g95_conv_concat_op): Use it.
6285         * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
6286         * Trans-intrisic.c: Update #includes.
6287         (g95_conv_intrinsic_strcmp): New function.
6288         (g95_conv_intrinsic_adjust): Ditto.
6289         (g95_conv_intrinsic_function: Use them.
6290
6291 2002-11-30  Paul Brook  <paul@nowt.org>
6292
6293         * trans-array.c (g95_walk_function_expr): Handle non-array return by
6294         reference.
6295         * trans-dec.c (g95_build_function_decl): Handle character return
6296         parammeters.
6297         (g95_get_fake_result_decl): Ditto.
6298         (g95_trans_deferred_vars): Ditto.
6299         * trans-expr.c (g95_conv_function_call): Ditto.
6300         (g95_trans_arrayfunc_assign) Limit to array valued functions.
6301         * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
6302         (g95_conv_intrinsic_function): Use it.
6303         * trans-types.c (g95_sym_type): Handle functions returning strings.
6304         (g95_return_by_reference): Ditto.
6305         (g95_get_function_type): Ditto.
6306
6307 2002-11-18  Paul Brook  <paul@nowt.org>
6308
6309         * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
6310         requires a temporary.
6311         (g95_trans_select): Handle computed gotos.
6312         * trans-types.c (g95_build_array_type): Warn about non-functional
6313         assumed shape arrays.
6314         * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
6315         blocks.
6316         * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
6317         (g95_conv_intrinsic_int): New function.
6318         (g95_conv_intrinsic_mod): New function.
6319         (g95_conv_intrinsic_ichar): New function.
6320         (g95_conv_intrinsic_function): Use them.
6321         (g95_conv_intrinsic_dim): Use g95_evaluate_now.
6322
6323 2002-11-17  Toon Moene  <toon@moene.indiv.nluug.nl>
6324
6325         * trans-types.c (g95_build_array_type): Assumed
6326         sized arrays can have rank > 1.
6327         * trans.c (g95_trans_code): Remove erroneous
6328         warning about CONTINUE.
6329         * trans-expr.c (g95_conv_variable): Remove
6330         erroneous assert.
6331
6332 2002-11-15  Paul Brook  <paul@nowt.org>
6333
6334         * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
6335
6336 2002-10-31  Paul Brook  <paul@nowt.org>
6337
6338         * f95-tree.c: Remove tree copying stuff that's now in gimple.c
6339         * trans-expr.c (g95_conv_component_ref): Handle character string
6340         components.
6341         (g95_conv_string_parameter): Ditto.
6342         * trans-types.c (g95_get_derived_type): Add length decl to caracter
6343         string components.
6344
6345 2002-10-10  Paul Brook  <paul@nowt.org>
6346
6347         * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
6348         * trans-expr.c (g95_conv_function_call): Remove unreliable return value
6349         check.
6350         * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
6351         (g95_conv_intrinsic_function): Handle size and shape intrinsics.
6352         (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
6353         * trans-types.c (pvoid_type_node): Declare and initialize.
6354         * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
6355         (g95_array_allocate): Fix when base==data.
6356         (g95_conv_array_parameter): Correctly handle reduced rank sections.
6357         * trans-io.c (g95_trans_write): Correctly handle string modifiers.
6358
6359 2002-10-09  Paul Brook  <paul@nowt.org>
6360
6361         * (g95_conv_expr_reference): Handle character strings correctly.
6362
6363 2002-10-07  Paul Brook  <paul@nowt.org>
6364
6365         (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
6366         langhook.
6367         * trans-array.c (g95_build_array_initializer): Remove.
6368         (g95_conv_array_initializer): New Function.
6369         (g95_trans_auto_arry_allocation): Cleanup.
6370         (g95_trans_init_character_array): Remove.
6371         * g95spec.c: Link in libgforbegin.
6372         * trans.c (g95_generate_code): Rename main function to MAIN__.
6373         (g95_create_var): New function.
6374         (g95_create_var_np): New function.
6375         (g95_evaluate_now): New function.
6376         (g95_start_block): New function.
6377         (g95_finish_block): New function.
6378         (g95_add_expr_to_block): New function.
6379         (g95_add_block_to_block): New function.
6380         * trans-expr.c (g95_conv_componen_ref): New function.
6381         * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
6382         (F95_OBJS): Add dependency.o.
6383         * f95-lang.c (g95_is_simple_stmt): Remove.
6384         * f95-tree.c (mark_not_simple): New function.
6385         (unshare_all_trees): New function.
6386         (create_tmp_var, create_tmp_alias_var): Remove.
6387         * support.c (declare_tmp_vars, tree_last_decl): Remove.
6388         * trans*: Convert to new IR using GENERIC trees.  Don't bother about
6389         SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
6390
6391 2002-10-01  Paul Brook  <paul@nowt.org>
6392
6393         * trans-array.c: Add support for descriptorless arrays.
6394         (g95_conv_array_data): New function.
6395         (g95_conv_array_base): New function.
6396         * trans-array.h: Declare these here.
6397         * trans-decl.c(g95_create_mopdule_variable): Perform variable
6398         initialization and creation here.
6399         (g95_create_module_vars): Instead of here.
6400         * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
6401         * trans-intrinsic.c: Ditto.
6402         * trans-types.c (g95_is_nodesc_array): New function.
6403         (g95_get_nodesc_array_type): New function.
6404         (g95_sym_type, g95_get_derived_type): Use them.
6405         * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
6406
6407 2002-09-28  Paul Brook  <paul@nowt.org>
6408
6409         * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
6410         * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
6411         parameters.
6412
6413 2002-09-24  Paul Brook  <paul@nowt.org>
6414
6415         * f95-lang.c (listify): Remove declaration.
6416         (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
6417         (listify)
6418         * f95-tree.c (get_name): New function.
6419         * trans.c (module_namespace): Remove.
6420         * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
6421         * trans-types.c: Ditto.
6422
6423 2002-09-19  Paul Brook  <paul@nowt.org>
6424
6425         * trans-array.c (g95_get_array_cons_size): New Function.
6426         (g95_con_ss_startstride): Handle Array constructors.
6427         (g95_conv_loop_setup): Ditto.
6428         (g95_conv_array_parameter): Ditto.
6429         * tras-decl.c (g95_finish_var_decl): Make initializes variables
6430         static.
6431
6432 2002-09-19  Paul Brook  <paul@nowt.org>
6433
6434         * trans.c (g95_simple_fold_tmp): Detect variables inside
6435         NON_LVALUE_EXPR.
6436         * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
6437
6438 2002-09-18  Steven Bosscher <s.bosscher@student.tudelft.nl>
6439
6440         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
6441
6442 2002-09-14  Paul Brook  <paul@nowt.org>
6443
6444         * trans.c (g95_create_module_variable): Move to trans-decl.c.
6445         * trans-const.c (g95_conv_string_init): New Function.
6446         * trans-const.h: Declare it.
6447         * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
6448         variables. Don't bail on intrinsic symbols.
6449         (get_extern_function_decl): Handle specific intrinsic functions.
6450         * trans-types.c (g95_sym_type): Dummy functions don't return
6451         reference types.
6452         * trans-array.c (g95_build_array_initializer): New Function.
6453         (g95_trans_auto_array_allocation): Build initializer for static decls.
6454         Don't use mpz_addmul, it's GMP4 only.
6455
6456 2002-09-12  Paul Brook  <paul@nowt.org>
6457
6458         * trans-decl.c (g95_generate_code): Fix thinko with return variable.
6459         (g95_get_extern_function_decl, g95_build_function_decl): Mangle
6460         assembler names for module procedures.
6461
6462 2002-09-11  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
6463
6464         * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
6465         dependency/
6466
6467 2002-09-10  Paul Brook  <paul@nowt.org>
6468
6469         * trans-array.c: Change format of G95_SS_TEMP strictures.
6470         (g95_check_fncall_dependancy): New function.
6471         (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
6472         offsets.
6473         * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
6474         result variables.
6475         (g95_build_function_decl): Don't assume result arrays are packed.
6476         (g95_trans-deferred-vars): Handle array result variables.
6477         (g95_generate_fuction_code): Clear saved_function_decls.
6478         * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
6479         reference.
6480         (g95_trans_arrayfunc_assign): New function.
6481         (g95_trans_assignment): Use it.
6482         * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
6483         (g95_se): Add direct_byref.
6484         * trans-types.c: Use sym->result rather than sym where appropriate.
6485         * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
6486         Update other functions to use this.
6487         (g95_is_intrinsic_libcall): New function.
6488         (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
6489         (g95_walk_intrinsic_function): Ditto.
6490
6491 2002-09-08  Paul Brook  <paul@nowt.org>
6492
6493         * trans-types.c: Change rank field to dtype field in array descriptor.
6494         * trans-array.c: Implement filling of dtype array descriptor field.
6495         * trans-intrinsic.c: Fix broken LEN intrinsic.
6496
6497 2002-09-07  Paul Brook  <paul@nowt.org>
6498
6499         * trans-intrinsic.c: Remove outdated todo intrinsic list.
6500         (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
6501         (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
6502
6503 2002-09-06  Paul Brook  <paul@nowt.org>
6504
6505         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
6506         (gt-f95-trans-types.h): Add dependancy information.
6507         * config-lang.in (gtfiles): Add trans-types.c
6508         * f95-lang.c (g95_be_parse_file): Pass error and warning counts
6509         back to top-level code.
6510         * trans-array.c, trans-types.c: Change format of array descriptor.
6511         (g95_conv_descriptor_dimension): New function.
6512         * trans-types.h (g95_conv_descriptor_rank): define.
6513         * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
6514         intrinsics.
6515
6516 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
6517
6518         * trans-array.c, trans-types.c: Add rank information to descriptor.
6519
6520 2002-09-06  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
6521
6522         * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
6523
6524 2002-09-04  Paul Brook  <paul@nowt.org>
6525
6526         * f95-lang.c (g95_create_decls): New function.
6527         (g95_init):  Move initialization of external decls to above, and call
6528         from g95_be_parse_file.
6529         * trans.c (g95_finish_stmt): Don't amputate the decl chain.
6530         * trans-types.c (g95_init_types): Always name integer and char types.
6531         (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
6532
6533 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
6534
6535         * Make-lang.in: Add options.c to F95_PARSER_OBJS
6536
6537 2002-09-02  Paul Brook  <paul@nowt.org>
6538
6539         * g95_generate_code: Clear the attr for __fortran_main.
6540         * trans-types.c (g95_finish_type): New function.
6541         * g95_init_io_state_type: Use g95_finish_type.
6542         * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
6543
6544 2002-09-01  Paul Brook  <paul@nowt.org>
6545
6546         * README.backend: Warn about the dangers of extra config.h files.
6547         Remove obsolete libgfor stuff.
6548         * config-lang.in: Add target-libgfor dependancy.
6549         * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
6550
6551 2002-09-01  Toon Moene  <toon@moene.indiv.nluug.nl>
6552
6553         * g95_conv_mpz_to_tree: Free storage pointed to by q,
6554         not by buff.
6555
6556 2002-08-30  Paul Brook  <paul@nowt.org>
6557
6558         * trans-intrinsic.c (g95_conv_intrinsic_function,
6559         g95_walk_intrinsic_function): Added ANY and ALL.
6560         (g95_conv_intrinsic_anyall): New function.
6561         * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in
6562         mangled name