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