OSDN Git Service

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