OSDN Git Service

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