OSDN Git Service

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