OSDN Git Service

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