* trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
[official-gcc.git] / gcc / fortran / ChangeLog
blob3cb938c36af3a4fa931de9d0e5984064ee6b9813
1 2004-05-03  Paul Brook  <paul@codesourcery.com>
3         * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
4         lists instead of compound expr chains.
5         (gfc_trans_code): Annotate statement lists.
7 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
9         * trans-array.c: Fix spelling in comments.
11 2004-06-02  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
13         PR fortran/15557
14         * data.c (assign_substring_data_value): New function.
15         (gfc_assign_data_value): Call the new function if we're dealing
16         with a substring LHS.
18 2004-06-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
20         PR fortran/15477
21         * gfortran.h (GFC_VERSION): Remove.
22         * gfortran.texi (version-gfortran): Remove, replace by version-GCC
23         where used.
25 2004-05-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
27         * trans-types.c: Fix spelling & layout in comments.
29 2004-05-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
31         PR fortran/14067
32         * trans-const.c (gfc_conv_string_init): Allow variable string
33         length lower than initialization string length.
35 2004-05-30  Paul Brook  <paul@codesourcery.com>
37         PR fortran/15620
38         * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
39         * trans-expr.c (gfc_trans_string_copy): New function.
40         (gfc_conv_statement_function): Use them.  Create temp vars.  Enforce
41         character lengths.
42         (gfc_conv_string_parameter): Use gfc_trans_string_copy.
43         * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
44         * trans.h (struct gfc_saved_var): Define.
45         (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
47 2004-05-30  Steven G. Kargl  <kargls@comcast.net>
49         * iresolve.c (gfc_resolve_random_number): Clean up conditional.
51 2004-05-29  Steven G. Kargl  <kargls@comcast.net>
53         * simplify.c (gfc_simplify_log): Remove useless line of code.
55 2004-05-29  Paul Brook  <paul@codesourcery.com>
57         * trans-common.c (find_equivalence): Find multiple rules.
59 2004-05-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
61         * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
62         (gfc_current_locus): Declare new global variable.
63         * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
64         (gfc_current_locus1): Rename ...
65         (gfc_current_locus): ... to this.
66         (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
67         skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
68         gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
69         gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
70         and gfc_current_locus(), respectively.
71         * array.c (match_subscript, gfc_match_array_ref, match_array_list,
72         match_array_cons_element, gfc_match_array_constructor):
73         Read/modify gfc_current_locus instead of calling gfc_set_locus()
74         and gfc_current_locus().
75         * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
76         match_attr_spec, gfc_match_function_decl, gfc_match_end,
77         attr_decl1, gfc_match_save): Likewise.
78         * error.c (error_print, gfc_internal_error): Likewise.
79         * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
80         * interface.c (gfc_add_interface): Likewise.
81         * io.c (gfc_match_format, match_dt_format, match_dt_element,
82         match_io_iterator, match_io): Likewise.
83         * match.c (gfc_match_space, gfc_match_eos,
84         gfc_match_small_literal_int, gfc_match_st_label,
85         gfc_match_strings, gfc_match_name, gfc_match_iterator,
86         gfc_match_char, gfc_match, gfc_match_assignment,
87         gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
88         gfc_match_nullify, gfc_match_call, match_implicit_range,
89         gfc_match_implicit, gfc_match_data, match_case_selector,
90         gfc_match_case, match_forall_iterator): Likewise.
91         * matchexp.c (gfc_match_defined_op_name, next_operator,
92         match_level_1, match_mult_operand, match_ext_mult_operand,
93         match_add_operand, match_ext_add_operand, match_level_2,
94         match_level_3, match_level_4, match_and_operand, match_or_operand,
95         match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
96         * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
97         * parse.c (match_word, decode_statement, next_free, next_fixed,
98         add_statement, verify_st_order, parse_if_block, gfc_parse_file):
99         Likewise.
100         * primary.c (match_digits, match_integer_constant,
101         match_boz_constant, match_real_constant, match_substring,
102         next_string_char, match_charkind_name, match_string_constant,
103         match_logical_constant, match_const_complex_part,
104         match_complex_constant, match_actual_arg, match_keyword_arg,
105         gfc_match_actual_arglist, gfc_match_structure_constructor,
106         gfc_match_rvalue, gfc_match_variable): Likewise.
107         * st.c (gfc_get_code): Likewise.
108         * symbol.c (check_conflict, check_used, check_done,
109         duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
110         gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
111         gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
113 2004-05-26  Roger Sayle  <roger@eyesopen.com>
115         * io.c (format_asterisk): Silence compiler warnings by correcting
116         the number of elements of a "locus" initializer.
118 2004-05-25  Roger Sayle  <roger@eyesopen.com>
120         PR fortran/13912
121         * matchexp.c: Allow unary operators after arithmetic operators
122         as a GNU extension.
123         (match_ext_mult_operand, match_ext_add_operand): New functions.
124         (match_mult_operand): Tweak to call match_ext_mult_operand.
125         (match_add_operand): Tweak to call match_ext_mult_operand.
126         (match_level_2): Rearrange to call match_ext_add_operand.
128 2004-05-25  Paul Brook  <paul@codesourcery.com>
130         * expr.c (check_inquiry): Remove bogus tests.
132 2004-05-23  Paul Brook  <paul@codesourcery.com>
134         PR fortran/13773
135         * expr.c (restricted_args): Remove redundant checks/argument.
136         (external_spec_function): Update to match.
137         (restricted_intrinsic): Rewrite.
139 2004-05-23  Paul Brook  <paul@codesourcery.com>
140         Victor Leikehman  <lei@haifasphere.co.il>
142         * gfortran.h (struct gfc_symbol): Add equiv_built.
143         * trans-common.c: Change int to HOST_WIDE_INT.  Capitalize error
144         messages.
145         (current_length): Remove.
146         (add_segments): New function.
147         (build_equiv_decl): Create initialized common blocks.
148         (build_common_decl): Always add decl to bindings.
149         (create_common): Create initializers.
150         (find_segment_info): Reformat to match coding conventions.
151         (new_condition): Use add_segments.
152         (add_condition, find_equivalence, add_equivalences): Move iteration
153         inside functions.  Only process each segment once.
154         (new_segment, finish_equivalences, translate_common): Simplify.
156 2004-05-23  Steven G. Kargl  <kargls@comcast.net>
158         * check.c (gfc_check_random_seed): Issue for too many arguments.
160 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
162         * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
164 2004-05-22  Paul Brook  <paul@codesourcery.com>
166         * dump-parse-tree.c (gfc_show_equiv): New function.
167         (gfc_show_namespace): Use it.
169 2004-05-22  Victor Leikehman  <lei@haifasphere.co.il>
171         PR fortran/13249
172         * symbol.c (gfc_add_common): Disable checks to work around other more
173         fundamental inadequacies.
175 2004-05-22  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
177         * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
178         only for functions.
179         (gfc_build_function_decl): Likewise.
181 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
183         * check.c (gfc_check_system_clock): New function.
184         * intrinsic.c (add_sym_3s): New function.
185         (add_subroutines): Use it.
186         * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
187         Add prototypes.
188         * iresolve.c (gfc_resolve_system_clock): New function.
190 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
192         * invoke.texi: Document -Wunderflow and spell check.
193         * lang.opt: Add Wunderflow.
194         * gfortran.h (gfc_option_t): Add warn_underflow option.
195         * options.c (gfc_init_options, set_Wall): Use it.
196         * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
197         * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
198         gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
199         gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
200         * arith.c (common_logarithm): Fix typo in comment.
202 2004-05-21  Roger Sayle  <roger@eyesopen.com>
204         * io.c (check_format): As a GNU extension, allow the comma after a
205         string literal to be optional in a format.  Use gfc_notify_std to
206         issue an error/warning as appropriate.
208 2004-05-21  Roger Sayle  <roger@eyesopen.com>
210         * io.c (check_format): Use gfc_notify_std to determine whether to
211         issue an error/warning for omitting the digits from the X format.
213 2004-05-20  Roger Sayle  <roger@eyesopen.com>
215         * io.c (check_format): Allow the number before the X format to
216         be optional when not -pedantic.
218 2004-05-18  Feng Wang  <fengwang@nudt.edu.cn>
219         Paul Brook  <paul@codesourcery.com>
221         * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
222         Create decls for __builtin_pow{,f}.
223         * gfortran.h (PREFIX_LEN): Define.
224         * trans-decl.c (gfor_fndecl_math_powi): Add.
225         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
226         (gfc_build_intrinsic_function_decls): Create decls for powi.
227         * trans-expr.c (powi_table): Add.
228         (gfc_conv_integer_power): Remove.
229         (gfc_conv_powi): New function.
230         (gfc_conv_cst_int_power): New function.
231         (gfc_conv_power_op): Use new powi routines.
232         * trans.h (struct gfc_powdecl_list): Add.
233         (gfor_fndecl_math_powi): Add.
234         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
236 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
238         * trans.c, trans-decl.c: Fix comment typos.
240 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
242         * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
244 2004-05-18  Steve Kargl  <kargls@comcast.net>
246         * arith.c (gfc_int2complex): Fix incorrect range checking.
248 2004-05-18  Paul Brook  <paul@codesourcery.com>
250         PR fortran/13930
251         * decl.c (add_init_expr_to_sym): Remove incorrect check.
252         (default_initializer): Move to expr.c.
253         (variable_decl): Don't assign default initializer to variables.
254         * expr.c (gfc_default_initializer): Move to here.
255         * gfortran.h (gfc_default_initializer): Add prototype.
256         * resolve.c (resolve_symbol): Check for illegal initializers.
257         Assign default initializer.
259 2004-05-17  Steve Kargl  <kargls@comcast.net>
261         * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
263 2004-05-17  Steve Kargl  <kargls@comcast.net>
265         * arith.c (gfc_real2complex): Range checking wrong part of complex
266         number. 
267         
268 2004-05-16  Paul Brook  <paul@codesourcery.com>
270         * options.c (gfc_handle_module_path_options): Fix buffer overrun.
272 2004-05-16  Paul Brook  <paul@codesourcery.com>
274         * arith.c (gfc_range_check): Fix logic error.
276 2004-05-16  Steve Kargl  <sgk@troutmask.apl.washington.edu>
278         * arith.c: Fix comment typos.
280 2004-05-15  Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
282         PR fortran/13742
283         * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
284         not initialized in a disallowed fashion.
285         * match.c (gfc_match_common): Likewise.
286         (var_element): Verify that variable is not in the blank COMMON,
287         if it is in a common. 
289 2004-05-15  Joseph S. Myers  <jsm@polyomino.org.uk>
291         * Make-lang.in (f95.generated-manpages): Remove.
292         (f95.srcextra): New.
293         (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
294         f95.maintainer-clean): Generate info and dvi files in objdir/doc.
295         (f95.dvi): Remove.
296         (dvi): New.
297         (f95.install-info): Remove.
298         (install-info): New.
300 2004-05-15  Victor Leikehman  <lei@haifasphere.co.il>
302         * decl.c (add_init_expr_to_sym): Check for variable size arrays.
304 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
306         * primary.c (match_boz_constant): Use gfc_notify_std() for
307         issuing a warning or an error.
309 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
311         PR fortran/13826
312         * primary.c (match_structure_constructor): Rename ...
313         (gfc_match_structure_constructor): ... to this. Make non-static.
314         (gfc_match_rvalue): Call renamed function.
315         * match.h (gfc_match_structure_constructor): Declare.
316         * match.c (gfc_match_data_constant): Handle structure
317         constructor.
319 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
321         PR fortran/13702 
322         (Port from g95)
323         * gfortran.h (gfc_linebuf): New typedef.
324         (linebuf): Remove.
325         (gfc_file): Revamped, use new gfc_linebuf.
326         (locus): Revamped, use new types.
327         (gfc_current_file): Remove.
328         (gfc_current_form, gfc_source_file): New global variables.
329         * match.c (gfc_match_space, gfc_match_strings): Use
330         gfc_current_form to find source form.
331         * module.c (gfc_dump_module): Use gfc_source_file when printing
332         module header.
333         * error.c (show_locus, show_loci) Use new data structures to print
334         locus.
335         * scanner.c (first_file, first_duplicated_file, gfc_current_file):
336         Remove.
337         (file_head, current_file, gfc_current_form, line_head, line_tail,
338         gfc_current_locus1, gfc_source_file): New global variables.
339         (gfc_scanner_init1): Set new global variables.
340         (gfc_scanner_done1): Free new data structures.
341         (gfc_current_locus): Return pointer to gfc_current_locus1.
342         (gfc_set_locus): Set gfc_current_locus1.
343         (gfc_at_eof): Set new variables.
344         (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
345         to new locus structure.
346         (gfc_check_include): Remove.
347         (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
348         (gfc_skip_comments): Use gfc_current_form, find locus with
349         gfc_current_locus1.
350         (gfc_next_char): Use gfc_current_form.
351         (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
352         (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
353         comment formatting.
354         (get_file): New function.
355         (preprocessor_line, include_line): New functions.
356         (load_file): Move down, rewrite to match new data structures.
357         (gfc_new_file): Rewrite to match new data structures.
358         * parse.c (next_statement): Remove code which is now useless. Use
359         gfc_source_form and gfc_source_file where appropriate.
360         * trans-decl.c (gfc_get_label_decl): adapt to new data structures
361         when determining locus of frontend code.
362         * trans-io.c (set_error_locus): Same.
363         * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
364         * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
365         preprocessor flags.
366         (all): Add missing initializers.
368 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
370         * Make-lang.in (trans-common.o): Remove redundant dependency.
371         (data.c): Replace object file name ...
372         (data.o): ... by the correct one.
374 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
376         * dump-parse-tree.c (gfc_show_array_ref): Print colon only
377         for ranges when dumping array references.
379 2004-05-14  Victor Leikehman  <lei@haifasphere.co.il>
381         * decl.c (variable_decl): Always apply default initializer.
383 2004-05-08  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
385         PR fortran/15206
386         * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
387         handle zero correctly.
389 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
391         * match.c (gfc_match): Eliminate dead code.
393 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
395         * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
396         Detect bad continuation line in fixed form sources.
398 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
400         PR fortran/15205
401         * iresolve.c (gfc_resolve_nearest): Add new function.
402         * intrinsic.h: ... declare it here.
403         * intrinsic.c (add_functions): ... add it as resolving function
404         for NEAREST.
405         
406 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
408         PR fortran/14066
409         * match.c (gfc_match_do): Allow infinite loops with
410         label-do-stmt. Do not enforce space after comma.
412 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
414         PR fortran/15051
415         * parse.c (parse_interface): Allow empty INTERFACE, remove
416         seen_body.
418 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
420         * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
421         decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
422         expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
423         intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
424         matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
425         primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
426         trans-array.c, trans-array.h, trans-common.c, trans-const.c,
427         trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
428         trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
429         trans-types.h, trans.c, trans.h: Update copyright years and
430         boilerplate.
431         * data.c: Likewise, also removed two whitespace-only lines.
432         * gfortranspec.c, lang.opt: Update copyright years.
434 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
436         PR fortran/14568
437         * trans-decl.c (generate_local_decl): Don't warn for unused
438         variables which are in common blocks. 
440 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
442         * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
443         trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
444         trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
446 2004-05-13  Victor Leikehman  <lei@haifasphere.co.il>
448         PR fortran/15314
449         * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
451 2004-05-13  Joseph S. Myers  <jsm@polyomino.org.uk>
453         * gfortran.texi: Use @table @emph instead of @itemize @emph.
454         Remove "set DEVELOPMENT".
455         (Compiling GFORTRAN): Remove.
457 2004-05-09  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
459         * array.c (match_subscript, match_array_ref): Add comments
460         explaining argument 'init'.
461         * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
462         trans-expr.c, trans.c: Fix some typos in comments.
463         * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
464         * primary.c (match_digits, match_integer_constant): Add comment
465         explaining signflag.
467 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
469         PR fortran/13940
470         * primary.c: Include system.h and flags.h, needed for pedantic.
471         (match_boz_constant): Allow "x" for hexadecimal constants, warn if
472         pedantic is set.
474 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
476         PR fortran/13940
477         * match.c (match_data_constant): Handle case where
478         gfc_find_symbol sets sym to NULL
480 2004-04-28  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
482         * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
483         dependency on mathbuiltins.def
485 2004-04-24  Victor Leikehman  <lei@il.ibm.com>
487         * trans-io.c (transfer_expr): Implemented recursive printing
488         of derived types.
490 2004-04-24  Andrew Pinski  <pinskia@physics.uc.edu>
492         * gfortranspec.c: Do not include multilib.h.
494 2004-04-24  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
496         * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
497         2004 to copyright years.
498         * trans-expr.c, trans-decl.c: Comment update, we now generate
499         GENERIC, not SIMPLE. Add 2004 to copyright years.
501 2004-04-24  Paul Brook  <paul@codesourcery.com>
503         * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
505 2004-04-24  Feng Wang  <fengwang@nudt.edu.cn>
507         PR 14817
508         * arith.c (gfc_arith_divide): Fix complex divide.
510 2004-04-23  Andrew Pinski  <pinskia@physics.uc.edu>
512         * gfortranspec.c: Include the target headers.
514 2004-04-18  Feng Wang  <fengwang@nudt.edu.cn>
516         PR fortran/14921
517         PR fortran/14540
518         * arith.c (arctangent2): New function.
519         * arith.h (arctangent2): Add function prototype.
520         * simplify.c (gfc_simplify_atan2): Use it.
521         (gfc_simplify_log): Use it.
523 2004-04-12  Diego Novillo  <dnovillo@redhat.com>
525         * fortran/f95-lang.c (gfc_expand_stmt): Remove.
526         (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
528 2004-04-11  Bud Davis  <bdavis9659@comcast.net>
530         PR fortran/14872
531         * trans-io.c (build_dt): Change REC to value.
533 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
535         PR 14394 
536         * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
537         the real value when converting mpf to string.
539 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
541         PR 14395
542         * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
543         the result.
545 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
547         PR fortran/14377
548         * simplify.c (simplify_min_max): Convert the type of the result.
550 2004-04-11  Paul Brook  <paul@codesourcery.com>
552         * gfortran.texi: Use full target triplet.
554 2004-04-11  Paul Brook  <paul@codesourcery.com>
556         * Make-lang.in (GFORTRAN_TEXI): Set it.
557         (fortran/dfortran.dvi): Use it.  Add fortran to include paths.
558         (fortran/gfortran.info): Ditto. 
559         * gfortran.texi: Major update.
560         * invoke.texi: New file.
562 2004-04-10  Paul Brook  <paul@codesourcery.com>
564         * trans-array.c (gfc_trans_allocate_temp_array,
565         gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
566         * trans-decl.c (gfc_build_dummy_array_decl,
567         gfc_get_symbol_decl, gfc_build_function_decl,
568         gfc_create_module_variable): Ditto.
569         * trans-expr.c (gfc_conv_variable): Ditto.
570         * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
571         * trans.h (GFC_DECL_STRING): Remove.
572         (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
573         GFC_DECL_ASSIGN): Renumber flags.
575 2004-04-05  Paul Brook  <paul@codesourcery.com>
577         PR 13252
578         PR 14081
579         * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
580         and stack_restore.
581         * gfortran.h (struct gfc_charlen): Add backend_decl.
582         * trans-array.c (gfc_trans_allocate_temp_array,
583         gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
584         (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
585         Remove old, broken string handling.
586         (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
587         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
588         gfc_trans_deferred_array): Handle character arrays.
589         * trans-const.c (gfc_conv_const_charlen): New function.
590         * trans-const.h (gfc_conv_const_charlen): Add prototype.
591         * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
592         as static.
593         (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
594         (gfc_create_string_length): New function.
595         (gfc_get_symbol_decl): Create lengths for character variables.
596         (gfc_get_fake_result_decl): Ditto.
597         (gfc_build_function_decl): Only set length for assumed length
598         character arguments.
599         (gfc_trans_dummy_character): New function.
600         (gfc_trans_auto_character_variable): Rewrite.
601         (gfc_trans_deferred_vars): Handle more types of character variable.
602         (gfc_create_module_variable): String lengths have moved.
603         (gfc_generate_function_code): Initialize deferred var chain earlier.
604         * trans-expr.c (gfc_conv_init_string_length): Rename ...
605         (gfc_trans_init_string_length):  ... to this.
606         (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
607         gfc_conv_function_call): Update to new format for character variables.
608         (gfc_conv_string_length): Remove.
609         (gfc_conv_string_parameter): Update assertion.
610         * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
611         * trans-io.c (set_string): Use new macro names.
612         * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
613         * trans-types.c (gfc_get_character_type): Use existing length expr.
614         (gfc_is_nodesc_array): Make public.
615         (gfc_get_dtype_cst): Rename ...
616         (gfc_get_dtype): ... to this.  Handle unknown size arrays.
617         (gfc_get_nodesc_array_type): Use new name.
618         (gfc_sym_type): New character variable code.
619         (gfc_get_derived_type): Ditto.
620         (gfc_get_function_type): Evaluate character variable lengths.
621         * trans-types.h (gfc_strlen_kind): Define.
622         (gfc_is_nodesc_array): Add prototype.
623         * trans.h: Update prototypes.
624         (struct lang_type): Update comments.
625         (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
626         (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
628 2004-04-04  Paul Brook  <paul@codesourcery.com>
630         * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
631         * options.c (gfc_init.options, gfc_handle_option): Ditto.
632         * trans-expr.c (gfc_conv_function_call): Ditto.
633         * trans-types.c (gfc_is_nodesc_array): Ditto
634         * lang.opt (fg77-calls): Remove.
636 2004-04-04  Paul Brook  <paul@codesourcery.com>
638         * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
639         (gfc_conv_descriptor_base): Rename ...
640         (gfc_conv_descriptor_offset): ... to this.
641         (gfc_trans_allocate_array_storage): Set offset to zero.
642         (gfc_conv_array_base): Rename ...
643         (gfc_conv_array_offset): ... to this.
644         (gfc_conv_array_index_ref): Add offset parameter.
645         (gfc_conv_array_ref): Include offset.
646         (gfc_trans_preloop_setup): Use existing offset.
647         (gfc_trans_allocate_temp_array,  gfc_array_allocate,
648         gfc_trans_auto_array_allocation, gfc_trans_g77_array,
649         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
650         gfc_conf_ss_descriptor): Set offset.
651         * trans-array.h: Rename prototypes.
652         * trans-const.h (gfc_index_zero_node): Define.
653         * trans-decl.c (gfc_build_qualified_array): Change base to offset.
654         * trans-types.c (gfc_get_array_type_bounds): Ditto.
655         (gfc_get_nodesc_array_type): Calculate offset before upper bound.
657 2004-03-25  Diego Novillo  <dnovillo@redhat.com>
659         * convert.c (convert): Don't handle WITH_RECORD_EXPR.
661 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
663         PR 14055
664         * arith.c (gfc_convert_integer,gfc_convert_real):  Removed leading '+'
665         before conversion by gmp library call.
667 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
669         PR 12921
670         * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
672 2004-02-24  Richard Henderson  <rth@redhat.com>
674         * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
676 2004-02-19  Loren J. Rittle  <ljrittle@acm.org>
678         * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
679         (fortran/gfortran.info): ... to here.
680         (f95.srcinfo): New.
682 2004-02-16  Richard Henderson  <rth@redhat.com>
684         * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
685         * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
686         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
687         (gfc_expand_function): Rename from expand_function_body, make static,
688         don't do anything except invoke tree_rest_of_compilation.
689         (gfc_be_parse_file): Invoke cgraph.
690         (gfc_expand_decl): Remove.
691         (gfc_init_builtin_functions): Add __builtin_init_trampoline and
692         __builtin_adjust_trampoline.
693         * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
694         (gfc_finalize): New.
695         (gfc_generate_function_code): Use it.  Lower nested functions.
696         * trans-expr.c (gfc_conv_function_call): Add static chain operand
697         to call_expr.
698         * trans.c (gfc_build_function_call): Likewise.
699         * trans.h (expand_function_body): Remove.
701 2004-02-15  Victor Leikehman  <lei@il.ibm.com>
703         PR gfortran/13433
704         * trans-decl.c (gfc_build_function_decl) For functions
705         returning CHARACTER pass an extra length argument,
706         following g77 calling conventions.
707         * trans-types.c (gfc_get_function_type) Ditto.
708         * trans-expr.c (gfc_conv_function_call) Ditto.
710 2004-02-14  Paul Brook  <paul@codesourcery.com>
712         * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
714 2004-02-12  Paul Brook  <paul@nowt.org>
716         * BUGS: Remove.
718 2004-02-08  Steve Kargl  <sgk@troutmask.apl.washington.edu>
720         * gfortran.texi: Fix typos.
722 2004-02-07  Bud Davis  <bdavis9659@comcast.net>
724         PR gfortran/13909
725         * intrinsic.c (add_conversions) Use logical conversion instead
726         of real.
727         * trans-types.c (gfc_get_logical_type) implemented logical*1
728         and logical*2.
730 2004-01-17  Paul Brook  <paul@codesourcery.com>
732         * lang-specs.h: Remove %<fixed-form.
734 2004-01-15  Toon Moene  <toon@moene.indiv.nluug.nl>
736         * lang-specs.h: Enable preprocessing of source files
737         ending in .F, .fpp, .FPP, .F90 and .F95.
739 2004-01-13  Toon Moene  <toon@moene.indiv.nluug.nl>
741         PR fortran/12912
742         * lang-specs.h: Enable compilation of files ending
743         in .f, .for and .FOR.
745 2004-01-11  Paul Brook  <paul@codesourcery.com>
747         * trans-stmt.c (gfc_trans_if_1): New function.
748         (gfc_trans_if): Use it.
750 2004-01-11  Erik Schnetter  <schnetter@uni-tuebingen.de>
752         * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
753         (gfc_option_t): Add max_identifier_length.
754         * lang.opt: Add fmax-identifier-length.
755         * match.c (parse_name): Use limit.
756         * options.c (gfc_init_options): Set max_identifier_length.
757         (gfc_handle_option): Ditto.
759 2004-01-11  Feng Wang  <fengwang@nudt.edu.cn>
761         * intrinsic.c (add_functions): Add resolve function to dcmplx.
762         * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
763         * iresolve.c (gfc_resolve_dcmplx): New function.
765 2004-01-10  Paul Brook  <paul@codesourcery.com>
767         * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
768         * trans-types.c (gfc_sym_type): Handle external dummy procedures.
769         (gfc_return_by_reference): Correct condition.
770         (gfc_get_function_type): Ditto.
772 2004-01-10  Paul Brook  <paul@codesourcery.com>
774         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
775         types.
777 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
779         * iresolve.c: Use correct kind.
781 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
783         PR fortran/13467
784         * trans-decl.c (gfc_create_module_variable):  Output array valued
785         parameters.
787 2004-01-10  Paul Brook  <paul@codesourcery.com>
789         * resolve.c (resolve_branch): Get error message right way round.
791 2004-01-10  Canqun Yang <canqun@nudt.edu.cn>
793         * trans-array (gfc_conv_loop_setup): Adjust comment to track
794         reality.
795         (gfc_array_allocate): Don't count size of element twice.
797 2004-01-04  Paul Brook  <paul@codesourcery.com>
799         * lang.opt (i8, r8, std=*): Remove RejectNegative.
801 2004-01-04  Paul Brook  <paul@codesourcery.com>
803         * error.c (gfc_notify_std): New function.
804         * gfortran.h (gfc_notify_std): Declare.
805         (GFC_STD_*): Define.
806         (gfc_option_t): Add warn_std and allow_std.
807         * intrinsic.c (gfc_init_expr_extensions): Fix logic.
808         (gfc_intrinsic_func_interface): Use gfc_notify_std.
809         * check.c (check_rest): Use gfc_notify_std.
810         * match.c (gfc_match_pause): Ditto.
811         (gfc_match_assign): Ditto.
812         (gfc_match_goto): Ditto.
813         * resolve.c (resolve_branch): Ditto.
814         * lang.opt: Add std=<foo> and w.
815         * options.c (gfc_init_options): Set allow_std and warn_std.
816         (gfc_handle_option): Handle OPT_std_* and OPT_w.
818 2004-01-01  Paul Brook  <paul@codesourcery.com>
820         * array.c (gfc_append_constructor): Take constructor, not expression.
821         * data.c (struct gfc_expr_stack): Remove.
822         (expr_stack): Remove.
823         (find_con_by_offset): Rename from find_expr_in_con.
824         (find_con_by_component): Rename from find_component_in_con.
825         (gfc_get_expr_stack): Remove.
826         (gfc_assign_data_value): Rewrite.
827         (gfc_expr_push): Remove.
828         (gfc_expr_pop): Remove.
829         (gfc_advance_section): Rename from
830         gfc_modify_index_and_calculate_offset.  Handle unbounded sections.
831         (gfc_get_section_index): Handle unbounded sections.
832         * gfortran.h: Update prototypes.
833         * resolve.c (check_data_variable): Array section maight not be the
834         last ref.
836 2004-01-01  Paul Brook  <paul@codesourcery.com>
838         PR fortran/13432
839         * resolve.c (resolve_symbol): Allow assumed length function results.
841 2004-01-01  Steve Kargl  <sgk@troutmask.apl.washington.edu>
843         * match.c (gfc_match_pause): Fix spelling.
845 2004-01-01  Steven Bosscher  <stevenb@suse.de>
847         PR fortran/13251
848         * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
849         reference from the expression.
851 2003-12-26  Feng Wang  <fengwang@nudt.edu.cn>
853         * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
854         dumping.
855         * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
856         (gfc_exec_op): New EXEC_LABEL_ASSIGN.
857         (symbol_attribute):New variable attribute: assign.
858         * io.c (resolve_tag):Integer variable is allowed.
859         (match_dt_format): Add ASSIGN statement. Set assign flag.
860         * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
861         (gfc_match_assign): Add ASSIGN statement. Set assign flag.
862         (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
863         * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
864         (next_statement): Add ST_LABEL_ASSIGNMENT.
865         (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
866         * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
867         (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
868         * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
869         * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
870         assign.  Put them into the stuct lang_decl.
871         * trans-io.c (set_string): Add the assign statement.
872         * trans-stmt.c (gfc_trans_label_assign): New function.
873         (gfc_trans_goto): Translate ASSIGNED GOTO statement.
874         * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
875         * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
876         * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
877         (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
878         (GFC_DECL_ASSIGN(node)): New macro to access flag.
880 2003-12-31  Huang Chun <chunhuang73@hotmail.com>
882         PR fortran/13434
883         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in 
884         minval/maxval.
886 2003-12-22  Toon Moene  <toon@moene.indiv.nluug.nl>
888         * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
889         that arguments to subroutines/functions can't alias themselves, nor global
890         memory.
892 2003-12-20  Steven Bosscher  <stevenb@suse.de>
894         * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
895         * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
897 2003-12-12  Huang Chun <chunhuang73@hotmail.com>
899         * primary.c (match_substring): Fix substring bug for start point
900         or end point is NULL.
901         * trans-expr.c (gfc_conv_substring): Ditto
902         * trans-types.c (gfc_sym_type): Get correct type of scalar 
903         character variables.
904         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in 
905         derived type.
907 2003-12-10  Richard Henderson  <rth@redhat.com>
909         * options.c (gfc_post_options): Don't ever use rtl inlining.
911 2003-12-05  Canqun Yang  <canqun@nudt.edu.cn>
913         * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
914         * trans-equivalence.c: Remove.
915         * trans-decl.c (gfc_get_symbol_decl): Update to match.
916         (gfc_generate_function_code): Ditto.
917         * trans-array.c (gfc_conv_array_parameter): Ditto.
918         * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
919         (F95_ADDITIONAL_OBJS): Add stor-layout.o
920         * trans.h (gfc_trans_equivalence): Remove.
921         * gfortran.h (struct gfc_equiv): Add used field.
922         (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
923         equiv_offset fields.
925 2003-12-05  Richard Henderson  <rth@redhat.com>
927         * trans.c (gfc_build_addr_expr): New.
928         (gfc_build_indirect_ref, gfc_build_array_ref): New.
929         * trans.h: Declare them.
930         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
931         trans-stmt.c, trans.c (*): Use them.
933         * f95-lang.c (gfc_post_options): Remove dead prototype.
934         * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
935         * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
936         allocation size.
938 2003-12-01  Feng Wang  <fengwang@nudt.edu.cn>
940         * io.c (gfc_match_format): Check for missing format label.
942 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
944         PR fortran/13155
945         * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
946         from interfaces in modules.
948 2003-11-30  Paul Brook  <paul@nowt.org>
950         * trans-array.c (gfc_trans_g77_array): Make non-static.
951         (gfc_trans_assumed_size): Remove.
952         (gfc_trans_dummy_array_bias): Explicitly free temporary.
953         * trans-array.h (gfc_trans_g77_array): Add prototype.
954         (gfc_trans_assumed_size): Remove.
955         * trans-decls.c (gfor_fndecl_push_context): Remove.
956         (gfor_fndecl_pop_context): Remove.
957         (gfc_build_function)decls): Don't create them.
958         (gfc_trans_deferred_vars): Update to match. Remove dead code.
959         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
961 2003-11-30  Kejia Zhao  <kejia_zh@nudt.edu.cn>
963         * trans-array.c (gfc_conv_array_parameter): Simplify
964         array argument passing for array name actual argument.
965         * trans-expr.c (gfc_conv_function_call): Ditto
966         * trans-types.c (gfc_is_nodesc_array):Ditto.
968 2003-11-30  Paul Brook  <paul@nowt.org>
970         * f95-lang.c (gfc_post_options): Move ...
971         * options.c (gfc_post_options): .. to here.  Handle inlining options.
972         * gfortran.h (gfc_post_options): Add prototype.
974 2003-11-28  Richard Henderson  <rth@redhat.com>
976         * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
978 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
980         * trans.h (has_alternate_specifier): New global variable.
981         * match.c (gfc_match_call): Handle actual arguments associated with
982         alternate return indicators.
983         * trans-expr.c (gfc_conv_function_call): Ditto
984         * trans-stmt.c (gfc_trans_call): Ditto
985         (gfc_trans_return): Handle return statement with value.
986         * trans-decl.c (gfc_generate_function_code): Handle functions with
987         asterisk dummy.
988         (gfc_get_fake_result_decl): Ditto
989         * trans-types.c (gfc_get_function_type): Ditto
990         * resolve.c (resolve_actual_arglist): Check alternate return indicators.
991         (resolve_formal_arglist): Check asterisk dummy.
993 2003-11-27  Paul Brook  <paul@nowt.org>
995         * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
996         allocation interface.
997         (gfc_conv_ array_parameter): Ditto.
998         (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
999         * trans-array.c: Update prototype.
1000         * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
1001         (gfc_trans_auto_character_variable): Use new memory alloc interface.
1002         * trans-expr.c (gfc_conv_string_tmp): Ditto.
1003         (gfc_conv_function_call): Use gfc_conv_string_tmp.
1004         * trans-stmt.c (gfc_do_allocate):  Use new memory alloc interface.
1005         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
1006         * trans.h (gfc_ss_info): Remove unused pdata field.
1007         * trans.c (gfc_create_var_np): Change T to V.
1009 2003-11-26  Richard Henderson  <rth@redhat.com>
1011         * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
1012         * trans-intrinsic.c (gfc_intrinsic_map): ... here.  Add SCALE,
1013         FRACTION, NEAREST, SET_EXPONENT.
1014         (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
1015         Fix GTY marking.  Remove unnecessary const's.
1016         (LIBM_FUNCTION): Rename from I_LIB.
1017         (LIBF_FUNCTION): New.
1018         (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
1019         conventions.  Assume the expr signature is correct.  Mark const.
1020         (gfc_conv_intrinsic_exponent): Use library functions.
1021         (gfc_conv_intrinsic_set_exponent): Remove.
1022         (gfc_conv_intrinsic_scale): Remove.
1023         (gfc_conv_intrinsic_nearest): Remove.
1024         (gfc_conv_intrinsic_fraction): Remove.
1025         (gfc_conv_intrinsic_function): Update.
1026         * trans-decl.c (gfor_fndecl_math_exponent4): New.
1027         (gfor_fndecl_math_exponent8): New.
1028         (gfc_build_intrinsic_function_decls): Set them.
1029         * trans.h: Declare them.
1031 2003-11-25  Canqun Yang  <canqun@nudt.edu.cn>
1033         * trans-common.c (gfc_layout_global_equiv): Locate the error for
1034         underflow COMMON block.
1035         (gfc_trans_one_common): Fix bug for size of COMMON block containing
1036         EQUIVALENCE object. Also fix typo in an error message.
1038 2003-11-25  Diego Novillo  <dnovillo@redhat.com>
1040         * Make-lang.in: Add check-gfortran to lang_checks.
1041         (check-f95): Alias for check-gfortran.
1043 2003-11-25  Jason Merrill  <jason@redhat.com>
1045         * Make-lang.in (f95.tags): Create TAGS.sub files in each
1046         directory and TAGS files that include them for each front end.
1048 2003-11-24  Paul Brook  <paul@nowt.org>
1050         PR fortran/13154
1051         * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
1053 2003-11-24  Paul Brook  <paul@nowt.org>
1055         * expr.c (simplify_const_ref): Return SUCCESS for things we don't
1056         handle.
1057         * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
1059 2003-11-24  Paul Brook  <paul@nowt.org>
1061         PR fortran/13105
1062         * array.c (gfc_array_ref_shape): Handle elemental dimensions.
1063         * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
1065 2003-11-20  Richard Henderson  <rth@redhat.com>
1067         * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
1068         (gfc_conv_array_base): Likewise.
1069         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1070         * trans-expr.c (gfc_conv_string_tmp): Likewise.
1071         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
1072         * trans-stmt.c (gfc_trans_character_select): Likewise.
1074 2003-11-13  Paul Brook  <paul@nowt.org>
1076         * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
1078 2003-11-13  Canqun Yang  <canqun@nudt.edu.cn>
1080         * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
1081         (resolve_equivalence): New function.
1082         (resolve_equivalence_derived): New function.
1084 2003-11-12  Richard Henderson  <rth@redhat.com>
1086         * trans.c (gfc_trans_code): Use annotate_with_locus instead of
1087         annotate_all_with_locus.
1089 2003-11-11  Canqun Yang  <canqun@nudt.edu.cn>
1091         * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
1092         * trans-decl.c (gfc_finish_var_decl): Modified.
1094 2003-11-08  Paul Brook  <paul@nowt.org>
1096         PR fortran/12704
1097         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
1098         arrays.
1100 2003-11-06  Paul Brook  <paul@nowt.org>
1102         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
1104 2003-11-02  Canqun Yang  <canqun@nudt.edu.cn>
1106         * match.c (gfc_match_stopcode): Assign '0' to stop_code.
1108 2003-10-27  Anthony Green  <green@redhat.com>
1110         * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
1111         (f95.stagefeedback): Ditto.
1113 2003-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
1115         PR fortran/12682
1116         * Make-lang.in (f95.stageprofile): Add.
1117         (f95.stagefeedback): Add.
1119 2003-10-23  Richard Henderson  <rth@redhat.com>
1121         * f96-lang.c (gfc_gimplify_expr): Remove.
1122         (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
1123         (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
1125 2003-10-23  Richard Henderson  <rth@redhat.com>
1127         * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
1129 2003-10-20  Paul Brook  <paul@nowt.org>
1131         * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
1132         * trans-stmt.c (gfc_trans_do_while): Ditto.
1134 2003-10-17  Paul Brook  <paul@nowt.org>
1136         * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
1138 2003-10-17  Paul Brook  <paul@nowt.org>
1140         * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
1142 2003-10-17  Feng Wang  <wf_cs@yahoo.com>
1144         * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
1145         (gfc_resolve_minloc): Ditto.
1146         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
1147         Return the value after subtracting the lower bound.
1149 2003-10-16  Richard Henderson  <rth@redhat.com>
1151         * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
1153 2003-10-16  Steven Bosscher  <steven@gcc.gnu.org>
1155         * lang.c: Remove -M option for now, it's in the way for C.
1157 2003-10-14  Jason Merrill  <jason@redhat.com>
1159         * Make-lang.in (f95.tags): New rule.
1161 2003-10-13  Richard Henderson  <rth@redhat.com>
1163         * trans.c (gfc_trans_code): Use annotate_all_with_locus.
1165 2003-10-13  Paul Brook  <paul@nowt.org>
1167         * trans-decl.c (generate_local_decl): Don't create junk variables.
1169 2003-10-13  Paul Brook  <paul@nowt.org>
1171         * resolve.c (resolve_formal_arglist): Use function result decl in
1172         preference to function decl.
1174 2003-10-12  Richard Henderson  <rth@redhat.com>
1176         * f95-lang.c (gfc_define_builtin): New const_p argument.  Set
1177         TREE_READONLY.  Update all callers.
1179 2003-10-12  Feng Wang  <wf_cs@yahoo.com>
1181         * iresolve.c (gfc_resolve_cshift): Change to match implementation.
1182         * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
1183         (gfc_is_intrinsic_libcall): Add CSHIFT.
1185 2003-10-12  Richard Henderson  <rth@redhat.com>
1187         * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
1188         (gfc_trans_array_constructor_value): Likewise.
1189         (gfc_conv_array_initializer): Likewise.
1190         * trans-stmt.c (gfc_trans_character_select): Likewise.
1192 2003-11-12  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1194         * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
1196 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
1198         * check.c (gfc_check_repeat): Check arguments are scalar.
1199         (gfc_check_trim): New function.
1200         * intrinsic.h (gfc_check_trim): Add prototype.
1201         * intrinsic.c (add_functions): Use it.
1202         * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
1203         Decalare.
1204         * trans-decl.c: Ditto.
1205         (gfc_build_intrinsic_fucntion_decls): Set them.
1206         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
1207         (gfc_conv_intrinsic_trim): New function.
1208         (gfc_conv_intrinsic_repeat): New function.
1209         (gfc_conv_intrinsic_function): Use them.
1211 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
1213         * trans-types.c (gfc_sym_type): Handle result variables.
1215 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
1217         * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
1218         gfc_get_character_type.
1220 2003-10-11  Feng Wang  <wf_cs@yahoo.com>
1222         * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
1224 2003-10-11  Paul Brook  <paul@nowt.org>
1226         * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
1227         (gfc_resolve_dprod): New function.
1228         (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
1229         * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
1230         (gfc_resolve_dprod): Declare.
1231         * intrinsic.c (add_functions): Use them.
1232         * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
1234 2003-10-06  Richard Henderson  <rth@redhat.com>
1236         * f95-lang.c (gfc_init_builtin_functions): Add clzll.
1237         * trans-intrinsic.c (call_builtin_clz): Use it.
1239 2003-10-05  Paul Brook  <paul@nowt.org>
1241         * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
1242         * trans-decl.c (gfc_generate_function_code): Set
1243         cfun->function_end_locus.
1245 2003-09-24  Jason Merrill  <jason@redhat.com>
1247         * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
1248         TREE_LOCUS.
1250 2003-09-21  Lifang Zeng  <zlf605@hotmail.com>
1251         Paul Brook  <paul@nowt.org>
1253         * Make-lang.in (F95_OBJS): Add fortran/data.o.
1254         * array.c (gfc_inser_constructor): New function.
1255         (gfc_get_constructor): New function.
1256         (gfc_free_constructor): Initialize offset and repeat.
1257         (iterator_stack): Remove.
1258         (expand_info): Add offset, component and repeat fields.
1259         (expand_constructor): Set them.
1260         (expand): Set new fields.
1261         (gfc_copy_constructor): Ditto. Avoid recursion.
1262         * gfortran.h: Add prototypes for new functions.
1263         (gfc_constructor): Add offset, component and repeat.
1264         (iteratio_stack): Move to here.
1265         * resolve.c (check_data_variable): Convert data values into variable
1266         initializers.
1267         (traverse_data_list): Build implicit loop chain.
1268         (gfc_resolve): Ditto.
1269         * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
1270         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
1271         * trans-expr.c (gfc_conv_structure): Handle array initializers.
1272         (gfc_conv_expr): Update to match.
1273         * trans.h (gfc_conv_structure): Declare.
1274         * data.c: New file.
1276 2003-09-20  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1278         * trans.h: Add declarations for gfor_fndecl_si_kind and
1279         gfor_fndecl_sr_kind.
1280         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1281         * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
1282         (g95_conv_intrinsic_sr_kind): New function.
1283         (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
1284         SELECTED_REAL_KIND.
1286 2003-09-17  Lars Segerlund  <Lars.Segerlund@comsys.se>
1288         * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
1289         instead of _4 and _8 as postfix for libgfortran calls.
1291 2003-09-16  Paul Brook  <paul@nowt.org>
1293         * array.c (compare_bounds): New function.
1294         (gfc_compare_array_spec): Use it.
1296 2003-09-14  Paul Brook  <paul@nowt.org>
1298         * primary.c (gfc_match_rvalue): Make sure sym->result is set.
1299         * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
1301 2003-09-14  Paul Brook  <paul@nowt.org>
1303         * check.c (dim_rank_check): Allow assumed bounds if requested.
1304         (gfc_check_lbound): Call it.
1305         (gfc_check_ubound): Ditto.
1306         (gfc_check_size): Change to match.
1307         * simplify.c (gfc_simplify_bound): New function.
1308         (gfc_simplify_lbound): New function.
1309         (gfc_simplify_ubound): New function.
1310         * intrinsic.h: Declare them.
1311         * intrinsic.c (add_functions): Use them.
1313 2003-09-14  Paul Brook  <paul@nowt.org>
1315         * io.c (format_lex): Initialize negative_flag.
1316         (check_format): Intialize repeat.
1317         * trans-io.c (gfc_new_nml_name_expr): Declare static.
1318         (gfc_new_var_expr): Ditto.
1320 2003-09-14  Paul Brook  <paul@nowt.org>
1322         * trans-array.c (gfc_conv_array_initializer): Handle derived types.
1323         * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
1325 2003-09-12  Paul Brook  <paul@nowt.org>
1327         * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
1329 2003-09-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
1331         * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
1332         for a correct expression.
1334 2003-09-10  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1336         * trans-intrinsic.c (real_compnt_info): New struct.
1337         (prepare_arg_info): New function.
1338         (gfc_conv_intrinsic_set_exponent): New function.
1339         (gfc_conv_intrinsic_scale): New function.
1340         (gfc_conv_intrinsic_nearest): New function.
1341         (gfc_conv_intrinsic_fraction): New function.
1342         (gfc_conv_intrinsic_exponent): New function.
1343         (gfc_conv_intrinsic_spacing): New function.
1344         (gfc_conv_intrinsic_rrspacing): New function.
1345         (gfc_conv_intrinsic_function): Use them.
1347 2003-08-24 XiaoQiang Zhang  (zhangapache@yahoo.com>
1349         * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for 
1350         build_int_2 changed from (high, low) to (low, high).
1351         * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
1352         ioparm_namelist_read_mode, iocall_set_nml_val_int,
1353         iocall_set_nml_val_float, iocall_set_nml_val_char,
1354         iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
1355         (gfc_build_io_library_fndecls): Add variable initialization.
1356         (gfc_new_nml_name_expr, get_new_var_expr): New function.
1357         (build_dt): Add namelist support.
1358         * io.c (value): New variable.
1359         (check_format): Support FMT_H now.
1361 2003-09-07  Paul Brook  <paul@nowt.org>
1363         * io.c (gfc_resolve_dt): Error if format label is not defined.
1365 2003-09-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1367         * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is 
1368         about case_switch's break. The other is about building the condition 
1369         statement tree, which judges the argument in the range of the 
1370         corresponding integer type.
1371         * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
1372         for the large values.
1374 2003-09-05  Paul Brook  <paul@nowt.org>
1376         * f95-lang.c (expand_function_body): Gimplify the function.
1378 2003-09-04  Jeff Law  <law@redhat.com>
1380         * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
1381         index zero!
1383 2003-09-04  Paul Brook  <paul@nowt.org>
1385         * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
1386         (gfc_expand_stmt): New function.
1387         (LANG_HOOKS_RTL_EXPAND_STMT): Define.
1388         (expand_function_body): Use tree_rest_of_compilation.
1389         * trans-decl.c (gfc_generate_function_code): Don't free cfun.
1391 2003-09-03  Jeff Law  <law@redhat.com>
1393         * f95-lang.c (gfc_init_builtin_functions): C arrays start at
1394         index zero!
1396 2003-08-30  Paul Brook  <paul@nowt.org>
1398         * f95-lang.c (builtin_function): Remove #if 0 code.
1399         (gfc_define_builtin): New function.
1400         (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
1401         * mathbuiltins.def: New file.
1402         * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
1403         (gfc_intrinsic_map): Use mathbuiltins.def.
1404         (gfc_intrinsic_builtin_t): Remove.
1405         (gfc_build_intrinsic_lib_fndecls): Update.
1406         * trans-types.c (gfc_init_types): Remove redundant initilaization of
1407         signed_size_type_node.
1409 2003-08-29  Paul Brook  <paul@nowt.org>
1411         * arith.c (gfc_real_kinds): Use correct minimum exponents.
1413 2003-08-22  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1415         * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
1416         (gfc_conv_intrinsic_function): Add MODULO.
1418 2003-08-22  Jason Merrill  <jason@redhat.com>
1420         * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
1422 2003-08-22  Andreas Jaeger  <aj@suse.de>
1424         * Make-lang.in (f95.install-common): Add DESTDIR support.
1425         * (f95.install-info): Likewise.
1426         (f95.uninstall): Likewise.
1428 2003-08-19  Diego Novillo  <dnovillo@redhat.com>
1430         * trans-types.c (gfc_init_types): Initialize
1431         signed_size_type_node with size_type_node.
1433 2003-08-18  Paul Brook  <paul@nowt.org>
1435         * dependency.c (gfc_dependency): New enum.
1436         (check_another_array_ref): Remove.
1437         (gfc_get_array_from_component): Remove.
1438         (get_x): Remove.
1439         (get_range): Remove.
1440         (get_no_of_elements): Use mpz_t, not mpf_t.
1441         (transform_sections): New function.
1442         (gfc_check_range_range): Rename ...
1443         (gfc_check_section_vs_section): ... to this.  Use new function.
1444         (gfc_is_inside_range): Rewrite to match.
1445         (gfc_check_element_vs_section): Ditto.
1446         (gfc_check_element_vs_element): Ditto.
1447         (get_deps): Ditto.
1448         (gfc_dep_resolver): Ditto.  Remove unused parameter.
1449         * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
1450         gfc_check_element_vs_element, gfc_is_inside_range,
1451         gfc_get_array_from_component): Remove prototypes for static functions.
1452         (gfc_dep_resolver): Update prototype.
1453         * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
1455 2003-08-15  Paul Brook  <paul@nowt.org>
1457         * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
1458         return values to parent scope.
1459         (gfc_build_dummy_array_decl): Ditto.
1461 2003-08-14  Paul Brook  <paul@nowt.org>
1463         * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
1464         size of the type, not the pointer.
1465         * resolve.c (resolve_symbol): Give more accurate error message.
1467 2003-08-10  Paul Brook  <paul@nowt.org>
1469         * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
1471 2003-08-10  Paul Brook  <paul@nowt.org>
1473         * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
1474         type components.
1476 2003-08-10  Chun Huang  <compiler@sohu.com>
1478         * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
1479         (resolve_symbol): Ditto.
1480         * trans-expr.c (gfc_conv_statement_function): New function.
1481         (gfc_conv_function_expr): Use it.
1483 2003-08-10  Paul Brook  <paul@nowt.org>
1485         * trans-array.c (gfc_conv_ss_startstride): Handle functions.
1486         (walk_function_expr): Set section rank.
1487         * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
1489 2003-08-10  Paul Brook  <paul@nowt.org>
1491         * intrinsic.c (add_sym): Prefix names with correct string.
1492         (add_sym_0s): New function.
1493         (add_subroutines): Register abort.
1495 2003-08-10  Erik Schnetter  <schnetter@uni-tuebingen.de>
1497         * gfortran.h: Introduce options to control the mangling.
1498         * lang.opt: Likewise.
1499         * options.c (gfc_init_options): Handle the options.
1500         * trans-common.c (gfc_sym_mangled_common_id): New function.
1501         (gfc_build_common_decl): Call it.
1502         * trans-decl.c (gfc_sym_mangled_function_id): New function.
1503         (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
1505 2003-08-09  Paul Brook  <paul@nowt.org>
1507         * module.c (mio_symbol): Always ouput a namespace for formal args.
1508         (load_needed): Namespace now belong to their proper symbol.
1509         (gfc_dump_module): Change G95=>GFORTRAN.
1511 2003-08-05  Paul Brook  <paul@nowt.org>
1513         * options.c: Force -fg77-calls.
1515 2003-08-02  Paul Brook  <paul@nowt.org>
1517         * Makelang.in: Rename G95_* to GFORTRAN_*.
1518         * All sources: Rename G95_* to GFC_*.
1520 2003-08-01  Paul Brook  <paul@nowt.org>
1522         * fortran/Make-lang.in: Use GMPLIBS.
1523         * fortran/config-lang.in: Set need_gmp.
1524         * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
1526 2003-07-27  Andreas Jaeger  <aj@suse.de>
1528         * trans-decl.c (gfc_generate_constructors): Convert prototype to
1529         ISO C90.
1530         * trans-const.c (gfc_init_constants): Likewise.
1531         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
1533         * gfortranspec.c: Convert to ISO C90.
1534         (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
1536 2003-07-26  Paul Brook  <paul@nowt.org>
1538         * lang.opt: Add -fdump-parse-tree.
1539         * options.c (gfc_handle_option): Ditto.
1540         * resolve.c (resolve_forall_iterators): Convert to proper type.
1541         * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
1543 2003-07-26  Paul Brook  <paul@nowt.org>
1545         * Makefile.in: Add build dependencies on files common with rest of gcc.
1547 2003-07-26  Lifang Zeng  <zlf605@hotmail.com>
1549         * trans.h: Declare g95_trans_pointer_assignment.
1550         * trans-expr.c (g95_trans_pointer_assignment): New function.
1551         (g95_trans_pointer_assign): Use it.
1552         * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
1553         (g95_trans_pointer_assign_need_temp): New function.
1555 2003-07-26  Paul Brook  <paul@nowt.org>
1557         * gfortran.texi: Replace references to g95.
1559 2003-07-26  Paul Brook  <paul@nowt.org>
1561         Rename g95_* to gfc_*.
1563 2003-07-25  Paul Brook  <paul@nowt.org>
1564         
1565         * gfortran.h: Rename from g95.h.
1566         * trans-types.c (boolean_type_node, booelan_true_node,
1567         boolean_false_node): Remove.
1568         * trans-types.h: Ditto.
1570 2003-07-25  Chun Huang  <compiler@sohu.com>
1572         * parse.c (accept_statement): Implement BLOCK DATA statement.
1573         * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
1574         variables.
1576 2003-07-24  Lifang Zeng  <zlf605@hotmail.com>
1578         * trans-stmt.c (temporary_list): Define.
1579         (g95_trans_assign_need_temp): New function.
1580         (g95_trans_forall_1): Modified for WHERE.
1581         (g95_trans_where_assign): Modified.
1582         (g95_trans_where_2): Modified.
1583         (g95_evaluate_where_mask): Modified.
1584         (g95_trans_where): Modified.
1585         (g95_get_temp_expr): Removed.
1586         (g95_add_to_where_stmt_list): Removed.
1587         (compute_overall_iter_number): Modified for WHERE.
1588         * trans.h: Remove where_stmt_list.
1590 2003-07-24  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1592         * lang.opt: Correct description of options -J and -M.
1594 2003-07-23  Steven Bosscher   <steven@gcc.gnu.org>
1596         * lang.opt: Move help text to here.
1597         * lang-options.h: Remove.
1599 2003-07-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1600         * iresolve.c (g95_resolve_transpose): Proper variable in switch.
1601         * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
1602         on kind.
1604 2003-07-22  Steven Bosscher  <steven@gcc.gnu.org>
1605         Paul Brook  <paul@nowt.org>
1607         * check.c (check_rest): Use global pedantic flag.
1608         * io.c (data_desc): Ditto.
1609         * error.c (g95_warning, g95_warning_now): Use global flag.
1610         * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
1611         (expand_function_body): Update to new prototypes.
1612         (g95_init): Use new option names.
1613         * g95.h (g95_option_t): Standardize names.
1614         (g95_init_options, g95_handle_option): Update prototypes.
1615         * interface.c: Use new option names.
1616         * match.c: Ditto.
1617         * module.c: Ditto.
1618         * parse.c: Ditto.
1619         * primary.c: Ditto.
1620         * resolve.c: Ditto.
1621         * scanner.c: Ditto.
1622         * simplify.c: Ditto.
1623         * symbol.c: Ditto.
1624         * trans-array.c: Ditto.
1625         * trans-expr.c: Ditto.
1626         * trans-types.c: Ditto.
1627         * trans-decl.c: Ditto.
1628         (g95_build_library_function_decl): Remove obsolete VPARAMS.
1629         * trans.h: Ditto.
1630         * options.c (g95_display_help): Remove.
1631         (g95_init_options): Convert to new scheme.
1632         (set_Wall): Ditto
1633         (g95module_option): Ditto, rename from g95_parse_arg.
1634         (g95_handle_module_path_options): New function.
1635         * trans-equivalence.c: Fix error message.
1636         * lang.opt: Corrections.
1638 2003-07-21  Steven Bosscher  <steven@gcc.gnu.org>
1640         * lang.opt: New file.
1642 2003-07-21  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1644         * decl.c (match_attr_spec): Set colon_seen.
1646 2003-07-14  Paul Brook  <paul@nowt.org>
1648         * trans-array.c: Update comment.
1649         (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
1650         * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
1651         minmaxloc,minmaxval): Ditto.
1652         * trans-io.c (g95_trans_transfer): Ditto.
1653         * trans-stmt.c: Remove unneeded prototypes.
1654         (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
1655         (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
1656         (compute_inner_temp_size): Remove bits of dead code. Add comments.
1657         Don't share loopinfo.
1658         (compute_overall_iter_number): Declare as static.
1659         (allocate_temp_for_forall_nest): Ditto.
1660         (g95_trans_forall_1): Don't pass shared loopinfo.
1661         * trans.c (g95_start_block): Expand comment.
1663 2003-07-12  Paul Brook  <paul@nowt.org>
1665         * arith.c (g95_index_integer_kind): Remove unused initializer.
1666         * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
1667         index by size of element.
1668         (generate_loop_for_rhs_to_temp): Ditto.
1669         (allocate_temp_for_forall_nest): Use element size, not index size.
1671 2003-07-11  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1673         * arith.c (g95_index_integer_kind): Add a TODO.
1674         * simplify.c (g95_simplify_nearest): Add a TODO.
1676 2003-07-09  Chun Huang  <compiler@sohu.com>
1678         * trans.h: Add declarations for gfor_fndecl_string_scan and
1679         gfor_fndecl_string_verify.
1680         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1681         * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
1682         (g95_conv_intrinsic_verify): New function.
1683         (g95_conv_intrinsic_function): Add SCAN and VERIFY.
1684         * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
1685         of parameter 'BACK=.TRUE.'
1687 2003-07-05  Lifang Zeng  <zlf605@hotmail.com>
1689         * trans-stmt.c (iter_info, forall_info): Define.
1690         (g95_trans_forall_block): Remove.
1691         (g95_trans_forall_loop): Use forall info blocks.
1692         (g95_trans_nested_forall_loop): New function.
1693         (g95_do_allocate): Handle things other than logical masks.
1694         (generate_loop_for_temp_to_lhs): New function.
1695         (generate_loop_for_rsh_to_temp): New function.
1696         (compute_inner_temp_size): New function.
1697         (compute_overall_iter_number): New function.
1698         (allocate_temp_for_forall_nest): New function.
1699         (g95_trans_forall): Move body ...
1700         (g95_trans_forall_1): ... to here.  Handle loops with temporaries.
1702 2003-07-02  Paul Brook  <paul@nowt.org>
1704         * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
1705         in correct scope.  Change callers to match.
1706         * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
1707         * iresolve.c (g95_resolve_reshape): Only use constant shapes.
1709 2003-07-02  Paul Brook  <paul@nowt.org>
1711         * trans-array.c (g95_conv_loop_setup): Remove dead var.  Use
1712         expression shape for all expressions.
1713         * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
1715 2003-07-03  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1717         * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
1718         g95_parse_arg), intrinsic.c (g95_convert_type): support of
1719         -Wconversion.
1720         * intrinsic.c, g95.h: Add g95_convert_type_warn,
1721         * resolve.c (g95_resolve_index): Call it.
1723 2003-07-02  Paul Brook  <paul@nowt.org>
1725         * iresolve.c (g95_resolve_reshape): Set expression shape.
1726         (g95_resolve_shape): Ditto.
1727         * simplify.c (g95_simplify_shape): Move common code outside condition.
1728         * trans-array.c (g95_conv_array_initializer): Teach it how to count.
1730 2003-07-01  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1732         * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
1733         conformance checks.
1735 2003-06-29  Paul Brook  <paul@nowt.org>
1737         * array.c (g95_simplify_iterator_var): Don't bother with return value.
1738         * expr.c (find_array_element, find_component_ref): New functions.
1739         (remove_subobject_ref): New function.
1740         (simplify_const_ref): Use them.  Rename from simplify_component_ref.
1741         (simplify_ref_chain): New function.
1742         (g95_simplify_expr): Use it.  Simplify parameter variable subobjects.
1743         (g95_specification_expr): Simplify the expression.
1744         * resolve.c (resolve_operator): Check simplifications return code.
1745         (g95_resolve_expr): Ditto.
1747 2003-06-26  Paul Brook  <paul@nowt.org>
1749         * expr.c (simplify_component_ref): New function.
1750         (g95_simplify_expr): Use it.
1751         * resolve.c (resolve_structure_cons): Handle references.
1753 2003-06-25  Paul Brook  <paul@nowt.org>
1755         * trans-io.c (build_dt): Handle internal units.
1757 2003-06-25  Canqun Yang  <canqun@yahoo.com.cn>
1759         * trans-common.c (g95_build_common_decl): Array index range starts at 0.
1760         (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
1761         Use g95_array_index_type instead of integer_type_node.
1762         (g95_build_common_decl, g95_set_common_master_type): Use
1763         g95_character1_type_node instead of char_type_node.
1764         * trans-equivalence.c (g95_layout_local_equiv): As above.
1766 2003-06-24  Steven G. Kargl  <kargls@attbi.com>
1768         * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
1769         remove last remains of -fquiet.
1771 2003-06-22  Paul Brook  <paul@nowt.org>
1773         * resolve.c (resolve_operator): Don't fail if we can't simplify.
1774         (g95_resolve_expr): Ditto.
1775         (resolce_code): Mark as static.
1776         * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
1777         gimplifer doesn't (yet).
1779 2003-06-20  Paul Brook  <paul@nowt.org>
1781         * g95.h: Add ST_PAUSE and EXEC_PAUSE.
1782         * match.c (g95_match_if): Add ST_PAUSE.
1783         (g95_match_stopcode): New function.
1784         (g95_match_pause, g95_match_stop): Use it.
1785         * parse.c (g95_ascii_statement): Handle ST_PAUSE.
1786         (decode_stmt, next_statement, parse_executable): Ditto.
1787         * resolve.c (resolve_code): Ditto.
1788         * st.c (g95_free_statement): Ditto.
1789         * trans-stmt.c (g95_trans_pause): New function.
1790         * trans-stmt.h: Declare it.
1791         * trans.c (g95_trans_code): Use it.
1792         * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
1793         Declare.
1794         (g95_build_builtin_function_decls): Initialize them.
1795         * trans.h: Ditto.
1796         * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
1798 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1800         * io.c (g95_match_open , g95_match_close, g95_match_inquire,
1801         match_filepos): Fix error handling.
1803 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1805         * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
1806         Add assertions on arguments.
1807         * resolve.c (expression_shape): Remove useless &.
1808         * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
1809         g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
1810         g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
1811         g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
1812         g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
1813         g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
1814         (g95_simplify_not, g95_simplify_scale): Add assertions.
1816 2003-06-15  Paul Brook  <paul@nowt.org>
1818         Clean up stuff to work with the ssa optimizers.
1819         * convert.c (convert): Handle BOOLEAN_TYPEs.
1820         * f95-lang.c (g95_truthvalue_conversion): Implement.
1821         * trans-array.c (g95_trans_array_constructor_value): Group multiple
1822         scalar values.
1823         * trans.h (g95_truthvalue_conversion): Declare.
1824         * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
1825         * trans-stmt.c (g95_trans_character_select): Don't create array
1826         assignments.  Mark labels as indirect jump targets.
1827         * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
1828         (g95_get_dtype_cst): Handle LOGICAL types.
1830 2003-06-14  Paul Brook  <paul@nowt.org>
1832         * f95-lang.c (g95_gimplify_expr): New function.
1833         * trans-array.c (g95_trans_array_constructor_value): Don't create
1834         array assignments.
1835         (g95_conv_expr_descriptor): Rename simple->gimple.
1836         * trans-expr.c (conv_expr_op): Use proper logical operators.
1837         * trans-intrinsic.c (build_fixbound_expr): New function.
1838         (build_fix_expr): Ditto.
1839         (g95_conv_intinsic_aint): Use them. Use builtin functions.
1840         (g95_conv_intrinsic_function): Add FLOOR and CEILING.
1842 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1844         * array.c (g95_compare_array_spec): Remove unreachable code.
1845         * expr.c (g95_copy_expr): Likewise.
1846         * intrinsic.c (g95_convert_type): Likewise.
1847         * misc.c (g95_code2string): Likewise.
1848         * simplify.c (g95_simplify_ishft, g95_simplify_real,
1849         g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
1850         * trans-stmt.c (g95_trans_select): Likewise.
1851         * primary.c (extend_ref): Add an assertion.
1852         * simplify.c (g95_convert_constant): Add const.
1853         * intrinsic.h: Remove g95_check_x_ni.
1854         * f95-lang.c (g95_finish): Call g95_release_include_path.
1856 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1858         * resolve.c (resolve_contained_functions): Fix typo introduced on
1859         2003-01-13.
1861 2003-06-09  Paul Brook  <paul@nowt.org>
1863         * g95.h: Include system.h not hwint.h.
1864         * many: use safe-ctype.h not ctype.h.  Change isalpha -> ISALPHA, etc.
1865         * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
1867 2003-06-09  Paul Brook  <paul@nowt.org>
1869         * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
1870         * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
1871         * trans-decl.c (g95_add_decl_to_functions): Make non-static.
1872         (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
1873         (g95_generate_function_code): Translate COMMON and EQUIVALENCE
1874         objects.
1875         * trans.h (g95_trans_equivalence, g95_trans_common,
1876         g95_add_decl_to_function): Declare.
1877         * trans-common.c, trans-equivalence.c: New files.
1879 2003-06-08  Steven Bosscher  <steven@gcc.gnu.org>
1881         * intrinsic.c (g95_intrinsic_extension): Remove.
1882         (add_functions): Substitute g95_check_x for g95_check_x_ni
1883         everywhere.
1884         (g95_init_expr_extensions): New function.
1885         (g95_intrinsic_func_interface): Use it.
1886         * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
1887         * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
1888         g95_check_precision, g95_check_present, g95_check_radix,
1889         g95_check_range, g95_check_selected_real_kind): Do not set
1890         g95_intrinsic_extension.
1891         (g95_check_x_ni): Remove now duplicate of g95_check_x.
1893         * expr.c (check_inquiry): Add FIXME, fixup some code style.
1895 2003-06-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1897         * g95.h (ref_type): Name this type explicitly.
1898         * module.c (MIO_NAME): Add specialisations of mio_name.
1899         (mio_symbol_attribute, mio_typespec, mio_array_ref,
1900         mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
1901         (ab_attribute): Name this type explicitly.
1902         (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
1904 2003-06-05  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1906         * trans-intrinsic.c (g95_conv_allocated): New function.
1907         (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
1909 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
1911         * f95-lang.c: Don't include g95-support.h
1912         (g95_mark_addressable): Add prototype.
1913         (g95_init_decl_processing): Remove C front end hack.
1914         * f95-tree.c: Remove file.
1915         * support.c: Remove file.
1916         * g95-support.h: Remove file.
1917         * trans-types.c (g95_init_types): Set up boolean
1918         type related tree nodes.
1919         * Make-lang.in: Remove rules for dead files and
1920         dependencies on them.
1922 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
1924         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
1925         C front end dependency.  Also, convert.c does not depend on
1926         g95-support.h anymore.
1927         * convert.c: Don't include c-common.h and g95-support.h
1928         * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
1929         (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
1930         stmts_are_full_exprs_p, current_stmt_tree,
1931         current_scope_stmt_stack): Remove.
1932         * g95-support.h (unsigned_conversion_warning): Kill proto.
1933         (boolean_type_node, boolean_true_node, boolean_false_node):
1934         Don't define here.  Instead, make then true tree nodes in
1935         trans-types.
1936         * support.c (c_global_trees): Die, C front end, die!!!
1937         (g95_init_c_decl_hacks): Don't touch intmax_type_node,
1938         uintmax_type_node, string_type_node and const_string_type_node.
1939         (decl_constant_value, overflow_warning): Make static functions.
1940         They are in death row too, though.
1941         (default_conversion, c_expand_asm_operands): Remove.
1942         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
1943         trans.c: Don't include c-common.h.
1944         * trans-types.c (boolean_type_node, boolean_true_node,
1945         boolean_false_node): Make them real tree nodes.
1946         * trans-types.h (intmax_type_node, string_type_node,
1947         const_string_type_node): Hack to work around C dependencies
1948         in builtin-types.def.
1950 2003-06-04  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1952         * decl.c (decl_types): Add some iterators-like sentinels.
1953         * decl.c (match_attr_spec): Use them.
1954         Use "decl_types" instead of "int".
1955         Add cast in call to g95_match_strings.
1956         * dump-parse-tree.c (g95_show_namespace):  Use "g95_intrinsic_op"
1957         instead of "int".
1958         * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
1959         (g95_interface_info): Use "g95_intrinsic_op".
1960         * dump-parse-tree.c (g95_show_namespace): Use them.
1961         * interface.c (g95_check_interfaces): Use them.
1962         * module.c (read_module, write_module): Use them.
1963         * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
1964         Use "g95_intrinsic_op".
1965         * interface.c (check_operator_interface): Use "g95_intrinsic_op".
1966         Add a default case in switch statement.
1967         * intrinsic.h (g95_generic_isym_id): Moved to...
1968         * g95.h (g95_generic_isym_id): here.
1969         (g95_intrinsic_sym): Use "g95_generic_isym_id".
1970         * intrinsic.c (make_generic): Use "g95_generice_isym_id".
1971         * trans-intrinsic.c (g95_intrinsic_map_t,
1972          g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
1973         * match.c (g95_match_intrinsic_op): Add cast in call to
1974         g95_match_strings.
1976 2003-06-03  Steven Bosscher  <steven@gcc.gnu.org>
1978         * support.c (skip_evaluation, warn_conversion, lvalue_p,
1979         lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
1980         constant_fits_type_p, convert_and_check,
1981         unsigned_conversion_warning): Remove these ugly remnants
1982         we inherited from the C front end.
1983         (function_types_compatible): Remove '#if 0'-edcode.
1984         (build_modify_expr): Likewise.
1985         (convert_for_assignment): Don't use the deceased functions.
1986         The parameter fundecl is now unused.
1987         (decl_constant_value): Always just return decl.  In fact
1988         this function is not used at present, but it might be in
1989         the future, when we start using the tree inliner.
1990         (overflow_warning, default_conversion, c_expand_asm_operands):
1991         Abort when these are called, they are part of the C type
1992         checking implementation and therefore poison to Fortran.
1994 2003-06-04  Steven Bosscher  <steven@gcc.gnu.org>
1996         * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
1997         c-pretty-print.o and c-dump.o.  Add a comment on why we
1998         depend on c-semantics.c.
1999         * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
2000         Don't use the C front end tree dumper hook to dump the
2001         language specific tree representation -- we don't have
2002         one.  So instead, inherit the default langhook.
2004 2003-06-02  Paul Brook  <paul@nowt.org>
2006         * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
2008 2003-06-02  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2010         * check.c (g95_check_associated): Use proper types.  Remove
2011         extraneous argument in call to g95_error().
2013 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2015         * resolve.c (resolve_operator): Make logical operands convert to the
2016         type with higher kind.
2018 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2020         * check.c (g95_check_associated): Make sure both pointer and target has
2021         the same type and rank. Null pointer or array section with vector
2022         subscript as target are not allowed.
2023         * trans.h: Declare gfor_fndecl_associated.
2024         * trans-decl.c: (g95_build_builtin_function_decls): Initialize
2025         gfor_fndecl_associated.
2026         * trans-intrinsic.c (g95_conv_associated): New function.
2027         (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
2029 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2031         * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
2032         according to POINTER itself rather than TARGET.
2033         (g95_conv_expr_descriptor): Make lbound start at 1.
2034         * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
2036 2003-06-01  Paul Brook  <paul@nowt.org>
2038         * expr.c (g95_type_convert_binary): Make it match the standard.
2039         * g95.texi: Remove dead link.
2041 2003-06-01  Steven Bosscher  <steven@gcc.gnu.org>
2043         * g95.texi: Cleanup somewhat in preparation for inclusion
2044         in GCC CVS.
2046 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2047             Canqun Yang  <canqun@yahoo.com.cn>
2049         * resolve.c (compare_bound_int, resolve_where_shape): Proper return
2050         type.
2051         (g95_find_forall_index): Return proper value.
2052         (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
2053         compare the return value from g95_find_forall_index.
2055 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2056         * g95.h, io.c (g95_st_label): Remove "length".
2057         (g95_symtree): Remove "link".
2058         (g95_case): Remove "code".
2059         * arith.c, arith.h (g95_compare_string, g95_convert_integer,
2060         g95_convert_real): Make an argument pointer to const.
2061         * decl.c (colon_seen): Add a TODO.
2062         * interface.c (g95_compare_types): Fix typo.
2063         * interface.c (compare_interfaces): Preserve value of "p".
2064         * intrinsic.c (sort_actual): Remove "i".
2065         * match.c (g95_match_assign): Proper type in call to g95_match().
2066         * parse.c (next_free): Avoid duplicate call due to macro.
2067         * parse.c (check_statement_label): wrong type in call to g95_error.
2068         * primary.c (match_real_constant): Add a TODO.
2069         * resolve.c (resolve_select):  Remove useless conditional.
2070         * simplify.c (g95_simplify_repeat): Proper assignment to
2071         "value.character.string".
2072         * simplify.c (g95_simplify_reshape): Wrong variable in call to
2073         g95_error.
2075 2003-05-20  Canqun Yang  <canqun@yahoo.com.cn>
2077         * trans-stmt.c: Remove unnecessary include file defaults.h.
2079 2003-05-19  Lifang Zeng  <zlf605@hotmail.com>
2081         * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
2082         stride.
2083         (g95_trans_forall): Allow arbitrary number of FORALL indexes and
2084         actual variables used as FORALL indexes.
2086 2003-05-15  Paul Brook  <paul@nowt.org>
2088         * trans-array.c (g95_trans_static_array_pointer): Use
2089         null_pointer_node.
2090         (g95_trans_deferred_array): Initialize static array pointers.
2091         * trans-expr.c (g95_conv_function_call): Use formal arglist to
2092         correctly pass POINTER and absent CHARACTER arguments.
2094 2003-05-14  Lifang Zeng  <zlf605@hotmail.com>
2096         * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
2097         (g95_resolve_forall_body): Resolve FORALL body.
2098         (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
2099         (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
2100         (g95_find_forall_index): Check whether the FORALL index appears in
2101         the expression or not.
2102         (resolve_code): Modified.
2104 2003-05-14  Paul Brook  <paul@nowt.org>
2106         * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
2108 2003-05-13  Paul Brook  <paul@nowt.org>
2110         * trans-types.c (g95_max_array_element_size): Now a tree node.
2111         (g95_init_types): Work out max size properly.
2112         (g95_get_dtype_cst): Modify to match.
2114 2003-05-11  Paul Brook  <paul@nowt.org>
2116         * trans-io.c (add_case): Create a label decl for case labels.
2118 2003-05-11  Paul Brook  <paul@nowt.org>
2120         * arith.c (g95_integer_index_kind): New variable.
2121         * f95-lang.c (g95_init): Move frontend initialization here ...
2122         (g95_post_options): ... from here.
2123         * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
2124         * intrinsic.c (add_functions): Use index kinds.
2125         * iresolve.c: Convert to index_kind where needed.
2126         * resolve.c (g95_resolve_index): Make public, use index_kind.
2127         (resolve_array_ref): Adjust to match.
2128         * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
2129         * trans-stmt.c: Ditto.
2130         * trans-types.c: Ditto.
2131         * trans-types.h (g95_array_index_kind): Remove declaration.
2132         * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
2134 2003-05-07  Paul Brook  <paul@nowt.org>
2136         * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
2137         * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
2138         of bound indices.
2140 2003-05-07  Paul Brook  <paul@nowt.org>
2142         * trans-array.c (trans_static_array_pointer,
2143         g95_trans_array_constructor_value, g95_conv_array_initializer,
2144         g95_conv_structure): CONSTRUCTOR nodes only have one operand.
2145         (g95_add_loop_ss_code): Convert subscripts to the correct type.
2146         * trans-stmt.c (g95_trans_character_select): Ditto.
2147         * trans-types.c (g95_init_types): Ditto.
2149 2003-05-07  Steven Bosscher  <steven@gcc.gnu.org>
2151         * f95-lang.c (expand_function_body): Use input_line, not lineno.
2152         * trans-decl.c (g95_generate_function_code,
2153         g95_generate_constructors): Likewise.
2154         * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
2155         g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
2156         Likewise.
2158 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2159         * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
2160         with components point to the DERIVED type itself, and two DERIVED
2161         type with components point to each other.
2162         * trans-expr.c (g95_conv_componet_ref): Modified
2164 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2165         * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
2166         null_pointer_node.
2167         (g95_trans_pointer_assign): Implement Nullify.
2169 2003-05-01  Paul Brook  <paul@nowt.org>
2171         * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
2172         * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
2174 2003-05-01  Paul Brook  <paul@nowr.org>
2176         * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
2177         trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
2178         IS_EMPTY_STMT.
2180 2003-05-01  Canqun Yang  <canqun@yahoo.com.cn>
2182         * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
2183         CASE_LABEL_EXPR.
2185 2003-04-28  Paul Brook  <paul@nowt.org>
2187         * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
2188         as their kind suggests.
2189         (g95_resolve_reshape): Ditto.
2191 2003-04-28  Chun Huang  <compiler@sohu.com>
2193         * trans-expr.c (g95_conv_substring_expr): New function.
2194         (g95_conv_expr): Use it.
2196 2003-04-28  Paul Brook  <paul@nowt.org>
2198         * iresolve.c (g95_resolve_transpose): Make it match the
2199         implementation.
2200         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
2202 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
2204         * trans-types.c (g95_add_field_to_struct): New function to
2205         add a field to a UNION_TYPE or RECORD_TYPE.
2206         * trans-types.h (g95_add_field_to_struct): Prototype.
2207         (g95_get_derived_type): Use g95_add_field_to_struct to add
2208         components.
2209         * trans-io.c (g95_add_field): Remove.
2210         (ADD_FIELD): Use new g95_add_field_to_struct function.
2211         (ADD_STRING): Likewise.
2212         * trans-stmt.c (g95_trans_select): Likewise.
2213         (g95_add_field): Remove duplicated function.
2215 2003-04-18  Canqun Yang  <canqun@yahoo.com.cn>
2217         Port implementation for CHARACTER SELECT from Andy's tree.
2218         * trans-stmt.c (g95_trans_character_select): Implement character
2219         select. (g95_add_field): New function.
2220         * trans-decl.c: Declare 'gfor_gndecl_select_string'.
2221         (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
2222         * g95.h (struct g95_case): Add field 'int n'.
2223         * trans.h: Declare 'gfor_fndecl_select_string'.
2225 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
2227         * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
2228         (g95_insert_bbd): Die on duplicates.
2229         * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
2231 2003-04-14  Steven Bosscher  <steven@gcc.gnu.org>
2233         * g95.texi: Require GMP 4.0 -- like we actually
2234         do.  Explain the testsuite and what-goes-where.
2235         Don't use undefined texinfo symbol.  Break very
2236         long line.  Remove finished item from the list
2237         of open projects.
2239 2003-04-11  Canqun Yang  <canqun@yahoo.com.cn>
2241         * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
2242         LOGICAL type.
2244 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
2246         * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
2247         (g95_trans_forall_body): New function.
2249 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
2251         * resolve.c (resove_where): New function.
2252         (resolve_where_shape): New function.
2253         (resolve_code): Add call to 'resolve_where'
2254         * trans-stmt.c (g95_trans_where): Modified.
2255         (g95_trans_where_2): New function.
2256         (g95_trans_where_assign): New function.
2257         (g95_evaluate_where_mask): New function.
2258         (g95_add_to_stmt_list): New function.
2259         (g95_get_temp_expr): New function.
2260         * trans.h (where_stmt_list): New structure.
2262 2003-04-10  Paul Brook  <paul@nowt.org>
2264         * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
2265         (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
2267 2003-04-10  Steven Bosscher  <steven@gcc.gnu.org>
2269         Update after mainline -> tree-ssa-branch merge.
2270         * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
2271         call.
2272         (g95_init): Update for new lang_hooks definition.
2273         (g95_post_options): New langhook.
2274         (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
2275         * scanner.c (g95_new_file): Comment update.
2277 2003-04-09  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2279         * g95.h, lang-options.h: Add -Wimplicit-interface.
2280         * options.c (g95_init_options, g95_parse_arg): Set it.
2281         * interface.c (check_intents): Warn about call with implicit
2282         interface.
2283         * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
2284         g95_procedure_use.
2286 2003-04-05  Paul Brook  <paul@nowt.org>
2288         * iresolve.c (g95_resolve_spread): Don't resole based on type.
2289         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
2291 2003-03-29  Paul Brook  <paul@nowt.org>
2293         * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
2294         (g95_resolve_unpack): Ditto.
2295         * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
2296         (g95_conv_intrinsic_function): Use it.  Remove PACK and UNPACK.
2297         (g95_is_intrinsic_libcall): Add PACK and UNPACK.
2299 2003-03-25  Paul Brook  <paul@nowt.org>
2301         * arith.c (g95_unary_user, g95_user): Remove dead functions.
2302         * arith.h: Ditto.
2303         * array.c (g95_free_array_ref): Ditto.
2304         * g95.h: Ditto.
2305         * symbol.c (g95_use_derived_tree): Ditto.
2306         * intrinsic.c (add_functions): Use simplification for SCALE.
2307         * primary.c (g95_match_rvalue): Test sym, not symtree.
2309 2003-03-25  Paul Brook  <paul@nowt.org>
2311         * trans-decl.c (build_function_decl): Add parameter before it gets
2312         turned into a constant.
2313         * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
2314         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
2315         * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
2317 2003-03-22  Paul Brook  <paul@nowt.org>
2319         * trans-array.c (g95_conv_array_initializer): Allow scalar
2320         expressions.
2321         * trans-decl.c (g95_finish_var_decl): Result variables are not
2322         module variables.
2323         * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
2324         (g95_conv_intrinsic_function): Use it.
2325         * trans-types.h (g95_type_spec): Remove dead declaration.
2327 2003-03-21  Paul Brook  <paul@nowt.org>
2329         * trans-decl.c (g95_build_function_decl): Mark string parameters.
2331 2003-03-20  Paul Brook  <paul@nowt.org>
2333         * trans-decl.c (g95_build_function_decl): Put character length
2334         parameters at the end of the function declaration.
2335         * trans-expr.c (g95_conv_function_call): Ditto.
2336         * trans-types.c (g95_get_function_type): Ditto.
2338 2003-03-20  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2340         * resolve.c (resolve_formal_arglist): Don't impose intent for
2341         procedure arguments of pure functions.
2342         (resolve_select): Remove redundant assignment.
2344 2003-03-19  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2346         * arith.c (validate_logical), g95.h, options.c (g95_init_options):
2347         Remove option l1.
2348         * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
2349         * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
2350         const.
2351         * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
2352         Order list.
2353         * symbol.c (g95_add_type): Fix typo in comment.
2356 2003-03-16  Paul Brook  <paul@nowt.org>
2358         * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
2359         * expr.c (g95_build_call): Remove.
2360         * f95-lang.c (puchdecl_top_level): New function.
2361         * g95.h (g95_code): Store resolved symbol, not just the name.
2362         * intrinsic.c (g95_intrinsic_namespace): New global namespace.
2363         (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
2364         (g95_get_intrinsic_sub_symbol): New function.
2365         * iresolve.c (g95_resolve_cpu_time): Use it.
2366         (g95_resolve_random_number): Ditto.
2367         * resolve.c: Set code->resolved_sym instead of code->sub_name.
2368         * trans-decl.c (g95_get_extern_function_decl): Give external decls
2369         the correct DECL_CONTEXT.  Add global symbold to the global scope.
2370         * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
2371         fixed.
2373 2003-03-16  Paul Brook  <paul@nowt.org>
2375         * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
2376         * options.c (g95_parse_arg): Ditto.
2377         * module.c (mio_symbol_attribute): Handle the always_explicit bit.
2378         * resolve.c (resolve_formal_arglist): The always_explicit sould be set
2379         for the procedure, not the parameter.
2380         * trans-array.c (g95_trans_g77_array): New function.
2381         (g95_trans_assumed_size): Use it.
2382         (g95_trans_dummy_array_bias): Ditto.
2383         (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
2384         (g95_conv_expr_descriptor): ... to here.  Update callers.
2385         * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
2386         (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
2387         * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
2388         * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
2389         * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
2390         (g95_sym_type): Ditto.
2392 2003-03-15  Paul Brook  <paul@nowt.org>
2394         * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
2395         first chain.
2396         * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
2398 2003-03-14  Paul Brook  <paul@nowt.org>
2400         * trans-array.c (g95_array_is_packed): Remove.
2401         (g95_conv_array_base): Correctly handle all descriptorless cases.
2402         (g95_conv_array_stride): Use descriptorless strides.
2403         (g95_trans_dummy_array_bias): Don't always repack the array.
2404         (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
2405         packed.
2406         * trans-types.c (g95_get_nodesc_array_type): Differentiate between
2407         dummy and non-dummy arrays...
2408         (g95_sym_type, g95_get_derived_type): ... like these.
2409         (g95_get_array_type_bounds): Allow discontiguous arrays.
2411 2003-03-12  Paul Brook  <paul@nowt.org>
2413         * array.c (g95_resolve_array_spec): Fix comment.
2414         * g95.h (symbol_attributes): New flag always_explicit.
2415         * resolve.c (resolve_formal_arglist): Set it always_explicit.
2416         * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
2417         * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
2418         (g95_trans_array_bounds): Allow assumed shape arrays.
2419         (g95_trans_repack_array): Remove.
2420         (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
2421         * trans-decl.c (g95_build_qualified_array): Only ignore absent
2422         bounds for assumed size arrays.
2423         (g95_build_dummy_array_decl): Use descriptorless arrays.
2424         * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
2425         (g95_trans_pointer_assign): Fix typo.
2426         * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
2427         code.
2428         (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
2429         * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
2430         Also modify callers.
2431         * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
2433 2003-03-08  Paul Brook  <paul@nowt.org>
2435         * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
2436         (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
2437         * resolve.c (compare_spec_to_ref): Allow full array sections.
2439 2003-03-08  Paul Brook  <paul@nowt.org>
2441         * expr.c (g95_simplify_expr): Also simplify array index and
2442         substring expressions.
2443         * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
2444         * trans-array.c (g95_trans_array_bounds): New function.
2445         (g95_trans_auto_array_allocation): Use it.
2446         (g95_trans_assumed_size): Rewrite.
2447         * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2448         (gfor_fndecl_repack): Remove.
2449         (g95_build_qualified_array): Handle absent upper bounds.
2450         (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
2451         (g95_get_symbol_decl): Update.
2452         (g95_build_intrinsic_function_decls): Initialize new decls.
2453         * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2454         (gfor_fndecl_repack): Remove.
2455         * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
2456         * trans-types.c: (g95_build_array_type): Merge duplicated code..
2457         (g95_get_nodesc_array_type): Handle absent bounds.
2458         * trans-types.h (g95_get_nodesc_array_type): Declare.
2460 2003-03-04  Paul Brook  <paul@nowt.org>
2462         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
2463         builtin-types.def.
2465 2003-03-02  Paul Brook  <paul@nowt.org>
2467         * options.c (g95_init_options): Drfault to 1.
2468         (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
2469         * trans-array.c (g95_conv_array_data, g95_conv_array_base,
2470         g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
2471         Handle non-constant size automatic arrays.
2472         (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
2473         generic bound functions.
2474         (g95_trans_auto_array_allocation): Don't create a descriptor.
2475         (g95_trans_assumed_size): New function (broken).
2476         (g95_trans_dummy_array_bias): Remove unused var.
2477         * trans-array.h (g95_trans_assumed_size): Declare.
2478         * trans-decl.c (create_index_var): New fuction.
2479         (g95_build_qualified_array): New function.
2480         (g95_get_symbol_decl): Use it.
2481         (g95_trans_deferred_vars): Handle assumed shape seperately.
2482         * trans-types.c (get_element_type): Handle heap allocated arrays.
2483         (g95_is_nodesc_array): Include non-const size arrays.
2484         (g95_get_nodesc_array_type): Ditto.
2486 2003-02-23  Paul Brook  <paul@nowt.org>
2488         * trans-array.c (g95_array_init_size): Should use stride, not size of
2489         last dimension.
2491 2003-02-18  Paul Brook  <paul@nowt.org>
2493         * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
2494         after intrinsic function check.
2496 2003-02-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2498         * io.c (match_io): Fix missing return value and remove useless
2499         assignment.
2500         * match.c (g95_match): Remove useless assignment.
2501         * module.c (parse_string):  Remove useless post increment.
2502         * simplify.c (g95_simplify_verify): Remove useless assignment.
2504 2003-02-15  Paul Brook  <paul@nowt.org>
2506         * expr.c (restricted_intrinsic): Handle bad values gracefully.
2507         * g95.h (symbol_attribute): Add referenced member.
2508         (g95_symbol): Add dummy_order member.
2509         (g95_set_sym_referenced): Declare.
2510         * match.c (g95_match_assignment, g95_match_call): Use it
2511         * primary.c (match_actual_arg, g95_match_rvalue,
2512         g95_match_variable): Ditto.
2513         * symbol.c (next_dummy_order): New variable.
2514         (g95_set_sym_referenced): New function.
2515         (check_done): New function.
2516         (g95_add_*): Use it.
2517         * trans-decl.c: Make formatting conform to GCC standards.
2518         (g95_defer_symbol_init): Add dummy variables in the right order.
2519         (g95_get_symbol_decl): Only accept referenced variables.
2520         (g95_create_module_variable): Module variables are always required.
2521         (generatr_local_decls): New function.
2522         (generate_local_vars): New function.
2523         (g95_generate_function_code): Use it.
2525 2003-02-13  Paul Brook  <paul@nowt.org>
2527         * trans-decl.c (g95_conv_struct_cons): Remove.
2528         (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
2529         * trans-expr.c (g95_conv_structure): New function.
2530         (g95_conv_expr): Use it.
2532 2003-02-09  Paul Brook  <paul@nowt.org>
2534         * trans-array.c (g95_array_init_size): Don't evaluate the linit
2535         expressions multiple times.
2536         (g95_trans_auto_arry_allocation): Use pointer not tmp.
2538 2003-02-08  Paul Brook  <paul@nowt.org>
2540         * module.c (mio_symtree_ref): Declare as static.
2541         (mio_expr): Remove dead code.
2542         (read_module): Set the symtree link for fixups.
2543         * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
2544         (build_round_expr): ... to this.
2545         (g95_conv_intrinsic_aint): New function.
2546         (g95_conv_intrinsic_function): Use it.
2548 2003-02-08  Paul Brook  <paul@nowt.org>
2550         * trans-array.c (g95_trans_array_constructor_value): Use the acutal
2551         offset after modificaton, not the increment expression.
2552         * dependency.c: Kill excess whitespace.
2554 2003-02-07  Sanjiv Gupta  <sanjivg@noida.hcltech.com>
2556         * dependency.h: Remove some function declarations.
2557         * dependency.c (get_no_of_elements): Change this function not to
2558         return int.
2559         * other: Add comments for all modified functions.
2561 2003-02-06  Paul Brook  <paul@nowt.org>
2563         * g95spec.c (lang_specific_functions): Fix initializer warning.
2564         * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
2565         for structure type names.
2566         * trans-decl.c (g95_cons_structure_cons): New function.
2567         (g95_get_symbol_decl): Use it.
2568         * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
2569         referencing code.
2571 2003-02-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2573         * resolve.c (compare_cases): Add const to casts.
2575 2003-01-30  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2577         * g95.h (g95_check_f): Change a1 to f1m.
2578         * intrinsic.c (add_sym_1m, check_specific,
2579         g95_intrinsic_func_interface): Use it.
2581         * module.c (init_pi_tree): Remove useless cast.
2582         (fp2): Fix argument type.
2584         * parse.c (parse_select_block): Add comment.
2586 2003-02-05  Toon Moene  <toon@moene.indiv.nluug.nl>
2588         * lang-options.h: Fix warning involving C90 concatenated
2589         strings.
2591 2003-02-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2592             Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2594         * io.c (format_asterisk): Complete initializer to kill warning.
2595         * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
2596         DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
2597         (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
2598         new defines to complete initializers.  Kills all warnings.
2600         * Make-lang.in: Comment cleanup.
2602 2003-02-05  Paul Brook  <paul@nowt.org>
2604         * array.c (g95_free_constructor): Handle NULL expressions.
2605         * resolve.c (resolve_structure_cons): Ditto.
2606         * decl.c (g95_match_null): New Function.
2607         (variable_decl): Use it.
2608         * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
2609         * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
2610         * trans-types.c (g95_set_decl_attributes): Remove empty function.
2612 2003-02-05  Paul Brook  <paul@nowt.org>
2614         * trans.h (build1_v): New macro.
2615         (build_v): Remove pointless and incorrect prototype.
2616         * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
2617         * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
2619 2003-02-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2621         * Make-lang.in (F95_OBJS): Remove one more dead file.
2623 2003-02-01  Paul Brook  <paul@nowt.org>
2625         * lang-specs.h: Don't pass -ffixed-form to the linker.
2626         * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
2628 2003-02-01  Paul Brook  <paul@nowt.org>
2630         * Make-lang.in (F95_OBJS): Remove dead files.
2631         * trans-array.c (g95_array_init_size): Do the right thing when
2632         ubound=NULL.
2633         * trans-decl.c (g95_generate_function_code): Initialize deffered
2634         symbol list before translating contained subroutines.
2635         * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
2636         scalar invariant values here...
2637         (g95_conv_variable, g95_conv_function_call): ... instead of here ...
2638         * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
2640 2003-01-29  Paul Brook  <paul@nowt.org>
2642         * trans-array.c (g95_add_loop_code): Put pre code in the right block.
2643         (g95_walk_elemental_function_args): Reverse chains before adding.
2644         (g95_reverse_ss): Move about a bit.
2645         * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
2646         function arguments.
2648 2003-01-28  Paul Brook  <paul@nowt.org>
2650         * intrinsic.c (resolve_intrinsic): Use correct union member.
2651         * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
2652         parameters.
2653         * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
2654         use associated variables.
2655         * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
2656         * trans-expr.c (g95_conv_expr_present): ... to here.
2657         * trans.h: Declare it.
2658         * trans-types.c (g95_sym_type): Assume subroutine if not specified.
2660 2003-01-28  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2662         * array.c (expand_iterator): Suppress useless assignment.
2663         * decl.c (match_char_spec): Ditto.
2664         * io.c (match_io_iterator): Ditto.
2665         * primary.c (match_real_constant): Ditto.
2666         * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
2667         Ditto.  Also, use g95_intrinsic_op not int for intrinsic operators.
2668         * matchexp.c (match_add_operand, match_level_5): Likewise.
2669         * module.c (parse_atom, find_enum): Likewise.
2670         * resolve.c: move #include <string.h>
2671         (resolve_select): Fix serious typo.
2673 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.n>
2675         * Make-lang.in: Don't build with broken tree-ssa-pre.
2677 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2679         * resolve.c (resolve_index): Add a TODO.
2680         * symbol.c: Remove useless "#include <ctype.h>".
2682 2003-01-27  Paul Brook  <paul@nowt.org>
2684         * check.c (check_rest): Allow different type kinds as an extension.
2685         * g95.h (g95_resolve_f): Add f1m.
2686         * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
2687         * intrinsic.h: Chenge prototypes for MIN and MAX.
2688         * iresolve.c (g95_resolve_minmax): New function.
2689         (g95_resolve_min, g95_resolve_max): Use it.
2690         * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
2691         arguments once.
2692         (g95_conv_intrinsic_present): Fix logic.
2694 2003-01-27  Steven Bossche  <s.bosscher@student.tudelft.nl>
2696         * g95.h (g95_case): Don't be a tree, be a double linked list.
2697         * match.c (match_case_selector): Remove redundant semantics check.
2698         Clean up a few goto's to make it a tiny little bit faster.
2699         * resolve.c (case_tree): Die.
2700         (compare_cases): Accept and compare unbounded cases too.
2701         (check_case_overlap): Don't build a tree.  Instead, merge-sort the
2702         whole list of g95_cases passed from resolve_select.
2703         (sane_logical_select): Die.
2704         (check_case_expr): Return FAILURE if a CASE label is of the wrong
2705         type kind.
2706         (resolve_select): Fixup case expression for computed GOTOs, put it
2707         in expr, not expr2, for easier handing in the parse tree dumper and
2708         the code generator.  Rewrite the rest of the function: Kill
2709         unreachable case labels and unreachable case blocks.
2710         * dump-parse-tree.c (g95_show_code_node): Always dump expr for
2711         an EXEC_SELECT, not case2 anymore.
2712         * trans-const.c (g95_conv_constant_to_tree): New function.
2713         (g95_conv_constant): Use it.
2714         * trans-const.h: Declare prototype for the new function.
2715         * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
2716         g95_trans_character_select): New static functions.
2717         (g95_trans_select): Rewrite.
2719 2003-01-26  Paul Brook  <paul@nowt.org>
2721         * intrinsic.c (add_fnctions): Properly add dreal.
2722         * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
2723         (g95_conv_intrinsic_function): Use it.
2724         * trans-io.c (build_dt): Abort on internal files (unimplemented).
2726 2003-01-26  Paul Brook  <paul@nowt.org>
2728         Widespread changes to the handling of symbols in expressions.  These
2729         are now linked via g95_symtree nodes.
2730         * parse.c (g95_fixup_sibling symbols): New function.
2731         (parse_contained): Use it.
2732         * g95.h (symbol_attribute): Add contained.  Indicates a symbol is a
2733         contained procedure that has bee correctly fixed up.
2734         (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
2736 2003-01-24  Paul Brook  <paul@nowt.org>
2738         * trans-array.c (g95_walk_expr): Function result attributes are in
2739         sym->result.
2740         * trans-expr.c (g95_conv_function_call,
2741         g95_trans_arrayfunc_assign): Ditto.
2742         * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
2744 2003-01-23  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2746         * expr.c (check_restricted): Fix error message.
2747         * symbol.c (free_st_labels): Plug memleak.
2749 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2751         * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
2752         reduce_binary_aa, reduce_binary, eval_intrinsic,
2753         eval_intrinsic_f2): Use typesafe prototypes for eval functions.
2754         * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
2755         for typesafe intrinsics helper functions.
2756         (g95_intrinsic_sym): Use them.
2757         * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
2758         add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
2759         add_sym_5, add_conv, resolve_intrinsic, do_simplify,
2760         check_specific, g95_intrinsic_func_interface,
2761         g95_intrinsic_sub_interface): Adjust all calls to intrinsics
2762         helper functions.
2763         * trans-decl.c (g95_get_extern_function_decl): Likewise.
2764         * Make-lang.in: Don't disable warnings for strict prototypes
2765         any longer, everything is typesafe now.
2767 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2769         * bbt.c (duplicate_node): Make static.
2770         * module.c (module_name): Make static.
2771         * scanner.c (include_dirs): Make static.
2773 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2775         Hard coded _gfor_'s should not show up anymore.
2776         * g95.h (PREFIX): New macro.
2777         * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
2778         hard-coded "_gfor".
2779         (g95_resolve_random_number): Likewise.
2780         * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
2781         * trans-io.c: Remove 'prefix' macro.  Replace all uses with
2782         the new PREFIX macro from g95.h.
2784 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2786         The troubles of forking... Andy implemented this just now too.
2787         Let's stick to that and keep the trees close.
2788         * g95.h (g95_st_label): 'format' member is now a g95_expr.
2789         * io.c: Revert previous changes.
2790         (g95_match_format): Match the format string as a character
2791         literal expression.
2792         * match.h (g95_statement_label): Declare external.
2793         * parse.c: Revert previous changes.
2794         * symbol.c (g95_free_st_label): Free a g95_expr instead
2795         if a 'char *'.
2796         * trans-io.c: Revert previous changes.
2797         (build_dt): Use set_string to set the format string.
2799 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2801         * io.c (format_string): Make non-static.
2802         (g95_match_format): Remember the format string.
2803         (terminate_io): Add I/O termination for empty I/O lists.
2804         * match.h: Declare external format_string.
2805         * parse.c (check_statement_label): Attack the format string
2806         to a format label for FORMAT statements.
2807         * trans-io.c (g95_add_field): Define prefix macro.  Replace
2808         all uses of PREFIX define with a use of this macro.
2809         (build_dt): Implement formatted I/O for format labels.
2811 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2813         * lang-options.h: Kill "-std=F".
2814         * options.c: Remove unimplemented "-std=F".  Modify
2815         web address.
2816         * misc.c (g95_terminal_width): New function.
2817         * error.c (g95_error_init_1): Use g95_terminal_width.
2818         * g95.h: Add prototype for g95_terminal_width, remove
2819         fmode flag.
2821 2003-01-19  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2823         * Make-lang.in: Fix typo.
2825 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2827         * g95.h (struct g95_case): Remove unused cruft, new member
2828         'where' to keep track of the locus of the default case.
2829         * match.c (g95_match_case): Add locus to the current case.
2830         (match_case_selector): Likewise.
2831         * parse.c (parse_select_block): Move semantics check for
2832         multiple DEFAULT cases out of here to...
2833         * resolve.c (check_case_overlap): ...here.  Return sooner
2834         when possible.
2835         (check_case_expr): Take two g95_cases now, use to sure the
2836         expression kinds are the same.
2837         (resolve_select): Cleanup.
2839 2003-01-18  Paul Brook  <paul@nowt.org>
2841         * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
2842         * trans-decl.c (g95_set_symbol_decl): Handle non-array result
2843         variables.
2844         (g95_get_extern_function_decl): Put decls in the correct context.
2846 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2848         * trans-io.c: Port changes from Andy to set ERR flag.
2850 2003-01-17  Paul Brook  <paul@nowt.org>
2852         * trans-array.c: Add various comments.
2853         (g95_ss_terminator): Declare as const.
2854         (g95_walk_expr): Remove first parameter and update all callers.
2855         (g95_walk_op_expr): Initialize scalar SS properly.
2856         * trans-array.h (g95_walk_expr): Update prototype.
2857         * trans-expr.c: Update for new g95_walk_expr.
2858         * trans-intrinsic.c: Ditto.
2859         * trans-io.c: Ditto.
2860         * trans.h: Various comments for SS chains.
2862 2003-01-17  Paul Brook  <paul@nowt.org>
2864         * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
2865         and RRSPACING.
2866         * intrinsic.c (add_functions): Use them.
2867         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
2868         * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
2870 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2872         Fallout of a small merge conflict:
2873         * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
2875 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2877         * initrinsic.c: New add_sym_* functions for strong typing.
2878         (add_conv): Make prototype strict.
2879         * dump-parse-tree.c, dependency.c: Include config.h
2880         * resolve.c, trans-io.c: Fix typos.
2882 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2884         * dump-parse-tree.c (g95_show_code_node): Show the
2885         condition for a computed GOTO that was transformed
2886         to a SELECT CASE construct.
2887         * resolve.c (check_case_overlap): Revert previous switch
2888         to treaps, it was too slow and didn't catch all trouble.
2889         (resolve_symbol): Be more flexible about module procedures.
2890         * symbol.c (check_conflict): Point to relevant section in
2891         the standard for dubious conflict.  Allow procedure
2892         dummy arguments to be optional again.
2893         * trans-io (add_field): Rename to g95_add_field.  Change
2894         all callers.
2895         * trans-stmt (trans_select): Handle unbounded cases for
2896         integer SELECT CASE constructs.  Fix/add more comment.
2898 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2900         * g95.h: Uses GCC's function attribute macros.
2901         * error.c, module.c, parse.c, g95.h: More function attributes.
2903 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2904         Forgot a file...
2905         * trans-decl.c (get_label_decl): Use TREE_LINENO instead
2906         of DECL_SOURCE_LINE, and TREE_FILENAME instead of
2907         DECL_SOURCE_FILE.
2909 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2911         * f95-lang.c (pushdecl): Use TREE_LINENO instead of
2912         DECL_SOURCE_LINE.
2913         * trans.c (g95_trans_code): Use annotate_all_with_file_line
2914         instead of nowdead wrap_all_with_wfl.
2916 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2918         * parse.c (g95_parse_file): In verbose mode, dump the parse tree
2919         before generating code, so we can still see it even if the code
2920         generation phase dies.
2922 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2924         * decl.c (build_sym): Split out initialization expression parts...
2925         (add_init_expr_to_sym): ...to here.
2926         (variable_decl): Add the symbol following an attribute list to the
2927         symbol tree before parsing the optional initialization expression
2928         if the symbol is not of a derived type.
2929         * primary.c (g95_match_rvalue): Don't assume a symbol always has
2930         a value if it is a PARAMETER.
2932 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2934         * misc.c: Don't #include <mcheck.h>
2935         * module.c: Ditto.  Kill uses of mtrace, muntrace.  If there
2936         ever was a glibc bug, then either this was never reported to
2937         glibc people, or it has been fixed for so long that there's
2938         no information you can find about it, anywhere.
2940 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2942         Fix warnings:
2943         * module.c (attr_bits, bt_types, array_spec_types):
2944         Switch 'const' and 'static'.
2945         * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
2947         GNU'ify source code:
2948         * trans-io.c: Numerous fixes, one fixed warning and a few
2949         TODO markers so that we don't forget about them.
2951 2003-01-13  Paul Brook  <paul@nowt.org>
2953         * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
2954         * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
2955         Add G95_ISYM_SCALE.
2956         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
2957         * match.c (g95_match_stop): Fix dumb == -> != error.
2959 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2961         * dump-parse-tree.c (show_indent): Add line breaks.  This
2962         whole dumping process needs cleanups.
2963         * f95-lang.c (g95_mark_addressable): Fix prototype to match
2964         the langhook.  Fix 'return's accordingly.
2965         * g95-support.h: Adjust prototype.
2966         * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
2967         * lang-options.h: Add '-fsyntax-only'.
2968         * options.c (g95_init_options): Init 'no_backend'.
2969         (g95_parse_arg): Deal with '-fsyntax-only'.
2970         * parse.c (g95_parse_file): Do not generate code if 'no_backend'
2971         is set.
2973 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2974         Patch from Arnaud
2975         * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
2976         arguments.  Also make sure that if a symbol is marked INTRINSIC,
2977         an intrinsic with the symbol's name actually exists.
2978         (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
2979         Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
2980         ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
2982 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2984         * resolve.c (resolve_contained_functions): Fix condition, don't
2985         throw internal_error if a child namespace has no name.  Apparently
2986         this can be the case?
2988 2003-01-11  Paul Brook  <paul@nowt.org>
2990         Port changes from Andy's tree:
2991         * g95.h (g95_code): Add stop_code.
2992         * match.c (g95_match_stop): Detter syntax checking.
2993         * resolve.c (resolve_generic_f0): Return match type.
2994         (resolve_generic_f): Remove dead/duplicated code.
2995         (resolve_specific_f): Ditto.
2996         * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
2997         * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
2998         * trans-stmt.c (g95_trans_stop): Handle new STOP format.
3000 2003-01-11  Paul Brook  <paul@nowt.org>
3002         * trans-array.c: Various documentation/comment changes.
3003         * trans-stmt.c: Ditto.
3006 2003-01-10  Paul Brook  <paul@nowt.org>
3008         * options.c/h: Add -fdump-parse-tree as alias of -v.
3010 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3012         * dump-parse-tree.c (g95_show_namespace): Fixed another
3013         typo.  Sorry, it's Friday...
3015 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3017         Spotted by Tobi:
3018         * trans-array.c, trans-array.h, trans.c, trans-const.c,
3019         trans-const.h, trans-decl.c, trans-expr.c, trans.h
3020         trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
3021         trans-types.c: Fix bogus copyright years, add 2003.
3022         * trans-types.h: Give copyright header.
3024 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3026         * dump-parse-tree.c (g95_show_namespace): Fixed typo.
3027         * expr.c, options.c, scanner.c: Add some more 'const' markers.
3028         * intrinsic.c: Some constant strings moved to read-only memory.
3029         * io.c (format_asterisk): Move to...
3030         * g95.h: ...here.
3032 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3034         * dump-parse-tree.c (g95_show_namespace): Dump implicit
3035         types for ranges instead of per-letter.  Indent the
3036         'CONTAINS' just like everything else.
3037         * resolve.c (resolve_contained_functions): Clarify comment.
3038         Explain non-obvious conditional expression.  Improve
3039         diagnostics if tyoe cannot be resolved.
3040         Port semi-fix from Andy's tree:
3041         (was_declared): Move up before first use.
3042         (generic_sym, specific_sym): New functions.  Code moved
3043         out if procedure_kind.
3044         (procedure_kind): Simplify using new functions.
3045         (resolve_generic_f): Make sure the functions we find in
3046         a parent namespace is generic.
3047         (resolve_specific_f): Ditto for specific functions.
3049 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3051         * trans-stmt.c, trans.c: Fix some code style issues. Add
3052         some more comment (but still not enough!).
3054 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3056         * symbol.c (flavors, procedures, intents, acces_types,
3057         access_types, ifsrc_types): Make const.
3058         * misc.c (g95_string2code): Make 'm' param 'const'.
3059         * module.c (find_enum, write_atom, mio_name): Make
3060         'm' param 'const'.
3061         (attr_bits, bt_types, array_spec_types, array_ref_types,
3062         ref_types, expr_types): Make const.
3063         * g95.h: Adjust external decls.
3065 2003-01-09  Paul Brook  <paul@nowt.org>
3067         * Testsuite: Add a load of new cases.
3069 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3071         * Make-file.in: Add dependency on back end header files;
3072         a parallel build should work now.
3073         * f95-lang-c (lang_identifier): Remove bogus comment.
3074         (g95_be_parse_file): Fix prototype.
3075         (g95_init): Make static.
3076         (g95_finish): Make static.
3077         * error.c (g95_syntax_error): Kill. Make define in...
3078         * g95.h (g95_syntax_error): Define.
3079         (g95.options): Make 'source' member 'const'.
3080         * interface.c (g95_match_interface): Explain
3081         hard-to-read condition.
3082         (g95_match_end_interface): Ditto.
3083         * trans_const.c (g95_build_string_const): Make 's' parameter
3084         'const'.
3085         * trans_const.h: Adjust protoype accordingly.
3086         * trans-decl.c: Include tree-dump.h
3087         (g95_generate_function_code): Build fixes for recent changes
3088         in the tree-ssa branch.
3090 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3092         * format.c: Kill, move code from here...
3093         * io.c: ...to here.
3094         * Make-lang.in: Adjust.
3095         * MANIFEST: Ditto.
3096         * match.h: Ditto.
3097         * BUGS: Mention where to submit bugs.  Move old content...
3098         * TODO: ...to here.  New file.
3100 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3101         Fix most warnings, and suppress the ones we can't fix for now.
3102         * Make-lang.in: Suppress warnings about bad proto's in g95.h,
3103         these warnings just clutter the screen and there's not much
3104         we can do about them for now anyway.
3105         * check.c, iresolve.c: Mark unused function parameters.
3106         * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
3107         they should be resolved before they get here.
3108         * error.c: Remove unused FILE *status_out.
3109         * f95-lang.c (g95_init): Remove bogus cast.
3110         * Many files: Make things 'const' where required.
3111         * g95.h: Fix prototypes for all modified functions above.
3112         (g95_options): Remove 'object' member.
3114 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3116         * Make-file.in: Cleanup bogus targets.  Add more comment.
3117         * lang-options.h: New option '-w'.
3118         * g95.h: add no_options field to struct g95_options.
3119         * options.c (g95_init_options): Default no_warnings to off.
3120         (g95_parse_arg): Recognise the '-w' switch and its alias,
3121         '-fno-warnings'.
3122         * error.c (g95_warning, g95_warning_now): Don't emit warning if
3123         no_warning option is set.
3124         * iresolve.c (g95_resolve_shape): Fix warning.
3126 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3128         * primary.c (g95_next_string_char): Rename next_string_char, and
3129         make static.  Adjust callers accordingly.
3130         * resolve.c (resolve_generic_f0): Return try, not match.  Adjust
3131         callers accordingly.
3132         * g95.h: Split out all g95_match* functions to...
3133         * match.h: ...here. New file.
3134         * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
3135         matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
3137 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3139         * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
3140         g95_merge_new_implicit): New functions.
3141         (g95_match_implicit_none, g95_match_implicit): Move from here...
3142         * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
3143         Modify to use the new functions in symbol.c.
3144         * g95.h: Add and move prototypes.
3146 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3148         * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
3149         node compare function.
3150         (g95_insert_bbt): Likewise.
3151         (g95_insert_bbt_with_overlap): Likewise.
3152         (g95_delete_bbt): Likewise.
3153         (delete_treap): Likewise. Also fix a potential bug when calling it.
3154         * module.c (compare_pointers): Change proto to compare_fn.
3155         (compare_integers): Likewise.
3156         (compare_true_names): Likewise.
3157         (find_true_name): Adjust call to compare_true_names to match proto.
3158         (require_atom, write_atom, mio_name): Fix 'const' warnings.
3159         (init_pi_tree): Make compare a compare_fn instead of (int *).
3160         * resolve.c (compare_cases): Change proto to compare_fn.
3161         * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
3162         it static, and rename to compare_symtree.
3163         (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
3164         function.
3165         * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
3166         of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
3168 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3169         * Make-lang.in: Fix spaces/tabs issues from previous patch.
3170         * patch.options: Blow away Paul's checkin mistake :-)
3171         * io.c (terminate_io): Fix memory leak (Arnaud).
3173 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3175         * Make-lang.in: Teach about building DVI, info manual.
3176         * g95.texi: New file.
3178 2003-01-02  Paul Brook  <paul@nowt.org>
3180         * trans-array.c (g95_reverse_ss): Make static and don't use.
3181         (g95_conv_ss_descriptor): Don't use g95_loopinfo
3182         (g95_conv_array_parameters): Modify for pointer assignments.
3183         (g95_walk_subexpr): New function.
3184         (g95_walk_expr*): Use it.
3185         * trans-array.h (g95_reverse_ss): Remove prototype.
3186         * trans-expr.c (g95_trans_pointer_assign): Implement.
3187         (Many): Set se.want_pointer before calling g95_conv_array_parameter.
3188         * trans-intrinsic.c: Sync with scalarizer changes.
3189         * trans-io.c: Ditto.
3191 2002-12-29  Paul Brook  <paul@nowt.org>
3193         * trans-array.c: Document calling convention for arrays.
3195 2002-12-19  Paul Brook  <paul@nowt.org>
3197         * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
3198         assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
3199         optional parameters for some intrinsics.
3200         (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
3201         * trans-expr.c (g95_conv_function_call): Pass NULL for absent
3202         optional parameters.
3203         * trans.h (g95_se): Add ignore_optional flag.
3205 2002-12-15  Paul Brook  <paul@nowt.org>
3207         * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
3208         * trans-decl.c (g95_generate_function_code): Use TDI_original.
3210 2002-12-14  Paul Brook  <paul@nowt.org>
3212         * trans-stmt.c (g95_trans_call): Use resolved symbol name.
3214 2002-12-12  Paul Brook  <paul@nowt.org>
3216         * trans-array.c (g95_trans_array_constructor_subarray): Fully
3217         initialize the scalarizer.
3218         (various): Update to new format of g95_expr->value.constructor.
3220 2002-12-08  Paul Brook  <paul@nowt.org>
3222         * trans-array.c (g95_put_offset_into_var): New function.
3223         (g95_trans_array_constructor_subarray): New function.
3224         (g95_trans_array_constructor_value): Use it.
3225         (g95_array_cons_size): Don't abort() on array components.
3227 2002-12-08  Paul Brook  <paul@nowt.org>
3229         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
3230         * support.c: Update #includes.
3231         (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
3232         * trans-array.c: Update #includes.
3233         * trans.c: Ditto.
3234         * trans-const.c: Ditto.
3235         * trans-io.c: Ditto.
3236         * trans-types.c: Ditto.
3237         (g95_init_types): Set size_type_node.
3238         * trans-decl.c: Update #includes.
3239         (gfor_fndecl_adjust{l,r}): Declare and initialize.
3240         * trans-stmt.c: Update #includes.
3241         (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
3242         (g95_trans_select): Fix check for unbounded ranges.
3243         * trans-expr.c: Update #includes.
3244         (g95_conv_string_tmp): New function.
3245         (g95_conv_concat_op): Use it.
3246         * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
3247         * Trans-intrisic.c: Update #includes.
3248         (g95_conv_intrinsic_strcmp): New function.
3249         (g95_conv_intrinsic_adjust): Ditto.
3250         (g95_conv_intrinsic_function: Use them.
3252 2002-11-30  Paul Brook  <paul@nowt.org>
3254         * trans-array.c (g95_walk_function_expr): Handle non-array return by
3255         reference.
3256         * trans-dec.c (g95_build_function_decl): Handle character return
3257         parammeters.
3258         (g95_get_fake_result_decl): Ditto.
3259         (g95_trans_deferred_vars): Ditto.
3260         * trans-expr.c (g95_conv_function_call): Ditto.
3261         (g95_trans_arrayfunc_assign) Limit to array valued functions.
3262         * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
3263         (g95_conv_intrinsic_function): Use it.
3264         * trans-types.c (g95_sym_type): Handle functions returning strings.
3265         (g95_return_by_reference): Ditto.
3266         (g95_get_function_type): Ditto.
3268 2002-11-18  Paul Brook  <paul@nowt.org>
3270         * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
3271         requires a temporary.
3272         (g95_trans_select): Handle computed gotos.
3273         * trans-types.c (g95_build_array_type): Warn about non-functional
3274         assumed shape arrays.
3275         * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
3276         blocks.
3277         * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
3278         (g95_conv_intrinsic_int): New function.
3279         (g95_conv_intrinsic_mod): New function.
3280         (g95_conv_intrinsic_ichar): New function.
3281         (g95_conv_intrinsic_function): Use them.
3282         (g95_conv_intrinsic_dim): Use g95_evaluate_now.
3284 2002-11-17  Toon Moene  <toon@moene.indiv.nluug.nl>
3286         * trans-types.c (g95_build_array_type): Assumed
3287         sized arrays can have rank > 1.
3288         * trans.c (g95_trans_code): Remove erroneous
3289         warning about CONTINUE.
3290         * trans-expr.c (g95_conv_variable): Remove
3291         erroneous assert.
3293 2002-11-15  Paul Brook  <paul@nowt.org>
3295         * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
3297 2002-10-31  Paul Brook  <paul@nowt.org>
3299         * f95-tree.c: Remove tree copying stuff that's now in gimple.c
3300         * trans-expr.c (g95_conv_component_ref): Handle character string
3301         components.
3302         (g95_conv_string_parameter): Ditto.
3303         * trans-types.c (g95_get_derived_type): Add length decl to caracter
3304         string components.
3306 2002-10-10  Paul Brook  <paul@nowt.org>
3308         * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
3309         * trans-expr.c (g95_conv_function_call): Remove unreliable return value
3310         check.
3311         * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
3312         (g95_conv_intrinsic_function): Handle size and shape intrinsics.
3313         (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
3314         * trans-types.c (pvoid_type_node): Declare and initialize.
3315         * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
3316         (g95_array_allocate): Fix when base==data.
3317         (g95_conv_array_parameter): Correctly handle reduced rank sections.
3318         * trans-io.c (g95_trans_write): Correctly handle string modifiers.
3320 2002-10-09  Paul Brook  <paul@nowt.org>
3322         * (g95_conv_expr_reference): Handle character strings correctly.
3324 2002-10-07  Paul Brook  <paul@nowt.org>
3326         (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
3327         langhook.
3328         * trans-array.c (g95_build_array_initializer): Remove.
3329         (g95_conv_array_initializer): New Function.
3330         (g95_trans_auto_arry_allocation): Cleanup.
3331         (g95_trans_init_character_array): Remove.
3332         * g95spec.c: Link in libgforbegin.
3333         * trans.c (g95_generate_code): Rename main function to MAIN__.
3334         (g95_create_var): New function.
3335         (g95_create_var_np): New function.
3336         (g95_evaluate_now): New function.
3337         (g95_start_block): New function.
3338         (g95_finish_block): New function.
3339         (g95_add_expr_to_block): New function.
3340         (g95_add_block_to_block): New function.
3341         * trans-expr.c (g95_conv_componen_ref): New function.
3342         * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
3343         (F95_OBJS): Add dependency.o.
3344         * f95-lang.c (g95_is_simple_stmt): Remove.
3345         * f95-tree.c (mark_not_simple): New function.
3346         (unshare_all_trees): New function.
3347         (create_tmp_var, create_tmp_alias_var): Remove.
3348         * support.c (declare_tmp_vars, tree_last_decl): Remove.
3349         * trans*: Convert to new IR using GENERIC trees.  Don't bother about
3350         SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
3352 2002-10-01  Paul Brook  <paul@nowt.org>
3354         * trans-array.c: Add support for descriptorless arrays.
3355         (g95_conv_array_data): New function.
3356         (g95_conv_array_base): New function.
3357         * trans-array.h: Declare these here.
3358         * trans-decl.c(g95_create_mopdule_variable): Perform variable
3359         initialization and creation here.
3360         (g95_create_module_vars): Instead of here.
3361         * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
3362         * trans-intrinsic.c: Ditto.
3363         * trans-types.c (g95_is_nodesc_array): New function.
3364         (g95_get_nodesc_array_type): New function.
3365         (g95_sym_type, g95_get_derived_type): Use them.
3366         * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
3368 2002-09-28  Paul Brook  <paul@nowt.org>
3370         * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
3371         * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
3372         parameters.
3374 2002-09-24  Paul Brook  <paul@nowt.org>
3376         * f95-lang.c (listify): Remove declaration.
3377         (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
3378         (listify)
3379         * f95-tree.c (get_name): New function.
3380         * trans.c (module_namespace): Remove.
3381         * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
3382         * trans-types.c: Ditto.
3384 2002-09-19  Paul Brook  <paul@nowt.org>
3386         * trans-array.c (g95_get_array_cons_size): New Function.
3387         (g95_con_ss_startstride): Handle Array constructors.
3388         (g95_conv_loop_setup): Ditto.
3389         (g95_conv_array_parameter): Ditto.
3390         * tras-decl.c (g95_finish_var_decl): Make initializes variables
3391         static.
3393 2002-09-19  Paul Brook  <paul@nowt.org>
3395         * trans.c (g95_simple_fold_tmp): Detect variables inside
3396         NON_LVALUE_EXPR.
3397         * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
3399 2002-09-18  Steven Bosscher <s.bosscher@student.tudelft.nl>
3401         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
3403 2002-09-14  Paul Brook  <paul@nowt.org>
3405         * trans.c (g95_create_module_variable): Move to trans-decl.c.
3406         * trans-const.c (g95_conv_string_init): New Function.
3407         * trans-const.h: Declare it.
3408         * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
3409         variables. Don't bail on intrinsic symbols.
3410         (get_extern_function_decl): Handle specific intrinsic functions.
3411         * trans-types.c (g95_sym_type): Dummy functions don't return
3412         reference types.
3413         * trans-array.c (g95_build_array_initializer): New Function.
3414         (g95_trans_auto_array_allocation): Build initializer for static decls.
3415         Don't use mpz_addmul, it's GMP4 only.
3417 2002-09-12  Paul Brook  <paul@nowt.org>
3419         * trans-decl.c (g95_generate_code): Fix thinko with return variable.
3420         (g95_get_extern_function_decl, g95_build_function_decl): Mangle
3421         assembler names for module procedures.
3423 2002-09-11  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
3425         * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
3426         dependency/
3428 2002-09-10  Paul Brook  <paul@nowt.org>
3430         * trans-array.c: Change format of G95_SS_TEMP strictures.
3431         (g95_check_fncall_dependancy): New function.
3432         (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
3433         offsets.
3434         * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
3435         result variables.
3436         (g95_build_function_decl): Don't assume result arrays are packed.
3437         (g95_trans-deferred-vars): Handle array result variables.
3438         (g95_generate_fuction_code): Clear saved_function_decls.
3439         * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
3440         reference.
3441         (g95_trans_arrayfunc_assign): New function.
3442         (g95_trans_assignment): Use it.
3443         * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
3444         (g95_se): Add direct_byref.
3445         * trans-types.c: Use sym->result rather than sym where appropriate.
3446         * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
3447         Update other functions to use this.
3448         (g95_is_intrinsic_libcall): New function.
3449         (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
3450         (g95_walk_intrinsic_function): Ditto.
3452 2002-09-08  Paul Brook  <paul@nowt.org>
3454         * trans-types.c: Change rank field to dtype field in array descriptor.
3455         * trans-array.c: Implement filling of dtype array descriptor field.
3456         * trans-intrinsic.c: Fix broken LEN intrinsic.
3458 2002-09-07  Paul Brook  <paul@nowt.org>
3460         * trans-intrinsic.c: Remove outdated todo intrinsic list.
3461         (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
3462         (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
3464 2002-09-06  Paul Brook  <paul@nowt.org>
3466         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
3467         (gt-f95-trans-types.h): Add dependancy information.
3468         * config-lang.in (gtfiles): Add trans-types.c
3469         * f95-lang.c (g95_be_parse_file): Pass error and warning counts
3470         back to top-level code.
3471         * trans-array.c, trans-types.c: Change format of array descriptor.
3472         (g95_conv_descriptor_dimension): New function.
3473         * trans-types.h (g95_conv_descriptor_rank): define.
3474         * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
3475         intrinsics.
3477 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
3479         * trans-array.c, trans-types.c: Add rank information to descriptor.
3481 2002-09-06  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
3483         * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
3485 2002-09-04  Paul Brook  <paul@nowt.org>
3487         * f95-lang.c (g95_create_decls): New function.
3488         (g95_init):  Move initialization of external decls to above, and call
3489         from g95_be_parse_file.
3490         * trans.c (g95_finish_stmt): Don't amputate the decl chain.
3491         * trans-types.c (g95_init_types): Always name integer and char types.
3492         (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
3494 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
3496         * Make-lang.in: Add options.c to F95_PARSER_OBJS
3498 2002-09-02  Paul Brook  <paul@nowt.org>
3500         * g95_generate_code: Clear the attr for __fortran_main.
3501         * trans-types.c (g95_finish_type): New function.
3502         * g95_init_io_state_type: Use g95_finish_type.
3503         * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
3505 2002-09-01  Paul Brook  <paul@nowt.org>
3507         * README.backend: Warn about the dangers of extra config.h files.
3508         Remove obsolete libgfor stuff.
3509         * config-lang.in: Add target-libgfor dependancy.
3510         * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
3512 2002-09-01  Toon Moene  <toon@moene.indiv.nluug.nl>
3514         * g95_conv_mpz_to_tree: Free storage pointed to by q,
3515         not by buff.
3517 2002-08-30  Paul Brook  <paul@nowt.org>
3519         * trans-intrinsic.c (g95_conv_intrinsic_function,
3520         g95_walk_intrinsic_function): Added ANY and ALL.
3521         (g95_conv_intrinsic_anyall): New function.
3522         * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in
3523         mangled name