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