* simplify.c (gfc_simplify_log): Remove useless line of code.
[official-gcc.git] / gcc / fortran / ChangeLog
blobac795569089297341689eb233beb87d07b61eea2
1 2004-05-29  Steven G. Kargl  <kargls@comcast.net>
3         * simplify.c (gfc_simplify_log): Remove useless line of code.
5 2004-05-29  Paul Brook  <paul@codesourcery.com>
7         * trans-common.c (find_equivalence): Find multiple rules.
9 2004-05-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
11         * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
12         (gfc_current_locus): Declare new global variable.
13         * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
14         (gfc_current_locus1): Rename ...
15         (gfc_current_locus): ... to this.
16         (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
17         skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
18         gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
19         gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
20         and gfc_current_locus(), respectively.
21         * array.c (match_subscript, gfc_match_array_ref, match_array_list,
22         match_array_cons_element, gfc_match_array_constructor):
23         Read/modify gfc_current_locus instead of calling gfc_set_locus()
24         and gfc_current_locus().
25         * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
26         match_attr_spec, gfc_match_function_decl, gfc_match_end,
27         attr_decl1, gfc_match_save): Likewise.
28         * error.c (error_print, gfc_internal_error): Likewise.
29         * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
30         * interface.c (gfc_add_interface): Likewise.
31         * io.c (gfc_match_format, match_dt_format, match_dt_element,
32         match_io_iterator, match_io): Likewise.
33         * match.c (gfc_match_space, gfc_match_eos,
34         gfc_match_small_literal_int, gfc_match_st_label,
35         gfc_match_strings, gfc_match_name, gfc_match_iterator,
36         gfc_match_char, gfc_match, gfc_match_assignment,
37         gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
38         gfc_match_nullify, gfc_match_call, match_implicit_range,
39         gfc_match_implicit, gfc_match_data, match_case_selector,
40         gfc_match_case, match_forall_iterator): Likewise.
41         * matchexp.c (gfc_match_defined_op_name, next_operator,
42         match_level_1, match_mult_operand, match_ext_mult_operand,
43         match_add_operand, match_ext_add_operand, match_level_2,
44         match_level_3, match_level_4, match_and_operand, match_or_operand,
45         match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
46         * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
47         * parse.c (match_word, decode_statement, next_free, next_fixed,
48         add_statement, verify_st_order, parse_if_block, gfc_parse_file):
49         Likewise.
50         * primary.c (match_digits, match_integer_constant,
51         match_boz_constant, match_real_constant, match_substring,
52         next_string_char, match_charkind_name, match_string_constant,
53         match_logical_constant, match_const_complex_part,
54         match_complex_constant, match_actual_arg, match_keyword_arg,
55         gfc_match_actual_arglist, gfc_match_structure_constructor,
56         gfc_match_rvalue, gfc_match_variable): Likewise.
57         * st.c (gfc_get_code): Likewise.
58         * symbol.c (check_conflict, check_used, check_done,
59         duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
60         gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
61         gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
63 2004-05-26  Roger Sayle  <roger@eyesopen.com>
65         * io.c (format_asterisk): Silence compiler warnings by correcting
66         the number of elements of a "locus" initializer.
68 2004-05-25  Roger Sayle  <roger@eyesopen.com>
70         PR fortran/13912
71         * matchexp.c: Allow unary operators after arithmetic operators
72         as a GNU extension.
73         (match_ext_mult_operand, match_ext_add_operand): New functions.
74         (match_mult_operand): Tweak to call match_ext_mult_operand.
75         (match_add_operand): Tweak to call match_ext_mult_operand.
76         (match_level_2): Rearrange to call match_ext_add_operand.
78 2004-05-25  Paul Brook  <paul@codesourcery.com>
80         * expr.c (check_inquiry): Remove bogus tests.
82 2004-05-23  Paul Brook  <paul@codesourcery.com>
84         PR fortran/13773
85         * expr.c (restricted_args): Remove redundant checks/argument.
86         (external_spec_function): Update to match.
87         (restricted_intrinsic): Rewrite.
89 2004-05-23  Paul Brook  <paul@codesourcery.com>
90         Victor Leikehman  <lei@haifasphere.co.il>
92         * gfortran.h (struct gfc_symbol): Add equiv_built.
93         * trans-common.c: Change int to HOST_WIDE_INT.  Capitalize error
94         messages.
95         (current_length): Remove.
96         (add_segments): New function.
97         (build_equiv_decl): Create initialized common blocks.
98         (build_common_decl): Always add decl to bindings.
99         (create_common): Create initializers.
100         (find_segment_info): Reformat to match coding conventions.
101         (new_condition): Use add_segments.
102         (add_condition, find_equivalence, add_equivalences): Move iteration
103         inside functions.  Only process each segment once.
104         (new_segment, finish_equivalences, translate_common): Simplify.
106 2004-05-23  Steven G. Kargl  <kargls@comcast.net>
108         * check.c (gfc_check_random_seed): Issue for too many arguments.
110 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
112         * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
114 2004-05-22  Paul Brook  <paul@codesourcery.com>
116         * dump-parse-tree.c (gfc_show_equiv): New function.
117         (gfc_show_namespace): Use it.
119 2004-05-22  Victor Leikehman  <lei@haifasphere.co.il>
121         PR fortran/13249
122         * symbol.c (gfc_add_common): Disable checks to work around other more
123         fundamental inadequacies.
125 2004-05-22  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
127         * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
128         only for functions.
129         (gfc_build_function_decl): Likewise.
131 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
133         * check.c (gfc_check_system_clock): New function.
134         * intrinsic.c (add_sym_3s): New function.
135         (add_subroutines): Use it.
136         * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
137         Add prototypes.
138         * iresolve.c (gfc_resolve_system_clock): New function.
140 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
142         * invoke.texi: Document -Wunderflow and spell check.
143         * lang.opt: Add Wunderflow.
144         * gfortran.h (gfc_option_t): Add warn_underflow option.
145         * options.c (gfc_init_options, set_Wall): Use it.
146         * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
147         * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
148         gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
149         gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
150         * arith.c (common_logarithm): Fix typo in comment.
152 2004-05-21  Roger Sayle  <roger@eyesopen.com>
154         * io.c (check_format): As a GNU extension, allow the comma after a
155         string literal to be optional in a format.  Use gfc_notify_std to
156         issue an error/warning as appropriate.
158 2004-05-21  Roger Sayle  <roger@eyesopen.com>
160         * io.c (check_format): Use gfc_notify_std to determine whether to
161         issue an error/warning for omitting the digits from the X format.
163 2004-05-20  Roger Sayle  <roger@eyesopen.com>
165         * io.c (check_format): Allow the number before the X format to
166         be optional when not -pedantic.
168 2004-05-18  Feng Wang  <fengwang@nudt.edu.cn>
169         Paul Brook  <paul@codesourcery.com>
171         * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
172         Create decls for __builtin_pow{,f}.
173         * gfortran.h (PREFIX_LEN): Define.
174         * trans-decl.c (gfor_fndecl_math_powi): Add.
175         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
176         (gfc_build_intrinsic_function_decls): Create decls for powi.
177         * trans-expr.c (powi_table): Add.
178         (gfc_conv_integer_power): Remove.
179         (gfc_conv_powi): New function.
180         (gfc_conv_cst_int_power): New function.
181         (gfc_conv_power_op): Use new powi routines.
182         * trans.h (struct gfc_powdecl_list): Add.
183         (gfor_fndecl_math_powi): Add.
184         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
186 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
188         * trans.c, trans-decl.c: Fix comment typos.
190 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
192         * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
194 2004-05-18  Steve Kargl  <kargls@comcast.net>
196         * arith.c (gfc_int2complex): Fix incorrect range checking.
198 2004-05-18  Paul Brook  <paul@codesourcery.com>
200         PR fortran/13930
201         * decl.c (add_init_expr_to_sym): Remove incorrect check.
202         (default_initializer): Move to expr.c.
203         (variable_decl): Don't assign default initializer to variables.
204         * expr.c (gfc_default_initializer): Move to here.
205         * gfortran.h (gfc_default_initializer): Add prototype.
206         * resolve.c (resolve_symbol): Check for illegal initializers.
207         Assign default initializer.
209 2004-05-17  Steve Kargl  <kargls@comcast.net>
211         * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
213 2004-05-17  Steve Kargl  <kargls@comcast.net>
215         * arith.c (gfc_real2complex): Range checking wrong part of complex
216         number. 
217         
218 2004-05-16  Paul Brook  <paul@codesourcery.com>
220         * options.c (gfc_handle_module_path_options): Fix buffer overrun.
222 2004-05-16  Paul Brook  <paul@codesourcery.com>
224         * arith.c (gfc_range_check): Fix logic error.
226 2004-05-16  Steve Kargl  <sgk@troutmask.apl.washington.edu>
228         * arith.c: Fix comment typos.
230 2004-05-15  Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
232         PR fortran/13742
233         * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
234         not initialized in a disallowed fashion.
235         * match.c (gfc_match_common): Likewise.
236         (var_element): Verify that variable is not in the blank COMMON,
237         if it is in a common. 
239 2004-05-15  Joseph S. Myers  <jsm@polyomino.org.uk>
241         * Make-lang.in (f95.generated-manpages): Remove.
242         (f95.srcextra): New.
243         (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
244         f95.maintainer-clean): Generate info and dvi files in objdir/doc.
245         (f95.dvi): Remove.
246         (dvi): New.
247         (f95.install-info): Remove.
248         (install-info): New.
250 2004-05-15  Victor Leikehman  <lei@haifasphere.co.il>
252         * decl.c (add_init_expr_to_sym): Check for variable size arrays.
254 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
256         * primary.c (match_boz_constant): Use gfc_notify_std() for
257         issuing a warning or an error.
259 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
261         PR fortran/13826
262         * primary.c (match_structure_constructor): Rename ...
263         (gfc_match_structure_constructor): ... to this. Make non-static.
264         (gfc_match_rvalue): Call renamed function.
265         * match.h (gfc_match_structure_constructor): Declare.
266         * match.c (gfc_match_data_constant): Handle structure
267         constructor.
269 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
271         PR fortran/13702 
272         (Port from g95)
273         * gfortran.h (gfc_linebuf): New typedef.
274         (linebuf): Remove.
275         (gfc_file): Revamped, use new gfc_linebuf.
276         (locus): Revamped, use new types.
277         (gfc_current_file): Remove.
278         (gfc_current_form, gfc_source_file): New global variables.
279         * match.c (gfc_match_space, gfc_match_strings): Use
280         gfc_current_form to find source form.
281         * module.c (gfc_dump_module): Use gfc_source_file when printing
282         module header.
283         * error.c (show_locus, show_loci) Use new data structures to print
284         locus.
285         * scanner.c (first_file, first_duplicated_file, gfc_current_file):
286         Remove.
287         (file_head, current_file, gfc_current_form, line_head, line_tail,
288         gfc_current_locus1, gfc_source_file): New global variables.
289         (gfc_scanner_init1): Set new global variables.
290         (gfc_scanner_done1): Free new data structures.
291         (gfc_current_locus): Return pointer to gfc_current_locus1.
292         (gfc_set_locus): Set gfc_current_locus1.
293         (gfc_at_eof): Set new variables.
294         (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
295         to new locus structure.
296         (gfc_check_include): Remove.
297         (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
298         (gfc_skip_comments): Use gfc_current_form, find locus with
299         gfc_current_locus1.
300         (gfc_next_char): Use gfc_current_form.
301         (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
302         (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
303         comment formatting.
304         (get_file): New function.
305         (preprocessor_line, include_line): New functions.
306         (load_file): Move down, rewrite to match new data structures.
307         (gfc_new_file): Rewrite to match new data structures.
308         * parse.c (next_statement): Remove code which is now useless. Use
309         gfc_source_form and gfc_source_file where appropriate.
310         * trans-decl.c (gfc_get_label_decl): adapt to new data structures
311         when determining locus of frontend code.
312         * trans-io.c (set_error_locus): Same.
313         * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
314         * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
315         preprocessor flags.
316         (all): Add missing initializers.
318 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
320         * Make-lang.in (trans-common.o): Remove redundant dependency.
321         (data.c): Replace object file name ...
322         (data.o): ... by the correct one.
324 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
326         * dump-parse-tree.c (gfc_show_array_ref): Print colon only
327         for ranges when dumping array references.
329 2004-05-14  Victor Leikehman  <lei@haifasphere.co.il>
331         * decl.c (variable_decl): Always apply default initializer.
333 2004-05-08  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
335         PR fortran/15206
336         * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
337         handle zero correctly.
339 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
341         * match.c (gfc_match): Eliminate dead code.
343 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
345         * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
346         Detect bad continuation line in fixed form sources.
348 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
350         PR fortran/15205
351         * iresolve.c (gfc_resolve_nearest): Add new function.
352         * intrinsic.h: ... declare it here.
353         * intrinsic.c (add_functions): ... add it as resolving function
354         for NEAREST.
355         
356 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
358         PR fortran/14066
359         * match.c (gfc_match_do): Allow infinite loops with
360         label-do-stmt. Do not enforce space after comma.
362 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
364         PR fortran/15051
365         * parse.c (parse_interface): Allow empty INTERFACE, remove
366         seen_body.
368 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
370         * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
371         decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
372         expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
373         intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
374         matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
375         primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
376         trans-array.c, trans-array.h, trans-common.c, trans-const.c,
377         trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
378         trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
379         trans-types.h, trans.c, trans.h: Update copyright years and
380         boilerplate.
381         * data.c: Likewise, also removed two whitespace-only lines.
382         * gfortranspec.c, lang.opt: Update copyright years.
384 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
386         PR fortran/14568
387         * trans-decl.c (generate_local_decl): Don't warn for unused
388         variables which are in common blocks. 
390 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
392         * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
393         trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
394         trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
396 2004-05-13  Victor Leikehman  <lei@haifasphere.co.il>
398         PR fortran/15314
399         * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
401 2004-05-13  Joseph S. Myers  <jsm@polyomino.org.uk>
403         * gfortran.texi: Use @table @emph instead of @itemize @emph.
404         Remove "set DEVELOPMENT".
405         (Compiling GFORTRAN): Remove.
407 2004-05-09  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
409         * array.c (match_subscript, match_array_ref): Add comments
410         explaining argument 'init'.
411         * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
412         trans-expr.c, trans.c: Fix some typos in comments.
413         * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
414         * primary.c (match_digits, match_integer_constant): Add comment
415         explaining signflag.
417 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
419         PR fortran/13940
420         * primary.c: Include system.h and flags.h, needed for pedantic.
421         (match_boz_constant): Allow "x" for hexadecimal constants, warn if
422         pedantic is set.
424 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
426         PR fortran/13940
427         * match.c (match_data_constant): Handle case where
428         gfc_find_symbol sets sym to NULL
430 2004-04-28  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
432         * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
433         dependency on mathbuiltins.def
435 2004-04-24  Victor Leikehman  <lei@il.ibm.com>
437         * trans-io.c (transfer_expr): Implemented recursive printing
438         of derived types.
440 2004-04-24  Andrew Pinski  <pinskia@physics.uc.edu>
442         * gfortranspec.c: Do not include multilib.h.
444 2004-04-24  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
446         * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
447         2004 to copyright years.
448         * trans-expr.c, trans-decl.c: Comment update, we now generate
449         GENERIC, not SIMPLE. Add 2004 to copyright years.
451 2004-04-24  Paul Brook  <paul@codesourcery.com>
453         * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
455 2004-04-24  Feng Wang  <fengwang@nudt.edu.cn>
457         PR 14817
458         * arith.c (gfc_arith_divide): Fix complex divide.
460 2004-04-23  Andrew Pinski  <pinskia@physics.uc.edu>
462         * gfortranspec.c: Include the target headers.
464 2004-04-18  Feng Wang  <fengwang@nudt.edu.cn>
466         PR fortran/14921
467         PR fortran/14540
468         * arith.c (arctangent2): New function.
469         * arith.h (arctangent2): Add function prototype.
470         * simplify.c (gfc_simplify_atan2): Use it.
471         (gfc_simplify_log): Use it.
473 2004-04-12  Diego Novillo  <dnovillo@redhat.com>
475         * fortran/f95-lang.c (gfc_expand_stmt): Remove.
476         (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
478 2004-04-11  Bud Davis  <bdavis9659@comcast.net>
480         PR fortran/14872
481         * trans-io.c (build_dt): Change REC to value.
483 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
485         PR 14394 
486         * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
487         the real value when converting mpf to string.
489 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
491         PR 14395
492         * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
493         the result.
495 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
497         PR fortran/14377
498         * simplify.c (simplify_min_max): Convert the type of the result.
500 2004-04-11  Paul Brook  <paul@codesourcery.com>
502         * gfortran.texi: Use full target triplet.
504 2004-04-11  Paul Brook  <paul@codesourcery.com>
506         * Make-lang.in (GFORTRAN_TEXI): Set it.
507         (fortran/dfortran.dvi): Use it.  Add fortran to include paths.
508         (fortran/gfortran.info): Ditto. 
509         * gfortran.texi: Major update.
510         * invoke.texi: New file.
512 2004-04-10  Paul Brook  <paul@codesourcery.com>
514         * trans-array.c (gfc_trans_allocate_temp_array,
515         gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
516         * trans-decl.c (gfc_build_dummy_array_decl,
517         gfc_get_symbol_decl, gfc_build_function_decl,
518         gfc_create_module_variable): Ditto.
519         * trans-expr.c (gfc_conv_variable): Ditto.
520         * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
521         * trans.h (GFC_DECL_STRING): Remove.
522         (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
523         GFC_DECL_ASSIGN): Renumber flags.
525 2004-04-05  Paul Brook  <paul@codesourcery.com>
527         PR 13252
528         PR 14081
529         * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
530         and stack_restore.
531         * gfortran.h (struct gfc_charlen): Add backend_decl.
532         * trans-array.c (gfc_trans_allocate_temp_array,
533         gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
534         (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
535         Remove old, broken string handling.
536         (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
537         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
538         gfc_trans_deferred_array): Handle character arrays.
539         * trans-const.c (gfc_conv_const_charlen): New function.
540         * trans-const.h (gfc_conv_const_charlen): Add prototype.
541         * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
542         as static.
543         (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
544         (gfc_create_string_length): New function.
545         (gfc_get_symbol_decl): Create lengths for character variables.
546         (gfc_get_fake_result_decl): Ditto.
547         (gfc_build_function_decl): Only set length for assumed length
548         character arguments.
549         (gfc_trans_dummy_character): New function.
550         (gfc_trans_auto_character_variable): Rewrite.
551         (gfc_trans_deferred_vars): Handle more types of character variable.
552         (gfc_create_module_variable): String lengths have moved.
553         (gfc_generate_function_code): Initialize deferred var chain earlier.
554         * trans-expr.c (gfc_conv_init_string_length): Rename ...
555         (gfc_trans_init_string_length):  ... to this.
556         (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
557         gfc_conv_function_call): Update to new format for character variables.
558         (gfc_conv_string_length): Remove.
559         (gfc_conv_string_parameter): Update assertion.
560         * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
561         * trans-io.c (set_string): Use new macro names.
562         * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
563         * trans-types.c (gfc_get_character_type): Use existing length expr.
564         (gfc_is_nodesc_array): Make public.
565         (gfc_get_dtype_cst): Rename ...
566         (gfc_get_dtype): ... to this.  Handle unknown size arrays.
567         (gfc_get_nodesc_array_type): Use new name.
568         (gfc_sym_type): New character variable code.
569         (gfc_get_derived_type): Ditto.
570         (gfc_get_function_type): Evaluate character variable lengths.
571         * trans-types.h (gfc_strlen_kind): Define.
572         (gfc_is_nodesc_array): Add prototype.
573         * trans.h: Update prototypes.
574         (struct lang_type): Update comments.
575         (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
576         (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
578 2004-04-04  Paul Brook  <paul@codesourcery.com>
580         * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
581         * options.c (gfc_init.options, gfc_handle_option): Ditto.
582         * trans-expr.c (gfc_conv_function_call): Ditto.
583         * trans-types.c (gfc_is_nodesc_array): Ditto
584         * lang.opt (fg77-calls): Remove.
586 2004-04-04  Paul Brook  <paul@codesourcery.com>
588         * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
589         (gfc_conv_descriptor_base): Rename ...
590         (gfc_conv_descriptor_offset): ... to this.
591         (gfc_trans_allocate_array_storage): Set offset to zero.
592         (gfc_conv_array_base): Rename ...
593         (gfc_conv_array_offset): ... to this.
594         (gfc_conv_array_index_ref): Add offset parameter.
595         (gfc_conv_array_ref): Include offset.
596         (gfc_trans_preloop_setup): Use existing offset.
597         (gfc_trans_allocate_temp_array,  gfc_array_allocate,
598         gfc_trans_auto_array_allocation, gfc_trans_g77_array,
599         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
600         gfc_conf_ss_descriptor): Set offset.
601         * trans-array.h: Rename prototypes.
602         * trans-const.h (gfc_index_zero_node): Define.
603         * trans-decl.c (gfc_build_qualified_array): Change base to offset.
604         * trans-types.c (gfc_get_array_type_bounds): Ditto.
605         (gfc_get_nodesc_array_type): Calculate offset before upper bound.
607 2004-03-25  Diego Novillo  <dnovillo@redhat.com>
609         * convert.c (convert): Don't handle WITH_RECORD_EXPR.
611 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
613         PR 14055
614         * arith.c (gfc_convert_integer,gfc_convert_real):  Removed leading '+'
615         before conversion by gmp library call.
617 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
619         PR 12921
620         * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
622 2004-02-24  Richard Henderson  <rth@redhat.com>
624         * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
626 2004-02-19  Loren J. Rittle  <ljrittle@acm.org>
628         * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
629         (fortran/gfortran.info): ... to here.
630         (f95.srcinfo): New.
632 2004-02-16  Richard Henderson  <rth@redhat.com>
634         * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
635         * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
636         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
637         (gfc_expand_function): Rename from expand_function_body, make static,
638         don't do anything except invoke tree_rest_of_compilation.
639         (gfc_be_parse_file): Invoke cgraph.
640         (gfc_expand_decl): Remove.
641         (gfc_init_builtin_functions): Add __builtin_init_trampoline and
642         __builtin_adjust_trampoline.
643         * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
644         (gfc_finalize): New.
645         (gfc_generate_function_code): Use it.  Lower nested functions.
646         * trans-expr.c (gfc_conv_function_call): Add static chain operand
647         to call_expr.
648         * trans.c (gfc_build_function_call): Likewise.
649         * trans.h (expand_function_body): Remove.
651 2004-02-15  Victor Leikehman  <lei@il.ibm.com>
653         PR gfortran/13433
654         * trans-decl.c (gfc_build_function_decl) For functions
655         returning CHARACTER pass an extra length argument,
656         following g77 calling conventions.
657         * trans-types.c (gfc_get_function_type) Ditto.
658         * trans-expr.c (gfc_conv_function_call) Ditto.
660 2004-02-14  Paul Brook  <paul@codesourcery.com>
662         * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
664 2004-02-12  Paul Brook  <paul@nowt.org>
666         * BUGS: Remove.
668 2004-02-08  Steve Kargl  <sgk@troutmask.apl.washington.edu>
670         * gfortran.texi: Fix typos.
672 2004-02-07  Bud Davis  <bdavis9659@comcast.net>
674         PR gfortran/13909
675         * intrinsic.c (add_conversions) Use logical conversion instead
676         of real.
677         * trans-types.c (gfc_get_logical_type) implemented logical*1
678         and logical*2.
680 2004-01-17  Paul Brook  <paul@codesourcery.com>
682         * lang-specs.h: Remove %<fixed-form.
684 2004-01-15  Toon Moene  <toon@moene.indiv.nluug.nl>
686         * lang-specs.h: Enable preprocessing of source files
687         ending in .F, .fpp, .FPP, .F90 and .F95.
689 2004-01-13  Toon Moene  <toon@moene.indiv.nluug.nl>
691         PR fortran/12912
692         * lang-specs.h: Enable compilation of files ending
693         in .f, .for and .FOR.
695 2004-01-11  Paul Brook  <paul@codesourcery.com>
697         * trans-stmt.c (gfc_trans_if_1): New function.
698         (gfc_trans_if): Use it.
700 2004-01-11  Erik Schnetter  <schnetter@uni-tuebingen.de>
702         * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
703         (gfc_option_t): Add max_identifier_length.
704         * lang.opt: Add fmax-identifier-length.
705         * match.c (parse_name): Use limit.
706         * options.c (gfc_init_options): Set max_identifier_length.
707         (gfc_handle_option): Ditto.
709 2004-01-11  Feng Wang  <fengwang@nudt.edu.cn>
711         * intrinsic.c (add_functions): Add resolve function to dcmplx.
712         * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
713         * iresolve.c (gfc_resolve_dcmplx): New function.
715 2004-01-10  Paul Brook  <paul@codesourcery.com>
717         * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
718         * trans-types.c (gfc_sym_type): Handle external dummy procedures.
719         (gfc_return_by_reference): Correct condition.
720         (gfc_get_function_type): Ditto.
722 2004-01-10  Paul Brook  <paul@codesourcery.com>
724         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
725         types.
727 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
729         * iresolve.c: Use correct kind.
731 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
733         PR fortran/13467
734         * trans-decl.c (gfc_create_module_variable):  Output array valued
735         parameters.
737 2004-01-10  Paul Brook  <paul@codesourcery.com>
739         * resolve.c (resolve_branch): Get error message right way round.
741 2004-01-10  Canqun Yang <canqun@nudt.edu.cn>
743         * trans-array (gfc_conv_loop_setup): Adjust comment to track
744         reality.
745         (gfc_array_allocate): Don't count size of element twice.
747 2004-01-04  Paul Brook  <paul@codesourcery.com>
749         * lang.opt (i8, r8, std=*): Remove RejectNegative.
751 2004-01-04  Paul Brook  <paul@codesourcery.com>
753         * error.c (gfc_notify_std): New function.
754         * gfortran.h (gfc_notify_std): Declare.
755         (GFC_STD_*): Define.
756         (gfc_option_t): Add warn_std and allow_std.
757         * intrinsic.c (gfc_init_expr_extensions): Fix logic.
758         (gfc_intrinsic_func_interface): Use gfc_notify_std.
759         * check.c (check_rest): Use gfc_notify_std.
760         * match.c (gfc_match_pause): Ditto.
761         (gfc_match_assign): Ditto.
762         (gfc_match_goto): Ditto.
763         * resolve.c (resolve_branch): Ditto.
764         * lang.opt: Add std=<foo> and w.
765         * options.c (gfc_init_options): Set allow_std and warn_std.
766         (gfc_handle_option): Handle OPT_std_* and OPT_w.
768 2004-01-01  Paul Brook  <paul@codesourcery.com>
770         * array.c (gfc_append_constructor): Take constructor, not expression.
771         * data.c (struct gfc_expr_stack): Remove.
772         (expr_stack): Remove.
773         (find_con_by_offset): Rename from find_expr_in_con.
774         (find_con_by_component): Rename from find_component_in_con.
775         (gfc_get_expr_stack): Remove.
776         (gfc_assign_data_value): Rewrite.
777         (gfc_expr_push): Remove.
778         (gfc_expr_pop): Remove.
779         (gfc_advance_section): Rename from
780         gfc_modify_index_and_calculate_offset.  Handle unbounded sections.
781         (gfc_get_section_index): Handle unbounded sections.
782         * gfortran.h: Update prototypes.
783         * resolve.c (check_data_variable): Array section maight not be the
784         last ref.
786 2004-01-01  Paul Brook  <paul@codesourcery.com>
788         PR fortran/13432
789         * resolve.c (resolve_symbol): Allow assumed length function results.
791 2004-01-01  Steve Kargl  <sgk@troutmask.apl.washington.edu>
793         * match.c (gfc_match_pause): Fix spelling.
795 2004-01-01  Steven Bosscher  <stevenb@suse.de>
797         PR fortran/13251
798         * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
799         reference from the expression.
801 2003-12-26  Feng Wang  <fengwang@nudt.edu.cn>
803         * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
804         dumping.
805         * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
806         (gfc_exec_op): New EXEC_LABEL_ASSIGN.
807         (symbol_attribute):New variable attribute: assign.
808         * io.c (resolve_tag):Integer variable is allowed.
809         (match_dt_format): Add ASSIGN statement. Set assign flag.
810         * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
811         (gfc_match_assign): Add ASSIGN statement. Set assign flag.
812         (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
813         * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
814         (next_statement): Add ST_LABEL_ASSIGNMENT.
815         (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
816         * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
817         (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
818         * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
819         * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
820         assign.  Put them into the stuct lang_decl.
821         * trans-io.c (set_string): Add the assign statement.
822         * trans-stmt.c (gfc_trans_label_assign): New function.
823         (gfc_trans_goto): Translate ASSIGNED GOTO statement.
824         * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
825         * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
826         * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
827         (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
828         (GFC_DECL_ASSIGN(node)): New macro to access flag.
830 2003-12-31  Huang Chun <chunhuang73@hotmail.com>
832         PR fortran/13434
833         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in 
834         minval/maxval.
836 2003-12-22  Toon Moene  <toon@moene.indiv.nluug.nl>
838         * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
839         that arguments to subroutines/functions can't alias themselves, nor global
840         memory.
842 2003-12-20  Steven Bosscher  <stevenb@suse.de>
844         * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
845         * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
847 2003-12-12  Huang Chun <chunhuang73@hotmail.com>
849         * primary.c (match_substring): Fix substring bug for start point
850         or end point is NULL.
851         * trans-expr.c (gfc_conv_substring): Ditto
852         * trans-types.c (gfc_sym_type): Get correct type of scalar 
853         character variables.
854         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in 
855         derived type.
857 2003-12-10  Richard Henderson  <rth@redhat.com>
859         * options.c (gfc_post_options): Don't ever use rtl inlining.
861 2003-12-05  Canqun Yang  <canqun@nudt.edu.cn>
863         * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
864         * trans-equivalence.c: Remove.
865         * trans-decl.c (gfc_get_symbol_decl): Update to match.
866         (gfc_generate_function_code): Ditto.
867         * trans-array.c (gfc_conv_array_parameter): Ditto.
868         * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
869         (F95_ADDITIONAL_OBJS): Add stor-layout.o
870         * trans.h (gfc_trans_equivalence): Remove.
871         * gfortran.h (struct gfc_equiv): Add used field.
872         (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
873         equiv_offset fields.
875 2003-12-05  Richard Henderson  <rth@redhat.com>
877         * trans.c (gfc_build_addr_expr): New.
878         (gfc_build_indirect_ref, gfc_build_array_ref): New.
879         * trans.h: Declare them.
880         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
881         trans-stmt.c, trans.c (*): Use them.
883         * f95-lang.c (gfc_post_options): Remove dead prototype.
884         * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
885         * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
886         allocation size.
888 2003-12-01  Feng Wang  <fengwang@nudt.edu.cn>
890         * io.c (gfc_match_format): Check for missing format label.
892 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
894         PR fortran/13155
895         * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
896         from interfaces in modules.
898 2003-11-30  Paul Brook  <paul@nowt.org>
900         * trans-array.c (gfc_trans_g77_array): Make non-static.
901         (gfc_trans_assumed_size): Remove.
902         (gfc_trans_dummy_array_bias): Explicitly free temporary.
903         * trans-array.h (gfc_trans_g77_array): Add prototype.
904         (gfc_trans_assumed_size): Remove.
905         * trans-decls.c (gfor_fndecl_push_context): Remove.
906         (gfor_fndecl_pop_context): Remove.
907         (gfc_build_function)decls): Don't create them.
908         (gfc_trans_deferred_vars): Update to match. Remove dead code.
909         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
911 2003-11-30  Kejia Zhao  <kejia_zh@nudt.edu.cn>
913         * trans-array.c (gfc_conv_array_parameter): Simplify
914         array argument passing for array name actual argument.
915         * trans-expr.c (gfc_conv_function_call): Ditto
916         * trans-types.c (gfc_is_nodesc_array):Ditto.
918 2003-11-30  Paul Brook  <paul@nowt.org>
920         * f95-lang.c (gfc_post_options): Move ...
921         * options.c (gfc_post_options): .. to here.  Handle inlining options.
922         * gfortran.h (gfc_post_options): Add prototype.
924 2003-11-28  Richard Henderson  <rth@redhat.com>
926         * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
928 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
930         * trans.h (has_alternate_specifier): New global variable.
931         * match.c (gfc_match_call): Handle actual arguments associated with
932         alternate return indicators.
933         * trans-expr.c (gfc_conv_function_call): Ditto
934         * trans-stmt.c (gfc_trans_call): Ditto
935         (gfc_trans_return): Handle return statement with value.
936         * trans-decl.c (gfc_generate_function_code): Handle functions with
937         asterisk dummy.
938         (gfc_get_fake_result_decl): Ditto
939         * trans-types.c (gfc_get_function_type): Ditto
940         * resolve.c (resolve_actual_arglist): Check alternate return indicators.
941         (resolve_formal_arglist): Check asterisk dummy.
943 2003-11-27  Paul Brook  <paul@nowt.org>
945         * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
946         allocation interface.
947         (gfc_conv_ array_parameter): Ditto.
948         (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
949         * trans-array.c: Update prototype.
950         * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
951         (gfc_trans_auto_character_variable): Use new memory alloc interface.
952         * trans-expr.c (gfc_conv_string_tmp): Ditto.
953         (gfc_conv_function_call): Use gfc_conv_string_tmp.
954         * trans-stmt.c (gfc_do_allocate):  Use new memory alloc interface.
955         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
956         * trans.h (gfc_ss_info): Remove unused pdata field.
957         * trans.c (gfc_create_var_np): Change T to V.
959 2003-11-26  Richard Henderson  <rth@redhat.com>
961         * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
962         * trans-intrinsic.c (gfc_intrinsic_map): ... here.  Add SCALE,
963         FRACTION, NEAREST, SET_EXPONENT.
964         (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
965         Fix GTY marking.  Remove unnecessary const's.
966         (LIBM_FUNCTION): Rename from I_LIB.
967         (LIBF_FUNCTION): New.
968         (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
969         conventions.  Assume the expr signature is correct.  Mark const.
970         (gfc_conv_intrinsic_exponent): Use library functions.
971         (gfc_conv_intrinsic_set_exponent): Remove.
972         (gfc_conv_intrinsic_scale): Remove.
973         (gfc_conv_intrinsic_nearest): Remove.
974         (gfc_conv_intrinsic_fraction): Remove.
975         (gfc_conv_intrinsic_function): Update.
976         * trans-decl.c (gfor_fndecl_math_exponent4): New.
977         (gfor_fndecl_math_exponent8): New.
978         (gfc_build_intrinsic_function_decls): Set them.
979         * trans.h: Declare them.
981 2003-11-25  Canqun Yang  <canqun@nudt.edu.cn>
983         * trans-common.c (gfc_layout_global_equiv): Locate the error for
984         underflow COMMON block.
985         (gfc_trans_one_common): Fix bug for size of COMMON block containing
986         EQUIVALENCE object. Also fix typo in an error message.
988 2003-11-25  Diego Novillo  <dnovillo@redhat.com>
990         * Make-lang.in: Add check-gfortran to lang_checks.
991         (check-f95): Alias for check-gfortran.
993 2003-11-25  Jason Merrill  <jason@redhat.com>
995         * Make-lang.in (f95.tags): Create TAGS.sub files in each
996         directory and TAGS files that include them for each front end.
998 2003-11-24  Paul Brook  <paul@nowt.org>
1000         PR fortran/13154
1001         * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
1003 2003-11-24  Paul Brook  <paul@nowt.org>
1005         * expr.c (simplify_const_ref): Return SUCCESS for things we don't
1006         handle.
1007         * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
1009 2003-11-24  Paul Brook  <paul@nowt.org>
1011         PR fortran/13105
1012         * array.c (gfc_array_ref_shape): Handle elemental dimensions.
1013         * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
1015 2003-11-20  Richard Henderson  <rth@redhat.com>
1017         * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
1018         (gfc_conv_array_base): Likewise.
1019         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1020         * trans-expr.c (gfc_conv_string_tmp): Likewise.
1021         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
1022         * trans-stmt.c (gfc_trans_character_select): Likewise.
1024 2003-11-13  Paul Brook  <paul@nowt.org>
1026         * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
1028 2003-11-13  Canqun Yang  <canqun@nudt.edu.cn>
1030         * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
1031         (resolve_equivalence): New function.
1032         (resolve_equivalence_derived): New function.
1034 2003-11-12  Richard Henderson  <rth@redhat.com>
1036         * trans.c (gfc_trans_code): Use annotate_with_locus instead of
1037         annotate_all_with_locus.
1039 2003-11-11  Canqun Yang  <canqun@nudt.edu.cn>
1041         * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
1042         * trans-decl.c (gfc_finish_var_decl): Modified.
1044 2003-11-08  Paul Brook  <paul@nowt.org>
1046         PR fortran/12704
1047         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
1048         arrays.
1050 2003-11-06  Paul Brook  <paul@nowt.org>
1052         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
1054 2003-11-02  Canqun Yang  <canqun@nudt.edu.cn>
1056         * match.c (gfc_match_stopcode): Assign '0' to stop_code.
1058 2003-10-27  Anthony Green  <green@redhat.com>
1060         * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
1061         (f95.stagefeedback): Ditto.
1063 2003-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
1065         PR fortran/12682
1066         * Make-lang.in (f95.stageprofile): Add.
1067         (f95.stagefeedback): Add.
1069 2003-10-23  Richard Henderson  <rth@redhat.com>
1071         * f96-lang.c (gfc_gimplify_expr): Remove.
1072         (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
1073         (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
1075 2003-10-23  Richard Henderson  <rth@redhat.com>
1077         * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
1079 2003-10-20  Paul Brook  <paul@nowt.org>
1081         * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
1082         * trans-stmt.c (gfc_trans_do_while): Ditto.
1084 2003-10-17  Paul Brook  <paul@nowt.org>
1086         * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
1088 2003-10-17  Paul Brook  <paul@nowt.org>
1090         * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
1092 2003-10-17  Feng Wang  <wf_cs@yahoo.com>
1094         * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
1095         (gfc_resolve_minloc): Ditto.
1096         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
1097         Return the value after subtracting the lower bound.
1099 2003-10-16  Richard Henderson  <rth@redhat.com>
1101         * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
1103 2003-10-16  Steven Bosscher  <steven@gcc.gnu.org>
1105         * lang.c: Remove -M option for now, it's in the way for C.
1107 2003-10-14  Jason Merrill  <jason@redhat.com>
1109         * Make-lang.in (f95.tags): New rule.
1111 2003-10-13  Richard Henderson  <rth@redhat.com>
1113         * trans.c (gfc_trans_code): Use annotate_all_with_locus.
1115 2003-10-13  Paul Brook  <paul@nowt.org>
1117         * trans-decl.c (generate_local_decl): Don't create junk variables.
1119 2003-10-13  Paul Brook  <paul@nowt.org>
1121         * resolve.c (resolve_formal_arglist): Use function result decl in
1122         preference to function decl.
1124 2003-10-12  Richard Henderson  <rth@redhat.com>
1126         * f95-lang.c (gfc_define_builtin): New const_p argument.  Set
1127         TREE_READONLY.  Update all callers.
1129 2003-10-12  Feng Wang  <wf_cs@yahoo.com>
1131         * iresolve.c (gfc_resolve_cshift): Change to match implementation.
1132         * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
1133         (gfc_is_intrinsic_libcall): Add CSHIFT.
1135 2003-10-12  Richard Henderson  <rth@redhat.com>
1137         * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
1138         (gfc_trans_array_constructor_value): Likewise.
1139         (gfc_conv_array_initializer): Likewise.
1140         * trans-stmt.c (gfc_trans_character_select): Likewise.
1142 2003-11-12  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1144         * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
1146 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
1148         * check.c (gfc_check_repeat): Check arguments are scalar.
1149         (gfc_check_trim): New function.
1150         * intrinsic.h (gfc_check_trim): Add prototype.
1151         * intrinsic.c (add_functions): Use it.
1152         * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
1153         Decalare.
1154         * trans-decl.c: Ditto.
1155         (gfc_build_intrinsic_fucntion_decls): Set them.
1156         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
1157         (gfc_conv_intrinsic_trim): New function.
1158         (gfc_conv_intrinsic_repeat): New function.
1159         (gfc_conv_intrinsic_function): Use them.
1161 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
1163         * trans-types.c (gfc_sym_type): Handle result variables.
1165 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
1167         * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
1168         gfc_get_character_type.
1170 2003-10-11  Feng Wang  <wf_cs@yahoo.com>
1172         * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
1174 2003-10-11  Paul Brook  <paul@nowt.org>
1176         * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
1177         (gfc_resolve_dprod): New function.
1178         (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
1179         * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
1180         (gfc_resolve_dprod): Declare.
1181         * intrinsic.c (add_functions): Use them.
1182         * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
1184 2003-10-06  Richard Henderson  <rth@redhat.com>
1186         * f95-lang.c (gfc_init_builtin_functions): Add clzll.
1187         * trans-intrinsic.c (call_builtin_clz): Use it.
1189 2003-10-05  Paul Brook  <paul@nowt.org>
1191         * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
1192         * trans-decl.c (gfc_generate_function_code): Set
1193         cfun->function_end_locus.
1195 2003-09-24  Jason Merrill  <jason@redhat.com>
1197         * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
1198         TREE_LOCUS.
1200 2003-09-21  Lifang Zeng  <zlf605@hotmail.com>
1201         Paul Brook  <paul@nowt.org>
1203         * Make-lang.in (F95_OBJS): Add fortran/data.o.
1204         * array.c (gfc_inser_constructor): New function.
1205         (gfc_get_constructor): New function.
1206         (gfc_free_constructor): Initialize offset and repeat.
1207         (iterator_stack): Remove.
1208         (expand_info): Add offset, component and repeat fields.
1209         (expand_constructor): Set them.
1210         (expand): Set new fields.
1211         (gfc_copy_constructor): Ditto. Avoid recursion.
1212         * gfortran.h: Add prototypes for new functions.
1213         (gfc_constructor): Add offset, component and repeat.
1214         (iteratio_stack): Move to here.
1215         * resolve.c (check_data_variable): Convert data values into variable
1216         initializers.
1217         (traverse_data_list): Build implicit loop chain.
1218         (gfc_resolve): Ditto.
1219         * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
1220         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
1221         * trans-expr.c (gfc_conv_structure): Handle array initializers.
1222         (gfc_conv_expr): Update to match.
1223         * trans.h (gfc_conv_structure): Declare.
1224         * data.c: New file.
1226 2003-09-20  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1228         * trans.h: Add declarations for gfor_fndecl_si_kind and
1229         gfor_fndecl_sr_kind.
1230         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1231         * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
1232         (g95_conv_intrinsic_sr_kind): New function.
1233         (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
1234         SELECTED_REAL_KIND.
1236 2003-09-17  Lars Segerlund  <Lars.Segerlund@comsys.se>
1238         * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
1239         instead of _4 and _8 as postfix for libgfortran calls.
1241 2003-09-16  Paul Brook  <paul@nowt.org>
1243         * array.c (compare_bounds): New function.
1244         (gfc_compare_array_spec): Use it.
1246 2003-09-14  Paul Brook  <paul@nowt.org>
1248         * primary.c (gfc_match_rvalue): Make sure sym->result is set.
1249         * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
1251 2003-09-14  Paul Brook  <paul@nowt.org>
1253         * check.c (dim_rank_check): Allow assumed bounds if requested.
1254         (gfc_check_lbound): Call it.
1255         (gfc_check_ubound): Ditto.
1256         (gfc_check_size): Change to match.
1257         * simplify.c (gfc_simplify_bound): New function.
1258         (gfc_simplify_lbound): New function.
1259         (gfc_simplify_ubound): New function.
1260         * intrinsic.h: Declare them.
1261         * intrinsic.c (add_functions): Use them.
1263 2003-09-14  Paul Brook  <paul@nowt.org>
1265         * io.c (format_lex): Initialize negative_flag.
1266         (check_format): Intialize repeat.
1267         * trans-io.c (gfc_new_nml_name_expr): Declare static.
1268         (gfc_new_var_expr): Ditto.
1270 2003-09-14  Paul Brook  <paul@nowt.org>
1272         * trans-array.c (gfc_conv_array_initializer): Handle derived types.
1273         * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
1275 2003-09-12  Paul Brook  <paul@nowt.org>
1277         * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
1279 2003-09-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
1281         * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
1282         for a correct expression.
1284 2003-09-10  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1286         * trans-intrinsic.c (real_compnt_info): New struct.
1287         (prepare_arg_info): New function.
1288         (gfc_conv_intrinsic_set_exponent): New function.
1289         (gfc_conv_intrinsic_scale): New function.
1290         (gfc_conv_intrinsic_nearest): New function.
1291         (gfc_conv_intrinsic_fraction): New function.
1292         (gfc_conv_intrinsic_exponent): New function.
1293         (gfc_conv_intrinsic_spacing): New function.
1294         (gfc_conv_intrinsic_rrspacing): New function.
1295         (gfc_conv_intrinsic_function): Use them.
1297 2003-08-24 XiaoQiang Zhang  (zhangapache@yahoo.com>
1299         * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for 
1300         build_int_2 changed from (high, low) to (low, high).
1301         * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
1302         ioparm_namelist_read_mode, iocall_set_nml_val_int,
1303         iocall_set_nml_val_float, iocall_set_nml_val_char,
1304         iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
1305         (gfc_build_io_library_fndecls): Add variable initialization.
1306         (gfc_new_nml_name_expr, get_new_var_expr): New function.
1307         (build_dt): Add namelist support.
1308         * io.c (value): New variable.
1309         (check_format): Support FMT_H now.
1311 2003-09-07  Paul Brook  <paul@nowt.org>
1313         * io.c (gfc_resolve_dt): Error if format label is not defined.
1315 2003-09-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1317         * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is 
1318         about case_switch's break. The other is about building the condition 
1319         statement tree, which judges the argument in the range of the 
1320         corresponding integer type.
1321         * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
1322         for the large values.
1324 2003-09-05  Paul Brook  <paul@nowt.org>
1326         * f95-lang.c (expand_function_body): Gimplify the function.
1328 2003-09-04  Jeff Law  <law@redhat.com>
1330         * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
1331         index zero!
1333 2003-09-04  Paul Brook  <paul@nowt.org>
1335         * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
1336         (gfc_expand_stmt): New function.
1337         (LANG_HOOKS_RTL_EXPAND_STMT): Define.
1338         (expand_function_body): Use tree_rest_of_compilation.
1339         * trans-decl.c (gfc_generate_function_code): Don't free cfun.
1341 2003-09-03  Jeff Law  <law@redhat.com>
1343         * f95-lang.c (gfc_init_builtin_functions): C arrays start at
1344         index zero!
1346 2003-08-30  Paul Brook  <paul@nowt.org>
1348         * f95-lang.c (builtin_function): Remove #if 0 code.
1349         (gfc_define_builtin): New function.
1350         (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
1351         * mathbuiltins.def: New file.
1352         * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
1353         (gfc_intrinsic_map): Use mathbuiltins.def.
1354         (gfc_intrinsic_builtin_t): Remove.
1355         (gfc_build_intrinsic_lib_fndecls): Update.
1356         * trans-types.c (gfc_init_types): Remove redundant initilaization of
1357         signed_size_type_node.
1359 2003-08-29  Paul Brook  <paul@nowt.org>
1361         * arith.c (gfc_real_kinds): Use correct minimum exponents.
1363 2003-08-22  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1365         * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
1366         (gfc_conv_intrinsic_function): Add MODULO.
1368 2003-08-22  Jason Merrill  <jason@redhat.com>
1370         * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
1372 2003-08-22  Andreas Jaeger  <aj@suse.de>
1374         * Make-lang.in (f95.install-common): Add DESTDIR support.
1375         * (f95.install-info): Likewise.
1376         (f95.uninstall): Likewise.
1378 2003-08-19  Diego Novillo  <dnovillo@redhat.com>
1380         * trans-types.c (gfc_init_types): Initialize
1381         signed_size_type_node with size_type_node.
1383 2003-08-18  Paul Brook  <paul@nowt.org>
1385         * dependency.c (gfc_dependency): New enum.
1386         (check_another_array_ref): Remove.
1387         (gfc_get_array_from_component): Remove.
1388         (get_x): Remove.
1389         (get_range): Remove.
1390         (get_no_of_elements): Use mpz_t, not mpf_t.
1391         (transform_sections): New function.
1392         (gfc_check_range_range): Rename ...
1393         (gfc_check_section_vs_section): ... to this.  Use new function.
1394         (gfc_is_inside_range): Rewrite to match.
1395         (gfc_check_element_vs_section): Ditto.
1396         (gfc_check_element_vs_element): Ditto.
1397         (get_deps): Ditto.
1398         (gfc_dep_resolver): Ditto.  Remove unused parameter.
1399         * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
1400         gfc_check_element_vs_element, gfc_is_inside_range,
1401         gfc_get_array_from_component): Remove prototypes for static functions.
1402         (gfc_dep_resolver): Update prototype.
1403         * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
1405 2003-08-15  Paul Brook  <paul@nowt.org>
1407         * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
1408         return values to parent scope.
1409         (gfc_build_dummy_array_decl): Ditto.
1411 2003-08-14  Paul Brook  <paul@nowt.org>
1413         * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
1414         size of the type, not the pointer.
1415         * resolve.c (resolve_symbol): Give more accurate error message.
1417 2003-08-10  Paul Brook  <paul@nowt.org>
1419         * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
1421 2003-08-10  Paul Brook  <paul@nowt.org>
1423         * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
1424         type components.
1426 2003-08-10  Chun Huang  <compiler@sohu.com>
1428         * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
1429         (resolve_symbol): Ditto.
1430         * trans-expr.c (gfc_conv_statement_function): New function.
1431         (gfc_conv_function_expr): Use it.
1433 2003-08-10  Paul Brook  <paul@nowt.org>
1435         * trans-array.c (gfc_conv_ss_startstride): Handle functions.
1436         (walk_function_expr): Set section rank.
1437         * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
1439 2003-08-10  Paul Brook  <paul@nowt.org>
1441         * intrinsic.c (add_sym): Prefix names with correct string.
1442         (add_sym_0s): New function.
1443         (add_subroutines): Register abort.
1445 2003-08-10  Erik Schnetter  <schnetter@uni-tuebingen.de>
1447         * gfortran.h: Introduce options to control the mangling.
1448         * lang.opt: Likewise.
1449         * options.c (gfc_init_options): Handle the options.
1450         * trans-common.c (gfc_sym_mangled_common_id): New function.
1451         (gfc_build_common_decl): Call it.
1452         * trans-decl.c (gfc_sym_mangled_function_id): New function.
1453         (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
1455 2003-08-09  Paul Brook  <paul@nowt.org>
1457         * module.c (mio_symbol): Always ouput a namespace for formal args.
1458         (load_needed): Namespace now belong to their proper symbol.
1459         (gfc_dump_module): Change G95=>GFORTRAN.
1461 2003-08-05  Paul Brook  <paul@nowt.org>
1463         * options.c: Force -fg77-calls.
1465 2003-08-02  Paul Brook  <paul@nowt.org>
1467         * Makelang.in: Rename G95_* to GFORTRAN_*.
1468         * All sources: Rename G95_* to GFC_*.
1470 2003-08-01  Paul Brook  <paul@nowt.org>
1472         * fortran/Make-lang.in: Use GMPLIBS.
1473         * fortran/config-lang.in: Set need_gmp.
1474         * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
1476 2003-07-27  Andreas Jaeger  <aj@suse.de>
1478         * trans-decl.c (gfc_generate_constructors): Convert prototype to
1479         ISO C90.
1480         * trans-const.c (gfc_init_constants): Likewise.
1481         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
1483         * gfortranspec.c: Convert to ISO C90.
1484         (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
1486 2003-07-26  Paul Brook  <paul@nowt.org>
1488         * lang.opt: Add -fdump-parse-tree.
1489         * options.c (gfc_handle_option): Ditto.
1490         * resolve.c (resolve_forall_iterators): Convert to proper type.
1491         * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
1493 2003-07-26  Paul Brook  <paul@nowt.org>
1495         * Makefile.in: Add build dependencies on files common with rest of gcc.
1497 2003-07-26  Lifang Zeng  <zlf605@hotmail.com>
1499         * trans.h: Declare g95_trans_pointer_assignment.
1500         * trans-expr.c (g95_trans_pointer_assignment): New function.
1501         (g95_trans_pointer_assign): Use it.
1502         * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
1503         (g95_trans_pointer_assign_need_temp): New function.
1505 2003-07-26  Paul Brook  <paul@nowt.org>
1507         * gfortran.texi: Replace references to g95.
1509 2003-07-26  Paul Brook  <paul@nowt.org>
1511         Rename g95_* to gfc_*.
1513 2003-07-25  Paul Brook  <paul@nowt.org>
1514         
1515         * gfortran.h: Rename from g95.h.
1516         * trans-types.c (boolean_type_node, booelan_true_node,
1517         boolean_false_node): Remove.
1518         * trans-types.h: Ditto.
1520 2003-07-25  Chun Huang  <compiler@sohu.com>
1522         * parse.c (accept_statement): Implement BLOCK DATA statement.
1523         * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
1524         variables.
1526 2003-07-24  Lifang Zeng  <zlf605@hotmail.com>
1528         * trans-stmt.c (temporary_list): Define.
1529         (g95_trans_assign_need_temp): New function.
1530         (g95_trans_forall_1): Modified for WHERE.
1531         (g95_trans_where_assign): Modified.
1532         (g95_trans_where_2): Modified.
1533         (g95_evaluate_where_mask): Modified.
1534         (g95_trans_where): Modified.
1535         (g95_get_temp_expr): Removed.
1536         (g95_add_to_where_stmt_list): Removed.
1537         (compute_overall_iter_number): Modified for WHERE.
1538         * trans.h: Remove where_stmt_list.
1540 2003-07-24  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1542         * lang.opt: Correct description of options -J and -M.
1544 2003-07-23  Steven Bosscher   <steven@gcc.gnu.org>
1546         * lang.opt: Move help text to here.
1547         * lang-options.h: Remove.
1549 2003-07-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1550         * iresolve.c (g95_resolve_transpose): Proper variable in switch.
1551         * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
1552         on kind.
1554 2003-07-22  Steven Bosscher  <steven@gcc.gnu.org>
1555         Paul Brook  <paul@nowt.org>
1557         * check.c (check_rest): Use global pedantic flag.
1558         * io.c (data_desc): Ditto.
1559         * error.c (g95_warning, g95_warning_now): Use global flag.
1560         * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
1561         (expand_function_body): Update to new prototypes.
1562         (g95_init): Use new option names.
1563         * g95.h (g95_option_t): Standardize names.
1564         (g95_init_options, g95_handle_option): Update prototypes.
1565         * interface.c: Use new option names.
1566         * match.c: Ditto.
1567         * module.c: Ditto.
1568         * parse.c: Ditto.
1569         * primary.c: Ditto.
1570         * resolve.c: Ditto.
1571         * scanner.c: Ditto.
1572         * simplify.c: Ditto.
1573         * symbol.c: Ditto.
1574         * trans-array.c: Ditto.
1575         * trans-expr.c: Ditto.
1576         * trans-types.c: Ditto.
1577         * trans-decl.c: Ditto.
1578         (g95_build_library_function_decl): Remove obsolete VPARAMS.
1579         * trans.h: Ditto.
1580         * options.c (g95_display_help): Remove.
1581         (g95_init_options): Convert to new scheme.
1582         (set_Wall): Ditto
1583         (g95module_option): Ditto, rename from g95_parse_arg.
1584         (g95_handle_module_path_options): New function.
1585         * trans-equivalence.c: Fix error message.
1586         * lang.opt: Corrections.
1588 2003-07-21  Steven Bosscher  <steven@gcc.gnu.org>
1590         * lang.opt: New file.
1592 2003-07-21  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1594         * decl.c (match_attr_spec): Set colon_seen.
1596 2003-07-14  Paul Brook  <paul@nowt.org>
1598         * trans-array.c: Update comment.
1599         (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
1600         * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
1601         minmaxloc,minmaxval): Ditto.
1602         * trans-io.c (g95_trans_transfer): Ditto.
1603         * trans-stmt.c: Remove unneeded prototypes.
1604         (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
1605         (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
1606         (compute_inner_temp_size): Remove bits of dead code. Add comments.
1607         Don't share loopinfo.
1608         (compute_overall_iter_number): Declare as static.
1609         (allocate_temp_for_forall_nest): Ditto.
1610         (g95_trans_forall_1): Don't pass shared loopinfo.
1611         * trans.c (g95_start_block): Expand comment.
1613 2003-07-12  Paul Brook  <paul@nowt.org>
1615         * arith.c (g95_index_integer_kind): Remove unused initializer.
1616         * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
1617         index by size of element.
1618         (generate_loop_for_rhs_to_temp): Ditto.
1619         (allocate_temp_for_forall_nest): Use element size, not index size.
1621 2003-07-11  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1623         * arith.c (g95_index_integer_kind): Add a TODO.
1624         * simplify.c (g95_simplify_nearest): Add a TODO.
1626 2003-07-09  Chun Huang  <compiler@sohu.com>
1628         * trans.h: Add declarations for gfor_fndecl_string_scan and
1629         gfor_fndecl_string_verify.
1630         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1631         * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
1632         (g95_conv_intrinsic_verify): New function.
1633         (g95_conv_intrinsic_function): Add SCAN and VERIFY.
1634         * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
1635         of parameter 'BACK=.TRUE.'
1637 2003-07-05  Lifang Zeng  <zlf605@hotmail.com>
1639         * trans-stmt.c (iter_info, forall_info): Define.
1640         (g95_trans_forall_block): Remove.
1641         (g95_trans_forall_loop): Use forall info blocks.
1642         (g95_trans_nested_forall_loop): New function.
1643         (g95_do_allocate): Handle things other than logical masks.
1644         (generate_loop_for_temp_to_lhs): New function.
1645         (generate_loop_for_rsh_to_temp): New function.
1646         (compute_inner_temp_size): New function.
1647         (compute_overall_iter_number): New function.
1648         (allocate_temp_for_forall_nest): New function.
1649         (g95_trans_forall): Move body ...
1650         (g95_trans_forall_1): ... to here.  Handle loops with temporaries.
1652 2003-07-02  Paul Brook  <paul@nowt.org>
1654         * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
1655         in correct scope.  Change callers to match.
1656         * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
1657         * iresolve.c (g95_resolve_reshape): Only use constant shapes.
1659 2003-07-02  Paul Brook  <paul@nowt.org>
1661         * trans-array.c (g95_conv_loop_setup): Remove dead var.  Use
1662         expression shape for all expressions.
1663         * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
1665 2003-07-03  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1667         * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
1668         g95_parse_arg), intrinsic.c (g95_convert_type): support of
1669         -Wconversion.
1670         * intrinsic.c, g95.h: Add g95_convert_type_warn,
1671         * resolve.c (g95_resolve_index): Call it.
1673 2003-07-02  Paul Brook  <paul@nowt.org>
1675         * iresolve.c (g95_resolve_reshape): Set expression shape.
1676         (g95_resolve_shape): Ditto.
1677         * simplify.c (g95_simplify_shape): Move common code outside condition.
1678         * trans-array.c (g95_conv_array_initializer): Teach it how to count.
1680 2003-07-01  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1682         * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
1683         conformance checks.
1685 2003-06-29  Paul Brook  <paul@nowt.org>
1687         * array.c (g95_simplify_iterator_var): Don't bother with return value.
1688         * expr.c (find_array_element, find_component_ref): New functions.
1689         (remove_subobject_ref): New function.
1690         (simplify_const_ref): Use them.  Rename from simplify_component_ref.
1691         (simplify_ref_chain): New function.
1692         (g95_simplify_expr): Use it.  Simplify parameter variable subobjects.
1693         (g95_specification_expr): Simplify the expression.
1694         * resolve.c (resolve_operator): Check simplifications return code.
1695         (g95_resolve_expr): Ditto.
1697 2003-06-26  Paul Brook  <paul@nowt.org>
1699         * expr.c (simplify_component_ref): New function.
1700         (g95_simplify_expr): Use it.
1701         * resolve.c (resolve_structure_cons): Handle references.
1703 2003-06-25  Paul Brook  <paul@nowt.org>
1705         * trans-io.c (build_dt): Handle internal units.
1707 2003-06-25  Canqun Yang  <canqun@yahoo.com.cn>
1709         * trans-common.c (g95_build_common_decl): Array index range starts at 0.
1710         (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
1711         Use g95_array_index_type instead of integer_type_node.
1712         (g95_build_common_decl, g95_set_common_master_type): Use
1713         g95_character1_type_node instead of char_type_node.
1714         * trans-equivalence.c (g95_layout_local_equiv): As above.
1716 2003-06-24  Steven G. Kargl  <kargls@attbi.com>
1718         * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
1719         remove last remains of -fquiet.
1721 2003-06-22  Paul Brook  <paul@nowt.org>
1723         * resolve.c (resolve_operator): Don't fail if we can't simplify.
1724         (g95_resolve_expr): Ditto.
1725         (resolce_code): Mark as static.
1726         * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
1727         gimplifer doesn't (yet).
1729 2003-06-20  Paul Brook  <paul@nowt.org>
1731         * g95.h: Add ST_PAUSE and EXEC_PAUSE.
1732         * match.c (g95_match_if): Add ST_PAUSE.
1733         (g95_match_stopcode): New function.
1734         (g95_match_pause, g95_match_stop): Use it.
1735         * parse.c (g95_ascii_statement): Handle ST_PAUSE.
1736         (decode_stmt, next_statement, parse_executable): Ditto.
1737         * resolve.c (resolve_code): Ditto.
1738         * st.c (g95_free_statement): Ditto.
1739         * trans-stmt.c (g95_trans_pause): New function.
1740         * trans-stmt.h: Declare it.
1741         * trans.c (g95_trans_code): Use it.
1742         * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
1743         Declare.
1744         (g95_build_builtin_function_decls): Initialize them.
1745         * trans.h: Ditto.
1746         * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
1748 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1750         * io.c (g95_match_open , g95_match_close, g95_match_inquire,
1751         match_filepos): Fix error handling.
1753 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1755         * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
1756         Add assertions on arguments.
1757         * resolve.c (expression_shape): Remove useless &.
1758         * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
1759         g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
1760         g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
1761         g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
1762         g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
1763         g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
1764         (g95_simplify_not, g95_simplify_scale): Add assertions.
1766 2003-06-15  Paul Brook  <paul@nowt.org>
1768         Clean up stuff to work with the ssa optimizers.
1769         * convert.c (convert): Handle BOOLEAN_TYPEs.
1770         * f95-lang.c (g95_truthvalue_conversion): Implement.
1771         * trans-array.c (g95_trans_array_constructor_value): Group multiple
1772         scalar values.
1773         * trans.h (g95_truthvalue_conversion): Declare.
1774         * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
1775         * trans-stmt.c (g95_trans_character_select): Don't create array
1776         assignments.  Mark labels as indirect jump targets.
1777         * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
1778         (g95_get_dtype_cst): Handle LOGICAL types.
1780 2003-06-14  Paul Brook  <paul@nowt.org>
1782         * f95-lang.c (g95_gimplify_expr): New function.
1783         * trans-array.c (g95_trans_array_constructor_value): Don't create
1784         array assignments.
1785         (g95_conv_expr_descriptor): Rename simple->gimple.
1786         * trans-expr.c (conv_expr_op): Use proper logical operators.
1787         * trans-intrinsic.c (build_fixbound_expr): New function.
1788         (build_fix_expr): Ditto.
1789         (g95_conv_intinsic_aint): Use them. Use builtin functions.
1790         (g95_conv_intrinsic_function): Add FLOOR and CEILING.
1792 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1794         * array.c (g95_compare_array_spec): Remove unreachable code.
1795         * expr.c (g95_copy_expr): Likewise.
1796         * intrinsic.c (g95_convert_type): Likewise.
1797         * misc.c (g95_code2string): Likewise.
1798         * simplify.c (g95_simplify_ishft, g95_simplify_real,
1799         g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
1800         * trans-stmt.c (g95_trans_select): Likewise.
1801         * primary.c (extend_ref): Add an assertion.
1802         * simplify.c (g95_convert_constant): Add const.
1803         * intrinsic.h: Remove g95_check_x_ni.
1804         * f95-lang.c (g95_finish): Call g95_release_include_path.
1806 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1808         * resolve.c (resolve_contained_functions): Fix typo introduced on
1809         2003-01-13.
1811 2003-06-09  Paul Brook  <paul@nowt.org>
1813         * g95.h: Include system.h not hwint.h.
1814         * many: use safe-ctype.h not ctype.h.  Change isalpha -> ISALPHA, etc.
1815         * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
1817 2003-06-09  Paul Brook  <paul@nowt.org>
1819         * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
1820         * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
1821         * trans-decl.c (g95_add_decl_to_functions): Make non-static.
1822         (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
1823         (g95_generate_function_code): Translate COMMON and EQUIVALENCE
1824         objects.
1825         * trans.h (g95_trans_equivalence, g95_trans_common,
1826         g95_add_decl_to_function): Declare.
1827         * trans-common.c, trans-equivalence.c: New files.
1829 2003-06-08  Steven Bosscher  <steven@gcc.gnu.org>
1831         * intrinsic.c (g95_intrinsic_extension): Remove.
1832         (add_functions): Substitute g95_check_x for g95_check_x_ni
1833         everywhere.
1834         (g95_init_expr_extensions): New function.
1835         (g95_intrinsic_func_interface): Use it.
1836         * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
1837         * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
1838         g95_check_precision, g95_check_present, g95_check_radix,
1839         g95_check_range, g95_check_selected_real_kind): Do not set
1840         g95_intrinsic_extension.
1841         (g95_check_x_ni): Remove now duplicate of g95_check_x.
1843         * expr.c (check_inquiry): Add FIXME, fixup some code style.
1845 2003-06-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1847         * g95.h (ref_type): Name this type explicitly.
1848         * module.c (MIO_NAME): Add specialisations of mio_name.
1849         (mio_symbol_attribute, mio_typespec, mio_array_ref,
1850         mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
1851         (ab_attribute): Name this type explicitly.
1852         (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
1854 2003-06-05  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1856         * trans-intrinsic.c (g95_conv_allocated): New function.
1857         (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
1859 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
1861         * f95-lang.c: Don't include g95-support.h
1862         (g95_mark_addressable): Add prototype.
1863         (g95_init_decl_processing): Remove C front end hack.
1864         * f95-tree.c: Remove file.
1865         * support.c: Remove file.
1866         * g95-support.h: Remove file.
1867         * trans-types.c (g95_init_types): Set up boolean
1868         type related tree nodes.
1869         * Make-lang.in: Remove rules for dead files and
1870         dependencies on them.
1872 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
1874         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
1875         C front end dependency.  Also, convert.c does not depend on
1876         g95-support.h anymore.
1877         * convert.c: Don't include c-common.h and g95-support.h
1878         * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
1879         (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
1880         stmts_are_full_exprs_p, current_stmt_tree,
1881         current_scope_stmt_stack): Remove.
1882         * g95-support.h (unsigned_conversion_warning): Kill proto.
1883         (boolean_type_node, boolean_true_node, boolean_false_node):
1884         Don't define here.  Instead, make then true tree nodes in
1885         trans-types.
1886         * support.c (c_global_trees): Die, C front end, die!!!
1887         (g95_init_c_decl_hacks): Don't touch intmax_type_node,
1888         uintmax_type_node, string_type_node and const_string_type_node.
1889         (decl_constant_value, overflow_warning): Make static functions.
1890         They are in death row too, though.
1891         (default_conversion, c_expand_asm_operands): Remove.
1892         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
1893         trans.c: Don't include c-common.h.
1894         * trans-types.c (boolean_type_node, boolean_true_node,
1895         boolean_false_node): Make them real tree nodes.
1896         * trans-types.h (intmax_type_node, string_type_node,
1897         const_string_type_node): Hack to work around C dependencies
1898         in builtin-types.def.
1900 2003-06-04  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1902         * decl.c (decl_types): Add some iterators-like sentinels.
1903         * decl.c (match_attr_spec): Use them.
1904         Use "decl_types" instead of "int".
1905         Add cast in call to g95_match_strings.
1906         * dump-parse-tree.c (g95_show_namespace):  Use "g95_intrinsic_op"
1907         instead of "int".
1908         * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
1909         (g95_interface_info): Use "g95_intrinsic_op".
1910         * dump-parse-tree.c (g95_show_namespace): Use them.
1911         * interface.c (g95_check_interfaces): Use them.
1912         * module.c (read_module, write_module): Use them.
1913         * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
1914         Use "g95_intrinsic_op".
1915         * interface.c (check_operator_interface): Use "g95_intrinsic_op".
1916         Add a default case in switch statement.
1917         * intrinsic.h (g95_generic_isym_id): Moved to...
1918         * g95.h (g95_generic_isym_id): here.
1919         (g95_intrinsic_sym): Use "g95_generic_isym_id".
1920         * intrinsic.c (make_generic): Use "g95_generice_isym_id".
1921         * trans-intrinsic.c (g95_intrinsic_map_t,
1922          g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
1923         * match.c (g95_match_intrinsic_op): Add cast in call to
1924         g95_match_strings.
1926 2003-06-03  Steven Bosscher  <steven@gcc.gnu.org>
1928         * support.c (skip_evaluation, warn_conversion, lvalue_p,
1929         lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
1930         constant_fits_type_p, convert_and_check,
1931         unsigned_conversion_warning): Remove these ugly remnants
1932         we inherited from the C front end.
1933         (function_types_compatible): Remove '#if 0'-edcode.
1934         (build_modify_expr): Likewise.
1935         (convert_for_assignment): Don't use the deceased functions.
1936         The parameter fundecl is now unused.
1937         (decl_constant_value): Always just return decl.  In fact
1938         this function is not used at present, but it might be in
1939         the future, when we start using the tree inliner.
1940         (overflow_warning, default_conversion, c_expand_asm_operands):
1941         Abort when these are called, they are part of the C type
1942         checking implementation and therefore poison to Fortran.
1944 2003-06-04  Steven Bosscher  <steven@gcc.gnu.org>
1946         * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
1947         c-pretty-print.o and c-dump.o.  Add a comment on why we
1948         depend on c-semantics.c.
1949         * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
1950         Don't use the C front end tree dumper hook to dump the
1951         language specific tree representation -- we don't have
1952         one.  So instead, inherit the default langhook.
1954 2003-06-02  Paul Brook  <paul@nowt.org>
1956         * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
1958 2003-06-02  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1960         * check.c (g95_check_associated): Use proper types.  Remove
1961         extraneous argument in call to g95_error().
1963 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1965         * resolve.c (resolve_operator): Make logical operands convert to the
1966         type with higher kind.
1968 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1970         * check.c (g95_check_associated): Make sure both pointer and target has
1971         the same type and rank. Null pointer or array section with vector
1972         subscript as target are not allowed.
1973         * trans.h: Declare gfor_fndecl_associated.
1974         * trans-decl.c: (g95_build_builtin_function_decls): Initialize
1975         gfor_fndecl_associated.
1976         * trans-intrinsic.c (g95_conv_associated): New function.
1977         (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
1979 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1981         * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
1982         according to POINTER itself rather than TARGET.
1983         (g95_conv_expr_descriptor): Make lbound start at 1.
1984         * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
1986 2003-06-01  Paul Brook  <paul@nowt.org>
1988         * expr.c (g95_type_convert_binary): Make it match the standard.
1989         * g95.texi: Remove dead link.
1991 2003-06-01  Steven Bosscher  <steven@gcc.gnu.org>
1993         * g95.texi: Cleanup somewhat in preparation for inclusion
1994         in GCC CVS.
1996 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1997             Canqun Yang  <canqun@yahoo.com.cn>
1999         * resolve.c (compare_bound_int, resolve_where_shape): Proper return
2000         type.
2001         (g95_find_forall_index): Return proper value.
2002         (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
2003         compare the return value from g95_find_forall_index.
2005 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2006         * g95.h, io.c (g95_st_label): Remove "length".
2007         (g95_symtree): Remove "link".
2008         (g95_case): Remove "code".
2009         * arith.c, arith.h (g95_compare_string, g95_convert_integer,
2010         g95_convert_real): Make an argument pointer to const.
2011         * decl.c (colon_seen): Add a TODO.
2012         * interface.c (g95_compare_types): Fix typo.
2013         * interface.c (compare_interfaces): Preserve value of "p".
2014         * intrinsic.c (sort_actual): Remove "i".
2015         * match.c (g95_match_assign): Proper type in call to g95_match().
2016         * parse.c (next_free): Avoid duplicate call due to macro.
2017         * parse.c (check_statement_label): wrong type in call to g95_error.
2018         * primary.c (match_real_constant): Add a TODO.
2019         * resolve.c (resolve_select):  Remove useless conditional.
2020         * simplify.c (g95_simplify_repeat): Proper assignment to
2021         "value.character.string".
2022         * simplify.c (g95_simplify_reshape): Wrong variable in call to
2023         g95_error.
2025 2003-05-20  Canqun Yang  <canqun@yahoo.com.cn>
2027         * trans-stmt.c: Remove unnecessary include file defaults.h.
2029 2003-05-19  Lifang Zeng  <zlf605@hotmail.com>
2031         * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
2032         stride.
2033         (g95_trans_forall): Allow arbitrary number of FORALL indexes and
2034         actual variables used as FORALL indexes.
2036 2003-05-15  Paul Brook  <paul@nowt.org>
2038         * trans-array.c (g95_trans_static_array_pointer): Use
2039         null_pointer_node.
2040         (g95_trans_deferred_array): Initialize static array pointers.
2041         * trans-expr.c (g95_conv_function_call): Use formal arglist to
2042         correctly pass POINTER and absent CHARACTER arguments.
2044 2003-05-14  Lifang Zeng  <zlf605@hotmail.com>
2046         * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
2047         (g95_resolve_forall_body): Resolve FORALL body.
2048         (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
2049         (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
2050         (g95_find_forall_index): Check whether the FORALL index appears in
2051         the expression or not.
2052         (resolve_code): Modified.
2054 2003-05-14  Paul Brook  <paul@nowt.org>
2056         * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
2058 2003-05-13  Paul Brook  <paul@nowt.org>
2060         * trans-types.c (g95_max_array_element_size): Now a tree node.
2061         (g95_init_types): Work out max size properly.
2062         (g95_get_dtype_cst): Modify to match.
2064 2003-05-11  Paul Brook  <paul@nowt.org>
2066         * trans-io.c (add_case): Create a label decl for case labels.
2068 2003-05-11  Paul Brook  <paul@nowt.org>
2070         * arith.c (g95_integer_index_kind): New variable.
2071         * f95-lang.c (g95_init): Move frontend initialization here ...
2072         (g95_post_options): ... from here.
2073         * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
2074         * intrinsic.c (add_functions): Use index kinds.
2075         * iresolve.c: Convert to index_kind where needed.
2076         * resolve.c (g95_resolve_index): Make public, use index_kind.
2077         (resolve_array_ref): Adjust to match.
2078         * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
2079         * trans-stmt.c: Ditto.
2080         * trans-types.c: Ditto.
2081         * trans-types.h (g95_array_index_kind): Remove declaration.
2082         * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
2084 2003-05-07  Paul Brook  <paul@nowt.org>
2086         * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
2087         * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
2088         of bound indices.
2090 2003-05-07  Paul Brook  <paul@nowt.org>
2092         * trans-array.c (trans_static_array_pointer,
2093         g95_trans_array_constructor_value, g95_conv_array_initializer,
2094         g95_conv_structure): CONSTRUCTOR nodes only have one operand.
2095         (g95_add_loop_ss_code): Convert subscripts to the correct type.
2096         * trans-stmt.c (g95_trans_character_select): Ditto.
2097         * trans-types.c (g95_init_types): Ditto.
2099 2003-05-07  Steven Bosscher  <steven@gcc.gnu.org>
2101         * f95-lang.c (expand_function_body): Use input_line, not lineno.
2102         * trans-decl.c (g95_generate_function_code,
2103         g95_generate_constructors): Likewise.
2104         * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
2105         g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
2106         Likewise.
2108 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2109         * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
2110         with components point to the DERIVED type itself, and two DERIVED
2111         type with components point to each other.
2112         * trans-expr.c (g95_conv_componet_ref): Modified
2114 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2115         * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
2116         null_pointer_node.
2117         (g95_trans_pointer_assign): Implement Nullify.
2119 2003-05-01  Paul Brook  <paul@nowt.org>
2121         * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
2122         * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
2124 2003-05-01  Paul Brook  <paul@nowr.org>
2126         * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
2127         trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
2128         IS_EMPTY_STMT.
2130 2003-05-01  Canqun Yang  <canqun@yahoo.com.cn>
2132         * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
2133         CASE_LABEL_EXPR.
2135 2003-04-28  Paul Brook  <paul@nowt.org>
2137         * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
2138         as their kind suggests.
2139         (g95_resolve_reshape): Ditto.
2141 2003-04-28  Chun Huang  <compiler@sohu.com>
2143         * trans-expr.c (g95_conv_substring_expr): New function.
2144         (g95_conv_expr): Use it.
2146 2003-04-28  Paul Brook  <paul@nowt.org>
2148         * iresolve.c (g95_resolve_transpose): Make it match the
2149         implementation.
2150         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
2152 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
2154         * trans-types.c (g95_add_field_to_struct): New function to
2155         add a field to a UNION_TYPE or RECORD_TYPE.
2156         * trans-types.h (g95_add_field_to_struct): Prototype.
2157         (g95_get_derived_type): Use g95_add_field_to_struct to add
2158         components.
2159         * trans-io.c (g95_add_field): Remove.
2160         (ADD_FIELD): Use new g95_add_field_to_struct function.
2161         (ADD_STRING): Likewise.
2162         * trans-stmt.c (g95_trans_select): Likewise.
2163         (g95_add_field): Remove duplicated function.
2165 2003-04-18  Canqun Yang  <canqun@yahoo.com.cn>
2167         Port implementation for CHARACTER SELECT from Andy's tree.
2168         * trans-stmt.c (g95_trans_character_select): Implement character
2169         select. (g95_add_field): New function.
2170         * trans-decl.c: Declare 'gfor_gndecl_select_string'.
2171         (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
2172         * g95.h (struct g95_case): Add field 'int n'.
2173         * trans.h: Declare 'gfor_fndecl_select_string'.
2175 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
2177         * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
2178         (g95_insert_bbd): Die on duplicates.
2179         * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
2181 2003-04-14  Steven Bosscher  <steven@gcc.gnu.org>
2183         * g95.texi: Require GMP 4.0 -- like we actually
2184         do.  Explain the testsuite and what-goes-where.
2185         Don't use undefined texinfo symbol.  Break very
2186         long line.  Remove finished item from the list
2187         of open projects.
2189 2003-04-11  Canqun Yang  <canqun@yahoo.com.cn>
2191         * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
2192         LOGICAL type.
2194 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
2196         * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
2197         (g95_trans_forall_body): New function.
2199 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
2201         * resolve.c (resove_where): New function.
2202         (resolve_where_shape): New function.
2203         (resolve_code): Add call to 'resolve_where'
2204         * trans-stmt.c (g95_trans_where): Modified.
2205         (g95_trans_where_2): New function.
2206         (g95_trans_where_assign): New function.
2207         (g95_evaluate_where_mask): New function.
2208         (g95_add_to_stmt_list): New function.
2209         (g95_get_temp_expr): New function.
2210         * trans.h (where_stmt_list): New structure.
2212 2003-04-10  Paul Brook  <paul@nowt.org>
2214         * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
2215         (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
2217 2003-04-10  Steven Bosscher  <steven@gcc.gnu.org>
2219         Update after mainline -> tree-ssa-branch merge.
2220         * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
2221         call.
2222         (g95_init): Update for new lang_hooks definition.
2223         (g95_post_options): New langhook.
2224         (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
2225         * scanner.c (g95_new_file): Comment update.
2227 2003-04-09  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2229         * g95.h, lang-options.h: Add -Wimplicit-interface.
2230         * options.c (g95_init_options, g95_parse_arg): Set it.
2231         * interface.c (check_intents): Warn about call with implicit
2232         interface.
2233         * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
2234         g95_procedure_use.
2236 2003-04-05  Paul Brook  <paul@nowt.org>
2238         * iresolve.c (g95_resolve_spread): Don't resole based on type.
2239         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
2241 2003-03-29  Paul Brook  <paul@nowt.org>
2243         * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
2244         (g95_resolve_unpack): Ditto.
2245         * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
2246         (g95_conv_intrinsic_function): Use it.  Remove PACK and UNPACK.
2247         (g95_is_intrinsic_libcall): Add PACK and UNPACK.
2249 2003-03-25  Paul Brook  <paul@nowt.org>
2251         * arith.c (g95_unary_user, g95_user): Remove dead functions.
2252         * arith.h: Ditto.
2253         * array.c (g95_free_array_ref): Ditto.
2254         * g95.h: Ditto.
2255         * symbol.c (g95_use_derived_tree): Ditto.
2256         * intrinsic.c (add_functions): Use simplification for SCALE.
2257         * primary.c (g95_match_rvalue): Test sym, not symtree.
2259 2003-03-25  Paul Brook  <paul@nowt.org>
2261         * trans-decl.c (build_function_decl): Add parameter before it gets
2262         turned into a constant.
2263         * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
2264         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
2265         * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
2267 2003-03-22  Paul Brook  <paul@nowt.org>
2269         * trans-array.c (g95_conv_array_initializer): Allow scalar
2270         expressions.
2271         * trans-decl.c (g95_finish_var_decl): Result variables are not
2272         module variables.
2273         * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
2274         (g95_conv_intrinsic_function): Use it.
2275         * trans-types.h (g95_type_spec): Remove dead declaration.
2277 2003-03-21  Paul Brook  <paul@nowt.org>
2279         * trans-decl.c (g95_build_function_decl): Mark string parameters.
2281 2003-03-20  Paul Brook  <paul@nowt.org>
2283         * trans-decl.c (g95_build_function_decl): Put character length
2284         parameters at the end of the function declaration.
2285         * trans-expr.c (g95_conv_function_call): Ditto.
2286         * trans-types.c (g95_get_function_type): Ditto.
2288 2003-03-20  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2290         * resolve.c (resolve_formal_arglist): Don't impose intent for
2291         procedure arguments of pure functions.
2292         (resolve_select): Remove redundant assignment.
2294 2003-03-19  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2296         * arith.c (validate_logical), g95.h, options.c (g95_init_options):
2297         Remove option l1.
2298         * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
2299         * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
2300         const.
2301         * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
2302         Order list.
2303         * symbol.c (g95_add_type): Fix typo in comment.
2306 2003-03-16  Paul Brook  <paul@nowt.org>
2308         * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
2309         * expr.c (g95_build_call): Remove.
2310         * f95-lang.c (puchdecl_top_level): New function.
2311         * g95.h (g95_code): Store resolved symbol, not just the name.
2312         * intrinsic.c (g95_intrinsic_namespace): New global namespace.
2313         (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
2314         (g95_get_intrinsic_sub_symbol): New function.
2315         * iresolve.c (g95_resolve_cpu_time): Use it.
2316         (g95_resolve_random_number): Ditto.
2317         * resolve.c: Set code->resolved_sym instead of code->sub_name.
2318         * trans-decl.c (g95_get_extern_function_decl): Give external decls
2319         the correct DECL_CONTEXT.  Add global symbold to the global scope.
2320         * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
2321         fixed.
2323 2003-03-16  Paul Brook  <paul@nowt.org>
2325         * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
2326         * options.c (g95_parse_arg): Ditto.
2327         * module.c (mio_symbol_attribute): Handle the always_explicit bit.
2328         * resolve.c (resolve_formal_arglist): The always_explicit sould be set
2329         for the procedure, not the parameter.
2330         * trans-array.c (g95_trans_g77_array): New function.
2331         (g95_trans_assumed_size): Use it.
2332         (g95_trans_dummy_array_bias): Ditto.
2333         (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
2334         (g95_conv_expr_descriptor): ... to here.  Update callers.
2335         * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
2336         (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
2337         * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
2338         * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
2339         * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
2340         (g95_sym_type): Ditto.
2342 2003-03-15  Paul Brook  <paul@nowt.org>
2344         * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
2345         first chain.
2346         * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
2348 2003-03-14  Paul Brook  <paul@nowt.org>
2350         * trans-array.c (g95_array_is_packed): Remove.
2351         (g95_conv_array_base): Correctly handle all descriptorless cases.
2352         (g95_conv_array_stride): Use descriptorless strides.
2353         (g95_trans_dummy_array_bias): Don't always repack the array.
2354         (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
2355         packed.
2356         * trans-types.c (g95_get_nodesc_array_type): Differentiate between
2357         dummy and non-dummy arrays...
2358         (g95_sym_type, g95_get_derived_type): ... like these.
2359         (g95_get_array_type_bounds): Allow discontiguous arrays.
2361 2003-03-12  Paul Brook  <paul@nowt.org>
2363         * array.c (g95_resolve_array_spec): Fix comment.
2364         * g95.h (symbol_attributes): New flag always_explicit.
2365         * resolve.c (resolve_formal_arglist): Set it always_explicit.
2366         * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
2367         * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
2368         (g95_trans_array_bounds): Allow assumed shape arrays.
2369         (g95_trans_repack_array): Remove.
2370         (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
2371         * trans-decl.c (g95_build_qualified_array): Only ignore absent
2372         bounds for assumed size arrays.
2373         (g95_build_dummy_array_decl): Use descriptorless arrays.
2374         * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
2375         (g95_trans_pointer_assign): Fix typo.
2376         * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
2377         code.
2378         (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
2379         * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
2380         Also modify callers.
2381         * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
2383 2003-03-08  Paul Brook  <paul@nowt.org>
2385         * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
2386         (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
2387         * resolve.c (compare_spec_to_ref): Allow full array sections.
2389 2003-03-08  Paul Brook  <paul@nowt.org>
2391         * expr.c (g95_simplify_expr): Also simplify array index and
2392         substring expressions.
2393         * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
2394         * trans-array.c (g95_trans_array_bounds): New function.
2395         (g95_trans_auto_array_allocation): Use it.
2396         (g95_trans_assumed_size): Rewrite.
2397         * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2398         (gfor_fndecl_repack): Remove.
2399         (g95_build_qualified_array): Handle absent upper bounds.
2400         (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
2401         (g95_get_symbol_decl): Update.
2402         (g95_build_intrinsic_function_decls): Initialize new decls.
2403         * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2404         (gfor_fndecl_repack): Remove.
2405         * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
2406         * trans-types.c: (g95_build_array_type): Merge duplicated code..
2407         (g95_get_nodesc_array_type): Handle absent bounds.
2408         * trans-types.h (g95_get_nodesc_array_type): Declare.
2410 2003-03-04  Paul Brook  <paul@nowt.org>
2412         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
2413         builtin-types.def.
2415 2003-03-02  Paul Brook  <paul@nowt.org>
2417         * options.c (g95_init_options): Drfault to 1.
2418         (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
2419         * trans-array.c (g95_conv_array_data, g95_conv_array_base,
2420         g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
2421         Handle non-constant size automatic arrays.
2422         (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
2423         generic bound functions.
2424         (g95_trans_auto_array_allocation): Don't create a descriptor.
2425         (g95_trans_assumed_size): New function (broken).
2426         (g95_trans_dummy_array_bias): Remove unused var.
2427         * trans-array.h (g95_trans_assumed_size): Declare.
2428         * trans-decl.c (create_index_var): New fuction.
2429         (g95_build_qualified_array): New function.
2430         (g95_get_symbol_decl): Use it.
2431         (g95_trans_deferred_vars): Handle assumed shape seperately.
2432         * trans-types.c (get_element_type): Handle heap allocated arrays.
2433         (g95_is_nodesc_array): Include non-const size arrays.
2434         (g95_get_nodesc_array_type): Ditto.
2436 2003-02-23  Paul Brook  <paul@nowt.org>
2438         * trans-array.c (g95_array_init_size): Should use stride, not size of
2439         last dimension.
2441 2003-02-18  Paul Brook  <paul@nowt.org>
2443         * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
2444         after intrinsic function check.
2446 2003-02-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2448         * io.c (match_io): Fix missing return value and remove useless
2449         assignment.
2450         * match.c (g95_match): Remove useless assignment.
2451         * module.c (parse_string):  Remove useless post increment.
2452         * simplify.c (g95_simplify_verify): Remove useless assignment.
2454 2003-02-15  Paul Brook  <paul@nowt.org>
2456         * expr.c (restricted_intrinsic): Handle bad values gracefully.
2457         * g95.h (symbol_attribute): Add referenced member.
2458         (g95_symbol): Add dummy_order member.
2459         (g95_set_sym_referenced): Declare.
2460         * match.c (g95_match_assignment, g95_match_call): Use it
2461         * primary.c (match_actual_arg, g95_match_rvalue,
2462         g95_match_variable): Ditto.
2463         * symbol.c (next_dummy_order): New variable.
2464         (g95_set_sym_referenced): New function.
2465         (check_done): New function.
2466         (g95_add_*): Use it.
2467         * trans-decl.c: Make formatting conform to GCC standards.
2468         (g95_defer_symbol_init): Add dummy variables in the right order.
2469         (g95_get_symbol_decl): Only accept referenced variables.
2470         (g95_create_module_variable): Module variables are always required.
2471         (generatr_local_decls): New function.
2472         (generate_local_vars): New function.
2473         (g95_generate_function_code): Use it.
2475 2003-02-13  Paul Brook  <paul@nowt.org>
2477         * trans-decl.c (g95_conv_struct_cons): Remove.
2478         (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
2479         * trans-expr.c (g95_conv_structure): New function.
2480         (g95_conv_expr): Use it.
2482 2003-02-09  Paul Brook  <paul@nowt.org>
2484         * trans-array.c (g95_array_init_size): Don't evaluate the linit
2485         expressions multiple times.
2486         (g95_trans_auto_arry_allocation): Use pointer not tmp.
2488 2003-02-08  Paul Brook  <paul@nowt.org>
2490         * module.c (mio_symtree_ref): Declare as static.
2491         (mio_expr): Remove dead code.
2492         (read_module): Set the symtree link for fixups.
2493         * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
2494         (build_round_expr): ... to this.
2495         (g95_conv_intrinsic_aint): New function.
2496         (g95_conv_intrinsic_function): Use it.
2498 2003-02-08  Paul Brook  <paul@nowt.org>
2500         * trans-array.c (g95_trans_array_constructor_value): Use the acutal
2501         offset after modificaton, not the increment expression.
2502         * dependency.c: Kill excess whitespace.
2504 2003-02-07  Sanjiv Gupta  <sanjivg@noida.hcltech.com>
2506         * dependency.h: Remove some function declarations.
2507         * dependency.c (get_no_of_elements): Change this function not to
2508         return int.
2509         * other: Add comments for all modified functions.
2511 2003-02-06  Paul Brook  <paul@nowt.org>
2513         * g95spec.c (lang_specific_functions): Fix initializer warning.
2514         * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
2515         for structure type names.
2516         * trans-decl.c (g95_cons_structure_cons): New function.
2517         (g95_get_symbol_decl): Use it.
2518         * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
2519         referencing code.
2521 2003-02-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2523         * resolve.c (compare_cases): Add const to casts.
2525 2003-01-30  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2527         * g95.h (g95_check_f): Change a1 to f1m.
2528         * intrinsic.c (add_sym_1m, check_specific,
2529         g95_intrinsic_func_interface): Use it.
2531         * module.c (init_pi_tree): Remove useless cast.
2532         (fp2): Fix argument type.
2534         * parse.c (parse_select_block): Add comment.
2536 2003-02-05  Toon Moene  <toon@moene.indiv.nluug.nl>
2538         * lang-options.h: Fix warning involving C90 concatenated
2539         strings.
2541 2003-02-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2542             Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2544         * io.c (format_asterisk): Complete initializer to kill warning.
2545         * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
2546         DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
2547         (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
2548         new defines to complete initializers.  Kills all warnings.
2550         * Make-lang.in: Comment cleanup.
2552 2003-02-05  Paul Brook  <paul@nowt.org>
2554         * array.c (g95_free_constructor): Handle NULL expressions.
2555         * resolve.c (resolve_structure_cons): Ditto.
2556         * decl.c (g95_match_null): New Function.
2557         (variable_decl): Use it.
2558         * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
2559         * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
2560         * trans-types.c (g95_set_decl_attributes): Remove empty function.
2562 2003-02-05  Paul Brook  <paul@nowt.org>
2564         * trans.h (build1_v): New macro.
2565         (build_v): Remove pointless and incorrect prototype.
2566         * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
2567         * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
2569 2003-02-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2571         * Make-lang.in (F95_OBJS): Remove one more dead file.
2573 2003-02-01  Paul Brook  <paul@nowt.org>
2575         * lang-specs.h: Don't pass -ffixed-form to the linker.
2576         * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
2578 2003-02-01  Paul Brook  <paul@nowt.org>
2580         * Make-lang.in (F95_OBJS): Remove dead files.
2581         * trans-array.c (g95_array_init_size): Do the right thing when
2582         ubound=NULL.
2583         * trans-decl.c (g95_generate_function_code): Initialize deffered
2584         symbol list before translating contained subroutines.
2585         * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
2586         scalar invariant values here...
2587         (g95_conv_variable, g95_conv_function_call): ... instead of here ...
2588         * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
2590 2003-01-29  Paul Brook  <paul@nowt.org>
2592         * trans-array.c (g95_add_loop_code): Put pre code in the right block.
2593         (g95_walk_elemental_function_args): Reverse chains before adding.
2594         (g95_reverse_ss): Move about a bit.
2595         * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
2596         function arguments.
2598 2003-01-28  Paul Brook  <paul@nowt.org>
2600         * intrinsic.c (resolve_intrinsic): Use correct union member.
2601         * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
2602         parameters.
2603         * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
2604         use associated variables.
2605         * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
2606         * trans-expr.c (g95_conv_expr_present): ... to here.
2607         * trans.h: Declare it.
2608         * trans-types.c (g95_sym_type): Assume subroutine if not specified.
2610 2003-01-28  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2612         * array.c (expand_iterator): Suppress useless assignment.
2613         * decl.c (match_char_spec): Ditto.
2614         * io.c (match_io_iterator): Ditto.
2615         * primary.c (match_real_constant): Ditto.
2616         * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
2617         Ditto.  Also, use g95_intrinsic_op not int for intrinsic operators.
2618         * matchexp.c (match_add_operand, match_level_5): Likewise.
2619         * module.c (parse_atom, find_enum): Likewise.
2620         * resolve.c: move #include <string.h>
2621         (resolve_select): Fix serious typo.
2623 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.n>
2625         * Make-lang.in: Don't build with broken tree-ssa-pre.
2627 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2629         * resolve.c (resolve_index): Add a TODO.
2630         * symbol.c: Remove useless "#include <ctype.h>".
2632 2003-01-27  Paul Brook  <paul@nowt.org>
2634         * check.c (check_rest): Allow different type kinds as an extension.
2635         * g95.h (g95_resolve_f): Add f1m.
2636         * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
2637         * intrinsic.h: Chenge prototypes for MIN and MAX.
2638         * iresolve.c (g95_resolve_minmax): New function.
2639         (g95_resolve_min, g95_resolve_max): Use it.
2640         * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
2641         arguments once.
2642         (g95_conv_intrinsic_present): Fix logic.
2644 2003-01-27  Steven Bossche  <s.bosscher@student.tudelft.nl>
2646         * g95.h (g95_case): Don't be a tree, be a double linked list.
2647         * match.c (match_case_selector): Remove redundant semantics check.
2648         Clean up a few goto's to make it a tiny little bit faster.
2649         * resolve.c (case_tree): Die.
2650         (compare_cases): Accept and compare unbounded cases too.
2651         (check_case_overlap): Don't build a tree.  Instead, merge-sort the
2652         whole list of g95_cases passed from resolve_select.
2653         (sane_logical_select): Die.
2654         (check_case_expr): Return FAILURE if a CASE label is of the wrong
2655         type kind.
2656         (resolve_select): Fixup case expression for computed GOTOs, put it
2657         in expr, not expr2, for easier handing in the parse tree dumper and
2658         the code generator.  Rewrite the rest of the function: Kill
2659         unreachable case labels and unreachable case blocks.
2660         * dump-parse-tree.c (g95_show_code_node): Always dump expr for
2661         an EXEC_SELECT, not case2 anymore.
2662         * trans-const.c (g95_conv_constant_to_tree): New function.
2663         (g95_conv_constant): Use it.
2664         * trans-const.h: Declare prototype for the new function.
2665         * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
2666         g95_trans_character_select): New static functions.
2667         (g95_trans_select): Rewrite.
2669 2003-01-26  Paul Brook  <paul@nowt.org>
2671         * intrinsic.c (add_fnctions): Properly add dreal.
2672         * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
2673         (g95_conv_intrinsic_function): Use it.
2674         * trans-io.c (build_dt): Abort on internal files (unimplemented).
2676 2003-01-26  Paul Brook  <paul@nowt.org>
2678         Widespread changes to the handling of symbols in expressions.  These
2679         are now linked via g95_symtree nodes.
2680         * parse.c (g95_fixup_sibling symbols): New function.
2681         (parse_contained): Use it.
2682         * g95.h (symbol_attribute): Add contained.  Indicates a symbol is a
2683         contained procedure that has bee correctly fixed up.
2684         (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
2686 2003-01-24  Paul Brook  <paul@nowt.org>
2688         * trans-array.c (g95_walk_expr): Function result attributes are in
2689         sym->result.
2690         * trans-expr.c (g95_conv_function_call,
2691         g95_trans_arrayfunc_assign): Ditto.
2692         * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
2694 2003-01-23  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2696         * expr.c (check_restricted): Fix error message.
2697         * symbol.c (free_st_labels): Plug memleak.
2699 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2701         * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
2702         reduce_binary_aa, reduce_binary, eval_intrinsic,
2703         eval_intrinsic_f2): Use typesafe prototypes for eval functions.
2704         * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
2705         for typesafe intrinsics helper functions.
2706         (g95_intrinsic_sym): Use them.
2707         * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
2708         add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
2709         add_sym_5, add_conv, resolve_intrinsic, do_simplify,
2710         check_specific, g95_intrinsic_func_interface,
2711         g95_intrinsic_sub_interface): Adjust all calls to intrinsics
2712         helper functions.
2713         * trans-decl.c (g95_get_extern_function_decl): Likewise.
2714         * Make-lang.in: Don't disable warnings for strict prototypes
2715         any longer, everything is typesafe now.
2717 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2719         * bbt.c (duplicate_node): Make static.
2720         * module.c (module_name): Make static.
2721         * scanner.c (include_dirs): Make static.
2723 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2725         Hard coded _gfor_'s should not show up anymore.
2726         * g95.h (PREFIX): New macro.
2727         * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
2728         hard-coded "_gfor".
2729         (g95_resolve_random_number): Likewise.
2730         * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
2731         * trans-io.c: Remove 'prefix' macro.  Replace all uses with
2732         the new PREFIX macro from g95.h.
2734 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2736         The troubles of forking... Andy implemented this just now too.
2737         Let's stick to that and keep the trees close.
2738         * g95.h (g95_st_label): 'format' member is now a g95_expr.
2739         * io.c: Revert previous changes.
2740         (g95_match_format): Match the format string as a character
2741         literal expression.
2742         * match.h (g95_statement_label): Declare external.
2743         * parse.c: Revert previous changes.
2744         * symbol.c (g95_free_st_label): Free a g95_expr instead
2745         if a 'char *'.
2746         * trans-io.c: Revert previous changes.
2747         (build_dt): Use set_string to set the format string.
2749 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2751         * io.c (format_string): Make non-static.
2752         (g95_match_format): Remember the format string.
2753         (terminate_io): Add I/O termination for empty I/O lists.
2754         * match.h: Declare external format_string.
2755         * parse.c (check_statement_label): Attack the format string
2756         to a format label for FORMAT statements.
2757         * trans-io.c (g95_add_field): Define prefix macro.  Replace
2758         all uses of PREFIX define with a use of this macro.
2759         (build_dt): Implement formatted I/O for format labels.
2761 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2763         * lang-options.h: Kill "-std=F".
2764         * options.c: Remove unimplemented "-std=F".  Modify
2765         web address.
2766         * misc.c (g95_terminal_width): New function.
2767         * error.c (g95_error_init_1): Use g95_terminal_width.
2768         * g95.h: Add prototype for g95_terminal_width, remove
2769         fmode flag.
2771 2003-01-19  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2773         * Make-lang.in: Fix typo.
2775 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2777         * g95.h (struct g95_case): Remove unused cruft, new member
2778         'where' to keep track of the locus of the default case.
2779         * match.c (g95_match_case): Add locus to the current case.
2780         (match_case_selector): Likewise.
2781         * parse.c (parse_select_block): Move semantics check for
2782         multiple DEFAULT cases out of here to...
2783         * resolve.c (check_case_overlap): ...here.  Return sooner
2784         when possible.
2785         (check_case_expr): Take two g95_cases now, use to sure the
2786         expression kinds are the same.
2787         (resolve_select): Cleanup.
2789 2003-01-18  Paul Brook  <paul@nowt.org>
2791         * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
2792         * trans-decl.c (g95_set_symbol_decl): Handle non-array result
2793         variables.
2794         (g95_get_extern_function_decl): Put decls in the correct context.
2796 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2798         * trans-io.c: Port changes from Andy to set ERR flag.
2800 2003-01-17  Paul Brook  <paul@nowt.org>
2802         * trans-array.c: Add various comments.
2803         (g95_ss_terminator): Declare as const.
2804         (g95_walk_expr): Remove first parameter and update all callers.
2805         (g95_walk_op_expr): Initialize scalar SS properly.
2806         * trans-array.h (g95_walk_expr): Update prototype.
2807         * trans-expr.c: Update for new g95_walk_expr.
2808         * trans-intrinsic.c: Ditto.
2809         * trans-io.c: Ditto.
2810         * trans.h: Various comments for SS chains.
2812 2003-01-17  Paul Brook  <paul@nowt.org>
2814         * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
2815         and RRSPACING.
2816         * intrinsic.c (add_functions): Use them.
2817         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
2818         * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
2820 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2822         Fallout of a small merge conflict:
2823         * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
2825 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2827         * initrinsic.c: New add_sym_* functions for strong typing.
2828         (add_conv): Make prototype strict.
2829         * dump-parse-tree.c, dependency.c: Include config.h
2830         * resolve.c, trans-io.c: Fix typos.
2832 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2834         * dump-parse-tree.c (g95_show_code_node): Show the
2835         condition for a computed GOTO that was transformed
2836         to a SELECT CASE construct.
2837         * resolve.c (check_case_overlap): Revert previous switch
2838         to treaps, it was too slow and didn't catch all trouble.
2839         (resolve_symbol): Be more flexible about module procedures.
2840         * symbol.c (check_conflict): Point to relevant section in
2841         the standard for dubious conflict.  Allow procedure
2842         dummy arguments to be optional again.
2843         * trans-io (add_field): Rename to g95_add_field.  Change
2844         all callers.
2845         * trans-stmt (trans_select): Handle unbounded cases for
2846         integer SELECT CASE constructs.  Fix/add more comment.
2848 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2850         * g95.h: Uses GCC's function attribute macros.
2851         * error.c, module.c, parse.c, g95.h: More function attributes.
2853 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2854         Forgot a file...
2855         * trans-decl.c (get_label_decl): Use TREE_LINENO instead
2856         of DECL_SOURCE_LINE, and TREE_FILENAME instead of
2857         DECL_SOURCE_FILE.
2859 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2861         * f95-lang.c (pushdecl): Use TREE_LINENO instead of
2862         DECL_SOURCE_LINE.
2863         * trans.c (g95_trans_code): Use annotate_all_with_file_line
2864         instead of nowdead wrap_all_with_wfl.
2866 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2868         * parse.c (g95_parse_file): In verbose mode, dump the parse tree
2869         before generating code, so we can still see it even if the code
2870         generation phase dies.
2872 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2874         * decl.c (build_sym): Split out initialization expression parts...
2875         (add_init_expr_to_sym): ...to here.
2876         (variable_decl): Add the symbol following an attribute list to the
2877         symbol tree before parsing the optional initialization expression
2878         if the symbol is not of a derived type.
2879         * primary.c (g95_match_rvalue): Don't assume a symbol always has
2880         a value if it is a PARAMETER.
2882 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2884         * misc.c: Don't #include <mcheck.h>
2885         * module.c: Ditto.  Kill uses of mtrace, muntrace.  If there
2886         ever was a glibc bug, then either this was never reported to
2887         glibc people, or it has been fixed for so long that there's
2888         no information you can find about it, anywhere.
2890 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2892         Fix warnings:
2893         * module.c (attr_bits, bt_types, array_spec_types):
2894         Switch 'const' and 'static'.
2895         * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
2897         GNU'ify source code:
2898         * trans-io.c: Numerous fixes, one fixed warning and a few
2899         TODO markers so that we don't forget about them.
2901 2003-01-13  Paul Brook  <paul@nowt.org>
2903         * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
2904         * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
2905         Add G95_ISYM_SCALE.
2906         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
2907         * match.c (g95_match_stop): Fix dumb == -> != error.
2909 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2911         * dump-parse-tree.c (show_indent): Add line breaks.  This
2912         whole dumping process needs cleanups.
2913         * f95-lang.c (g95_mark_addressable): Fix prototype to match
2914         the langhook.  Fix 'return's accordingly.
2915         * g95-support.h: Adjust prototype.
2916         * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
2917         * lang-options.h: Add '-fsyntax-only'.
2918         * options.c (g95_init_options): Init 'no_backend'.
2919         (g95_parse_arg): Deal with '-fsyntax-only'.
2920         * parse.c (g95_parse_file): Do not generate code if 'no_backend'
2921         is set.
2923 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2924         Patch from Arnaud
2925         * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
2926         arguments.  Also make sure that if a symbol is marked INTRINSIC,
2927         an intrinsic with the symbol's name actually exists.
2928         (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
2929         Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
2930         ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
2932 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2934         * resolve.c (resolve_contained_functions): Fix condition, don't
2935         throw internal_error if a child namespace has no name.  Apparently
2936         this can be the case?
2938 2003-01-11  Paul Brook  <paul@nowt.org>
2940         Port changes from Andy's tree:
2941         * g95.h (g95_code): Add stop_code.
2942         * match.c (g95_match_stop): Detter syntax checking.
2943         * resolve.c (resolve_generic_f0): Return match type.
2944         (resolve_generic_f): Remove dead/duplicated code.
2945         (resolve_specific_f): Ditto.
2946         * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
2947         * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
2948         * trans-stmt.c (g95_trans_stop): Handle new STOP format.
2950 2003-01-11  Paul Brook  <paul@nowt.org>
2952         * trans-array.c: Various documentation/comment changes.
2953         * trans-stmt.c: Ditto.
2956 2003-01-10  Paul Brook  <paul@nowt.org>
2958         * options.c/h: Add -fdump-parse-tree as alias of -v.
2960 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2962         * dump-parse-tree.c (g95_show_namespace): Fixed another
2963         typo.  Sorry, it's Friday...
2965 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2967         Spotted by Tobi:
2968         * trans-array.c, trans-array.h, trans.c, trans-const.c,
2969         trans-const.h, trans-decl.c, trans-expr.c, trans.h
2970         trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
2971         trans-types.c: Fix bogus copyright years, add 2003.
2972         * trans-types.h: Give copyright header.
2974 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2976         * dump-parse-tree.c (g95_show_namespace): Fixed typo.
2977         * expr.c, options.c, scanner.c: Add some more 'const' markers.
2978         * intrinsic.c: Some constant strings moved to read-only memory.
2979         * io.c (format_asterisk): Move to...
2980         * g95.h: ...here.
2982 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2984         * dump-parse-tree.c (g95_show_namespace): Dump implicit
2985         types for ranges instead of per-letter.  Indent the
2986         'CONTAINS' just like everything else.
2987         * resolve.c (resolve_contained_functions): Clarify comment.
2988         Explain non-obvious conditional expression.  Improve
2989         diagnostics if tyoe cannot be resolved.
2990         Port semi-fix from Andy's tree:
2991         (was_declared): Move up before first use.
2992         (generic_sym, specific_sym): New functions.  Code moved
2993         out if procedure_kind.
2994         (procedure_kind): Simplify using new functions.
2995         (resolve_generic_f): Make sure the functions we find in
2996         a parent namespace is generic.
2997         (resolve_specific_f): Ditto for specific functions.
2999 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3001         * trans-stmt.c, trans.c: Fix some code style issues. Add
3002         some more comment (but still not enough!).
3004 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3006         * symbol.c (flavors, procedures, intents, acces_types,
3007         access_types, ifsrc_types): Make const.
3008         * misc.c (g95_string2code): Make 'm' param 'const'.
3009         * module.c (find_enum, write_atom, mio_name): Make
3010         'm' param 'const'.
3011         (attr_bits, bt_types, array_spec_types, array_ref_types,
3012         ref_types, expr_types): Make const.
3013         * g95.h: Adjust external decls.
3015 2003-01-09  Paul Brook  <paul@nowt.org>
3017         * Testsuite: Add a load of new cases.
3019 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3021         * Make-file.in: Add dependency on back end header files;
3022         a parallel build should work now.
3023         * f95-lang-c (lang_identifier): Remove bogus comment.
3024         (g95_be_parse_file): Fix prototype.
3025         (g95_init): Make static.
3026         (g95_finish): Make static.
3027         * error.c (g95_syntax_error): Kill. Make define in...
3028         * g95.h (g95_syntax_error): Define.
3029         (g95.options): Make 'source' member 'const'.
3030         * interface.c (g95_match_interface): Explain
3031         hard-to-read condition.
3032         (g95_match_end_interface): Ditto.
3033         * trans_const.c (g95_build_string_const): Make 's' parameter
3034         'const'.
3035         * trans_const.h: Adjust protoype accordingly.
3036         * trans-decl.c: Include tree-dump.h
3037         (g95_generate_function_code): Build fixes for recent changes
3038         in the tree-ssa branch.
3040 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3042         * format.c: Kill, move code from here...
3043         * io.c: ...to here.
3044         * Make-lang.in: Adjust.
3045         * MANIFEST: Ditto.
3046         * match.h: Ditto.
3047         * BUGS: Mention where to submit bugs.  Move old content...
3048         * TODO: ...to here.  New file.
3050 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3051         Fix most warnings, and suppress the ones we can't fix for now.
3052         * Make-lang.in: Suppress warnings about bad proto's in g95.h,
3053         these warnings just clutter the screen and there's not much
3054         we can do about them for now anyway.
3055         * check.c, iresolve.c: Mark unused function parameters.
3056         * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
3057         they should be resolved before they get here.
3058         * error.c: Remove unused FILE *status_out.
3059         * f95-lang.c (g95_init): Remove bogus cast.
3060         * Many files: Make things 'const' where required.
3061         * g95.h: Fix prototypes for all modified functions above.
3062         (g95_options): Remove 'object' member.
3064 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3066         * Make-file.in: Cleanup bogus targets.  Add more comment.
3067         * lang-options.h: New option '-w'.
3068         * g95.h: add no_options field to struct g95_options.
3069         * options.c (g95_init_options): Default no_warnings to off.
3070         (g95_parse_arg): Recognise the '-w' switch and its alias,
3071         '-fno-warnings'.
3072         * error.c (g95_warning, g95_warning_now): Don't emit warning if
3073         no_warning option is set.
3074         * iresolve.c (g95_resolve_shape): Fix warning.
3076 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3078         * primary.c (g95_next_string_char): Rename next_string_char, and
3079         make static.  Adjust callers accordingly.
3080         * resolve.c (resolve_generic_f0): Return try, not match.  Adjust
3081         callers accordingly.
3082         * g95.h: Split out all g95_match* functions to...
3083         * match.h: ...here. New file.
3084         * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
3085         matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
3087 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3089         * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
3090         g95_merge_new_implicit): New functions.
3091         (g95_match_implicit_none, g95_match_implicit): Move from here...
3092         * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
3093         Modify to use the new functions in symbol.c.
3094         * g95.h: Add and move prototypes.
3096 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3098         * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
3099         node compare function.
3100         (g95_insert_bbt): Likewise.
3101         (g95_insert_bbt_with_overlap): Likewise.
3102         (g95_delete_bbt): Likewise.
3103         (delete_treap): Likewise. Also fix a potential bug when calling it.
3104         * module.c (compare_pointers): Change proto to compare_fn.
3105         (compare_integers): Likewise.
3106         (compare_true_names): Likewise.
3107         (find_true_name): Adjust call to compare_true_names to match proto.
3108         (require_atom, write_atom, mio_name): Fix 'const' warnings.
3109         (init_pi_tree): Make compare a compare_fn instead of (int *).
3110         * resolve.c (compare_cases): Change proto to compare_fn.
3111         * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
3112         it static, and rename to compare_symtree.
3113         (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
3114         function.
3115         * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
3116         of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
3118 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3119         * Make-lang.in: Fix spaces/tabs issues from previous patch.
3120         * patch.options: Blow away Paul's checkin mistake :-)
3121         * io.c (terminate_io): Fix memory leak (Arnaud).
3123 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3125         * Make-lang.in: Teach about building DVI, info manual.
3126         * g95.texi: New file.
3128 2003-01-02  Paul Brook  <paul@nowt.org>
3130         * trans-array.c (g95_reverse_ss): Make static and don't use.
3131         (g95_conv_ss_descriptor): Don't use g95_loopinfo
3132         (g95_conv_array_parameters): Modify for pointer assignments.
3133         (g95_walk_subexpr): New function.
3134         (g95_walk_expr*): Use it.
3135         * trans-array.h (g95_reverse_ss): Remove prototype.
3136         * trans-expr.c (g95_trans_pointer_assign): Implement.
3137         (Many): Set se.want_pointer before calling g95_conv_array_parameter.
3138         * trans-intrinsic.c: Sync with scalarizer changes.
3139         * trans-io.c: Ditto.
3141 2002-12-29  Paul Brook  <paul@nowt.org>
3143         * trans-array.c: Document calling convention for arrays.
3145 2002-12-19  Paul Brook  <paul@nowt.org>
3147         * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
3148         assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
3149         optional parameters for some intrinsics.
3150         (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
3151         * trans-expr.c (g95_conv_function_call): Pass NULL for absent
3152         optional parameters.
3153         * trans.h (g95_se): Add ignore_optional flag.
3155 2002-12-15  Paul Brook  <paul@nowt.org>
3157         * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
3158         * trans-decl.c (g95_generate_function_code): Use TDI_original.
3160 2002-12-14  Paul Brook  <paul@nowt.org>
3162         * trans-stmt.c (g95_trans_call): Use resolved symbol name.
3164 2002-12-12  Paul Brook  <paul@nowt.org>
3166         * trans-array.c (g95_trans_array_constructor_subarray): Fully
3167         initialize the scalarizer.
3168         (various): Update to new format of g95_expr->value.constructor.
3170 2002-12-08  Paul Brook  <paul@nowt.org>
3172         * trans-array.c (g95_put_offset_into_var): New function.
3173         (g95_trans_array_constructor_subarray): New function.
3174         (g95_trans_array_constructor_value): Use it.
3175         (g95_array_cons_size): Don't abort() on array components.
3177 2002-12-08  Paul Brook  <paul@nowt.org>
3179         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
3180         * support.c: Update #includes.
3181         (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
3182         * trans-array.c: Update #includes.
3183         * trans.c: Ditto.
3184         * trans-const.c: Ditto.
3185         * trans-io.c: Ditto.
3186         * trans-types.c: Ditto.
3187         (g95_init_types): Set size_type_node.
3188         * trans-decl.c: Update #includes.
3189         (gfor_fndecl_adjust{l,r}): Declare and initialize.
3190         * trans-stmt.c: Update #includes.
3191         (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
3192         (g95_trans_select): Fix check for unbounded ranges.
3193         * trans-expr.c: Update #includes.
3194         (g95_conv_string_tmp): New function.
3195         (g95_conv_concat_op): Use it.
3196         * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
3197         * Trans-intrisic.c: Update #includes.
3198         (g95_conv_intrinsic_strcmp): New function.
3199         (g95_conv_intrinsic_adjust): Ditto.
3200         (g95_conv_intrinsic_function: Use them.
3202 2002-11-30  Paul Brook  <paul@nowt.org>
3204         * trans-array.c (g95_walk_function_expr): Handle non-array return by
3205         reference.
3206         * trans-dec.c (g95_build_function_decl): Handle character return
3207         parammeters.
3208         (g95_get_fake_result_decl): Ditto.
3209         (g95_trans_deferred_vars): Ditto.
3210         * trans-expr.c (g95_conv_function_call): Ditto.
3211         (g95_trans_arrayfunc_assign) Limit to array valued functions.
3212         * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
3213         (g95_conv_intrinsic_function): Use it.
3214         * trans-types.c (g95_sym_type): Handle functions returning strings.
3215         (g95_return_by_reference): Ditto.
3216         (g95_get_function_type): Ditto.
3218 2002-11-18  Paul Brook  <paul@nowt.org>
3220         * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
3221         requires a temporary.
3222         (g95_trans_select): Handle computed gotos.
3223         * trans-types.c (g95_build_array_type): Warn about non-functional
3224         assumed shape arrays.
3225         * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
3226         blocks.
3227         * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
3228         (g95_conv_intrinsic_int): New function.
3229         (g95_conv_intrinsic_mod): New function.
3230         (g95_conv_intrinsic_ichar): New function.
3231         (g95_conv_intrinsic_function): Use them.
3232         (g95_conv_intrinsic_dim): Use g95_evaluate_now.
3234 2002-11-17  Toon Moene  <toon@moene.indiv.nluug.nl>
3236         * trans-types.c (g95_build_array_type): Assumed
3237         sized arrays can have rank > 1.
3238         * trans.c (g95_trans_code): Remove erroneous
3239         warning about CONTINUE.
3240         * trans-expr.c (g95_conv_variable): Remove
3241         erroneous assert.
3243 2002-11-15  Paul Brook  <paul@nowt.org>
3245         * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
3247 2002-10-31  Paul Brook  <paul@nowt.org>
3249         * f95-tree.c: Remove tree copying stuff that's now in gimple.c
3250         * trans-expr.c (g95_conv_component_ref): Handle character string
3251         components.
3252         (g95_conv_string_parameter): Ditto.
3253         * trans-types.c (g95_get_derived_type): Add length decl to caracter
3254         string components.
3256 2002-10-10  Paul Brook  <paul@nowt.org>
3258         * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
3259         * trans-expr.c (g95_conv_function_call): Remove unreliable return value
3260         check.
3261         * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
3262         (g95_conv_intrinsic_function): Handle size and shape intrinsics.
3263         (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
3264         * trans-types.c (pvoid_type_node): Declare and initialize.
3265         * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
3266         (g95_array_allocate): Fix when base==data.
3267         (g95_conv_array_parameter): Correctly handle reduced rank sections.
3268         * trans-io.c (g95_trans_write): Correctly handle string modifiers.
3270 2002-10-09  Paul Brook  <paul@nowt.org>
3272         * (g95_conv_expr_reference): Handle character strings correctly.
3274 2002-10-07  Paul Brook  <paul@nowt.org>
3276         (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
3277         langhook.
3278         * trans-array.c (g95_build_array_initializer): Remove.
3279         (g95_conv_array_initializer): New Function.
3280         (g95_trans_auto_arry_allocation): Cleanup.
3281         (g95_trans_init_character_array): Remove.
3282         * g95spec.c: Link in libgforbegin.
3283         * trans.c (g95_generate_code): Rename main function to MAIN__.
3284         (g95_create_var): New function.
3285         (g95_create_var_np): New function.
3286         (g95_evaluate_now): New function.
3287         (g95_start_block): New function.
3288         (g95_finish_block): New function.
3289         (g95_add_expr_to_block): New function.
3290         (g95_add_block_to_block): New function.
3291         * trans-expr.c (g95_conv_componen_ref): New function.
3292         * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
3293         (F95_OBJS): Add dependency.o.
3294         * f95-lang.c (g95_is_simple_stmt): Remove.
3295         * f95-tree.c (mark_not_simple): New function.
3296         (unshare_all_trees): New function.
3297         (create_tmp_var, create_tmp_alias_var): Remove.
3298         * support.c (declare_tmp_vars, tree_last_decl): Remove.
3299         * trans*: Convert to new IR using GENERIC trees.  Don't bother about
3300         SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
3302 2002-10-01  Paul Brook  <paul@nowt.org>
3304         * trans-array.c: Add support for descriptorless arrays.
3305         (g95_conv_array_data): New function.
3306         (g95_conv_array_base): New function.
3307         * trans-array.h: Declare these here.
3308         * trans-decl.c(g95_create_mopdule_variable): Perform variable
3309         initialization and creation here.
3310         (g95_create_module_vars): Instead of here.
3311         * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
3312         * trans-intrinsic.c: Ditto.
3313         * trans-types.c (g95_is_nodesc_array): New function.
3314         (g95_get_nodesc_array_type): New function.
3315         (g95_sym_type, g95_get_derived_type): Use them.
3316         * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
3318 2002-09-28  Paul Brook  <paul@nowt.org>
3320         * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
3321         * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
3322         parameters.
3324 2002-09-24  Paul Brook  <paul@nowt.org>
3326         * f95-lang.c (listify): Remove declaration.
3327         (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
3328         (listify)
3329         * f95-tree.c (get_name): New function.
3330         * trans.c (module_namespace): Remove.
3331         * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
3332         * trans-types.c: Ditto.
3334 2002-09-19  Paul Brook  <paul@nowt.org>
3336         * trans-array.c (g95_get_array_cons_size): New Function.
3337         (g95_con_ss_startstride): Handle Array constructors.
3338         (g95_conv_loop_setup): Ditto.
3339         (g95_conv_array_parameter): Ditto.
3340         * tras-decl.c (g95_finish_var_decl): Make initializes variables
3341         static.
3343 2002-09-19  Paul Brook  <paul@nowt.org>
3345         * trans.c (g95_simple_fold_tmp): Detect variables inside
3346         NON_LVALUE_EXPR.
3347         * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
3349 2002-09-18  Steven Bosscher <s.bosscher@student.tudelft.nl>
3351         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
3353 2002-09-14  Paul Brook  <paul@nowt.org>
3355         * trans.c (g95_create_module_variable): Move to trans-decl.c.
3356         * trans-const.c (g95_conv_string_init): New Function.
3357         * trans-const.h: Declare it.
3358         * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
3359         variables. Don't bail on intrinsic symbols.
3360         (get_extern_function_decl): Handle specific intrinsic functions.
3361         * trans-types.c (g95_sym_type): Dummy functions don't return
3362         reference types.
3363         * trans-array.c (g95_build_array_initializer): New Function.
3364         (g95_trans_auto_array_allocation): Build initializer for static decls.
3365         Don't use mpz_addmul, it's GMP4 only.
3367 2002-09-12  Paul Brook  <paul@nowt.org>
3369         * trans-decl.c (g95_generate_code): Fix thinko with return variable.
3370         (g95_get_extern_function_decl, g95_build_function_decl): Mangle
3371         assembler names for module procedures.
3373 2002-09-11  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
3375         * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
3376         dependency/
3378 2002-09-10  Paul Brook  <paul@nowt.org>
3380         * trans-array.c: Change format of G95_SS_TEMP strictures.
3381         (g95_check_fncall_dependancy): New function.
3382         (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
3383         offsets.
3384         * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
3385         result variables.
3386         (g95_build_function_decl): Don't assume result arrays are packed.
3387         (g95_trans-deferred-vars): Handle array result variables.
3388         (g95_generate_fuction_code): Clear saved_function_decls.
3389         * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
3390         reference.
3391         (g95_trans_arrayfunc_assign): New function.
3392         (g95_trans_assignment): Use it.
3393         * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
3394         (g95_se): Add direct_byref.
3395         * trans-types.c: Use sym->result rather than sym where appropriate.
3396         * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
3397         Update other functions to use this.
3398         (g95_is_intrinsic_libcall): New function.
3399         (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
3400         (g95_walk_intrinsic_function): Ditto.
3402 2002-09-08  Paul Brook  <paul@nowt.org>
3404         * trans-types.c: Change rank field to dtype field in array descriptor.
3405         * trans-array.c: Implement filling of dtype array descriptor field.
3406         * trans-intrinsic.c: Fix broken LEN intrinsic.
3408 2002-09-07  Paul Brook  <paul@nowt.org>
3410         * trans-intrinsic.c: Remove outdated todo intrinsic list.
3411         (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
3412         (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
3414 2002-09-06  Paul Brook  <paul@nowt.org>
3416         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
3417         (gt-f95-trans-types.h): Add dependancy information.
3418         * config-lang.in (gtfiles): Add trans-types.c
3419         * f95-lang.c (g95_be_parse_file): Pass error and warning counts
3420         back to top-level code.
3421         * trans-array.c, trans-types.c: Change format of array descriptor.
3422         (g95_conv_descriptor_dimension): New function.
3423         * trans-types.h (g95_conv_descriptor_rank): define.
3424         * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
3425         intrinsics.
3427 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
3429         * trans-array.c, trans-types.c: Add rank information to descriptor.
3431 2002-09-06  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
3433         * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
3435 2002-09-04  Paul Brook  <paul@nowt.org>
3437         * f95-lang.c (g95_create_decls): New function.
3438         (g95_init):  Move initialization of external decls to above, and call
3439         from g95_be_parse_file.
3440         * trans.c (g95_finish_stmt): Don't amputate the decl chain.
3441         * trans-types.c (g95_init_types): Always name integer and char types.
3442         (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
3444 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
3446         * Make-lang.in: Add options.c to F95_PARSER_OBJS
3448 2002-09-02  Paul Brook  <paul@nowt.org>
3450         * g95_generate_code: Clear the attr for __fortran_main.
3451         * trans-types.c (g95_finish_type): New function.
3452         * g95_init_io_state_type: Use g95_finish_type.
3453         * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
3455 2002-09-01  Paul Brook  <paul@nowt.org>
3457         * README.backend: Warn about the dangers of extra config.h files.
3458         Remove obsolete libgfor stuff.
3459         * config-lang.in: Add target-libgfor dependancy.
3460         * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
3462 2002-09-01  Toon Moene  <toon@moene.indiv.nluug.nl>
3464         * g95_conv_mpz_to_tree: Free storage pointed to by q,
3465         not by buff.
3467 2002-08-30  Paul Brook  <paul@nowt.org>
3469         * trans-intrinsic.c (g95_conv_intrinsic_function,
3470         g95_walk_intrinsic_function): Added ANY and ALL.
3471         (g95_conv_intrinsic_anyall): New function.
3472         * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in
3473         mangled name