* builtins.def (BUILT_IN_STACK_ALLOC): Remove.
[official-gcc.git] / gcc / fortran / ChangeLog
blobb45197dd191bebe146b68020d6c6d970ae03ef28
1 2004-08-10  Richard Henderson  <rth@redhat.com>
3         * f95-lang.c (gfc_init_builtin_functions): Remove
4          __builtin_stack_alloc, add __builtin_alloca.
5         * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
6         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
8 2004-08-10  Paul Brook  <paul@codesourcery.com>
10         * trans-io.c (transfer_expr): Handle pointters.
12 2004-08-10  Paul Brook  <paul@codesourcery.com>
14         PR fortran/16919
15         * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
16         (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
17         (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
18         Handle GFC_SS_COMPONENT.
19         (gfc_conv_ss_startstride): Ditto.  Set ss->shape.
20         (gfc_conv_loop_setup): Tweak commends. Remove dead code.
21         Use ss->shape.
22         (gfc_conv_array_initializer): Call specific initializer routines.
23         * trans-expr.c (gfc_trans_structure_assign): New function.
24         (gfc_trans_subarray_assign): New function.
25         (gfc_trans_subcomponent_assign): New fucntion
26         (gfc_conv_structure): Use them.
27         * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
28         (gfc_ss): Add shape.
30 2004-08-08  Victor Leikehman  <lei@il.ibm.com>
32         * simplify.c (gfc_simplify_shape): Bugfix.
33         * expr.c (gfc_copy_shape_excluding): New function.
34         * gfortran.h (gfc_get_shape): Bugfix.
35         (gfc_copy_shape_excluding): Added declaration.
36         * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
37         gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
38         gfc_resolve_ubound, gfc_resolve_transpose): Added compile
39         time resolution of shape.
41 2004-08-06  Janne Blomqvist  <jblomqvi@cc.hut.fi>
43         * intrinsic.c (add_subroutines): Add getenv and
44         get_environment_variable. (add_sym_5s): New function.
45         * intrinsic.h (gfc_resolve_get_environment_variable): Add
46         prototype.
47         * iresolve.c (gfc_resolve_get_environment_variable): New
48         function.
50 2004-08-06  Feng Wang  <fengwang@nudt.edu.cn>
52         * f95-lang.c (gfc_init_builtin_functions): Fix the number of
53         __builtin_pow[f] arguments.
55 2004-08-06  Steven G. Kargl  <kargls@comcast.net>
57         * arith.c: Add #define for model numbers.  Remove global GMP variables.
58         (natural_logarithm,common_logarithm,exponential,sine,
59         cosine,arctangent,hypercos,hypersine ): Remove.
60         (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
61         (arctangent2,gfc_arith_init_1,gfc_arith_done_1
62         gfc_check_real_range, gfc_constant_result, gfc_range_check,
63         gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
64         gfc_arith_divide,complex_reciprocal,complex_pow_ui,
65         gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
66         gfc_convert_complex,gfc_int2real,gfc_int2complex,
67         gfc_real2int,gfc_real2real,gfc_real2complex,
68         gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
69         to MPFR, use new functions.
70         * arith.h: Remove extern global variables.
71         (natural_logarithm,common_logarithm,exponential, sine, cosine,
72         arctangent,hypercos,hypersine): Remove prototypes.
73         (arctangent2): Update prototype from GMP to MPFR.
74         (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
75         * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
76         * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
77         * gfortran.h (GFC_REAL_BITS): Remove.
78         (arith): Add ARITH_NAN.
79         Include mpfr.h.  Define GFC_RND_MODE.
80         Rename GCC_GFORTRAN_H GFC_GFC_H.
81         (gfc_expr): Convert GMP to MPFR.
82         * module.c: Add arith.h, correct type in comment.
83         (mio_gmp_real): Convert GMP to MPFR.
84         (mio_expr):  Use gfc_set_model_kind().
85         * primary.c:  Update copyright date with 2004.
86         (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
87         * simplify.c: Remove global GMP variables
88         (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
89         gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
90         gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
91         gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
92         gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
93         gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
94         gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
95         gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
96         gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
97         gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
98         gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
99         gfc_simplify_rrspacing,gfc_simplify_scale,
100         gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
101         gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
102         gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
103         gfc_simplify_init_1,gfc_simplify_done_1):  Convert GMP to MPFR.
104         Use new functions.
105         * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
106         gfc_conv_mpf_to_tree.  Convert it to use MPFR
107         (gfc_conv_constant_to_tree): Use it.
108         * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
109         * trans-intrinsic.c: Add arith.h, remove gmp.h
110         (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
112 2004-08-06  Victor Leikehman  <lei@il.ibm.com>
113         Paul Brook  <paul@codesourcery.com>
115         * trans-array.c (gfc_trans_allocate_array_storage,
116         gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
117         gfc_conv_loop_setup): For functions, if the shape of the result
118         is not known in compile-time, generate an empty array descriptor for
119         the result and let the callee to allocate the memory.
120         (gfc_trans_dummy_array_bias): Do nothing for pointers.
121         (gfc_conv_expr_descriptor): Use function return values directly.
122         * trans-expr.c (gfc_conv_function_call): Always add byref call
123         insn to pre chain.
124         (gfc_trans_pointer_assignment): Add comments.
125         (gfc_trans_arrayfunc_assign): Don't chain on expression.
127 2004-08-01  Roger Sayle  <roger@eyesopen.com>
129         * options.c (gfc_init_options): Don't warn about the use GNU
130         extensions by default.
131         (gfc_post_options): Warn about GNU extensions with -pedantic.
132         (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
134 2004-07-30  Richard Henderson  <rth@redhat.com>
136         * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
137         for TREE_CONSTANTs.
139 2004-07-25  Richard Henderson  <rth@redhat.com>
141         * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
142         and DECL_IGNORED_P on RESULT_DECL.
143         (gfc_generate_constructors): Likewise.
145 2004-07-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
147         PR fortran/16465
148         * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
149         options.
150         (ffixed-line-length-80, ffixed-line-length-132): Remove.
151         * options.c (gfc_handle_options): Deal with changed options.
152         * scanner.c (load_line): Change second arg to 'char **',
153         allocate if pointing to NULL. Keep track of buffer's length.
154         Adapt buffer size to overlong lines. Pad lines to full length
155         in fixed form.
156         (load_file): Adapt to new interface of load_line.
158 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
160         * trans.h (builtin_function): Declare.
162 2004-07-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
164         PR fortran/16404
165         (parts ported from g95)
166         * parse.h (gfc_state_data): New field do_variable.
167         (gfc_check_do_variable): Add prototype.
168         * parse.c (push_state): Initialize field 'do_variable'.
169         (gfc_check_do_variable): New function.
170         (parse_do_block): Remember do iterator variable.
171         (parse_file): Initialize field 'do_variable'.
172         * match.c (gfc_match_assignment, gfc_match_do,
173         gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
174         Add previously missing checks.
175         (gfc_match_return): Reformat error message.
176         * io.c (match_out_tag): New function.
177         (match_open_element, match_close_element,
178         match_file_element, match_dt_element): Call match_out_tag
179         instead of match_vtag where appropriate.
180         (match_io_iterator, match_io_element): Add missing check.
181         (match_io): Reformat error message.
182         (match_inquire_element): Call match_out_tag where appropriate.
184         * parse.c (gfc_check_do_variable): Fix error locus.
186 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
188         PR fortran/15129
189         * trans-decl.c (gfc_build_function_decl): Create a new chardecl
190         for every assumed length character dummy argument.
192         PR fortran/15140
193         * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
195         PR fortran/13792
196         * simplify.c (gfc_simplify_bound): Copy the bound expression.
198 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
200         PR fortran/15324
201         * trans-array.c gfc_trans_g77_array,
202         gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
203         for assumed length characters.
204         (gfc_conv_expr_descriptor): Set se->string_length if dealing
205         with a character expression.
206         (gfc_cvonv_array_parameter): Pass string length when passing
207         character array according to g77 conventions.
209 2004-07-12  Paul Brook  <paul@codesourcery.com>
211         * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
212         * trans-array.c (gfc_trans_auto_array_allocation): Remove
213         initialization code.
214         * trans-common.c (create_common): Use gfc_conv_initializer.
215         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
216         * trans-expr.c (gfc_conv_initializer): New function.
217         (gfc_conv_structure): Use it.
218         * trans.h (gfc_conv_initializer): Add prototype.
220 2004-07-11  Paul Brook  <paul@codesourcery.com>
222         PR fortran/15986
223         * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
224         variables.
225         (parse_contained): Mark contained symbols as referenced.
227 2004-07-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
229         PR fortran/16455
230         * module.c (gfc_dump_module, gfc_use_module): Print locus
231         when opening of module file fails.
233         PR fortran/16404
234         * io.c (match_io): Flag 'WRITE(...), ...' as extension.
236         PR fortran/16404
237         * match.c (gfc_match_program): A program name is obligatory.
238         (gfc_match_return): RETURN in main program is an extension.
239         (gfc_match_block_data): A space is required before a block data
240         name.
242         PR fortran/16433
243         * primary.c (match_boz_constant): Call gfc_notify_std only if
244         we actually have a non-standard boz-literal-constant.
246         PR fortran/15754
247         * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
248         warning if assigning NULL().
250 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
252         * f95-lang.c (set_block): Remove.
253         (gfc_clear_binding_stack): New.
254         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
255         (struct binding_level): Remove block_created_by_back_end.
256         (clear_binding_level): Likewise.
257         (poplevel): Don't handle block_created_by_back_end.
259 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
261         * trans-decl.c (gfc_create_module_variable): Nothing to do if
262         symbol is in common, because we ...
263         (gfc_generate_module_vars): Call gfc_trans_common.
265 2004-07-10  Paul Brook  <paul@codesourcery.com>
267         * trans-array.c (gfc_build_null_descriptor): New function.
268         (gfc_trans_static_array_pointer): Use it.
269         * trans-array.h (gfc_build_null_descriptor): Add prototype.
270         * trans-expr.c (gfc_conv_structure): Handle array pointers.
272 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
273         
274         PR fortran/16336
275         * decl.c (gfc_match_save): Use-associated common block
276         doesn't collide.
277         * gfortran.h (gfc_common_head): Add new field 'name'.
278         Fix typo in comment after #endif.
279         * match.c (gfc_get_common): Add new argument from_common,
280         mangle name if flag is set, fill in new field in structure
281         gfc_common_head.
282         (match_common): Set new arg in call to gfc_get_common,
283         use-associated common block doesn't collide.
284         * match.h (gfc_get_common): Adapt prototype.
285         * module.c (load_commons): Set new arg in call to
286         gfc_get_common.
287         * symbol.c (free_common_tree): New function.
288         (gfc_free_namespace): Call new function.
289         * trans-common.c (several functions): Remove argument
290         'name', use name from gfc_common_head instead.
292 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
294         * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
295         and RHS match. Return early if the RHS is NULL().
297         PR fortran/16336
298         * match.c (match_common): Fix error reporting for used common.
300         PR fortran/15969
301         * trans-expr.c (gfc_conv_structure): Handle initialization
302         of scalar pointer components.
304         * parse.c (decode_statement): Fix matching of BLOCK DATA.
306         * trans-decl.c (generate_local_decl): Remove workaround obsoleted
307         by fix for PR 15481.
308         
309 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
311         * trans-common.c: Fix whitespace issues, make variable names
312         more readable.
313         (create_common): Additionally, make loop logic more obvious.
315 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
316         Paul Brook  <paul@codesourcery.com>
318         PR fortran/13415
319         * trans-common.c (calculate_length): Remove ...
320         (get_segment_info): Merge into here.  Save field type.
321         (build_field): Use saved type.
322         (create_common, new_condition, new_segment, finish_equivalences):
323         Use new get_segment_info.
324         * trans-types.c: Update comment.
326 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
327         
328         PR fortran/14077
329         * moduele.c (mio_symbol): Don't I/O initial values unless
330         symbol is a parameter.
332 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
333         
334         PR fortran/13201
335         * resolve.c (resolve_symbol): Verify that the shape of a
336         parameter array is not only explicit, but also constant.
337         * array.c (gfc_is_compile_time_shape): New function.
338         * gfortran.h (gfc_is_compile_time_shape): Add prototype.
340 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
342         PR fortran/15481
343         PR fortran/13372
344         PR fortran/13575
345         PR fortran/15978
346         * module.c (write_symbol, write_symtree): Remove workaround.
347         * primary.c (match_actual_arglist): Enhance comment.
348         (gfc_match_rvalue): Handle function call with first argument
349         a keyword argument correctly.
350         * resolve.c (resolve_symbol): Change call to
351         gfc_set_default_type to issue error if no implicit type
352         can be found.
353         * trans-decl.c (gfc_create_module_variable): Remove workaround.
354         
355 2004-07-08  Paul Brook  <paul@codesourcery.com>
357         * intrinsic.c (add_sym_4s): New function.
358         (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
360 2004-07-04  Janne Blomqvist  <jblomqvi@cc.hut.fi>
361         Paul Brook  <paul@codesourcery.com>
363         PR fortran/15280
364         PR fortran/15665
365         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
366         GFC_ISYM_COMMAND_ARGUMENT_COUNT.
367         * intrinsic.c (add_functions):  Identify iargc.  Add
368         command_argument_count.
369         (add_subroutines): Resolve getarg.  Add get_command and
370         get_command_argument.
371         * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
372         gfc_resolve_get_command_argument): Add prototypes.
373         * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
374         gfc_resolve_get_command_argument): New functions.
375         * trans-decl.c (gfor_fndecl_iargc): New variable.
376         (gfc_build_intrinsic_function_decls): Set it.
377         * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
378         (gfc_conv_intrinsic_function): Use it.
379         * trans.h (gfor_fndecl_iargc): Declare.
381 2004-07-04  Matthias Klose  <doko@debian.org>
383         * Make-lang.in: Generate and install gfortran man page.
384         * invoke.texi: Remove extra '@c man end'.
386 2004-07-04  Richard Henderson  <rth@redhat.com>
388         * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
390 2004-07-04  Paul Brook  <paul@codesourcery.com>
392         * decl.c (gfc_match_implicit_range): Don't use typespec.
393         (gfc_match_implicit): Handle character selectors.
394         * gfortran.h (gfc_set_implicit): Remove prototype.
395         (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
396         * parse.c (accept_statement): Don't call gfc_set_implicit.
397         * symbol.c (new_ts): Remove.
398         (gfc_set_implicit_none): Use same loop bounds as other functions.
399         (gfc_set_implicit): Remove.
400         (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
401         (gfc_merge_new_implicit): Combine with gfc_set_implicit.
403 2004-06-30  Richard Henderson  <rth@redhat.com>
405         * match.c (var_element): Remove unused variable.
407         * trans-decl.c (gfc_generate_function_code): Don't set
408         x_whole_function_mode_p.
409         (gfc_generate_constructors): Likewise.
411 2004-06-30  Richard Henderson  <rth@redhat.com>
413         * trans-decl.c (gfc_generate_function_code): Don't set
414         immediate_size_expand.
415         (gfc_generate_constructors): Likewise.
417 2004-06-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
419         PR fortran/16161
420         * decl.c (gfc_match_type_spec): Rename second argument to
421         'implicit_flag', reverse meaning. Don't match_char_spec if
422         'implicit_flag' is set. Rename to ...
423         (match_type_spec): ... this.
424         (gfc_match_implicit_none, match_implicit_range): Move here
425         from match.c.
426         (gfc_match_implicit): Move here from match.c, try to
427         match_char_len if match_implicit_range doesn't succeed for
428         CHARACTER implicits. Call renamed fucntion match_type_spec.
429         (gfc_match_data_decl, match_prefix): Call renamed function
430         match_type_spec.
431         * match.c (gfc_match_implicit_none, match_implicit_range,
432         gfc_match_implicit): Move to decl.c.
433         * match.h (gfc_match_implicit_none, gfc_match_implicit):
434         Move protoypes to section 'decl.c'.
435         (gfc_match_type_spec): Remove prototype.
437 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
439         * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to 
440         copyright years.
442 2004-06-29  Steven Bosscher  <stevenb@suse.de>
444         Make sure types in assignments are compatible.  Mostly mechanical.
445         * trans-const.h (gfc_index_one_node): New define.
446         * trans-array.c (gfc_trans_allocate_array_storage,
447         gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
448         gfc_trans_array_constructor_value, gfc_trans_array_constructor,
449         gfc_conv_array_ubound, gfc_conv_array_ref,
450         gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
451         gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
452         gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
453         gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
454         types in assignments, conversions and conditionals for expressions.
455         * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
456         gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
457         gfc_conv_function_call, gfc_trans_pointer_assignment,
458         gfc_trans_scalar_assign): Likewise.
459         * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
460         gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
461         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
462         gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
463         gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
464         gfc_conv_allocated, gfc_conv_associated,
465         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
466         * trans-io.c (set_string): Likewise.
467         * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
468         gfc_do_allocate, generate_loop_for_temp_to_lhs,
469         generate_loop_for_rhs_to_temp, compute_inner_temp_size,
470         compute_overall_iter_number, gfc_trans_assign_need_temp,
471         gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
472         gfc_evaluate_where_mask, gfc_trans_where_assign,
473         gfc_trans_where_2): Likewise.
474         * trans-types.c (gfc_get_character_type, gfc_build_array_type,
475         gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
477         * trans.c (gfc_add_modify_expr): Add sanity check that types
478         for the lhs and rhs are the same for scalar assignments.
480 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
482         * dump-parse-tree.c (show_common): New function.
483         (gfc_show_namespace): Show commons.
485 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
486         Andrew Vaught  <andyv@firstinter.net>
488         PR fortran/13249
489         PR fortran/15481
490         * decl.c (gfc_match_save): Adapt to new common structures,
491         don't allow saving USE-associated common.
492         * dump-parse-tree (gfc_show_attr): (saved_)common are not
493         symbol attributes any longer.
494         (gfc_show_symbol): Don't show old-style commons any longer.
495         (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
496         interface.
497         * gfortran.h (symbol_attribute): Remove common and saved_common
498         attributes.
499         (gfc_symbol): Remove common_head element.
500         (gfc_common_head): New struct.
501         (gfc_get_common_head): New macro.
502         (gfc_symtree): Add field 'common' to union.
503         (gfc_namespace): Add field 'common_root'; change type of field
504         'blank_common' to blank_common.
505         (gfc_add_data): New prototype.
506         (gfc_traverse_symtree): Expect a symtree as first argument
507         instead of namespace.
508         * match.c (gfc_get_common): New function.
509         (match_common_name): Change to take char * as argument, adapt,
510         fix bug with empty name.
511         (gfc_match_common): Adapt to new data structures. Disallow
512         redeclaration of USE-associated COMMON-block. Fix bug with
513         empty common.
514         (var_element): Adapt to new common structures.
515         * match.h (gfc_get_common): Declare.
516         * module.c: Add 2004 to copyright years, add commons to module
517         file layout description.
518         (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
519         for removed attributes.
520         (mio_symbol): Adapt to new way of storing common relations.
521         (load_commons): New function.
522         (read_module): Skip common list on first pass, load_commons at
523         second.
524         (write_commons): New function.
525         (write_module): Call write_commons().
526         * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
527         functions related to removed attributes.
528         (gfc_add_data): New function.
529         (gfc_clear_attr): Don't set removed attributes.
530         (gfc_copy_attr): Don't copy removed attributes.
531         (traverse_symtree): Remove.
532         (gfc_traverse_symtree): Don't traverse symbol 
533         tree of the passed namespace, but require a symtree to be passed
534         instead. Unify with traverse_symtree.
535         (gfc_traverse_ns): Call gfc_traverse_symtree according to new
536         interface.
537         (save_symbol): Remove setting of removed attribute.
538         * trans-common.c (gfc_sym_mangled_common_id): Change to
539         take 'char *' argument instead of 'gfc_symbol'.
540         (build_common_decl, new_segment, translate_common): Adapt to new
541         data structures, add new
542         argument name.
543         (create_common): Adapt to new data structures, add new
544         argument name. Fix typo in intialization of derived types.
545         (finish_equivalences): Add second argument in call to
546         create_common.
547         (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
548         (gfc_trans_common): Adapt to new data structures.
549         * trans-decl.c (gfc_create_module_variables): Remove test for 
550         removed attribute.
552 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
554         * io.c: Add 2004 to copyright years.
556 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
557         Andrew Vaught  <andyv@firstinter.net>
559         * gfortran.h (gfc_gsymbol): New typedef.
560         (gfc_gsym_root): New variable.
561         (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
562         * parse.c (global_used): New function.
563         (parse_block_data): Check for double empty BLOCK DATA,
564         use global symbol table.
565         (parse_module): Use global symbol table.
566         (add_global_procedure, add_global_program): New functions.
567         (gfc_parse_file): Use global symbol table.
568         * symbol.c (gfc_gsym_root): New variable.
569         (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
570         functions.
572 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
574         * module.c (mio_gmp_real): Correct writing of negative numbers.
576 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
578         PR fortran/15963
579         * expr.c (check_intrinsic_op): Allow comparison of characters.
580         Make logic easier.
582 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
583         Andrew Vaught  <andyv@firstinter.net>
585         * decl.c (contained_procedure): New function.
586         (match_end): Verify correctness of END STATEMENT in
587         all cases.
589 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
590         Andrew Vaught  <andyv@firstinter.net>
592         PR fortran/15190
593         * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
594         (decode_statement): Enforce required space in free-form.
596 2004-06-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
598         * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
599         * trans-array.c (gfc_conv_descriptor_data): Add operand
600         for COMPONENT_REF.
601         (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
602         (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
603         (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
604         * trans-common.c (create_common): Likewise.
605         * trans-expr.c (gfc_conv_component_ref): Likewise.
606         * trans-io.c (set_parameter_value): Likewise.
607         (set_parameter_ref, set_string, set_flag, io_result): Likewise.
608         (transfer_expr): Likewise.
609         * trans-decl.c (gfc_trans_auto_character_variable):
610         Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
611         (gfc_gimplify_function): New function.
612         (gfc_generate_function-code): Properly handle nested functions.
613         * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
615 2004-06-22  Janne Blomqvist  <jblomqvi@cc.hut.fi>
617         PR fortran/15750
618         * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
619         (gfc_resolve_inquire): Resolve the iolength tag.  Return
620         SUCCESS at end of function if no failure has occured.
621         * resolve.c (resolve_code): Resolve if iolength is encountered.
622         * trans-io.c: (ioparm_iolength, iocall_iolength,
623         iocall_iolength_done): New variables.
624         (last_dt): Add IOLENGTH.
625         (gfc_build_io_library_fndecls ): Set iolength related variables.
626         (gfc_trans_iolength): Implement.
627         (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
629 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de
631         PR fortran/15511
632         * scanner.c (load_line): Don't truncate preprocessor lines.
633         Reformat error message.
634         (preprocessor_line): Issue warning in case of malformed
635         preprocessor line. 
637 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
639         * resolve.c (resolve_symbol): Add comment in function body.
640         (check_data_variable): Change type of mark to ar_type, adapt code
641         accordingly.
643 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
645         * array.c (gfc_insert_constructor): Avoid redundant call to
646         mpz_comp. Add 2004 to copyright years.
647         
648 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
650         * trans.h (stmtblock_t): Change has_scope to unsigned int.
652 2004-06-20  Steven G. Kargl  <kargls@comcast.net>
654         * arith.c (gfc_range_check): correct complex underflow.
656 2004-06-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
658         PR fortran/15962
659         * match.c (match_case_selector): Call gfc_match_init_expr
660         instead of gfc_match_expr.
661         * resolve.c (validate_case_label_expr): No need to check for
662         constant, since it wouldn't have been matched with the fix to
663         match.c.
665 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
667         PR fortran/15211
668         * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
669         of strings. 
671 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
673         PR fortran/15510
674         * trans-deecl.c (generate_local_decl): Do not issue warning for
675         unused variables if they're use associated.
677 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
678         Andrew Vaught <andyv@firstinter.net>
680         PR fortran/14928
681         * gfortran.h (gfc_check_f): Add new field f3ml.
682         * check.c (gfc_check_minloc_maxloc): Take argument list instead
683         of individual arguments, reorder if necessary.
684         * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
685         * intrinsic.c (add_sym_3ml): New function.
686         (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
687         (check_specific): Catch special case MINLOC, MAXLOC. 
689 2004-06-14  Paul Brook  <paul@codesourcery.com>
691         * intrinsic.c (add_sym_2s): Use correct function types.
693 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
695         * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize.  Move data.c
696         * data.c (gfc_get_section_index):  Remove dependency on trans.h.
698 2004-06-12  Steven G. Kargl  <kargls@comcast.net>
700         * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
701         gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
702         * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
703         GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
704         * trans-intrinsic.c:  Use symbols.
705         * intrinsic.c (add_sym_2s): New function.
706         * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
707         * intrinsic.h: Function prototypes.
708         * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub 
709         gfc_resolve_srand):  New functions.
711 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
713         PR fortran/14957
714         * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
715         contained procedure.
716         
717 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
719         PR fortran/12841
720         * interface.c (compare_parameter, compare_actual_formal): Don't
721         check types and array shapes for NULL()
722         * trans-expr.c (conv_function_call): No double indirection for
723         NULL() 
725 2004-06-09  Toon Moene  <toon@moene.indiv.nluug.nl>
727         * trans-expr.c (gfc_conv_cst_int_power): Compute
728         x**(-n) by converting it to (1/x)**n instead of
729         1/x**n.
731 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
733         PR fortran/13372
734         * module.c (write_symbol, write_symtree): Don't write symbols
735         wrongly added to namespace.
736         * trans-decl.c (gfc_create_module_variable): Don't create a
737         backend decl for a symbol incorrectly added to namespace.
739 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
741         PR fortran/13201
742         * resolve.c (resolve_symbol): Verify that parameter array has an
743         explicit shape. Fix typos and coding style issues in surrounding
744         lines.
746 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
748         PR fortran/15478
749         * gfortran.texi: The documentation doesn't contain infomration on
750         how to report bugs, and shouldn't, so remove the line which
751         says it does.
753 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
755         * intrinsic.c (sort_actual): Keep track of type of missing 
756         arguments. (Missing from previous commit.)
758 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
760         * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
761         * interface.c (compare_actual_formal): Keep type of omitted
762         optional arguments.
763         * trans-expr.c (gfc_conv_function_call): Add string length
764         argument for omitted string argument.
766 2004-06-03  Paul Brook  <paul@codesourcery.com>
768         * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
769         lists instead of compound expr chains.
770         (gfc_trans_code): Annotate statement lists.
772 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
774         * trans-array.c: Fix spelling in comments.
776 2004-06-02  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
778         PR fortran/15557
779         * data.c (assign_substring_data_value): New function.
780         (gfc_assign_data_value): Call the new function if we're dealing
781         with a substring LHS.
783 2004-06-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
785         PR fortran/15477
786         * gfortran.h (GFC_VERSION): Remove.
787         * gfortran.texi (version-gfortran): Remove, replace by version-GCC
788         where used.
790 2004-05-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
792         * trans-types.c: Fix spelling & layout in comments.
794 2004-05-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
796         PR fortran/14067
797         * trans-const.c (gfc_conv_string_init): Allow variable string
798         length lower than initialization string length.
800 2004-05-30  Paul Brook  <paul@codesourcery.com>
802         PR fortran/15620
803         * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
804         * trans-expr.c (gfc_trans_string_copy): New function.
805         (gfc_conv_statement_function): Use them.  Create temp vars.  Enforce
806         character lengths.
807         (gfc_conv_string_parameter): Use gfc_trans_string_copy.
808         * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
809         * trans.h (struct gfc_saved_var): Define.
810         (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
812 2004-05-30  Steven G. Kargl  <kargls@comcast.net>
814         * iresolve.c (gfc_resolve_random_number): Clean up conditional.
816 2004-05-29  Steven G. Kargl  <kargls@comcast.net>
818         * simplify.c (gfc_simplify_log): Remove useless line of code.
820 2004-05-29  Paul Brook  <paul@codesourcery.com>
822         * trans-common.c (find_equivalence): Find multiple rules.
824 2004-05-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
826         * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
827         (gfc_current_locus): Declare new global variable.
828         * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
829         (gfc_current_locus1): Rename ...
830         (gfc_current_locus): ... to this.
831         (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
832         skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
833         gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
834         gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
835         and gfc_current_locus(), respectively.
836         * array.c (match_subscript, gfc_match_array_ref, match_array_list,
837         match_array_cons_element, gfc_match_array_constructor):
838         Read/modify gfc_current_locus instead of calling gfc_set_locus()
839         and gfc_current_locus().
840         * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
841         match_attr_spec, gfc_match_function_decl, gfc_match_end,
842         attr_decl1, gfc_match_save): Likewise.
843         * error.c (error_print, gfc_internal_error): Likewise.
844         * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
845         * interface.c (gfc_add_interface): Likewise.
846         * io.c (gfc_match_format, match_dt_format, match_dt_element,
847         match_io_iterator, match_io): Likewise.
848         * match.c (gfc_match_space, gfc_match_eos,
849         gfc_match_small_literal_int, gfc_match_st_label,
850         gfc_match_strings, gfc_match_name, gfc_match_iterator,
851         gfc_match_char, gfc_match, gfc_match_assignment,
852         gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
853         gfc_match_nullify, gfc_match_call, match_implicit_range,
854         gfc_match_implicit, gfc_match_data, match_case_selector,
855         gfc_match_case, match_forall_iterator): Likewise.
856         * matchexp.c (gfc_match_defined_op_name, next_operator,
857         match_level_1, match_mult_operand, match_ext_mult_operand,
858         match_add_operand, match_ext_add_operand, match_level_2,
859         match_level_3, match_level_4, match_and_operand, match_or_operand,
860         match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
861         * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
862         * parse.c (match_word, decode_statement, next_free, next_fixed,
863         add_statement, verify_st_order, parse_if_block, gfc_parse_file):
864         Likewise.
865         * primary.c (match_digits, match_integer_constant,
866         match_boz_constant, match_real_constant, match_substring,
867         next_string_char, match_charkind_name, match_string_constant,
868         match_logical_constant, match_const_complex_part,
869         match_complex_constant, match_actual_arg, match_keyword_arg,
870         gfc_match_actual_arglist, gfc_match_structure_constructor,
871         gfc_match_rvalue, gfc_match_variable): Likewise.
872         * st.c (gfc_get_code): Likewise.
873         * symbol.c (check_conflict, check_used, check_done,
874         duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
875         gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
876         gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
878 2004-05-26  Roger Sayle  <roger@eyesopen.com>
880         * io.c (format_asterisk): Silence compiler warnings by correcting
881         the number of elements of a "locus" initializer.
883 2004-05-25  Roger Sayle  <roger@eyesopen.com>
885         PR fortran/13912
886         * matchexp.c: Allow unary operators after arithmetic operators
887         as a GNU extension.
888         (match_ext_mult_operand, match_ext_add_operand): New functions.
889         (match_mult_operand): Tweak to call match_ext_mult_operand.
890         (match_add_operand): Tweak to call match_ext_mult_operand.
891         (match_level_2): Rearrange to call match_ext_add_operand.
893 2004-05-25  Paul Brook  <paul@codesourcery.com>
895         * expr.c (check_inquiry): Remove bogus tests.
897 2004-05-23  Paul Brook  <paul@codesourcery.com>
899         PR fortran/13773
900         * expr.c (restricted_args): Remove redundant checks/argument.
901         (external_spec_function): Update to match.
902         (restricted_intrinsic): Rewrite.
904 2004-05-23  Paul Brook  <paul@codesourcery.com>
905         Victor Leikehman  <lei@haifasphere.co.il>
907         * gfortran.h (struct gfc_symbol): Add equiv_built.
908         * trans-common.c: Change int to HOST_WIDE_INT.  Capitalize error
909         messages.
910         (current_length): Remove.
911         (add_segments): New function.
912         (build_equiv_decl): Create initialized common blocks.
913         (build_common_decl): Always add decl to bindings.
914         (create_common): Create initializers.
915         (find_segment_info): Reformat to match coding conventions.
916         (new_condition): Use add_segments.
917         (add_condition, find_equivalence, add_equivalences): Move iteration
918         inside functions.  Only process each segment once.
919         (new_segment, finish_equivalences, translate_common): Simplify.
921 2004-05-23  Steven G. Kargl  <kargls@comcast.net>
923         * check.c (gfc_check_random_seed): Issue for too many arguments.
925 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
927         * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
929 2004-05-22  Paul Brook  <paul@codesourcery.com>
931         * dump-parse-tree.c (gfc_show_equiv): New function.
932         (gfc_show_namespace): Use it.
934 2004-05-22  Victor Leikehman  <lei@haifasphere.co.il>
936         PR fortran/13249
937         * symbol.c (gfc_add_common): Disable checks to work around other more
938         fundamental inadequacies.
940 2004-05-22  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
942         * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
943         only for functions.
944         (gfc_build_function_decl): Likewise.
946 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
948         * check.c (gfc_check_system_clock): New function.
949         * intrinsic.c (add_sym_3s): New function.
950         (add_subroutines): Use it.
951         * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
952         Add prototypes.
953         * iresolve.c (gfc_resolve_system_clock): New function.
955 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
957         * invoke.texi: Document -Wunderflow and spell check.
958         * lang.opt: Add Wunderflow.
959         * gfortran.h (gfc_option_t): Add warn_underflow option.
960         * options.c (gfc_init_options, set_Wall): Use it.
961         * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
962         * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
963         gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
964         gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
965         * arith.c (common_logarithm): Fix typo in comment.
967 2004-05-21  Roger Sayle  <roger@eyesopen.com>
969         * io.c (check_format): As a GNU extension, allow the comma after a
970         string literal to be optional in a format.  Use gfc_notify_std to
971         issue an error/warning as appropriate.
973 2004-05-21  Roger Sayle  <roger@eyesopen.com>
975         * io.c (check_format): Use gfc_notify_std to determine whether to
976         issue an error/warning for omitting the digits from the X format.
978 2004-05-20  Roger Sayle  <roger@eyesopen.com>
980         * io.c (check_format): Allow the number before the X format to
981         be optional when not -pedantic.
983 2004-05-18  Feng Wang  <fengwang@nudt.edu.cn>
984         Paul Brook  <paul@codesourcery.com>
986         * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
987         Create decls for __builtin_pow{,f}.
988         * gfortran.h (PREFIX_LEN): Define.
989         * trans-decl.c (gfor_fndecl_math_powi): Add.
990         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
991         (gfc_build_intrinsic_function_decls): Create decls for powi.
992         * trans-expr.c (powi_table): Add.
993         (gfc_conv_integer_power): Remove.
994         (gfc_conv_powi): New function.
995         (gfc_conv_cst_int_power): New function.
996         (gfc_conv_power_op): Use new powi routines.
997         * trans.h (struct gfc_powdecl_list): Add.
998         (gfor_fndecl_math_powi): Add.
999         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
1001 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1003         * trans.c, trans-decl.c: Fix comment typos.
1005 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1007         * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
1009 2004-05-18  Steve Kargl  <kargls@comcast.net>
1011         * arith.c (gfc_int2complex): Fix incorrect range checking.
1013 2004-05-18  Paul Brook  <paul@codesourcery.com>
1015         PR fortran/13930
1016         * decl.c (add_init_expr_to_sym): Remove incorrect check.
1017         (default_initializer): Move to expr.c.
1018         (variable_decl): Don't assign default initializer to variables.
1019         * expr.c (gfc_default_initializer): Move to here.
1020         * gfortran.h (gfc_default_initializer): Add prototype.
1021         * resolve.c (resolve_symbol): Check for illegal initializers.
1022         Assign default initializer.
1024 2004-05-17  Steve Kargl  <kargls@comcast.net>
1026         * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
1028 2004-05-17  Steve Kargl  <kargls@comcast.net>
1030         * arith.c (gfc_real2complex): Range checking wrong part of complex
1031         number. 
1032         
1033 2004-05-16  Paul Brook  <paul@codesourcery.com>
1035         * options.c (gfc_handle_module_path_options): Fix buffer overrun.
1037 2004-05-16  Paul Brook  <paul@codesourcery.com>
1039         * arith.c (gfc_range_check): Fix logic error.
1041 2004-05-16  Steve Kargl  <sgk@troutmask.apl.washington.edu>
1043         * arith.c: Fix comment typos.
1045 2004-05-15  Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1047         PR fortran/13742
1048         * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
1049         not initialized in a disallowed fashion.
1050         * match.c (gfc_match_common): Likewise.
1051         (var_element): Verify that variable is not in the blank COMMON,
1052         if it is in a common. 
1054 2004-05-15  Joseph S. Myers  <jsm@polyomino.org.uk>
1056         * Make-lang.in (f95.generated-manpages): Remove.
1057         (f95.srcextra): New.
1058         (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
1059         f95.maintainer-clean): Generate info and dvi files in objdir/doc.
1060         (f95.dvi): Remove.
1061         (dvi): New.
1062         (f95.install-info): Remove.
1063         (install-info): New.
1065 2004-05-15  Victor Leikehman  <lei@haifasphere.co.il>
1067         * decl.c (add_init_expr_to_sym): Check for variable size arrays.
1069 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1071         * primary.c (match_boz_constant): Use gfc_notify_std() for
1072         issuing a warning or an error.
1074 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1076         PR fortran/13826
1077         * primary.c (match_structure_constructor): Rename ...
1078         (gfc_match_structure_constructor): ... to this. Make non-static.
1079         (gfc_match_rvalue): Call renamed function.
1080         * match.h (gfc_match_structure_constructor): Declare.
1081         * match.c (gfc_match_data_constant): Handle structure
1082         constructor.
1084 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1086         PR fortran/13702 
1087         (Port from g95)
1088         * gfortran.h (gfc_linebuf): New typedef.
1089         (linebuf): Remove.
1090         (gfc_file): Revamped, use new gfc_linebuf.
1091         (locus): Revamped, use new types.
1092         (gfc_current_file): Remove.
1093         (gfc_current_form, gfc_source_file): New global variables.
1094         * match.c (gfc_match_space, gfc_match_strings): Use
1095         gfc_current_form to find source form.
1096         * module.c (gfc_dump_module): Use gfc_source_file when printing
1097         module header.
1098         * error.c (show_locus, show_loci) Use new data structures to print
1099         locus.
1100         * scanner.c (first_file, first_duplicated_file, gfc_current_file):
1101         Remove.
1102         (file_head, current_file, gfc_current_form, line_head, line_tail,
1103         gfc_current_locus1, gfc_source_file): New global variables.
1104         (gfc_scanner_init1): Set new global variables.
1105         (gfc_scanner_done1): Free new data structures.
1106         (gfc_current_locus): Return pointer to gfc_current_locus1.
1107         (gfc_set_locus): Set gfc_current_locus1.
1108         (gfc_at_eof): Set new variables.
1109         (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
1110         to new locus structure.
1111         (gfc_check_include): Remove.
1112         (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
1113         (gfc_skip_comments): Use gfc_current_form, find locus with
1114         gfc_current_locus1.
1115         (gfc_next_char): Use gfc_current_form.
1116         (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
1117         (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
1118         comment formatting.
1119         (get_file): New function.
1120         (preprocessor_line, include_line): New functions.
1121         (load_file): Move down, rewrite to match new data structures.
1122         (gfc_new_file): Rewrite to match new data structures.
1123         * parse.c (next_statement): Remove code which is now useless. Use
1124         gfc_source_form and gfc_source_file where appropriate.
1125         * trans-decl.c (gfc_get_label_decl): adapt to new data structures
1126         when determining locus of frontend code.
1127         * trans-io.c (set_error_locus): Same.
1128         * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
1129         * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
1130         preprocessor flags.
1131         (all): Add missing initializers.
1133 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1135         * Make-lang.in (trans-common.o): Remove redundant dependency.
1136         (data.c): Replace object file name ...
1137         (data.o): ... by the correct one.
1139 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1141         * dump-parse-tree.c (gfc_show_array_ref): Print colon only
1142         for ranges when dumping array references.
1144 2004-05-14  Victor Leikehman  <lei@haifasphere.co.il>
1146         * decl.c (variable_decl): Always apply default initializer.
1148 2004-05-08  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1150         PR fortran/15206
1151         * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
1152         handle zero correctly.
1154 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1156         * match.c (gfc_match): Eliminate dead code.
1158 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1160         * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
1161         Detect bad continuation line in fixed form sources.
1163 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1165         PR fortran/15205
1166         * iresolve.c (gfc_resolve_nearest): Add new function.
1167         * intrinsic.h: ... declare it here.
1168         * intrinsic.c (add_functions): ... add it as resolving function
1169         for NEAREST.
1170         
1171 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1173         PR fortran/14066
1174         * match.c (gfc_match_do): Allow infinite loops with
1175         label-do-stmt. Do not enforce space after comma.
1177 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1179         PR fortran/15051
1180         * parse.c (parse_interface): Allow empty INTERFACE, remove
1181         seen_body.
1183 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1185         * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
1186         decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
1187         expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
1188         intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
1189         matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
1190         primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
1191         trans-array.c, trans-array.h, trans-common.c, trans-const.c,
1192         trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
1193         trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
1194         trans-types.h, trans.c, trans.h: Update copyright years and
1195         boilerplate.
1196         * data.c: Likewise, also removed two whitespace-only lines.
1197         * gfortranspec.c, lang.opt: Update copyright years.
1199 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1201         PR fortran/14568
1202         * trans-decl.c (generate_local_decl): Don't warn for unused
1203         variables which are in common blocks. 
1205 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
1207         * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
1208         trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
1209         trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
1211 2004-05-13  Victor Leikehman  <lei@haifasphere.co.il>
1213         PR fortran/15314
1214         * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
1216 2004-05-13  Joseph S. Myers  <jsm@polyomino.org.uk>
1218         * gfortran.texi: Use @table @emph instead of @itemize @emph.
1219         Remove "set DEVELOPMENT".
1220         (Compiling GFORTRAN): Remove.
1222 2004-05-09  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
1224         * array.c (match_subscript, match_array_ref): Add comments
1225         explaining argument 'init'.
1226         * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
1227         trans-expr.c, trans.c: Fix some typos in comments.
1228         * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
1229         * primary.c (match_digits, match_integer_constant): Add comment
1230         explaining signflag.
1232 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1234         PR fortran/13940
1235         * primary.c: Include system.h and flags.h, needed for pedantic.
1236         (match_boz_constant): Allow "x" for hexadecimal constants, warn if
1237         pedantic is set.
1239 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1241         PR fortran/13940
1242         * match.c (match_data_constant): Handle case where
1243         gfc_find_symbol sets sym to NULL
1245 2004-04-28  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1247         * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
1248         dependency on mathbuiltins.def
1250 2004-04-24  Victor Leikehman  <lei@il.ibm.com>
1252         * trans-io.c (transfer_expr): Implemented recursive printing
1253         of derived types.
1255 2004-04-24  Andrew Pinski  <pinskia@physics.uc.edu>
1257         * gfortranspec.c: Do not include multilib.h.
1259 2004-04-24  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
1261         * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
1262         2004 to copyright years.
1263         * trans-expr.c, trans-decl.c: Comment update, we now generate
1264         GENERIC, not SIMPLE. Add 2004 to copyright years.
1266 2004-04-24  Paul Brook  <paul@codesourcery.com>
1268         * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
1270 2004-04-24  Feng Wang  <fengwang@nudt.edu.cn>
1272         PR 14817
1273         * arith.c (gfc_arith_divide): Fix complex divide.
1275 2004-04-23  Andrew Pinski  <pinskia@physics.uc.edu>
1277         * gfortranspec.c: Include the target headers.
1279 2004-04-18  Feng Wang  <fengwang@nudt.edu.cn>
1281         PR fortran/14921
1282         PR fortran/14540
1283         * arith.c (arctangent2): New function.
1284         * arith.h (arctangent2): Add function prototype.
1285         * simplify.c (gfc_simplify_atan2): Use it.
1286         (gfc_simplify_log): Use it.
1288 2004-04-12  Diego Novillo  <dnovillo@redhat.com>
1290         * fortran/f95-lang.c (gfc_expand_stmt): Remove.
1291         (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
1293 2004-04-11  Bud Davis  <bdavis9659@comcast.net>
1295         PR fortran/14872
1296         * trans-io.c (build_dt): Change REC to value.
1298 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
1300         PR 14394 
1301         * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
1302         the real value when converting mpf to string.
1304 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
1306         PR 14395
1307         * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
1308         the result.
1310 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
1312         PR fortran/14377
1313         * simplify.c (simplify_min_max): Convert the type of the result.
1315 2004-04-11  Paul Brook  <paul@codesourcery.com>
1317         * gfortran.texi: Use full target triplet.
1319 2004-04-11  Paul Brook  <paul@codesourcery.com>
1321         * Make-lang.in (GFORTRAN_TEXI): Set it.
1322         (fortran/dfortran.dvi): Use it.  Add fortran to include paths.
1323         (fortran/gfortran.info): Ditto. 
1324         * gfortran.texi: Major update.
1325         * invoke.texi: New file.
1327 2004-04-10  Paul Brook  <paul@codesourcery.com>
1329         * trans-array.c (gfc_trans_allocate_temp_array,
1330         gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
1331         * trans-decl.c (gfc_build_dummy_array_decl,
1332         gfc_get_symbol_decl, gfc_build_function_decl,
1333         gfc_create_module_variable): Ditto.
1334         * trans-expr.c (gfc_conv_variable): Ditto.
1335         * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
1336         * trans.h (GFC_DECL_STRING): Remove.
1337         (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
1338         GFC_DECL_ASSIGN): Renumber flags.
1340 2004-04-05  Paul Brook  <paul@codesourcery.com>
1342         PR 13252
1343         PR 14081
1344         * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
1345         and stack_restore.
1346         * gfortran.h (struct gfc_charlen): Add backend_decl.
1347         * trans-array.c (gfc_trans_allocate_temp_array,
1348         gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
1349         (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
1350         Remove old, broken string handling.
1351         (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1352         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1353         gfc_trans_deferred_array): Handle character arrays.
1354         * trans-const.c (gfc_conv_const_charlen): New function.
1355         * trans-const.h (gfc_conv_const_charlen): Add prototype.
1356         * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
1357         as static.
1358         (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
1359         (gfc_create_string_length): New function.
1360         (gfc_get_symbol_decl): Create lengths for character variables.
1361         (gfc_get_fake_result_decl): Ditto.
1362         (gfc_build_function_decl): Only set length for assumed length
1363         character arguments.
1364         (gfc_trans_dummy_character): New function.
1365         (gfc_trans_auto_character_variable): Rewrite.
1366         (gfc_trans_deferred_vars): Handle more types of character variable.
1367         (gfc_create_module_variable): String lengths have moved.
1368         (gfc_generate_function_code): Initialize deferred var chain earlier.
1369         * trans-expr.c (gfc_conv_init_string_length): Rename ...
1370         (gfc_trans_init_string_length):  ... to this.
1371         (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
1372         gfc_conv_function_call): Update to new format for character variables.
1373         (gfc_conv_string_length): Remove.
1374         (gfc_conv_string_parameter): Update assertion.
1375         * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
1376         * trans-io.c (set_string): Use new macro names.
1377         * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
1378         * trans-types.c (gfc_get_character_type): Use existing length expr.
1379         (gfc_is_nodesc_array): Make public.
1380         (gfc_get_dtype_cst): Rename ...
1381         (gfc_get_dtype): ... to this.  Handle unknown size arrays.
1382         (gfc_get_nodesc_array_type): Use new name.
1383         (gfc_sym_type): New character variable code.
1384         (gfc_get_derived_type): Ditto.
1385         (gfc_get_function_type): Evaluate character variable lengths.
1386         * trans-types.h (gfc_strlen_kind): Define.
1387         (gfc_is_nodesc_array): Add prototype.
1388         * trans.h: Update prototypes.
1389         (struct lang_type): Update comments.
1390         (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
1391         (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
1393 2004-04-04  Paul Brook  <paul@codesourcery.com>
1395         * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
1396         * options.c (gfc_init.options, gfc_handle_option): Ditto.
1397         * trans-expr.c (gfc_conv_function_call): Ditto.
1398         * trans-types.c (gfc_is_nodesc_array): Ditto
1399         * lang.opt (fg77-calls): Remove.
1401 2004-04-04  Paul Brook  <paul@codesourcery.com>
1403         * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
1404         (gfc_conv_descriptor_base): Rename ...
1405         (gfc_conv_descriptor_offset): ... to this.
1406         (gfc_trans_allocate_array_storage): Set offset to zero.
1407         (gfc_conv_array_base): Rename ...
1408         (gfc_conv_array_offset): ... to this.
1409         (gfc_conv_array_index_ref): Add offset parameter.
1410         (gfc_conv_array_ref): Include offset.
1411         (gfc_trans_preloop_setup): Use existing offset.
1412         (gfc_trans_allocate_temp_array,  gfc_array_allocate,
1413         gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1414         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1415         gfc_conf_ss_descriptor): Set offset.
1416         * trans-array.h: Rename prototypes.
1417         * trans-const.h (gfc_index_zero_node): Define.
1418         * trans-decl.c (gfc_build_qualified_array): Change base to offset.
1419         * trans-types.c (gfc_get_array_type_bounds): Ditto.
1420         (gfc_get_nodesc_array_type): Calculate offset before upper bound.
1422 2004-03-25  Diego Novillo  <dnovillo@redhat.com>
1424         * convert.c (convert): Don't handle WITH_RECORD_EXPR.
1426 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
1428         PR 14055
1429         * arith.c (gfc_convert_integer,gfc_convert_real):  Removed leading '+'
1430         before conversion by gmp library call.
1432 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
1434         PR 12921
1435         * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
1437 2004-02-24  Richard Henderson  <rth@redhat.com>
1439         * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
1441 2004-02-19  Loren J. Rittle  <ljrittle@acm.org>
1443         * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
1444         (fortran/gfortran.info): ... to here.
1445         (f95.srcinfo): New.
1447 2004-02-16  Richard Henderson  <rth@redhat.com>
1449         * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
1450         * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
1451         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
1452         (gfc_expand_function): Rename from expand_function_body, make static,
1453         don't do anything except invoke tree_rest_of_compilation.
1454         (gfc_be_parse_file): Invoke cgraph.
1455         (gfc_expand_decl): Remove.
1456         (gfc_init_builtin_functions): Add __builtin_init_trampoline and
1457         __builtin_adjust_trampoline.
1458         * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
1459         (gfc_finalize): New.
1460         (gfc_generate_function_code): Use it.  Lower nested functions.
1461         * trans-expr.c (gfc_conv_function_call): Add static chain operand
1462         to call_expr.
1463         * trans.c (gfc_build_function_call): Likewise.
1464         * trans.h (expand_function_body): Remove.
1466 2004-02-15  Victor Leikehman  <lei@il.ibm.com>
1468         PR gfortran/13433
1469         * trans-decl.c (gfc_build_function_decl) For functions
1470         returning CHARACTER pass an extra length argument,
1471         following g77 calling conventions.
1472         * trans-types.c (gfc_get_function_type) Ditto.
1473         * trans-expr.c (gfc_conv_function_call) Ditto.
1475 2004-02-14  Paul Brook  <paul@codesourcery.com>
1477         * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
1479 2004-02-12  Paul Brook  <paul@nowt.org>
1481         * BUGS: Remove.
1483 2004-02-08  Steve Kargl  <sgk@troutmask.apl.washington.edu>
1485         * gfortran.texi: Fix typos.
1487 2004-02-07  Bud Davis  <bdavis9659@comcast.net>
1489         PR gfortran/13909
1490         * intrinsic.c (add_conversions) Use logical conversion instead
1491         of real.
1492         * trans-types.c (gfc_get_logical_type) implemented logical*1
1493         and logical*2.
1495 2004-01-17  Paul Brook  <paul@codesourcery.com>
1497         * lang-specs.h: Remove %<fixed-form.
1499 2004-01-15  Toon Moene  <toon@moene.indiv.nluug.nl>
1501         * lang-specs.h: Enable preprocessing of source files
1502         ending in .F, .fpp, .FPP, .F90 and .F95.
1504 2004-01-13  Toon Moene  <toon@moene.indiv.nluug.nl>
1506         PR fortran/12912
1507         * lang-specs.h: Enable compilation of files ending
1508         in .f, .for and .FOR.
1510 2004-01-11  Paul Brook  <paul@codesourcery.com>
1512         * trans-stmt.c (gfc_trans_if_1): New function.
1513         (gfc_trans_if): Use it.
1515 2004-01-11  Erik Schnetter  <schnetter@uni-tuebingen.de>
1517         * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
1518         (gfc_option_t): Add max_identifier_length.
1519         * lang.opt: Add fmax-identifier-length.
1520         * match.c (parse_name): Use limit.
1521         * options.c (gfc_init_options): Set max_identifier_length.
1522         (gfc_handle_option): Ditto.
1524 2004-01-11  Feng Wang  <fengwang@nudt.edu.cn>
1526         * intrinsic.c (add_functions): Add resolve function to dcmplx.
1527         * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
1528         * iresolve.c (gfc_resolve_dcmplx): New function.
1530 2004-01-10  Paul Brook  <paul@codesourcery.com>
1532         * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
1533         * trans-types.c (gfc_sym_type): Handle external dummy procedures.
1534         (gfc_return_by_reference): Correct condition.
1535         (gfc_get_function_type): Ditto.
1537 2004-01-10  Paul Brook  <paul@codesourcery.com>
1539         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
1540         types.
1542 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
1544         * iresolve.c: Use correct kind.
1546 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
1548         PR fortran/13467
1549         * trans-decl.c (gfc_create_module_variable):  Output array valued
1550         parameters.
1552 2004-01-10  Paul Brook  <paul@codesourcery.com>
1554         * resolve.c (resolve_branch): Get error message right way round.
1556 2004-01-10  Canqun Yang <canqun@nudt.edu.cn>
1558         * trans-array (gfc_conv_loop_setup): Adjust comment to track
1559         reality.
1560         (gfc_array_allocate): Don't count size of element twice.
1562 2004-01-04  Paul Brook  <paul@codesourcery.com>
1564         * lang.opt (i8, r8, std=*): Remove RejectNegative.
1566 2004-01-04  Paul Brook  <paul@codesourcery.com>
1568         * error.c (gfc_notify_std): New function.
1569         * gfortran.h (gfc_notify_std): Declare.
1570         (GFC_STD_*): Define.
1571         (gfc_option_t): Add warn_std and allow_std.
1572         * intrinsic.c (gfc_init_expr_extensions): Fix logic.
1573         (gfc_intrinsic_func_interface): Use gfc_notify_std.
1574         * check.c (check_rest): Use gfc_notify_std.
1575         * match.c (gfc_match_pause): Ditto.
1576         (gfc_match_assign): Ditto.
1577         (gfc_match_goto): Ditto.
1578         * resolve.c (resolve_branch): Ditto.
1579         * lang.opt: Add std=<foo> and w.
1580         * options.c (gfc_init_options): Set allow_std and warn_std.
1581         (gfc_handle_option): Handle OPT_std_* and OPT_w.
1583 2004-01-01  Paul Brook  <paul@codesourcery.com>
1585         * array.c (gfc_append_constructor): Take constructor, not expression.
1586         * data.c (struct gfc_expr_stack): Remove.
1587         (expr_stack): Remove.
1588         (find_con_by_offset): Rename from find_expr_in_con.
1589         (find_con_by_component): Rename from find_component_in_con.
1590         (gfc_get_expr_stack): Remove.
1591         (gfc_assign_data_value): Rewrite.
1592         (gfc_expr_push): Remove.
1593         (gfc_expr_pop): Remove.
1594         (gfc_advance_section): Rename from
1595         gfc_modify_index_and_calculate_offset.  Handle unbounded sections.
1596         (gfc_get_section_index): Handle unbounded sections.
1597         * gfortran.h: Update prototypes.
1598         * resolve.c (check_data_variable): Array section maight not be the
1599         last ref.
1601 2004-01-01  Paul Brook  <paul@codesourcery.com>
1603         PR fortran/13432
1604         * resolve.c (resolve_symbol): Allow assumed length function results.
1606 2004-01-01  Steve Kargl  <sgk@troutmask.apl.washington.edu>
1608         * match.c (gfc_match_pause): Fix spelling.
1610 2004-01-01  Steven Bosscher  <stevenb@suse.de>
1612         PR fortran/13251
1613         * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
1614         reference from the expression.
1616 2003-12-26  Feng Wang  <fengwang@nudt.edu.cn>
1618         * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
1619         dumping.
1620         * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
1621         (gfc_exec_op): New EXEC_LABEL_ASSIGN.
1622         (symbol_attribute):New variable attribute: assign.
1623         * io.c (resolve_tag):Integer variable is allowed.
1624         (match_dt_format): Add ASSIGN statement. Set assign flag.
1625         * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
1626         (gfc_match_assign): Add ASSIGN statement. Set assign flag.
1627         (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
1628         * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
1629         (next_statement): Add ST_LABEL_ASSIGNMENT.
1630         (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
1631         * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
1632         (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
1633         * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
1634         * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
1635         assign.  Put them into the stuct lang_decl.
1636         * trans-io.c (set_string): Add the assign statement.
1637         * trans-stmt.c (gfc_trans_label_assign): New function.
1638         (gfc_trans_goto): Translate ASSIGNED GOTO statement.
1639         * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
1640         * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
1641         * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
1642         (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
1643         (GFC_DECL_ASSIGN(node)): New macro to access flag.
1645 2003-12-31  Huang Chun <chunhuang73@hotmail.com>
1647         PR fortran/13434
1648         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in 
1649         minval/maxval.
1651 2003-12-22  Toon Moene  <toon@moene.indiv.nluug.nl>
1653         * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
1654         that arguments to subroutines/functions can't alias themselves, nor global
1655         memory.
1657 2003-12-20  Steven Bosscher  <stevenb@suse.de>
1659         * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
1660         * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
1662 2003-12-12  Huang Chun <chunhuang73@hotmail.com>
1664         * primary.c (match_substring): Fix substring bug for start point
1665         or end point is NULL.
1666         * trans-expr.c (gfc_conv_substring): Ditto
1667         * trans-types.c (gfc_sym_type): Get correct type of scalar 
1668         character variables.
1669         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in 
1670         derived type.
1672 2003-12-10  Richard Henderson  <rth@redhat.com>
1674         * options.c (gfc_post_options): Don't ever use rtl inlining.
1676 2003-12-05  Canqun Yang  <canqun@nudt.edu.cn>
1678         * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
1679         * trans-equivalence.c: Remove.
1680         * trans-decl.c (gfc_get_symbol_decl): Update to match.
1681         (gfc_generate_function_code): Ditto.
1682         * trans-array.c (gfc_conv_array_parameter): Ditto.
1683         * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
1684         (F95_ADDITIONAL_OBJS): Add stor-layout.o
1685         * trans.h (gfc_trans_equivalence): Remove.
1686         * gfortran.h (struct gfc_equiv): Add used field.
1687         (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
1688         equiv_offset fields.
1690 2003-12-05  Richard Henderson  <rth@redhat.com>
1692         * trans.c (gfc_build_addr_expr): New.
1693         (gfc_build_indirect_ref, gfc_build_array_ref): New.
1694         * trans.h: Declare them.
1695         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1696         trans-stmt.c, trans.c (*): Use them.
1698         * f95-lang.c (gfc_post_options): Remove dead prototype.
1699         * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
1700         * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
1701         allocation size.
1703 2003-12-01  Feng Wang  <fengwang@nudt.edu.cn>
1705         * io.c (gfc_match_format): Check for missing format label.
1707 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
1709         PR fortran/13155
1710         * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
1711         from interfaces in modules.
1713 2003-11-30  Paul Brook  <paul@nowt.org>
1715         * trans-array.c (gfc_trans_g77_array): Make non-static.
1716         (gfc_trans_assumed_size): Remove.
1717         (gfc_trans_dummy_array_bias): Explicitly free temporary.
1718         * trans-array.h (gfc_trans_g77_array): Add prototype.
1719         (gfc_trans_assumed_size): Remove.
1720         * trans-decls.c (gfor_fndecl_push_context): Remove.
1721         (gfor_fndecl_pop_context): Remove.
1722         (gfc_build_function)decls): Don't create them.
1723         (gfc_trans_deferred_vars): Update to match. Remove dead code.
1724         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
1726 2003-11-30  Kejia Zhao  <kejia_zh@nudt.edu.cn>
1728         * trans-array.c (gfc_conv_array_parameter): Simplify
1729         array argument passing for array name actual argument.
1730         * trans-expr.c (gfc_conv_function_call): Ditto
1731         * trans-types.c (gfc_is_nodesc_array):Ditto.
1733 2003-11-30  Paul Brook  <paul@nowt.org>
1735         * f95-lang.c (gfc_post_options): Move ...
1736         * options.c (gfc_post_options): .. to here.  Handle inlining options.
1737         * gfortran.h (gfc_post_options): Add prototype.
1739 2003-11-28  Richard Henderson  <rth@redhat.com>
1741         * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
1743 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
1745         * trans.h (has_alternate_specifier): New global variable.
1746         * match.c (gfc_match_call): Handle actual arguments associated with
1747         alternate return indicators.
1748         * trans-expr.c (gfc_conv_function_call): Ditto
1749         * trans-stmt.c (gfc_trans_call): Ditto
1750         (gfc_trans_return): Handle return statement with value.
1751         * trans-decl.c (gfc_generate_function_code): Handle functions with
1752         asterisk dummy.
1753         (gfc_get_fake_result_decl): Ditto
1754         * trans-types.c (gfc_get_function_type): Ditto
1755         * resolve.c (resolve_actual_arglist): Check alternate return indicators.
1756         (resolve_formal_arglist): Check asterisk dummy.
1758 2003-11-27  Paul Brook  <paul@nowt.org>
1760         * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
1761         allocation interface.
1762         (gfc_conv_ array_parameter): Ditto.
1763         (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
1764         * trans-array.c: Update prototype.
1765         * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
1766         (gfc_trans_auto_character_variable): Use new memory alloc interface.
1767         * trans-expr.c (gfc_conv_string_tmp): Ditto.
1768         (gfc_conv_function_call): Use gfc_conv_string_tmp.
1769         * trans-stmt.c (gfc_do_allocate):  Use new memory alloc interface.
1770         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
1771         * trans.h (gfc_ss_info): Remove unused pdata field.
1772         * trans.c (gfc_create_var_np): Change T to V.
1774 2003-11-26  Richard Henderson  <rth@redhat.com>
1776         * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
1777         * trans-intrinsic.c (gfc_intrinsic_map): ... here.  Add SCALE,
1778         FRACTION, NEAREST, SET_EXPONENT.
1779         (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
1780         Fix GTY marking.  Remove unnecessary const's.
1781         (LIBM_FUNCTION): Rename from I_LIB.
1782         (LIBF_FUNCTION): New.
1783         (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
1784         conventions.  Assume the expr signature is correct.  Mark const.
1785         (gfc_conv_intrinsic_exponent): Use library functions.
1786         (gfc_conv_intrinsic_set_exponent): Remove.
1787         (gfc_conv_intrinsic_scale): Remove.
1788         (gfc_conv_intrinsic_nearest): Remove.
1789         (gfc_conv_intrinsic_fraction): Remove.
1790         (gfc_conv_intrinsic_function): Update.
1791         * trans-decl.c (gfor_fndecl_math_exponent4): New.
1792         (gfor_fndecl_math_exponent8): New.
1793         (gfc_build_intrinsic_function_decls): Set them.
1794         * trans.h: Declare them.
1796 2003-11-25  Canqun Yang  <canqun@nudt.edu.cn>
1798         * trans-common.c (gfc_layout_global_equiv): Locate the error for
1799         underflow COMMON block.
1800         (gfc_trans_one_common): Fix bug for size of COMMON block containing
1801         EQUIVALENCE object. Also fix typo in an error message.
1803 2003-11-25  Diego Novillo  <dnovillo@redhat.com>
1805         * Make-lang.in: Add check-gfortran to lang_checks.
1806         (check-f95): Alias for check-gfortran.
1808 2003-11-25  Jason Merrill  <jason@redhat.com>
1810         * Make-lang.in (f95.tags): Create TAGS.sub files in each
1811         directory and TAGS files that include them for each front end.
1813 2003-11-24  Paul Brook  <paul@nowt.org>
1815         PR fortran/13154
1816         * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
1818 2003-11-24  Paul Brook  <paul@nowt.org>
1820         * expr.c (simplify_const_ref): Return SUCCESS for things we don't
1821         handle.
1822         * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
1824 2003-11-24  Paul Brook  <paul@nowt.org>
1826         PR fortran/13105
1827         * array.c (gfc_array_ref_shape): Handle elemental dimensions.
1828         * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
1830 2003-11-20  Richard Henderson  <rth@redhat.com>
1832         * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
1833         (gfc_conv_array_base): Likewise.
1834         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1835         * trans-expr.c (gfc_conv_string_tmp): Likewise.
1836         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
1837         * trans-stmt.c (gfc_trans_character_select): Likewise.
1839 2003-11-13  Paul Brook  <paul@nowt.org>
1841         * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
1843 2003-11-13  Canqun Yang  <canqun@nudt.edu.cn>
1845         * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
1846         (resolve_equivalence): New function.
1847         (resolve_equivalence_derived): New function.
1849 2003-11-12  Richard Henderson  <rth@redhat.com>
1851         * trans.c (gfc_trans_code): Use annotate_with_locus instead of
1852         annotate_all_with_locus.
1854 2003-11-11  Canqun Yang  <canqun@nudt.edu.cn>
1856         * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
1857         * trans-decl.c (gfc_finish_var_decl): Modified.
1859 2003-11-08  Paul Brook  <paul@nowt.org>
1861         PR fortran/12704
1862         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
1863         arrays.
1865 2003-11-06  Paul Brook  <paul@nowt.org>
1867         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
1869 2003-11-02  Canqun Yang  <canqun@nudt.edu.cn>
1871         * match.c (gfc_match_stopcode): Assign '0' to stop_code.
1873 2003-10-27  Anthony Green  <green@redhat.com>
1875         * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
1876         (f95.stagefeedback): Ditto.
1878 2003-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
1880         PR fortran/12682
1881         * Make-lang.in (f95.stageprofile): Add.
1882         (f95.stagefeedback): Add.
1884 2003-10-23  Richard Henderson  <rth@redhat.com>
1886         * f96-lang.c (gfc_gimplify_expr): Remove.
1887         (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
1888         (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
1890 2003-10-23  Richard Henderson  <rth@redhat.com>
1892         * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
1894 2003-10-20  Paul Brook  <paul@nowt.org>
1896         * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
1897         * trans-stmt.c (gfc_trans_do_while): Ditto.
1899 2003-10-17  Paul Brook  <paul@nowt.org>
1901         * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
1903 2003-10-17  Paul Brook  <paul@nowt.org>
1905         * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
1907 2003-10-17  Feng Wang  <wf_cs@yahoo.com>
1909         * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
1910         (gfc_resolve_minloc): Ditto.
1911         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
1912         Return the value after subtracting the lower bound.
1914 2003-10-16  Richard Henderson  <rth@redhat.com>
1916         * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
1918 2003-10-16  Steven Bosscher  <steven@gcc.gnu.org>
1920         * lang.c: Remove -M option for now, it's in the way for C.
1922 2003-10-14  Jason Merrill  <jason@redhat.com>
1924         * Make-lang.in (f95.tags): New rule.
1926 2003-10-13  Richard Henderson  <rth@redhat.com>
1928         * trans.c (gfc_trans_code): Use annotate_all_with_locus.
1930 2003-10-13  Paul Brook  <paul@nowt.org>
1932         * trans-decl.c (generate_local_decl): Don't create junk variables.
1934 2003-10-13  Paul Brook  <paul@nowt.org>
1936         * resolve.c (resolve_formal_arglist): Use function result decl in
1937         preference to function decl.
1939 2003-10-12  Richard Henderson  <rth@redhat.com>
1941         * f95-lang.c (gfc_define_builtin): New const_p argument.  Set
1942         TREE_READONLY.  Update all callers.
1944 2003-10-12  Feng Wang  <wf_cs@yahoo.com>
1946         * iresolve.c (gfc_resolve_cshift): Change to match implementation.
1947         * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
1948         (gfc_is_intrinsic_libcall): Add CSHIFT.
1950 2003-10-12  Richard Henderson  <rth@redhat.com>
1952         * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
1953         (gfc_trans_array_constructor_value): Likewise.
1954         (gfc_conv_array_initializer): Likewise.
1955         * trans-stmt.c (gfc_trans_character_select): Likewise.
1957 2003-11-12  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1959         * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
1961 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
1963         * check.c (gfc_check_repeat): Check arguments are scalar.
1964         (gfc_check_trim): New function.
1965         * intrinsic.h (gfc_check_trim): Add prototype.
1966         * intrinsic.c (add_functions): Use it.
1967         * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
1968         Decalare.
1969         * trans-decl.c: Ditto.
1970         (gfc_build_intrinsic_fucntion_decls): Set them.
1971         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
1972         (gfc_conv_intrinsic_trim): New function.
1973         (gfc_conv_intrinsic_repeat): New function.
1974         (gfc_conv_intrinsic_function): Use them.
1976 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
1978         * trans-types.c (gfc_sym_type): Handle result variables.
1980 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
1982         * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
1983         gfc_get_character_type.
1985 2003-10-11  Feng Wang  <wf_cs@yahoo.com>
1987         * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
1989 2003-10-11  Paul Brook  <paul@nowt.org>
1991         * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
1992         (gfc_resolve_dprod): New function.
1993         (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
1994         * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
1995         (gfc_resolve_dprod): Declare.
1996         * intrinsic.c (add_functions): Use them.
1997         * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
1999 2003-10-06  Richard Henderson  <rth@redhat.com>
2001         * f95-lang.c (gfc_init_builtin_functions): Add clzll.
2002         * trans-intrinsic.c (call_builtin_clz): Use it.
2004 2003-10-05  Paul Brook  <paul@nowt.org>
2006         * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
2007         * trans-decl.c (gfc_generate_function_code): Set
2008         cfun->function_end_locus.
2010 2003-09-24  Jason Merrill  <jason@redhat.com>
2012         * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
2013         TREE_LOCUS.
2015 2003-09-21  Lifang Zeng  <zlf605@hotmail.com>
2016         Paul Brook  <paul@nowt.org>
2018         * Make-lang.in (F95_OBJS): Add fortran/data.o.
2019         * array.c (gfc_inser_constructor): New function.
2020         (gfc_get_constructor): New function.
2021         (gfc_free_constructor): Initialize offset and repeat.
2022         (iterator_stack): Remove.
2023         (expand_info): Add offset, component and repeat fields.
2024         (expand_constructor): Set them.
2025         (expand): Set new fields.
2026         (gfc_copy_constructor): Ditto. Avoid recursion.
2027         * gfortran.h: Add prototypes for new functions.
2028         (gfc_constructor): Add offset, component and repeat.
2029         (iteratio_stack): Move to here.
2030         * resolve.c (check_data_variable): Convert data values into variable
2031         initializers.
2032         (traverse_data_list): Build implicit loop chain.
2033         (gfc_resolve): Ditto.
2034         * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
2035         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
2036         * trans-expr.c (gfc_conv_structure): Handle array initializers.
2037         (gfc_conv_expr): Update to match.
2038         * trans.h (gfc_conv_structure): Declare.
2039         * data.c: New file.
2041 2003-09-20  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2043         * trans.h: Add declarations for gfor_fndecl_si_kind and
2044         gfor_fndecl_sr_kind.
2045         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2046         * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
2047         (g95_conv_intrinsic_sr_kind): New function.
2048         (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
2049         SELECTED_REAL_KIND.
2051 2003-09-17  Lars Segerlund  <Lars.Segerlund@comsys.se>
2053         * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
2054         instead of _4 and _8 as postfix for libgfortran calls.
2056 2003-09-16  Paul Brook  <paul@nowt.org>
2058         * array.c (compare_bounds): New function.
2059         (gfc_compare_array_spec): Use it.
2061 2003-09-14  Paul Brook  <paul@nowt.org>
2063         * primary.c (gfc_match_rvalue): Make sure sym->result is set.
2064         * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
2066 2003-09-14  Paul Brook  <paul@nowt.org>
2068         * check.c (dim_rank_check): Allow assumed bounds if requested.
2069         (gfc_check_lbound): Call it.
2070         (gfc_check_ubound): Ditto.
2071         (gfc_check_size): Change to match.
2072         * simplify.c (gfc_simplify_bound): New function.
2073         (gfc_simplify_lbound): New function.
2074         (gfc_simplify_ubound): New function.
2075         * intrinsic.h: Declare them.
2076         * intrinsic.c (add_functions): Use them.
2078 2003-09-14  Paul Brook  <paul@nowt.org>
2080         * io.c (format_lex): Initialize negative_flag.
2081         (check_format): Intialize repeat.
2082         * trans-io.c (gfc_new_nml_name_expr): Declare static.
2083         (gfc_new_var_expr): Ditto.
2085 2003-09-14  Paul Brook  <paul@nowt.org>
2087         * trans-array.c (gfc_conv_array_initializer): Handle derived types.
2088         * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
2090 2003-09-12  Paul Brook  <paul@nowt.org>
2092         * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
2094 2003-09-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
2096         * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
2097         for a correct expression.
2099 2003-09-10  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2101         * trans-intrinsic.c (real_compnt_info): New struct.
2102         (prepare_arg_info): New function.
2103         (gfc_conv_intrinsic_set_exponent): New function.
2104         (gfc_conv_intrinsic_scale): New function.
2105         (gfc_conv_intrinsic_nearest): New function.
2106         (gfc_conv_intrinsic_fraction): New function.
2107         (gfc_conv_intrinsic_exponent): New function.
2108         (gfc_conv_intrinsic_spacing): New function.
2109         (gfc_conv_intrinsic_rrspacing): New function.
2110         (gfc_conv_intrinsic_function): Use them.
2112 2003-08-24 XiaoQiang Zhang  (zhangapache@yahoo.com>
2114         * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for 
2115         build_int_2 changed from (high, low) to (low, high).
2116         * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
2117         ioparm_namelist_read_mode, iocall_set_nml_val_int,
2118         iocall_set_nml_val_float, iocall_set_nml_val_char,
2119         iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
2120         (gfc_build_io_library_fndecls): Add variable initialization.
2121         (gfc_new_nml_name_expr, get_new_var_expr): New function.
2122         (build_dt): Add namelist support.
2123         * io.c (value): New variable.
2124         (check_format): Support FMT_H now.
2126 2003-09-07  Paul Brook  <paul@nowt.org>
2128         * io.c (gfc_resolve_dt): Error if format label is not defined.
2130 2003-09-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2132         * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is 
2133         about case_switch's break. The other is about building the condition 
2134         statement tree, which judges the argument in the range of the 
2135         corresponding integer type.
2136         * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
2137         for the large values.
2139 2003-09-05  Paul Brook  <paul@nowt.org>
2141         * f95-lang.c (expand_function_body): Gimplify the function.
2143 2003-09-04  Jeff Law  <law@redhat.com>
2145         * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
2146         index zero!
2148 2003-09-04  Paul Brook  <paul@nowt.org>
2150         * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
2151         (gfc_expand_stmt): New function.
2152         (LANG_HOOKS_RTL_EXPAND_STMT): Define.
2153         (expand_function_body): Use tree_rest_of_compilation.
2154         * trans-decl.c (gfc_generate_function_code): Don't free cfun.
2156 2003-09-03  Jeff Law  <law@redhat.com>
2158         * f95-lang.c (gfc_init_builtin_functions): C arrays start at
2159         index zero!
2161 2003-08-30  Paul Brook  <paul@nowt.org>
2163         * f95-lang.c (builtin_function): Remove #if 0 code.
2164         (gfc_define_builtin): New function.
2165         (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
2166         * mathbuiltins.def: New file.
2167         * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
2168         (gfc_intrinsic_map): Use mathbuiltins.def.
2169         (gfc_intrinsic_builtin_t): Remove.
2170         (gfc_build_intrinsic_lib_fndecls): Update.
2171         * trans-types.c (gfc_init_types): Remove redundant initilaization of
2172         signed_size_type_node.
2174 2003-08-29  Paul Brook  <paul@nowt.org>
2176         * arith.c (gfc_real_kinds): Use correct minimum exponents.
2178 2003-08-22  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2180         * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
2181         (gfc_conv_intrinsic_function): Add MODULO.
2183 2003-08-22  Jason Merrill  <jason@redhat.com>
2185         * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
2187 2003-08-22  Andreas Jaeger  <aj@suse.de>
2189         * Make-lang.in (f95.install-common): Add DESTDIR support.
2190         * (f95.install-info): Likewise.
2191         (f95.uninstall): Likewise.
2193 2003-08-19  Diego Novillo  <dnovillo@redhat.com>
2195         * trans-types.c (gfc_init_types): Initialize
2196         signed_size_type_node with size_type_node.
2198 2003-08-18  Paul Brook  <paul@nowt.org>
2200         * dependency.c (gfc_dependency): New enum.
2201         (check_another_array_ref): Remove.
2202         (gfc_get_array_from_component): Remove.
2203         (get_x): Remove.
2204         (get_range): Remove.
2205         (get_no_of_elements): Use mpz_t, not mpf_t.
2206         (transform_sections): New function.
2207         (gfc_check_range_range): Rename ...
2208         (gfc_check_section_vs_section): ... to this.  Use new function.
2209         (gfc_is_inside_range): Rewrite to match.
2210         (gfc_check_element_vs_section): Ditto.
2211         (gfc_check_element_vs_element): Ditto.
2212         (get_deps): Ditto.
2213         (gfc_dep_resolver): Ditto.  Remove unused parameter.
2214         * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
2215         gfc_check_element_vs_element, gfc_is_inside_range,
2216         gfc_get_array_from_component): Remove prototypes for static functions.
2217         (gfc_dep_resolver): Update prototype.
2218         * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
2220 2003-08-15  Paul Brook  <paul@nowt.org>
2222         * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
2223         return values to parent scope.
2224         (gfc_build_dummy_array_decl): Ditto.
2226 2003-08-14  Paul Brook  <paul@nowt.org>
2228         * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
2229         size of the type, not the pointer.
2230         * resolve.c (resolve_symbol): Give more accurate error message.
2232 2003-08-10  Paul Brook  <paul@nowt.org>
2234         * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
2236 2003-08-10  Paul Brook  <paul@nowt.org>
2238         * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
2239         type components.
2241 2003-08-10  Chun Huang  <compiler@sohu.com>
2243         * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
2244         (resolve_symbol): Ditto.
2245         * trans-expr.c (gfc_conv_statement_function): New function.
2246         (gfc_conv_function_expr): Use it.
2248 2003-08-10  Paul Brook  <paul@nowt.org>
2250         * trans-array.c (gfc_conv_ss_startstride): Handle functions.
2251         (walk_function_expr): Set section rank.
2252         * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
2254 2003-08-10  Paul Brook  <paul@nowt.org>
2256         * intrinsic.c (add_sym): Prefix names with correct string.
2257         (add_sym_0s): New function.
2258         (add_subroutines): Register abort.
2260 2003-08-10  Erik Schnetter  <schnetter@uni-tuebingen.de>
2262         * gfortran.h: Introduce options to control the mangling.
2263         * lang.opt: Likewise.
2264         * options.c (gfc_init_options): Handle the options.
2265         * trans-common.c (gfc_sym_mangled_common_id): New function.
2266         (gfc_build_common_decl): Call it.
2267         * trans-decl.c (gfc_sym_mangled_function_id): New function.
2268         (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
2270 2003-08-09  Paul Brook  <paul@nowt.org>
2272         * module.c (mio_symbol): Always ouput a namespace for formal args.
2273         (load_needed): Namespace now belong to their proper symbol.
2274         (gfc_dump_module): Change G95=>GFORTRAN.
2276 2003-08-05  Paul Brook  <paul@nowt.org>
2278         * options.c: Force -fg77-calls.
2280 2003-08-02  Paul Brook  <paul@nowt.org>
2282         * Makelang.in: Rename G95_* to GFORTRAN_*.
2283         * All sources: Rename G95_* to GFC_*.
2285 2003-08-01  Paul Brook  <paul@nowt.org>
2287         * fortran/Make-lang.in: Use GMPLIBS.
2288         * fortran/config-lang.in: Set need_gmp.
2289         * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
2291 2003-07-27  Andreas Jaeger  <aj@suse.de>
2293         * trans-decl.c (gfc_generate_constructors): Convert prototype to
2294         ISO C90.
2295         * trans-const.c (gfc_init_constants): Likewise.
2296         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
2298         * gfortranspec.c: Convert to ISO C90.
2299         (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
2301 2003-07-26  Paul Brook  <paul@nowt.org>
2303         * lang.opt: Add -fdump-parse-tree.
2304         * options.c (gfc_handle_option): Ditto.
2305         * resolve.c (resolve_forall_iterators): Convert to proper type.
2306         * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
2308 2003-07-26  Paul Brook  <paul@nowt.org>
2310         * Makefile.in: Add build dependencies on files common with rest of gcc.
2312 2003-07-26  Lifang Zeng  <zlf605@hotmail.com>
2314         * trans.h: Declare g95_trans_pointer_assignment.
2315         * trans-expr.c (g95_trans_pointer_assignment): New function.
2316         (g95_trans_pointer_assign): Use it.
2317         * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
2318         (g95_trans_pointer_assign_need_temp): New function.
2320 2003-07-26  Paul Brook  <paul@nowt.org>
2322         * gfortran.texi: Replace references to g95.
2324 2003-07-26  Paul Brook  <paul@nowt.org>
2326         Rename g95_* to gfc_*.
2328 2003-07-25  Paul Brook  <paul@nowt.org>
2329         
2330         * gfortran.h: Rename from g95.h.
2331         * trans-types.c (boolean_type_node, booelan_true_node,
2332         boolean_false_node): Remove.
2333         * trans-types.h: Ditto.
2335 2003-07-25  Chun Huang  <compiler@sohu.com>
2337         * parse.c (accept_statement): Implement BLOCK DATA statement.
2338         * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
2339         variables.
2341 2003-07-24  Lifang Zeng  <zlf605@hotmail.com>
2343         * trans-stmt.c (temporary_list): Define.
2344         (g95_trans_assign_need_temp): New function.
2345         (g95_trans_forall_1): Modified for WHERE.
2346         (g95_trans_where_assign): Modified.
2347         (g95_trans_where_2): Modified.
2348         (g95_evaluate_where_mask): Modified.
2349         (g95_trans_where): Modified.
2350         (g95_get_temp_expr): Removed.
2351         (g95_add_to_where_stmt_list): Removed.
2352         (compute_overall_iter_number): Modified for WHERE.
2353         * trans.h: Remove where_stmt_list.
2355 2003-07-24  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2357         * lang.opt: Correct description of options -J and -M.
2359 2003-07-23  Steven Bosscher   <steven@gcc.gnu.org>
2361         * lang.opt: Move help text to here.
2362         * lang-options.h: Remove.
2364 2003-07-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2365         * iresolve.c (g95_resolve_transpose): Proper variable in switch.
2366         * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
2367         on kind.
2369 2003-07-22  Steven Bosscher  <steven@gcc.gnu.org>
2370         Paul Brook  <paul@nowt.org>
2372         * check.c (check_rest): Use global pedantic flag.
2373         * io.c (data_desc): Ditto.
2374         * error.c (g95_warning, g95_warning_now): Use global flag.
2375         * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
2376         (expand_function_body): Update to new prototypes.
2377         (g95_init): Use new option names.
2378         * g95.h (g95_option_t): Standardize names.
2379         (g95_init_options, g95_handle_option): Update prototypes.
2380         * interface.c: Use new option names.
2381         * match.c: Ditto.
2382         * module.c: Ditto.
2383         * parse.c: Ditto.
2384         * primary.c: Ditto.
2385         * resolve.c: Ditto.
2386         * scanner.c: Ditto.
2387         * simplify.c: Ditto.
2388         * symbol.c: Ditto.
2389         * trans-array.c: Ditto.
2390         * trans-expr.c: Ditto.
2391         * trans-types.c: Ditto.
2392         * trans-decl.c: Ditto.
2393         (g95_build_library_function_decl): Remove obsolete VPARAMS.
2394         * trans.h: Ditto.
2395         * options.c (g95_display_help): Remove.
2396         (g95_init_options): Convert to new scheme.
2397         (set_Wall): Ditto
2398         (g95module_option): Ditto, rename from g95_parse_arg.
2399         (g95_handle_module_path_options): New function.
2400         * trans-equivalence.c: Fix error message.
2401         * lang.opt: Corrections.
2403 2003-07-21  Steven Bosscher  <steven@gcc.gnu.org>
2405         * lang.opt: New file.
2407 2003-07-21  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2409         * decl.c (match_attr_spec): Set colon_seen.
2411 2003-07-14  Paul Brook  <paul@nowt.org>
2413         * trans-array.c: Update comment.
2414         (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
2415         * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
2416         minmaxloc,minmaxval): Ditto.
2417         * trans-io.c (g95_trans_transfer): Ditto.
2418         * trans-stmt.c: Remove unneeded prototypes.
2419         (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
2420         (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
2421         (compute_inner_temp_size): Remove bits of dead code. Add comments.
2422         Don't share loopinfo.
2423         (compute_overall_iter_number): Declare as static.
2424         (allocate_temp_for_forall_nest): Ditto.
2425         (g95_trans_forall_1): Don't pass shared loopinfo.
2426         * trans.c (g95_start_block): Expand comment.
2428 2003-07-12  Paul Brook  <paul@nowt.org>
2430         * arith.c (g95_index_integer_kind): Remove unused initializer.
2431         * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
2432         index by size of element.
2433         (generate_loop_for_rhs_to_temp): Ditto.
2434         (allocate_temp_for_forall_nest): Use element size, not index size.
2436 2003-07-11  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2438         * arith.c (g95_index_integer_kind): Add a TODO.
2439         * simplify.c (g95_simplify_nearest): Add a TODO.
2441 2003-07-09  Chun Huang  <compiler@sohu.com>
2443         * trans.h: Add declarations for gfor_fndecl_string_scan and
2444         gfor_fndecl_string_verify.
2445         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2446         * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
2447         (g95_conv_intrinsic_verify): New function.
2448         (g95_conv_intrinsic_function): Add SCAN and VERIFY.
2449         * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
2450         of parameter 'BACK=.TRUE.'
2452 2003-07-05  Lifang Zeng  <zlf605@hotmail.com>
2454         * trans-stmt.c (iter_info, forall_info): Define.
2455         (g95_trans_forall_block): Remove.
2456         (g95_trans_forall_loop): Use forall info blocks.
2457         (g95_trans_nested_forall_loop): New function.
2458         (g95_do_allocate): Handle things other than logical masks.
2459         (generate_loop_for_temp_to_lhs): New function.
2460         (generate_loop_for_rsh_to_temp): New function.
2461         (compute_inner_temp_size): New function.
2462         (compute_overall_iter_number): New function.
2463         (allocate_temp_for_forall_nest): New function.
2464         (g95_trans_forall): Move body ...
2465         (g95_trans_forall_1): ... to here.  Handle loops with temporaries.
2467 2003-07-02  Paul Brook  <paul@nowt.org>
2469         * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
2470         in correct scope.  Change callers to match.
2471         * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
2472         * iresolve.c (g95_resolve_reshape): Only use constant shapes.
2474 2003-07-02  Paul Brook  <paul@nowt.org>
2476         * trans-array.c (g95_conv_loop_setup): Remove dead var.  Use
2477         expression shape for all expressions.
2478         * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
2480 2003-07-03  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2482         * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
2483         g95_parse_arg), intrinsic.c (g95_convert_type): support of
2484         -Wconversion.
2485         * intrinsic.c, g95.h: Add g95_convert_type_warn,
2486         * resolve.c (g95_resolve_index): Call it.
2488 2003-07-02  Paul Brook  <paul@nowt.org>
2490         * iresolve.c (g95_resolve_reshape): Set expression shape.
2491         (g95_resolve_shape): Ditto.
2492         * simplify.c (g95_simplify_shape): Move common code outside condition.
2493         * trans-array.c (g95_conv_array_initializer): Teach it how to count.
2495 2003-07-01  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2497         * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
2498         conformance checks.
2500 2003-06-29  Paul Brook  <paul@nowt.org>
2502         * array.c (g95_simplify_iterator_var): Don't bother with return value.
2503         * expr.c (find_array_element, find_component_ref): New functions.
2504         (remove_subobject_ref): New function.
2505         (simplify_const_ref): Use them.  Rename from simplify_component_ref.
2506         (simplify_ref_chain): New function.
2507         (g95_simplify_expr): Use it.  Simplify parameter variable subobjects.
2508         (g95_specification_expr): Simplify the expression.
2509         * resolve.c (resolve_operator): Check simplifications return code.
2510         (g95_resolve_expr): Ditto.
2512 2003-06-26  Paul Brook  <paul@nowt.org>
2514         * expr.c (simplify_component_ref): New function.
2515         (g95_simplify_expr): Use it.
2516         * resolve.c (resolve_structure_cons): Handle references.
2518 2003-06-25  Paul Brook  <paul@nowt.org>
2520         * trans-io.c (build_dt): Handle internal units.
2522 2003-06-25  Canqun Yang  <canqun@yahoo.com.cn>
2524         * trans-common.c (g95_build_common_decl): Array index range starts at 0.
2525         (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
2526         Use g95_array_index_type instead of integer_type_node.
2527         (g95_build_common_decl, g95_set_common_master_type): Use
2528         g95_character1_type_node instead of char_type_node.
2529         * trans-equivalence.c (g95_layout_local_equiv): As above.
2531 2003-06-24  Steven G. Kargl  <kargls@attbi.com>
2533         * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
2534         remove last remains of -fquiet.
2536 2003-06-22  Paul Brook  <paul@nowt.org>
2538         * resolve.c (resolve_operator): Don't fail if we can't simplify.
2539         (g95_resolve_expr): Ditto.
2540         (resolce_code): Mark as static.
2541         * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
2542         gimplifer doesn't (yet).
2544 2003-06-20  Paul Brook  <paul@nowt.org>
2546         * g95.h: Add ST_PAUSE and EXEC_PAUSE.
2547         * match.c (g95_match_if): Add ST_PAUSE.
2548         (g95_match_stopcode): New function.
2549         (g95_match_pause, g95_match_stop): Use it.
2550         * parse.c (g95_ascii_statement): Handle ST_PAUSE.
2551         (decode_stmt, next_statement, parse_executable): Ditto.
2552         * resolve.c (resolve_code): Ditto.
2553         * st.c (g95_free_statement): Ditto.
2554         * trans-stmt.c (g95_trans_pause): New function.
2555         * trans-stmt.h: Declare it.
2556         * trans.c (g95_trans_code): Use it.
2557         * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
2558         Declare.
2559         (g95_build_builtin_function_decls): Initialize them.
2560         * trans.h: Ditto.
2561         * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
2563 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2565         * io.c (g95_match_open , g95_match_close, g95_match_inquire,
2566         match_filepos): Fix error handling.
2568 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2570         * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
2571         Add assertions on arguments.
2572         * resolve.c (expression_shape): Remove useless &.
2573         * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
2574         g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
2575         g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
2576         g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
2577         g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
2578         g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
2579         (g95_simplify_not, g95_simplify_scale): Add assertions.
2581 2003-06-15  Paul Brook  <paul@nowt.org>
2583         Clean up stuff to work with the ssa optimizers.
2584         * convert.c (convert): Handle BOOLEAN_TYPEs.
2585         * f95-lang.c (g95_truthvalue_conversion): Implement.
2586         * trans-array.c (g95_trans_array_constructor_value): Group multiple
2587         scalar values.
2588         * trans.h (g95_truthvalue_conversion): Declare.
2589         * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
2590         * trans-stmt.c (g95_trans_character_select): Don't create array
2591         assignments.  Mark labels as indirect jump targets.
2592         * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
2593         (g95_get_dtype_cst): Handle LOGICAL types.
2595 2003-06-14  Paul Brook  <paul@nowt.org>
2597         * f95-lang.c (g95_gimplify_expr): New function.
2598         * trans-array.c (g95_trans_array_constructor_value): Don't create
2599         array assignments.
2600         (g95_conv_expr_descriptor): Rename simple->gimple.
2601         * trans-expr.c (conv_expr_op): Use proper logical operators.
2602         * trans-intrinsic.c (build_fixbound_expr): New function.
2603         (build_fix_expr): Ditto.
2604         (g95_conv_intinsic_aint): Use them. Use builtin functions.
2605         (g95_conv_intrinsic_function): Add FLOOR and CEILING.
2607 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2609         * array.c (g95_compare_array_spec): Remove unreachable code.
2610         * expr.c (g95_copy_expr): Likewise.
2611         * intrinsic.c (g95_convert_type): Likewise.
2612         * misc.c (g95_code2string): Likewise.
2613         * simplify.c (g95_simplify_ishft, g95_simplify_real,
2614         g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
2615         * trans-stmt.c (g95_trans_select): Likewise.
2616         * primary.c (extend_ref): Add an assertion.
2617         * simplify.c (g95_convert_constant): Add const.
2618         * intrinsic.h: Remove g95_check_x_ni.
2619         * f95-lang.c (g95_finish): Call g95_release_include_path.
2621 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2623         * resolve.c (resolve_contained_functions): Fix typo introduced on
2624         2003-01-13.
2626 2003-06-09  Paul Brook  <paul@nowt.org>
2628         * g95.h: Include system.h not hwint.h.
2629         * many: use safe-ctype.h not ctype.h.  Change isalpha -> ISALPHA, etc.
2630         * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
2632 2003-06-09  Paul Brook  <paul@nowt.org>
2634         * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
2635         * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
2636         * trans-decl.c (g95_add_decl_to_functions): Make non-static.
2637         (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
2638         (g95_generate_function_code): Translate COMMON and EQUIVALENCE
2639         objects.
2640         * trans.h (g95_trans_equivalence, g95_trans_common,
2641         g95_add_decl_to_function): Declare.
2642         * trans-common.c, trans-equivalence.c: New files.
2644 2003-06-08  Steven Bosscher  <steven@gcc.gnu.org>
2646         * intrinsic.c (g95_intrinsic_extension): Remove.
2647         (add_functions): Substitute g95_check_x for g95_check_x_ni
2648         everywhere.
2649         (g95_init_expr_extensions): New function.
2650         (g95_intrinsic_func_interface): Use it.
2651         * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
2652         * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
2653         g95_check_precision, g95_check_present, g95_check_radix,
2654         g95_check_range, g95_check_selected_real_kind): Do not set
2655         g95_intrinsic_extension.
2656         (g95_check_x_ni): Remove now duplicate of g95_check_x.
2658         * expr.c (check_inquiry): Add FIXME, fixup some code style.
2660 2003-06-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2662         * g95.h (ref_type): Name this type explicitly.
2663         * module.c (MIO_NAME): Add specialisations of mio_name.
2664         (mio_symbol_attribute, mio_typespec, mio_array_ref,
2665         mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
2666         (ab_attribute): Name this type explicitly.
2667         (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
2669 2003-06-05  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2671         * trans-intrinsic.c (g95_conv_allocated): New function.
2672         (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
2674 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
2676         * f95-lang.c: Don't include g95-support.h
2677         (g95_mark_addressable): Add prototype.
2678         (g95_init_decl_processing): Remove C front end hack.
2679         * f95-tree.c: Remove file.
2680         * support.c: Remove file.
2681         * g95-support.h: Remove file.
2682         * trans-types.c (g95_init_types): Set up boolean
2683         type related tree nodes.
2684         * Make-lang.in: Remove rules for dead files and
2685         dependencies on them.
2687 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
2689         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
2690         C front end dependency.  Also, convert.c does not depend on
2691         g95-support.h anymore.
2692         * convert.c: Don't include c-common.h and g95-support.h
2693         * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
2694         (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
2695         stmts_are_full_exprs_p, current_stmt_tree,
2696         current_scope_stmt_stack): Remove.
2697         * g95-support.h (unsigned_conversion_warning): Kill proto.
2698         (boolean_type_node, boolean_true_node, boolean_false_node):
2699         Don't define here.  Instead, make then true tree nodes in
2700         trans-types.
2701         * support.c (c_global_trees): Die, C front end, die!!!
2702         (g95_init_c_decl_hacks): Don't touch intmax_type_node,
2703         uintmax_type_node, string_type_node and const_string_type_node.
2704         (decl_constant_value, overflow_warning): Make static functions.
2705         They are in death row too, though.
2706         (default_conversion, c_expand_asm_operands): Remove.
2707         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
2708         trans.c: Don't include c-common.h.
2709         * trans-types.c (boolean_type_node, boolean_true_node,
2710         boolean_false_node): Make them real tree nodes.
2711         * trans-types.h (intmax_type_node, string_type_node,
2712         const_string_type_node): Hack to work around C dependencies
2713         in builtin-types.def.
2715 2003-06-04  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2717         * decl.c (decl_types): Add some iterators-like sentinels.
2718         * decl.c (match_attr_spec): Use them.
2719         Use "decl_types" instead of "int".
2720         Add cast in call to g95_match_strings.
2721         * dump-parse-tree.c (g95_show_namespace):  Use "g95_intrinsic_op"
2722         instead of "int".
2723         * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
2724         (g95_interface_info): Use "g95_intrinsic_op".
2725         * dump-parse-tree.c (g95_show_namespace): Use them.
2726         * interface.c (g95_check_interfaces): Use them.
2727         * module.c (read_module, write_module): Use them.
2728         * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
2729         Use "g95_intrinsic_op".
2730         * interface.c (check_operator_interface): Use "g95_intrinsic_op".
2731         Add a default case in switch statement.
2732         * intrinsic.h (g95_generic_isym_id): Moved to...
2733         * g95.h (g95_generic_isym_id): here.
2734         (g95_intrinsic_sym): Use "g95_generic_isym_id".
2735         * intrinsic.c (make_generic): Use "g95_generice_isym_id".
2736         * trans-intrinsic.c (g95_intrinsic_map_t,
2737          g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
2738         * match.c (g95_match_intrinsic_op): Add cast in call to
2739         g95_match_strings.
2741 2003-06-03  Steven Bosscher  <steven@gcc.gnu.org>
2743         * support.c (skip_evaluation, warn_conversion, lvalue_p,
2744         lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
2745         constant_fits_type_p, convert_and_check,
2746         unsigned_conversion_warning): Remove these ugly remnants
2747         we inherited from the C front end.
2748         (function_types_compatible): Remove '#if 0'-edcode.
2749         (build_modify_expr): Likewise.
2750         (convert_for_assignment): Don't use the deceased functions.
2751         The parameter fundecl is now unused.
2752         (decl_constant_value): Always just return decl.  In fact
2753         this function is not used at present, but it might be in
2754         the future, when we start using the tree inliner.
2755         (overflow_warning, default_conversion, c_expand_asm_operands):
2756         Abort when these are called, they are part of the C type
2757         checking implementation and therefore poison to Fortran.
2759 2003-06-04  Steven Bosscher  <steven@gcc.gnu.org>
2761         * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
2762         c-pretty-print.o and c-dump.o.  Add a comment on why we
2763         depend on c-semantics.c.
2764         * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
2765         Don't use the C front end tree dumper hook to dump the
2766         language specific tree representation -- we don't have
2767         one.  So instead, inherit the default langhook.
2769 2003-06-02  Paul Brook  <paul@nowt.org>
2771         * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
2773 2003-06-02  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2775         * check.c (g95_check_associated): Use proper types.  Remove
2776         extraneous argument in call to g95_error().
2778 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2780         * resolve.c (resolve_operator): Make logical operands convert to the
2781         type with higher kind.
2783 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2785         * check.c (g95_check_associated): Make sure both pointer and target has
2786         the same type and rank. Null pointer or array section with vector
2787         subscript as target are not allowed.
2788         * trans.h: Declare gfor_fndecl_associated.
2789         * trans-decl.c: (g95_build_builtin_function_decls): Initialize
2790         gfor_fndecl_associated.
2791         * trans-intrinsic.c (g95_conv_associated): New function.
2792         (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
2794 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2796         * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
2797         according to POINTER itself rather than TARGET.
2798         (g95_conv_expr_descriptor): Make lbound start at 1.
2799         * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
2801 2003-06-01  Paul Brook  <paul@nowt.org>
2803         * expr.c (g95_type_convert_binary): Make it match the standard.
2804         * g95.texi: Remove dead link.
2806 2003-06-01  Steven Bosscher  <steven@gcc.gnu.org>
2808         * g95.texi: Cleanup somewhat in preparation for inclusion
2809         in GCC CVS.
2811 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2812             Canqun Yang  <canqun@yahoo.com.cn>
2814         * resolve.c (compare_bound_int, resolve_where_shape): Proper return
2815         type.
2816         (g95_find_forall_index): Return proper value.
2817         (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
2818         compare the return value from g95_find_forall_index.
2820 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2821         * g95.h, io.c (g95_st_label): Remove "length".
2822         (g95_symtree): Remove "link".
2823         (g95_case): Remove "code".
2824         * arith.c, arith.h (g95_compare_string, g95_convert_integer,
2825         g95_convert_real): Make an argument pointer to const.
2826         * decl.c (colon_seen): Add a TODO.
2827         * interface.c (g95_compare_types): Fix typo.
2828         * interface.c (compare_interfaces): Preserve value of "p".
2829         * intrinsic.c (sort_actual): Remove "i".
2830         * match.c (g95_match_assign): Proper type in call to g95_match().
2831         * parse.c (next_free): Avoid duplicate call due to macro.
2832         * parse.c (check_statement_label): wrong type in call to g95_error.
2833         * primary.c (match_real_constant): Add a TODO.
2834         * resolve.c (resolve_select):  Remove useless conditional.
2835         * simplify.c (g95_simplify_repeat): Proper assignment to
2836         "value.character.string".
2837         * simplify.c (g95_simplify_reshape): Wrong variable in call to
2838         g95_error.
2840 2003-05-20  Canqun Yang  <canqun@yahoo.com.cn>
2842         * trans-stmt.c: Remove unnecessary include file defaults.h.
2844 2003-05-19  Lifang Zeng  <zlf605@hotmail.com>
2846         * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
2847         stride.
2848         (g95_trans_forall): Allow arbitrary number of FORALL indexes and
2849         actual variables used as FORALL indexes.
2851 2003-05-15  Paul Brook  <paul@nowt.org>
2853         * trans-array.c (g95_trans_static_array_pointer): Use
2854         null_pointer_node.
2855         (g95_trans_deferred_array): Initialize static array pointers.
2856         * trans-expr.c (g95_conv_function_call): Use formal arglist to
2857         correctly pass POINTER and absent CHARACTER arguments.
2859 2003-05-14  Lifang Zeng  <zlf605@hotmail.com>
2861         * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
2862         (g95_resolve_forall_body): Resolve FORALL body.
2863         (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
2864         (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
2865         (g95_find_forall_index): Check whether the FORALL index appears in
2866         the expression or not.
2867         (resolve_code): Modified.
2869 2003-05-14  Paul Brook  <paul@nowt.org>
2871         * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
2873 2003-05-13  Paul Brook  <paul@nowt.org>
2875         * trans-types.c (g95_max_array_element_size): Now a tree node.
2876         (g95_init_types): Work out max size properly.
2877         (g95_get_dtype_cst): Modify to match.
2879 2003-05-11  Paul Brook  <paul@nowt.org>
2881         * trans-io.c (add_case): Create a label decl for case labels.
2883 2003-05-11  Paul Brook  <paul@nowt.org>
2885         * arith.c (g95_integer_index_kind): New variable.
2886         * f95-lang.c (g95_init): Move frontend initialization here ...
2887         (g95_post_options): ... from here.
2888         * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
2889         * intrinsic.c (add_functions): Use index kinds.
2890         * iresolve.c: Convert to index_kind where needed.
2891         * resolve.c (g95_resolve_index): Make public, use index_kind.
2892         (resolve_array_ref): Adjust to match.
2893         * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
2894         * trans-stmt.c: Ditto.
2895         * trans-types.c: Ditto.
2896         * trans-types.h (g95_array_index_kind): Remove declaration.
2897         * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
2899 2003-05-07  Paul Brook  <paul@nowt.org>
2901         * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
2902         * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
2903         of bound indices.
2905 2003-05-07  Paul Brook  <paul@nowt.org>
2907         * trans-array.c (trans_static_array_pointer,
2908         g95_trans_array_constructor_value, g95_conv_array_initializer,
2909         g95_conv_structure): CONSTRUCTOR nodes only have one operand.
2910         (g95_add_loop_ss_code): Convert subscripts to the correct type.
2911         * trans-stmt.c (g95_trans_character_select): Ditto.
2912         * trans-types.c (g95_init_types): Ditto.
2914 2003-05-07  Steven Bosscher  <steven@gcc.gnu.org>
2916         * f95-lang.c (expand_function_body): Use input_line, not lineno.
2917         * trans-decl.c (g95_generate_function_code,
2918         g95_generate_constructors): Likewise.
2919         * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
2920         g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
2921         Likewise.
2923 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2924         * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
2925         with components point to the DERIVED type itself, and two DERIVED
2926         type with components point to each other.
2927         * trans-expr.c (g95_conv_componet_ref): Modified
2929 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2930         * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
2931         null_pointer_node.
2932         (g95_trans_pointer_assign): Implement Nullify.
2934 2003-05-01  Paul Brook  <paul@nowt.org>
2936         * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
2937         * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
2939 2003-05-01  Paul Brook  <paul@nowr.org>
2941         * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
2942         trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
2943         IS_EMPTY_STMT.
2945 2003-05-01  Canqun Yang  <canqun@yahoo.com.cn>
2947         * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
2948         CASE_LABEL_EXPR.
2950 2003-04-28  Paul Brook  <paul@nowt.org>
2952         * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
2953         as their kind suggests.
2954         (g95_resolve_reshape): Ditto.
2956 2003-04-28  Chun Huang  <compiler@sohu.com>
2958         * trans-expr.c (g95_conv_substring_expr): New function.
2959         (g95_conv_expr): Use it.
2961 2003-04-28  Paul Brook  <paul@nowt.org>
2963         * iresolve.c (g95_resolve_transpose): Make it match the
2964         implementation.
2965         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
2967 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
2969         * trans-types.c (g95_add_field_to_struct): New function to
2970         add a field to a UNION_TYPE or RECORD_TYPE.
2971         * trans-types.h (g95_add_field_to_struct): Prototype.
2972         (g95_get_derived_type): Use g95_add_field_to_struct to add
2973         components.
2974         * trans-io.c (g95_add_field): Remove.
2975         (ADD_FIELD): Use new g95_add_field_to_struct function.
2976         (ADD_STRING): Likewise.
2977         * trans-stmt.c (g95_trans_select): Likewise.
2978         (g95_add_field): Remove duplicated function.
2980 2003-04-18  Canqun Yang  <canqun@yahoo.com.cn>
2982         Port implementation for CHARACTER SELECT from Andy's tree.
2983         * trans-stmt.c (g95_trans_character_select): Implement character
2984         select. (g95_add_field): New function.
2985         * trans-decl.c: Declare 'gfor_gndecl_select_string'.
2986         (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
2987         * g95.h (struct g95_case): Add field 'int n'.
2988         * trans.h: Declare 'gfor_fndecl_select_string'.
2990 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
2992         * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
2993         (g95_insert_bbd): Die on duplicates.
2994         * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
2996 2003-04-14  Steven Bosscher  <steven@gcc.gnu.org>
2998         * g95.texi: Require GMP 4.0 -- like we actually
2999         do.  Explain the testsuite and what-goes-where.
3000         Don't use undefined texinfo symbol.  Break very
3001         long line.  Remove finished item from the list
3002         of open projects.
3004 2003-04-11  Canqun Yang  <canqun@yahoo.com.cn>
3006         * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
3007         LOGICAL type.
3009 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
3011         * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
3012         (g95_trans_forall_body): New function.
3014 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
3016         * resolve.c (resove_where): New function.
3017         (resolve_where_shape): New function.
3018         (resolve_code): Add call to 'resolve_where'
3019         * trans-stmt.c (g95_trans_where): Modified.
3020         (g95_trans_where_2): New function.
3021         (g95_trans_where_assign): New function.
3022         (g95_evaluate_where_mask): New function.
3023         (g95_add_to_stmt_list): New function.
3024         (g95_get_temp_expr): New function.
3025         * trans.h (where_stmt_list): New structure.
3027 2003-04-10  Paul Brook  <paul@nowt.org>
3029         * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
3030         (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
3032 2003-04-10  Steven Bosscher  <steven@gcc.gnu.org>
3034         Update after mainline -> tree-ssa-branch merge.
3035         * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
3036         call.
3037         (g95_init): Update for new lang_hooks definition.
3038         (g95_post_options): New langhook.
3039         (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
3040         * scanner.c (g95_new_file): Comment update.
3042 2003-04-09  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3044         * g95.h, lang-options.h: Add -Wimplicit-interface.
3045         * options.c (g95_init_options, g95_parse_arg): Set it.
3046         * interface.c (check_intents): Warn about call with implicit
3047         interface.
3048         * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
3049         g95_procedure_use.
3051 2003-04-05  Paul Brook  <paul@nowt.org>
3053         * iresolve.c (g95_resolve_spread): Don't resole based on type.
3054         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
3056 2003-03-29  Paul Brook  <paul@nowt.org>
3058         * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
3059         (g95_resolve_unpack): Ditto.
3060         * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
3061         (g95_conv_intrinsic_function): Use it.  Remove PACK and UNPACK.
3062         (g95_is_intrinsic_libcall): Add PACK and UNPACK.
3064 2003-03-25  Paul Brook  <paul@nowt.org>
3066         * arith.c (g95_unary_user, g95_user): Remove dead functions.
3067         * arith.h: Ditto.
3068         * array.c (g95_free_array_ref): Ditto.
3069         * g95.h: Ditto.
3070         * symbol.c (g95_use_derived_tree): Ditto.
3071         * intrinsic.c (add_functions): Use simplification for SCALE.
3072         * primary.c (g95_match_rvalue): Test sym, not symtree.
3074 2003-03-25  Paul Brook  <paul@nowt.org>
3076         * trans-decl.c (build_function_decl): Add parameter before it gets
3077         turned into a constant.
3078         * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
3079         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
3080         * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
3082 2003-03-22  Paul Brook  <paul@nowt.org>
3084         * trans-array.c (g95_conv_array_initializer): Allow scalar
3085         expressions.
3086         * trans-decl.c (g95_finish_var_decl): Result variables are not
3087         module variables.
3088         * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
3089         (g95_conv_intrinsic_function): Use it.
3090         * trans-types.h (g95_type_spec): Remove dead declaration.
3092 2003-03-21  Paul Brook  <paul@nowt.org>
3094         * trans-decl.c (g95_build_function_decl): Mark string parameters.
3096 2003-03-20  Paul Brook  <paul@nowt.org>
3098         * trans-decl.c (g95_build_function_decl): Put character length
3099         parameters at the end of the function declaration.
3100         * trans-expr.c (g95_conv_function_call): Ditto.
3101         * trans-types.c (g95_get_function_type): Ditto.
3103 2003-03-20  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3105         * resolve.c (resolve_formal_arglist): Don't impose intent for
3106         procedure arguments of pure functions.
3107         (resolve_select): Remove redundant assignment.
3109 2003-03-19  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3111         * arith.c (validate_logical), g95.h, options.c (g95_init_options):
3112         Remove option l1.
3113         * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
3114         * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
3115         const.
3116         * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
3117         Order list.
3118         * symbol.c (g95_add_type): Fix typo in comment.
3121 2003-03-16  Paul Brook  <paul@nowt.org>
3123         * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
3124         * expr.c (g95_build_call): Remove.
3125         * f95-lang.c (puchdecl_top_level): New function.
3126         * g95.h (g95_code): Store resolved symbol, not just the name.
3127         * intrinsic.c (g95_intrinsic_namespace): New global namespace.
3128         (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
3129         (g95_get_intrinsic_sub_symbol): New function.
3130         * iresolve.c (g95_resolve_cpu_time): Use it.
3131         (g95_resolve_random_number): Ditto.
3132         * resolve.c: Set code->resolved_sym instead of code->sub_name.
3133         * trans-decl.c (g95_get_extern_function_decl): Give external decls
3134         the correct DECL_CONTEXT.  Add global symbold to the global scope.
3135         * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
3136         fixed.
3138 2003-03-16  Paul Brook  <paul@nowt.org>
3140         * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
3141         * options.c (g95_parse_arg): Ditto.
3142         * module.c (mio_symbol_attribute): Handle the always_explicit bit.
3143         * resolve.c (resolve_formal_arglist): The always_explicit sould be set
3144         for the procedure, not the parameter.
3145         * trans-array.c (g95_trans_g77_array): New function.
3146         (g95_trans_assumed_size): Use it.
3147         (g95_trans_dummy_array_bias): Ditto.
3148         (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
3149         (g95_conv_expr_descriptor): ... to here.  Update callers.
3150         * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
3151         (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
3152         * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
3153         * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
3154         * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
3155         (g95_sym_type): Ditto.
3157 2003-03-15  Paul Brook  <paul@nowt.org>
3159         * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
3160         first chain.
3161         * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
3163 2003-03-14  Paul Brook  <paul@nowt.org>
3165         * trans-array.c (g95_array_is_packed): Remove.
3166         (g95_conv_array_base): Correctly handle all descriptorless cases.
3167         (g95_conv_array_stride): Use descriptorless strides.
3168         (g95_trans_dummy_array_bias): Don't always repack the array.
3169         (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
3170         packed.
3171         * trans-types.c (g95_get_nodesc_array_type): Differentiate between
3172         dummy and non-dummy arrays...
3173         (g95_sym_type, g95_get_derived_type): ... like these.
3174         (g95_get_array_type_bounds): Allow discontiguous arrays.
3176 2003-03-12  Paul Brook  <paul@nowt.org>
3178         * array.c (g95_resolve_array_spec): Fix comment.
3179         * g95.h (symbol_attributes): New flag always_explicit.
3180         * resolve.c (resolve_formal_arglist): Set it always_explicit.
3181         * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
3182         * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
3183         (g95_trans_array_bounds): Allow assumed shape arrays.
3184         (g95_trans_repack_array): Remove.
3185         (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
3186         * trans-decl.c (g95_build_qualified_array): Only ignore absent
3187         bounds for assumed size arrays.
3188         (g95_build_dummy_array_decl): Use descriptorless arrays.
3189         * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
3190         (g95_trans_pointer_assign): Fix typo.
3191         * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
3192         code.
3193         (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
3194         * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
3195         Also modify callers.
3196         * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
3198 2003-03-08  Paul Brook  <paul@nowt.org>
3200         * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
3201         (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
3202         * resolve.c (compare_spec_to_ref): Allow full array sections.
3204 2003-03-08  Paul Brook  <paul@nowt.org>
3206         * expr.c (g95_simplify_expr): Also simplify array index and
3207         substring expressions.
3208         * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
3209         * trans-array.c (g95_trans_array_bounds): New function.
3210         (g95_trans_auto_array_allocation): Use it.
3211         (g95_trans_assumed_size): Rewrite.
3212         * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
3213         (gfor_fndecl_repack): Remove.
3214         (g95_build_qualified_array): Handle absent upper bounds.
3215         (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
3216         (g95_get_symbol_decl): Update.
3217         (g95_build_intrinsic_function_decls): Initialize new decls.
3218         * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
3219         (gfor_fndecl_repack): Remove.
3220         * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
3221         * trans-types.c: (g95_build_array_type): Merge duplicated code..
3222         (g95_get_nodesc_array_type): Handle absent bounds.
3223         * trans-types.h (g95_get_nodesc_array_type): Declare.
3225 2003-03-04  Paul Brook  <paul@nowt.org>
3227         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
3228         builtin-types.def.
3230 2003-03-02  Paul Brook  <paul@nowt.org>
3232         * options.c (g95_init_options): Drfault to 1.
3233         (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
3234         * trans-array.c (g95_conv_array_data, g95_conv_array_base,
3235         g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
3236         Handle non-constant size automatic arrays.
3237         (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
3238         generic bound functions.
3239         (g95_trans_auto_array_allocation): Don't create a descriptor.
3240         (g95_trans_assumed_size): New function (broken).
3241         (g95_trans_dummy_array_bias): Remove unused var.
3242         * trans-array.h (g95_trans_assumed_size): Declare.
3243         * trans-decl.c (create_index_var): New fuction.
3244         (g95_build_qualified_array): New function.
3245         (g95_get_symbol_decl): Use it.
3246         (g95_trans_deferred_vars): Handle assumed shape seperately.
3247         * trans-types.c (get_element_type): Handle heap allocated arrays.
3248         (g95_is_nodesc_array): Include non-const size arrays.
3249         (g95_get_nodesc_array_type): Ditto.
3251 2003-02-23  Paul Brook  <paul@nowt.org>
3253         * trans-array.c (g95_array_init_size): Should use stride, not size of
3254         last dimension.
3256 2003-02-18  Paul Brook  <paul@nowt.org>
3258         * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
3259         after intrinsic function check.
3261 2003-02-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3263         * io.c (match_io): Fix missing return value and remove useless
3264         assignment.
3265         * match.c (g95_match): Remove useless assignment.
3266         * module.c (parse_string):  Remove useless post increment.
3267         * simplify.c (g95_simplify_verify): Remove useless assignment.
3269 2003-02-15  Paul Brook  <paul@nowt.org>
3271         * expr.c (restricted_intrinsic): Handle bad values gracefully.
3272         * g95.h (symbol_attribute): Add referenced member.
3273         (g95_symbol): Add dummy_order member.
3274         (g95_set_sym_referenced): Declare.
3275         * match.c (g95_match_assignment, g95_match_call): Use it
3276         * primary.c (match_actual_arg, g95_match_rvalue,
3277         g95_match_variable): Ditto.
3278         * symbol.c (next_dummy_order): New variable.
3279         (g95_set_sym_referenced): New function.
3280         (check_done): New function.
3281         (g95_add_*): Use it.
3282         * trans-decl.c: Make formatting conform to GCC standards.
3283         (g95_defer_symbol_init): Add dummy variables in the right order.
3284         (g95_get_symbol_decl): Only accept referenced variables.
3285         (g95_create_module_variable): Module variables are always required.
3286         (generatr_local_decls): New function.
3287         (generate_local_vars): New function.
3288         (g95_generate_function_code): Use it.
3290 2003-02-13  Paul Brook  <paul@nowt.org>
3292         * trans-decl.c (g95_conv_struct_cons): Remove.
3293         (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
3294         * trans-expr.c (g95_conv_structure): New function.
3295         (g95_conv_expr): Use it.
3297 2003-02-09  Paul Brook  <paul@nowt.org>
3299         * trans-array.c (g95_array_init_size): Don't evaluate the linit
3300         expressions multiple times.
3301         (g95_trans_auto_arry_allocation): Use pointer not tmp.
3303 2003-02-08  Paul Brook  <paul@nowt.org>
3305         * module.c (mio_symtree_ref): Declare as static.
3306         (mio_expr): Remove dead code.
3307         (read_module): Set the symtree link for fixups.
3308         * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
3309         (build_round_expr): ... to this.
3310         (g95_conv_intrinsic_aint): New function.
3311         (g95_conv_intrinsic_function): Use it.
3313 2003-02-08  Paul Brook  <paul@nowt.org>
3315         * trans-array.c (g95_trans_array_constructor_value): Use the acutal
3316         offset after modificaton, not the increment expression.
3317         * dependency.c: Kill excess whitespace.
3319 2003-02-07  Sanjiv Gupta  <sanjivg@noida.hcltech.com>
3321         * dependency.h: Remove some function declarations.
3322         * dependency.c (get_no_of_elements): Change this function not to
3323         return int.
3324         * other: Add comments for all modified functions.
3326 2003-02-06  Paul Brook  <paul@nowt.org>
3328         * g95spec.c (lang_specific_functions): Fix initializer warning.
3329         * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
3330         for structure type names.
3331         * trans-decl.c (g95_cons_structure_cons): New function.
3332         (g95_get_symbol_decl): Use it.
3333         * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
3334         referencing code.
3336 2003-02-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3338         * resolve.c (compare_cases): Add const to casts.
3340 2003-01-30  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3342         * g95.h (g95_check_f): Change a1 to f1m.
3343         * intrinsic.c (add_sym_1m, check_specific,
3344         g95_intrinsic_func_interface): Use it.
3346         * module.c (init_pi_tree): Remove useless cast.
3347         (fp2): Fix argument type.
3349         * parse.c (parse_select_block): Add comment.
3351 2003-02-05  Toon Moene  <toon@moene.indiv.nluug.nl>
3353         * lang-options.h: Fix warning involving C90 concatenated
3354         strings.
3356 2003-02-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3357             Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3359         * io.c (format_asterisk): Complete initializer to kill warning.
3360         * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
3361         DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
3362         (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
3363         new defines to complete initializers.  Kills all warnings.
3365         * Make-lang.in: Comment cleanup.
3367 2003-02-05  Paul Brook  <paul@nowt.org>
3369         * array.c (g95_free_constructor): Handle NULL expressions.
3370         * resolve.c (resolve_structure_cons): Ditto.
3371         * decl.c (g95_match_null): New Function.
3372         (variable_decl): Use it.
3373         * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
3374         * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
3375         * trans-types.c (g95_set_decl_attributes): Remove empty function.
3377 2003-02-05  Paul Brook  <paul@nowt.org>
3379         * trans.h (build1_v): New macro.
3380         (build_v): Remove pointless and incorrect prototype.
3381         * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
3382         * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
3384 2003-02-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3386         * Make-lang.in (F95_OBJS): Remove one more dead file.
3388 2003-02-01  Paul Brook  <paul@nowt.org>
3390         * lang-specs.h: Don't pass -ffixed-form to the linker.
3391         * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
3393 2003-02-01  Paul Brook  <paul@nowt.org>
3395         * Make-lang.in (F95_OBJS): Remove dead files.
3396         * trans-array.c (g95_array_init_size): Do the right thing when
3397         ubound=NULL.
3398         * trans-decl.c (g95_generate_function_code): Initialize deffered
3399         symbol list before translating contained subroutines.
3400         * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
3401         scalar invariant values here...
3402         (g95_conv_variable, g95_conv_function_call): ... instead of here ...
3403         * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
3405 2003-01-29  Paul Brook  <paul@nowt.org>
3407         * trans-array.c (g95_add_loop_code): Put pre code in the right block.
3408         (g95_walk_elemental_function_args): Reverse chains before adding.
3409         (g95_reverse_ss): Move about a bit.
3410         * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
3411         function arguments.
3413 2003-01-28  Paul Brook  <paul@nowt.org>
3415         * intrinsic.c (resolve_intrinsic): Use correct union member.
3416         * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
3417         parameters.
3418         * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
3419         use associated variables.
3420         * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
3421         * trans-expr.c (g95_conv_expr_present): ... to here.
3422         * trans.h: Declare it.
3423         * trans-types.c (g95_sym_type): Assume subroutine if not specified.
3425 2003-01-28  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3427         * array.c (expand_iterator): Suppress useless assignment.
3428         * decl.c (match_char_spec): Ditto.
3429         * io.c (match_io_iterator): Ditto.
3430         * primary.c (match_real_constant): Ditto.
3431         * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
3432         Ditto.  Also, use g95_intrinsic_op not int for intrinsic operators.
3433         * matchexp.c (match_add_operand, match_level_5): Likewise.
3434         * module.c (parse_atom, find_enum): Likewise.
3435         * resolve.c: move #include <string.h>
3436         (resolve_select): Fix serious typo.
3438 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.n>
3440         * Make-lang.in: Don't build with broken tree-ssa-pre.
3442 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3444         * resolve.c (resolve_index): Add a TODO.
3445         * symbol.c: Remove useless "#include <ctype.h>".
3447 2003-01-27  Paul Brook  <paul@nowt.org>
3449         * check.c (check_rest): Allow different type kinds as an extension.
3450         * g95.h (g95_resolve_f): Add f1m.
3451         * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
3452         * intrinsic.h: Chenge prototypes for MIN and MAX.
3453         * iresolve.c (g95_resolve_minmax): New function.
3454         (g95_resolve_min, g95_resolve_max): Use it.
3455         * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
3456         arguments once.
3457         (g95_conv_intrinsic_present): Fix logic.
3459 2003-01-27  Steven Bossche  <s.bosscher@student.tudelft.nl>
3461         * g95.h (g95_case): Don't be a tree, be a double linked list.
3462         * match.c (match_case_selector): Remove redundant semantics check.
3463         Clean up a few goto's to make it a tiny little bit faster.
3464         * resolve.c (case_tree): Die.
3465         (compare_cases): Accept and compare unbounded cases too.
3466         (check_case_overlap): Don't build a tree.  Instead, merge-sort the
3467         whole list of g95_cases passed from resolve_select.
3468         (sane_logical_select): Die.
3469         (check_case_expr): Return FAILURE if a CASE label is of the wrong
3470         type kind.
3471         (resolve_select): Fixup case expression for computed GOTOs, put it
3472         in expr, not expr2, for easier handing in the parse tree dumper and
3473         the code generator.  Rewrite the rest of the function: Kill
3474         unreachable case labels and unreachable case blocks.
3475         * dump-parse-tree.c (g95_show_code_node): Always dump expr for
3476         an EXEC_SELECT, not case2 anymore.
3477         * trans-const.c (g95_conv_constant_to_tree): New function.
3478         (g95_conv_constant): Use it.
3479         * trans-const.h: Declare prototype for the new function.
3480         * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
3481         g95_trans_character_select): New static functions.
3482         (g95_trans_select): Rewrite.
3484 2003-01-26  Paul Brook  <paul@nowt.org>
3486         * intrinsic.c (add_fnctions): Properly add dreal.
3487         * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
3488         (g95_conv_intrinsic_function): Use it.
3489         * trans-io.c (build_dt): Abort on internal files (unimplemented).
3491 2003-01-26  Paul Brook  <paul@nowt.org>
3493         Widespread changes to the handling of symbols in expressions.  These
3494         are now linked via g95_symtree nodes.
3495         * parse.c (g95_fixup_sibling symbols): New function.
3496         (parse_contained): Use it.
3497         * g95.h (symbol_attribute): Add contained.  Indicates a symbol is a
3498         contained procedure that has bee correctly fixed up.
3499         (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
3501 2003-01-24  Paul Brook  <paul@nowt.org>
3503         * trans-array.c (g95_walk_expr): Function result attributes are in
3504         sym->result.
3505         * trans-expr.c (g95_conv_function_call,
3506         g95_trans_arrayfunc_assign): Ditto.
3507         * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
3509 2003-01-23  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3511         * expr.c (check_restricted): Fix error message.
3512         * symbol.c (free_st_labels): Plug memleak.
3514 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3516         * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
3517         reduce_binary_aa, reduce_binary, eval_intrinsic,
3518         eval_intrinsic_f2): Use typesafe prototypes for eval functions.
3519         * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
3520         for typesafe intrinsics helper functions.
3521         (g95_intrinsic_sym): Use them.
3522         * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
3523         add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
3524         add_sym_5, add_conv, resolve_intrinsic, do_simplify,
3525         check_specific, g95_intrinsic_func_interface,
3526         g95_intrinsic_sub_interface): Adjust all calls to intrinsics
3527         helper functions.
3528         * trans-decl.c (g95_get_extern_function_decl): Likewise.
3529         * Make-lang.in: Don't disable warnings for strict prototypes
3530         any longer, everything is typesafe now.
3532 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3534         * bbt.c (duplicate_node): Make static.
3535         * module.c (module_name): Make static.
3536         * scanner.c (include_dirs): Make static.
3538 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3540         Hard coded _gfor_'s should not show up anymore.
3541         * g95.h (PREFIX): New macro.
3542         * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
3543         hard-coded "_gfor".
3544         (g95_resolve_random_number): Likewise.
3545         * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
3546         * trans-io.c: Remove 'prefix' macro.  Replace all uses with
3547         the new PREFIX macro from g95.h.
3549 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3551         The troubles of forking... Andy implemented this just now too.
3552         Let's stick to that and keep the trees close.
3553         * g95.h (g95_st_label): 'format' member is now a g95_expr.
3554         * io.c: Revert previous changes.
3555         (g95_match_format): Match the format string as a character
3556         literal expression.
3557         * match.h (g95_statement_label): Declare external.
3558         * parse.c: Revert previous changes.
3559         * symbol.c (g95_free_st_label): Free a g95_expr instead
3560         if a 'char *'.
3561         * trans-io.c: Revert previous changes.
3562         (build_dt): Use set_string to set the format string.
3564 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3566         * io.c (format_string): Make non-static.
3567         (g95_match_format): Remember the format string.
3568         (terminate_io): Add I/O termination for empty I/O lists.
3569         * match.h: Declare external format_string.
3570         * parse.c (check_statement_label): Attack the format string
3571         to a format label for FORMAT statements.
3572         * trans-io.c (g95_add_field): Define prefix macro.  Replace
3573         all uses of PREFIX define with a use of this macro.
3574         (build_dt): Implement formatted I/O for format labels.
3576 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3578         * lang-options.h: Kill "-std=F".
3579         * options.c: Remove unimplemented "-std=F".  Modify
3580         web address.
3581         * misc.c (g95_terminal_width): New function.
3582         * error.c (g95_error_init_1): Use g95_terminal_width.
3583         * g95.h: Add prototype for g95_terminal_width, remove
3584         fmode flag.
3586 2003-01-19  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3588         * Make-lang.in: Fix typo.
3590 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3592         * g95.h (struct g95_case): Remove unused cruft, new member
3593         'where' to keep track of the locus of the default case.
3594         * match.c (g95_match_case): Add locus to the current case.
3595         (match_case_selector): Likewise.
3596         * parse.c (parse_select_block): Move semantics check for
3597         multiple DEFAULT cases out of here to...
3598         * resolve.c (check_case_overlap): ...here.  Return sooner
3599         when possible.
3600         (check_case_expr): Take two g95_cases now, use to sure the
3601         expression kinds are the same.
3602         (resolve_select): Cleanup.
3604 2003-01-18  Paul Brook  <paul@nowt.org>
3606         * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
3607         * trans-decl.c (g95_set_symbol_decl): Handle non-array result
3608         variables.
3609         (g95_get_extern_function_decl): Put decls in the correct context.
3611 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3613         * trans-io.c: Port changes from Andy to set ERR flag.
3615 2003-01-17  Paul Brook  <paul@nowt.org>
3617         * trans-array.c: Add various comments.
3618         (g95_ss_terminator): Declare as const.
3619         (g95_walk_expr): Remove first parameter and update all callers.
3620         (g95_walk_op_expr): Initialize scalar SS properly.
3621         * trans-array.h (g95_walk_expr): Update prototype.
3622         * trans-expr.c: Update for new g95_walk_expr.
3623         * trans-intrinsic.c: Ditto.
3624         * trans-io.c: Ditto.
3625         * trans.h: Various comments for SS chains.
3627 2003-01-17  Paul Brook  <paul@nowt.org>
3629         * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
3630         and RRSPACING.
3631         * intrinsic.c (add_functions): Use them.
3632         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
3633         * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
3635 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3637         Fallout of a small merge conflict:
3638         * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
3640 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3642         * initrinsic.c: New add_sym_* functions for strong typing.
3643         (add_conv): Make prototype strict.
3644         * dump-parse-tree.c, dependency.c: Include config.h
3645         * resolve.c, trans-io.c: Fix typos.
3647 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3649         * dump-parse-tree.c (g95_show_code_node): Show the
3650         condition for a computed GOTO that was transformed
3651         to a SELECT CASE construct.
3652         * resolve.c (check_case_overlap): Revert previous switch
3653         to treaps, it was too slow and didn't catch all trouble.
3654         (resolve_symbol): Be more flexible about module procedures.
3655         * symbol.c (check_conflict): Point to relevant section in
3656         the standard for dubious conflict.  Allow procedure
3657         dummy arguments to be optional again.
3658         * trans-io (add_field): Rename to g95_add_field.  Change
3659         all callers.
3660         * trans-stmt (trans_select): Handle unbounded cases for
3661         integer SELECT CASE constructs.  Fix/add more comment.
3663 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3665         * g95.h: Uses GCC's function attribute macros.
3666         * error.c, module.c, parse.c, g95.h: More function attributes.
3668 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3669         Forgot a file...
3670         * trans-decl.c (get_label_decl): Use TREE_LINENO instead
3671         of DECL_SOURCE_LINE, and TREE_FILENAME instead of
3672         DECL_SOURCE_FILE.
3674 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3676         * f95-lang.c (pushdecl): Use TREE_LINENO instead of
3677         DECL_SOURCE_LINE.
3678         * trans.c (g95_trans_code): Use annotate_all_with_file_line
3679         instead of nowdead wrap_all_with_wfl.
3681 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3683         * parse.c (g95_parse_file): In verbose mode, dump the parse tree
3684         before generating code, so we can still see it even if the code
3685         generation phase dies.
3687 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3689         * decl.c (build_sym): Split out initialization expression parts...
3690         (add_init_expr_to_sym): ...to here.
3691         (variable_decl): Add the symbol following an attribute list to the
3692         symbol tree before parsing the optional initialization expression
3693         if the symbol is not of a derived type.
3694         * primary.c (g95_match_rvalue): Don't assume a symbol always has
3695         a value if it is a PARAMETER.
3697 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3699         * misc.c: Don't #include <mcheck.h>
3700         * module.c: Ditto.  Kill uses of mtrace, muntrace.  If there
3701         ever was a glibc bug, then either this was never reported to
3702         glibc people, or it has been fixed for so long that there's
3703         no information you can find about it, anywhere.
3705 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3707         Fix warnings:
3708         * module.c (attr_bits, bt_types, array_spec_types):
3709         Switch 'const' and 'static'.
3710         * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
3712         GNU'ify source code:
3713         * trans-io.c: Numerous fixes, one fixed warning and a few
3714         TODO markers so that we don't forget about them.
3716 2003-01-13  Paul Brook  <paul@nowt.org>
3718         * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
3719         * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
3720         Add G95_ISYM_SCALE.
3721         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
3722         * match.c (g95_match_stop): Fix dumb == -> != error.
3724 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3726         * dump-parse-tree.c (show_indent): Add line breaks.  This
3727         whole dumping process needs cleanups.
3728         * f95-lang.c (g95_mark_addressable): Fix prototype to match
3729         the langhook.  Fix 'return's accordingly.
3730         * g95-support.h: Adjust prototype.
3731         * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
3732         * lang-options.h: Add '-fsyntax-only'.
3733         * options.c (g95_init_options): Init 'no_backend'.
3734         (g95_parse_arg): Deal with '-fsyntax-only'.
3735         * parse.c (g95_parse_file): Do not generate code if 'no_backend'
3736         is set.
3738 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3739         Patch from Arnaud
3740         * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
3741         arguments.  Also make sure that if a symbol is marked INTRINSIC,
3742         an intrinsic with the symbol's name actually exists.
3743         (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
3744         Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
3745         ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
3747 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3749         * resolve.c (resolve_contained_functions): Fix condition, don't
3750         throw internal_error if a child namespace has no name.  Apparently
3751         this can be the case?
3753 2003-01-11  Paul Brook  <paul@nowt.org>
3755         Port changes from Andy's tree:
3756         * g95.h (g95_code): Add stop_code.
3757         * match.c (g95_match_stop): Detter syntax checking.
3758         * resolve.c (resolve_generic_f0): Return match type.
3759         (resolve_generic_f): Remove dead/duplicated code.
3760         (resolve_specific_f): Ditto.
3761         * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
3762         * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
3763         * trans-stmt.c (g95_trans_stop): Handle new STOP format.
3765 2003-01-11  Paul Brook  <paul@nowt.org>
3767         * trans-array.c: Various documentation/comment changes.
3768         * trans-stmt.c: Ditto.
3771 2003-01-10  Paul Brook  <paul@nowt.org>
3773         * options.c/h: Add -fdump-parse-tree as alias of -v.
3775 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3777         * dump-parse-tree.c (g95_show_namespace): Fixed another
3778         typo.  Sorry, it's Friday...
3780 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3782         Spotted by Tobi:
3783         * trans-array.c, trans-array.h, trans.c, trans-const.c,
3784         trans-const.h, trans-decl.c, trans-expr.c, trans.h
3785         trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
3786         trans-types.c: Fix bogus copyright years, add 2003.
3787         * trans-types.h: Give copyright header.
3789 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3791         * dump-parse-tree.c (g95_show_namespace): Fixed typo.
3792         * expr.c, options.c, scanner.c: Add some more 'const' markers.
3793         * intrinsic.c: Some constant strings moved to read-only memory.
3794         * io.c (format_asterisk): Move to...
3795         * g95.h: ...here.
3797 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3799         * dump-parse-tree.c (g95_show_namespace): Dump implicit
3800         types for ranges instead of per-letter.  Indent the
3801         'CONTAINS' just like everything else.
3802         * resolve.c (resolve_contained_functions): Clarify comment.
3803         Explain non-obvious conditional expression.  Improve
3804         diagnostics if tyoe cannot be resolved.
3805         Port semi-fix from Andy's tree:
3806         (was_declared): Move up before first use.
3807         (generic_sym, specific_sym): New functions.  Code moved
3808         out if procedure_kind.
3809         (procedure_kind): Simplify using new functions.
3810         (resolve_generic_f): Make sure the functions we find in
3811         a parent namespace is generic.
3812         (resolve_specific_f): Ditto for specific functions.
3814 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3816         * trans-stmt.c, trans.c: Fix some code style issues. Add
3817         some more comment (but still not enough!).
3819 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3821         * symbol.c (flavors, procedures, intents, acces_types,
3822         access_types, ifsrc_types): Make const.
3823         * misc.c (g95_string2code): Make 'm' param 'const'.
3824         * module.c (find_enum, write_atom, mio_name): Make
3825         'm' param 'const'.
3826         (attr_bits, bt_types, array_spec_types, array_ref_types,
3827         ref_types, expr_types): Make const.
3828         * g95.h: Adjust external decls.
3830 2003-01-09  Paul Brook  <paul@nowt.org>
3832         * Testsuite: Add a load of new cases.
3834 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3836         * Make-file.in: Add dependency on back end header files;
3837         a parallel build should work now.
3838         * f95-lang-c (lang_identifier): Remove bogus comment.
3839         (g95_be_parse_file): Fix prototype.
3840         (g95_init): Make static.
3841         (g95_finish): Make static.
3842         * error.c (g95_syntax_error): Kill. Make define in...
3843         * g95.h (g95_syntax_error): Define.
3844         (g95.options): Make 'source' member 'const'.
3845         * interface.c (g95_match_interface): Explain
3846         hard-to-read condition.
3847         (g95_match_end_interface): Ditto.
3848         * trans_const.c (g95_build_string_const): Make 's' parameter
3849         'const'.
3850         * trans_const.h: Adjust protoype accordingly.
3851         * trans-decl.c: Include tree-dump.h
3852         (g95_generate_function_code): Build fixes for recent changes
3853         in the tree-ssa branch.
3855 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3857         * format.c: Kill, move code from here...
3858         * io.c: ...to here.
3859         * Make-lang.in: Adjust.
3860         * MANIFEST: Ditto.
3861         * match.h: Ditto.
3862         * BUGS: Mention where to submit bugs.  Move old content...
3863         * TODO: ...to here.  New file.
3865 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3866         Fix most warnings, and suppress the ones we can't fix for now.
3867         * Make-lang.in: Suppress warnings about bad proto's in g95.h,
3868         these warnings just clutter the screen and there's not much
3869         we can do about them for now anyway.
3870         * check.c, iresolve.c: Mark unused function parameters.
3871         * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
3872         they should be resolved before they get here.
3873         * error.c: Remove unused FILE *status_out.
3874         * f95-lang.c (g95_init): Remove bogus cast.
3875         * Many files: Make things 'const' where required.
3876         * g95.h: Fix prototypes for all modified functions above.
3877         (g95_options): Remove 'object' member.
3879 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3881         * Make-file.in: Cleanup bogus targets.  Add more comment.
3882         * lang-options.h: New option '-w'.
3883         * g95.h: add no_options field to struct g95_options.
3884         * options.c (g95_init_options): Default no_warnings to off.
3885         (g95_parse_arg): Recognise the '-w' switch and its alias,
3886         '-fno-warnings'.
3887         * error.c (g95_warning, g95_warning_now): Don't emit warning if
3888         no_warning option is set.
3889         * iresolve.c (g95_resolve_shape): Fix warning.
3891 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3893         * primary.c (g95_next_string_char): Rename next_string_char, and
3894         make static.  Adjust callers accordingly.
3895         * resolve.c (resolve_generic_f0): Return try, not match.  Adjust
3896         callers accordingly.
3897         * g95.h: Split out all g95_match* functions to...
3898         * match.h: ...here. New file.
3899         * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
3900         matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
3902 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3904         * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
3905         g95_merge_new_implicit): New functions.
3906         (g95_match_implicit_none, g95_match_implicit): Move from here...
3907         * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
3908         Modify to use the new functions in symbol.c.
3909         * g95.h: Add and move prototypes.
3911 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3913         * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
3914         node compare function.
3915         (g95_insert_bbt): Likewise.
3916         (g95_insert_bbt_with_overlap): Likewise.
3917         (g95_delete_bbt): Likewise.
3918         (delete_treap): Likewise. Also fix a potential bug when calling it.
3919         * module.c (compare_pointers): Change proto to compare_fn.
3920         (compare_integers): Likewise.
3921         (compare_true_names): Likewise.
3922         (find_true_name): Adjust call to compare_true_names to match proto.
3923         (require_atom, write_atom, mio_name): Fix 'const' warnings.
3924         (init_pi_tree): Make compare a compare_fn instead of (int *).
3925         * resolve.c (compare_cases): Change proto to compare_fn.
3926         * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
3927         it static, and rename to compare_symtree.
3928         (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
3929         function.
3930         * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
3931         of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
3933 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3934         * Make-lang.in: Fix spaces/tabs issues from previous patch.
3935         * patch.options: Blow away Paul's checkin mistake :-)
3936         * io.c (terminate_io): Fix memory leak (Arnaud).
3938 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3940         * Make-lang.in: Teach about building DVI, info manual.
3941         * g95.texi: New file.
3943 2003-01-02  Paul Brook  <paul@nowt.org>
3945         * trans-array.c (g95_reverse_ss): Make static and don't use.
3946         (g95_conv_ss_descriptor): Don't use g95_loopinfo
3947         (g95_conv_array_parameters): Modify for pointer assignments.
3948         (g95_walk_subexpr): New function.
3949         (g95_walk_expr*): Use it.
3950         * trans-array.h (g95_reverse_ss): Remove prototype.
3951         * trans-expr.c (g95_trans_pointer_assign): Implement.
3952         (Many): Set se.want_pointer before calling g95_conv_array_parameter.
3953         * trans-intrinsic.c: Sync with scalarizer changes.
3954         * trans-io.c: Ditto.
3956 2002-12-29  Paul Brook  <paul@nowt.org>
3958         * trans-array.c: Document calling convention for arrays.
3960 2002-12-19  Paul Brook  <paul@nowt.org>
3962         * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
3963         assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
3964         optional parameters for some intrinsics.
3965         (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
3966         * trans-expr.c (g95_conv_function_call): Pass NULL for absent
3967         optional parameters.
3968         * trans.h (g95_se): Add ignore_optional flag.
3970 2002-12-15  Paul Brook  <paul@nowt.org>
3972         * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
3973         * trans-decl.c (g95_generate_function_code): Use TDI_original.
3975 2002-12-14  Paul Brook  <paul@nowt.org>
3977         * trans-stmt.c (g95_trans_call): Use resolved symbol name.
3979 2002-12-12  Paul Brook  <paul@nowt.org>
3981         * trans-array.c (g95_trans_array_constructor_subarray): Fully
3982         initialize the scalarizer.
3983         (various): Update to new format of g95_expr->value.constructor.
3985 2002-12-08  Paul Brook  <paul@nowt.org>
3987         * trans-array.c (g95_put_offset_into_var): New function.
3988         (g95_trans_array_constructor_subarray): New function.
3989         (g95_trans_array_constructor_value): Use it.
3990         (g95_array_cons_size): Don't abort() on array components.
3992 2002-12-08  Paul Brook  <paul@nowt.org>
3994         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
3995         * support.c: Update #includes.
3996         (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
3997         * trans-array.c: Update #includes.
3998         * trans.c: Ditto.
3999         * trans-const.c: Ditto.
4000         * trans-io.c: Ditto.
4001         * trans-types.c: Ditto.
4002         (g95_init_types): Set size_type_node.
4003         * trans-decl.c: Update #includes.
4004         (gfor_fndecl_adjust{l,r}): Declare and initialize.
4005         * trans-stmt.c: Update #includes.
4006         (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
4007         (g95_trans_select): Fix check for unbounded ranges.
4008         * trans-expr.c: Update #includes.
4009         (g95_conv_string_tmp): New function.
4010         (g95_conv_concat_op): Use it.
4011         * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
4012         * Trans-intrisic.c: Update #includes.
4013         (g95_conv_intrinsic_strcmp): New function.
4014         (g95_conv_intrinsic_adjust): Ditto.
4015         (g95_conv_intrinsic_function: Use them.
4017 2002-11-30  Paul Brook  <paul@nowt.org>
4019         * trans-array.c (g95_walk_function_expr): Handle non-array return by
4020         reference.
4021         * trans-dec.c (g95_build_function_decl): Handle character return
4022         parammeters.
4023         (g95_get_fake_result_decl): Ditto.
4024         (g95_trans_deferred_vars): Ditto.
4025         * trans-expr.c (g95_conv_function_call): Ditto.
4026         (g95_trans_arrayfunc_assign) Limit to array valued functions.
4027         * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
4028         (g95_conv_intrinsic_function): Use it.
4029         * trans-types.c (g95_sym_type): Handle functions returning strings.
4030         (g95_return_by_reference): Ditto.
4031         (g95_get_function_type): Ditto.
4033 2002-11-18  Paul Brook  <paul@nowt.org>
4035         * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
4036         requires a temporary.
4037         (g95_trans_select): Handle computed gotos.
4038         * trans-types.c (g95_build_array_type): Warn about non-functional
4039         assumed shape arrays.
4040         * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
4041         blocks.
4042         * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
4043         (g95_conv_intrinsic_int): New function.
4044         (g95_conv_intrinsic_mod): New function.
4045         (g95_conv_intrinsic_ichar): New function.
4046         (g95_conv_intrinsic_function): Use them.
4047         (g95_conv_intrinsic_dim): Use g95_evaluate_now.
4049 2002-11-17  Toon Moene  <toon@moene.indiv.nluug.nl>
4051         * trans-types.c (g95_build_array_type): Assumed
4052         sized arrays can have rank > 1.
4053         * trans.c (g95_trans_code): Remove erroneous
4054         warning about CONTINUE.
4055         * trans-expr.c (g95_conv_variable): Remove
4056         erroneous assert.
4058 2002-11-15  Paul Brook  <paul@nowt.org>
4060         * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
4062 2002-10-31  Paul Brook  <paul@nowt.org>
4064         * f95-tree.c: Remove tree copying stuff that's now in gimple.c
4065         * trans-expr.c (g95_conv_component_ref): Handle character string
4066         components.
4067         (g95_conv_string_parameter): Ditto.
4068         * trans-types.c (g95_get_derived_type): Add length decl to caracter
4069         string components.
4071 2002-10-10  Paul Brook  <paul@nowt.org>
4073         * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
4074         * trans-expr.c (g95_conv_function_call): Remove unreliable return value
4075         check.
4076         * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
4077         (g95_conv_intrinsic_function): Handle size and shape intrinsics.
4078         (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
4079         * trans-types.c (pvoid_type_node): Declare and initialize.
4080         * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
4081         (g95_array_allocate): Fix when base==data.
4082         (g95_conv_array_parameter): Correctly handle reduced rank sections.
4083         * trans-io.c (g95_trans_write): Correctly handle string modifiers.
4085 2002-10-09  Paul Brook  <paul@nowt.org>
4087         * (g95_conv_expr_reference): Handle character strings correctly.
4089 2002-10-07  Paul Brook  <paul@nowt.org>
4091         (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
4092         langhook.
4093         * trans-array.c (g95_build_array_initializer): Remove.
4094         (g95_conv_array_initializer): New Function.
4095         (g95_trans_auto_arry_allocation): Cleanup.
4096         (g95_trans_init_character_array): Remove.
4097         * g95spec.c: Link in libgforbegin.
4098         * trans.c (g95_generate_code): Rename main function to MAIN__.
4099         (g95_create_var): New function.
4100         (g95_create_var_np): New function.
4101         (g95_evaluate_now): New function.
4102         (g95_start_block): New function.
4103         (g95_finish_block): New function.
4104         (g95_add_expr_to_block): New function.
4105         (g95_add_block_to_block): New function.
4106         * trans-expr.c (g95_conv_componen_ref): New function.
4107         * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
4108         (F95_OBJS): Add dependency.o.
4109         * f95-lang.c (g95_is_simple_stmt): Remove.
4110         * f95-tree.c (mark_not_simple): New function.
4111         (unshare_all_trees): New function.
4112         (create_tmp_var, create_tmp_alias_var): Remove.
4113         * support.c (declare_tmp_vars, tree_last_decl): Remove.
4114         * trans*: Convert to new IR using GENERIC trees.  Don't bother about
4115         SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
4117 2002-10-01  Paul Brook  <paul@nowt.org>
4119         * trans-array.c: Add support for descriptorless arrays.
4120         (g95_conv_array_data): New function.
4121         (g95_conv_array_base): New function.
4122         * trans-array.h: Declare these here.
4123         * trans-decl.c(g95_create_mopdule_variable): Perform variable
4124         initialization and creation here.
4125         (g95_create_module_vars): Instead of here.
4126         * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
4127         * trans-intrinsic.c: Ditto.
4128         * trans-types.c (g95_is_nodesc_array): New function.
4129         (g95_get_nodesc_array_type): New function.
4130         (g95_sym_type, g95_get_derived_type): Use them.
4131         * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
4133 2002-09-28  Paul Brook  <paul@nowt.org>
4135         * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
4136         * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
4137         parameters.
4139 2002-09-24  Paul Brook  <paul@nowt.org>
4141         * f95-lang.c (listify): Remove declaration.
4142         (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
4143         (listify)
4144         * f95-tree.c (get_name): New function.
4145         * trans.c (module_namespace): Remove.
4146         * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
4147         * trans-types.c: Ditto.
4149 2002-09-19  Paul Brook  <paul@nowt.org>
4151         * trans-array.c (g95_get_array_cons_size): New Function.
4152         (g95_con_ss_startstride): Handle Array constructors.
4153         (g95_conv_loop_setup): Ditto.
4154         (g95_conv_array_parameter): Ditto.
4155         * tras-decl.c (g95_finish_var_decl): Make initializes variables
4156         static.
4158 2002-09-19  Paul Brook  <paul@nowt.org>
4160         * trans.c (g95_simple_fold_tmp): Detect variables inside
4161         NON_LVALUE_EXPR.
4162         * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
4164 2002-09-18  Steven Bosscher <s.bosscher@student.tudelft.nl>
4166         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
4168 2002-09-14  Paul Brook  <paul@nowt.org>
4170         * trans.c (g95_create_module_variable): Move to trans-decl.c.
4171         * trans-const.c (g95_conv_string_init): New Function.
4172         * trans-const.h: Declare it.
4173         * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
4174         variables. Don't bail on intrinsic symbols.
4175         (get_extern_function_decl): Handle specific intrinsic functions.
4176         * trans-types.c (g95_sym_type): Dummy functions don't return
4177         reference types.
4178         * trans-array.c (g95_build_array_initializer): New Function.
4179         (g95_trans_auto_array_allocation): Build initializer for static decls.
4180         Don't use mpz_addmul, it's GMP4 only.
4182 2002-09-12  Paul Brook  <paul@nowt.org>
4184         * trans-decl.c (g95_generate_code): Fix thinko with return variable.
4185         (g95_get_extern_function_decl, g95_build_function_decl): Mangle
4186         assembler names for module procedures.
4188 2002-09-11  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
4190         * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
4191         dependency/
4193 2002-09-10  Paul Brook  <paul@nowt.org>
4195         * trans-array.c: Change format of G95_SS_TEMP strictures.
4196         (g95_check_fncall_dependancy): New function.
4197         (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
4198         offsets.
4199         * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
4200         result variables.
4201         (g95_build_function_decl): Don't assume result arrays are packed.
4202         (g95_trans-deferred-vars): Handle array result variables.
4203         (g95_generate_fuction_code): Clear saved_function_decls.
4204         * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
4205         reference.
4206         (g95_trans_arrayfunc_assign): New function.
4207         (g95_trans_assignment): Use it.
4208         * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
4209         (g95_se): Add direct_byref.
4210         * trans-types.c: Use sym->result rather than sym where appropriate.
4211         * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
4212         Update other functions to use this.
4213         (g95_is_intrinsic_libcall): New function.
4214         (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
4215         (g95_walk_intrinsic_function): Ditto.
4217 2002-09-08  Paul Brook  <paul@nowt.org>
4219         * trans-types.c: Change rank field to dtype field in array descriptor.
4220         * trans-array.c: Implement filling of dtype array descriptor field.
4221         * trans-intrinsic.c: Fix broken LEN intrinsic.
4223 2002-09-07  Paul Brook  <paul@nowt.org>
4225         * trans-intrinsic.c: Remove outdated todo intrinsic list.
4226         (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
4227         (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
4229 2002-09-06  Paul Brook  <paul@nowt.org>
4231         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
4232         (gt-f95-trans-types.h): Add dependancy information.
4233         * config-lang.in (gtfiles): Add trans-types.c
4234         * f95-lang.c (g95_be_parse_file): Pass error and warning counts
4235         back to top-level code.
4236         * trans-array.c, trans-types.c: Change format of array descriptor.
4237         (g95_conv_descriptor_dimension): New function.
4238         * trans-types.h (g95_conv_descriptor_rank): define.
4239         * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
4240         intrinsics.
4242 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
4244         * trans-array.c, trans-types.c: Add rank information to descriptor.
4246 2002-09-06  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
4248         * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
4250 2002-09-04  Paul Brook  <paul@nowt.org>
4252         * f95-lang.c (g95_create_decls): New function.
4253         (g95_init):  Move initialization of external decls to above, and call
4254         from g95_be_parse_file.
4255         * trans.c (g95_finish_stmt): Don't amputate the decl chain.
4256         * trans-types.c (g95_init_types): Always name integer and char types.
4257         (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
4259 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
4261         * Make-lang.in: Add options.c to F95_PARSER_OBJS
4263 2002-09-02  Paul Brook  <paul@nowt.org>
4265         * g95_generate_code: Clear the attr for __fortran_main.
4266         * trans-types.c (g95_finish_type): New function.
4267         * g95_init_io_state_type: Use g95_finish_type.
4268         * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
4270 2002-09-01  Paul Brook  <paul@nowt.org>
4272         * README.backend: Warn about the dangers of extra config.h files.
4273         Remove obsolete libgfor stuff.
4274         * config-lang.in: Add target-libgfor dependancy.
4275         * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
4277 2002-09-01  Toon Moene  <toon@moene.indiv.nluug.nl>
4279         * g95_conv_mpz_to_tree: Free storage pointed to by q,
4280         not by buff.
4282 2002-08-30  Paul Brook  <paul@nowt.org>
4284         * trans-intrinsic.c (g95_conv_intrinsic_function,
4285         g95_walk_intrinsic_function): Added ANY and ALL.
4286         (g95_conv_intrinsic_anyall): New function.
4287         * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in
4288         mangled name