* arith.c (gfc_range_check): Fix logic error.
[official-gcc.git] / gcc / fortran / ChangeLog
blob9eed0e926e48823a87f690430bcca71b281219a2
1 2004-05-16  Paul Brook  <paul@codesourcery.com>
3         * arith.c (gfc_range_check): Fix logic error.
5 2004-05-16  Steve Kargl  <sgk@troutmask.apl.washington.edu>
7         * arith.c: Fix comment typos.
9 2004-05-15  Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
11         PR fortran/13742
12         * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
13         not initialized in a disallowed fashion.
14         * match.c (gfc_match_common): Likewise.
15         (var_element): Verify that variable is not in the blank COMMON,
16         if it is in a common. 
18 2004-05-15  Joseph S. Myers  <jsm@polyomino.org.uk>
20         * Make-lang.in (f95.generated-manpages): Remove.
21         (f95.srcextra): New.
22         (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
23         f95.maintainer-clean): Generate info and dvi files in objdir/doc.
24         (f95.dvi): Remove.
25         (dvi): New.
26         (f95.install-info): Remove.
27         (install-info): New.
29 2004-05-15  Victor Leikehman  <lei@haifasphere.co.il>
31         * decl.c (add_init_expr_to_sym): Check for variable size arrays.
33 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
35         * primary.c (match_boz_constant): Use gfc_notify_std() for
36         issuing a warning or an error.
38 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
40         PR fortran/13826
41         * primary.c (match_structure_constructor): Rename ...
42         (gfc_match_structure_constructor): ... to this. Make non-static.
43         (gfc_match_rvalue): Call renamed function.
44         * match.h (gfc_match_structure_constructor): Declare.
45         * match.c (gfc_match_data_constant): Handle structure
46         constructor.
48 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
50         PR fortran/13702 
51         (Port from g95)
52         * gfortran.h (gfc_linebuf): New typedef.
53         (linebuf): Remove.
54         (gfc_file): Revamped, use new gfc_linebuf.
55         (locus): Revamped, use new types.
56         (gfc_current_file): Remove.
57         (gfc_current_form, gfc_source_file): New global variables.
58         * match.c (gfc_match_space, gfc_match_strings): Use
59         gfc_current_form to find source form.
60         * module.c (gfc_dump_module): Use gfc_source_file when printing
61         module header.
62         * error.c (show_locus, show_loci) Use new data structures to print
63         locus.
64         * scanner.c (first_file, first_duplicated_file, gfc_current_file):
65         Remove.
66         (file_head, current_file, gfc_current_form, line_head, line_tail,
67         gfc_current_locus1, gfc_source_file): New global variables.
68         (gfc_scanner_init1): Set new global variables.
69         (gfc_scanner_done1): Free new data structures.
70         (gfc_current_locus): Return pointer to gfc_current_locus1.
71         (gfc_set_locus): Set gfc_current_locus1.
72         (gfc_at_eof): Set new variables.
73         (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
74         to new locus structure.
75         (gfc_check_include): Remove.
76         (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
77         (gfc_skip_comments): Use gfc_current_form, find locus with
78         gfc_current_locus1.
79         (gfc_next_char): Use gfc_current_form.
80         (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
81         (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
82         comment formatting.
83         (get_file): New function.
84         (preprocessor_line, include_line): New functions.
85         (load_file): Move down, rewrite to match new data structures.
86         (gfc_new_file): Rewrite to match new data structures.
87         * parse.c (next_statement): Remove code which is now useless. Use
88         gfc_source_form and gfc_source_file where appropriate.
89         * trans-decl.c (gfc_get_label_decl): adapt to new data structures
90         when determining locus of frontend code.
91         * trans-io.c (set_error_locus): Same.
92         * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
93         * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
94         preprocessor flags.
95         (all): Add missing initializers.
97 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
99         * Make-lang.in (trans-common.o): Remove redundant dependency.
100         (data.c): Replace object file name ...
101         (data.o): ... by the correct one.
103 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
105         * dump-parse-tree.c (gfc_show_array_ref): Print colon only
106         for ranges when dumping array references.
108 2004-05-14  Victor Leikehman  <lei@haifasphere.co.il>
110         * decl.c (variable_decl): Always apply default initializer.
112 2004-05-08  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
114         PR fortran/15206
115         * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
116         handle zero correctly.
118 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
120         * match.c (gfc_match): Eliminate dead code.
122 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
124         * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
125         Detect bad continuation line in fixed form sources.
127 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
129         PR fortran/15205
130         * iresolve.c (gfc_resolve_nearest): Add new function.
131         * intrinsic.h: ... declare it here.
132         * intrinsic.c (add_functions): ... add it as resolving function
133         for NEAREST.
134         
135 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
137         PR fortran/14066
138         * match.c (gfc_match_do): Allow infinite loops with
139         label-do-stmt. Do not enforce space after comma.
141 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
143         PR fortran/15051
144         * parse.c (parse_interface): Allow empty INTERFACE, remove
145         seen_body.
147 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
149         * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
150         decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
151         expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
152         intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
153         matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
154         primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
155         trans-array.c, trans-array.h, trans-common.c, trans-const.c,
156         trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
157         trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
158         trans-types.h, trans.c, trans.h: Update copyright years and
159         boilerplate.
160         * data.c: Likewise, also removed two whitespace-only lines.
161         * gfortranspec.c, lang.opt: Update copyright years.
163 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
165         PR fortran/14568
166         * trans-decl.c (generate_local_decl): Don't warn for unused
167         variables which are in common blocks. 
169 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
171         * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
172         trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
173         trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
175 2004-05-13  Victor Leikehman  <lei@haifasphere.co.il>
177         PR fortran/15314
178         * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
180 2004-05-13  Joseph S. Myers  <jsm@polyomino.org.uk>
182         * gfortran.texi: Use @table @emph instead of @itemize @emph.
183         Remove "set DEVELOPMENT".
184         (Compiling GFORTRAN): Remove.
186 2004-05-09  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
188         * array.c (match_subscript, match_array_ref): Add comments
189         explaining argument 'init'.
190         * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
191         trans-expr.c, trans.c: Fix some typos in comments.
192         * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
193         * primary.c (match_digits, match_integer_constant): Add comment
194         explaining signflag.
196 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
198         PR fortran/13940
199         * primary.c: Include system.h and flags.h, needed for pedantic.
200         (match_boz_constant): Allow "x" for hexadecimal constants, warn if
201         pedantic is set.
203 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
205         PR fortran/13940
206         * match.c (match_data_constant): Handle case where
207         gfc_find_symbol sets sym to NULL
209 2004-04-28  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
211         * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
212         dependency on mathbuiltins.def
214 2004-04-24  Victor Leikehman  <lei@il.ibm.com>
216         * trans-io.c (transfer_expr): Implemented recursive printing
217         of derived types.
219 2004-04-24  Andrew Pinski  <pinskia@physics.uc.edu>
221         * gfortranspec.c: Do not include multilib.h.
223 2004-04-24  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
225         * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
226         2004 to copyright years.
227         * trans-expr.c, trans-decl.c: Comment update, we now generate
228         GENERIC, not SIMPLE. Add 2004 to copyright years.
230 2004-04-24  Paul Brook  <paul@codesourcery.com>
232         * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
234 2004-04-24  Feng Wang  <fengwang@nudt.edu.cn>
236         PR 14817
237         * arith.c (gfc_arith_divide): Fix complex divide.
239 2004-04-23  Andrew Pinski  <pinskia@physics.uc.edu>
241         * gfortranspec.c: Include the target headers.
243 2004-04-18  Feng Wang  <fengwang@nudt.edu.cn>
245         PR fortran/14921
246         PR fortran/14540
247         * arith.c (arctangent2): New function.
248         * arith.h (arctangent2): Add function prototype.
249         * simplify.c (gfc_simplify_atan2): Use it.
250         (gfc_simplify_log): Use it.
252 2004-04-12  Diego Novillo  <dnovillo@redhat.com>
254         * fortran/f95-lang.c (gfc_expand_stmt): Remove.
255         (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
257 2004-04-11  Bud Davis  <bdavis9659@comcast.net>
259         PR fortran/14872
260         * trans-io.c (build_dt): Change REC to value.
262 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
264         PR 14394 
265         * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
266         the real value when converting mpf to string.
268 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
270         PR 14395
271         * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
272         the result.
274 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
276         PR fortran/14377
277         * simplify.c (simplify_min_max): Convert the type of the result.
279 2004-04-11  Paul Brook  <paul@codesourcery.com>
281         * gfortran.texi: Use full target triplet.
283 2004-04-11  Paul Brook  <paul@codesourcery.com>
285         * Make-lang.in (GFORTRAN_TEXI): Set it.
286         (fortran/dfortran.dvi): Use it.  Add fortran to include paths.
287         (fortran/gfortran.info): Ditto. 
288         * gfortran.texi: Major update.
289         * invoke.texi: New file.
291 2004-04-10  Paul Brook  <paul@codesourcery.com>
293         * trans-array.c (gfc_trans_allocate_temp_array,
294         gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
295         * trans-decl.c (gfc_build_dummy_array_decl,
296         gfc_get_symbol_decl, gfc_build_function_decl,
297         gfc_create_module_variable): Ditto.
298         * trans-expr.c (gfc_conv_variable): Ditto.
299         * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
300         * trans.h (GFC_DECL_STRING): Remove.
301         (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
302         GFC_DECL_ASSIGN): Renumber flags.
304 2004-04-05  Paul Brook  <paul@codesourcery.com>
306         PR 13252
307         PR 14081
308         * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
309         and stack_restore.
310         * gfortran.h (struct gfc_charlen): Add backend_decl.
311         * trans-array.c (gfc_trans_allocate_temp_array,
312         gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
313         (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
314         Remove old, broken string handling.
315         (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
316         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
317         gfc_trans_deferred_array): Handle character arrays.
318         * trans-const.c (gfc_conv_const_charlen): New function.
319         * trans-const.h (gfc_conv_const_charlen): Add prototype.
320         * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
321         as static.
322         (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
323         (gfc_create_string_length): New function.
324         (gfc_get_symbol_decl): Create lengths for character variables.
325         (gfc_get_fake_result_decl): Ditto.
326         (gfc_build_function_decl): Only set length for assumed length
327         character arguments.
328         (gfc_trans_dummy_character): New function.
329         (gfc_trans_auto_character_variable): Rewrite.
330         (gfc_trans_deferred_vars): Handle more types of character variable.
331         (gfc_create_module_variable): String lengths have moved.
332         (gfc_generate_function_code): Initialize deferred var chain earlier.
333         * trans-expr.c (gfc_conv_init_string_length): Rename ...
334         (gfc_trans_init_string_length):  ... to this.
335         (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
336         gfc_conv_function_call): Update to new format for character variables.
337         (gfc_conv_string_length): Remove.
338         (gfc_conv_string_parameter): Update assertion.
339         * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
340         * trans-io.c (set_string): Use new macro names.
341         * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
342         * trans-types.c (gfc_get_character_type): Use existing length expr.
343         (gfc_is_nodesc_array): Make public.
344         (gfc_get_dtype_cst): Rename ...
345         (gfc_get_dtype): ... to this.  Handle unknown size arrays.
346         (gfc_get_nodesc_array_type): Use new name.
347         (gfc_sym_type): New character variable code.
348         (gfc_get_derived_type): Ditto.
349         (gfc_get_function_type): Evaluate character variable lengths.
350         * trans-types.h (gfc_strlen_kind): Define.
351         (gfc_is_nodesc_array): Add prototype.
352         * trans.h: Update prototypes.
353         (struct lang_type): Update comments.
354         (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
355         (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
357 2004-04-04  Paul Brook  <paul@codesourcery.com>
359         * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
360         * options.c (gfc_init.options, gfc_handle_option): Ditto.
361         * trans-expr.c (gfc_conv_function_call): Ditto.
362         * trans-types.c (gfc_is_nodesc_array): Ditto
363         * lang.opt (fg77-calls): Remove.
365 2004-04-04  Paul Brook  <paul@codesourcery.com>
367         * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
368         (gfc_conv_descriptor_base): Rename ...
369         (gfc_conv_descriptor_offset): ... to this.
370         (gfc_trans_allocate_array_storage): Set offset to zero.
371         (gfc_conv_array_base): Rename ...
372         (gfc_conv_array_offset): ... to this.
373         (gfc_conv_array_index_ref): Add offset parameter.
374         (gfc_conv_array_ref): Include offset.
375         (gfc_trans_preloop_setup): Use existing offset.
376         (gfc_trans_allocate_temp_array,  gfc_array_allocate,
377         gfc_trans_auto_array_allocation, gfc_trans_g77_array,
378         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
379         gfc_conf_ss_descriptor): Set offset.
380         * trans-array.h: Rename prototypes.
381         * trans-const.h (gfc_index_zero_node): Define.
382         * trans-decl.c (gfc_build_qualified_array): Change base to offset.
383         * trans-types.c (gfc_get_array_type_bounds): Ditto.
384         (gfc_get_nodesc_array_type): Calculate offset before upper bound.
386 2004-03-25  Diego Novillo  <dnovillo@redhat.com>
388         * convert.c (convert): Don't handle WITH_RECORD_EXPR.
390 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
392         PR 14055
393         * arith.c (gfc_convert_integer,gfc_convert_real):  Removed leading '+'
394         before conversion by gmp library call.
396 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
398         PR 12921
399         * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
401 2004-02-24  Richard Henderson  <rth@redhat.com>
403         * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
405 2004-02-19  Loren J. Rittle  <ljrittle@acm.org>
407         * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
408         (fortran/gfortran.info): ... to here.
409         (f95.srcinfo): New.
411 2004-02-16  Richard Henderson  <rth@redhat.com>
413         * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
414         * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
415         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
416         (gfc_expand_function): Rename from expand_function_body, make static,
417         don't do anything except invoke tree_rest_of_compilation.
418         (gfc_be_parse_file): Invoke cgraph.
419         (gfc_expand_decl): Remove.
420         (gfc_init_builtin_functions): Add __builtin_init_trampoline and
421         __builtin_adjust_trampoline.
422         * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
423         (gfc_finalize): New.
424         (gfc_generate_function_code): Use it.  Lower nested functions.
425         * trans-expr.c (gfc_conv_function_call): Add static chain operand
426         to call_expr.
427         * trans.c (gfc_build_function_call): Likewise.
428         * trans.h (expand_function_body): Remove.
430 2004-02-15  Victor Leikehman  <lei@il.ibm.com>
432         PR gfortran/13433
433         * trans-decl.c (gfc_build_function_decl) For functions
434         returning CHARACTER pass an extra length argument,
435         following g77 calling conventions.
436         * trans-types.c (gfc_get_function_type) Ditto.
437         * trans-expr.c (gfc_conv_function_call) Ditto.
439 2004-02-14  Paul Brook  <paul@codesourcery.com>
441         * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
443 2004-02-12  Paul Brook  <paul@nowt.org>
445         * BUGS: Remove.
447 2004-02-08  Steve Kargl  <sgk@troutmask.apl.washington.edu>
449         * gfortran.texi: Fix typos.
451 2004-02-07  Bud Davis  <bdavis9659@comcast.net>
453         PR gfortran/13909
454         * intrinsic.c (add_conversions) Use logical conversion instead
455         of real.
456         * trans-types.c (gfc_get_logical_type) implemented logical*1
457         and logical*2.
459 2004-01-17  Paul Brook  <paul@codesourcery.com>
461         * lang-specs.h: Remove %<fixed-form.
463 2004-01-15  Toon Moene  <toon@moene.indiv.nluug.nl>
465         * lang-specs.h: Enable preprocessing of source files
466         ending in .F, .fpp, .FPP, .F90 and .F95.
468 2004-01-13  Toon Moene  <toon@moene.indiv.nluug.nl>
470         PR fortran/12912
471         * lang-specs.h: Enable compilation of files ending
472         in .f, .for and .FOR.
474 2004-01-11  Paul Brook  <paul@codesourcery.com>
476         * trans-stmt.c (gfc_trans_if_1): New function.
477         (gfc_trans_if): Use it.
479 2004-01-11  Erik Schnetter  <schnetter@uni-tuebingen.de>
481         * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
482         (gfc_option_t): Add max_identifier_length.
483         * lang.opt: Add fmax-identifier-length.
484         * match.c (parse_name): Use limit.
485         * options.c (gfc_init_options): Set max_identifier_length.
486         (gfc_handle_option): Ditto.
488 2004-01-11  Feng Wang  <fengwang@nudt.edu.cn>
490         * intrinsic.c (add_functions): Add resolve function to dcmplx.
491         * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
492         * iresolve.c (gfc_resolve_dcmplx): New function.
494 2004-01-10  Paul Brook  <paul@codesourcery.com>
496         * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
497         * trans-types.c (gfc_sym_type): Handle external dummy procedures.
498         (gfc_return_by_reference): Correct condition.
499         (gfc_get_function_type): Ditto.
501 2004-01-10  Paul Brook  <paul@codesourcery.com>
503         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
504         types.
506 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
508         * iresolve.c: Use correct kind.
510 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
512         PR fortran/13467
513         * trans-decl.c (gfc_create_module_variable):  Output array valued
514         parameters.
516 2004-01-10  Paul Brook  <paul@codesourcery.com>
518         * resolve.c (resolve_branch): Get error message right way round.
520 2004-01-10  Canqun Yang <canqun@nudt.edu.cn>
522         * trans-array (gfc_conv_loop_setup): Adjust comment to track
523         reality.
524         (gfc_array_allocate): Don't count size of element twice.
526 2004-01-04  Paul Brook  <paul@codesourcery.com>
528         * lang.opt (i8, r8, std=*): Remove RejectNegative.
530 2004-01-04  Paul Brook  <paul@codesourcery.com>
532         * error.c (gfc_notify_std): New function.
533         * gfortran.h (gfc_notify_std): Declare.
534         (GFC_STD_*): Define.
535         (gfc_option_t): Add warn_std and allow_std.
536         * intrinsic.c (gfc_init_expr_extensions): Fix logic.
537         (gfc_intrinsic_func_interface): Use gfc_notify_std.
538         * check.c (check_rest): Use gfc_notify_std.
539         * match.c (gfc_match_pause): Ditto.
540         (gfc_match_assign): Ditto.
541         (gfc_match_goto): Ditto.
542         * resolve.c (resolve_branch): Ditto.
543         * lang.opt: Add std=<foo> and w.
544         * options.c (gfc_init_options): Set allow_std and warn_std.
545         (gfc_handle_option): Handle OPT_std_* and OPT_w.
547 2004-01-01  Paul Brook  <paul@codesourcery.com>
549         * array.c (gfc_append_constructor): Take constructor, not expression.
550         * data.c (struct gfc_expr_stack): Remove.
551         (expr_stack): Remove.
552         (find_con_by_offset): Rename from find_expr_in_con.
553         (find_con_by_component): Rename from find_component_in_con.
554         (gfc_get_expr_stack): Remove.
555         (gfc_assign_data_value): Rewrite.
556         (gfc_expr_push): Remove.
557         (gfc_expr_pop): Remove.
558         (gfc_advance_section): Rename from
559         gfc_modify_index_and_calculate_offset.  Handle unbounded sections.
560         (gfc_get_section_index): Handle unbounded sections.
561         * gfortran.h: Update prototypes.
562         * resolve.c (check_data_variable): Array section maight not be the
563         last ref.
565 2004-01-01  Paul Brook  <paul@codesourcery.com>
567         PR fortran/13432
568         * resolve.c (resolve_symbol): Allow assumed length function results.
570 2004-01-01  Steve Kargl  <sgk@troutmask.apl.washington.edu>
572         * match.c (gfc_match_pause): Fix spelling.
574 2004-01-01  Steven Bosscher  <stevenb@suse.de>
576         PR fortran/13251
577         * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
578         reference from the expression.
580 2003-12-26  Feng Wang  <fengwang@nudt.edu.cn>
582         * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
583         dumping.
584         * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
585         (gfc_exec_op): New EXEC_LABEL_ASSIGN.
586         (symbol_attribute):New variable attribute: assign.
587         * io.c (resolve_tag):Integer variable is allowed.
588         (match_dt_format): Add ASSIGN statement. Set assign flag.
589         * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
590         (gfc_match_assign): Add ASSIGN statement. Set assign flag.
591         (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
592         * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
593         (next_statement): Add ST_LABEL_ASSIGNMENT.
594         (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
595         * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
596         (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
597         * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
598         * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
599         assign.  Put them into the stuct lang_decl.
600         * trans-io.c (set_string): Add the assign statement.
601         * trans-stmt.c (gfc_trans_label_assign): New function.
602         (gfc_trans_goto): Translate ASSIGNED GOTO statement.
603         * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
604         * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
605         * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
606         (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
607         (GFC_DECL_ASSIGN(node)): New macro to access flag.
609 2003-12-31  Huang Chun <chunhuang73@hotmail.com>
611         PR fortran/13434
612         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in 
613         minval/maxval.
615 2003-12-22  Toon Moene  <toon@moene.indiv.nluug.nl>
617         * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
618         that arguments to subroutines/functions can't alias themselves, nor global
619         memory.
621 2003-12-20  Steven Bosscher  <stevenb@suse.de>
623         * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
624         * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
626 2003-12-12  Huang Chun <chunhuang73@hotmail.com>
628         * primary.c (match_substring): Fix substring bug for start point
629         or end point is NULL.
630         * trans-expr.c (gfc_conv_substring): Ditto
631         * trans-types.c (gfc_sym_type): Get correct type of scalar 
632         character variables.
633         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in 
634         derived type.
636 2003-12-10  Richard Henderson  <rth@redhat.com>
638         * options.c (gfc_post_options): Don't ever use rtl inlining.
640 2003-12-05  Canqun Yang  <canqun@nudt.edu.cn>
642         * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
643         * trans-equivalence.c: Remove.
644         * trans-decl.c (gfc_get_symbol_decl): Update to match.
645         (gfc_generate_function_code): Ditto.
646         * trans-array.c (gfc_conv_array_parameter): Ditto.
647         * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
648         (F95_ADDITIONAL_OBJS): Add stor-layout.o
649         * trans.h (gfc_trans_equivalence): Remove.
650         * gfortran.h (struct gfc_equiv): Add used field.
651         (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
652         equiv_offset fields.
654 2003-12-05  Richard Henderson  <rth@redhat.com>
656         * trans.c (gfc_build_addr_expr): New.
657         (gfc_build_indirect_ref, gfc_build_array_ref): New.
658         * trans.h: Declare them.
659         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
660         trans-stmt.c, trans.c (*): Use them.
662         * f95-lang.c (gfc_post_options): Remove dead prototype.
663         * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
664         * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
665         allocation size.
667 2003-12-01  Feng Wang  <fengwang@nudt.edu.cn>
669         * io.c (gfc_match_format): Check for missing format label.
671 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
673         PR fortran/13155
674         * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
675         from interfaces in modules.
677 2003-11-30  Paul Brook  <paul@nowt.org>
679         * trans-array.c (gfc_trans_g77_array): Make non-static.
680         (gfc_trans_assumed_size): Remove.
681         (gfc_trans_dummy_array_bias): Explicitly free temporary.
682         * trans-array.h (gfc_trans_g77_array): Add prototype.
683         (gfc_trans_assumed_size): Remove.
684         * trans-decls.c (gfor_fndecl_push_context): Remove.
685         (gfor_fndecl_pop_context): Remove.
686         (gfc_build_function)decls): Don't create them.
687         (gfc_trans_deferred_vars): Update to match. Remove dead code.
688         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
690 2003-11-30  Kejia Zhao  <kejia_zh@nudt.edu.cn>
692         * trans-array.c (gfc_conv_array_parameter): Simplify
693         array argument passing for array name actual argument.
694         * trans-expr.c (gfc_conv_function_call): Ditto
695         * trans-types.c (gfc_is_nodesc_array):Ditto.
697 2003-11-30  Paul Brook  <paul@nowt.org>
699         * f95-lang.c (gfc_post_options): Move ...
700         * options.c (gfc_post_options): .. to here.  Handle inlining options.
701         * gfortran.h (gfc_post_options): Add prototype.
703 2003-11-28  Richard Henderson  <rth@redhat.com>
705         * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
707 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
709         * trans.h (has_alternate_specifier): New global variable.
710         * match.c (gfc_match_call): Handle actual arguments associated with
711         alternate return indicators.
712         * trans-expr.c (gfc_conv_function_call): Ditto
713         * trans-stmt.c (gfc_trans_call): Ditto
714         (gfc_trans_return): Handle return statement with value.
715         * trans-decl.c (gfc_generate_function_code): Handle functions with
716         asterisk dummy.
717         (gfc_get_fake_result_decl): Ditto
718         * trans-types.c (gfc_get_function_type): Ditto
719         * resolve.c (resolve_actual_arglist): Check alternate return indicators.
720         (resolve_formal_arglist): Check asterisk dummy.
722 2003-11-27  Paul Brook  <paul@nowt.org>
724         * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
725         allocation interface.
726         (gfc_conv_ array_parameter): Ditto.
727         (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
728         * trans-array.c: Update prototype.
729         * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
730         (gfc_trans_auto_character_variable): Use new memory alloc interface.
731         * trans-expr.c (gfc_conv_string_tmp): Ditto.
732         (gfc_conv_function_call): Use gfc_conv_string_tmp.
733         * trans-stmt.c (gfc_do_allocate):  Use new memory alloc interface.
734         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
735         * trans.h (gfc_ss_info): Remove unused pdata field.
736         * trans.c (gfc_create_var_np): Change T to V.
738 2003-11-26  Richard Henderson  <rth@redhat.com>
740         * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
741         * trans-intrinsic.c (gfc_intrinsic_map): ... here.  Add SCALE,
742         FRACTION, NEAREST, SET_EXPONENT.
743         (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
744         Fix GTY marking.  Remove unnecessary const's.
745         (LIBM_FUNCTION): Rename from I_LIB.
746         (LIBF_FUNCTION): New.
747         (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
748         conventions.  Assume the expr signature is correct.  Mark const.
749         (gfc_conv_intrinsic_exponent): Use library functions.
750         (gfc_conv_intrinsic_set_exponent): Remove.
751         (gfc_conv_intrinsic_scale): Remove.
752         (gfc_conv_intrinsic_nearest): Remove.
753         (gfc_conv_intrinsic_fraction): Remove.
754         (gfc_conv_intrinsic_function): Update.
755         * trans-decl.c (gfor_fndecl_math_exponent4): New.
756         (gfor_fndecl_math_exponent8): New.
757         (gfc_build_intrinsic_function_decls): Set them.
758         * trans.h: Declare them.
760 2003-11-25  Canqun Yang  <canqun@nudt.edu.cn>
762         * trans-common.c (gfc_layout_global_equiv): Locate the error for
763         underflow COMMON block.
764         (gfc_trans_one_common): Fix bug for size of COMMON block containing
765         EQUIVALENCE object. Also fix typo in an error message.
767 2003-11-25  Diego Novillo  <dnovillo@redhat.com>
769         * Make-lang.in: Add check-gfortran to lang_checks.
770         (check-f95): Alias for check-gfortran.
772 2003-11-25  Jason Merrill  <jason@redhat.com>
774         * Make-lang.in (f95.tags): Create TAGS.sub files in each
775         directory and TAGS files that include them for each front end.
777 2003-11-24  Paul Brook  <paul@nowt.org>
779         PR fortran/13154
780         * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
782 2003-11-24  Paul Brook  <paul@nowt.org>
784         * expr.c (simplify_const_ref): Return SUCCESS for things we don't
785         handle.
786         * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
788 2003-11-24  Paul Brook  <paul@nowt.org>
790         PR fortran/13105
791         * array.c (gfc_array_ref_shape): Handle elemental dimensions.
792         * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
794 2003-11-20  Richard Henderson  <rth@redhat.com>
796         * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
797         (gfc_conv_array_base): Likewise.
798         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
799         * trans-expr.c (gfc_conv_string_tmp): Likewise.
800         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
801         * trans-stmt.c (gfc_trans_character_select): Likewise.
803 2003-11-13  Paul Brook  <paul@nowt.org>
805         * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
807 2003-11-13  Canqun Yang  <canqun@nudt.edu.cn>
809         * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
810         (resolve_equivalence): New function.
811         (resolve_equivalence_derived): New function.
813 2003-11-12  Richard Henderson  <rth@redhat.com>
815         * trans.c (gfc_trans_code): Use annotate_with_locus instead of
816         annotate_all_with_locus.
818 2003-11-11  Canqun Yang  <canqun@nudt.edu.cn>
820         * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
821         * trans-decl.c (gfc_finish_var_decl): Modified.
823 2003-11-08  Paul Brook  <paul@nowt.org>
825         PR fortran/12704
826         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
827         arrays.
829 2003-11-06  Paul Brook  <paul@nowt.org>
831         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
833 2003-11-02  Canqun Yang  <canqun@nudt.edu.cn>
835         * match.c (gfc_match_stopcode): Assign '0' to stop_code.
837 2003-10-27  Anthony Green  <green@redhat.com>
839         * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
840         (f95.stagefeedback): Ditto.
842 2003-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
844         PR fortran/12682
845         * Make-lang.in (f95.stageprofile): Add.
846         (f95.stagefeedback): Add.
848 2003-10-23  Richard Henderson  <rth@redhat.com>
850         * f96-lang.c (gfc_gimplify_expr): Remove.
851         (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
852         (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
854 2003-10-23  Richard Henderson  <rth@redhat.com>
856         * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
858 2003-10-20  Paul Brook  <paul@nowt.org>
860         * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
861         * trans-stmt.c (gfc_trans_do_while): Ditto.
863 2003-10-17  Paul Brook  <paul@nowt.org>
865         * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
867 2003-10-17  Paul Brook  <paul@nowt.org>
869         * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
871 2003-10-17  Feng Wang  <wf_cs@yahoo.com>
873         * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
874         (gfc_resolve_minloc): Ditto.
875         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
876         Return the value after subtracting the lower bound.
878 2003-10-16  Richard Henderson  <rth@redhat.com>
880         * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
882 2003-10-16  Steven Bosscher  <steven@gcc.gnu.org>
884         * lang.c: Remove -M option for now, it's in the way for C.
886 2003-10-14  Jason Merrill  <jason@redhat.com>
888         * Make-lang.in (f95.tags): New rule.
890 2003-10-13  Richard Henderson  <rth@redhat.com>
892         * trans.c (gfc_trans_code): Use annotate_all_with_locus.
894 2003-10-13  Paul Brook  <paul@nowt.org>
896         * trans-decl.c (generate_local_decl): Don't create junk variables.
898 2003-10-13  Paul Brook  <paul@nowt.org>
900         * resolve.c (resolve_formal_arglist): Use function result decl in
901         preference to function decl.
903 2003-10-12  Richard Henderson  <rth@redhat.com>
905         * f95-lang.c (gfc_define_builtin): New const_p argument.  Set
906         TREE_READONLY.  Update all callers.
908 2003-10-12  Feng Wang  <wf_cs@yahoo.com>
910         * iresolve.c (gfc_resolve_cshift): Change to match implementation.
911         * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
912         (gfc_is_intrinsic_libcall): Add CSHIFT.
914 2003-10-12  Richard Henderson  <rth@redhat.com>
916         * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
917         (gfc_trans_array_constructor_value): Likewise.
918         (gfc_conv_array_initializer): Likewise.
919         * trans-stmt.c (gfc_trans_character_select): Likewise.
921 2003-11-12  Kejia Zhao  <kejia_zh@yahoo.com.cn>
923         * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
925 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
927         * check.c (gfc_check_repeat): Check arguments are scalar.
928         (gfc_check_trim): New function.
929         * intrinsic.h (gfc_check_trim): Add prototype.
930         * intrinsic.c (add_functions): Use it.
931         * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
932         Decalare.
933         * trans-decl.c: Ditto.
934         (gfc_build_intrinsic_fucntion_decls): Set them.
935         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
936         (gfc_conv_intrinsic_trim): New function.
937         (gfc_conv_intrinsic_repeat): New function.
938         (gfc_conv_intrinsic_function): Use them.
940 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
942         * trans-types.c (gfc_sym_type): Handle result variables.
944 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
946         * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
947         gfc_get_character_type.
949 2003-10-11  Feng Wang  <wf_cs@yahoo.com>
951         * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
953 2003-10-11  Paul Brook  <paul@nowt.org>
955         * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
956         (gfc_resolve_dprod): New function.
957         (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
958         * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
959         (gfc_resolve_dprod): Declare.
960         * intrinsic.c (add_functions): Use them.
961         * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
963 2003-10-06  Richard Henderson  <rth@redhat.com>
965         * f95-lang.c (gfc_init_builtin_functions): Add clzll.
966         * trans-intrinsic.c (call_builtin_clz): Use it.
968 2003-10-05  Paul Brook  <paul@nowt.org>
970         * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
971         * trans-decl.c (gfc_generate_function_code): Set
972         cfun->function_end_locus.
974 2003-09-24  Jason Merrill  <jason@redhat.com>
976         * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
977         TREE_LOCUS.
979 2003-09-21  Lifang Zeng  <zlf605@hotmail.com>
980         Paul Brook  <paul@nowt.org>
982         * Make-lang.in (F95_OBJS): Add fortran/data.o.
983         * array.c (gfc_inser_constructor): New function.
984         (gfc_get_constructor): New function.
985         (gfc_free_constructor): Initialize offset and repeat.
986         (iterator_stack): Remove.
987         (expand_info): Add offset, component and repeat fields.
988         (expand_constructor): Set them.
989         (expand): Set new fields.
990         (gfc_copy_constructor): Ditto. Avoid recursion.
991         * gfortran.h: Add prototypes for new functions.
992         (gfc_constructor): Add offset, component and repeat.
993         (iteratio_stack): Move to here.
994         * resolve.c (check_data_variable): Convert data values into variable
995         initializers.
996         (traverse_data_list): Build implicit loop chain.
997         (gfc_resolve): Ditto.
998         * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
999         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
1000         * trans-expr.c (gfc_conv_structure): Handle array initializers.
1001         (gfc_conv_expr): Update to match.
1002         * trans.h (gfc_conv_structure): Declare.
1003         * data.c: New file.
1005 2003-09-20  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1007         * trans.h: Add declarations for gfor_fndecl_si_kind and
1008         gfor_fndecl_sr_kind.
1009         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1010         * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
1011         (g95_conv_intrinsic_sr_kind): New function.
1012         (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
1013         SELECTED_REAL_KIND.
1015 2003-09-17  Lars Segerlund  <Lars.Segerlund@comsys.se>
1017         * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
1018         instead of _4 and _8 as postfix for libgfortran calls.
1020 2003-09-16  Paul Brook  <paul@nowt.org>
1022         * array.c (compare_bounds): New function.
1023         (gfc_compare_array_spec): Use it.
1025 2003-09-14  Paul Brook  <paul@nowt.org>
1027         * primary.c (gfc_match_rvalue): Make sure sym->result is set.
1028         * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
1030 2003-09-14  Paul Brook  <paul@nowt.org>
1032         * check.c (dim_rank_check): Allow assumed bounds if requested.
1033         (gfc_check_lbound): Call it.
1034         (gfc_check_ubound): Ditto.
1035         (gfc_check_size): Change to match.
1036         * simplify.c (gfc_simplify_bound): New function.
1037         (gfc_simplify_lbound): New function.
1038         (gfc_simplify_ubound): New function.
1039         * intrinsic.h: Declare them.
1040         * intrinsic.c (add_functions): Use them.
1042 2003-09-14  Paul Brook  <paul@nowt.org>
1044         * io.c (format_lex): Initialize negative_flag.
1045         (check_format): Intialize repeat.
1046         * trans-io.c (gfc_new_nml_name_expr): Declare static.
1047         (gfc_new_var_expr): Ditto.
1049 2003-09-14  Paul Brook  <paul@nowt.org>
1051         * trans-array.c (gfc_conv_array_initializer): Handle derived types.
1052         * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
1054 2003-09-12  Paul Brook  <paul@nowt.org>
1056         * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
1058 2003-09-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
1060         * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
1061         for a correct expression.
1063 2003-09-10  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1065         * trans-intrinsic.c (real_compnt_info): New struct.
1066         (prepare_arg_info): New function.
1067         (gfc_conv_intrinsic_set_exponent): New function.
1068         (gfc_conv_intrinsic_scale): New function.
1069         (gfc_conv_intrinsic_nearest): New function.
1070         (gfc_conv_intrinsic_fraction): New function.
1071         (gfc_conv_intrinsic_exponent): New function.
1072         (gfc_conv_intrinsic_spacing): New function.
1073         (gfc_conv_intrinsic_rrspacing): New function.
1074         (gfc_conv_intrinsic_function): Use them.
1076 2003-08-24 XiaoQiang Zhang  (zhangapache@yahoo.com>
1078         * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for 
1079         build_int_2 changed from (high, low) to (low, high).
1080         * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
1081         ioparm_namelist_read_mode, iocall_set_nml_val_int,
1082         iocall_set_nml_val_float, iocall_set_nml_val_char,
1083         iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
1084         (gfc_build_io_library_fndecls): Add variable initialization.
1085         (gfc_new_nml_name_expr, get_new_var_expr): New function.
1086         (build_dt): Add namelist support.
1087         * io.c (value): New variable.
1088         (check_format): Support FMT_H now.
1090 2003-09-07  Paul Brook  <paul@nowt.org>
1092         * io.c (gfc_resolve_dt): Error if format label is not defined.
1094 2003-09-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1096         * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is 
1097         about case_switch's break. The other is about building the condition 
1098         statement tree, which judges the argument in the range of the 
1099         corresponding integer type.
1100         * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
1101         for the large values.
1103 2003-09-05  Paul Brook  <paul@nowt.org>
1105         * f95-lang.c (expand_function_body): Gimplify the function.
1107 2003-09-04  Jeff Law  <law@redhat.com>
1109         * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
1110         index zero!
1112 2003-09-04  Paul Brook  <paul@nowt.org>
1114         * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
1115         (gfc_expand_stmt): New function.
1116         (LANG_HOOKS_RTL_EXPAND_STMT): Define.
1117         (expand_function_body): Use tree_rest_of_compilation.
1118         * trans-decl.c (gfc_generate_function_code): Don't free cfun.
1120 2003-09-03  Jeff Law  <law@redhat.com>
1122         * f95-lang.c (gfc_init_builtin_functions): C arrays start at
1123         index zero!
1125 2003-08-30  Paul Brook  <paul@nowt.org>
1127         * f95-lang.c (builtin_function): Remove #if 0 code.
1128         (gfc_define_builtin): New function.
1129         (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
1130         * mathbuiltins.def: New file.
1131         * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
1132         (gfc_intrinsic_map): Use mathbuiltins.def.
1133         (gfc_intrinsic_builtin_t): Remove.
1134         (gfc_build_intrinsic_lib_fndecls): Update.
1135         * trans-types.c (gfc_init_types): Remove redundant initilaization of
1136         signed_size_type_node.
1138 2003-08-29  Paul Brook  <paul@nowt.org>
1140         * arith.c (gfc_real_kinds): Use correct minimum exponents.
1142 2003-08-22  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1144         * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
1145         (gfc_conv_intrinsic_function): Add MODULO.
1147 2003-08-22  Jason Merrill  <jason@redhat.com>
1149         * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
1151 2003-08-22  Andreas Jaeger  <aj@suse.de>
1153         * Make-lang.in (f95.install-common): Add DESTDIR support.
1154         * (f95.install-info): Likewise.
1155         (f95.uninstall): Likewise.
1157 2003-08-19  Diego Novillo  <dnovillo@redhat.com>
1159         * trans-types.c (gfc_init_types): Initialize
1160         signed_size_type_node with size_type_node.
1162 2003-08-18  Paul Brook  <paul@nowt.org>
1164         * dependency.c (gfc_dependency): New enum.
1165         (check_another_array_ref): Remove.
1166         (gfc_get_array_from_component): Remove.
1167         (get_x): Remove.
1168         (get_range): Remove.
1169         (get_no_of_elements): Use mpz_t, not mpf_t.
1170         (transform_sections): New function.
1171         (gfc_check_range_range): Rename ...
1172         (gfc_check_section_vs_section): ... to this.  Use new function.
1173         (gfc_is_inside_range): Rewrite to match.
1174         (gfc_check_element_vs_section): Ditto.
1175         (gfc_check_element_vs_element): Ditto.
1176         (get_deps): Ditto.
1177         (gfc_dep_resolver): Ditto.  Remove unused parameter.
1178         * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
1179         gfc_check_element_vs_element, gfc_is_inside_range,
1180         gfc_get_array_from_component): Remove prototypes for static functions.
1181         (gfc_dep_resolver): Update prototype.
1182         * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
1184 2003-08-15  Paul Brook  <paul@nowt.org>
1186         * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
1187         return values to parent scope.
1188         (gfc_build_dummy_array_decl): Ditto.
1190 2003-08-14  Paul Brook  <paul@nowt.org>
1192         * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
1193         size of the type, not the pointer.
1194         * resolve.c (resolve_symbol): Give more accurate error message.
1196 2003-08-10  Paul Brook  <paul@nowt.org>
1198         * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
1200 2003-08-10  Paul Brook  <paul@nowt.org>
1202         * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
1203         type components.
1205 2003-08-10  Chun Huang  <compiler@sohu.com>
1207         * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
1208         (resolve_symbol): Ditto.
1209         * trans-expr.c (gfc_conv_statement_function): New function.
1210         (gfc_conv_function_expr): Use it.
1212 2003-08-10  Paul Brook  <paul@nowt.org>
1214         * trans-array.c (gfc_conv_ss_startstride): Handle functions.
1215         (walk_function_expr): Set section rank.
1216         * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
1218 2003-08-10  Paul Brook  <paul@nowt.org>
1220         * intrinsic.c (add_sym): Prefix names with correct string.
1221         (add_sym_0s): New function.
1222         (add_subroutines): Register abort.
1224 2003-08-10  Erik Schnetter  <schnetter@uni-tuebingen.de>
1226         * gfortran.h: Introduce options to control the mangling.
1227         * lang.opt: Likewise.
1228         * options.c (gfc_init_options): Handle the options.
1229         * trans-common.c (gfc_sym_mangled_common_id): New function.
1230         (gfc_build_common_decl): Call it.
1231         * trans-decl.c (gfc_sym_mangled_function_id): New function.
1232         (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
1234 2003-08-09  Paul Brook  <paul@nowt.org>
1236         * module.c (mio_symbol): Always ouput a namespace for formal args.
1237         (load_needed): Namespace now belong to their proper symbol.
1238         (gfc_dump_module): Change G95=>GFORTRAN.
1240 2003-08-05  Paul Brook  <paul@nowt.org>
1242         * options.c: Force -fg77-calls.
1244 2003-08-02  Paul Brook  <paul@nowt.org>
1246         * Makelang.in: Rename G95_* to GFORTRAN_*.
1247         * All sources: Rename G95_* to GFC_*.
1249 2003-08-01  Paul Brook  <paul@nowt.org>
1251         * fortran/Make-lang.in: Use GMPLIBS.
1252         * fortran/config-lang.in: Set need_gmp.
1253         * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
1255 2003-07-27  Andreas Jaeger  <aj@suse.de>
1257         * trans-decl.c (gfc_generate_constructors): Convert prototype to
1258         ISO C90.
1259         * trans-const.c (gfc_init_constants): Likewise.
1260         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
1262         * gfortranspec.c: Convert to ISO C90.
1263         (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
1265 2003-07-26  Paul Brook  <paul@nowt.org>
1267         * lang.opt: Add -fdump-parse-tree.
1268         * options.c (gfc_handle_option): Ditto.
1269         * resolve.c (resolve_forall_iterators): Convert to proper type.
1270         * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
1272 2003-07-26  Paul Brook  <paul@nowt.org>
1274         * Makefile.in: Add build dependencies on files common with rest of gcc.
1276 2003-07-26  Lifang Zeng  <zlf605@hotmail.com>
1278         * trans.h: Declare g95_trans_pointer_assignment.
1279         * trans-expr.c (g95_trans_pointer_assignment): New function.
1280         (g95_trans_pointer_assign): Use it.
1281         * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
1282         (g95_trans_pointer_assign_need_temp): New function.
1284 2003-07-26  Paul Brook  <paul@nowt.org>
1286         * gfortran.texi: Replace references to g95.
1288 2003-07-26  Paul Brook  <paul@nowt.org>
1290         Rename g95_* to gfc_*.
1292 2003-07-25  Paul Brook  <paul@nowt.org>
1293         
1294         * gfortran.h: Rename from g95.h.
1295         * trans-types.c (boolean_type_node, booelan_true_node,
1296         boolean_false_node): Remove.
1297         * trans-types.h: Ditto.
1299 2003-07-25  Chun Huang  <compiler@sohu.com>
1301         * parse.c (accept_statement): Implement BLOCK DATA statement.
1302         * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
1303         variables.
1305 2003-07-24  Lifang Zeng  <zlf605@hotmail.com>
1307         * trans-stmt.c (temporary_list): Define.
1308         (g95_trans_assign_need_temp): New function.
1309         (g95_trans_forall_1): Modified for WHERE.
1310         (g95_trans_where_assign): Modified.
1311         (g95_trans_where_2): Modified.
1312         (g95_evaluate_where_mask): Modified.
1313         (g95_trans_where): Modified.
1314         (g95_get_temp_expr): Removed.
1315         (g95_add_to_where_stmt_list): Removed.
1316         (compute_overall_iter_number): Modified for WHERE.
1317         * trans.h: Remove where_stmt_list.
1319 2003-07-24  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1321         * lang.opt: Correct description of options -J and -M.
1323 2003-07-23  Steven Bosscher   <steven@gcc.gnu.org>
1325         * lang.opt: Move help text to here.
1326         * lang-options.h: Remove.
1328 2003-07-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1329         * iresolve.c (g95_resolve_transpose): Proper variable in switch.
1330         * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
1331         on kind.
1333 2003-07-22  Steven Bosscher  <steven@gcc.gnu.org>
1334         Paul Brook  <paul@nowt.org>
1336         * check.c (check_rest): Use global pedantic flag.
1337         * io.c (data_desc): Ditto.
1338         * error.c (g95_warning, g95_warning_now): Use global flag.
1339         * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
1340         (expand_function_body): Update to new prototypes.
1341         (g95_init): Use new option names.
1342         * g95.h (g95_option_t): Standardize names.
1343         (g95_init_options, g95_handle_option): Update prototypes.
1344         * interface.c: Use new option names.
1345         * match.c: Ditto.
1346         * module.c: Ditto.
1347         * parse.c: Ditto.
1348         * primary.c: Ditto.
1349         * resolve.c: Ditto.
1350         * scanner.c: Ditto.
1351         * simplify.c: Ditto.
1352         * symbol.c: Ditto.
1353         * trans-array.c: Ditto.
1354         * trans-expr.c: Ditto.
1355         * trans-types.c: Ditto.
1356         * trans-decl.c: Ditto.
1357         (g95_build_library_function_decl): Remove obsolete VPARAMS.
1358         * trans.h: Ditto.
1359         * options.c (g95_display_help): Remove.
1360         (g95_init_options): Convert to new scheme.
1361         (set_Wall): Ditto
1362         (g95module_option): Ditto, rename from g95_parse_arg.
1363         (g95_handle_module_path_options): New function.
1364         * trans-equivalence.c: Fix error message.
1365         * lang.opt: Corrections.
1367 2003-07-21  Steven Bosscher  <steven@gcc.gnu.org>
1369         * lang.opt: New file.
1371 2003-07-21  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1373         * decl.c (match_attr_spec): Set colon_seen.
1375 2003-07-14  Paul Brook  <paul@nowt.org>
1377         * trans-array.c: Update comment.
1378         (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
1379         * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
1380         minmaxloc,minmaxval): Ditto.
1381         * trans-io.c (g95_trans_transfer): Ditto.
1382         * trans-stmt.c: Remove unneeded prototypes.
1383         (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
1384         (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
1385         (compute_inner_temp_size): Remove bits of dead code. Add comments.
1386         Don't share loopinfo.
1387         (compute_overall_iter_number): Declare as static.
1388         (allocate_temp_for_forall_nest): Ditto.
1389         (g95_trans_forall_1): Don't pass shared loopinfo.
1390         * trans.c (g95_start_block): Expand comment.
1392 2003-07-12  Paul Brook  <paul@nowt.org>
1394         * arith.c (g95_index_integer_kind): Remove unused initializer.
1395         * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
1396         index by size of element.
1397         (generate_loop_for_rhs_to_temp): Ditto.
1398         (allocate_temp_for_forall_nest): Use element size, not index size.
1400 2003-07-11  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1402         * arith.c (g95_index_integer_kind): Add a TODO.
1403         * simplify.c (g95_simplify_nearest): Add a TODO.
1405 2003-07-09  Chun Huang  <compiler@sohu.com>
1407         * trans.h: Add declarations for gfor_fndecl_string_scan and
1408         gfor_fndecl_string_verify.
1409         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1410         * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
1411         (g95_conv_intrinsic_verify): New function.
1412         (g95_conv_intrinsic_function): Add SCAN and VERIFY.
1413         * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
1414         of parameter 'BACK=.TRUE.'
1416 2003-07-05  Lifang Zeng  <zlf605@hotmail.com>
1418         * trans-stmt.c (iter_info, forall_info): Define.
1419         (g95_trans_forall_block): Remove.
1420         (g95_trans_forall_loop): Use forall info blocks.
1421         (g95_trans_nested_forall_loop): New function.
1422         (g95_do_allocate): Handle things other than logical masks.
1423         (generate_loop_for_temp_to_lhs): New function.
1424         (generate_loop_for_rsh_to_temp): New function.
1425         (compute_inner_temp_size): New function.
1426         (compute_overall_iter_number): New function.
1427         (allocate_temp_for_forall_nest): New function.
1428         (g95_trans_forall): Move body ...
1429         (g95_trans_forall_1): ... to here.  Handle loops with temporaries.
1431 2003-07-02  Paul Brook  <paul@nowt.org>
1433         * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
1434         in correct scope.  Change callers to match.
1435         * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
1436         * iresolve.c (g95_resolve_reshape): Only use constant shapes.
1438 2003-07-02  Paul Brook  <paul@nowt.org>
1440         * trans-array.c (g95_conv_loop_setup): Remove dead var.  Use
1441         expression shape for all expressions.
1442         * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
1444 2003-07-03  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1446         * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
1447         g95_parse_arg), intrinsic.c (g95_convert_type): support of
1448         -Wconversion.
1449         * intrinsic.c, g95.h: Add g95_convert_type_warn,
1450         * resolve.c (g95_resolve_index): Call it.
1452 2003-07-02  Paul Brook  <paul@nowt.org>
1454         * iresolve.c (g95_resolve_reshape): Set expression shape.
1455         (g95_resolve_shape): Ditto.
1456         * simplify.c (g95_simplify_shape): Move common code outside condition.
1457         * trans-array.c (g95_conv_array_initializer): Teach it how to count.
1459 2003-07-01  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1461         * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
1462         conformance checks.
1464 2003-06-29  Paul Brook  <paul@nowt.org>
1466         * array.c (g95_simplify_iterator_var): Don't bother with return value.
1467         * expr.c (find_array_element, find_component_ref): New functions.
1468         (remove_subobject_ref): New function.
1469         (simplify_const_ref): Use them.  Rename from simplify_component_ref.
1470         (simplify_ref_chain): New function.
1471         (g95_simplify_expr): Use it.  Simplify parameter variable subobjects.
1472         (g95_specification_expr): Simplify the expression.
1473         * resolve.c (resolve_operator): Check simplifications return code.
1474         (g95_resolve_expr): Ditto.
1476 2003-06-26  Paul Brook  <paul@nowt.org>
1478         * expr.c (simplify_component_ref): New function.
1479         (g95_simplify_expr): Use it.
1480         * resolve.c (resolve_structure_cons): Handle references.
1482 2003-06-25  Paul Brook  <paul@nowt.org>
1484         * trans-io.c (build_dt): Handle internal units.
1486 2003-06-25  Canqun Yang  <canqun@yahoo.com.cn>
1488         * trans-common.c (g95_build_common_decl): Array index range starts at 0.
1489         (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
1490         Use g95_array_index_type instead of integer_type_node.
1491         (g95_build_common_decl, g95_set_common_master_type): Use
1492         g95_character1_type_node instead of char_type_node.
1493         * trans-equivalence.c (g95_layout_local_equiv): As above.
1495 2003-06-24  Steven G. Kargl  <kargls@attbi.com>
1497         * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
1498         remove last remains of -fquiet.
1500 2003-06-22  Paul Brook  <paul@nowt.org>
1502         * resolve.c (resolve_operator): Don't fail if we can't simplify.
1503         (g95_resolve_expr): Ditto.
1504         (resolce_code): Mark as static.
1505         * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
1506         gimplifer doesn't (yet).
1508 2003-06-20  Paul Brook  <paul@nowt.org>
1510         * g95.h: Add ST_PAUSE and EXEC_PAUSE.
1511         * match.c (g95_match_if): Add ST_PAUSE.
1512         (g95_match_stopcode): New function.
1513         (g95_match_pause, g95_match_stop): Use it.
1514         * parse.c (g95_ascii_statement): Handle ST_PAUSE.
1515         (decode_stmt, next_statement, parse_executable): Ditto.
1516         * resolve.c (resolve_code): Ditto.
1517         * st.c (g95_free_statement): Ditto.
1518         * trans-stmt.c (g95_trans_pause): New function.
1519         * trans-stmt.h: Declare it.
1520         * trans.c (g95_trans_code): Use it.
1521         * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
1522         Declare.
1523         (g95_build_builtin_function_decls): Initialize them.
1524         * trans.h: Ditto.
1525         * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
1527 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1529         * io.c (g95_match_open , g95_match_close, g95_match_inquire,
1530         match_filepos): Fix error handling.
1532 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1534         * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
1535         Add assertions on arguments.
1536         * resolve.c (expression_shape): Remove useless &.
1537         * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
1538         g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
1539         g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
1540         g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
1541         g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
1542         g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
1543         (g95_simplify_not, g95_simplify_scale): Add assertions.
1545 2003-06-15  Paul Brook  <paul@nowt.org>
1547         Clean up stuff to work with the ssa optimizers.
1548         * convert.c (convert): Handle BOOLEAN_TYPEs.
1549         * f95-lang.c (g95_truthvalue_conversion): Implement.
1550         * trans-array.c (g95_trans_array_constructor_value): Group multiple
1551         scalar values.
1552         * trans.h (g95_truthvalue_conversion): Declare.
1553         * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
1554         * trans-stmt.c (g95_trans_character_select): Don't create array
1555         assignments.  Mark labels as indirect jump targets.
1556         * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
1557         (g95_get_dtype_cst): Handle LOGICAL types.
1559 2003-06-14  Paul Brook  <paul@nowt.org>
1561         * f95-lang.c (g95_gimplify_expr): New function.
1562         * trans-array.c (g95_trans_array_constructor_value): Don't create
1563         array assignments.
1564         (g95_conv_expr_descriptor): Rename simple->gimple.
1565         * trans-expr.c (conv_expr_op): Use proper logical operators.
1566         * trans-intrinsic.c (build_fixbound_expr): New function.
1567         (build_fix_expr): Ditto.
1568         (g95_conv_intinsic_aint): Use them. Use builtin functions.
1569         (g95_conv_intrinsic_function): Add FLOOR and CEILING.
1571 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1573         * array.c (g95_compare_array_spec): Remove unreachable code.
1574         * expr.c (g95_copy_expr): Likewise.
1575         * intrinsic.c (g95_convert_type): Likewise.
1576         * misc.c (g95_code2string): Likewise.
1577         * simplify.c (g95_simplify_ishft, g95_simplify_real,
1578         g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
1579         * trans-stmt.c (g95_trans_select): Likewise.
1580         * primary.c (extend_ref): Add an assertion.
1581         * simplify.c (g95_convert_constant): Add const.
1582         * intrinsic.h: Remove g95_check_x_ni.
1583         * f95-lang.c (g95_finish): Call g95_release_include_path.
1585 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1587         * resolve.c (resolve_contained_functions): Fix typo introduced on
1588         2003-01-13.
1590 2003-06-09  Paul Brook  <paul@nowt.org>
1592         * g95.h: Include system.h not hwint.h.
1593         * many: use safe-ctype.h not ctype.h.  Change isalpha -> ISALPHA, etc.
1594         * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
1596 2003-06-09  Paul Brook  <paul@nowt.org>
1598         * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
1599         * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
1600         * trans-decl.c (g95_add_decl_to_functions): Make non-static.
1601         (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
1602         (g95_generate_function_code): Translate COMMON and EQUIVALENCE
1603         objects.
1604         * trans.h (g95_trans_equivalence, g95_trans_common,
1605         g95_add_decl_to_function): Declare.
1606         * trans-common.c, trans-equivalence.c: New files.
1608 2003-06-08  Steven Bosscher  <steven@gcc.gnu.org>
1610         * intrinsic.c (g95_intrinsic_extension): Remove.
1611         (add_functions): Substitute g95_check_x for g95_check_x_ni
1612         everywhere.
1613         (g95_init_expr_extensions): New function.
1614         (g95_intrinsic_func_interface): Use it.
1615         * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
1616         * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
1617         g95_check_precision, g95_check_present, g95_check_radix,
1618         g95_check_range, g95_check_selected_real_kind): Do not set
1619         g95_intrinsic_extension.
1620         (g95_check_x_ni): Remove now duplicate of g95_check_x.
1622         * expr.c (check_inquiry): Add FIXME, fixup some code style.
1624 2003-06-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1626         * g95.h (ref_type): Name this type explicitly.
1627         * module.c (MIO_NAME): Add specialisations of mio_name.
1628         (mio_symbol_attribute, mio_typespec, mio_array_ref,
1629         mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
1630         (ab_attribute): Name this type explicitly.
1631         (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
1633 2003-06-05  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1635         * trans-intrinsic.c (g95_conv_allocated): New function.
1636         (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
1638 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
1640         * f95-lang.c: Don't include g95-support.h
1641         (g95_mark_addressable): Add prototype.
1642         (g95_init_decl_processing): Remove C front end hack.
1643         * f95-tree.c: Remove file.
1644         * support.c: Remove file.
1645         * g95-support.h: Remove file.
1646         * trans-types.c (g95_init_types): Set up boolean
1647         type related tree nodes.
1648         * Make-lang.in: Remove rules for dead files and
1649         dependencies on them.
1651 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
1653         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
1654         C front end dependency.  Also, convert.c does not depend on
1655         g95-support.h anymore.
1656         * convert.c: Don't include c-common.h and g95-support.h
1657         * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
1658         (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
1659         stmts_are_full_exprs_p, current_stmt_tree,
1660         current_scope_stmt_stack): Remove.
1661         * g95-support.h (unsigned_conversion_warning): Kill proto.
1662         (boolean_type_node, boolean_true_node, boolean_false_node):
1663         Don't define here.  Instead, make then true tree nodes in
1664         trans-types.
1665         * support.c (c_global_trees): Die, C front end, die!!!
1666         (g95_init_c_decl_hacks): Don't touch intmax_type_node,
1667         uintmax_type_node, string_type_node and const_string_type_node.
1668         (decl_constant_value, overflow_warning): Make static functions.
1669         They are in death row too, though.
1670         (default_conversion, c_expand_asm_operands): Remove.
1671         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
1672         trans.c: Don't include c-common.h.
1673         * trans-types.c (boolean_type_node, boolean_true_node,
1674         boolean_false_node): Make them real tree nodes.
1675         * trans-types.h (intmax_type_node, string_type_node,
1676         const_string_type_node): Hack to work around C dependencies
1677         in builtin-types.def.
1679 2003-06-04  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1681         * decl.c (decl_types): Add some iterators-like sentinels.
1682         * decl.c (match_attr_spec): Use them.
1683         Use "decl_types" instead of "int".
1684         Add cast in call to g95_match_strings.
1685         * dump-parse-tree.c (g95_show_namespace):  Use "g95_intrinsic_op"
1686         instead of "int".
1687         * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
1688         (g95_interface_info): Use "g95_intrinsic_op".
1689         * dump-parse-tree.c (g95_show_namespace): Use them.
1690         * interface.c (g95_check_interfaces): Use them.
1691         * module.c (read_module, write_module): Use them.
1692         * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
1693         Use "g95_intrinsic_op".
1694         * interface.c (check_operator_interface): Use "g95_intrinsic_op".
1695         Add a default case in switch statement.
1696         * intrinsic.h (g95_generic_isym_id): Moved to...
1697         * g95.h (g95_generic_isym_id): here.
1698         (g95_intrinsic_sym): Use "g95_generic_isym_id".
1699         * intrinsic.c (make_generic): Use "g95_generice_isym_id".
1700         * trans-intrinsic.c (g95_intrinsic_map_t,
1701          g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
1702         * match.c (g95_match_intrinsic_op): Add cast in call to
1703         g95_match_strings.
1705 2003-06-03  Steven Bosscher  <steven@gcc.gnu.org>
1707         * support.c (skip_evaluation, warn_conversion, lvalue_p,
1708         lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
1709         constant_fits_type_p, convert_and_check,
1710         unsigned_conversion_warning): Remove these ugly remnants
1711         we inherited from the C front end.
1712         (function_types_compatible): Remove '#if 0'-edcode.
1713         (build_modify_expr): Likewise.
1714         (convert_for_assignment): Don't use the deceased functions.
1715         The parameter fundecl is now unused.
1716         (decl_constant_value): Always just return decl.  In fact
1717         this function is not used at present, but it might be in
1718         the future, when we start using the tree inliner.
1719         (overflow_warning, default_conversion, c_expand_asm_operands):
1720         Abort when these are called, they are part of the C type
1721         checking implementation and therefore poison to Fortran.
1723 2003-06-04  Steven Bosscher  <steven@gcc.gnu.org>
1725         * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
1726         c-pretty-print.o and c-dump.o.  Add a comment on why we
1727         depend on c-semantics.c.
1728         * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
1729         Don't use the C front end tree dumper hook to dump the
1730         language specific tree representation -- we don't have
1731         one.  So instead, inherit the default langhook.
1733 2003-06-02  Paul Brook  <paul@nowt.org>
1735         * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
1737 2003-06-02  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1739         * check.c (g95_check_associated): Use proper types.  Remove
1740         extraneous argument in call to g95_error().
1742 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1744         * resolve.c (resolve_operator): Make logical operands convert to the
1745         type with higher kind.
1747 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1749         * check.c (g95_check_associated): Make sure both pointer and target has
1750         the same type and rank. Null pointer or array section with vector
1751         subscript as target are not allowed.
1752         * trans.h: Declare gfor_fndecl_associated.
1753         * trans-decl.c: (g95_build_builtin_function_decls): Initialize
1754         gfor_fndecl_associated.
1755         * trans-intrinsic.c (g95_conv_associated): New function.
1756         (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
1758 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1760         * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
1761         according to POINTER itself rather than TARGET.
1762         (g95_conv_expr_descriptor): Make lbound start at 1.
1763         * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
1765 2003-06-01  Paul Brook  <paul@nowt.org>
1767         * expr.c (g95_type_convert_binary): Make it match the standard.
1768         * g95.texi: Remove dead link.
1770 2003-06-01  Steven Bosscher  <steven@gcc.gnu.org>
1772         * g95.texi: Cleanup somewhat in preparation for inclusion
1773         in GCC CVS.
1775 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1776             Canqun Yang  <canqun@yahoo.com.cn>
1778         * resolve.c (compare_bound_int, resolve_where_shape): Proper return
1779         type.
1780         (g95_find_forall_index): Return proper value.
1781         (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
1782         compare the return value from g95_find_forall_index.
1784 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1785         * g95.h, io.c (g95_st_label): Remove "length".
1786         (g95_symtree): Remove "link".
1787         (g95_case): Remove "code".
1788         * arith.c, arith.h (g95_compare_string, g95_convert_integer,
1789         g95_convert_real): Make an argument pointer to const.
1790         * decl.c (colon_seen): Add a TODO.
1791         * interface.c (g95_compare_types): Fix typo.
1792         * interface.c (compare_interfaces): Preserve value of "p".
1793         * intrinsic.c (sort_actual): Remove "i".
1794         * match.c (g95_match_assign): Proper type in call to g95_match().
1795         * parse.c (next_free): Avoid duplicate call due to macro.
1796         * parse.c (check_statement_label): wrong type in call to g95_error.
1797         * primary.c (match_real_constant): Add a TODO.
1798         * resolve.c (resolve_select):  Remove useless conditional.
1799         * simplify.c (g95_simplify_repeat): Proper assignment to
1800         "value.character.string".
1801         * simplify.c (g95_simplify_reshape): Wrong variable in call to
1802         g95_error.
1804 2003-05-20  Canqun Yang  <canqun@yahoo.com.cn>
1806         * trans-stmt.c: Remove unnecessary include file defaults.h.
1808 2003-05-19  Lifang Zeng  <zlf605@hotmail.com>
1810         * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
1811         stride.
1812         (g95_trans_forall): Allow arbitrary number of FORALL indexes and
1813         actual variables used as FORALL indexes.
1815 2003-05-15  Paul Brook  <paul@nowt.org>
1817         * trans-array.c (g95_trans_static_array_pointer): Use
1818         null_pointer_node.
1819         (g95_trans_deferred_array): Initialize static array pointers.
1820         * trans-expr.c (g95_conv_function_call): Use formal arglist to
1821         correctly pass POINTER and absent CHARACTER arguments.
1823 2003-05-14  Lifang Zeng  <zlf605@hotmail.com>
1825         * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
1826         (g95_resolve_forall_body): Resolve FORALL body.
1827         (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
1828         (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
1829         (g95_find_forall_index): Check whether the FORALL index appears in
1830         the expression or not.
1831         (resolve_code): Modified.
1833 2003-05-14  Paul Brook  <paul@nowt.org>
1835         * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
1837 2003-05-13  Paul Brook  <paul@nowt.org>
1839         * trans-types.c (g95_max_array_element_size): Now a tree node.
1840         (g95_init_types): Work out max size properly.
1841         (g95_get_dtype_cst): Modify to match.
1843 2003-05-11  Paul Brook  <paul@nowt.org>
1845         * trans-io.c (add_case): Create a label decl for case labels.
1847 2003-05-11  Paul Brook  <paul@nowt.org>
1849         * arith.c (g95_integer_index_kind): New variable.
1850         * f95-lang.c (g95_init): Move frontend initialization here ...
1851         (g95_post_options): ... from here.
1852         * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
1853         * intrinsic.c (add_functions): Use index kinds.
1854         * iresolve.c: Convert to index_kind where needed.
1855         * resolve.c (g95_resolve_index): Make public, use index_kind.
1856         (resolve_array_ref): Adjust to match.
1857         * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
1858         * trans-stmt.c: Ditto.
1859         * trans-types.c: Ditto.
1860         * trans-types.h (g95_array_index_kind): Remove declaration.
1861         * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
1863 2003-05-07  Paul Brook  <paul@nowt.org>
1865         * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
1866         * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
1867         of bound indices.
1869 2003-05-07  Paul Brook  <paul@nowt.org>
1871         * trans-array.c (trans_static_array_pointer,
1872         g95_trans_array_constructor_value, g95_conv_array_initializer,
1873         g95_conv_structure): CONSTRUCTOR nodes only have one operand.
1874         (g95_add_loop_ss_code): Convert subscripts to the correct type.
1875         * trans-stmt.c (g95_trans_character_select): Ditto.
1876         * trans-types.c (g95_init_types): Ditto.
1878 2003-05-07  Steven Bosscher  <steven@gcc.gnu.org>
1880         * f95-lang.c (expand_function_body): Use input_line, not lineno.
1881         * trans-decl.c (g95_generate_function_code,
1882         g95_generate_constructors): Likewise.
1883         * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
1884         g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
1885         Likewise.
1887 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1888         * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
1889         with components point to the DERIVED type itself, and two DERIVED
1890         type with components point to each other.
1891         * trans-expr.c (g95_conv_componet_ref): Modified
1893 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1894         * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
1895         null_pointer_node.
1896         (g95_trans_pointer_assign): Implement Nullify.
1898 2003-05-01  Paul Brook  <paul@nowt.org>
1900         * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
1901         * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
1903 2003-05-01  Paul Brook  <paul@nowr.org>
1905         * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
1906         trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
1907         IS_EMPTY_STMT.
1909 2003-05-01  Canqun Yang  <canqun@yahoo.com.cn>
1911         * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
1912         CASE_LABEL_EXPR.
1914 2003-04-28  Paul Brook  <paul@nowt.org>
1916         * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
1917         as their kind suggests.
1918         (g95_resolve_reshape): Ditto.
1920 2003-04-28  Chun Huang  <compiler@sohu.com>
1922         * trans-expr.c (g95_conv_substring_expr): New function.
1923         (g95_conv_expr): Use it.
1925 2003-04-28  Paul Brook  <paul@nowt.org>
1927         * iresolve.c (g95_resolve_transpose): Make it match the
1928         implementation.
1929         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
1931 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
1933         * trans-types.c (g95_add_field_to_struct): New function to
1934         add a field to a UNION_TYPE or RECORD_TYPE.
1935         * trans-types.h (g95_add_field_to_struct): Prototype.
1936         (g95_get_derived_type): Use g95_add_field_to_struct to add
1937         components.
1938         * trans-io.c (g95_add_field): Remove.
1939         (ADD_FIELD): Use new g95_add_field_to_struct function.
1940         (ADD_STRING): Likewise.
1941         * trans-stmt.c (g95_trans_select): Likewise.
1942         (g95_add_field): Remove duplicated function.
1944 2003-04-18  Canqun Yang  <canqun@yahoo.com.cn>
1946         Port implementation for CHARACTER SELECT from Andy's tree.
1947         * trans-stmt.c (g95_trans_character_select): Implement character
1948         select. (g95_add_field): New function.
1949         * trans-decl.c: Declare 'gfor_gndecl_select_string'.
1950         (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
1951         * g95.h (struct g95_case): Add field 'int n'.
1952         * trans.h: Declare 'gfor_fndecl_select_string'.
1954 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
1956         * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
1957         (g95_insert_bbd): Die on duplicates.
1958         * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
1960 2003-04-14  Steven Bosscher  <steven@gcc.gnu.org>
1962         * g95.texi: Require GMP 4.0 -- like we actually
1963         do.  Explain the testsuite and what-goes-where.
1964         Don't use undefined texinfo symbol.  Break very
1965         long line.  Remove finished item from the list
1966         of open projects.
1968 2003-04-11  Canqun Yang  <canqun@yahoo.com.cn>
1970         * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
1971         LOGICAL type.
1973 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
1975         * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
1976         (g95_trans_forall_body): New function.
1978 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
1980         * resolve.c (resove_where): New function.
1981         (resolve_where_shape): New function.
1982         (resolve_code): Add call to 'resolve_where'
1983         * trans-stmt.c (g95_trans_where): Modified.
1984         (g95_trans_where_2): New function.
1985         (g95_trans_where_assign): New function.
1986         (g95_evaluate_where_mask): New function.
1987         (g95_add_to_stmt_list): New function.
1988         (g95_get_temp_expr): New function.
1989         * trans.h (where_stmt_list): New structure.
1991 2003-04-10  Paul Brook  <paul@nowt.org>
1993         * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
1994         (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
1996 2003-04-10  Steven Bosscher  <steven@gcc.gnu.org>
1998         Update after mainline -> tree-ssa-branch merge.
1999         * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
2000         call.
2001         (g95_init): Update for new lang_hooks definition.
2002         (g95_post_options): New langhook.
2003         (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
2004         * scanner.c (g95_new_file): Comment update.
2006 2003-04-09  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2008         * g95.h, lang-options.h: Add -Wimplicit-interface.
2009         * options.c (g95_init_options, g95_parse_arg): Set it.
2010         * interface.c (check_intents): Warn about call with implicit
2011         interface.
2012         * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
2013         g95_procedure_use.
2015 2003-04-05  Paul Brook  <paul@nowt.org>
2017         * iresolve.c (g95_resolve_spread): Don't resole based on type.
2018         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
2020 2003-03-29  Paul Brook  <paul@nowt.org>
2022         * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
2023         (g95_resolve_unpack): Ditto.
2024         * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
2025         (g95_conv_intrinsic_function): Use it.  Remove PACK and UNPACK.
2026         (g95_is_intrinsic_libcall): Add PACK and UNPACK.
2028 2003-03-25  Paul Brook  <paul@nowt.org>
2030         * arith.c (g95_unary_user, g95_user): Remove dead functions.
2031         * arith.h: Ditto.
2032         * array.c (g95_free_array_ref): Ditto.
2033         * g95.h: Ditto.
2034         * symbol.c (g95_use_derived_tree): Ditto.
2035         * intrinsic.c (add_functions): Use simplification for SCALE.
2036         * primary.c (g95_match_rvalue): Test sym, not symtree.
2038 2003-03-25  Paul Brook  <paul@nowt.org>
2040         * trans-decl.c (build_function_decl): Add parameter before it gets
2041         turned into a constant.
2042         * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
2043         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
2044         * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
2046 2003-03-22  Paul Brook  <paul@nowt.org>
2048         * trans-array.c (g95_conv_array_initializer): Allow scalar
2049         expressions.
2050         * trans-decl.c (g95_finish_var_decl): Result variables are not
2051         module variables.
2052         * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
2053         (g95_conv_intrinsic_function): Use it.
2054         * trans-types.h (g95_type_spec): Remove dead declaration.
2056 2003-03-21  Paul Brook  <paul@nowt.org>
2058         * trans-decl.c (g95_build_function_decl): Mark string parameters.
2060 2003-03-20  Paul Brook  <paul@nowt.org>
2062         * trans-decl.c (g95_build_function_decl): Put character length
2063         parameters at the end of the function declaration.
2064         * trans-expr.c (g95_conv_function_call): Ditto.
2065         * trans-types.c (g95_get_function_type): Ditto.
2067 2003-03-20  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2069         * resolve.c (resolve_formal_arglist): Don't impose intent for
2070         procedure arguments of pure functions.
2071         (resolve_select): Remove redundant assignment.
2073 2003-03-19  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2075         * arith.c (validate_logical), g95.h, options.c (g95_init_options):
2076         Remove option l1.
2077         * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
2078         * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
2079         const.
2080         * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
2081         Order list.
2082         * symbol.c (g95_add_type): Fix typo in comment.
2085 2003-03-16  Paul Brook  <paul@nowt.org>
2087         * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
2088         * expr.c (g95_build_call): Remove.
2089         * f95-lang.c (puchdecl_top_level): New function.
2090         * g95.h (g95_code): Store resolved symbol, not just the name.
2091         * intrinsic.c (g95_intrinsic_namespace): New global namespace.
2092         (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
2093         (g95_get_intrinsic_sub_symbol): New function.
2094         * iresolve.c (g95_resolve_cpu_time): Use it.
2095         (g95_resolve_random_number): Ditto.
2096         * resolve.c: Set code->resolved_sym instead of code->sub_name.
2097         * trans-decl.c (g95_get_extern_function_decl): Give external decls
2098         the correct DECL_CONTEXT.  Add global symbold to the global scope.
2099         * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
2100         fixed.
2102 2003-03-16  Paul Brook  <paul@nowt.org>
2104         * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
2105         * options.c (g95_parse_arg): Ditto.
2106         * module.c (mio_symbol_attribute): Handle the always_explicit bit.
2107         * resolve.c (resolve_formal_arglist): The always_explicit sould be set
2108         for the procedure, not the parameter.
2109         * trans-array.c (g95_trans_g77_array): New function.
2110         (g95_trans_assumed_size): Use it.
2111         (g95_trans_dummy_array_bias): Ditto.
2112         (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
2113         (g95_conv_expr_descriptor): ... to here.  Update callers.
2114         * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
2115         (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
2116         * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
2117         * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
2118         * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
2119         (g95_sym_type): Ditto.
2121 2003-03-15  Paul Brook  <paul@nowt.org>
2123         * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
2124         first chain.
2125         * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
2127 2003-03-14  Paul Brook  <paul@nowt.org>
2129         * trans-array.c (g95_array_is_packed): Remove.
2130         (g95_conv_array_base): Correctly handle all descriptorless cases.
2131         (g95_conv_array_stride): Use descriptorless strides.
2132         (g95_trans_dummy_array_bias): Don't always repack the array.
2133         (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
2134         packed.
2135         * trans-types.c (g95_get_nodesc_array_type): Differentiate between
2136         dummy and non-dummy arrays...
2137         (g95_sym_type, g95_get_derived_type): ... like these.
2138         (g95_get_array_type_bounds): Allow discontiguous arrays.
2140 2003-03-12  Paul Brook  <paul@nowt.org>
2142         * array.c (g95_resolve_array_spec): Fix comment.
2143         * g95.h (symbol_attributes): New flag always_explicit.
2144         * resolve.c (resolve_formal_arglist): Set it always_explicit.
2145         * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
2146         * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
2147         (g95_trans_array_bounds): Allow assumed shape arrays.
2148         (g95_trans_repack_array): Remove.
2149         (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
2150         * trans-decl.c (g95_build_qualified_array): Only ignore absent
2151         bounds for assumed size arrays.
2152         (g95_build_dummy_array_decl): Use descriptorless arrays.
2153         * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
2154         (g95_trans_pointer_assign): Fix typo.
2155         * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
2156         code.
2157         (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
2158         * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
2159         Also modify callers.
2160         * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
2162 2003-03-08  Paul Brook  <paul@nowt.org>
2164         * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
2165         (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
2166         * resolve.c (compare_spec_to_ref): Allow full array sections.
2168 2003-03-08  Paul Brook  <paul@nowt.org>
2170         * expr.c (g95_simplify_expr): Also simplify array index and
2171         substring expressions.
2172         * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
2173         * trans-array.c (g95_trans_array_bounds): New function.
2174         (g95_trans_auto_array_allocation): Use it.
2175         (g95_trans_assumed_size): Rewrite.
2176         * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2177         (gfor_fndecl_repack): Remove.
2178         (g95_build_qualified_array): Handle absent upper bounds.
2179         (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
2180         (g95_get_symbol_decl): Update.
2181         (g95_build_intrinsic_function_decls): Initialize new decls.
2182         * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2183         (gfor_fndecl_repack): Remove.
2184         * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
2185         * trans-types.c: (g95_build_array_type): Merge duplicated code..
2186         (g95_get_nodesc_array_type): Handle absent bounds.
2187         * trans-types.h (g95_get_nodesc_array_type): Declare.
2189 2003-03-04  Paul Brook  <paul@nowt.org>
2191         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
2192         builtin-types.def.
2194 2003-03-02  Paul Brook  <paul@nowt.org>
2196         * options.c (g95_init_options): Drfault to 1.
2197         (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
2198         * trans-array.c (g95_conv_array_data, g95_conv_array_base,
2199         g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
2200         Handle non-constant size automatic arrays.
2201         (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
2202         generic bound functions.
2203         (g95_trans_auto_array_allocation): Don't create a descriptor.
2204         (g95_trans_assumed_size): New function (broken).
2205         (g95_trans_dummy_array_bias): Remove unused var.
2206         * trans-array.h (g95_trans_assumed_size): Declare.
2207         * trans-decl.c (create_index_var): New fuction.
2208         (g95_build_qualified_array): New function.
2209         (g95_get_symbol_decl): Use it.
2210         (g95_trans_deferred_vars): Handle assumed shape seperately.
2211         * trans-types.c (get_element_type): Handle heap allocated arrays.
2212         (g95_is_nodesc_array): Include non-const size arrays.
2213         (g95_get_nodesc_array_type): Ditto.
2215 2003-02-23  Paul Brook  <paul@nowt.org>
2217         * trans-array.c (g95_array_init_size): Should use stride, not size of
2218         last dimension.
2220 2003-02-18  Paul Brook  <paul@nowt.org>
2222         * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
2223         after intrinsic function check.
2225 2003-02-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2227         * io.c (match_io): Fix missing return value and remove useless
2228         assignment.
2229         * match.c (g95_match): Remove useless assignment.
2230         * module.c (parse_string):  Remove useless post increment.
2231         * simplify.c (g95_simplify_verify): Remove useless assignment.
2233 2003-02-15  Paul Brook  <paul@nowt.org>
2235         * expr.c (restricted_intrinsic): Handle bad values gracefully.
2236         * g95.h (symbol_attribute): Add referenced member.
2237         (g95_symbol): Add dummy_order member.
2238         (g95_set_sym_referenced): Declare.
2239         * match.c (g95_match_assignment, g95_match_call): Use it
2240         * primary.c (match_actual_arg, g95_match_rvalue,
2241         g95_match_variable): Ditto.
2242         * symbol.c (next_dummy_order): New variable.
2243         (g95_set_sym_referenced): New function.
2244         (check_done): New function.
2245         (g95_add_*): Use it.
2246         * trans-decl.c: Make formatting conform to GCC standards.
2247         (g95_defer_symbol_init): Add dummy variables in the right order.
2248         (g95_get_symbol_decl): Only accept referenced variables.
2249         (g95_create_module_variable): Module variables are always required.
2250         (generatr_local_decls): New function.
2251         (generate_local_vars): New function.
2252         (g95_generate_function_code): Use it.
2254 2003-02-13  Paul Brook  <paul@nowt.org>
2256         * trans-decl.c (g95_conv_struct_cons): Remove.
2257         (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
2258         * trans-expr.c (g95_conv_structure): New function.
2259         (g95_conv_expr): Use it.
2261 2003-02-09  Paul Brook  <paul@nowt.org>
2263         * trans-array.c (g95_array_init_size): Don't evaluate the linit
2264         expressions multiple times.
2265         (g95_trans_auto_arry_allocation): Use pointer not tmp.
2267 2003-02-08  Paul Brook  <paul@nowt.org>
2269         * module.c (mio_symtree_ref): Declare as static.
2270         (mio_expr): Remove dead code.
2271         (read_module): Set the symtree link for fixups.
2272         * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
2273         (build_round_expr): ... to this.
2274         (g95_conv_intrinsic_aint): New function.
2275         (g95_conv_intrinsic_function): Use it.
2277 2003-02-08  Paul Brook  <paul@nowt.org>
2279         * trans-array.c (g95_trans_array_constructor_value): Use the acutal
2280         offset after modificaton, not the increment expression.
2281         * dependency.c: Kill excess whitespace.
2283 2003-02-07  Sanjiv Gupta  <sanjivg@noida.hcltech.com>
2285         * dependency.h: Remove some function declarations.
2286         * dependency.c (get_no_of_elements): Change this function not to
2287         return int.
2288         * other: Add comments for all modified functions.
2290 2003-02-06  Paul Brook  <paul@nowt.org>
2292         * g95spec.c (lang_specific_functions): Fix initializer warning.
2293         * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
2294         for structure type names.
2295         * trans-decl.c (g95_cons_structure_cons): New function.
2296         (g95_get_symbol_decl): Use it.
2297         * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
2298         referencing code.
2300 2003-02-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2302         * resolve.c (compare_cases): Add const to casts.
2304 2003-01-30  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2306         * g95.h (g95_check_f): Change a1 to f1m.
2307         * intrinsic.c (add_sym_1m, check_specific,
2308         g95_intrinsic_func_interface): Use it.
2310         * module.c (init_pi_tree): Remove useless cast.
2311         (fp2): Fix argument type.
2313         * parse.c (parse_select_block): Add comment.
2315 2003-02-05  Toon Moene  <toon@moene.indiv.nluug.nl>
2317         * lang-options.h: Fix warning involving C90 concatenated
2318         strings.
2320 2003-02-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2321             Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2323         * io.c (format_asterisk): Complete initializer to kill warning.
2324         * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
2325         DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
2326         (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
2327         new defines to complete initializers.  Kills all warnings.
2329         * Make-lang.in: Comment cleanup.
2331 2003-02-05  Paul Brook  <paul@nowt.org>
2333         * array.c (g95_free_constructor): Handle NULL expressions.
2334         * resolve.c (resolve_structure_cons): Ditto.
2335         * decl.c (g95_match_null): New Function.
2336         (variable_decl): Use it.
2337         * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
2338         * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
2339         * trans-types.c (g95_set_decl_attributes): Remove empty function.
2341 2003-02-05  Paul Brook  <paul@nowt.org>
2343         * trans.h (build1_v): New macro.
2344         (build_v): Remove pointless and incorrect prototype.
2345         * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
2346         * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
2348 2003-02-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2350         * Make-lang.in (F95_OBJS): Remove one more dead file.
2352 2003-02-01  Paul Brook  <paul@nowt.org>
2354         * lang-specs.h: Don't pass -ffixed-form to the linker.
2355         * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
2357 2003-02-01  Paul Brook  <paul@nowt.org>
2359         * Make-lang.in (F95_OBJS): Remove dead files.
2360         * trans-array.c (g95_array_init_size): Do the right thing when
2361         ubound=NULL.
2362         * trans-decl.c (g95_generate_function_code): Initialize deffered
2363         symbol list before translating contained subroutines.
2364         * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
2365         scalar invariant values here...
2366         (g95_conv_variable, g95_conv_function_call): ... instead of here ...
2367         * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
2369 2003-01-29  Paul Brook  <paul@nowt.org>
2371         * trans-array.c (g95_add_loop_code): Put pre code in the right block.
2372         (g95_walk_elemental_function_args): Reverse chains before adding.
2373         (g95_reverse_ss): Move about a bit.
2374         * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
2375         function arguments.
2377 2003-01-28  Paul Brook  <paul@nowt.org>
2379         * intrinsic.c (resolve_intrinsic): Use correct union member.
2380         * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
2381         parameters.
2382         * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
2383         use associated variables.
2384         * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
2385         * trans-expr.c (g95_conv_expr_present): ... to here.
2386         * trans.h: Declare it.
2387         * trans-types.c (g95_sym_type): Assume subroutine if not specified.
2389 2003-01-28  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2391         * array.c (expand_iterator): Suppress useless assignment.
2392         * decl.c (match_char_spec): Ditto.
2393         * io.c (match_io_iterator): Ditto.
2394         * primary.c (match_real_constant): Ditto.
2395         * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
2396         Ditto.  Also, use g95_intrinsic_op not int for intrinsic operators.
2397         * matchexp.c (match_add_operand, match_level_5): Likewise.
2398         * module.c (parse_atom, find_enum): Likewise.
2399         * resolve.c: move #include <string.h>
2400         (resolve_select): Fix serious typo.
2402 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.n>
2404         * Make-lang.in: Don't build with broken tree-ssa-pre.
2406 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2408         * resolve.c (resolve_index): Add a TODO.
2409         * symbol.c: Remove useless "#include <ctype.h>".
2411 2003-01-27  Paul Brook  <paul@nowt.org>
2413         * check.c (check_rest): Allow different type kinds as an extension.
2414         * g95.h (g95_resolve_f): Add f1m.
2415         * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
2416         * intrinsic.h: Chenge prototypes for MIN and MAX.
2417         * iresolve.c (g95_resolve_minmax): New function.
2418         (g95_resolve_min, g95_resolve_max): Use it.
2419         * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
2420         arguments once.
2421         (g95_conv_intrinsic_present): Fix logic.
2423 2003-01-27  Steven Bossche  <s.bosscher@student.tudelft.nl>
2425         * g95.h (g95_case): Don't be a tree, be a double linked list.
2426         * match.c (match_case_selector): Remove redundant semantics check.
2427         Clean up a few goto's to make it a tiny little bit faster.
2428         * resolve.c (case_tree): Die.
2429         (compare_cases): Accept and compare unbounded cases too.
2430         (check_case_overlap): Don't build a tree.  Instead, merge-sort the
2431         whole list of g95_cases passed from resolve_select.
2432         (sane_logical_select): Die.
2433         (check_case_expr): Return FAILURE if a CASE label is of the wrong
2434         type kind.
2435         (resolve_select): Fixup case expression for computed GOTOs, put it
2436         in expr, not expr2, for easier handing in the parse tree dumper and
2437         the code generator.  Rewrite the rest of the function: Kill
2438         unreachable case labels and unreachable case blocks.
2439         * dump-parse-tree.c (g95_show_code_node): Always dump expr for
2440         an EXEC_SELECT, not case2 anymore.
2441         * trans-const.c (g95_conv_constant_to_tree): New function.
2442         (g95_conv_constant): Use it.
2443         * trans-const.h: Declare prototype for the new function.
2444         * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
2445         g95_trans_character_select): New static functions.
2446         (g95_trans_select): Rewrite.
2448 2003-01-26  Paul Brook  <paul@nowt.org>
2450         * intrinsic.c (add_fnctions): Properly add dreal.
2451         * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
2452         (g95_conv_intrinsic_function): Use it.
2453         * trans-io.c (build_dt): Abort on internal files (unimplemented).
2455 2003-01-26  Paul Brook  <paul@nowt.org>
2457         Widespread changes to the handling of symbols in expressions.  These
2458         are now linked via g95_symtree nodes.
2459         * parse.c (g95_fixup_sibling symbols): New function.
2460         (parse_contained): Use it.
2461         * g95.h (symbol_attribute): Add contained.  Indicates a symbol is a
2462         contained procedure that has bee correctly fixed up.
2463         (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
2465 2003-01-24  Paul Brook  <paul@nowt.org>
2467         * trans-array.c (g95_walk_expr): Function result attributes are in
2468         sym->result.
2469         * trans-expr.c (g95_conv_function_call,
2470         g95_trans_arrayfunc_assign): Ditto.
2471         * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
2473 2003-01-23  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2475         * expr.c (check_restricted): Fix error message.
2476         * symbol.c (free_st_labels): Plug memleak.
2478 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2480         * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
2481         reduce_binary_aa, reduce_binary, eval_intrinsic,
2482         eval_intrinsic_f2): Use typesafe prototypes for eval functions.
2483         * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
2484         for typesafe intrinsics helper functions.
2485         (g95_intrinsic_sym): Use them.
2486         * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
2487         add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
2488         add_sym_5, add_conv, resolve_intrinsic, do_simplify,
2489         check_specific, g95_intrinsic_func_interface,
2490         g95_intrinsic_sub_interface): Adjust all calls to intrinsics
2491         helper functions.
2492         * trans-decl.c (g95_get_extern_function_decl): Likewise.
2493         * Make-lang.in: Don't disable warnings for strict prototypes
2494         any longer, everything is typesafe now.
2496 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2498         * bbt.c (duplicate_node): Make static.
2499         * module.c (module_name): Make static.
2500         * scanner.c (include_dirs): Make static.
2502 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2504         Hard coded _gfor_'s should not show up anymore.
2505         * g95.h (PREFIX): New macro.
2506         * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
2507         hard-coded "_gfor".
2508         (g95_resolve_random_number): Likewise.
2509         * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
2510         * trans-io.c: Remove 'prefix' macro.  Replace all uses with
2511         the new PREFIX macro from g95.h.
2513 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2515         The troubles of forking... Andy implemented this just now too.
2516         Let's stick to that and keep the trees close.
2517         * g95.h (g95_st_label): 'format' member is now a g95_expr.
2518         * io.c: Revert previous changes.
2519         (g95_match_format): Match the format string as a character
2520         literal expression.
2521         * match.h (g95_statement_label): Declare external.
2522         * parse.c: Revert previous changes.
2523         * symbol.c (g95_free_st_label): Free a g95_expr instead
2524         if a 'char *'.
2525         * trans-io.c: Revert previous changes.
2526         (build_dt): Use set_string to set the format string.
2528 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2530         * io.c (format_string): Make non-static.
2531         (g95_match_format): Remember the format string.
2532         (terminate_io): Add I/O termination for empty I/O lists.
2533         * match.h: Declare external format_string.
2534         * parse.c (check_statement_label): Attack the format string
2535         to a format label for FORMAT statements.
2536         * trans-io.c (g95_add_field): Define prefix macro.  Replace
2537         all uses of PREFIX define with a use of this macro.
2538         (build_dt): Implement formatted I/O for format labels.
2540 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2542         * lang-options.h: Kill "-std=F".
2543         * options.c: Remove unimplemented "-std=F".  Modify
2544         web address.
2545         * misc.c (g95_terminal_width): New function.
2546         * error.c (g95_error_init_1): Use g95_terminal_width.
2547         * g95.h: Add prototype for g95_terminal_width, remove
2548         fmode flag.
2550 2003-01-19  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2552         * Make-lang.in: Fix typo.
2554 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2556         * g95.h (struct g95_case): Remove unused cruft, new member
2557         'where' to keep track of the locus of the default case.
2558         * match.c (g95_match_case): Add locus to the current case.
2559         (match_case_selector): Likewise.
2560         * parse.c (parse_select_block): Move semantics check for
2561         multiple DEFAULT cases out of here to...
2562         * resolve.c (check_case_overlap): ...here.  Return sooner
2563         when possible.
2564         (check_case_expr): Take two g95_cases now, use to sure the
2565         expression kinds are the same.
2566         (resolve_select): Cleanup.
2568 2003-01-18  Paul Brook  <paul@nowt.org>
2570         * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
2571         * trans-decl.c (g95_set_symbol_decl): Handle non-array result
2572         variables.
2573         (g95_get_extern_function_decl): Put decls in the correct context.
2575 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2577         * trans-io.c: Port changes from Andy to set ERR flag.
2579 2003-01-17  Paul Brook  <paul@nowt.org>
2581         * trans-array.c: Add various comments.
2582         (g95_ss_terminator): Declare as const.
2583         (g95_walk_expr): Remove first parameter and update all callers.
2584         (g95_walk_op_expr): Initialize scalar SS properly.
2585         * trans-array.h (g95_walk_expr): Update prototype.
2586         * trans-expr.c: Update for new g95_walk_expr.
2587         * trans-intrinsic.c: Ditto.
2588         * trans-io.c: Ditto.
2589         * trans.h: Various comments for SS chains.
2591 2003-01-17  Paul Brook  <paul@nowt.org>
2593         * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
2594         and RRSPACING.
2595         * intrinsic.c (add_functions): Use them.
2596         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
2597         * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
2599 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2601         Fallout of a small merge conflict:
2602         * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
2604 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2606         * initrinsic.c: New add_sym_* functions for strong typing.
2607         (add_conv): Make prototype strict.
2608         * dump-parse-tree.c, dependency.c: Include config.h
2609         * resolve.c, trans-io.c: Fix typos.
2611 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2613         * dump-parse-tree.c (g95_show_code_node): Show the
2614         condition for a computed GOTO that was transformed
2615         to a SELECT CASE construct.
2616         * resolve.c (check_case_overlap): Revert previous switch
2617         to treaps, it was too slow and didn't catch all trouble.
2618         (resolve_symbol): Be more flexible about module procedures.
2619         * symbol.c (check_conflict): Point to relevant section in
2620         the standard for dubious conflict.  Allow procedure
2621         dummy arguments to be optional again.
2622         * trans-io (add_field): Rename to g95_add_field.  Change
2623         all callers.
2624         * trans-stmt (trans_select): Handle unbounded cases for
2625         integer SELECT CASE constructs.  Fix/add more comment.
2627 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2629         * g95.h: Uses GCC's function attribute macros.
2630         * error.c, module.c, parse.c, g95.h: More function attributes.
2632 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2633         Forgot a file...
2634         * trans-decl.c (get_label_decl): Use TREE_LINENO instead
2635         of DECL_SOURCE_LINE, and TREE_FILENAME instead of
2636         DECL_SOURCE_FILE.
2638 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2640         * f95-lang.c (pushdecl): Use TREE_LINENO instead of
2641         DECL_SOURCE_LINE.
2642         * trans.c (g95_trans_code): Use annotate_all_with_file_line
2643         instead of nowdead wrap_all_with_wfl.
2645 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2647         * parse.c (g95_parse_file): In verbose mode, dump the parse tree
2648         before generating code, so we can still see it even if the code
2649         generation phase dies.
2651 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2653         * decl.c (build_sym): Split out initialization expression parts...
2654         (add_init_expr_to_sym): ...to here.
2655         (variable_decl): Add the symbol following an attribute list to the
2656         symbol tree before parsing the optional initialization expression
2657         if the symbol is not of a derived type.
2658         * primary.c (g95_match_rvalue): Don't assume a symbol always has
2659         a value if it is a PARAMETER.
2661 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2663         * misc.c: Don't #include <mcheck.h>
2664         * module.c: Ditto.  Kill uses of mtrace, muntrace.  If there
2665         ever was a glibc bug, then either this was never reported to
2666         glibc people, or it has been fixed for so long that there's
2667         no information you can find about it, anywhere.
2669 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2671         Fix warnings:
2672         * module.c (attr_bits, bt_types, array_spec_types):
2673         Switch 'const' and 'static'.
2674         * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
2676         GNU'ify source code:
2677         * trans-io.c: Numerous fixes, one fixed warning and a few
2678         TODO markers so that we don't forget about them.
2680 2003-01-13  Paul Brook  <paul@nowt.org>
2682         * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
2683         * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
2684         Add G95_ISYM_SCALE.
2685         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
2686         * match.c (g95_match_stop): Fix dumb == -> != error.
2688 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2690         * dump-parse-tree.c (show_indent): Add line breaks.  This
2691         whole dumping process needs cleanups.
2692         * f95-lang.c (g95_mark_addressable): Fix prototype to match
2693         the langhook.  Fix 'return's accordingly.
2694         * g95-support.h: Adjust prototype.
2695         * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
2696         * lang-options.h: Add '-fsyntax-only'.
2697         * options.c (g95_init_options): Init 'no_backend'.
2698         (g95_parse_arg): Deal with '-fsyntax-only'.
2699         * parse.c (g95_parse_file): Do not generate code if 'no_backend'
2700         is set.
2702 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2703         Patch from Arnaud
2704         * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
2705         arguments.  Also make sure that if a symbol is marked INTRINSIC,
2706         an intrinsic with the symbol's name actually exists.
2707         (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
2708         Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
2709         ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
2711 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2713         * resolve.c (resolve_contained_functions): Fix condition, don't
2714         throw internal_error if a child namespace has no name.  Apparently
2715         this can be the case?
2717 2003-01-11  Paul Brook  <paul@nowt.org>
2719         Port changes from Andy's tree:
2720         * g95.h (g95_code): Add stop_code.
2721         * match.c (g95_match_stop): Detter syntax checking.
2722         * resolve.c (resolve_generic_f0): Return match type.
2723         (resolve_generic_f): Remove dead/duplicated code.
2724         (resolve_specific_f): Ditto.
2725         * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
2726         * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
2727         * trans-stmt.c (g95_trans_stop): Handle new STOP format.
2729 2003-01-11  Paul Brook  <paul@nowt.org>
2731         * trans-array.c: Various documentation/comment changes.
2732         * trans-stmt.c: Ditto.
2735 2003-01-10  Paul Brook  <paul@nowt.org>
2737         * options.c/h: Add -fdump-parse-tree as alias of -v.
2739 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2741         * dump-parse-tree.c (g95_show_namespace): Fixed another
2742         typo.  Sorry, it's Friday...
2744 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2746         Spotted by Tobi:
2747         * trans-array.c, trans-array.h, trans.c, trans-const.c,
2748         trans-const.h, trans-decl.c, trans-expr.c, trans.h
2749         trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
2750         trans-types.c: Fix bogus copyright years, add 2003.
2751         * trans-types.h: Give copyright header.
2753 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2755         * dump-parse-tree.c (g95_show_namespace): Fixed typo.
2756         * expr.c, options.c, scanner.c: Add some more 'const' markers.
2757         * intrinsic.c: Some constant strings moved to read-only memory.
2758         * io.c (format_asterisk): Move to...
2759         * g95.h: ...here.
2761 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2763         * dump-parse-tree.c (g95_show_namespace): Dump implicit
2764         types for ranges instead of per-letter.  Indent the
2765         'CONTAINS' just like everything else.
2766         * resolve.c (resolve_contained_functions): Clarify comment.
2767         Explain non-obvious conditional expression.  Improve
2768         diagnostics if tyoe cannot be resolved.
2769         Port semi-fix from Andy's tree:
2770         (was_declared): Move up before first use.
2771         (generic_sym, specific_sym): New functions.  Code moved
2772         out if procedure_kind.
2773         (procedure_kind): Simplify using new functions.
2774         (resolve_generic_f): Make sure the functions we find in
2775         a parent namespace is generic.
2776         (resolve_specific_f): Ditto for specific functions.
2778 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2780         * trans-stmt.c, trans.c: Fix some code style issues. Add
2781         some more comment (but still not enough!).
2783 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2785         * symbol.c (flavors, procedures, intents, acces_types,
2786         access_types, ifsrc_types): Make const.
2787         * misc.c (g95_string2code): Make 'm' param 'const'.
2788         * module.c (find_enum, write_atom, mio_name): Make
2789         'm' param 'const'.
2790         (attr_bits, bt_types, array_spec_types, array_ref_types,
2791         ref_types, expr_types): Make const.
2792         * g95.h: Adjust external decls.
2794 2003-01-09  Paul Brook  <paul@nowt.org>
2796         * Testsuite: Add a load of new cases.
2798 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2800         * Make-file.in: Add dependency on back end header files;
2801         a parallel build should work now.
2802         * f95-lang-c (lang_identifier): Remove bogus comment.
2803         (g95_be_parse_file): Fix prototype.
2804         (g95_init): Make static.
2805         (g95_finish): Make static.
2806         * error.c (g95_syntax_error): Kill. Make define in...
2807         * g95.h (g95_syntax_error): Define.
2808         (g95.options): Make 'source' member 'const'.
2809         * interface.c (g95_match_interface): Explain
2810         hard-to-read condition.
2811         (g95_match_end_interface): Ditto.
2812         * trans_const.c (g95_build_string_const): Make 's' parameter
2813         'const'.
2814         * trans_const.h: Adjust protoype accordingly.
2815         * trans-decl.c: Include tree-dump.h
2816         (g95_generate_function_code): Build fixes for recent changes
2817         in the tree-ssa branch.
2819 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2821         * format.c: Kill, move code from here...
2822         * io.c: ...to here.
2823         * Make-lang.in: Adjust.
2824         * MANIFEST: Ditto.
2825         * match.h: Ditto.
2826         * BUGS: Mention where to submit bugs.  Move old content...
2827         * TODO: ...to here.  New file.
2829 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2830         Fix most warnings, and suppress the ones we can't fix for now.
2831         * Make-lang.in: Suppress warnings about bad proto's in g95.h,
2832         these warnings just clutter the screen and there's not much
2833         we can do about them for now anyway.
2834         * check.c, iresolve.c: Mark unused function parameters.
2835         * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
2836         they should be resolved before they get here.
2837         * error.c: Remove unused FILE *status_out.
2838         * f95-lang.c (g95_init): Remove bogus cast.
2839         * Many files: Make things 'const' where required.
2840         * g95.h: Fix prototypes for all modified functions above.
2841         (g95_options): Remove 'object' member.
2843 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2845         * Make-file.in: Cleanup bogus targets.  Add more comment.
2846         * lang-options.h: New option '-w'.
2847         * g95.h: add no_options field to struct g95_options.
2848         * options.c (g95_init_options): Default no_warnings to off.
2849         (g95_parse_arg): Recognise the '-w' switch and its alias,
2850         '-fno-warnings'.
2851         * error.c (g95_warning, g95_warning_now): Don't emit warning if
2852         no_warning option is set.
2853         * iresolve.c (g95_resolve_shape): Fix warning.
2855 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2857         * primary.c (g95_next_string_char): Rename next_string_char, and
2858         make static.  Adjust callers accordingly.
2859         * resolve.c (resolve_generic_f0): Return try, not match.  Adjust
2860         callers accordingly.
2861         * g95.h: Split out all g95_match* functions to...
2862         * match.h: ...here. New file.
2863         * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
2864         matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
2866 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2868         * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
2869         g95_merge_new_implicit): New functions.
2870         (g95_match_implicit_none, g95_match_implicit): Move from here...
2871         * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
2872         Modify to use the new functions in symbol.c.
2873         * g95.h: Add and move prototypes.
2875 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2877         * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
2878         node compare function.
2879         (g95_insert_bbt): Likewise.
2880         (g95_insert_bbt_with_overlap): Likewise.
2881         (g95_delete_bbt): Likewise.
2882         (delete_treap): Likewise. Also fix a potential bug when calling it.
2883         * module.c (compare_pointers): Change proto to compare_fn.
2884         (compare_integers): Likewise.
2885         (compare_true_names): Likewise.
2886         (find_true_name): Adjust call to compare_true_names to match proto.
2887         (require_atom, write_atom, mio_name): Fix 'const' warnings.
2888         (init_pi_tree): Make compare a compare_fn instead of (int *).
2889         * resolve.c (compare_cases): Change proto to compare_fn.
2890         * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
2891         it static, and rename to compare_symtree.
2892         (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
2893         function.
2894         * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
2895         of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
2897 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2898         * Make-lang.in: Fix spaces/tabs issues from previous patch.
2899         * patch.options: Blow away Paul's checkin mistake :-)
2900         * io.c (terminate_io): Fix memory leak (Arnaud).
2902 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2904         * Make-lang.in: Teach about building DVI, info manual.
2905         * g95.texi: New file.
2907 2003-01-02  Paul Brook  <paul@nowt.org>
2909         * trans-array.c (g95_reverse_ss): Make static and don't use.
2910         (g95_conv_ss_descriptor): Don't use g95_loopinfo
2911         (g95_conv_array_parameters): Modify for pointer assignments.
2912         (g95_walk_subexpr): New function.
2913         (g95_walk_expr*): Use it.
2914         * trans-array.h (g95_reverse_ss): Remove prototype.
2915         * trans-expr.c (g95_trans_pointer_assign): Implement.
2916         (Many): Set se.want_pointer before calling g95_conv_array_parameter.
2917         * trans-intrinsic.c: Sync with scalarizer changes.
2918         * trans-io.c: Ditto.
2920 2002-12-29  Paul Brook  <paul@nowt.org>
2922         * trans-array.c: Document calling convention for arrays.
2924 2002-12-19  Paul Brook  <paul@nowt.org>
2926         * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
2927         assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
2928         optional parameters for some intrinsics.
2929         (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
2930         * trans-expr.c (g95_conv_function_call): Pass NULL for absent
2931         optional parameters.
2932         * trans.h (g95_se): Add ignore_optional flag.
2934 2002-12-15  Paul Brook  <paul@nowt.org>
2936         * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
2937         * trans-decl.c (g95_generate_function_code): Use TDI_original.
2939 2002-12-14  Paul Brook  <paul@nowt.org>
2941         * trans-stmt.c (g95_trans_call): Use resolved symbol name.
2943 2002-12-12  Paul Brook  <paul@nowt.org>
2945         * trans-array.c (g95_trans_array_constructor_subarray): Fully
2946         initialize the scalarizer.
2947         (various): Update to new format of g95_expr->value.constructor.
2949 2002-12-08  Paul Brook  <paul@nowt.org>
2951         * trans-array.c (g95_put_offset_into_var): New function.
2952         (g95_trans_array_constructor_subarray): New function.
2953         (g95_trans_array_constructor_value): Use it.
2954         (g95_array_cons_size): Don't abort() on array components.
2956 2002-12-08  Paul Brook  <paul@nowt.org>
2958         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
2959         * support.c: Update #includes.
2960         (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
2961         * trans-array.c: Update #includes.
2962         * trans.c: Ditto.
2963         * trans-const.c: Ditto.
2964         * trans-io.c: Ditto.
2965         * trans-types.c: Ditto.
2966         (g95_init_types): Set size_type_node.
2967         * trans-decl.c: Update #includes.
2968         (gfor_fndecl_adjust{l,r}): Declare and initialize.
2969         * trans-stmt.c: Update #includes.
2970         (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
2971         (g95_trans_select): Fix check for unbounded ranges.
2972         * trans-expr.c: Update #includes.
2973         (g95_conv_string_tmp): New function.
2974         (g95_conv_concat_op): Use it.
2975         * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
2976         * Trans-intrisic.c: Update #includes.
2977         (g95_conv_intrinsic_strcmp): New function.
2978         (g95_conv_intrinsic_adjust): Ditto.
2979         (g95_conv_intrinsic_function: Use them.
2981 2002-11-30  Paul Brook  <paul@nowt.org>
2983         * trans-array.c (g95_walk_function_expr): Handle non-array return by
2984         reference.
2985         * trans-dec.c (g95_build_function_decl): Handle character return
2986         parammeters.
2987         (g95_get_fake_result_decl): Ditto.
2988         (g95_trans_deferred_vars): Ditto.
2989         * trans-expr.c (g95_conv_function_call): Ditto.
2990         (g95_trans_arrayfunc_assign) Limit to array valued functions.
2991         * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
2992         (g95_conv_intrinsic_function): Use it.
2993         * trans-types.c (g95_sym_type): Handle functions returning strings.
2994         (g95_return_by_reference): Ditto.
2995         (g95_get_function_type): Ditto.
2997 2002-11-18  Paul Brook  <paul@nowt.org>
2999         * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
3000         requires a temporary.
3001         (g95_trans_select): Handle computed gotos.
3002         * trans-types.c (g95_build_array_type): Warn about non-functional
3003         assumed shape arrays.
3004         * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
3005         blocks.
3006         * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
3007         (g95_conv_intrinsic_int): New function.
3008         (g95_conv_intrinsic_mod): New function.
3009         (g95_conv_intrinsic_ichar): New function.
3010         (g95_conv_intrinsic_function): Use them.
3011         (g95_conv_intrinsic_dim): Use g95_evaluate_now.
3013 2002-11-17  Toon Moene  <toon@moene.indiv.nluug.nl>
3015         * trans-types.c (g95_build_array_type): Assumed
3016         sized arrays can have rank > 1.
3017         * trans.c (g95_trans_code): Remove erroneous
3018         warning about CONTINUE.
3019         * trans-expr.c (g95_conv_variable): Remove
3020         erroneous assert.
3022 2002-11-15  Paul Brook  <paul@nowt.org>
3024         * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
3026 2002-10-31  Paul Brook  <paul@nowt.org>
3028         * f95-tree.c: Remove tree copying stuff that's now in gimple.c
3029         * trans-expr.c (g95_conv_component_ref): Handle character string
3030         components.
3031         (g95_conv_string_parameter): Ditto.
3032         * trans-types.c (g95_get_derived_type): Add length decl to caracter
3033         string components.
3035 2002-10-10  Paul Brook  <paul@nowt.org>
3037         * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
3038         * trans-expr.c (g95_conv_function_call): Remove unreliable return value
3039         check.
3040         * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
3041         (g95_conv_intrinsic_function): Handle size and shape intrinsics.
3042         (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
3043         * trans-types.c (pvoid_type_node): Declare and initialize.
3044         * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
3045         (g95_array_allocate): Fix when base==data.
3046         (g95_conv_array_parameter): Correctly handle reduced rank sections.
3047         * trans-io.c (g95_trans_write): Correctly handle string modifiers.
3049 2002-10-09  Paul Brook  <paul@nowt.org>
3051         * (g95_conv_expr_reference): Handle character strings correctly.
3053 2002-10-07  Paul Brook  <paul@nowt.org>
3055         (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
3056         langhook.
3057         * trans-array.c (g95_build_array_initializer): Remove.
3058         (g95_conv_array_initializer): New Function.
3059         (g95_trans_auto_arry_allocation): Cleanup.
3060         (g95_trans_init_character_array): Remove.
3061         * g95spec.c: Link in libgforbegin.
3062         * trans.c (g95_generate_code): Rename main function to MAIN__.
3063         (g95_create_var): New function.
3064         (g95_create_var_np): New function.
3065         (g95_evaluate_now): New function.
3066         (g95_start_block): New function.
3067         (g95_finish_block): New function.
3068         (g95_add_expr_to_block): New function.
3069         (g95_add_block_to_block): New function.
3070         * trans-expr.c (g95_conv_componen_ref): New function.
3071         * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
3072         (F95_OBJS): Add dependency.o.
3073         * f95-lang.c (g95_is_simple_stmt): Remove.
3074         * f95-tree.c (mark_not_simple): New function.
3075         (unshare_all_trees): New function.
3076         (create_tmp_var, create_tmp_alias_var): Remove.
3077         * support.c (declare_tmp_vars, tree_last_decl): Remove.
3078         * trans*: Convert to new IR using GENERIC trees.  Don't bother about
3079         SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
3081 2002-10-01  Paul Brook  <paul@nowt.org>
3083         * trans-array.c: Add support for descriptorless arrays.
3084         (g95_conv_array_data): New function.
3085         (g95_conv_array_base): New function.
3086         * trans-array.h: Declare these here.
3087         * trans-decl.c(g95_create_mopdule_variable): Perform variable
3088         initialization and creation here.
3089         (g95_create_module_vars): Instead of here.
3090         * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
3091         * trans-intrinsic.c: Ditto.
3092         * trans-types.c (g95_is_nodesc_array): New function.
3093         (g95_get_nodesc_array_type): New function.
3094         (g95_sym_type, g95_get_derived_type): Use them.
3095         * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
3097 2002-09-28  Paul Brook  <paul@nowt.org>
3099         * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
3100         * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
3101         parameters.
3103 2002-09-24  Paul Brook  <paul@nowt.org>
3105         * f95-lang.c (listify): Remove declaration.
3106         (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
3107         (listify)
3108         * f95-tree.c (get_name): New function.
3109         * trans.c (module_namespace): Remove.
3110         * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
3111         * trans-types.c: Ditto.
3113 2002-09-19  Paul Brook  <paul@nowt.org>
3115         * trans-array.c (g95_get_array_cons_size): New Function.
3116         (g95_con_ss_startstride): Handle Array constructors.
3117         (g95_conv_loop_setup): Ditto.
3118         (g95_conv_array_parameter): Ditto.
3119         * tras-decl.c (g95_finish_var_decl): Make initializes variables
3120         static.
3122 2002-09-19  Paul Brook  <paul@nowt.org>
3124         * trans.c (g95_simple_fold_tmp): Detect variables inside
3125         NON_LVALUE_EXPR.
3126         * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
3128 2002-09-18  Steven Bosscher <s.bosscher@student.tudelft.nl>
3130         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
3132 2002-09-14  Paul Brook  <paul@nowt.org>
3134         * trans.c (g95_create_module_variable): Move to trans-decl.c.
3135         * trans-const.c (g95_conv_string_init): New Function.
3136         * trans-const.h: Declare it.
3137         * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
3138         variables. Don't bail on intrinsic symbols.
3139         (get_extern_function_decl): Handle specific intrinsic functions.
3140         * trans-types.c (g95_sym_type): Dummy functions don't return
3141         reference types.
3142         * trans-array.c (g95_build_array_initializer): New Function.
3143         (g95_trans_auto_array_allocation): Build initializer for static decls.
3144         Don't use mpz_addmul, it's GMP4 only.
3146 2002-09-12  Paul Brook  <paul@nowt.org>
3148         * trans-decl.c (g95_generate_code): Fix thinko with return variable.
3149         (g95_get_extern_function_decl, g95_build_function_decl): Mangle
3150         assembler names for module procedures.
3152 2002-09-11  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
3154         * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
3155         dependency/
3157 2002-09-10  Paul Brook  <paul@nowt.org>
3159         * trans-array.c: Change format of G95_SS_TEMP strictures.
3160         (g95_check_fncall_dependancy): New function.
3161         (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
3162         offsets.
3163         * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
3164         result variables.
3165         (g95_build_function_decl): Don't assume result arrays are packed.
3166         (g95_trans-deferred-vars): Handle array result variables.
3167         (g95_generate_fuction_code): Clear saved_function_decls.
3168         * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
3169         reference.
3170         (g95_trans_arrayfunc_assign): New function.
3171         (g95_trans_assignment): Use it.
3172         * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
3173         (g95_se): Add direct_byref.
3174         * trans-types.c: Use sym->result rather than sym where appropriate.
3175         * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
3176         Update other functions to use this.
3177         (g95_is_intrinsic_libcall): New function.
3178         (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
3179         (g95_walk_intrinsic_function): Ditto.
3181 2002-09-08  Paul Brook  <paul@nowt.org>
3183         * trans-types.c: Change rank field to dtype field in array descriptor.
3184         * trans-array.c: Implement filling of dtype array descriptor field.
3185         * trans-intrinsic.c: Fix broken LEN intrinsic.
3187 2002-09-07  Paul Brook  <paul@nowt.org>
3189         * trans-intrinsic.c: Remove outdated todo intrinsic list.
3190         (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
3191         (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
3193 2002-09-06  Paul Brook  <paul@nowt.org>
3195         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
3196         (gt-f95-trans-types.h): Add dependancy information.
3197         * config-lang.in (gtfiles): Add trans-types.c
3198         * f95-lang.c (g95_be_parse_file): Pass error and warning counts
3199         back to top-level code.
3200         * trans-array.c, trans-types.c: Change format of array descriptor.
3201         (g95_conv_descriptor_dimension): New function.
3202         * trans-types.h (g95_conv_descriptor_rank): define.
3203         * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
3204         intrinsics.
3206 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
3208         * trans-array.c, trans-types.c: Add rank information to descriptor.
3210 2002-09-06  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
3212         * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
3214 2002-09-04  Paul Brook  <paul@nowt.org>
3216         * f95-lang.c (g95_create_decls): New function.
3217         (g95_init):  Move initialization of external decls to above, and call
3218         from g95_be_parse_file.
3219         * trans.c (g95_finish_stmt): Don't amputate the decl chain.
3220         * trans-types.c (g95_init_types): Always name integer and char types.
3221         (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
3223 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
3225         * Make-lang.in: Add options.c to F95_PARSER_OBJS
3227 2002-09-02  Paul Brook  <paul@nowt.org>
3229         * g95_generate_code: Clear the attr for __fortran_main.
3230         * trans-types.c (g95_finish_type): New function.
3231         * g95_init_io_state_type: Use g95_finish_type.
3232         * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
3234 2002-09-01  Paul Brook  <paul@nowt.org>
3236         * README.backend: Warn about the dangers of extra config.h files.
3237         Remove obsolete libgfor stuff.
3238         * config-lang.in: Add target-libgfor dependancy.
3239         * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
3241 2002-09-01  Toon Moene  <toon@moene.indiv.nluug.nl>
3243         * g95_conv_mpz_to_tree: Free storage pointed to by q,
3244         not by buff.
3246 2002-08-30  Paul Brook  <paul@nowt.org>
3248         * trans-intrinsic.c (g95_conv_intrinsic_function,
3249         g95_walk_intrinsic_function): Added ANY and ALL.
3250         (g95_conv_intrinsic_anyall): New function.
3251         * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in
3252         mangled name