* target.h (struct gcc_target): Add new field to struct cxx: import_export_class.
[official-gcc.git] / gcc / fortran / ChangeLog
blob89a15bd894eb410f9e7d0e1d340c0a263e552061
1 2004-06-30  Richard Henderson  <rth@redhat.com>
3         * match.c (var_element): Remove unused variable.
5         * trans-decl.c (gfc_generate_function_code): Don't set
6         x_whole_function_mode_p.
7         (gfc_generate_constructors): Likewise.
9 2004-06-30  Richard Henderson  <rth@redhat.com>
11         * trans-decl.c (gfc_generate_function_code): Don't set
12         immediate_size_expand.
13         (gfc_generate_constructors): Likewise.
15 2004-06-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
17         PR fortran/16161
18         * decl.c (gfc_match_type_spec): Rename second argument to
19         'implicit_flag', reverse meaning. Don't match_char_spec if
20         'implicit_flag' is set. Rename to ...
21         (match_type_spec): ... this.
22         (gfc_match_implicit_none, match_implicit_range): Move here
23         from match.c.
24         (gfc_match_implicit): Move here from match.c, try to
25         match_char_len if match_implicit_range doesn't succeed for
26         CHARACTER implicits. Call renamed fucntion match_type_spec.
27         (gfc_match_data_decl, match_prefix): Call renamed function
28         match_type_spec.
29         * match.c (gfc_match_implicit_none, match_implicit_range,
30         gfc_match_implicit): Move to decl.c.
31         * match.h (gfc_match_implicit_none, gfc_match_implicit):
32         Move protoypes to section 'decl.c'.
33         (gfc_match_type_spec): Remove prototype.
35 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
37         * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to 
38         copyright years.
40 2004-06-29  Steven Bosscher  <stevenb@suse.de>
42         Make sure types in assignments are compatible.  Mostly mechanical.
43         * trans-const.h (gfc_index_one_node): New define.
44         * trans-array.c (gfc_trans_allocate_array_storage,
45         gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
46         gfc_trans_array_constructor_value, gfc_trans_array_constructor,
47         gfc_conv_array_ubound, gfc_conv_array_ref,
48         gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
49         gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
50         gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
51         gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
52         types in assignments, conversions and conditionals for expressions.
53         * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
54         gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
55         gfc_conv_function_call, gfc_trans_pointer_assignment,
56         gfc_trans_scalar_assign): Likewise.
57         * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
58         gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
59         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
60         gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
61         gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
62         gfc_conv_allocated, gfc_conv_associated,
63         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
64         * trans-io.c (set_string): Likewise.
65         * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
66         gfc_do_allocate, generate_loop_for_temp_to_lhs,
67         generate_loop_for_rhs_to_temp, compute_inner_temp_size,
68         compute_overall_iter_number, gfc_trans_assign_need_temp,
69         gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
70         gfc_evaluate_where_mask, gfc_trans_where_assign,
71         gfc_trans_where_2): Likewise.
72         * trans-types.c (gfc_get_character_type, gfc_build_array_type,
73         gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
75         * trans.c (gfc_add_modify_expr): Add sanity check that types
76         for the lhs and rhs are the same for scalar assignments.
78 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
80         * dump-parse-tree.c (show_common): New function.
81         (gfc_show_namespace): Show commons.
83 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
84         Andrew Vaught  <andyv@firstinter.net>
86         PR fortran/13249
87         PR fortran/15481
88         * decl.c (gfc_match_save): Adapt to new common structures,
89         don't allow saving USE-associated common.
90         * dump-parse-tree (gfc_show_attr): (saved_)common are not
91         symbol attributes any longer.
92         (gfc_show_symbol): Don't show old-style commons any longer.
93         (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
94         interface.
95         * gfortran.h (symbol_attribute): Remove common and saved_common
96         attributes.
97         (gfc_symbol): Remove common_head element.
98         (gfc_common_head): New struct.
99         (gfc_get_common_head): New macro.
100         (gfc_symtree): Add field 'common' to union.
101         (gfc_namespace): Add field 'common_root'; change type of field
102         'blank_common' to blank_common.
103         (gfc_add_data): New prototype.
104         (gfc_traverse_symtree): Expect a symtree as first argument
105         instead of namespace.
106         * match.c (gfc_get_common): New function.
107         (match_common_name): Change to take char * as argument, adapt,
108         fix bug with empty name.
109         (gfc_match_common): Adapt to new data structures. Disallow
110         redeclaration of USE-associated COMMON-block. Fix bug with
111         empty common.
112         (var_element): Adapt to new common structures.
113         * match.h (gfc_get_common): Declare.
114         * module.c: Add 2004 to copyright years, add commons to module
115         file layout description.
116         (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
117         for removed attributes.
118         (mio_symbol): Adapt to new way of storing common relations.
119         (load_commons): New function.
120         (read_module): Skip common list on first pass, load_commons at
121         second.
122         (write_commons): New function.
123         (write_module): Call write_commons().
124         * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
125         functions related to removed attributes.
126         (gfc_add_data): New function.
127         (gfc_clear_attr): Don't set removed attributes.
128         (gfc_copy_attr): Don't copy removed attributes.
129         (traverse_symtree): Remove.
130         (gfc_traverse_symtree): Don't traverse symbol 
131         tree of the passed namespace, but require a symtree to be passed
132         instead. Unify with traverse_symtree.
133         (gfc_traverse_ns): Call gfc_traverse_symtree according to new
134         interface.
135         (save_symbol): Remove setting of removed attribute.
136         * trans-common.c (gfc_sym_mangled_common_id): Change to
137         take 'char *' argument instead of 'gfc_symbol'.
138         (build_common_decl, new_segment, translate_common): Adapt to new
139         data structures, add new
140         argument name.
141         (create_common): Adapt to new data structures, add new
142         argument name. Fix typo in intialization of derived types.
143         (finish_equivalences): Add second argument in call to
144         create_common.
145         (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
146         (gfc_trans_common): Adapt to new data structures.
147         * trans-decl.c (gfc_create_module_variables): Remove test for 
148         removed attribute.
150 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
152         * io.c: Add 2004 to copyright years.
154 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
155         Andrew Vaught  <andyv@firstinter.net>
157         * gfortran.h (gfc_gsymbol): New typedef.
158         (gfc_gsym_root): New variable.
159         (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
160         * parse.c (global_used): New function.
161         (parse_block_data): Check for double empty BLOCK DATA,
162         use global symbol table.
163         (parse_module): Use global symbol table.
164         (add_global_procedure, add_global_program): New functions.
165         (gfc_parse_file): Use global symbol table.
166         * symbol.c (gfc_gsym_root): New variable.
167         (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
168         functions.
170 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
172         * module.c (mio_gmp_real): Correct writing of negative numbers.
174 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
176         PR fortran/15963
177         * expr.c (check_intrinsic_op): Allow comparison of characters.
178         Make logic easier.
180 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
181         Andrew Vaught  <andyv@firstinter.net>
183         * decl.c (contained_procedure): New function.
184         (match_end): Verify correctness of END STATEMENT in
185         all cases.
187 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
188         Andrew Vaught  <andyv@firstinter.net>
190         PR fortran/15190
191         * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
192         (decode_statement): Enforce required space in free-form.
194 2004-06-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
196         * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
197         * trans-array.c (gfc_conv_descriptor_data): Add operand
198         for COMPONENT_REF.
199         (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
200         (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
201         (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
202         * trans-common.c (create_common): Likewise.
203         * trans-expr.c (gfc_conv_component_ref): Likewise.
204         * trans-io.c (set_parameter_value): Likewise.
205         (set_parameter_ref, set_string, set_flag, io_result): Likewise.
206         (transfer_expr): Likewise.
207         * trans-decl.c (gfc_trans_auto_character_variable):
208         Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
209         (gfc_gimplify_function): New function.
210         (gfc_generate_function-code): Properly handle nested functions.
211         * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
213 2004-06-22  Janne Blomqvist  <jblomqvi@cc.hut.fi>
215         PR fortran/15750
216         * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
217         (gfc_resolve_inquire): Resolve the iolength tag.  Return
218         SUCCESS at end of function if no failure has occured.
219         * resolve.c (resolve_code): Resolve if iolength is encountered.
220         * trans-io.c: (ioparm_iolength, iocall_iolength,
221         iocall_iolength_done): New variables.
222         (last_dt): Add IOLENGTH.
223         (gfc_build_io_library_fndecls ): Set iolength related variables.
224         (gfc_trans_iolength): Implement.
225         (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
227 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de
229         PR fortran/15511
230         * scanner.c (load_line): Don't truncate preprocessor lines.
231         Reformat error message.
232         (preprocessor_line): Issue warning in case of malformed
233         preprocessor line. 
235 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
237         * resolve.c (resolve_symbol): Add comment in function body.
238         (check_data_variable): Change type of mark to ar_type, adapt code
239         accordingly.
241 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
243         * array.c (gfc_insert_constructor): Avoid redundant call to
244         mpz_comp. Add 2004 to copyright years.
245         
246 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
248         * trans.h (stmtblock_t): Change has_scope to unsigned int.
250 2004-06-20  Steven G. Kargl  <kargls@comcast.net>
252         * arith.c (gfc_range_check): correct complex underflow.
254 2004-06-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
256         PR fortran/15962
257         * match.c (match_case_selector): Call gfc_match_init_expr
258         instead of gfc_match_expr.
259         * resolve.c (validate_case_label_expr): No need to check for
260         constant, since it wouldn't have been matched with the fix to
261         match.c.
263 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
265         PR fortran/15211
266         * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
267         of strings. 
269 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
271         PR fortran/15510
272         * trans-deecl.c (generate_local_decl): Do not issue warning for
273         unused variables if they're use associated.
275 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
276         Andrew Vaught <andyv@firstinter.net>
278         PR fortran/14928
279         * gfortran.h (gfc_check_f): Add new field f3ml.
280         * check.c (gfc_check_minloc_maxloc): Take argument list instead
281         of individual arguments, reorder if necessary.
282         * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
283         * intrinsic.c (add_sym_3ml): New function.
284         (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
285         (check_specific): Catch special case MINLOC, MAXLOC. 
287 2004-06-14  Paul Brook  <paul@codesourcery.com>
289         * intrinsic.c (add_sym_2s): Use correct function types.
291 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
293         * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize.  Move data.c
294         * data.c (gfc_get_section_index):  Remove dependency on trans.h.
296 2004-06-12  Steven G. Kargl  <kargls@comcast.net>
298         * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
299         gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
300         * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
301         GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
302         * trans-intrinsic.c:  Use symbols.
303         * intrinsic.c (add_sym_2s): New function.
304         * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
305         * intrinsic.h: Function prototypes.
306         * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub 
307         gfc_resolve_srand):  New functions.
309 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
311         PR fortran/14957
312         * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
313         contained procedure.
314         
315 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
317         PR fortran/12841
318         * interface.c (compare_parameter, compare_actual_formal): Don't
319         check types and array shapes for NULL()
320         * trans-expr.c (conv_function_call): No double indirection for
321         NULL() 
323 2004-06-09  Toon Moene  <toon@moene.indiv.nluug.nl>
325         * trans-expr.c (gfc_conv_cst_int_power): Compute
326         x**(-n) by converting it to (1/x)**n instead of
327         1/x**n.
329 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
331         PR fortran/13372
332         * module.c (write_symbol, write_symtree): Don't write symbols
333         wrongly added to namespace.
334         * trans-decl.c (gfc_create_module_variable): Don't create a
335         backend decl for a symbol incorrectly added to namespace.
337 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
339         PR fortran/13201
340         * resolve.c (resolve_symbol): Verify that parameter array has an
341         explicit shape. Fix typos and coding style issues in surrounding
342         lines.
344 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
346         PR fortran/15478
347         * gfortran.texi: The documentation doesn't contain infomration on
348         how to report bugs, and shouldn't, so remove the line which
349         says it does.
351 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
353         * intrinsic.c (sort_actual): Keep track of type of missing 
354         arguments. (Missing from previous commit.)
356 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
358         * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
359         * interface.c (compare_actual_formal): Keep type of omitted
360         optional arguments.
361         * trans-expr.c (gfc_conv_function_call): Add string length
362         argument for omitted string argument.
364 2004-06-03  Paul Brook  <paul@codesourcery.com>
366         * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
367         lists instead of compound expr chains.
368         (gfc_trans_code): Annotate statement lists.
370 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
372         * trans-array.c: Fix spelling in comments.
374 2004-06-02  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
376         PR fortran/15557
377         * data.c (assign_substring_data_value): New function.
378         (gfc_assign_data_value): Call the new function if we're dealing
379         with a substring LHS.
381 2004-06-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
383         PR fortran/15477
384         * gfortran.h (GFC_VERSION): Remove.
385         * gfortran.texi (version-gfortran): Remove, replace by version-GCC
386         where used.
388 2004-05-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
390         * trans-types.c: Fix spelling & layout in comments.
392 2004-05-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
394         PR fortran/14067
395         * trans-const.c (gfc_conv_string_init): Allow variable string
396         length lower than initialization string length.
398 2004-05-30  Paul Brook  <paul@codesourcery.com>
400         PR fortran/15620
401         * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
402         * trans-expr.c (gfc_trans_string_copy): New function.
403         (gfc_conv_statement_function): Use them.  Create temp vars.  Enforce
404         character lengths.
405         (gfc_conv_string_parameter): Use gfc_trans_string_copy.
406         * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
407         * trans.h (struct gfc_saved_var): Define.
408         (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
410 2004-05-30  Steven G. Kargl  <kargls@comcast.net>
412         * iresolve.c (gfc_resolve_random_number): Clean up conditional.
414 2004-05-29  Steven G. Kargl  <kargls@comcast.net>
416         * simplify.c (gfc_simplify_log): Remove useless line of code.
418 2004-05-29  Paul Brook  <paul@codesourcery.com>
420         * trans-common.c (find_equivalence): Find multiple rules.
422 2004-05-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
424         * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
425         (gfc_current_locus): Declare new global variable.
426         * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
427         (gfc_current_locus1): Rename ...
428         (gfc_current_locus): ... to this.
429         (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
430         skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
431         gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
432         gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
433         and gfc_current_locus(), respectively.
434         * array.c (match_subscript, gfc_match_array_ref, match_array_list,
435         match_array_cons_element, gfc_match_array_constructor):
436         Read/modify gfc_current_locus instead of calling gfc_set_locus()
437         and gfc_current_locus().
438         * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
439         match_attr_spec, gfc_match_function_decl, gfc_match_end,
440         attr_decl1, gfc_match_save): Likewise.
441         * error.c (error_print, gfc_internal_error): Likewise.
442         * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
443         * interface.c (gfc_add_interface): Likewise.
444         * io.c (gfc_match_format, match_dt_format, match_dt_element,
445         match_io_iterator, match_io): Likewise.
446         * match.c (gfc_match_space, gfc_match_eos,
447         gfc_match_small_literal_int, gfc_match_st_label,
448         gfc_match_strings, gfc_match_name, gfc_match_iterator,
449         gfc_match_char, gfc_match, gfc_match_assignment,
450         gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
451         gfc_match_nullify, gfc_match_call, match_implicit_range,
452         gfc_match_implicit, gfc_match_data, match_case_selector,
453         gfc_match_case, match_forall_iterator): Likewise.
454         * matchexp.c (gfc_match_defined_op_name, next_operator,
455         match_level_1, match_mult_operand, match_ext_mult_operand,
456         match_add_operand, match_ext_add_operand, match_level_2,
457         match_level_3, match_level_4, match_and_operand, match_or_operand,
458         match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
459         * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
460         * parse.c (match_word, decode_statement, next_free, next_fixed,
461         add_statement, verify_st_order, parse_if_block, gfc_parse_file):
462         Likewise.
463         * primary.c (match_digits, match_integer_constant,
464         match_boz_constant, match_real_constant, match_substring,
465         next_string_char, match_charkind_name, match_string_constant,
466         match_logical_constant, match_const_complex_part,
467         match_complex_constant, match_actual_arg, match_keyword_arg,
468         gfc_match_actual_arglist, gfc_match_structure_constructor,
469         gfc_match_rvalue, gfc_match_variable): Likewise.
470         * st.c (gfc_get_code): Likewise.
471         * symbol.c (check_conflict, check_used, check_done,
472         duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
473         gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
474         gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
476 2004-05-26  Roger Sayle  <roger@eyesopen.com>
478         * io.c (format_asterisk): Silence compiler warnings by correcting
479         the number of elements of a "locus" initializer.
481 2004-05-25  Roger Sayle  <roger@eyesopen.com>
483         PR fortran/13912
484         * matchexp.c: Allow unary operators after arithmetic operators
485         as a GNU extension.
486         (match_ext_mult_operand, match_ext_add_operand): New functions.
487         (match_mult_operand): Tweak to call match_ext_mult_operand.
488         (match_add_operand): Tweak to call match_ext_mult_operand.
489         (match_level_2): Rearrange to call match_ext_add_operand.
491 2004-05-25  Paul Brook  <paul@codesourcery.com>
493         * expr.c (check_inquiry): Remove bogus tests.
495 2004-05-23  Paul Brook  <paul@codesourcery.com>
497         PR fortran/13773
498         * expr.c (restricted_args): Remove redundant checks/argument.
499         (external_spec_function): Update to match.
500         (restricted_intrinsic): Rewrite.
502 2004-05-23  Paul Brook  <paul@codesourcery.com>
503         Victor Leikehman  <lei@haifasphere.co.il>
505         * gfortran.h (struct gfc_symbol): Add equiv_built.
506         * trans-common.c: Change int to HOST_WIDE_INT.  Capitalize error
507         messages.
508         (current_length): Remove.
509         (add_segments): New function.
510         (build_equiv_decl): Create initialized common blocks.
511         (build_common_decl): Always add decl to bindings.
512         (create_common): Create initializers.
513         (find_segment_info): Reformat to match coding conventions.
514         (new_condition): Use add_segments.
515         (add_condition, find_equivalence, add_equivalences): Move iteration
516         inside functions.  Only process each segment once.
517         (new_segment, finish_equivalences, translate_common): Simplify.
519 2004-05-23  Steven G. Kargl  <kargls@comcast.net>
521         * check.c (gfc_check_random_seed): Issue for too many arguments.
523 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
525         * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
527 2004-05-22  Paul Brook  <paul@codesourcery.com>
529         * dump-parse-tree.c (gfc_show_equiv): New function.
530         (gfc_show_namespace): Use it.
532 2004-05-22  Victor Leikehman  <lei@haifasphere.co.il>
534         PR fortran/13249
535         * symbol.c (gfc_add_common): Disable checks to work around other more
536         fundamental inadequacies.
538 2004-05-22  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
540         * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
541         only for functions.
542         (gfc_build_function_decl): Likewise.
544 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
546         * check.c (gfc_check_system_clock): New function.
547         * intrinsic.c (add_sym_3s): New function.
548         (add_subroutines): Use it.
549         * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
550         Add prototypes.
551         * iresolve.c (gfc_resolve_system_clock): New function.
553 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
555         * invoke.texi: Document -Wunderflow and spell check.
556         * lang.opt: Add Wunderflow.
557         * gfortran.h (gfc_option_t): Add warn_underflow option.
558         * options.c (gfc_init_options, set_Wall): Use it.
559         * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
560         * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
561         gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
562         gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
563         * arith.c (common_logarithm): Fix typo in comment.
565 2004-05-21  Roger Sayle  <roger@eyesopen.com>
567         * io.c (check_format): As a GNU extension, allow the comma after a
568         string literal to be optional in a format.  Use gfc_notify_std to
569         issue an error/warning as appropriate.
571 2004-05-21  Roger Sayle  <roger@eyesopen.com>
573         * io.c (check_format): Use gfc_notify_std to determine whether to
574         issue an error/warning for omitting the digits from the X format.
576 2004-05-20  Roger Sayle  <roger@eyesopen.com>
578         * io.c (check_format): Allow the number before the X format to
579         be optional when not -pedantic.
581 2004-05-18  Feng Wang  <fengwang@nudt.edu.cn>
582         Paul Brook  <paul@codesourcery.com>
584         * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
585         Create decls for __builtin_pow{,f}.
586         * gfortran.h (PREFIX_LEN): Define.
587         * trans-decl.c (gfor_fndecl_math_powi): Add.
588         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
589         (gfc_build_intrinsic_function_decls): Create decls for powi.
590         * trans-expr.c (powi_table): Add.
591         (gfc_conv_integer_power): Remove.
592         (gfc_conv_powi): New function.
593         (gfc_conv_cst_int_power): New function.
594         (gfc_conv_power_op): Use new powi routines.
595         * trans.h (struct gfc_powdecl_list): Add.
596         (gfor_fndecl_math_powi): Add.
597         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
599 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
601         * trans.c, trans-decl.c: Fix comment typos.
603 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
605         * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
607 2004-05-18  Steve Kargl  <kargls@comcast.net>
609         * arith.c (gfc_int2complex): Fix incorrect range checking.
611 2004-05-18  Paul Brook  <paul@codesourcery.com>
613         PR fortran/13930
614         * decl.c (add_init_expr_to_sym): Remove incorrect check.
615         (default_initializer): Move to expr.c.
616         (variable_decl): Don't assign default initializer to variables.
617         * expr.c (gfc_default_initializer): Move to here.
618         * gfortran.h (gfc_default_initializer): Add prototype.
619         * resolve.c (resolve_symbol): Check for illegal initializers.
620         Assign default initializer.
622 2004-05-17  Steve Kargl  <kargls@comcast.net>
624         * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
626 2004-05-17  Steve Kargl  <kargls@comcast.net>
628         * arith.c (gfc_real2complex): Range checking wrong part of complex
629         number. 
630         
631 2004-05-16  Paul Brook  <paul@codesourcery.com>
633         * options.c (gfc_handle_module_path_options): Fix buffer overrun.
635 2004-05-16  Paul Brook  <paul@codesourcery.com>
637         * arith.c (gfc_range_check): Fix logic error.
639 2004-05-16  Steve Kargl  <sgk@troutmask.apl.washington.edu>
641         * arith.c: Fix comment typos.
643 2004-05-15  Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
645         PR fortran/13742
646         * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
647         not initialized in a disallowed fashion.
648         * match.c (gfc_match_common): Likewise.
649         (var_element): Verify that variable is not in the blank COMMON,
650         if it is in a common. 
652 2004-05-15  Joseph S. Myers  <jsm@polyomino.org.uk>
654         * Make-lang.in (f95.generated-manpages): Remove.
655         (f95.srcextra): New.
656         (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
657         f95.maintainer-clean): Generate info and dvi files in objdir/doc.
658         (f95.dvi): Remove.
659         (dvi): New.
660         (f95.install-info): Remove.
661         (install-info): New.
663 2004-05-15  Victor Leikehman  <lei@haifasphere.co.il>
665         * decl.c (add_init_expr_to_sym): Check for variable size arrays.
667 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
669         * primary.c (match_boz_constant): Use gfc_notify_std() for
670         issuing a warning or an error.
672 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
674         PR fortran/13826
675         * primary.c (match_structure_constructor): Rename ...
676         (gfc_match_structure_constructor): ... to this. Make non-static.
677         (gfc_match_rvalue): Call renamed function.
678         * match.h (gfc_match_structure_constructor): Declare.
679         * match.c (gfc_match_data_constant): Handle structure
680         constructor.
682 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
684         PR fortran/13702 
685         (Port from g95)
686         * gfortran.h (gfc_linebuf): New typedef.
687         (linebuf): Remove.
688         (gfc_file): Revamped, use new gfc_linebuf.
689         (locus): Revamped, use new types.
690         (gfc_current_file): Remove.
691         (gfc_current_form, gfc_source_file): New global variables.
692         * match.c (gfc_match_space, gfc_match_strings): Use
693         gfc_current_form to find source form.
694         * module.c (gfc_dump_module): Use gfc_source_file when printing
695         module header.
696         * error.c (show_locus, show_loci) Use new data structures to print
697         locus.
698         * scanner.c (first_file, first_duplicated_file, gfc_current_file):
699         Remove.
700         (file_head, current_file, gfc_current_form, line_head, line_tail,
701         gfc_current_locus1, gfc_source_file): New global variables.
702         (gfc_scanner_init1): Set new global variables.
703         (gfc_scanner_done1): Free new data structures.
704         (gfc_current_locus): Return pointer to gfc_current_locus1.
705         (gfc_set_locus): Set gfc_current_locus1.
706         (gfc_at_eof): Set new variables.
707         (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
708         to new locus structure.
709         (gfc_check_include): Remove.
710         (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
711         (gfc_skip_comments): Use gfc_current_form, find locus with
712         gfc_current_locus1.
713         (gfc_next_char): Use gfc_current_form.
714         (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
715         (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
716         comment formatting.
717         (get_file): New function.
718         (preprocessor_line, include_line): New functions.
719         (load_file): Move down, rewrite to match new data structures.
720         (gfc_new_file): Rewrite to match new data structures.
721         * parse.c (next_statement): Remove code which is now useless. Use
722         gfc_source_form and gfc_source_file where appropriate.
723         * trans-decl.c (gfc_get_label_decl): adapt to new data structures
724         when determining locus of frontend code.
725         * trans-io.c (set_error_locus): Same.
726         * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
727         * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
728         preprocessor flags.
729         (all): Add missing initializers.
731 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
733         * Make-lang.in (trans-common.o): Remove redundant dependency.
734         (data.c): Replace object file name ...
735         (data.o): ... by the correct one.
737 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
739         * dump-parse-tree.c (gfc_show_array_ref): Print colon only
740         for ranges when dumping array references.
742 2004-05-14  Victor Leikehman  <lei@haifasphere.co.il>
744         * decl.c (variable_decl): Always apply default initializer.
746 2004-05-08  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
748         PR fortran/15206
749         * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
750         handle zero correctly.
752 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
754         * match.c (gfc_match): Eliminate dead code.
756 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
758         * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
759         Detect bad continuation line in fixed form sources.
761 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
763         PR fortran/15205
764         * iresolve.c (gfc_resolve_nearest): Add new function.
765         * intrinsic.h: ... declare it here.
766         * intrinsic.c (add_functions): ... add it as resolving function
767         for NEAREST.
768         
769 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
771         PR fortran/14066
772         * match.c (gfc_match_do): Allow infinite loops with
773         label-do-stmt. Do not enforce space after comma.
775 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
777         PR fortran/15051
778         * parse.c (parse_interface): Allow empty INTERFACE, remove
779         seen_body.
781 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
783         * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
784         decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
785         expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
786         intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
787         matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
788         primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
789         trans-array.c, trans-array.h, trans-common.c, trans-const.c,
790         trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
791         trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
792         trans-types.h, trans.c, trans.h: Update copyright years and
793         boilerplate.
794         * data.c: Likewise, also removed two whitespace-only lines.
795         * gfortranspec.c, lang.opt: Update copyright years.
797 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
799         PR fortran/14568
800         * trans-decl.c (generate_local_decl): Don't warn for unused
801         variables which are in common blocks. 
803 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
805         * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
806         trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
807         trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
809 2004-05-13  Victor Leikehman  <lei@haifasphere.co.il>
811         PR fortran/15314
812         * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
814 2004-05-13  Joseph S. Myers  <jsm@polyomino.org.uk>
816         * gfortran.texi: Use @table @emph instead of @itemize @emph.
817         Remove "set DEVELOPMENT".
818         (Compiling GFORTRAN): Remove.
820 2004-05-09  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
822         * array.c (match_subscript, match_array_ref): Add comments
823         explaining argument 'init'.
824         * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
825         trans-expr.c, trans.c: Fix some typos in comments.
826         * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
827         * primary.c (match_digits, match_integer_constant): Add comment
828         explaining signflag.
830 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
832         PR fortran/13940
833         * primary.c: Include system.h and flags.h, needed for pedantic.
834         (match_boz_constant): Allow "x" for hexadecimal constants, warn if
835         pedantic is set.
837 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
839         PR fortran/13940
840         * match.c (match_data_constant): Handle case where
841         gfc_find_symbol sets sym to NULL
843 2004-04-28  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
845         * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
846         dependency on mathbuiltins.def
848 2004-04-24  Victor Leikehman  <lei@il.ibm.com>
850         * trans-io.c (transfer_expr): Implemented recursive printing
851         of derived types.
853 2004-04-24  Andrew Pinski  <pinskia@physics.uc.edu>
855         * gfortranspec.c: Do not include multilib.h.
857 2004-04-24  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
859         * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
860         2004 to copyright years.
861         * trans-expr.c, trans-decl.c: Comment update, we now generate
862         GENERIC, not SIMPLE. Add 2004 to copyright years.
864 2004-04-24  Paul Brook  <paul@codesourcery.com>
866         * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
868 2004-04-24  Feng Wang  <fengwang@nudt.edu.cn>
870         PR 14817
871         * arith.c (gfc_arith_divide): Fix complex divide.
873 2004-04-23  Andrew Pinski  <pinskia@physics.uc.edu>
875         * gfortranspec.c: Include the target headers.
877 2004-04-18  Feng Wang  <fengwang@nudt.edu.cn>
879         PR fortran/14921
880         PR fortran/14540
881         * arith.c (arctangent2): New function.
882         * arith.h (arctangent2): Add function prototype.
883         * simplify.c (gfc_simplify_atan2): Use it.
884         (gfc_simplify_log): Use it.
886 2004-04-12  Diego Novillo  <dnovillo@redhat.com>
888         * fortran/f95-lang.c (gfc_expand_stmt): Remove.
889         (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
891 2004-04-11  Bud Davis  <bdavis9659@comcast.net>
893         PR fortran/14872
894         * trans-io.c (build_dt): Change REC to value.
896 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
898         PR 14394 
899         * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
900         the real value when converting mpf to string.
902 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
904         PR 14395
905         * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
906         the result.
908 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
910         PR fortran/14377
911         * simplify.c (simplify_min_max): Convert the type of the result.
913 2004-04-11  Paul Brook  <paul@codesourcery.com>
915         * gfortran.texi: Use full target triplet.
917 2004-04-11  Paul Brook  <paul@codesourcery.com>
919         * Make-lang.in (GFORTRAN_TEXI): Set it.
920         (fortran/dfortran.dvi): Use it.  Add fortran to include paths.
921         (fortran/gfortran.info): Ditto. 
922         * gfortran.texi: Major update.
923         * invoke.texi: New file.
925 2004-04-10  Paul Brook  <paul@codesourcery.com>
927         * trans-array.c (gfc_trans_allocate_temp_array,
928         gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
929         * trans-decl.c (gfc_build_dummy_array_decl,
930         gfc_get_symbol_decl, gfc_build_function_decl,
931         gfc_create_module_variable): Ditto.
932         * trans-expr.c (gfc_conv_variable): Ditto.
933         * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
934         * trans.h (GFC_DECL_STRING): Remove.
935         (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
936         GFC_DECL_ASSIGN): Renumber flags.
938 2004-04-05  Paul Brook  <paul@codesourcery.com>
940         PR 13252
941         PR 14081
942         * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
943         and stack_restore.
944         * gfortran.h (struct gfc_charlen): Add backend_decl.
945         * trans-array.c (gfc_trans_allocate_temp_array,
946         gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
947         (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
948         Remove old, broken string handling.
949         (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
950         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
951         gfc_trans_deferred_array): Handle character arrays.
952         * trans-const.c (gfc_conv_const_charlen): New function.
953         * trans-const.h (gfc_conv_const_charlen): Add prototype.
954         * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
955         as static.
956         (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
957         (gfc_create_string_length): New function.
958         (gfc_get_symbol_decl): Create lengths for character variables.
959         (gfc_get_fake_result_decl): Ditto.
960         (gfc_build_function_decl): Only set length for assumed length
961         character arguments.
962         (gfc_trans_dummy_character): New function.
963         (gfc_trans_auto_character_variable): Rewrite.
964         (gfc_trans_deferred_vars): Handle more types of character variable.
965         (gfc_create_module_variable): String lengths have moved.
966         (gfc_generate_function_code): Initialize deferred var chain earlier.
967         * trans-expr.c (gfc_conv_init_string_length): Rename ...
968         (gfc_trans_init_string_length):  ... to this.
969         (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
970         gfc_conv_function_call): Update to new format for character variables.
971         (gfc_conv_string_length): Remove.
972         (gfc_conv_string_parameter): Update assertion.
973         * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
974         * trans-io.c (set_string): Use new macro names.
975         * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
976         * trans-types.c (gfc_get_character_type): Use existing length expr.
977         (gfc_is_nodesc_array): Make public.
978         (gfc_get_dtype_cst): Rename ...
979         (gfc_get_dtype): ... to this.  Handle unknown size arrays.
980         (gfc_get_nodesc_array_type): Use new name.
981         (gfc_sym_type): New character variable code.
982         (gfc_get_derived_type): Ditto.
983         (gfc_get_function_type): Evaluate character variable lengths.
984         * trans-types.h (gfc_strlen_kind): Define.
985         (gfc_is_nodesc_array): Add prototype.
986         * trans.h: Update prototypes.
987         (struct lang_type): Update comments.
988         (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
989         (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
991 2004-04-04  Paul Brook  <paul@codesourcery.com>
993         * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
994         * options.c (gfc_init.options, gfc_handle_option): Ditto.
995         * trans-expr.c (gfc_conv_function_call): Ditto.
996         * trans-types.c (gfc_is_nodesc_array): Ditto
997         * lang.opt (fg77-calls): Remove.
999 2004-04-04  Paul Brook  <paul@codesourcery.com>
1001         * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
1002         (gfc_conv_descriptor_base): Rename ...
1003         (gfc_conv_descriptor_offset): ... to this.
1004         (gfc_trans_allocate_array_storage): Set offset to zero.
1005         (gfc_conv_array_base): Rename ...
1006         (gfc_conv_array_offset): ... to this.
1007         (gfc_conv_array_index_ref): Add offset parameter.
1008         (gfc_conv_array_ref): Include offset.
1009         (gfc_trans_preloop_setup): Use existing offset.
1010         (gfc_trans_allocate_temp_array,  gfc_array_allocate,
1011         gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1012         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1013         gfc_conf_ss_descriptor): Set offset.
1014         * trans-array.h: Rename prototypes.
1015         * trans-const.h (gfc_index_zero_node): Define.
1016         * trans-decl.c (gfc_build_qualified_array): Change base to offset.
1017         * trans-types.c (gfc_get_array_type_bounds): Ditto.
1018         (gfc_get_nodesc_array_type): Calculate offset before upper bound.
1020 2004-03-25  Diego Novillo  <dnovillo@redhat.com>
1022         * convert.c (convert): Don't handle WITH_RECORD_EXPR.
1024 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
1026         PR 14055
1027         * arith.c (gfc_convert_integer,gfc_convert_real):  Removed leading '+'
1028         before conversion by gmp library call.
1030 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
1032         PR 12921
1033         * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
1035 2004-02-24  Richard Henderson  <rth@redhat.com>
1037         * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
1039 2004-02-19  Loren J. Rittle  <ljrittle@acm.org>
1041         * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
1042         (fortran/gfortran.info): ... to here.
1043         (f95.srcinfo): New.
1045 2004-02-16  Richard Henderson  <rth@redhat.com>
1047         * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
1048         * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
1049         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
1050         (gfc_expand_function): Rename from expand_function_body, make static,
1051         don't do anything except invoke tree_rest_of_compilation.
1052         (gfc_be_parse_file): Invoke cgraph.
1053         (gfc_expand_decl): Remove.
1054         (gfc_init_builtin_functions): Add __builtin_init_trampoline and
1055         __builtin_adjust_trampoline.
1056         * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
1057         (gfc_finalize): New.
1058         (gfc_generate_function_code): Use it.  Lower nested functions.
1059         * trans-expr.c (gfc_conv_function_call): Add static chain operand
1060         to call_expr.
1061         * trans.c (gfc_build_function_call): Likewise.
1062         * trans.h (expand_function_body): Remove.
1064 2004-02-15  Victor Leikehman  <lei@il.ibm.com>
1066         PR gfortran/13433
1067         * trans-decl.c (gfc_build_function_decl) For functions
1068         returning CHARACTER pass an extra length argument,
1069         following g77 calling conventions.
1070         * trans-types.c (gfc_get_function_type) Ditto.
1071         * trans-expr.c (gfc_conv_function_call) Ditto.
1073 2004-02-14  Paul Brook  <paul@codesourcery.com>
1075         * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
1077 2004-02-12  Paul Brook  <paul@nowt.org>
1079         * BUGS: Remove.
1081 2004-02-08  Steve Kargl  <sgk@troutmask.apl.washington.edu>
1083         * gfortran.texi: Fix typos.
1085 2004-02-07  Bud Davis  <bdavis9659@comcast.net>
1087         PR gfortran/13909
1088         * intrinsic.c (add_conversions) Use logical conversion instead
1089         of real.
1090         * trans-types.c (gfc_get_logical_type) implemented logical*1
1091         and logical*2.
1093 2004-01-17  Paul Brook  <paul@codesourcery.com>
1095         * lang-specs.h: Remove %<fixed-form.
1097 2004-01-15  Toon Moene  <toon@moene.indiv.nluug.nl>
1099         * lang-specs.h: Enable preprocessing of source files
1100         ending in .F, .fpp, .FPP, .F90 and .F95.
1102 2004-01-13  Toon Moene  <toon@moene.indiv.nluug.nl>
1104         PR fortran/12912
1105         * lang-specs.h: Enable compilation of files ending
1106         in .f, .for and .FOR.
1108 2004-01-11  Paul Brook  <paul@codesourcery.com>
1110         * trans-stmt.c (gfc_trans_if_1): New function.
1111         (gfc_trans_if): Use it.
1113 2004-01-11  Erik Schnetter  <schnetter@uni-tuebingen.de>
1115         * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
1116         (gfc_option_t): Add max_identifier_length.
1117         * lang.opt: Add fmax-identifier-length.
1118         * match.c (parse_name): Use limit.
1119         * options.c (gfc_init_options): Set max_identifier_length.
1120         (gfc_handle_option): Ditto.
1122 2004-01-11  Feng Wang  <fengwang@nudt.edu.cn>
1124         * intrinsic.c (add_functions): Add resolve function to dcmplx.
1125         * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
1126         * iresolve.c (gfc_resolve_dcmplx): New function.
1128 2004-01-10  Paul Brook  <paul@codesourcery.com>
1130         * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
1131         * trans-types.c (gfc_sym_type): Handle external dummy procedures.
1132         (gfc_return_by_reference): Correct condition.
1133         (gfc_get_function_type): Ditto.
1135 2004-01-10  Paul Brook  <paul@codesourcery.com>
1137         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
1138         types.
1140 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
1142         * iresolve.c: Use correct kind.
1144 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
1146         PR fortran/13467
1147         * trans-decl.c (gfc_create_module_variable):  Output array valued
1148         parameters.
1150 2004-01-10  Paul Brook  <paul@codesourcery.com>
1152         * resolve.c (resolve_branch): Get error message right way round.
1154 2004-01-10  Canqun Yang <canqun@nudt.edu.cn>
1156         * trans-array (gfc_conv_loop_setup): Adjust comment to track
1157         reality.
1158         (gfc_array_allocate): Don't count size of element twice.
1160 2004-01-04  Paul Brook  <paul@codesourcery.com>
1162         * lang.opt (i8, r8, std=*): Remove RejectNegative.
1164 2004-01-04  Paul Brook  <paul@codesourcery.com>
1166         * error.c (gfc_notify_std): New function.
1167         * gfortran.h (gfc_notify_std): Declare.
1168         (GFC_STD_*): Define.
1169         (gfc_option_t): Add warn_std and allow_std.
1170         * intrinsic.c (gfc_init_expr_extensions): Fix logic.
1171         (gfc_intrinsic_func_interface): Use gfc_notify_std.
1172         * check.c (check_rest): Use gfc_notify_std.
1173         * match.c (gfc_match_pause): Ditto.
1174         (gfc_match_assign): Ditto.
1175         (gfc_match_goto): Ditto.
1176         * resolve.c (resolve_branch): Ditto.
1177         * lang.opt: Add std=<foo> and w.
1178         * options.c (gfc_init_options): Set allow_std and warn_std.
1179         (gfc_handle_option): Handle OPT_std_* and OPT_w.
1181 2004-01-01  Paul Brook  <paul@codesourcery.com>
1183         * array.c (gfc_append_constructor): Take constructor, not expression.
1184         * data.c (struct gfc_expr_stack): Remove.
1185         (expr_stack): Remove.
1186         (find_con_by_offset): Rename from find_expr_in_con.
1187         (find_con_by_component): Rename from find_component_in_con.
1188         (gfc_get_expr_stack): Remove.
1189         (gfc_assign_data_value): Rewrite.
1190         (gfc_expr_push): Remove.
1191         (gfc_expr_pop): Remove.
1192         (gfc_advance_section): Rename from
1193         gfc_modify_index_and_calculate_offset.  Handle unbounded sections.
1194         (gfc_get_section_index): Handle unbounded sections.
1195         * gfortran.h: Update prototypes.
1196         * resolve.c (check_data_variable): Array section maight not be the
1197         last ref.
1199 2004-01-01  Paul Brook  <paul@codesourcery.com>
1201         PR fortran/13432
1202         * resolve.c (resolve_symbol): Allow assumed length function results.
1204 2004-01-01  Steve Kargl  <sgk@troutmask.apl.washington.edu>
1206         * match.c (gfc_match_pause): Fix spelling.
1208 2004-01-01  Steven Bosscher  <stevenb@suse.de>
1210         PR fortran/13251
1211         * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
1212         reference from the expression.
1214 2003-12-26  Feng Wang  <fengwang@nudt.edu.cn>
1216         * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
1217         dumping.
1218         * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
1219         (gfc_exec_op): New EXEC_LABEL_ASSIGN.
1220         (symbol_attribute):New variable attribute: assign.
1221         * io.c (resolve_tag):Integer variable is allowed.
1222         (match_dt_format): Add ASSIGN statement. Set assign flag.
1223         * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
1224         (gfc_match_assign): Add ASSIGN statement. Set assign flag.
1225         (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
1226         * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
1227         (next_statement): Add ST_LABEL_ASSIGNMENT.
1228         (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
1229         * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
1230         (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
1231         * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
1232         * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
1233         assign.  Put them into the stuct lang_decl.
1234         * trans-io.c (set_string): Add the assign statement.
1235         * trans-stmt.c (gfc_trans_label_assign): New function.
1236         (gfc_trans_goto): Translate ASSIGNED GOTO statement.
1237         * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
1238         * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
1239         * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
1240         (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
1241         (GFC_DECL_ASSIGN(node)): New macro to access flag.
1243 2003-12-31  Huang Chun <chunhuang73@hotmail.com>
1245         PR fortran/13434
1246         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in 
1247         minval/maxval.
1249 2003-12-22  Toon Moene  <toon@moene.indiv.nluug.nl>
1251         * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
1252         that arguments to subroutines/functions can't alias themselves, nor global
1253         memory.
1255 2003-12-20  Steven Bosscher  <stevenb@suse.de>
1257         * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
1258         * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
1260 2003-12-12  Huang Chun <chunhuang73@hotmail.com>
1262         * primary.c (match_substring): Fix substring bug for start point
1263         or end point is NULL.
1264         * trans-expr.c (gfc_conv_substring): Ditto
1265         * trans-types.c (gfc_sym_type): Get correct type of scalar 
1266         character variables.
1267         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in 
1268         derived type.
1270 2003-12-10  Richard Henderson  <rth@redhat.com>
1272         * options.c (gfc_post_options): Don't ever use rtl inlining.
1274 2003-12-05  Canqun Yang  <canqun@nudt.edu.cn>
1276         * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
1277         * trans-equivalence.c: Remove.
1278         * trans-decl.c (gfc_get_symbol_decl): Update to match.
1279         (gfc_generate_function_code): Ditto.
1280         * trans-array.c (gfc_conv_array_parameter): Ditto.
1281         * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
1282         (F95_ADDITIONAL_OBJS): Add stor-layout.o
1283         * trans.h (gfc_trans_equivalence): Remove.
1284         * gfortran.h (struct gfc_equiv): Add used field.
1285         (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
1286         equiv_offset fields.
1288 2003-12-05  Richard Henderson  <rth@redhat.com>
1290         * trans.c (gfc_build_addr_expr): New.
1291         (gfc_build_indirect_ref, gfc_build_array_ref): New.
1292         * trans.h: Declare them.
1293         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1294         trans-stmt.c, trans.c (*): Use them.
1296         * f95-lang.c (gfc_post_options): Remove dead prototype.
1297         * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
1298         * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
1299         allocation size.
1301 2003-12-01  Feng Wang  <fengwang@nudt.edu.cn>
1303         * io.c (gfc_match_format): Check for missing format label.
1305 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
1307         PR fortran/13155
1308         * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
1309         from interfaces in modules.
1311 2003-11-30  Paul Brook  <paul@nowt.org>
1313         * trans-array.c (gfc_trans_g77_array): Make non-static.
1314         (gfc_trans_assumed_size): Remove.
1315         (gfc_trans_dummy_array_bias): Explicitly free temporary.
1316         * trans-array.h (gfc_trans_g77_array): Add prototype.
1317         (gfc_trans_assumed_size): Remove.
1318         * trans-decls.c (gfor_fndecl_push_context): Remove.
1319         (gfor_fndecl_pop_context): Remove.
1320         (gfc_build_function)decls): Don't create them.
1321         (gfc_trans_deferred_vars): Update to match. Remove dead code.
1322         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
1324 2003-11-30  Kejia Zhao  <kejia_zh@nudt.edu.cn>
1326         * trans-array.c (gfc_conv_array_parameter): Simplify
1327         array argument passing for array name actual argument.
1328         * trans-expr.c (gfc_conv_function_call): Ditto
1329         * trans-types.c (gfc_is_nodesc_array):Ditto.
1331 2003-11-30  Paul Brook  <paul@nowt.org>
1333         * f95-lang.c (gfc_post_options): Move ...
1334         * options.c (gfc_post_options): .. to here.  Handle inlining options.
1335         * gfortran.h (gfc_post_options): Add prototype.
1337 2003-11-28  Richard Henderson  <rth@redhat.com>
1339         * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
1341 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
1343         * trans.h (has_alternate_specifier): New global variable.
1344         * match.c (gfc_match_call): Handle actual arguments associated with
1345         alternate return indicators.
1346         * trans-expr.c (gfc_conv_function_call): Ditto
1347         * trans-stmt.c (gfc_trans_call): Ditto
1348         (gfc_trans_return): Handle return statement with value.
1349         * trans-decl.c (gfc_generate_function_code): Handle functions with
1350         asterisk dummy.
1351         (gfc_get_fake_result_decl): Ditto
1352         * trans-types.c (gfc_get_function_type): Ditto
1353         * resolve.c (resolve_actual_arglist): Check alternate return indicators.
1354         (resolve_formal_arglist): Check asterisk dummy.
1356 2003-11-27  Paul Brook  <paul@nowt.org>
1358         * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
1359         allocation interface.
1360         (gfc_conv_ array_parameter): Ditto.
1361         (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
1362         * trans-array.c: Update prototype.
1363         * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
1364         (gfc_trans_auto_character_variable): Use new memory alloc interface.
1365         * trans-expr.c (gfc_conv_string_tmp): Ditto.
1366         (gfc_conv_function_call): Use gfc_conv_string_tmp.
1367         * trans-stmt.c (gfc_do_allocate):  Use new memory alloc interface.
1368         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
1369         * trans.h (gfc_ss_info): Remove unused pdata field.
1370         * trans.c (gfc_create_var_np): Change T to V.
1372 2003-11-26  Richard Henderson  <rth@redhat.com>
1374         * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
1375         * trans-intrinsic.c (gfc_intrinsic_map): ... here.  Add SCALE,
1376         FRACTION, NEAREST, SET_EXPONENT.
1377         (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
1378         Fix GTY marking.  Remove unnecessary const's.
1379         (LIBM_FUNCTION): Rename from I_LIB.
1380         (LIBF_FUNCTION): New.
1381         (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
1382         conventions.  Assume the expr signature is correct.  Mark const.
1383         (gfc_conv_intrinsic_exponent): Use library functions.
1384         (gfc_conv_intrinsic_set_exponent): Remove.
1385         (gfc_conv_intrinsic_scale): Remove.
1386         (gfc_conv_intrinsic_nearest): Remove.
1387         (gfc_conv_intrinsic_fraction): Remove.
1388         (gfc_conv_intrinsic_function): Update.
1389         * trans-decl.c (gfor_fndecl_math_exponent4): New.
1390         (gfor_fndecl_math_exponent8): New.
1391         (gfc_build_intrinsic_function_decls): Set them.
1392         * trans.h: Declare them.
1394 2003-11-25  Canqun Yang  <canqun@nudt.edu.cn>
1396         * trans-common.c (gfc_layout_global_equiv): Locate the error for
1397         underflow COMMON block.
1398         (gfc_trans_one_common): Fix bug for size of COMMON block containing
1399         EQUIVALENCE object. Also fix typo in an error message.
1401 2003-11-25  Diego Novillo  <dnovillo@redhat.com>
1403         * Make-lang.in: Add check-gfortran to lang_checks.
1404         (check-f95): Alias for check-gfortran.
1406 2003-11-25  Jason Merrill  <jason@redhat.com>
1408         * Make-lang.in (f95.tags): Create TAGS.sub files in each
1409         directory and TAGS files that include them for each front end.
1411 2003-11-24  Paul Brook  <paul@nowt.org>
1413         PR fortran/13154
1414         * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
1416 2003-11-24  Paul Brook  <paul@nowt.org>
1418         * expr.c (simplify_const_ref): Return SUCCESS for things we don't
1419         handle.
1420         * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
1422 2003-11-24  Paul Brook  <paul@nowt.org>
1424         PR fortran/13105
1425         * array.c (gfc_array_ref_shape): Handle elemental dimensions.
1426         * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
1428 2003-11-20  Richard Henderson  <rth@redhat.com>
1430         * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
1431         (gfc_conv_array_base): Likewise.
1432         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1433         * trans-expr.c (gfc_conv_string_tmp): Likewise.
1434         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
1435         * trans-stmt.c (gfc_trans_character_select): Likewise.
1437 2003-11-13  Paul Brook  <paul@nowt.org>
1439         * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
1441 2003-11-13  Canqun Yang  <canqun@nudt.edu.cn>
1443         * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
1444         (resolve_equivalence): New function.
1445         (resolve_equivalence_derived): New function.
1447 2003-11-12  Richard Henderson  <rth@redhat.com>
1449         * trans.c (gfc_trans_code): Use annotate_with_locus instead of
1450         annotate_all_with_locus.
1452 2003-11-11  Canqun Yang  <canqun@nudt.edu.cn>
1454         * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
1455         * trans-decl.c (gfc_finish_var_decl): Modified.
1457 2003-11-08  Paul Brook  <paul@nowt.org>
1459         PR fortran/12704
1460         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
1461         arrays.
1463 2003-11-06  Paul Brook  <paul@nowt.org>
1465         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
1467 2003-11-02  Canqun Yang  <canqun@nudt.edu.cn>
1469         * match.c (gfc_match_stopcode): Assign '0' to stop_code.
1471 2003-10-27  Anthony Green  <green@redhat.com>
1473         * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
1474         (f95.stagefeedback): Ditto.
1476 2003-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
1478         PR fortran/12682
1479         * Make-lang.in (f95.stageprofile): Add.
1480         (f95.stagefeedback): Add.
1482 2003-10-23  Richard Henderson  <rth@redhat.com>
1484         * f96-lang.c (gfc_gimplify_expr): Remove.
1485         (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
1486         (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
1488 2003-10-23  Richard Henderson  <rth@redhat.com>
1490         * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
1492 2003-10-20  Paul Brook  <paul@nowt.org>
1494         * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
1495         * trans-stmt.c (gfc_trans_do_while): Ditto.
1497 2003-10-17  Paul Brook  <paul@nowt.org>
1499         * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
1501 2003-10-17  Paul Brook  <paul@nowt.org>
1503         * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
1505 2003-10-17  Feng Wang  <wf_cs@yahoo.com>
1507         * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
1508         (gfc_resolve_minloc): Ditto.
1509         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
1510         Return the value after subtracting the lower bound.
1512 2003-10-16  Richard Henderson  <rth@redhat.com>
1514         * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
1516 2003-10-16  Steven Bosscher  <steven@gcc.gnu.org>
1518         * lang.c: Remove -M option for now, it's in the way for C.
1520 2003-10-14  Jason Merrill  <jason@redhat.com>
1522         * Make-lang.in (f95.tags): New rule.
1524 2003-10-13  Richard Henderson  <rth@redhat.com>
1526         * trans.c (gfc_trans_code): Use annotate_all_with_locus.
1528 2003-10-13  Paul Brook  <paul@nowt.org>
1530         * trans-decl.c (generate_local_decl): Don't create junk variables.
1532 2003-10-13  Paul Brook  <paul@nowt.org>
1534         * resolve.c (resolve_formal_arglist): Use function result decl in
1535         preference to function decl.
1537 2003-10-12  Richard Henderson  <rth@redhat.com>
1539         * f95-lang.c (gfc_define_builtin): New const_p argument.  Set
1540         TREE_READONLY.  Update all callers.
1542 2003-10-12  Feng Wang  <wf_cs@yahoo.com>
1544         * iresolve.c (gfc_resolve_cshift): Change to match implementation.
1545         * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
1546         (gfc_is_intrinsic_libcall): Add CSHIFT.
1548 2003-10-12  Richard Henderson  <rth@redhat.com>
1550         * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
1551         (gfc_trans_array_constructor_value): Likewise.
1552         (gfc_conv_array_initializer): Likewise.
1553         * trans-stmt.c (gfc_trans_character_select): Likewise.
1555 2003-11-12  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1557         * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
1559 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
1561         * check.c (gfc_check_repeat): Check arguments are scalar.
1562         (gfc_check_trim): New function.
1563         * intrinsic.h (gfc_check_trim): Add prototype.
1564         * intrinsic.c (add_functions): Use it.
1565         * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
1566         Decalare.
1567         * trans-decl.c: Ditto.
1568         (gfc_build_intrinsic_fucntion_decls): Set them.
1569         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
1570         (gfc_conv_intrinsic_trim): New function.
1571         (gfc_conv_intrinsic_repeat): New function.
1572         (gfc_conv_intrinsic_function): Use them.
1574 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
1576         * trans-types.c (gfc_sym_type): Handle result variables.
1578 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
1580         * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
1581         gfc_get_character_type.
1583 2003-10-11  Feng Wang  <wf_cs@yahoo.com>
1585         * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
1587 2003-10-11  Paul Brook  <paul@nowt.org>
1589         * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
1590         (gfc_resolve_dprod): New function.
1591         (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
1592         * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
1593         (gfc_resolve_dprod): Declare.
1594         * intrinsic.c (add_functions): Use them.
1595         * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
1597 2003-10-06  Richard Henderson  <rth@redhat.com>
1599         * f95-lang.c (gfc_init_builtin_functions): Add clzll.
1600         * trans-intrinsic.c (call_builtin_clz): Use it.
1602 2003-10-05  Paul Brook  <paul@nowt.org>
1604         * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
1605         * trans-decl.c (gfc_generate_function_code): Set
1606         cfun->function_end_locus.
1608 2003-09-24  Jason Merrill  <jason@redhat.com>
1610         * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
1611         TREE_LOCUS.
1613 2003-09-21  Lifang Zeng  <zlf605@hotmail.com>
1614         Paul Brook  <paul@nowt.org>
1616         * Make-lang.in (F95_OBJS): Add fortran/data.o.
1617         * array.c (gfc_inser_constructor): New function.
1618         (gfc_get_constructor): New function.
1619         (gfc_free_constructor): Initialize offset and repeat.
1620         (iterator_stack): Remove.
1621         (expand_info): Add offset, component and repeat fields.
1622         (expand_constructor): Set them.
1623         (expand): Set new fields.
1624         (gfc_copy_constructor): Ditto. Avoid recursion.
1625         * gfortran.h: Add prototypes for new functions.
1626         (gfc_constructor): Add offset, component and repeat.
1627         (iteratio_stack): Move to here.
1628         * resolve.c (check_data_variable): Convert data values into variable
1629         initializers.
1630         (traverse_data_list): Build implicit loop chain.
1631         (gfc_resolve): Ditto.
1632         * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
1633         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
1634         * trans-expr.c (gfc_conv_structure): Handle array initializers.
1635         (gfc_conv_expr): Update to match.
1636         * trans.h (gfc_conv_structure): Declare.
1637         * data.c: New file.
1639 2003-09-20  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1641         * trans.h: Add declarations for gfor_fndecl_si_kind and
1642         gfor_fndecl_sr_kind.
1643         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1644         * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
1645         (g95_conv_intrinsic_sr_kind): New function.
1646         (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
1647         SELECTED_REAL_KIND.
1649 2003-09-17  Lars Segerlund  <Lars.Segerlund@comsys.se>
1651         * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
1652         instead of _4 and _8 as postfix for libgfortran calls.
1654 2003-09-16  Paul Brook  <paul@nowt.org>
1656         * array.c (compare_bounds): New function.
1657         (gfc_compare_array_spec): Use it.
1659 2003-09-14  Paul Brook  <paul@nowt.org>
1661         * primary.c (gfc_match_rvalue): Make sure sym->result is set.
1662         * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
1664 2003-09-14  Paul Brook  <paul@nowt.org>
1666         * check.c (dim_rank_check): Allow assumed bounds if requested.
1667         (gfc_check_lbound): Call it.
1668         (gfc_check_ubound): Ditto.
1669         (gfc_check_size): Change to match.
1670         * simplify.c (gfc_simplify_bound): New function.
1671         (gfc_simplify_lbound): New function.
1672         (gfc_simplify_ubound): New function.
1673         * intrinsic.h: Declare them.
1674         * intrinsic.c (add_functions): Use them.
1676 2003-09-14  Paul Brook  <paul@nowt.org>
1678         * io.c (format_lex): Initialize negative_flag.
1679         (check_format): Intialize repeat.
1680         * trans-io.c (gfc_new_nml_name_expr): Declare static.
1681         (gfc_new_var_expr): Ditto.
1683 2003-09-14  Paul Brook  <paul@nowt.org>
1685         * trans-array.c (gfc_conv_array_initializer): Handle derived types.
1686         * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
1688 2003-09-12  Paul Brook  <paul@nowt.org>
1690         * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
1692 2003-09-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
1694         * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
1695         for a correct expression.
1697 2003-09-10  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1699         * trans-intrinsic.c (real_compnt_info): New struct.
1700         (prepare_arg_info): New function.
1701         (gfc_conv_intrinsic_set_exponent): New function.
1702         (gfc_conv_intrinsic_scale): New function.
1703         (gfc_conv_intrinsic_nearest): New function.
1704         (gfc_conv_intrinsic_fraction): New function.
1705         (gfc_conv_intrinsic_exponent): New function.
1706         (gfc_conv_intrinsic_spacing): New function.
1707         (gfc_conv_intrinsic_rrspacing): New function.
1708         (gfc_conv_intrinsic_function): Use them.
1710 2003-08-24 XiaoQiang Zhang  (zhangapache@yahoo.com>
1712         * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for 
1713         build_int_2 changed from (high, low) to (low, high).
1714         * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
1715         ioparm_namelist_read_mode, iocall_set_nml_val_int,
1716         iocall_set_nml_val_float, iocall_set_nml_val_char,
1717         iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
1718         (gfc_build_io_library_fndecls): Add variable initialization.
1719         (gfc_new_nml_name_expr, get_new_var_expr): New function.
1720         (build_dt): Add namelist support.
1721         * io.c (value): New variable.
1722         (check_format): Support FMT_H now.
1724 2003-09-07  Paul Brook  <paul@nowt.org>
1726         * io.c (gfc_resolve_dt): Error if format label is not defined.
1728 2003-09-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1730         * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is 
1731         about case_switch's break. The other is about building the condition 
1732         statement tree, which judges the argument in the range of the 
1733         corresponding integer type.
1734         * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
1735         for the large values.
1737 2003-09-05  Paul Brook  <paul@nowt.org>
1739         * f95-lang.c (expand_function_body): Gimplify the function.
1741 2003-09-04  Jeff Law  <law@redhat.com>
1743         * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
1744         index zero!
1746 2003-09-04  Paul Brook  <paul@nowt.org>
1748         * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
1749         (gfc_expand_stmt): New function.
1750         (LANG_HOOKS_RTL_EXPAND_STMT): Define.
1751         (expand_function_body): Use tree_rest_of_compilation.
1752         * trans-decl.c (gfc_generate_function_code): Don't free cfun.
1754 2003-09-03  Jeff Law  <law@redhat.com>
1756         * f95-lang.c (gfc_init_builtin_functions): C arrays start at
1757         index zero!
1759 2003-08-30  Paul Brook  <paul@nowt.org>
1761         * f95-lang.c (builtin_function): Remove #if 0 code.
1762         (gfc_define_builtin): New function.
1763         (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
1764         * mathbuiltins.def: New file.
1765         * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
1766         (gfc_intrinsic_map): Use mathbuiltins.def.
1767         (gfc_intrinsic_builtin_t): Remove.
1768         (gfc_build_intrinsic_lib_fndecls): Update.
1769         * trans-types.c (gfc_init_types): Remove redundant initilaization of
1770         signed_size_type_node.
1772 2003-08-29  Paul Brook  <paul@nowt.org>
1774         * arith.c (gfc_real_kinds): Use correct minimum exponents.
1776 2003-08-22  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1778         * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
1779         (gfc_conv_intrinsic_function): Add MODULO.
1781 2003-08-22  Jason Merrill  <jason@redhat.com>
1783         * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
1785 2003-08-22  Andreas Jaeger  <aj@suse.de>
1787         * Make-lang.in (f95.install-common): Add DESTDIR support.
1788         * (f95.install-info): Likewise.
1789         (f95.uninstall): Likewise.
1791 2003-08-19  Diego Novillo  <dnovillo@redhat.com>
1793         * trans-types.c (gfc_init_types): Initialize
1794         signed_size_type_node with size_type_node.
1796 2003-08-18  Paul Brook  <paul@nowt.org>
1798         * dependency.c (gfc_dependency): New enum.
1799         (check_another_array_ref): Remove.
1800         (gfc_get_array_from_component): Remove.
1801         (get_x): Remove.
1802         (get_range): Remove.
1803         (get_no_of_elements): Use mpz_t, not mpf_t.
1804         (transform_sections): New function.
1805         (gfc_check_range_range): Rename ...
1806         (gfc_check_section_vs_section): ... to this.  Use new function.
1807         (gfc_is_inside_range): Rewrite to match.
1808         (gfc_check_element_vs_section): Ditto.
1809         (gfc_check_element_vs_element): Ditto.
1810         (get_deps): Ditto.
1811         (gfc_dep_resolver): Ditto.  Remove unused parameter.
1812         * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
1813         gfc_check_element_vs_element, gfc_is_inside_range,
1814         gfc_get_array_from_component): Remove prototypes for static functions.
1815         (gfc_dep_resolver): Update prototype.
1816         * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
1818 2003-08-15  Paul Brook  <paul@nowt.org>
1820         * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
1821         return values to parent scope.
1822         (gfc_build_dummy_array_decl): Ditto.
1824 2003-08-14  Paul Brook  <paul@nowt.org>
1826         * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
1827         size of the type, not the pointer.
1828         * resolve.c (resolve_symbol): Give more accurate error message.
1830 2003-08-10  Paul Brook  <paul@nowt.org>
1832         * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
1834 2003-08-10  Paul Brook  <paul@nowt.org>
1836         * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
1837         type components.
1839 2003-08-10  Chun Huang  <compiler@sohu.com>
1841         * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
1842         (resolve_symbol): Ditto.
1843         * trans-expr.c (gfc_conv_statement_function): New function.
1844         (gfc_conv_function_expr): Use it.
1846 2003-08-10  Paul Brook  <paul@nowt.org>
1848         * trans-array.c (gfc_conv_ss_startstride): Handle functions.
1849         (walk_function_expr): Set section rank.
1850         * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
1852 2003-08-10  Paul Brook  <paul@nowt.org>
1854         * intrinsic.c (add_sym): Prefix names with correct string.
1855         (add_sym_0s): New function.
1856         (add_subroutines): Register abort.
1858 2003-08-10  Erik Schnetter  <schnetter@uni-tuebingen.de>
1860         * gfortran.h: Introduce options to control the mangling.
1861         * lang.opt: Likewise.
1862         * options.c (gfc_init_options): Handle the options.
1863         * trans-common.c (gfc_sym_mangled_common_id): New function.
1864         (gfc_build_common_decl): Call it.
1865         * trans-decl.c (gfc_sym_mangled_function_id): New function.
1866         (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
1868 2003-08-09  Paul Brook  <paul@nowt.org>
1870         * module.c (mio_symbol): Always ouput a namespace for formal args.
1871         (load_needed): Namespace now belong to their proper symbol.
1872         (gfc_dump_module): Change G95=>GFORTRAN.
1874 2003-08-05  Paul Brook  <paul@nowt.org>
1876         * options.c: Force -fg77-calls.
1878 2003-08-02  Paul Brook  <paul@nowt.org>
1880         * Makelang.in: Rename G95_* to GFORTRAN_*.
1881         * All sources: Rename G95_* to GFC_*.
1883 2003-08-01  Paul Brook  <paul@nowt.org>
1885         * fortran/Make-lang.in: Use GMPLIBS.
1886         * fortran/config-lang.in: Set need_gmp.
1887         * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
1889 2003-07-27  Andreas Jaeger  <aj@suse.de>
1891         * trans-decl.c (gfc_generate_constructors): Convert prototype to
1892         ISO C90.
1893         * trans-const.c (gfc_init_constants): Likewise.
1894         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
1896         * gfortranspec.c: Convert to ISO C90.
1897         (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
1899 2003-07-26  Paul Brook  <paul@nowt.org>
1901         * lang.opt: Add -fdump-parse-tree.
1902         * options.c (gfc_handle_option): Ditto.
1903         * resolve.c (resolve_forall_iterators): Convert to proper type.
1904         * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
1906 2003-07-26  Paul Brook  <paul@nowt.org>
1908         * Makefile.in: Add build dependencies on files common with rest of gcc.
1910 2003-07-26  Lifang Zeng  <zlf605@hotmail.com>
1912         * trans.h: Declare g95_trans_pointer_assignment.
1913         * trans-expr.c (g95_trans_pointer_assignment): New function.
1914         (g95_trans_pointer_assign): Use it.
1915         * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
1916         (g95_trans_pointer_assign_need_temp): New function.
1918 2003-07-26  Paul Brook  <paul@nowt.org>
1920         * gfortran.texi: Replace references to g95.
1922 2003-07-26  Paul Brook  <paul@nowt.org>
1924         Rename g95_* to gfc_*.
1926 2003-07-25  Paul Brook  <paul@nowt.org>
1927         
1928         * gfortran.h: Rename from g95.h.
1929         * trans-types.c (boolean_type_node, booelan_true_node,
1930         boolean_false_node): Remove.
1931         * trans-types.h: Ditto.
1933 2003-07-25  Chun Huang  <compiler@sohu.com>
1935         * parse.c (accept_statement): Implement BLOCK DATA statement.
1936         * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
1937         variables.
1939 2003-07-24  Lifang Zeng  <zlf605@hotmail.com>
1941         * trans-stmt.c (temporary_list): Define.
1942         (g95_trans_assign_need_temp): New function.
1943         (g95_trans_forall_1): Modified for WHERE.
1944         (g95_trans_where_assign): Modified.
1945         (g95_trans_where_2): Modified.
1946         (g95_evaluate_where_mask): Modified.
1947         (g95_trans_where): Modified.
1948         (g95_get_temp_expr): Removed.
1949         (g95_add_to_where_stmt_list): Removed.
1950         (compute_overall_iter_number): Modified for WHERE.
1951         * trans.h: Remove where_stmt_list.
1953 2003-07-24  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1955         * lang.opt: Correct description of options -J and -M.
1957 2003-07-23  Steven Bosscher   <steven@gcc.gnu.org>
1959         * lang.opt: Move help text to here.
1960         * lang-options.h: Remove.
1962 2003-07-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1963         * iresolve.c (g95_resolve_transpose): Proper variable in switch.
1964         * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
1965         on kind.
1967 2003-07-22  Steven Bosscher  <steven@gcc.gnu.org>
1968         Paul Brook  <paul@nowt.org>
1970         * check.c (check_rest): Use global pedantic flag.
1971         * io.c (data_desc): Ditto.
1972         * error.c (g95_warning, g95_warning_now): Use global flag.
1973         * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
1974         (expand_function_body): Update to new prototypes.
1975         (g95_init): Use new option names.
1976         * g95.h (g95_option_t): Standardize names.
1977         (g95_init_options, g95_handle_option): Update prototypes.
1978         * interface.c: Use new option names.
1979         * match.c: Ditto.
1980         * module.c: Ditto.
1981         * parse.c: Ditto.
1982         * primary.c: Ditto.
1983         * resolve.c: Ditto.
1984         * scanner.c: Ditto.
1985         * simplify.c: Ditto.
1986         * symbol.c: Ditto.
1987         * trans-array.c: Ditto.
1988         * trans-expr.c: Ditto.
1989         * trans-types.c: Ditto.
1990         * trans-decl.c: Ditto.
1991         (g95_build_library_function_decl): Remove obsolete VPARAMS.
1992         * trans.h: Ditto.
1993         * options.c (g95_display_help): Remove.
1994         (g95_init_options): Convert to new scheme.
1995         (set_Wall): Ditto
1996         (g95module_option): Ditto, rename from g95_parse_arg.
1997         (g95_handle_module_path_options): New function.
1998         * trans-equivalence.c: Fix error message.
1999         * lang.opt: Corrections.
2001 2003-07-21  Steven Bosscher  <steven@gcc.gnu.org>
2003         * lang.opt: New file.
2005 2003-07-21  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2007         * decl.c (match_attr_spec): Set colon_seen.
2009 2003-07-14  Paul Brook  <paul@nowt.org>
2011         * trans-array.c: Update comment.
2012         (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
2013         * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
2014         minmaxloc,minmaxval): Ditto.
2015         * trans-io.c (g95_trans_transfer): Ditto.
2016         * trans-stmt.c: Remove unneeded prototypes.
2017         (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
2018         (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
2019         (compute_inner_temp_size): Remove bits of dead code. Add comments.
2020         Don't share loopinfo.
2021         (compute_overall_iter_number): Declare as static.
2022         (allocate_temp_for_forall_nest): Ditto.
2023         (g95_trans_forall_1): Don't pass shared loopinfo.
2024         * trans.c (g95_start_block): Expand comment.
2026 2003-07-12  Paul Brook  <paul@nowt.org>
2028         * arith.c (g95_index_integer_kind): Remove unused initializer.
2029         * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
2030         index by size of element.
2031         (generate_loop_for_rhs_to_temp): Ditto.
2032         (allocate_temp_for_forall_nest): Use element size, not index size.
2034 2003-07-11  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2036         * arith.c (g95_index_integer_kind): Add a TODO.
2037         * simplify.c (g95_simplify_nearest): Add a TODO.
2039 2003-07-09  Chun Huang  <compiler@sohu.com>
2041         * trans.h: Add declarations for gfor_fndecl_string_scan and
2042         gfor_fndecl_string_verify.
2043         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2044         * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
2045         (g95_conv_intrinsic_verify): New function.
2046         (g95_conv_intrinsic_function): Add SCAN and VERIFY.
2047         * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
2048         of parameter 'BACK=.TRUE.'
2050 2003-07-05  Lifang Zeng  <zlf605@hotmail.com>
2052         * trans-stmt.c (iter_info, forall_info): Define.
2053         (g95_trans_forall_block): Remove.
2054         (g95_trans_forall_loop): Use forall info blocks.
2055         (g95_trans_nested_forall_loop): New function.
2056         (g95_do_allocate): Handle things other than logical masks.
2057         (generate_loop_for_temp_to_lhs): New function.
2058         (generate_loop_for_rsh_to_temp): New function.
2059         (compute_inner_temp_size): New function.
2060         (compute_overall_iter_number): New function.
2061         (allocate_temp_for_forall_nest): New function.
2062         (g95_trans_forall): Move body ...
2063         (g95_trans_forall_1): ... to here.  Handle loops with temporaries.
2065 2003-07-02  Paul Brook  <paul@nowt.org>
2067         * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
2068         in correct scope.  Change callers to match.
2069         * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
2070         * iresolve.c (g95_resolve_reshape): Only use constant shapes.
2072 2003-07-02  Paul Brook  <paul@nowt.org>
2074         * trans-array.c (g95_conv_loop_setup): Remove dead var.  Use
2075         expression shape for all expressions.
2076         * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
2078 2003-07-03  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2080         * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
2081         g95_parse_arg), intrinsic.c (g95_convert_type): support of
2082         -Wconversion.
2083         * intrinsic.c, g95.h: Add g95_convert_type_warn,
2084         * resolve.c (g95_resolve_index): Call it.
2086 2003-07-02  Paul Brook  <paul@nowt.org>
2088         * iresolve.c (g95_resolve_reshape): Set expression shape.
2089         (g95_resolve_shape): Ditto.
2090         * simplify.c (g95_simplify_shape): Move common code outside condition.
2091         * trans-array.c (g95_conv_array_initializer): Teach it how to count.
2093 2003-07-01  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2095         * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
2096         conformance checks.
2098 2003-06-29  Paul Brook  <paul@nowt.org>
2100         * array.c (g95_simplify_iterator_var): Don't bother with return value.
2101         * expr.c (find_array_element, find_component_ref): New functions.
2102         (remove_subobject_ref): New function.
2103         (simplify_const_ref): Use them.  Rename from simplify_component_ref.
2104         (simplify_ref_chain): New function.
2105         (g95_simplify_expr): Use it.  Simplify parameter variable subobjects.
2106         (g95_specification_expr): Simplify the expression.
2107         * resolve.c (resolve_operator): Check simplifications return code.
2108         (g95_resolve_expr): Ditto.
2110 2003-06-26  Paul Brook  <paul@nowt.org>
2112         * expr.c (simplify_component_ref): New function.
2113         (g95_simplify_expr): Use it.
2114         * resolve.c (resolve_structure_cons): Handle references.
2116 2003-06-25  Paul Brook  <paul@nowt.org>
2118         * trans-io.c (build_dt): Handle internal units.
2120 2003-06-25  Canqun Yang  <canqun@yahoo.com.cn>
2122         * trans-common.c (g95_build_common_decl): Array index range starts at 0.
2123         (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
2124         Use g95_array_index_type instead of integer_type_node.
2125         (g95_build_common_decl, g95_set_common_master_type): Use
2126         g95_character1_type_node instead of char_type_node.
2127         * trans-equivalence.c (g95_layout_local_equiv): As above.
2129 2003-06-24  Steven G. Kargl  <kargls@attbi.com>
2131         * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
2132         remove last remains of -fquiet.
2134 2003-06-22  Paul Brook  <paul@nowt.org>
2136         * resolve.c (resolve_operator): Don't fail if we can't simplify.
2137         (g95_resolve_expr): Ditto.
2138         (resolce_code): Mark as static.
2139         * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
2140         gimplifer doesn't (yet).
2142 2003-06-20  Paul Brook  <paul@nowt.org>
2144         * g95.h: Add ST_PAUSE and EXEC_PAUSE.
2145         * match.c (g95_match_if): Add ST_PAUSE.
2146         (g95_match_stopcode): New function.
2147         (g95_match_pause, g95_match_stop): Use it.
2148         * parse.c (g95_ascii_statement): Handle ST_PAUSE.
2149         (decode_stmt, next_statement, parse_executable): Ditto.
2150         * resolve.c (resolve_code): Ditto.
2151         * st.c (g95_free_statement): Ditto.
2152         * trans-stmt.c (g95_trans_pause): New function.
2153         * trans-stmt.h: Declare it.
2154         * trans.c (g95_trans_code): Use it.
2155         * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
2156         Declare.
2157         (g95_build_builtin_function_decls): Initialize them.
2158         * trans.h: Ditto.
2159         * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
2161 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2163         * io.c (g95_match_open , g95_match_close, g95_match_inquire,
2164         match_filepos): Fix error handling.
2166 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2168         * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
2169         Add assertions on arguments.
2170         * resolve.c (expression_shape): Remove useless &.
2171         * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
2172         g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
2173         g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
2174         g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
2175         g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
2176         g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
2177         (g95_simplify_not, g95_simplify_scale): Add assertions.
2179 2003-06-15  Paul Brook  <paul@nowt.org>
2181         Clean up stuff to work with the ssa optimizers.
2182         * convert.c (convert): Handle BOOLEAN_TYPEs.
2183         * f95-lang.c (g95_truthvalue_conversion): Implement.
2184         * trans-array.c (g95_trans_array_constructor_value): Group multiple
2185         scalar values.
2186         * trans.h (g95_truthvalue_conversion): Declare.
2187         * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
2188         * trans-stmt.c (g95_trans_character_select): Don't create array
2189         assignments.  Mark labels as indirect jump targets.
2190         * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
2191         (g95_get_dtype_cst): Handle LOGICAL types.
2193 2003-06-14  Paul Brook  <paul@nowt.org>
2195         * f95-lang.c (g95_gimplify_expr): New function.
2196         * trans-array.c (g95_trans_array_constructor_value): Don't create
2197         array assignments.
2198         (g95_conv_expr_descriptor): Rename simple->gimple.
2199         * trans-expr.c (conv_expr_op): Use proper logical operators.
2200         * trans-intrinsic.c (build_fixbound_expr): New function.
2201         (build_fix_expr): Ditto.
2202         (g95_conv_intinsic_aint): Use them. Use builtin functions.
2203         (g95_conv_intrinsic_function): Add FLOOR and CEILING.
2205 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2207         * array.c (g95_compare_array_spec): Remove unreachable code.
2208         * expr.c (g95_copy_expr): Likewise.
2209         * intrinsic.c (g95_convert_type): Likewise.
2210         * misc.c (g95_code2string): Likewise.
2211         * simplify.c (g95_simplify_ishft, g95_simplify_real,
2212         g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
2213         * trans-stmt.c (g95_trans_select): Likewise.
2214         * primary.c (extend_ref): Add an assertion.
2215         * simplify.c (g95_convert_constant): Add const.
2216         * intrinsic.h: Remove g95_check_x_ni.
2217         * f95-lang.c (g95_finish): Call g95_release_include_path.
2219 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2221         * resolve.c (resolve_contained_functions): Fix typo introduced on
2222         2003-01-13.
2224 2003-06-09  Paul Brook  <paul@nowt.org>
2226         * g95.h: Include system.h not hwint.h.
2227         * many: use safe-ctype.h not ctype.h.  Change isalpha -> ISALPHA, etc.
2228         * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
2230 2003-06-09  Paul Brook  <paul@nowt.org>
2232         * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
2233         * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
2234         * trans-decl.c (g95_add_decl_to_functions): Make non-static.
2235         (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
2236         (g95_generate_function_code): Translate COMMON and EQUIVALENCE
2237         objects.
2238         * trans.h (g95_trans_equivalence, g95_trans_common,
2239         g95_add_decl_to_function): Declare.
2240         * trans-common.c, trans-equivalence.c: New files.
2242 2003-06-08  Steven Bosscher  <steven@gcc.gnu.org>
2244         * intrinsic.c (g95_intrinsic_extension): Remove.
2245         (add_functions): Substitute g95_check_x for g95_check_x_ni
2246         everywhere.
2247         (g95_init_expr_extensions): New function.
2248         (g95_intrinsic_func_interface): Use it.
2249         * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
2250         * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
2251         g95_check_precision, g95_check_present, g95_check_radix,
2252         g95_check_range, g95_check_selected_real_kind): Do not set
2253         g95_intrinsic_extension.
2254         (g95_check_x_ni): Remove now duplicate of g95_check_x.
2256         * expr.c (check_inquiry): Add FIXME, fixup some code style.
2258 2003-06-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2260         * g95.h (ref_type): Name this type explicitly.
2261         * module.c (MIO_NAME): Add specialisations of mio_name.
2262         (mio_symbol_attribute, mio_typespec, mio_array_ref,
2263         mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
2264         (ab_attribute): Name this type explicitly.
2265         (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
2267 2003-06-05  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2269         * trans-intrinsic.c (g95_conv_allocated): New function.
2270         (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
2272 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
2274         * f95-lang.c: Don't include g95-support.h
2275         (g95_mark_addressable): Add prototype.
2276         (g95_init_decl_processing): Remove C front end hack.
2277         * f95-tree.c: Remove file.
2278         * support.c: Remove file.
2279         * g95-support.h: Remove file.
2280         * trans-types.c (g95_init_types): Set up boolean
2281         type related tree nodes.
2282         * Make-lang.in: Remove rules for dead files and
2283         dependencies on them.
2285 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
2287         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
2288         C front end dependency.  Also, convert.c does not depend on
2289         g95-support.h anymore.
2290         * convert.c: Don't include c-common.h and g95-support.h
2291         * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
2292         (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
2293         stmts_are_full_exprs_p, current_stmt_tree,
2294         current_scope_stmt_stack): Remove.
2295         * g95-support.h (unsigned_conversion_warning): Kill proto.
2296         (boolean_type_node, boolean_true_node, boolean_false_node):
2297         Don't define here.  Instead, make then true tree nodes in
2298         trans-types.
2299         * support.c (c_global_trees): Die, C front end, die!!!
2300         (g95_init_c_decl_hacks): Don't touch intmax_type_node,
2301         uintmax_type_node, string_type_node and const_string_type_node.
2302         (decl_constant_value, overflow_warning): Make static functions.
2303         They are in death row too, though.
2304         (default_conversion, c_expand_asm_operands): Remove.
2305         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
2306         trans.c: Don't include c-common.h.
2307         * trans-types.c (boolean_type_node, boolean_true_node,
2308         boolean_false_node): Make them real tree nodes.
2309         * trans-types.h (intmax_type_node, string_type_node,
2310         const_string_type_node): Hack to work around C dependencies
2311         in builtin-types.def.
2313 2003-06-04  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2315         * decl.c (decl_types): Add some iterators-like sentinels.
2316         * decl.c (match_attr_spec): Use them.
2317         Use "decl_types" instead of "int".
2318         Add cast in call to g95_match_strings.
2319         * dump-parse-tree.c (g95_show_namespace):  Use "g95_intrinsic_op"
2320         instead of "int".
2321         * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
2322         (g95_interface_info): Use "g95_intrinsic_op".
2323         * dump-parse-tree.c (g95_show_namespace): Use them.
2324         * interface.c (g95_check_interfaces): Use them.
2325         * module.c (read_module, write_module): Use them.
2326         * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
2327         Use "g95_intrinsic_op".
2328         * interface.c (check_operator_interface): Use "g95_intrinsic_op".
2329         Add a default case in switch statement.
2330         * intrinsic.h (g95_generic_isym_id): Moved to...
2331         * g95.h (g95_generic_isym_id): here.
2332         (g95_intrinsic_sym): Use "g95_generic_isym_id".
2333         * intrinsic.c (make_generic): Use "g95_generice_isym_id".
2334         * trans-intrinsic.c (g95_intrinsic_map_t,
2335          g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
2336         * match.c (g95_match_intrinsic_op): Add cast in call to
2337         g95_match_strings.
2339 2003-06-03  Steven Bosscher  <steven@gcc.gnu.org>
2341         * support.c (skip_evaluation, warn_conversion, lvalue_p,
2342         lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
2343         constant_fits_type_p, convert_and_check,
2344         unsigned_conversion_warning): Remove these ugly remnants
2345         we inherited from the C front end.
2346         (function_types_compatible): Remove '#if 0'-edcode.
2347         (build_modify_expr): Likewise.
2348         (convert_for_assignment): Don't use the deceased functions.
2349         The parameter fundecl is now unused.
2350         (decl_constant_value): Always just return decl.  In fact
2351         this function is not used at present, but it might be in
2352         the future, when we start using the tree inliner.
2353         (overflow_warning, default_conversion, c_expand_asm_operands):
2354         Abort when these are called, they are part of the C type
2355         checking implementation and therefore poison to Fortran.
2357 2003-06-04  Steven Bosscher  <steven@gcc.gnu.org>
2359         * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
2360         c-pretty-print.o and c-dump.o.  Add a comment on why we
2361         depend on c-semantics.c.
2362         * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
2363         Don't use the C front end tree dumper hook to dump the
2364         language specific tree representation -- we don't have
2365         one.  So instead, inherit the default langhook.
2367 2003-06-02  Paul Brook  <paul@nowt.org>
2369         * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
2371 2003-06-02  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2373         * check.c (g95_check_associated): Use proper types.  Remove
2374         extraneous argument in call to g95_error().
2376 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2378         * resolve.c (resolve_operator): Make logical operands convert to the
2379         type with higher kind.
2381 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2383         * check.c (g95_check_associated): Make sure both pointer and target has
2384         the same type and rank. Null pointer or array section with vector
2385         subscript as target are not allowed.
2386         * trans.h: Declare gfor_fndecl_associated.
2387         * trans-decl.c: (g95_build_builtin_function_decls): Initialize
2388         gfor_fndecl_associated.
2389         * trans-intrinsic.c (g95_conv_associated): New function.
2390         (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
2392 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2394         * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
2395         according to POINTER itself rather than TARGET.
2396         (g95_conv_expr_descriptor): Make lbound start at 1.
2397         * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
2399 2003-06-01  Paul Brook  <paul@nowt.org>
2401         * expr.c (g95_type_convert_binary): Make it match the standard.
2402         * g95.texi: Remove dead link.
2404 2003-06-01  Steven Bosscher  <steven@gcc.gnu.org>
2406         * g95.texi: Cleanup somewhat in preparation for inclusion
2407         in GCC CVS.
2409 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2410             Canqun Yang  <canqun@yahoo.com.cn>
2412         * resolve.c (compare_bound_int, resolve_where_shape): Proper return
2413         type.
2414         (g95_find_forall_index): Return proper value.
2415         (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
2416         compare the return value from g95_find_forall_index.
2418 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2419         * g95.h, io.c (g95_st_label): Remove "length".
2420         (g95_symtree): Remove "link".
2421         (g95_case): Remove "code".
2422         * arith.c, arith.h (g95_compare_string, g95_convert_integer,
2423         g95_convert_real): Make an argument pointer to const.
2424         * decl.c (colon_seen): Add a TODO.
2425         * interface.c (g95_compare_types): Fix typo.
2426         * interface.c (compare_interfaces): Preserve value of "p".
2427         * intrinsic.c (sort_actual): Remove "i".
2428         * match.c (g95_match_assign): Proper type in call to g95_match().
2429         * parse.c (next_free): Avoid duplicate call due to macro.
2430         * parse.c (check_statement_label): wrong type in call to g95_error.
2431         * primary.c (match_real_constant): Add a TODO.
2432         * resolve.c (resolve_select):  Remove useless conditional.
2433         * simplify.c (g95_simplify_repeat): Proper assignment to
2434         "value.character.string".
2435         * simplify.c (g95_simplify_reshape): Wrong variable in call to
2436         g95_error.
2438 2003-05-20  Canqun Yang  <canqun@yahoo.com.cn>
2440         * trans-stmt.c: Remove unnecessary include file defaults.h.
2442 2003-05-19  Lifang Zeng  <zlf605@hotmail.com>
2444         * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
2445         stride.
2446         (g95_trans_forall): Allow arbitrary number of FORALL indexes and
2447         actual variables used as FORALL indexes.
2449 2003-05-15  Paul Brook  <paul@nowt.org>
2451         * trans-array.c (g95_trans_static_array_pointer): Use
2452         null_pointer_node.
2453         (g95_trans_deferred_array): Initialize static array pointers.
2454         * trans-expr.c (g95_conv_function_call): Use formal arglist to
2455         correctly pass POINTER and absent CHARACTER arguments.
2457 2003-05-14  Lifang Zeng  <zlf605@hotmail.com>
2459         * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
2460         (g95_resolve_forall_body): Resolve FORALL body.
2461         (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
2462         (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
2463         (g95_find_forall_index): Check whether the FORALL index appears in
2464         the expression or not.
2465         (resolve_code): Modified.
2467 2003-05-14  Paul Brook  <paul@nowt.org>
2469         * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
2471 2003-05-13  Paul Brook  <paul@nowt.org>
2473         * trans-types.c (g95_max_array_element_size): Now a tree node.
2474         (g95_init_types): Work out max size properly.
2475         (g95_get_dtype_cst): Modify to match.
2477 2003-05-11  Paul Brook  <paul@nowt.org>
2479         * trans-io.c (add_case): Create a label decl for case labels.
2481 2003-05-11  Paul Brook  <paul@nowt.org>
2483         * arith.c (g95_integer_index_kind): New variable.
2484         * f95-lang.c (g95_init): Move frontend initialization here ...
2485         (g95_post_options): ... from here.
2486         * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
2487         * intrinsic.c (add_functions): Use index kinds.
2488         * iresolve.c: Convert to index_kind where needed.
2489         * resolve.c (g95_resolve_index): Make public, use index_kind.
2490         (resolve_array_ref): Adjust to match.
2491         * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
2492         * trans-stmt.c: Ditto.
2493         * trans-types.c: Ditto.
2494         * trans-types.h (g95_array_index_kind): Remove declaration.
2495         * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
2497 2003-05-07  Paul Brook  <paul@nowt.org>
2499         * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
2500         * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
2501         of bound indices.
2503 2003-05-07  Paul Brook  <paul@nowt.org>
2505         * trans-array.c (trans_static_array_pointer,
2506         g95_trans_array_constructor_value, g95_conv_array_initializer,
2507         g95_conv_structure): CONSTRUCTOR nodes only have one operand.
2508         (g95_add_loop_ss_code): Convert subscripts to the correct type.
2509         * trans-stmt.c (g95_trans_character_select): Ditto.
2510         * trans-types.c (g95_init_types): Ditto.
2512 2003-05-07  Steven Bosscher  <steven@gcc.gnu.org>
2514         * f95-lang.c (expand_function_body): Use input_line, not lineno.
2515         * trans-decl.c (g95_generate_function_code,
2516         g95_generate_constructors): Likewise.
2517         * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
2518         g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
2519         Likewise.
2521 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2522         * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
2523         with components point to the DERIVED type itself, and two DERIVED
2524         type with components point to each other.
2525         * trans-expr.c (g95_conv_componet_ref): Modified
2527 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2528         * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
2529         null_pointer_node.
2530         (g95_trans_pointer_assign): Implement Nullify.
2532 2003-05-01  Paul Brook  <paul@nowt.org>
2534         * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
2535         * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
2537 2003-05-01  Paul Brook  <paul@nowr.org>
2539         * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
2540         trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
2541         IS_EMPTY_STMT.
2543 2003-05-01  Canqun Yang  <canqun@yahoo.com.cn>
2545         * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
2546         CASE_LABEL_EXPR.
2548 2003-04-28  Paul Brook  <paul@nowt.org>
2550         * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
2551         as their kind suggests.
2552         (g95_resolve_reshape): Ditto.
2554 2003-04-28  Chun Huang  <compiler@sohu.com>
2556         * trans-expr.c (g95_conv_substring_expr): New function.
2557         (g95_conv_expr): Use it.
2559 2003-04-28  Paul Brook  <paul@nowt.org>
2561         * iresolve.c (g95_resolve_transpose): Make it match the
2562         implementation.
2563         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
2565 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
2567         * trans-types.c (g95_add_field_to_struct): New function to
2568         add a field to a UNION_TYPE or RECORD_TYPE.
2569         * trans-types.h (g95_add_field_to_struct): Prototype.
2570         (g95_get_derived_type): Use g95_add_field_to_struct to add
2571         components.
2572         * trans-io.c (g95_add_field): Remove.
2573         (ADD_FIELD): Use new g95_add_field_to_struct function.
2574         (ADD_STRING): Likewise.
2575         * trans-stmt.c (g95_trans_select): Likewise.
2576         (g95_add_field): Remove duplicated function.
2578 2003-04-18  Canqun Yang  <canqun@yahoo.com.cn>
2580         Port implementation for CHARACTER SELECT from Andy's tree.
2581         * trans-stmt.c (g95_trans_character_select): Implement character
2582         select. (g95_add_field): New function.
2583         * trans-decl.c: Declare 'gfor_gndecl_select_string'.
2584         (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
2585         * g95.h (struct g95_case): Add field 'int n'.
2586         * trans.h: Declare 'gfor_fndecl_select_string'.
2588 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
2590         * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
2591         (g95_insert_bbd): Die on duplicates.
2592         * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
2594 2003-04-14  Steven Bosscher  <steven@gcc.gnu.org>
2596         * g95.texi: Require GMP 4.0 -- like we actually
2597         do.  Explain the testsuite and what-goes-where.
2598         Don't use undefined texinfo symbol.  Break very
2599         long line.  Remove finished item from the list
2600         of open projects.
2602 2003-04-11  Canqun Yang  <canqun@yahoo.com.cn>
2604         * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
2605         LOGICAL type.
2607 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
2609         * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
2610         (g95_trans_forall_body): New function.
2612 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
2614         * resolve.c (resove_where): New function.
2615         (resolve_where_shape): New function.
2616         (resolve_code): Add call to 'resolve_where'
2617         * trans-stmt.c (g95_trans_where): Modified.
2618         (g95_trans_where_2): New function.
2619         (g95_trans_where_assign): New function.
2620         (g95_evaluate_where_mask): New function.
2621         (g95_add_to_stmt_list): New function.
2622         (g95_get_temp_expr): New function.
2623         * trans.h (where_stmt_list): New structure.
2625 2003-04-10  Paul Brook  <paul@nowt.org>
2627         * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
2628         (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
2630 2003-04-10  Steven Bosscher  <steven@gcc.gnu.org>
2632         Update after mainline -> tree-ssa-branch merge.
2633         * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
2634         call.
2635         (g95_init): Update for new lang_hooks definition.
2636         (g95_post_options): New langhook.
2637         (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
2638         * scanner.c (g95_new_file): Comment update.
2640 2003-04-09  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2642         * g95.h, lang-options.h: Add -Wimplicit-interface.
2643         * options.c (g95_init_options, g95_parse_arg): Set it.
2644         * interface.c (check_intents): Warn about call with implicit
2645         interface.
2646         * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
2647         g95_procedure_use.
2649 2003-04-05  Paul Brook  <paul@nowt.org>
2651         * iresolve.c (g95_resolve_spread): Don't resole based on type.
2652         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
2654 2003-03-29  Paul Brook  <paul@nowt.org>
2656         * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
2657         (g95_resolve_unpack): Ditto.
2658         * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
2659         (g95_conv_intrinsic_function): Use it.  Remove PACK and UNPACK.
2660         (g95_is_intrinsic_libcall): Add PACK and UNPACK.
2662 2003-03-25  Paul Brook  <paul@nowt.org>
2664         * arith.c (g95_unary_user, g95_user): Remove dead functions.
2665         * arith.h: Ditto.
2666         * array.c (g95_free_array_ref): Ditto.
2667         * g95.h: Ditto.
2668         * symbol.c (g95_use_derived_tree): Ditto.
2669         * intrinsic.c (add_functions): Use simplification for SCALE.
2670         * primary.c (g95_match_rvalue): Test sym, not symtree.
2672 2003-03-25  Paul Brook  <paul@nowt.org>
2674         * trans-decl.c (build_function_decl): Add parameter before it gets
2675         turned into a constant.
2676         * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
2677         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
2678         * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
2680 2003-03-22  Paul Brook  <paul@nowt.org>
2682         * trans-array.c (g95_conv_array_initializer): Allow scalar
2683         expressions.
2684         * trans-decl.c (g95_finish_var_decl): Result variables are not
2685         module variables.
2686         * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
2687         (g95_conv_intrinsic_function): Use it.
2688         * trans-types.h (g95_type_spec): Remove dead declaration.
2690 2003-03-21  Paul Brook  <paul@nowt.org>
2692         * trans-decl.c (g95_build_function_decl): Mark string parameters.
2694 2003-03-20  Paul Brook  <paul@nowt.org>
2696         * trans-decl.c (g95_build_function_decl): Put character length
2697         parameters at the end of the function declaration.
2698         * trans-expr.c (g95_conv_function_call): Ditto.
2699         * trans-types.c (g95_get_function_type): Ditto.
2701 2003-03-20  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2703         * resolve.c (resolve_formal_arglist): Don't impose intent for
2704         procedure arguments of pure functions.
2705         (resolve_select): Remove redundant assignment.
2707 2003-03-19  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2709         * arith.c (validate_logical), g95.h, options.c (g95_init_options):
2710         Remove option l1.
2711         * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
2712         * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
2713         const.
2714         * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
2715         Order list.
2716         * symbol.c (g95_add_type): Fix typo in comment.
2719 2003-03-16  Paul Brook  <paul@nowt.org>
2721         * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
2722         * expr.c (g95_build_call): Remove.
2723         * f95-lang.c (puchdecl_top_level): New function.
2724         * g95.h (g95_code): Store resolved symbol, not just the name.
2725         * intrinsic.c (g95_intrinsic_namespace): New global namespace.
2726         (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
2727         (g95_get_intrinsic_sub_symbol): New function.
2728         * iresolve.c (g95_resolve_cpu_time): Use it.
2729         (g95_resolve_random_number): Ditto.
2730         * resolve.c: Set code->resolved_sym instead of code->sub_name.
2731         * trans-decl.c (g95_get_extern_function_decl): Give external decls
2732         the correct DECL_CONTEXT.  Add global symbold to the global scope.
2733         * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
2734         fixed.
2736 2003-03-16  Paul Brook  <paul@nowt.org>
2738         * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
2739         * options.c (g95_parse_arg): Ditto.
2740         * module.c (mio_symbol_attribute): Handle the always_explicit bit.
2741         * resolve.c (resolve_formal_arglist): The always_explicit sould be set
2742         for the procedure, not the parameter.
2743         * trans-array.c (g95_trans_g77_array): New function.
2744         (g95_trans_assumed_size): Use it.
2745         (g95_trans_dummy_array_bias): Ditto.
2746         (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
2747         (g95_conv_expr_descriptor): ... to here.  Update callers.
2748         * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
2749         (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
2750         * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
2751         * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
2752         * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
2753         (g95_sym_type): Ditto.
2755 2003-03-15  Paul Brook  <paul@nowt.org>
2757         * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
2758         first chain.
2759         * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
2761 2003-03-14  Paul Brook  <paul@nowt.org>
2763         * trans-array.c (g95_array_is_packed): Remove.
2764         (g95_conv_array_base): Correctly handle all descriptorless cases.
2765         (g95_conv_array_stride): Use descriptorless strides.
2766         (g95_trans_dummy_array_bias): Don't always repack the array.
2767         (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
2768         packed.
2769         * trans-types.c (g95_get_nodesc_array_type): Differentiate between
2770         dummy and non-dummy arrays...
2771         (g95_sym_type, g95_get_derived_type): ... like these.
2772         (g95_get_array_type_bounds): Allow discontiguous arrays.
2774 2003-03-12  Paul Brook  <paul@nowt.org>
2776         * array.c (g95_resolve_array_spec): Fix comment.
2777         * g95.h (symbol_attributes): New flag always_explicit.
2778         * resolve.c (resolve_formal_arglist): Set it always_explicit.
2779         * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
2780         * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
2781         (g95_trans_array_bounds): Allow assumed shape arrays.
2782         (g95_trans_repack_array): Remove.
2783         (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
2784         * trans-decl.c (g95_build_qualified_array): Only ignore absent
2785         bounds for assumed size arrays.
2786         (g95_build_dummy_array_decl): Use descriptorless arrays.
2787         * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
2788         (g95_trans_pointer_assign): Fix typo.
2789         * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
2790         code.
2791         (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
2792         * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
2793         Also modify callers.
2794         * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
2796 2003-03-08  Paul Brook  <paul@nowt.org>
2798         * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
2799         (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
2800         * resolve.c (compare_spec_to_ref): Allow full array sections.
2802 2003-03-08  Paul Brook  <paul@nowt.org>
2804         * expr.c (g95_simplify_expr): Also simplify array index and
2805         substring expressions.
2806         * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
2807         * trans-array.c (g95_trans_array_bounds): New function.
2808         (g95_trans_auto_array_allocation): Use it.
2809         (g95_trans_assumed_size): Rewrite.
2810         * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2811         (gfor_fndecl_repack): Remove.
2812         (g95_build_qualified_array): Handle absent upper bounds.
2813         (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
2814         (g95_get_symbol_decl): Update.
2815         (g95_build_intrinsic_function_decls): Initialize new decls.
2816         * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2817         (gfor_fndecl_repack): Remove.
2818         * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
2819         * trans-types.c: (g95_build_array_type): Merge duplicated code..
2820         (g95_get_nodesc_array_type): Handle absent bounds.
2821         * trans-types.h (g95_get_nodesc_array_type): Declare.
2823 2003-03-04  Paul Brook  <paul@nowt.org>
2825         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
2826         builtin-types.def.
2828 2003-03-02  Paul Brook  <paul@nowt.org>
2830         * options.c (g95_init_options): Drfault to 1.
2831         (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
2832         * trans-array.c (g95_conv_array_data, g95_conv_array_base,
2833         g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
2834         Handle non-constant size automatic arrays.
2835         (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
2836         generic bound functions.
2837         (g95_trans_auto_array_allocation): Don't create a descriptor.
2838         (g95_trans_assumed_size): New function (broken).
2839         (g95_trans_dummy_array_bias): Remove unused var.
2840         * trans-array.h (g95_trans_assumed_size): Declare.
2841         * trans-decl.c (create_index_var): New fuction.
2842         (g95_build_qualified_array): New function.
2843         (g95_get_symbol_decl): Use it.
2844         (g95_trans_deferred_vars): Handle assumed shape seperately.
2845         * trans-types.c (get_element_type): Handle heap allocated arrays.
2846         (g95_is_nodesc_array): Include non-const size arrays.
2847         (g95_get_nodesc_array_type): Ditto.
2849 2003-02-23  Paul Brook  <paul@nowt.org>
2851         * trans-array.c (g95_array_init_size): Should use stride, not size of
2852         last dimension.
2854 2003-02-18  Paul Brook  <paul@nowt.org>
2856         * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
2857         after intrinsic function check.
2859 2003-02-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2861         * io.c (match_io): Fix missing return value and remove useless
2862         assignment.
2863         * match.c (g95_match): Remove useless assignment.
2864         * module.c (parse_string):  Remove useless post increment.
2865         * simplify.c (g95_simplify_verify): Remove useless assignment.
2867 2003-02-15  Paul Brook  <paul@nowt.org>
2869         * expr.c (restricted_intrinsic): Handle bad values gracefully.
2870         * g95.h (symbol_attribute): Add referenced member.
2871         (g95_symbol): Add dummy_order member.
2872         (g95_set_sym_referenced): Declare.
2873         * match.c (g95_match_assignment, g95_match_call): Use it
2874         * primary.c (match_actual_arg, g95_match_rvalue,
2875         g95_match_variable): Ditto.
2876         * symbol.c (next_dummy_order): New variable.
2877         (g95_set_sym_referenced): New function.
2878         (check_done): New function.
2879         (g95_add_*): Use it.
2880         * trans-decl.c: Make formatting conform to GCC standards.
2881         (g95_defer_symbol_init): Add dummy variables in the right order.
2882         (g95_get_symbol_decl): Only accept referenced variables.
2883         (g95_create_module_variable): Module variables are always required.
2884         (generatr_local_decls): New function.
2885         (generate_local_vars): New function.
2886         (g95_generate_function_code): Use it.
2888 2003-02-13  Paul Brook  <paul@nowt.org>
2890         * trans-decl.c (g95_conv_struct_cons): Remove.
2891         (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
2892         * trans-expr.c (g95_conv_structure): New function.
2893         (g95_conv_expr): Use it.
2895 2003-02-09  Paul Brook  <paul@nowt.org>
2897         * trans-array.c (g95_array_init_size): Don't evaluate the linit
2898         expressions multiple times.
2899         (g95_trans_auto_arry_allocation): Use pointer not tmp.
2901 2003-02-08  Paul Brook  <paul@nowt.org>
2903         * module.c (mio_symtree_ref): Declare as static.
2904         (mio_expr): Remove dead code.
2905         (read_module): Set the symtree link for fixups.
2906         * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
2907         (build_round_expr): ... to this.
2908         (g95_conv_intrinsic_aint): New function.
2909         (g95_conv_intrinsic_function): Use it.
2911 2003-02-08  Paul Brook  <paul@nowt.org>
2913         * trans-array.c (g95_trans_array_constructor_value): Use the acutal
2914         offset after modificaton, not the increment expression.
2915         * dependency.c: Kill excess whitespace.
2917 2003-02-07  Sanjiv Gupta  <sanjivg@noida.hcltech.com>
2919         * dependency.h: Remove some function declarations.
2920         * dependency.c (get_no_of_elements): Change this function not to
2921         return int.
2922         * other: Add comments for all modified functions.
2924 2003-02-06  Paul Brook  <paul@nowt.org>
2926         * g95spec.c (lang_specific_functions): Fix initializer warning.
2927         * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
2928         for structure type names.
2929         * trans-decl.c (g95_cons_structure_cons): New function.
2930         (g95_get_symbol_decl): Use it.
2931         * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
2932         referencing code.
2934 2003-02-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2936         * resolve.c (compare_cases): Add const to casts.
2938 2003-01-30  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2940         * g95.h (g95_check_f): Change a1 to f1m.
2941         * intrinsic.c (add_sym_1m, check_specific,
2942         g95_intrinsic_func_interface): Use it.
2944         * module.c (init_pi_tree): Remove useless cast.
2945         (fp2): Fix argument type.
2947         * parse.c (parse_select_block): Add comment.
2949 2003-02-05  Toon Moene  <toon@moene.indiv.nluug.nl>
2951         * lang-options.h: Fix warning involving C90 concatenated
2952         strings.
2954 2003-02-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2955             Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2957         * io.c (format_asterisk): Complete initializer to kill warning.
2958         * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
2959         DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
2960         (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
2961         new defines to complete initializers.  Kills all warnings.
2963         * Make-lang.in: Comment cleanup.
2965 2003-02-05  Paul Brook  <paul@nowt.org>
2967         * array.c (g95_free_constructor): Handle NULL expressions.
2968         * resolve.c (resolve_structure_cons): Ditto.
2969         * decl.c (g95_match_null): New Function.
2970         (variable_decl): Use it.
2971         * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
2972         * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
2973         * trans-types.c (g95_set_decl_attributes): Remove empty function.
2975 2003-02-05  Paul Brook  <paul@nowt.org>
2977         * trans.h (build1_v): New macro.
2978         (build_v): Remove pointless and incorrect prototype.
2979         * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
2980         * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
2982 2003-02-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2984         * Make-lang.in (F95_OBJS): Remove one more dead file.
2986 2003-02-01  Paul Brook  <paul@nowt.org>
2988         * lang-specs.h: Don't pass -ffixed-form to the linker.
2989         * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
2991 2003-02-01  Paul Brook  <paul@nowt.org>
2993         * Make-lang.in (F95_OBJS): Remove dead files.
2994         * trans-array.c (g95_array_init_size): Do the right thing when
2995         ubound=NULL.
2996         * trans-decl.c (g95_generate_function_code): Initialize deffered
2997         symbol list before translating contained subroutines.
2998         * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
2999         scalar invariant values here...
3000         (g95_conv_variable, g95_conv_function_call): ... instead of here ...
3001         * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
3003 2003-01-29  Paul Brook  <paul@nowt.org>
3005         * trans-array.c (g95_add_loop_code): Put pre code in the right block.
3006         (g95_walk_elemental_function_args): Reverse chains before adding.
3007         (g95_reverse_ss): Move about a bit.
3008         * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
3009         function arguments.
3011 2003-01-28  Paul Brook  <paul@nowt.org>
3013         * intrinsic.c (resolve_intrinsic): Use correct union member.
3014         * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
3015         parameters.
3016         * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
3017         use associated variables.
3018         * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
3019         * trans-expr.c (g95_conv_expr_present): ... to here.
3020         * trans.h: Declare it.
3021         * trans-types.c (g95_sym_type): Assume subroutine if not specified.
3023 2003-01-28  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3025         * array.c (expand_iterator): Suppress useless assignment.
3026         * decl.c (match_char_spec): Ditto.
3027         * io.c (match_io_iterator): Ditto.
3028         * primary.c (match_real_constant): Ditto.
3029         * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
3030         Ditto.  Also, use g95_intrinsic_op not int for intrinsic operators.
3031         * matchexp.c (match_add_operand, match_level_5): Likewise.
3032         * module.c (parse_atom, find_enum): Likewise.
3033         * resolve.c: move #include <string.h>
3034         (resolve_select): Fix serious typo.
3036 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.n>
3038         * Make-lang.in: Don't build with broken tree-ssa-pre.
3040 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3042         * resolve.c (resolve_index): Add a TODO.
3043         * symbol.c: Remove useless "#include <ctype.h>".
3045 2003-01-27  Paul Brook  <paul@nowt.org>
3047         * check.c (check_rest): Allow different type kinds as an extension.
3048         * g95.h (g95_resolve_f): Add f1m.
3049         * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
3050         * intrinsic.h: Chenge prototypes for MIN and MAX.
3051         * iresolve.c (g95_resolve_minmax): New function.
3052         (g95_resolve_min, g95_resolve_max): Use it.
3053         * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
3054         arguments once.
3055         (g95_conv_intrinsic_present): Fix logic.
3057 2003-01-27  Steven Bossche  <s.bosscher@student.tudelft.nl>
3059         * g95.h (g95_case): Don't be a tree, be a double linked list.
3060         * match.c (match_case_selector): Remove redundant semantics check.
3061         Clean up a few goto's to make it a tiny little bit faster.
3062         * resolve.c (case_tree): Die.
3063         (compare_cases): Accept and compare unbounded cases too.
3064         (check_case_overlap): Don't build a tree.  Instead, merge-sort the
3065         whole list of g95_cases passed from resolve_select.
3066         (sane_logical_select): Die.
3067         (check_case_expr): Return FAILURE if a CASE label is of the wrong
3068         type kind.
3069         (resolve_select): Fixup case expression for computed GOTOs, put it
3070         in expr, not expr2, for easier handing in the parse tree dumper and
3071         the code generator.  Rewrite the rest of the function: Kill
3072         unreachable case labels and unreachable case blocks.
3073         * dump-parse-tree.c (g95_show_code_node): Always dump expr for
3074         an EXEC_SELECT, not case2 anymore.
3075         * trans-const.c (g95_conv_constant_to_tree): New function.
3076         (g95_conv_constant): Use it.
3077         * trans-const.h: Declare prototype for the new function.
3078         * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
3079         g95_trans_character_select): New static functions.
3080         (g95_trans_select): Rewrite.
3082 2003-01-26  Paul Brook  <paul@nowt.org>
3084         * intrinsic.c (add_fnctions): Properly add dreal.
3085         * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
3086         (g95_conv_intrinsic_function): Use it.
3087         * trans-io.c (build_dt): Abort on internal files (unimplemented).
3089 2003-01-26  Paul Brook  <paul@nowt.org>
3091         Widespread changes to the handling of symbols in expressions.  These
3092         are now linked via g95_symtree nodes.
3093         * parse.c (g95_fixup_sibling symbols): New function.
3094         (parse_contained): Use it.
3095         * g95.h (symbol_attribute): Add contained.  Indicates a symbol is a
3096         contained procedure that has bee correctly fixed up.
3097         (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
3099 2003-01-24  Paul Brook  <paul@nowt.org>
3101         * trans-array.c (g95_walk_expr): Function result attributes are in
3102         sym->result.
3103         * trans-expr.c (g95_conv_function_call,
3104         g95_trans_arrayfunc_assign): Ditto.
3105         * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
3107 2003-01-23  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3109         * expr.c (check_restricted): Fix error message.
3110         * symbol.c (free_st_labels): Plug memleak.
3112 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3114         * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
3115         reduce_binary_aa, reduce_binary, eval_intrinsic,
3116         eval_intrinsic_f2): Use typesafe prototypes for eval functions.
3117         * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
3118         for typesafe intrinsics helper functions.
3119         (g95_intrinsic_sym): Use them.
3120         * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
3121         add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
3122         add_sym_5, add_conv, resolve_intrinsic, do_simplify,
3123         check_specific, g95_intrinsic_func_interface,
3124         g95_intrinsic_sub_interface): Adjust all calls to intrinsics
3125         helper functions.
3126         * trans-decl.c (g95_get_extern_function_decl): Likewise.
3127         * Make-lang.in: Don't disable warnings for strict prototypes
3128         any longer, everything is typesafe now.
3130 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3132         * bbt.c (duplicate_node): Make static.
3133         * module.c (module_name): Make static.
3134         * scanner.c (include_dirs): Make static.
3136 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3138         Hard coded _gfor_'s should not show up anymore.
3139         * g95.h (PREFIX): New macro.
3140         * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
3141         hard-coded "_gfor".
3142         (g95_resolve_random_number): Likewise.
3143         * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
3144         * trans-io.c: Remove 'prefix' macro.  Replace all uses with
3145         the new PREFIX macro from g95.h.
3147 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3149         The troubles of forking... Andy implemented this just now too.
3150         Let's stick to that and keep the trees close.
3151         * g95.h (g95_st_label): 'format' member is now a g95_expr.
3152         * io.c: Revert previous changes.
3153         (g95_match_format): Match the format string as a character
3154         literal expression.
3155         * match.h (g95_statement_label): Declare external.
3156         * parse.c: Revert previous changes.
3157         * symbol.c (g95_free_st_label): Free a g95_expr instead
3158         if a 'char *'.
3159         * trans-io.c: Revert previous changes.
3160         (build_dt): Use set_string to set the format string.
3162 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3164         * io.c (format_string): Make non-static.
3165         (g95_match_format): Remember the format string.
3166         (terminate_io): Add I/O termination for empty I/O lists.
3167         * match.h: Declare external format_string.
3168         * parse.c (check_statement_label): Attack the format string
3169         to a format label for FORMAT statements.
3170         * trans-io.c (g95_add_field): Define prefix macro.  Replace
3171         all uses of PREFIX define with a use of this macro.
3172         (build_dt): Implement formatted I/O for format labels.
3174 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3176         * lang-options.h: Kill "-std=F".
3177         * options.c: Remove unimplemented "-std=F".  Modify
3178         web address.
3179         * misc.c (g95_terminal_width): New function.
3180         * error.c (g95_error_init_1): Use g95_terminal_width.
3181         * g95.h: Add prototype for g95_terminal_width, remove
3182         fmode flag.
3184 2003-01-19  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3186         * Make-lang.in: Fix typo.
3188 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3190         * g95.h (struct g95_case): Remove unused cruft, new member
3191         'where' to keep track of the locus of the default case.
3192         * match.c (g95_match_case): Add locus to the current case.
3193         (match_case_selector): Likewise.
3194         * parse.c (parse_select_block): Move semantics check for
3195         multiple DEFAULT cases out of here to...
3196         * resolve.c (check_case_overlap): ...here.  Return sooner
3197         when possible.
3198         (check_case_expr): Take two g95_cases now, use to sure the
3199         expression kinds are the same.
3200         (resolve_select): Cleanup.
3202 2003-01-18  Paul Brook  <paul@nowt.org>
3204         * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
3205         * trans-decl.c (g95_set_symbol_decl): Handle non-array result
3206         variables.
3207         (g95_get_extern_function_decl): Put decls in the correct context.
3209 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3211         * trans-io.c: Port changes from Andy to set ERR flag.
3213 2003-01-17  Paul Brook  <paul@nowt.org>
3215         * trans-array.c: Add various comments.
3216         (g95_ss_terminator): Declare as const.
3217         (g95_walk_expr): Remove first parameter and update all callers.
3218         (g95_walk_op_expr): Initialize scalar SS properly.
3219         * trans-array.h (g95_walk_expr): Update prototype.
3220         * trans-expr.c: Update for new g95_walk_expr.
3221         * trans-intrinsic.c: Ditto.
3222         * trans-io.c: Ditto.
3223         * trans.h: Various comments for SS chains.
3225 2003-01-17  Paul Brook  <paul@nowt.org>
3227         * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
3228         and RRSPACING.
3229         * intrinsic.c (add_functions): Use them.
3230         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
3231         * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
3233 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3235         Fallout of a small merge conflict:
3236         * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
3238 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3240         * initrinsic.c: New add_sym_* functions for strong typing.
3241         (add_conv): Make prototype strict.
3242         * dump-parse-tree.c, dependency.c: Include config.h
3243         * resolve.c, trans-io.c: Fix typos.
3245 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3247         * dump-parse-tree.c (g95_show_code_node): Show the
3248         condition for a computed GOTO that was transformed
3249         to a SELECT CASE construct.
3250         * resolve.c (check_case_overlap): Revert previous switch
3251         to treaps, it was too slow and didn't catch all trouble.
3252         (resolve_symbol): Be more flexible about module procedures.
3253         * symbol.c (check_conflict): Point to relevant section in
3254         the standard for dubious conflict.  Allow procedure
3255         dummy arguments to be optional again.
3256         * trans-io (add_field): Rename to g95_add_field.  Change
3257         all callers.
3258         * trans-stmt (trans_select): Handle unbounded cases for
3259         integer SELECT CASE constructs.  Fix/add more comment.
3261 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3263         * g95.h: Uses GCC's function attribute macros.
3264         * error.c, module.c, parse.c, g95.h: More function attributes.
3266 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3267         Forgot a file...
3268         * trans-decl.c (get_label_decl): Use TREE_LINENO instead
3269         of DECL_SOURCE_LINE, and TREE_FILENAME instead of
3270         DECL_SOURCE_FILE.
3272 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3274         * f95-lang.c (pushdecl): Use TREE_LINENO instead of
3275         DECL_SOURCE_LINE.
3276         * trans.c (g95_trans_code): Use annotate_all_with_file_line
3277         instead of nowdead wrap_all_with_wfl.
3279 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3281         * parse.c (g95_parse_file): In verbose mode, dump the parse tree
3282         before generating code, so we can still see it even if the code
3283         generation phase dies.
3285 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3287         * decl.c (build_sym): Split out initialization expression parts...
3288         (add_init_expr_to_sym): ...to here.
3289         (variable_decl): Add the symbol following an attribute list to the
3290         symbol tree before parsing the optional initialization expression
3291         if the symbol is not of a derived type.
3292         * primary.c (g95_match_rvalue): Don't assume a symbol always has
3293         a value if it is a PARAMETER.
3295 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3297         * misc.c: Don't #include <mcheck.h>
3298         * module.c: Ditto.  Kill uses of mtrace, muntrace.  If there
3299         ever was a glibc bug, then either this was never reported to
3300         glibc people, or it has been fixed for so long that there's
3301         no information you can find about it, anywhere.
3303 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3305         Fix warnings:
3306         * module.c (attr_bits, bt_types, array_spec_types):
3307         Switch 'const' and 'static'.
3308         * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
3310         GNU'ify source code:
3311         * trans-io.c: Numerous fixes, one fixed warning and a few
3312         TODO markers so that we don't forget about them.
3314 2003-01-13  Paul Brook  <paul@nowt.org>
3316         * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
3317         * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
3318         Add G95_ISYM_SCALE.
3319         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
3320         * match.c (g95_match_stop): Fix dumb == -> != error.
3322 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3324         * dump-parse-tree.c (show_indent): Add line breaks.  This
3325         whole dumping process needs cleanups.
3326         * f95-lang.c (g95_mark_addressable): Fix prototype to match
3327         the langhook.  Fix 'return's accordingly.
3328         * g95-support.h: Adjust prototype.
3329         * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
3330         * lang-options.h: Add '-fsyntax-only'.
3331         * options.c (g95_init_options): Init 'no_backend'.
3332         (g95_parse_arg): Deal with '-fsyntax-only'.
3333         * parse.c (g95_parse_file): Do not generate code if 'no_backend'
3334         is set.
3336 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3337         Patch from Arnaud
3338         * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
3339         arguments.  Also make sure that if a symbol is marked INTRINSIC,
3340         an intrinsic with the symbol's name actually exists.
3341         (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
3342         Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
3343         ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
3345 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3347         * resolve.c (resolve_contained_functions): Fix condition, don't
3348         throw internal_error if a child namespace has no name.  Apparently
3349         this can be the case?
3351 2003-01-11  Paul Brook  <paul@nowt.org>
3353         Port changes from Andy's tree:
3354         * g95.h (g95_code): Add stop_code.
3355         * match.c (g95_match_stop): Detter syntax checking.
3356         * resolve.c (resolve_generic_f0): Return match type.
3357         (resolve_generic_f): Remove dead/duplicated code.
3358         (resolve_specific_f): Ditto.
3359         * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
3360         * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
3361         * trans-stmt.c (g95_trans_stop): Handle new STOP format.
3363 2003-01-11  Paul Brook  <paul@nowt.org>
3365         * trans-array.c: Various documentation/comment changes.
3366         * trans-stmt.c: Ditto.
3369 2003-01-10  Paul Brook  <paul@nowt.org>
3371         * options.c/h: Add -fdump-parse-tree as alias of -v.
3373 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3375         * dump-parse-tree.c (g95_show_namespace): Fixed another
3376         typo.  Sorry, it's Friday...
3378 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3380         Spotted by Tobi:
3381         * trans-array.c, trans-array.h, trans.c, trans-const.c,
3382         trans-const.h, trans-decl.c, trans-expr.c, trans.h
3383         trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
3384         trans-types.c: Fix bogus copyright years, add 2003.
3385         * trans-types.h: Give copyright header.
3387 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3389         * dump-parse-tree.c (g95_show_namespace): Fixed typo.
3390         * expr.c, options.c, scanner.c: Add some more 'const' markers.
3391         * intrinsic.c: Some constant strings moved to read-only memory.
3392         * io.c (format_asterisk): Move to...
3393         * g95.h: ...here.
3395 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3397         * dump-parse-tree.c (g95_show_namespace): Dump implicit
3398         types for ranges instead of per-letter.  Indent the
3399         'CONTAINS' just like everything else.
3400         * resolve.c (resolve_contained_functions): Clarify comment.
3401         Explain non-obvious conditional expression.  Improve
3402         diagnostics if tyoe cannot be resolved.
3403         Port semi-fix from Andy's tree:
3404         (was_declared): Move up before first use.
3405         (generic_sym, specific_sym): New functions.  Code moved
3406         out if procedure_kind.
3407         (procedure_kind): Simplify using new functions.
3408         (resolve_generic_f): Make sure the functions we find in
3409         a parent namespace is generic.
3410         (resolve_specific_f): Ditto for specific functions.
3412 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3414         * trans-stmt.c, trans.c: Fix some code style issues. Add
3415         some more comment (but still not enough!).
3417 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3419         * symbol.c (flavors, procedures, intents, acces_types,
3420         access_types, ifsrc_types): Make const.
3421         * misc.c (g95_string2code): Make 'm' param 'const'.
3422         * module.c (find_enum, write_atom, mio_name): Make
3423         'm' param 'const'.
3424         (attr_bits, bt_types, array_spec_types, array_ref_types,
3425         ref_types, expr_types): Make const.
3426         * g95.h: Adjust external decls.
3428 2003-01-09  Paul Brook  <paul@nowt.org>
3430         * Testsuite: Add a load of new cases.
3432 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3434         * Make-file.in: Add dependency on back end header files;
3435         a parallel build should work now.
3436         * f95-lang-c (lang_identifier): Remove bogus comment.
3437         (g95_be_parse_file): Fix prototype.
3438         (g95_init): Make static.
3439         (g95_finish): Make static.
3440         * error.c (g95_syntax_error): Kill. Make define in...
3441         * g95.h (g95_syntax_error): Define.
3442         (g95.options): Make 'source' member 'const'.
3443         * interface.c (g95_match_interface): Explain
3444         hard-to-read condition.
3445         (g95_match_end_interface): Ditto.
3446         * trans_const.c (g95_build_string_const): Make 's' parameter
3447         'const'.
3448         * trans_const.h: Adjust protoype accordingly.
3449         * trans-decl.c: Include tree-dump.h
3450         (g95_generate_function_code): Build fixes for recent changes
3451         in the tree-ssa branch.
3453 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3455         * format.c: Kill, move code from here...
3456         * io.c: ...to here.
3457         * Make-lang.in: Adjust.
3458         * MANIFEST: Ditto.
3459         * match.h: Ditto.
3460         * BUGS: Mention where to submit bugs.  Move old content...
3461         * TODO: ...to here.  New file.
3463 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3464         Fix most warnings, and suppress the ones we can't fix for now.
3465         * Make-lang.in: Suppress warnings about bad proto's in g95.h,
3466         these warnings just clutter the screen and there's not much
3467         we can do about them for now anyway.
3468         * check.c, iresolve.c: Mark unused function parameters.
3469         * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
3470         they should be resolved before they get here.
3471         * error.c: Remove unused FILE *status_out.
3472         * f95-lang.c (g95_init): Remove bogus cast.
3473         * Many files: Make things 'const' where required.
3474         * g95.h: Fix prototypes for all modified functions above.
3475         (g95_options): Remove 'object' member.
3477 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3479         * Make-file.in: Cleanup bogus targets.  Add more comment.
3480         * lang-options.h: New option '-w'.
3481         * g95.h: add no_options field to struct g95_options.
3482         * options.c (g95_init_options): Default no_warnings to off.
3483         (g95_parse_arg): Recognise the '-w' switch and its alias,
3484         '-fno-warnings'.
3485         * error.c (g95_warning, g95_warning_now): Don't emit warning if
3486         no_warning option is set.
3487         * iresolve.c (g95_resolve_shape): Fix warning.
3489 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3491         * primary.c (g95_next_string_char): Rename next_string_char, and
3492         make static.  Adjust callers accordingly.
3493         * resolve.c (resolve_generic_f0): Return try, not match.  Adjust
3494         callers accordingly.
3495         * g95.h: Split out all g95_match* functions to...
3496         * match.h: ...here. New file.
3497         * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
3498         matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
3500 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3502         * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
3503         g95_merge_new_implicit): New functions.
3504         (g95_match_implicit_none, g95_match_implicit): Move from here...
3505         * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
3506         Modify to use the new functions in symbol.c.
3507         * g95.h: Add and move prototypes.
3509 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3511         * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
3512         node compare function.
3513         (g95_insert_bbt): Likewise.
3514         (g95_insert_bbt_with_overlap): Likewise.
3515         (g95_delete_bbt): Likewise.
3516         (delete_treap): Likewise. Also fix a potential bug when calling it.
3517         * module.c (compare_pointers): Change proto to compare_fn.
3518         (compare_integers): Likewise.
3519         (compare_true_names): Likewise.
3520         (find_true_name): Adjust call to compare_true_names to match proto.
3521         (require_atom, write_atom, mio_name): Fix 'const' warnings.
3522         (init_pi_tree): Make compare a compare_fn instead of (int *).
3523         * resolve.c (compare_cases): Change proto to compare_fn.
3524         * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
3525         it static, and rename to compare_symtree.
3526         (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
3527         function.
3528         * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
3529         of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
3531 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3532         * Make-lang.in: Fix spaces/tabs issues from previous patch.
3533         * patch.options: Blow away Paul's checkin mistake :-)
3534         * io.c (terminate_io): Fix memory leak (Arnaud).
3536 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3538         * Make-lang.in: Teach about building DVI, info manual.
3539         * g95.texi: New file.
3541 2003-01-02  Paul Brook  <paul@nowt.org>
3543         * trans-array.c (g95_reverse_ss): Make static and don't use.
3544         (g95_conv_ss_descriptor): Don't use g95_loopinfo
3545         (g95_conv_array_parameters): Modify for pointer assignments.
3546         (g95_walk_subexpr): New function.
3547         (g95_walk_expr*): Use it.
3548         * trans-array.h (g95_reverse_ss): Remove prototype.
3549         * trans-expr.c (g95_trans_pointer_assign): Implement.
3550         (Many): Set se.want_pointer before calling g95_conv_array_parameter.
3551         * trans-intrinsic.c: Sync with scalarizer changes.
3552         * trans-io.c: Ditto.
3554 2002-12-29  Paul Brook  <paul@nowt.org>
3556         * trans-array.c: Document calling convention for arrays.
3558 2002-12-19  Paul Brook  <paul@nowt.org>
3560         * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
3561         assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
3562         optional parameters for some intrinsics.
3563         (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
3564         * trans-expr.c (g95_conv_function_call): Pass NULL for absent
3565         optional parameters.
3566         * trans.h (g95_se): Add ignore_optional flag.
3568 2002-12-15  Paul Brook  <paul@nowt.org>
3570         * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
3571         * trans-decl.c (g95_generate_function_code): Use TDI_original.
3573 2002-12-14  Paul Brook  <paul@nowt.org>
3575         * trans-stmt.c (g95_trans_call): Use resolved symbol name.
3577 2002-12-12  Paul Brook  <paul@nowt.org>
3579         * trans-array.c (g95_trans_array_constructor_subarray): Fully
3580         initialize the scalarizer.
3581         (various): Update to new format of g95_expr->value.constructor.
3583 2002-12-08  Paul Brook  <paul@nowt.org>
3585         * trans-array.c (g95_put_offset_into_var): New function.
3586         (g95_trans_array_constructor_subarray): New function.
3587         (g95_trans_array_constructor_value): Use it.
3588         (g95_array_cons_size): Don't abort() on array components.
3590 2002-12-08  Paul Brook  <paul@nowt.org>
3592         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
3593         * support.c: Update #includes.
3594         (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
3595         * trans-array.c: Update #includes.
3596         * trans.c: Ditto.
3597         * trans-const.c: Ditto.
3598         * trans-io.c: Ditto.
3599         * trans-types.c: Ditto.
3600         (g95_init_types): Set size_type_node.
3601         * trans-decl.c: Update #includes.
3602         (gfor_fndecl_adjust{l,r}): Declare and initialize.
3603         * trans-stmt.c: Update #includes.
3604         (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
3605         (g95_trans_select): Fix check for unbounded ranges.
3606         * trans-expr.c: Update #includes.
3607         (g95_conv_string_tmp): New function.
3608         (g95_conv_concat_op): Use it.
3609         * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
3610         * Trans-intrisic.c: Update #includes.
3611         (g95_conv_intrinsic_strcmp): New function.
3612         (g95_conv_intrinsic_adjust): Ditto.
3613         (g95_conv_intrinsic_function: Use them.
3615 2002-11-30  Paul Brook  <paul@nowt.org>
3617         * trans-array.c (g95_walk_function_expr): Handle non-array return by
3618         reference.
3619         * trans-dec.c (g95_build_function_decl): Handle character return
3620         parammeters.
3621         (g95_get_fake_result_decl): Ditto.
3622         (g95_trans_deferred_vars): Ditto.
3623         * trans-expr.c (g95_conv_function_call): Ditto.
3624         (g95_trans_arrayfunc_assign) Limit to array valued functions.
3625         * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
3626         (g95_conv_intrinsic_function): Use it.
3627         * trans-types.c (g95_sym_type): Handle functions returning strings.
3628         (g95_return_by_reference): Ditto.
3629         (g95_get_function_type): Ditto.
3631 2002-11-18  Paul Brook  <paul@nowt.org>
3633         * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
3634         requires a temporary.
3635         (g95_trans_select): Handle computed gotos.
3636         * trans-types.c (g95_build_array_type): Warn about non-functional
3637         assumed shape arrays.
3638         * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
3639         blocks.
3640         * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
3641         (g95_conv_intrinsic_int): New function.
3642         (g95_conv_intrinsic_mod): New function.
3643         (g95_conv_intrinsic_ichar): New function.
3644         (g95_conv_intrinsic_function): Use them.
3645         (g95_conv_intrinsic_dim): Use g95_evaluate_now.
3647 2002-11-17  Toon Moene  <toon@moene.indiv.nluug.nl>
3649         * trans-types.c (g95_build_array_type): Assumed
3650         sized arrays can have rank > 1.
3651         * trans.c (g95_trans_code): Remove erroneous
3652         warning about CONTINUE.
3653         * trans-expr.c (g95_conv_variable): Remove
3654         erroneous assert.
3656 2002-11-15  Paul Brook  <paul@nowt.org>
3658         * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
3660 2002-10-31  Paul Brook  <paul@nowt.org>
3662         * f95-tree.c: Remove tree copying stuff that's now in gimple.c
3663         * trans-expr.c (g95_conv_component_ref): Handle character string
3664         components.
3665         (g95_conv_string_parameter): Ditto.
3666         * trans-types.c (g95_get_derived_type): Add length decl to caracter
3667         string components.
3669 2002-10-10  Paul Brook  <paul@nowt.org>
3671         * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
3672         * trans-expr.c (g95_conv_function_call): Remove unreliable return value
3673         check.
3674         * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
3675         (g95_conv_intrinsic_function): Handle size and shape intrinsics.
3676         (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
3677         * trans-types.c (pvoid_type_node): Declare and initialize.
3678         * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
3679         (g95_array_allocate): Fix when base==data.
3680         (g95_conv_array_parameter): Correctly handle reduced rank sections.
3681         * trans-io.c (g95_trans_write): Correctly handle string modifiers.
3683 2002-10-09  Paul Brook  <paul@nowt.org>
3685         * (g95_conv_expr_reference): Handle character strings correctly.
3687 2002-10-07  Paul Brook  <paul@nowt.org>
3689         (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
3690         langhook.
3691         * trans-array.c (g95_build_array_initializer): Remove.
3692         (g95_conv_array_initializer): New Function.
3693         (g95_trans_auto_arry_allocation): Cleanup.
3694         (g95_trans_init_character_array): Remove.
3695         * g95spec.c: Link in libgforbegin.
3696         * trans.c (g95_generate_code): Rename main function to MAIN__.
3697         (g95_create_var): New function.
3698         (g95_create_var_np): New function.
3699         (g95_evaluate_now): New function.
3700         (g95_start_block): New function.
3701         (g95_finish_block): New function.
3702         (g95_add_expr_to_block): New function.
3703         (g95_add_block_to_block): New function.
3704         * trans-expr.c (g95_conv_componen_ref): New function.
3705         * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
3706         (F95_OBJS): Add dependency.o.
3707         * f95-lang.c (g95_is_simple_stmt): Remove.
3708         * f95-tree.c (mark_not_simple): New function.
3709         (unshare_all_trees): New function.
3710         (create_tmp_var, create_tmp_alias_var): Remove.
3711         * support.c (declare_tmp_vars, tree_last_decl): Remove.
3712         * trans*: Convert to new IR using GENERIC trees.  Don't bother about
3713         SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
3715 2002-10-01  Paul Brook  <paul@nowt.org>
3717         * trans-array.c: Add support for descriptorless arrays.
3718         (g95_conv_array_data): New function.
3719         (g95_conv_array_base): New function.
3720         * trans-array.h: Declare these here.
3721         * trans-decl.c(g95_create_mopdule_variable): Perform variable
3722         initialization and creation here.
3723         (g95_create_module_vars): Instead of here.
3724         * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
3725         * trans-intrinsic.c: Ditto.
3726         * trans-types.c (g95_is_nodesc_array): New function.
3727         (g95_get_nodesc_array_type): New function.
3728         (g95_sym_type, g95_get_derived_type): Use them.
3729         * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
3731 2002-09-28  Paul Brook  <paul@nowt.org>
3733         * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
3734         * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
3735         parameters.
3737 2002-09-24  Paul Brook  <paul@nowt.org>
3739         * f95-lang.c (listify): Remove declaration.
3740         (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
3741         (listify)
3742         * f95-tree.c (get_name): New function.
3743         * trans.c (module_namespace): Remove.
3744         * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
3745         * trans-types.c: Ditto.
3747 2002-09-19  Paul Brook  <paul@nowt.org>
3749         * trans-array.c (g95_get_array_cons_size): New Function.
3750         (g95_con_ss_startstride): Handle Array constructors.
3751         (g95_conv_loop_setup): Ditto.
3752         (g95_conv_array_parameter): Ditto.
3753         * tras-decl.c (g95_finish_var_decl): Make initializes variables
3754         static.
3756 2002-09-19  Paul Brook  <paul@nowt.org>
3758         * trans.c (g95_simple_fold_tmp): Detect variables inside
3759         NON_LVALUE_EXPR.
3760         * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
3762 2002-09-18  Steven Bosscher <s.bosscher@student.tudelft.nl>
3764         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
3766 2002-09-14  Paul Brook  <paul@nowt.org>
3768         * trans.c (g95_create_module_variable): Move to trans-decl.c.
3769         * trans-const.c (g95_conv_string_init): New Function.
3770         * trans-const.h: Declare it.
3771         * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
3772         variables. Don't bail on intrinsic symbols.
3773         (get_extern_function_decl): Handle specific intrinsic functions.
3774         * trans-types.c (g95_sym_type): Dummy functions don't return
3775         reference types.
3776         * trans-array.c (g95_build_array_initializer): New Function.
3777         (g95_trans_auto_array_allocation): Build initializer for static decls.
3778         Don't use mpz_addmul, it's GMP4 only.
3780 2002-09-12  Paul Brook  <paul@nowt.org>
3782         * trans-decl.c (g95_generate_code): Fix thinko with return variable.
3783         (g95_get_extern_function_decl, g95_build_function_decl): Mangle
3784         assembler names for module procedures.
3786 2002-09-11  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
3788         * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
3789         dependency/
3791 2002-09-10  Paul Brook  <paul@nowt.org>
3793         * trans-array.c: Change format of G95_SS_TEMP strictures.
3794         (g95_check_fncall_dependancy): New function.
3795         (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
3796         offsets.
3797         * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
3798         result variables.
3799         (g95_build_function_decl): Don't assume result arrays are packed.
3800         (g95_trans-deferred-vars): Handle array result variables.
3801         (g95_generate_fuction_code): Clear saved_function_decls.
3802         * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
3803         reference.
3804         (g95_trans_arrayfunc_assign): New function.
3805         (g95_trans_assignment): Use it.
3806         * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
3807         (g95_se): Add direct_byref.
3808         * trans-types.c: Use sym->result rather than sym where appropriate.
3809         * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
3810         Update other functions to use this.
3811         (g95_is_intrinsic_libcall): New function.
3812         (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
3813         (g95_walk_intrinsic_function): Ditto.
3815 2002-09-08  Paul Brook  <paul@nowt.org>
3817         * trans-types.c: Change rank field to dtype field in array descriptor.
3818         * trans-array.c: Implement filling of dtype array descriptor field.
3819         * trans-intrinsic.c: Fix broken LEN intrinsic.
3821 2002-09-07  Paul Brook  <paul@nowt.org>
3823         * trans-intrinsic.c: Remove outdated todo intrinsic list.
3824         (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
3825         (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
3827 2002-09-06  Paul Brook  <paul@nowt.org>
3829         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
3830         (gt-f95-trans-types.h): Add dependancy information.
3831         * config-lang.in (gtfiles): Add trans-types.c
3832         * f95-lang.c (g95_be_parse_file): Pass error and warning counts
3833         back to top-level code.
3834         * trans-array.c, trans-types.c: Change format of array descriptor.
3835         (g95_conv_descriptor_dimension): New function.
3836         * trans-types.h (g95_conv_descriptor_rank): define.
3837         * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
3838         intrinsics.
3840 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
3842         * trans-array.c, trans-types.c: Add rank information to descriptor.
3844 2002-09-06  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
3846         * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
3848 2002-09-04  Paul Brook  <paul@nowt.org>
3850         * f95-lang.c (g95_create_decls): New function.
3851         (g95_init):  Move initialization of external decls to above, and call
3852         from g95_be_parse_file.
3853         * trans.c (g95_finish_stmt): Don't amputate the decl chain.
3854         * trans-types.c (g95_init_types): Always name integer and char types.
3855         (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
3857 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
3859         * Make-lang.in: Add options.c to F95_PARSER_OBJS
3861 2002-09-02  Paul Brook  <paul@nowt.org>
3863         * g95_generate_code: Clear the attr for __fortran_main.
3864         * trans-types.c (g95_finish_type): New function.
3865         * g95_init_io_state_type: Use g95_finish_type.
3866         * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
3868 2002-09-01  Paul Brook  <paul@nowt.org>
3870         * README.backend: Warn about the dangers of extra config.h files.
3871         Remove obsolete libgfor stuff.
3872         * config-lang.in: Add target-libgfor dependancy.
3873         * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
3875 2002-09-01  Toon Moene  <toon@moene.indiv.nluug.nl>
3877         * g95_conv_mpz_to_tree: Free storage pointed to by q,
3878         not by buff.
3880 2002-08-30  Paul Brook  <paul@nowt.org>
3882         * trans-intrinsic.c (g95_conv_intrinsic_function,
3883         g95_walk_intrinsic_function): Added ANY and ALL.
3884         (g95_conv_intrinsic_anyall): New function.
3885         * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in
3886         mangled name