OSDN Git Service

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