OSDN Git Service

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