OSDN Git Service

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