* decl.c (add_init_expr_to_sym): Check for variable size arrays.
[official-gcc.git] / gcc / fortran / ChangeLog
blob00e6be2f6db7423f57523dc4ff65f65102d6a4a0
1 2004-05-15  Victor Leikehman  <lei@haifasphere.co.il>
3         * decl.c (add_init_expr_to_sym): Check for variable size arrays.
5 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
7         * primary.c (match_boz_constant): Use gfc_notify_std() for
8         issuing a warning or an error.
10 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
12         PR fortran/13826
13         * primary.c (match_structure_constructor): Rename ...
14         (gfc_match_structure_constructor): ... to this. Make non-static.
15         (gfc_match_rvalue): Call renamed function.
16         * match.h (gfc_match_structure_constructor): Declare.
17         * match.c (gfc_match_data_constant): Handle structure
18         constructor.
20 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
22         PR fortran/13702 
23         (Port from g95)
24         * gfortran.h (gfc_linebuf): New typedef.
25         (linebuf): Remove.
26         (gfc_file): Revamped, use new gfc_linebuf.
27         (locus): Revamped, use new types.
28         (gfc_current_file): Remove.
29         (gfc_current_form, gfc_source_file): New global variables.
30         * match.c (gfc_match_space, gfc_match_strings): Use
31         gfc_current_form to find source form.
32         * module.c (gfc_dump_module): Use gfc_source_file when printing
33         module header.
34         * error.c (show_locus, show_loci) Use new data structures to print
35         locus.
36         * scanner.c (first_file, first_duplicated_file, gfc_current_file):
37         Remove.
38         (file_head, current_file, gfc_current_form, line_head, line_tail,
39         gfc_current_locus1, gfc_source_file): New global variables.
40         (gfc_scanner_init1): Set new global variables.
41         (gfc_scanner_done1): Free new data structures.
42         (gfc_current_locus): Return pointer to gfc_current_locus1.
43         (gfc_set_locus): Set gfc_current_locus1.
44         (gfc_at_eof): Set new variables.
45         (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
46         to new locus structure.
47         (gfc_check_include): Remove.
48         (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
49         (gfc_skip_comments): Use gfc_current_form, find locus with
50         gfc_current_locus1.
51         (gfc_next_char): Use gfc_current_form.
52         (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
53         (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
54         comment formatting.
55         (get_file): New function.
56         (preprocessor_line, include_line): New functions.
57         (load_file): Move down, rewrite to match new data structures.
58         (gfc_new_file): Rewrite to match new data structures.
59         * parse.c (next_statement): Remove code which is now useless. Use
60         gfc_source_form and gfc_source_file where appropriate.
61         * trans-decl.c (gfc_get_label_decl): adapt to new data structures
62         when determining locus of frontend code.
63         * trans-io.c (set_error_locus): Same.
64         * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
65         * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
66         preprocessor flags.
67         (all): Add missing initializers.
69 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
71         * Make-lang.in (trans-common.o): Remove redundant dependency.
72         (data.c): Replace object file name ...
73         (data.o): ... by the correct one.
75 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
77         * dump-parse-tree.c (gfc_show_array_ref): Print colon only
78         for ranges when dumping array references.
80 2004-05-14  Victor Leikehman  <lei@haifasphere.co.il>
82         * decl.c (variable_decl): Always apply default initializer.
84 2004-05-08  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
86         PR fortran/15206
87         * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
88         handle zero correctly.
90 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
92         * match.c (gfc_match): Eliminate dead code.
94 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
96         * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
97         Detect bad continuation line in fixed form sources.
99 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
101         PR fortran/15205
102         * iresolve.c (gfc_resolve_nearest): Add new function.
103         * intrinsic.h: ... declare it here.
104         * intrinsic.c (add_functions): ... add it as resolving function
105         for NEAREST.
106         
107 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
109         PR fortran/14066
110         * match.c (gfc_match_do): Allow infinite loops with
111         label-do-stmt. Do not enforce space after comma.
113 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
115         PR fortran/15051
116         * parse.c (parse_interface): Allow empty INTERFACE, remove
117         seen_body.
119 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
121         * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
122         decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
123         expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
124         intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
125         matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
126         primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
127         trans-array.c, trans-array.h, trans-common.c, trans-const.c,
128         trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
129         trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
130         trans-types.h, trans.c, trans.h: Update copyright years and
131         boilerplate.
132         * data.c: Likewise, also removed two whitespace-only lines.
133         * gfortranspec.c, lang.opt: Update copyright years.
135 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
137         PR fortran/14568
138         * trans-decl.c (generate_local_decl): Don't warn for unused
139         variables which are in common blocks. 
141 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
143         * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
144         trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
145         trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
147 2004-05-13  Victor Leikehman  <lei@haifasphere.co.il>
149         PR fortran/15314
150         * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
152 2004-05-13  Joseph S. Myers  <jsm@polyomino.org.uk>
154         * gfortran.texi: Use @table @emph instead of @itemize @emph.
155         Remove "set DEVELOPMENT".
156         (Compiling GFORTRAN): Remove.
158 2004-05-09  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
160         * array.c (match_subscript, match_array_ref): Add comments
161         explaining argument 'init'.
162         * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
163         trans-expr.c, trans.c: Fix some typos in comments.
164         * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
165         * primary.c (match_digits, match_integer_constant): Add comment
166         explaining signflag.
168 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
170         PR fortran/13940
171         * primary.c: Include system.h and flags.h, needed for pedantic.
172         (match_boz_constant): Allow "x" for hexadecimal constants, warn if
173         pedantic is set.
175 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
177         PR fortran/13940
178         * match.c (match_data_constant): Handle case where
179         gfc_find_symbol sets sym to NULL
181 2004-04-28  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
183         * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
184         dependency on mathbuiltins.def
186 2004-04-24  Victor Leikehman  <lei@il.ibm.com>
188         * trans-io.c (transfer_expr): Implemented recursive printing
189         of derived types.
191 2004-04-24  Andrew Pinski  <pinskia@physics.uc.edu>
193         * gfortranspec.c: Do not include multilib.h.
195 2004-04-24  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
197         * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
198         2004 to copyright years.
199         * trans-expr.c, trans-decl.c: Comment update, we now generate
200         GENERIC, not SIMPLE. Add 2004 to copyright years.
202 2004-04-24  Paul Brook  <paul@codesourcery.com>
204         * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
206 2004-04-24  Feng Wang  <fengwang@nudt.edu.cn>
208         PR 14817
209         * arith.c (gfc_arith_divide): Fix complex divide.
211 2004-04-23  Andrew Pinski  <pinskia@physics.uc.edu>
213         * gfortranspec.c: Include the target headers.
215 2004-04-18  Feng Wang  <fengwang@nudt.edu.cn>
217         PR fortran/14921
218         PR fortran/14540
219         * arith.c (arctangent2): New function.
220         * arith.h (arctangent2): Add function prototype.
221         * simplify.c (gfc_simplify_atan2): Use it.
222         (gfc_simplify_log): Use it.
224 2004-04-12  Diego Novillo  <dnovillo@redhat.com>
226         * fortran/f95-lang.c (gfc_expand_stmt): Remove.
227         (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
229 2004-04-11  Bud Davis  <bdavis9659@comcast.net>
231         PR fortran/14872
232         * trans-io.c (build_dt): Change REC to value.
234 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
236         PR 14394 
237         * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
238         the real value when converting mpf to string.
240 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
242         PR 14395
243         * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
244         the result.
246 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
248         PR fortran/14377
249         * simplify.c (simplify_min_max): Convert the type of the result.
251 2004-04-11  Paul Brook  <paul@codesourcery.com>
253         * gfortran.texi: Use full target triplet.
255 2004-04-11  Paul Brook  <paul@codesourcery.com>
257         * Make-lang.in (GFORTRAN_TEXI): Set it.
258         (fortran/dfortran.dvi): Use it.  Add fortran to include paths.
259         (fortran/gfortran.info): Ditto. 
260         * gfortran.texi: Major update.
261         * invoke.texi: New file.
263 2004-04-10  Paul Brook  <paul@codesourcery.com>
265         * trans-array.c (gfc_trans_allocate_temp_array,
266         gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
267         * trans-decl.c (gfc_build_dummy_array_decl,
268         gfc_get_symbol_decl, gfc_build_function_decl,
269         gfc_create_module_variable): Ditto.
270         * trans-expr.c (gfc_conv_variable): Ditto.
271         * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
272         * trans.h (GFC_DECL_STRING): Remove.
273         (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
274         GFC_DECL_ASSIGN): Renumber flags.
276 2004-04-05  Paul Brook  <paul@codesourcery.com>
278         PR 13252
279         PR 14081
280         * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
281         and stack_restore.
282         * gfortran.h (struct gfc_charlen): Add backend_decl.
283         * trans-array.c (gfc_trans_allocate_temp_array,
284         gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
285         (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
286         Remove old, broken string handling.
287         (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
288         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
289         gfc_trans_deferred_array): Handle character arrays.
290         * trans-const.c (gfc_conv_const_charlen): New function.
291         * trans-const.h (gfc_conv_const_charlen): Add prototype.
292         * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
293         as static.
294         (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
295         (gfc_create_string_length): New function.
296         (gfc_get_symbol_decl): Create lengths for character variables.
297         (gfc_get_fake_result_decl): Ditto.
298         (gfc_build_function_decl): Only set length for assumed length
299         character arguments.
300         (gfc_trans_dummy_character): New function.
301         (gfc_trans_auto_character_variable): Rewrite.
302         (gfc_trans_deferred_vars): Handle more types of character variable.
303         (gfc_create_module_variable): String lengths have moved.
304         (gfc_generate_function_code): Initialize deferred var chain earlier.
305         * trans-expr.c (gfc_conv_init_string_length): Rename ...
306         (gfc_trans_init_string_length):  ... to this.
307         (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
308         gfc_conv_function_call): Update to new format for character variables.
309         (gfc_conv_string_length): Remove.
310         (gfc_conv_string_parameter): Update assertion.
311         * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
312         * trans-io.c (set_string): Use new macro names.
313         * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
314         * trans-types.c (gfc_get_character_type): Use existing length expr.
315         (gfc_is_nodesc_array): Make public.
316         (gfc_get_dtype_cst): Rename ...
317         (gfc_get_dtype): ... to this.  Handle unknown size arrays.
318         (gfc_get_nodesc_array_type): Use new name.
319         (gfc_sym_type): New character variable code.
320         (gfc_get_derived_type): Ditto.
321         (gfc_get_function_type): Evaluate character variable lengths.
322         * trans-types.h (gfc_strlen_kind): Define.
323         (gfc_is_nodesc_array): Add prototype.
324         * trans.h: Update prototypes.
325         (struct lang_type): Update comments.
326         (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
327         (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
329 2004-04-04  Paul Brook  <paul@codesourcery.com>
331         * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
332         * options.c (gfc_init.options, gfc_handle_option): Ditto.
333         * trans-expr.c (gfc_conv_function_call): Ditto.
334         * trans-types.c (gfc_is_nodesc_array): Ditto
335         * lang.opt (fg77-calls): Remove.
337 2004-04-04  Paul Brook  <paul@codesourcery.com>
339         * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
340         (gfc_conv_descriptor_base): Rename ...
341         (gfc_conv_descriptor_offset): ... to this.
342         (gfc_trans_allocate_array_storage): Set offset to zero.
343         (gfc_conv_array_base): Rename ...
344         (gfc_conv_array_offset): ... to this.
345         (gfc_conv_array_index_ref): Add offset parameter.
346         (gfc_conv_array_ref): Include offset.
347         (gfc_trans_preloop_setup): Use existing offset.
348         (gfc_trans_allocate_temp_array,  gfc_array_allocate,
349         gfc_trans_auto_array_allocation, gfc_trans_g77_array,
350         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
351         gfc_conf_ss_descriptor): Set offset.
352         * trans-array.h: Rename prototypes.
353         * trans-const.h (gfc_index_zero_node): Define.
354         * trans-decl.c (gfc_build_qualified_array): Change base to offset.
355         * trans-types.c (gfc_get_array_type_bounds): Ditto.
356         (gfc_get_nodesc_array_type): Calculate offset before upper bound.
358 2004-03-25  Diego Novillo  <dnovillo@redhat.com>
360         * convert.c (convert): Don't handle WITH_RECORD_EXPR.
362 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
364         PR 14055
365         * arith.c (gfc_convert_integer,gfc_convert_real):  Removed leading '+'
366         before conversion by gmp library call.
368 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
370         PR 12921
371         * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
373 2004-02-24  Richard Henderson  <rth@redhat.com>
375         * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
377 2004-02-19  Loren J. Rittle  <ljrittle@acm.org>
379         * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
380         (fortran/gfortran.info): ... to here.
381         (f95.srcinfo): New.
383 2004-02-16  Richard Henderson  <rth@redhat.com>
385         * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
386         * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
387         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
388         (gfc_expand_function): Rename from expand_function_body, make static,
389         don't do anything except invoke tree_rest_of_compilation.
390         (gfc_be_parse_file): Invoke cgraph.
391         (gfc_expand_decl): Remove.
392         (gfc_init_builtin_functions): Add __builtin_init_trampoline and
393         __builtin_adjust_trampoline.
394         * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
395         (gfc_finalize): New.
396         (gfc_generate_function_code): Use it.  Lower nested functions.
397         * trans-expr.c (gfc_conv_function_call): Add static chain operand
398         to call_expr.
399         * trans.c (gfc_build_function_call): Likewise.
400         * trans.h (expand_function_body): Remove.
402 2004-02-15  Victor Leikehman  <lei@il.ibm.com>
404         PR gfortran/13433
405         * trans-decl.c (gfc_build_function_decl) For functions
406         returning CHARACTER pass an extra length argument,
407         following g77 calling conventions.
408         * trans-types.c (gfc_get_function_type) Ditto.
409         * trans-expr.c (gfc_conv_function_call) Ditto.
411 2004-02-14  Paul Brook  <paul@codesourcery.com>
413         * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
415 2004-02-12  Paul Brook  <paul@nowt.org>
417         * BUGS: Remove.
419 2004-02-08  Steve Kargl  <sgk@troutmask.apl.washington.edu>
421         * gfortran.texi: Fix typos.
423 2004-02-07  Bud Davis  <bdavis9659@comcast.net>
425         PR gfortran/13909
426         * intrinsic.c (add_conversions) Use logical conversion instead
427         of real.
428         * trans-types.c (gfc_get_logical_type) implemented logical*1
429         and logical*2.
431 2004-01-17  Paul Brook  <paul@codesourcery.com>
433         * lang-specs.h: Remove %<fixed-form.
435 2004-01-15  Toon Moene  <toon@moene.indiv.nluug.nl>
437         * lang-specs.h: Enable preprocessing of source files
438         ending in .F, .fpp, .FPP, .F90 and .F95.
440 2004-01-13  Toon Moene  <toon@moene.indiv.nluug.nl>
442         PR fortran/12912
443         * lang-specs.h: Enable compilation of files ending
444         in .f, .for and .FOR.
446 2004-01-11  Paul Brook  <paul@codesourcery.com>
448         * trans-stmt.c (gfc_trans_if_1): New function.
449         (gfc_trans_if): Use it.
451 2004-01-11  Erik Schnetter  <schnetter@uni-tuebingen.de>
453         * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
454         (gfc_option_t): Add max_identifier_length.
455         * lang.opt: Add fmax-identifier-length.
456         * match.c (parse_name): Use limit.
457         * options.c (gfc_init_options): Set max_identifier_length.
458         (gfc_handle_option): Ditto.
460 2004-01-11  Feng Wang  <fengwang@nudt.edu.cn>
462         * intrinsic.c (add_functions): Add resolve function to dcmplx.
463         * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
464         * iresolve.c (gfc_resolve_dcmplx): New function.
466 2004-01-10  Paul Brook  <paul@codesourcery.com>
468         * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
469         * trans-types.c (gfc_sym_type): Handle external dummy procedures.
470         (gfc_return_by_reference): Correct condition.
471         (gfc_get_function_type): Ditto.
473 2004-01-10  Paul Brook  <paul@codesourcery.com>
475         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
476         types.
478 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
480         * iresolve.c: Use correct kind.
482 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
484         PR fortran/13467
485         * trans-decl.c (gfc_create_module_variable):  Output array valued
486         parameters.
488 2004-01-10  Paul Brook  <paul@codesourcery.com>
490         * resolve.c (resolve_branch): Get error message right way round.
492 2004-01-10  Canqun Yang <canqun@nudt.edu.cn>
494         * trans-array (gfc_conv_loop_setup): Adjust comment to track
495         reality.
496         (gfc_array_allocate): Don't count size of element twice.
498 2004-01-04  Paul Brook  <paul@codesourcery.com>
500         * lang.opt (i8, r8, std=*): Remove RejectNegative.
502 2004-01-04  Paul Brook  <paul@codesourcery.com>
504         * error.c (gfc_notify_std): New function.
505         * gfortran.h (gfc_notify_std): Declare.
506         (GFC_STD_*): Define.
507         (gfc_option_t): Add warn_std and allow_std.
508         * intrinsic.c (gfc_init_expr_extensions): Fix logic.
509         (gfc_intrinsic_func_interface): Use gfc_notify_std.
510         * check.c (check_rest): Use gfc_notify_std.
511         * match.c (gfc_match_pause): Ditto.
512         (gfc_match_assign): Ditto.
513         (gfc_match_goto): Ditto.
514         * resolve.c (resolve_branch): Ditto.
515         * lang.opt: Add std=<foo> and w.
516         * options.c (gfc_init_options): Set allow_std and warn_std.
517         (gfc_handle_option): Handle OPT_std_* and OPT_w.
519 2004-01-01  Paul Brook  <paul@codesourcery.com>
521         * array.c (gfc_append_constructor): Take constructor, not expression.
522         * data.c (struct gfc_expr_stack): Remove.
523         (expr_stack): Remove.
524         (find_con_by_offset): Rename from find_expr_in_con.
525         (find_con_by_component): Rename from find_component_in_con.
526         (gfc_get_expr_stack): Remove.
527         (gfc_assign_data_value): Rewrite.
528         (gfc_expr_push): Remove.
529         (gfc_expr_pop): Remove.
530         (gfc_advance_section): Rename from
531         gfc_modify_index_and_calculate_offset.  Handle unbounded sections.
532         (gfc_get_section_index): Handle unbounded sections.
533         * gfortran.h: Update prototypes.
534         * resolve.c (check_data_variable): Array section maight not be the
535         last ref.
537 2004-01-01  Paul Brook  <paul@codesourcery.com>
539         PR fortran/13432
540         * resolve.c (resolve_symbol): Allow assumed length function results.
542 2004-01-01  Steve Kargl  <sgk@troutmask.apl.washington.edu>
544         * match.c (gfc_match_pause): Fix spelling.
546 2004-01-01  Steven Bosscher  <stevenb@suse.de>
548         PR fortran/13251
549         * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
550         reference from the expression.
552 2003-12-26  Feng Wang  <fengwang@nudt.edu.cn>
554         * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
555         dumping.
556         * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
557         (gfc_exec_op): New EXEC_LABEL_ASSIGN.
558         (symbol_attribute):New variable attribute: assign.
559         * io.c (resolve_tag):Integer variable is allowed.
560         (match_dt_format): Add ASSIGN statement. Set assign flag.
561         * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
562         (gfc_match_assign): Add ASSIGN statement. Set assign flag.
563         (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
564         * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
565         (next_statement): Add ST_LABEL_ASSIGNMENT.
566         (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
567         * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
568         (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
569         * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
570         * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
571         assign.  Put them into the stuct lang_decl.
572         * trans-io.c (set_string): Add the assign statement.
573         * trans-stmt.c (gfc_trans_label_assign): New function.
574         (gfc_trans_goto): Translate ASSIGNED GOTO statement.
575         * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
576         * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
577         * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
578         (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
579         (GFC_DECL_ASSIGN(node)): New macro to access flag.
581 2003-12-31  Huang Chun <chunhuang73@hotmail.com>
583         PR fortran/13434
584         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in 
585         minval/maxval.
587 2003-12-22  Toon Moene  <toon@moene.indiv.nluug.nl>
589         * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
590         that arguments to subroutines/functions can't alias themselves, nor global
591         memory.
593 2003-12-20  Steven Bosscher  <stevenb@suse.de>
595         * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
596         * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
598 2003-12-12  Huang Chun <chunhuang73@hotmail.com>
600         * primary.c (match_substring): Fix substring bug for start point
601         or end point is NULL.
602         * trans-expr.c (gfc_conv_substring): Ditto
603         * trans-types.c (gfc_sym_type): Get correct type of scalar 
604         character variables.
605         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in 
606         derived type.
608 2003-12-10  Richard Henderson  <rth@redhat.com>
610         * options.c (gfc_post_options): Don't ever use rtl inlining.
612 2003-12-05  Canqun Yang  <canqun@nudt.edu.cn>
614         * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
615         * trans-equivalence.c: Remove.
616         * trans-decl.c (gfc_get_symbol_decl): Update to match.
617         (gfc_generate_function_code): Ditto.
618         * trans-array.c (gfc_conv_array_parameter): Ditto.
619         * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
620         (F95_ADDITIONAL_OBJS): Add stor-layout.o
621         * trans.h (gfc_trans_equivalence): Remove.
622         * gfortran.h (struct gfc_equiv): Add used field.
623         (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
624         equiv_offset fields.
626 2003-12-05  Richard Henderson  <rth@redhat.com>
628         * trans.c (gfc_build_addr_expr): New.
629         (gfc_build_indirect_ref, gfc_build_array_ref): New.
630         * trans.h: Declare them.
631         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
632         trans-stmt.c, trans.c (*): Use them.
634         * f95-lang.c (gfc_post_options): Remove dead prototype.
635         * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
636         * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
637         allocation size.
639 2003-12-01  Feng Wang  <fengwang@nudt.edu.cn>
641         * io.c (gfc_match_format): Check for missing format label.
643 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
645         PR fortran/13155
646         * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
647         from interfaces in modules.
649 2003-11-30  Paul Brook  <paul@nowt.org>
651         * trans-array.c (gfc_trans_g77_array): Make non-static.
652         (gfc_trans_assumed_size): Remove.
653         (gfc_trans_dummy_array_bias): Explicitly free temporary.
654         * trans-array.h (gfc_trans_g77_array): Add prototype.
655         (gfc_trans_assumed_size): Remove.
656         * trans-decls.c (gfor_fndecl_push_context): Remove.
657         (gfor_fndecl_pop_context): Remove.
658         (gfc_build_function)decls): Don't create them.
659         (gfc_trans_deferred_vars): Update to match. Remove dead code.
660         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
662 2003-11-30  Kejia Zhao  <kejia_zh@nudt.edu.cn>
664         * trans-array.c (gfc_conv_array_parameter): Simplify
665         array argument passing for array name actual argument.
666         * trans-expr.c (gfc_conv_function_call): Ditto
667         * trans-types.c (gfc_is_nodesc_array):Ditto.
669 2003-11-30  Paul Brook  <paul@nowt.org>
671         * f95-lang.c (gfc_post_options): Move ...
672         * options.c (gfc_post_options): .. to here.  Handle inlining options.
673         * gfortran.h (gfc_post_options): Add prototype.
675 2003-11-28  Richard Henderson  <rth@redhat.com>
677         * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
679 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
681         * trans.h (has_alternate_specifier): New global variable.
682         * match.c (gfc_match_call): Handle actual arguments associated with
683         alternate return indicators.
684         * trans-expr.c (gfc_conv_function_call): Ditto
685         * trans-stmt.c (gfc_trans_call): Ditto
686         (gfc_trans_return): Handle return statement with value.
687         * trans-decl.c (gfc_generate_function_code): Handle functions with
688         asterisk dummy.
689         (gfc_get_fake_result_decl): Ditto
690         * trans-types.c (gfc_get_function_type): Ditto
691         * resolve.c (resolve_actual_arglist): Check alternate return indicators.
692         (resolve_formal_arglist): Check asterisk dummy.
694 2003-11-27  Paul Brook  <paul@nowt.org>
696         * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
697         allocation interface.
698         (gfc_conv_ array_parameter): Ditto.
699         (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
700         * trans-array.c: Update prototype.
701         * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
702         (gfc_trans_auto_character_variable): Use new memory alloc interface.
703         * trans-expr.c (gfc_conv_string_tmp): Ditto.
704         (gfc_conv_function_call): Use gfc_conv_string_tmp.
705         * trans-stmt.c (gfc_do_allocate):  Use new memory alloc interface.
706         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
707         * trans.h (gfc_ss_info): Remove unused pdata field.
708         * trans.c (gfc_create_var_np): Change T to V.
710 2003-11-26  Richard Henderson  <rth@redhat.com>
712         * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
713         * trans-intrinsic.c (gfc_intrinsic_map): ... here.  Add SCALE,
714         FRACTION, NEAREST, SET_EXPONENT.
715         (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
716         Fix GTY marking.  Remove unnecessary const's.
717         (LIBM_FUNCTION): Rename from I_LIB.
718         (LIBF_FUNCTION): New.
719         (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
720         conventions.  Assume the expr signature is correct.  Mark const.
721         (gfc_conv_intrinsic_exponent): Use library functions.
722         (gfc_conv_intrinsic_set_exponent): Remove.
723         (gfc_conv_intrinsic_scale): Remove.
724         (gfc_conv_intrinsic_nearest): Remove.
725         (gfc_conv_intrinsic_fraction): Remove.
726         (gfc_conv_intrinsic_function): Update.
727         * trans-decl.c (gfor_fndecl_math_exponent4): New.
728         (gfor_fndecl_math_exponent8): New.
729         (gfc_build_intrinsic_function_decls): Set them.
730         * trans.h: Declare them.
732 2003-11-25  Canqun Yang  <canqun@nudt.edu.cn>
734         * trans-common.c (gfc_layout_global_equiv): Locate the error for
735         underflow COMMON block.
736         (gfc_trans_one_common): Fix bug for size of COMMON block containing
737         EQUIVALENCE object. Also fix typo in an error message.
739 2003-11-25  Diego Novillo  <dnovillo@redhat.com>
741         * Make-lang.in: Add check-gfortran to lang_checks.
742         (check-f95): Alias for check-gfortran.
744 2003-11-25  Jason Merrill  <jason@redhat.com>
746         * Make-lang.in (f95.tags): Create TAGS.sub files in each
747         directory and TAGS files that include them for each front end.
749 2003-11-24  Paul Brook  <paul@nowt.org>
751         PR fortran/13154
752         * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
754 2003-11-24  Paul Brook  <paul@nowt.org>
756         * expr.c (simplify_const_ref): Return SUCCESS for things we don't
757         handle.
758         * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
760 2003-11-24  Paul Brook  <paul@nowt.org>
762         PR fortran/13105
763         * array.c (gfc_array_ref_shape): Handle elemental dimensions.
764         * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
766 2003-11-20  Richard Henderson  <rth@redhat.com>
768         * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
769         (gfc_conv_array_base): Likewise.
770         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
771         * trans-expr.c (gfc_conv_string_tmp): Likewise.
772         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
773         * trans-stmt.c (gfc_trans_character_select): Likewise.
775 2003-11-13  Paul Brook  <paul@nowt.org>
777         * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
779 2003-11-13  Canqun Yang  <canqun@nudt.edu.cn>
781         * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
782         (resolve_equivalence): New function.
783         (resolve_equivalence_derived): New function.
785 2003-11-12  Richard Henderson  <rth@redhat.com>
787         * trans.c (gfc_trans_code): Use annotate_with_locus instead of
788         annotate_all_with_locus.
790 2003-11-11  Canqun Yang  <canqun@nudt.edu.cn>
792         * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
793         * trans-decl.c (gfc_finish_var_decl): Modified.
795 2003-11-08  Paul Brook  <paul@nowt.org>
797         PR fortran/12704
798         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
799         arrays.
801 2003-11-06  Paul Brook  <paul@nowt.org>
803         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
805 2003-11-02  Canqun Yang  <canqun@nudt.edu.cn>
807         * match.c (gfc_match_stopcode): Assign '0' to stop_code.
809 2003-10-27  Anthony Green  <green@redhat.com>
811         * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
812         (f95.stagefeedback): Ditto.
814 2003-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
816         PR fortran/12682
817         * Make-lang.in (f95.stageprofile): Add.
818         (f95.stagefeedback): Add.
820 2003-10-23  Richard Henderson  <rth@redhat.com>
822         * f96-lang.c (gfc_gimplify_expr): Remove.
823         (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
824         (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
826 2003-10-23  Richard Henderson  <rth@redhat.com>
828         * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
830 2003-10-20  Paul Brook  <paul@nowt.org>
832         * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
833         * trans-stmt.c (gfc_trans_do_while): Ditto.
835 2003-10-17  Paul Brook  <paul@nowt.org>
837         * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
839 2003-10-17  Paul Brook  <paul@nowt.org>
841         * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
843 2003-10-17  Feng Wang  <wf_cs@yahoo.com>
845         * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
846         (gfc_resolve_minloc): Ditto.
847         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
848         Return the value after subtracting the lower bound.
850 2003-10-16  Richard Henderson  <rth@redhat.com>
852         * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
854 2003-10-16  Steven Bosscher  <steven@gcc.gnu.org>
856         * lang.c: Remove -M option for now, it's in the way for C.
858 2003-10-14  Jason Merrill  <jason@redhat.com>
860         * Make-lang.in (f95.tags): New rule.
862 2003-10-13  Richard Henderson  <rth@redhat.com>
864         * trans.c (gfc_trans_code): Use annotate_all_with_locus.
866 2003-10-13  Paul Brook  <paul@nowt.org>
868         * trans-decl.c (generate_local_decl): Don't create junk variables.
870 2003-10-13  Paul Brook  <paul@nowt.org>
872         * resolve.c (resolve_formal_arglist): Use function result decl in
873         preference to function decl.
875 2003-10-12  Richard Henderson  <rth@redhat.com>
877         * f95-lang.c (gfc_define_builtin): New const_p argument.  Set
878         TREE_READONLY.  Update all callers.
880 2003-10-12  Feng Wang  <wf_cs@yahoo.com>
882         * iresolve.c (gfc_resolve_cshift): Change to match implementation.
883         * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
884         (gfc_is_intrinsic_libcall): Add CSHIFT.
886 2003-10-12  Richard Henderson  <rth@redhat.com>
888         * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
889         (gfc_trans_array_constructor_value): Likewise.
890         (gfc_conv_array_initializer): Likewise.
891         * trans-stmt.c (gfc_trans_character_select): Likewise.
893 2003-11-12  Kejia Zhao  <kejia_zh@yahoo.com.cn>
895         * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
897 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
899         * check.c (gfc_check_repeat): Check arguments are scalar.
900         (gfc_check_trim): New function.
901         * intrinsic.h (gfc_check_trim): Add prototype.
902         * intrinsic.c (add_functions): Use it.
903         * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
904         Decalare.
905         * trans-decl.c: Ditto.
906         (gfc_build_intrinsic_fucntion_decls): Set them.
907         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
908         (gfc_conv_intrinsic_trim): New function.
909         (gfc_conv_intrinsic_repeat): New function.
910         (gfc_conv_intrinsic_function): Use them.
912 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
914         * trans-types.c (gfc_sym_type): Handle result variables.
916 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
918         * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
919         gfc_get_character_type.
921 2003-10-11  Feng Wang  <wf_cs@yahoo.com>
923         * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
925 2003-10-11  Paul Brook  <paul@nowt.org>
927         * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
928         (gfc_resolve_dprod): New function.
929         (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
930         * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
931         (gfc_resolve_dprod): Declare.
932         * intrinsic.c (add_functions): Use them.
933         * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
935 2003-10-06  Richard Henderson  <rth@redhat.com>
937         * f95-lang.c (gfc_init_builtin_functions): Add clzll.
938         * trans-intrinsic.c (call_builtin_clz): Use it.
940 2003-10-05  Paul Brook  <paul@nowt.org>
942         * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
943         * trans-decl.c (gfc_generate_function_code): Set
944         cfun->function_end_locus.
946 2003-09-24  Jason Merrill  <jason@redhat.com>
948         * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
949         TREE_LOCUS.
951 2003-09-21  Lifang Zeng  <zlf605@hotmail.com>
952         Paul Brook  <paul@nowt.org>
954         * Make-lang.in (F95_OBJS): Add fortran/data.o.
955         * array.c (gfc_inser_constructor): New function.
956         (gfc_get_constructor): New function.
957         (gfc_free_constructor): Initialize offset and repeat.
958         (iterator_stack): Remove.
959         (expand_info): Add offset, component and repeat fields.
960         (expand_constructor): Set them.
961         (expand): Set new fields.
962         (gfc_copy_constructor): Ditto. Avoid recursion.
963         * gfortran.h: Add prototypes for new functions.
964         (gfc_constructor): Add offset, component and repeat.
965         (iteratio_stack): Move to here.
966         * resolve.c (check_data_variable): Convert data values into variable
967         initializers.
968         (traverse_data_list): Build implicit loop chain.
969         (gfc_resolve): Ditto.
970         * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
971         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
972         * trans-expr.c (gfc_conv_structure): Handle array initializers.
973         (gfc_conv_expr): Update to match.
974         * trans.h (gfc_conv_structure): Declare.
975         * data.c: New file.
977 2003-09-20  Kejia Zhao  <kejia_zh@yahoo.com.cn>
979         * trans.h: Add declarations for gfor_fndecl_si_kind and
980         gfor_fndecl_sr_kind.
981         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
982         * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
983         (g95_conv_intrinsic_sr_kind): New function.
984         (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
985         SELECTED_REAL_KIND.
987 2003-09-17  Lars Segerlund  <Lars.Segerlund@comsys.se>
989         * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
990         instead of _4 and _8 as postfix for libgfortran calls.
992 2003-09-16  Paul Brook  <paul@nowt.org>
994         * array.c (compare_bounds): New function.
995         (gfc_compare_array_spec): Use it.
997 2003-09-14  Paul Brook  <paul@nowt.org>
999         * primary.c (gfc_match_rvalue): Make sure sym->result is set.
1000         * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
1002 2003-09-14  Paul Brook  <paul@nowt.org>
1004         * check.c (dim_rank_check): Allow assumed bounds if requested.
1005         (gfc_check_lbound): Call it.
1006         (gfc_check_ubound): Ditto.
1007         (gfc_check_size): Change to match.
1008         * simplify.c (gfc_simplify_bound): New function.
1009         (gfc_simplify_lbound): New function.
1010         (gfc_simplify_ubound): New function.
1011         * intrinsic.h: Declare them.
1012         * intrinsic.c (add_functions): Use them.
1014 2003-09-14  Paul Brook  <paul@nowt.org>
1016         * io.c (format_lex): Initialize negative_flag.
1017         (check_format): Intialize repeat.
1018         * trans-io.c (gfc_new_nml_name_expr): Declare static.
1019         (gfc_new_var_expr): Ditto.
1021 2003-09-14  Paul Brook  <paul@nowt.org>
1023         * trans-array.c (gfc_conv_array_initializer): Handle derived types.
1024         * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
1026 2003-09-12  Paul Brook  <paul@nowt.org>
1028         * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
1030 2003-09-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
1032         * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
1033         for a correct expression.
1035 2003-09-10  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1037         * trans-intrinsic.c (real_compnt_info): New struct.
1038         (prepare_arg_info): New function.
1039         (gfc_conv_intrinsic_set_exponent): New function.
1040         (gfc_conv_intrinsic_scale): New function.
1041         (gfc_conv_intrinsic_nearest): New function.
1042         (gfc_conv_intrinsic_fraction): New function.
1043         (gfc_conv_intrinsic_exponent): New function.
1044         (gfc_conv_intrinsic_spacing): New function.
1045         (gfc_conv_intrinsic_rrspacing): New function.
1046         (gfc_conv_intrinsic_function): Use them.
1048 2003-08-24 XiaoQiang Zhang  (zhangapache@yahoo.com>
1050         * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for 
1051         build_int_2 changed from (high, low) to (low, high).
1052         * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
1053         ioparm_namelist_read_mode, iocall_set_nml_val_int,
1054         iocall_set_nml_val_float, iocall_set_nml_val_char,
1055         iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
1056         (gfc_build_io_library_fndecls): Add variable initialization.
1057         (gfc_new_nml_name_expr, get_new_var_expr): New function.
1058         (build_dt): Add namelist support.
1059         * io.c (value): New variable.
1060         (check_format): Support FMT_H now.
1062 2003-09-07  Paul Brook  <paul@nowt.org>
1064         * io.c (gfc_resolve_dt): Error if format label is not defined.
1066 2003-09-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1068         * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is 
1069         about case_switch's break. The other is about building the condition 
1070         statement tree, which judges the argument in the range of the 
1071         corresponding integer type.
1072         * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
1073         for the large values.
1075 2003-09-05  Paul Brook  <paul@nowt.org>
1077         * f95-lang.c (expand_function_body): Gimplify the function.
1079 2003-09-04  Jeff Law  <law@redhat.com>
1081         * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
1082         index zero!
1084 2003-09-04  Paul Brook  <paul@nowt.org>
1086         * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
1087         (gfc_expand_stmt): New function.
1088         (LANG_HOOKS_RTL_EXPAND_STMT): Define.
1089         (expand_function_body): Use tree_rest_of_compilation.
1090         * trans-decl.c (gfc_generate_function_code): Don't free cfun.
1092 2003-09-03  Jeff Law  <law@redhat.com>
1094         * f95-lang.c (gfc_init_builtin_functions): C arrays start at
1095         index zero!
1097 2003-08-30  Paul Brook  <paul@nowt.org>
1099         * f95-lang.c (builtin_function): Remove #if 0 code.
1100         (gfc_define_builtin): New function.
1101         (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
1102         * mathbuiltins.def: New file.
1103         * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
1104         (gfc_intrinsic_map): Use mathbuiltins.def.
1105         (gfc_intrinsic_builtin_t): Remove.
1106         (gfc_build_intrinsic_lib_fndecls): Update.
1107         * trans-types.c (gfc_init_types): Remove redundant initilaization of
1108         signed_size_type_node.
1110 2003-08-29  Paul Brook  <paul@nowt.org>
1112         * arith.c (gfc_real_kinds): Use correct minimum exponents.
1114 2003-08-22  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1116         * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
1117         (gfc_conv_intrinsic_function): Add MODULO.
1119 2003-08-22  Jason Merrill  <jason@redhat.com>
1121         * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
1123 2003-08-22  Andreas Jaeger  <aj@suse.de>
1125         * Make-lang.in (f95.install-common): Add DESTDIR support.
1126         * (f95.install-info): Likewise.
1127         (f95.uninstall): Likewise.
1129 2003-08-19  Diego Novillo  <dnovillo@redhat.com>
1131         * trans-types.c (gfc_init_types): Initialize
1132         signed_size_type_node with size_type_node.
1134 2003-08-18  Paul Brook  <paul@nowt.org>
1136         * dependency.c (gfc_dependency): New enum.
1137         (check_another_array_ref): Remove.
1138         (gfc_get_array_from_component): Remove.
1139         (get_x): Remove.
1140         (get_range): Remove.
1141         (get_no_of_elements): Use mpz_t, not mpf_t.
1142         (transform_sections): New function.
1143         (gfc_check_range_range): Rename ...
1144         (gfc_check_section_vs_section): ... to this.  Use new function.
1145         (gfc_is_inside_range): Rewrite to match.
1146         (gfc_check_element_vs_section): Ditto.
1147         (gfc_check_element_vs_element): Ditto.
1148         (get_deps): Ditto.
1149         (gfc_dep_resolver): Ditto.  Remove unused parameter.
1150         * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
1151         gfc_check_element_vs_element, gfc_is_inside_range,
1152         gfc_get_array_from_component): Remove prototypes for static functions.
1153         (gfc_dep_resolver): Update prototype.
1154         * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
1156 2003-08-15  Paul Brook  <paul@nowt.org>
1158         * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
1159         return values to parent scope.
1160         (gfc_build_dummy_array_decl): Ditto.
1162 2003-08-14  Paul Brook  <paul@nowt.org>
1164         * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
1165         size of the type, not the pointer.
1166         * resolve.c (resolve_symbol): Give more accurate error message.
1168 2003-08-10  Paul Brook  <paul@nowt.org>
1170         * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
1172 2003-08-10  Paul Brook  <paul@nowt.org>
1174         * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
1175         type components.
1177 2003-08-10  Chun Huang  <compiler@sohu.com>
1179         * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
1180         (resolve_symbol): Ditto.
1181         * trans-expr.c (gfc_conv_statement_function): New function.
1182         (gfc_conv_function_expr): Use it.
1184 2003-08-10  Paul Brook  <paul@nowt.org>
1186         * trans-array.c (gfc_conv_ss_startstride): Handle functions.
1187         (walk_function_expr): Set section rank.
1188         * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
1190 2003-08-10  Paul Brook  <paul@nowt.org>
1192         * intrinsic.c (add_sym): Prefix names with correct string.
1193         (add_sym_0s): New function.
1194         (add_subroutines): Register abort.
1196 2003-08-10  Erik Schnetter  <schnetter@uni-tuebingen.de>
1198         * gfortran.h: Introduce options to control the mangling.
1199         * lang.opt: Likewise.
1200         * options.c (gfc_init_options): Handle the options.
1201         * trans-common.c (gfc_sym_mangled_common_id): New function.
1202         (gfc_build_common_decl): Call it.
1203         * trans-decl.c (gfc_sym_mangled_function_id): New function.
1204         (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
1206 2003-08-09  Paul Brook  <paul@nowt.org>
1208         * module.c (mio_symbol): Always ouput a namespace for formal args.
1209         (load_needed): Namespace now belong to their proper symbol.
1210         (gfc_dump_module): Change G95=>GFORTRAN.
1212 2003-08-05  Paul Brook  <paul@nowt.org>
1214         * options.c: Force -fg77-calls.
1216 2003-08-02  Paul Brook  <paul@nowt.org>
1218         * Makelang.in: Rename G95_* to GFORTRAN_*.
1219         * All sources: Rename G95_* to GFC_*.
1221 2003-08-01  Paul Brook  <paul@nowt.org>
1223         * fortran/Make-lang.in: Use GMPLIBS.
1224         * fortran/config-lang.in: Set need_gmp.
1225         * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
1227 2003-07-27  Andreas Jaeger  <aj@suse.de>
1229         * trans-decl.c (gfc_generate_constructors): Convert prototype to
1230         ISO C90.
1231         * trans-const.c (gfc_init_constants): Likewise.
1232         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
1234         * gfortranspec.c: Convert to ISO C90.
1235         (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
1237 2003-07-26  Paul Brook  <paul@nowt.org>
1239         * lang.opt: Add -fdump-parse-tree.
1240         * options.c (gfc_handle_option): Ditto.
1241         * resolve.c (resolve_forall_iterators): Convert to proper type.
1242         * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
1244 2003-07-26  Paul Brook  <paul@nowt.org>
1246         * Makefile.in: Add build dependencies on files common with rest of gcc.
1248 2003-07-26  Lifang Zeng  <zlf605@hotmail.com>
1250         * trans.h: Declare g95_trans_pointer_assignment.
1251         * trans-expr.c (g95_trans_pointer_assignment): New function.
1252         (g95_trans_pointer_assign): Use it.
1253         * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
1254         (g95_trans_pointer_assign_need_temp): New function.
1256 2003-07-26  Paul Brook  <paul@nowt.org>
1258         * gfortran.texi: Replace references to g95.
1260 2003-07-26  Paul Brook  <paul@nowt.org>
1262         Rename g95_* to gfc_*.
1264 2003-07-25  Paul Brook  <paul@nowt.org>
1265         
1266         * gfortran.h: Rename from g95.h.
1267         * trans-types.c (boolean_type_node, booelan_true_node,
1268         boolean_false_node): Remove.
1269         * trans-types.h: Ditto.
1271 2003-07-25  Chun Huang  <compiler@sohu.com>
1273         * parse.c (accept_statement): Implement BLOCK DATA statement.
1274         * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
1275         variables.
1277 2003-07-24  Lifang Zeng  <zlf605@hotmail.com>
1279         * trans-stmt.c (temporary_list): Define.
1280         (g95_trans_assign_need_temp): New function.
1281         (g95_trans_forall_1): Modified for WHERE.
1282         (g95_trans_where_assign): Modified.
1283         (g95_trans_where_2): Modified.
1284         (g95_evaluate_where_mask): Modified.
1285         (g95_trans_where): Modified.
1286         (g95_get_temp_expr): Removed.
1287         (g95_add_to_where_stmt_list): Removed.
1288         (compute_overall_iter_number): Modified for WHERE.
1289         * trans.h: Remove where_stmt_list.
1291 2003-07-24  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1293         * lang.opt: Correct description of options -J and -M.
1295 2003-07-23  Steven Bosscher   <steven@gcc.gnu.org>
1297         * lang.opt: Move help text to here.
1298         * lang-options.h: Remove.
1300 2003-07-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1301         * iresolve.c (g95_resolve_transpose): Proper variable in switch.
1302         * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
1303         on kind.
1305 2003-07-22  Steven Bosscher  <steven@gcc.gnu.org>
1306         Paul Brook  <paul@nowt.org>
1308         * check.c (check_rest): Use global pedantic flag.
1309         * io.c (data_desc): Ditto.
1310         * error.c (g95_warning, g95_warning_now): Use global flag.
1311         * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
1312         (expand_function_body): Update to new prototypes.
1313         (g95_init): Use new option names.
1314         * g95.h (g95_option_t): Standardize names.
1315         (g95_init_options, g95_handle_option): Update prototypes.
1316         * interface.c: Use new option names.
1317         * match.c: Ditto.
1318         * module.c: Ditto.
1319         * parse.c: Ditto.
1320         * primary.c: Ditto.
1321         * resolve.c: Ditto.
1322         * scanner.c: Ditto.
1323         * simplify.c: Ditto.
1324         * symbol.c: Ditto.
1325         * trans-array.c: Ditto.
1326         * trans-expr.c: Ditto.
1327         * trans-types.c: Ditto.
1328         * trans-decl.c: Ditto.
1329         (g95_build_library_function_decl): Remove obsolete VPARAMS.
1330         * trans.h: Ditto.
1331         * options.c (g95_display_help): Remove.
1332         (g95_init_options): Convert to new scheme.
1333         (set_Wall): Ditto
1334         (g95module_option): Ditto, rename from g95_parse_arg.
1335         (g95_handle_module_path_options): New function.
1336         * trans-equivalence.c: Fix error message.
1337         * lang.opt: Corrections.
1339 2003-07-21  Steven Bosscher  <steven@gcc.gnu.org>
1341         * lang.opt: New file.
1343 2003-07-21  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1345         * decl.c (match_attr_spec): Set colon_seen.
1347 2003-07-14  Paul Brook  <paul@nowt.org>
1349         * trans-array.c: Update comment.
1350         (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
1351         * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
1352         minmaxloc,minmaxval): Ditto.
1353         * trans-io.c (g95_trans_transfer): Ditto.
1354         * trans-stmt.c: Remove unneeded prototypes.
1355         (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
1356         (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
1357         (compute_inner_temp_size): Remove bits of dead code. Add comments.
1358         Don't share loopinfo.
1359         (compute_overall_iter_number): Declare as static.
1360         (allocate_temp_for_forall_nest): Ditto.
1361         (g95_trans_forall_1): Don't pass shared loopinfo.
1362         * trans.c (g95_start_block): Expand comment.
1364 2003-07-12  Paul Brook  <paul@nowt.org>
1366         * arith.c (g95_index_integer_kind): Remove unused initializer.
1367         * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
1368         index by size of element.
1369         (generate_loop_for_rhs_to_temp): Ditto.
1370         (allocate_temp_for_forall_nest): Use element size, not index size.
1372 2003-07-11  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1374         * arith.c (g95_index_integer_kind): Add a TODO.
1375         * simplify.c (g95_simplify_nearest): Add a TODO.
1377 2003-07-09  Chun Huang  <compiler@sohu.com>
1379         * trans.h: Add declarations for gfor_fndecl_string_scan and
1380         gfor_fndecl_string_verify.
1381         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1382         * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
1383         (g95_conv_intrinsic_verify): New function.
1384         (g95_conv_intrinsic_function): Add SCAN and VERIFY.
1385         * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
1386         of parameter 'BACK=.TRUE.'
1388 2003-07-05  Lifang Zeng  <zlf605@hotmail.com>
1390         * trans-stmt.c (iter_info, forall_info): Define.
1391         (g95_trans_forall_block): Remove.
1392         (g95_trans_forall_loop): Use forall info blocks.
1393         (g95_trans_nested_forall_loop): New function.
1394         (g95_do_allocate): Handle things other than logical masks.
1395         (generate_loop_for_temp_to_lhs): New function.
1396         (generate_loop_for_rsh_to_temp): New function.
1397         (compute_inner_temp_size): New function.
1398         (compute_overall_iter_number): New function.
1399         (allocate_temp_for_forall_nest): New function.
1400         (g95_trans_forall): Move body ...
1401         (g95_trans_forall_1): ... to here.  Handle loops with temporaries.
1403 2003-07-02  Paul Brook  <paul@nowt.org>
1405         * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
1406         in correct scope.  Change callers to match.
1407         * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
1408         * iresolve.c (g95_resolve_reshape): Only use constant shapes.
1410 2003-07-02  Paul Brook  <paul@nowt.org>
1412         * trans-array.c (g95_conv_loop_setup): Remove dead var.  Use
1413         expression shape for all expressions.
1414         * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
1416 2003-07-03  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1418         * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
1419         g95_parse_arg), intrinsic.c (g95_convert_type): support of
1420         -Wconversion.
1421         * intrinsic.c, g95.h: Add g95_convert_type_warn,
1422         * resolve.c (g95_resolve_index): Call it.
1424 2003-07-02  Paul Brook  <paul@nowt.org>
1426         * iresolve.c (g95_resolve_reshape): Set expression shape.
1427         (g95_resolve_shape): Ditto.
1428         * simplify.c (g95_simplify_shape): Move common code outside condition.
1429         * trans-array.c (g95_conv_array_initializer): Teach it how to count.
1431 2003-07-01  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1433         * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
1434         conformance checks.
1436 2003-06-29  Paul Brook  <paul@nowt.org>
1438         * array.c (g95_simplify_iterator_var): Don't bother with return value.
1439         * expr.c (find_array_element, find_component_ref): New functions.
1440         (remove_subobject_ref): New function.
1441         (simplify_const_ref): Use them.  Rename from simplify_component_ref.
1442         (simplify_ref_chain): New function.
1443         (g95_simplify_expr): Use it.  Simplify parameter variable subobjects.
1444         (g95_specification_expr): Simplify the expression.
1445         * resolve.c (resolve_operator): Check simplifications return code.
1446         (g95_resolve_expr): Ditto.
1448 2003-06-26  Paul Brook  <paul@nowt.org>
1450         * expr.c (simplify_component_ref): New function.
1451         (g95_simplify_expr): Use it.
1452         * resolve.c (resolve_structure_cons): Handle references.
1454 2003-06-25  Paul Brook  <paul@nowt.org>
1456         * trans-io.c (build_dt): Handle internal units.
1458 2003-06-25  Canqun Yang  <canqun@yahoo.com.cn>
1460         * trans-common.c (g95_build_common_decl): Array index range starts at 0.
1461         (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
1462         Use g95_array_index_type instead of integer_type_node.
1463         (g95_build_common_decl, g95_set_common_master_type): Use
1464         g95_character1_type_node instead of char_type_node.
1465         * trans-equivalence.c (g95_layout_local_equiv): As above.
1467 2003-06-24  Steven G. Kargl  <kargls@attbi.com>
1469         * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
1470         remove last remains of -fquiet.
1472 2003-06-22  Paul Brook  <paul@nowt.org>
1474         * resolve.c (resolve_operator): Don't fail if we can't simplify.
1475         (g95_resolve_expr): Ditto.
1476         (resolce_code): Mark as static.
1477         * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
1478         gimplifer doesn't (yet).
1480 2003-06-20  Paul Brook  <paul@nowt.org>
1482         * g95.h: Add ST_PAUSE and EXEC_PAUSE.
1483         * match.c (g95_match_if): Add ST_PAUSE.
1484         (g95_match_stopcode): New function.
1485         (g95_match_pause, g95_match_stop): Use it.
1486         * parse.c (g95_ascii_statement): Handle ST_PAUSE.
1487         (decode_stmt, next_statement, parse_executable): Ditto.
1488         * resolve.c (resolve_code): Ditto.
1489         * st.c (g95_free_statement): Ditto.
1490         * trans-stmt.c (g95_trans_pause): New function.
1491         * trans-stmt.h: Declare it.
1492         * trans.c (g95_trans_code): Use it.
1493         * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
1494         Declare.
1495         (g95_build_builtin_function_decls): Initialize them.
1496         * trans.h: Ditto.
1497         * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
1499 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1501         * io.c (g95_match_open , g95_match_close, g95_match_inquire,
1502         match_filepos): Fix error handling.
1504 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1506         * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
1507         Add assertions on arguments.
1508         * resolve.c (expression_shape): Remove useless &.
1509         * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
1510         g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
1511         g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
1512         g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
1513         g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
1514         g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
1515         (g95_simplify_not, g95_simplify_scale): Add assertions.
1517 2003-06-15  Paul Brook  <paul@nowt.org>
1519         Clean up stuff to work with the ssa optimizers.
1520         * convert.c (convert): Handle BOOLEAN_TYPEs.
1521         * f95-lang.c (g95_truthvalue_conversion): Implement.
1522         * trans-array.c (g95_trans_array_constructor_value): Group multiple
1523         scalar values.
1524         * trans.h (g95_truthvalue_conversion): Declare.
1525         * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
1526         * trans-stmt.c (g95_trans_character_select): Don't create array
1527         assignments.  Mark labels as indirect jump targets.
1528         * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
1529         (g95_get_dtype_cst): Handle LOGICAL types.
1531 2003-06-14  Paul Brook  <paul@nowt.org>
1533         * f95-lang.c (g95_gimplify_expr): New function.
1534         * trans-array.c (g95_trans_array_constructor_value): Don't create
1535         array assignments.
1536         (g95_conv_expr_descriptor): Rename simple->gimple.
1537         * trans-expr.c (conv_expr_op): Use proper logical operators.
1538         * trans-intrinsic.c (build_fixbound_expr): New function.
1539         (build_fix_expr): Ditto.
1540         (g95_conv_intinsic_aint): Use them. Use builtin functions.
1541         (g95_conv_intrinsic_function): Add FLOOR and CEILING.
1543 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1545         * array.c (g95_compare_array_spec): Remove unreachable code.
1546         * expr.c (g95_copy_expr): Likewise.
1547         * intrinsic.c (g95_convert_type): Likewise.
1548         * misc.c (g95_code2string): Likewise.
1549         * simplify.c (g95_simplify_ishft, g95_simplify_real,
1550         g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
1551         * trans-stmt.c (g95_trans_select): Likewise.
1552         * primary.c (extend_ref): Add an assertion.
1553         * simplify.c (g95_convert_constant): Add const.
1554         * intrinsic.h: Remove g95_check_x_ni.
1555         * f95-lang.c (g95_finish): Call g95_release_include_path.
1557 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1559         * resolve.c (resolve_contained_functions): Fix typo introduced on
1560         2003-01-13.
1562 2003-06-09  Paul Brook  <paul@nowt.org>
1564         * g95.h: Include system.h not hwint.h.
1565         * many: use safe-ctype.h not ctype.h.  Change isalpha -> ISALPHA, etc.
1566         * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
1568 2003-06-09  Paul Brook  <paul@nowt.org>
1570         * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
1571         * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
1572         * trans-decl.c (g95_add_decl_to_functions): Make non-static.
1573         (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
1574         (g95_generate_function_code): Translate COMMON and EQUIVALENCE
1575         objects.
1576         * trans.h (g95_trans_equivalence, g95_trans_common,
1577         g95_add_decl_to_function): Declare.
1578         * trans-common.c, trans-equivalence.c: New files.
1580 2003-06-08  Steven Bosscher  <steven@gcc.gnu.org>
1582         * intrinsic.c (g95_intrinsic_extension): Remove.
1583         (add_functions): Substitute g95_check_x for g95_check_x_ni
1584         everywhere.
1585         (g95_init_expr_extensions): New function.
1586         (g95_intrinsic_func_interface): Use it.
1587         * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
1588         * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
1589         g95_check_precision, g95_check_present, g95_check_radix,
1590         g95_check_range, g95_check_selected_real_kind): Do not set
1591         g95_intrinsic_extension.
1592         (g95_check_x_ni): Remove now duplicate of g95_check_x.
1594         * expr.c (check_inquiry): Add FIXME, fixup some code style.
1596 2003-06-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1598         * g95.h (ref_type): Name this type explicitly.
1599         * module.c (MIO_NAME): Add specialisations of mio_name.
1600         (mio_symbol_attribute, mio_typespec, mio_array_ref,
1601         mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
1602         (ab_attribute): Name this type explicitly.
1603         (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
1605 2003-06-05  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1607         * trans-intrinsic.c (g95_conv_allocated): New function.
1608         (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
1610 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
1612         * f95-lang.c: Don't include g95-support.h
1613         (g95_mark_addressable): Add prototype.
1614         (g95_init_decl_processing): Remove C front end hack.
1615         * f95-tree.c: Remove file.
1616         * support.c: Remove file.
1617         * g95-support.h: Remove file.
1618         * trans-types.c (g95_init_types): Set up boolean
1619         type related tree nodes.
1620         * Make-lang.in: Remove rules for dead files and
1621         dependencies on them.
1623 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
1625         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
1626         C front end dependency.  Also, convert.c does not depend on
1627         g95-support.h anymore.
1628         * convert.c: Don't include c-common.h and g95-support.h
1629         * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
1630         (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
1631         stmts_are_full_exprs_p, current_stmt_tree,
1632         current_scope_stmt_stack): Remove.
1633         * g95-support.h (unsigned_conversion_warning): Kill proto.
1634         (boolean_type_node, boolean_true_node, boolean_false_node):
1635         Don't define here.  Instead, make then true tree nodes in
1636         trans-types.
1637         * support.c (c_global_trees): Die, C front end, die!!!
1638         (g95_init_c_decl_hacks): Don't touch intmax_type_node,
1639         uintmax_type_node, string_type_node and const_string_type_node.
1640         (decl_constant_value, overflow_warning): Make static functions.
1641         They are in death row too, though.
1642         (default_conversion, c_expand_asm_operands): Remove.
1643         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
1644         trans.c: Don't include c-common.h.
1645         * trans-types.c (boolean_type_node, boolean_true_node,
1646         boolean_false_node): Make them real tree nodes.
1647         * trans-types.h (intmax_type_node, string_type_node,
1648         const_string_type_node): Hack to work around C dependencies
1649         in builtin-types.def.
1651 2003-06-04  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1653         * decl.c (decl_types): Add some iterators-like sentinels.
1654         * decl.c (match_attr_spec): Use them.
1655         Use "decl_types" instead of "int".
1656         Add cast in call to g95_match_strings.
1657         * dump-parse-tree.c (g95_show_namespace):  Use "g95_intrinsic_op"
1658         instead of "int".
1659         * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
1660         (g95_interface_info): Use "g95_intrinsic_op".
1661         * dump-parse-tree.c (g95_show_namespace): Use them.
1662         * interface.c (g95_check_interfaces): Use them.
1663         * module.c (read_module, write_module): Use them.
1664         * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
1665         Use "g95_intrinsic_op".
1666         * interface.c (check_operator_interface): Use "g95_intrinsic_op".
1667         Add a default case in switch statement.
1668         * intrinsic.h (g95_generic_isym_id): Moved to...
1669         * g95.h (g95_generic_isym_id): here.
1670         (g95_intrinsic_sym): Use "g95_generic_isym_id".
1671         * intrinsic.c (make_generic): Use "g95_generice_isym_id".
1672         * trans-intrinsic.c (g95_intrinsic_map_t,
1673          g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
1674         * match.c (g95_match_intrinsic_op): Add cast in call to
1675         g95_match_strings.
1677 2003-06-03  Steven Bosscher  <steven@gcc.gnu.org>
1679         * support.c (skip_evaluation, warn_conversion, lvalue_p,
1680         lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
1681         constant_fits_type_p, convert_and_check,
1682         unsigned_conversion_warning): Remove these ugly remnants
1683         we inherited from the C front end.
1684         (function_types_compatible): Remove '#if 0'-edcode.
1685         (build_modify_expr): Likewise.
1686         (convert_for_assignment): Don't use the deceased functions.
1687         The parameter fundecl is now unused.
1688         (decl_constant_value): Always just return decl.  In fact
1689         this function is not used at present, but it might be in
1690         the future, when we start using the tree inliner.
1691         (overflow_warning, default_conversion, c_expand_asm_operands):
1692         Abort when these are called, they are part of the C type
1693         checking implementation and therefore poison to Fortran.
1695 2003-06-04  Steven Bosscher  <steven@gcc.gnu.org>
1697         * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
1698         c-pretty-print.o and c-dump.o.  Add a comment on why we
1699         depend on c-semantics.c.
1700         * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
1701         Don't use the C front end tree dumper hook to dump the
1702         language specific tree representation -- we don't have
1703         one.  So instead, inherit the default langhook.
1705 2003-06-02  Paul Brook  <paul@nowt.org>
1707         * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
1709 2003-06-02  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1711         * check.c (g95_check_associated): Use proper types.  Remove
1712         extraneous argument in call to g95_error().
1714 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1716         * resolve.c (resolve_operator): Make logical operands convert to the
1717         type with higher kind.
1719 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1721         * check.c (g95_check_associated): Make sure both pointer and target has
1722         the same type and rank. Null pointer or array section with vector
1723         subscript as target are not allowed.
1724         * trans.h: Declare gfor_fndecl_associated.
1725         * trans-decl.c: (g95_build_builtin_function_decls): Initialize
1726         gfor_fndecl_associated.
1727         * trans-intrinsic.c (g95_conv_associated): New function.
1728         (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
1730 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1732         * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
1733         according to POINTER itself rather than TARGET.
1734         (g95_conv_expr_descriptor): Make lbound start at 1.
1735         * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
1737 2003-06-01  Paul Brook  <paul@nowt.org>
1739         * expr.c (g95_type_convert_binary): Make it match the standard.
1740         * g95.texi: Remove dead link.
1742 2003-06-01  Steven Bosscher  <steven@gcc.gnu.org>
1744         * g95.texi: Cleanup somewhat in preparation for inclusion
1745         in GCC CVS.
1747 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1748             Canqun Yang  <canqun@yahoo.com.cn>
1750         * resolve.c (compare_bound_int, resolve_where_shape): Proper return
1751         type.
1752         (g95_find_forall_index): Return proper value.
1753         (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
1754         compare the return value from g95_find_forall_index.
1756 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1757         * g95.h, io.c (g95_st_label): Remove "length".
1758         (g95_symtree): Remove "link".
1759         (g95_case): Remove "code".
1760         * arith.c, arith.h (g95_compare_string, g95_convert_integer,
1761         g95_convert_real): Make an argument pointer to const.
1762         * decl.c (colon_seen): Add a TODO.
1763         * interface.c (g95_compare_types): Fix typo.
1764         * interface.c (compare_interfaces): Preserve value of "p".
1765         * intrinsic.c (sort_actual): Remove "i".
1766         * match.c (g95_match_assign): Proper type in call to g95_match().
1767         * parse.c (next_free): Avoid duplicate call due to macro.
1768         * parse.c (check_statement_label): wrong type in call to g95_error.
1769         * primary.c (match_real_constant): Add a TODO.
1770         * resolve.c (resolve_select):  Remove useless conditional.
1771         * simplify.c (g95_simplify_repeat): Proper assignment to
1772         "value.character.string".
1773         * simplify.c (g95_simplify_reshape): Wrong variable in call to
1774         g95_error.
1776 2003-05-20  Canqun Yang  <canqun@yahoo.com.cn>
1778         * trans-stmt.c: Remove unnecessary include file defaults.h.
1780 2003-05-19  Lifang Zeng  <zlf605@hotmail.com>
1782         * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
1783         stride.
1784         (g95_trans_forall): Allow arbitrary number of FORALL indexes and
1785         actual variables used as FORALL indexes.
1787 2003-05-15  Paul Brook  <paul@nowt.org>
1789         * trans-array.c (g95_trans_static_array_pointer): Use
1790         null_pointer_node.
1791         (g95_trans_deferred_array): Initialize static array pointers.
1792         * trans-expr.c (g95_conv_function_call): Use formal arglist to
1793         correctly pass POINTER and absent CHARACTER arguments.
1795 2003-05-14  Lifang Zeng  <zlf605@hotmail.com>
1797         * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
1798         (g95_resolve_forall_body): Resolve FORALL body.
1799         (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
1800         (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
1801         (g95_find_forall_index): Check whether the FORALL index appears in
1802         the expression or not.
1803         (resolve_code): Modified.
1805 2003-05-14  Paul Brook  <paul@nowt.org>
1807         * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
1809 2003-05-13  Paul Brook  <paul@nowt.org>
1811         * trans-types.c (g95_max_array_element_size): Now a tree node.
1812         (g95_init_types): Work out max size properly.
1813         (g95_get_dtype_cst): Modify to match.
1815 2003-05-11  Paul Brook  <paul@nowt.org>
1817         * trans-io.c (add_case): Create a label decl for case labels.
1819 2003-05-11  Paul Brook  <paul@nowt.org>
1821         * arith.c (g95_integer_index_kind): New variable.
1822         * f95-lang.c (g95_init): Move frontend initialization here ...
1823         (g95_post_options): ... from here.
1824         * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
1825         * intrinsic.c (add_functions): Use index kinds.
1826         * iresolve.c: Convert to index_kind where needed.
1827         * resolve.c (g95_resolve_index): Make public, use index_kind.
1828         (resolve_array_ref): Adjust to match.
1829         * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
1830         * trans-stmt.c: Ditto.
1831         * trans-types.c: Ditto.
1832         * trans-types.h (g95_array_index_kind): Remove declaration.
1833         * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
1835 2003-05-07  Paul Brook  <paul@nowt.org>
1837         * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
1838         * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
1839         of bound indices.
1841 2003-05-07  Paul Brook  <paul@nowt.org>
1843         * trans-array.c (trans_static_array_pointer,
1844         g95_trans_array_constructor_value, g95_conv_array_initializer,
1845         g95_conv_structure): CONSTRUCTOR nodes only have one operand.
1846         (g95_add_loop_ss_code): Convert subscripts to the correct type.
1847         * trans-stmt.c (g95_trans_character_select): Ditto.
1848         * trans-types.c (g95_init_types): Ditto.
1850 2003-05-07  Steven Bosscher  <steven@gcc.gnu.org>
1852         * f95-lang.c (expand_function_body): Use input_line, not lineno.
1853         * trans-decl.c (g95_generate_function_code,
1854         g95_generate_constructors): Likewise.
1855         * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
1856         g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
1857         Likewise.
1859 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1860         * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
1861         with components point to the DERIVED type itself, and two DERIVED
1862         type with components point to each other.
1863         * trans-expr.c (g95_conv_componet_ref): Modified
1865 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
1866         * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
1867         null_pointer_node.
1868         (g95_trans_pointer_assign): Implement Nullify.
1870 2003-05-01  Paul Brook  <paul@nowt.org>
1872         * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
1873         * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
1875 2003-05-01  Paul Brook  <paul@nowr.org>
1877         * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
1878         trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
1879         IS_EMPTY_STMT.
1881 2003-05-01  Canqun Yang  <canqun@yahoo.com.cn>
1883         * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
1884         CASE_LABEL_EXPR.
1886 2003-04-28  Paul Brook  <paul@nowt.org>
1888         * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
1889         as their kind suggests.
1890         (g95_resolve_reshape): Ditto.
1892 2003-04-28  Chun Huang  <compiler@sohu.com>
1894         * trans-expr.c (g95_conv_substring_expr): New function.
1895         (g95_conv_expr): Use it.
1897 2003-04-28  Paul Brook  <paul@nowt.org>
1899         * iresolve.c (g95_resolve_transpose): Make it match the
1900         implementation.
1901         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
1903 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
1905         * trans-types.c (g95_add_field_to_struct): New function to
1906         add a field to a UNION_TYPE or RECORD_TYPE.
1907         * trans-types.h (g95_add_field_to_struct): Prototype.
1908         (g95_get_derived_type): Use g95_add_field_to_struct to add
1909         components.
1910         * trans-io.c (g95_add_field): Remove.
1911         (ADD_FIELD): Use new g95_add_field_to_struct function.
1912         (ADD_STRING): Likewise.
1913         * trans-stmt.c (g95_trans_select): Likewise.
1914         (g95_add_field): Remove duplicated function.
1916 2003-04-18  Canqun Yang  <canqun@yahoo.com.cn>
1918         Port implementation for CHARACTER SELECT from Andy's tree.
1919         * trans-stmt.c (g95_trans_character_select): Implement character
1920         select. (g95_add_field): New function.
1921         * trans-decl.c: Declare 'gfor_gndecl_select_string'.
1922         (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
1923         * g95.h (struct g95_case): Add field 'int n'.
1924         * trans.h: Declare 'gfor_fndecl_select_string'.
1926 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
1928         * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
1929         (g95_insert_bbd): Die on duplicates.
1930         * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
1932 2003-04-14  Steven Bosscher  <steven@gcc.gnu.org>
1934         * g95.texi: Require GMP 4.0 -- like we actually
1935         do.  Explain the testsuite and what-goes-where.
1936         Don't use undefined texinfo symbol.  Break very
1937         long line.  Remove finished item from the list
1938         of open projects.
1940 2003-04-11  Canqun Yang  <canqun@yahoo.com.cn>
1942         * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
1943         LOGICAL type.
1945 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
1947         * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
1948         (g95_trans_forall_body): New function.
1950 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
1952         * resolve.c (resove_where): New function.
1953         (resolve_where_shape): New function.
1954         (resolve_code): Add call to 'resolve_where'
1955         * trans-stmt.c (g95_trans_where): Modified.
1956         (g95_trans_where_2): New function.
1957         (g95_trans_where_assign): New function.
1958         (g95_evaluate_where_mask): New function.
1959         (g95_add_to_stmt_list): New function.
1960         (g95_get_temp_expr): New function.
1961         * trans.h (where_stmt_list): New structure.
1963 2003-04-10  Paul Brook  <paul@nowt.org>
1965         * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
1966         (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
1968 2003-04-10  Steven Bosscher  <steven@gcc.gnu.org>
1970         Update after mainline -> tree-ssa-branch merge.
1971         * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
1972         call.
1973         (g95_init): Update for new lang_hooks definition.
1974         (g95_post_options): New langhook.
1975         (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
1976         * scanner.c (g95_new_file): Comment update.
1978 2003-04-09  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
1980         * g95.h, lang-options.h: Add -Wimplicit-interface.
1981         * options.c (g95_init_options, g95_parse_arg): Set it.
1982         * interface.c (check_intents): Warn about call with implicit
1983         interface.
1984         * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
1985         g95_procedure_use.
1987 2003-04-05  Paul Brook  <paul@nowt.org>
1989         * iresolve.c (g95_resolve_spread): Don't resole based on type.
1990         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
1992 2003-03-29  Paul Brook  <paul@nowt.org>
1994         * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
1995         (g95_resolve_unpack): Ditto.
1996         * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
1997         (g95_conv_intrinsic_function): Use it.  Remove PACK and UNPACK.
1998         (g95_is_intrinsic_libcall): Add PACK and UNPACK.
2000 2003-03-25  Paul Brook  <paul@nowt.org>
2002         * arith.c (g95_unary_user, g95_user): Remove dead functions.
2003         * arith.h: Ditto.
2004         * array.c (g95_free_array_ref): Ditto.
2005         * g95.h: Ditto.
2006         * symbol.c (g95_use_derived_tree): Ditto.
2007         * intrinsic.c (add_functions): Use simplification for SCALE.
2008         * primary.c (g95_match_rvalue): Test sym, not symtree.
2010 2003-03-25  Paul Brook  <paul@nowt.org>
2012         * trans-decl.c (build_function_decl): Add parameter before it gets
2013         turned into a constant.
2014         * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
2015         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
2016         * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
2018 2003-03-22  Paul Brook  <paul@nowt.org>
2020         * trans-array.c (g95_conv_array_initializer): Allow scalar
2021         expressions.
2022         * trans-decl.c (g95_finish_var_decl): Result variables are not
2023         module variables.
2024         * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
2025         (g95_conv_intrinsic_function): Use it.
2026         * trans-types.h (g95_type_spec): Remove dead declaration.
2028 2003-03-21  Paul Brook  <paul@nowt.org>
2030         * trans-decl.c (g95_build_function_decl): Mark string parameters.
2032 2003-03-20  Paul Brook  <paul@nowt.org>
2034         * trans-decl.c (g95_build_function_decl): Put character length
2035         parameters at the end of the function declaration.
2036         * trans-expr.c (g95_conv_function_call): Ditto.
2037         * trans-types.c (g95_get_function_type): Ditto.
2039 2003-03-20  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2041         * resolve.c (resolve_formal_arglist): Don't impose intent for
2042         procedure arguments of pure functions.
2043         (resolve_select): Remove redundant assignment.
2045 2003-03-19  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2047         * arith.c (validate_logical), g95.h, options.c (g95_init_options):
2048         Remove option l1.
2049         * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
2050         * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
2051         const.
2052         * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
2053         Order list.
2054         * symbol.c (g95_add_type): Fix typo in comment.
2057 2003-03-16  Paul Brook  <paul@nowt.org>
2059         * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
2060         * expr.c (g95_build_call): Remove.
2061         * f95-lang.c (puchdecl_top_level): New function.
2062         * g95.h (g95_code): Store resolved symbol, not just the name.
2063         * intrinsic.c (g95_intrinsic_namespace): New global namespace.
2064         (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
2065         (g95_get_intrinsic_sub_symbol): New function.
2066         * iresolve.c (g95_resolve_cpu_time): Use it.
2067         (g95_resolve_random_number): Ditto.
2068         * resolve.c: Set code->resolved_sym instead of code->sub_name.
2069         * trans-decl.c (g95_get_extern_function_decl): Give external decls
2070         the correct DECL_CONTEXT.  Add global symbold to the global scope.
2071         * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
2072         fixed.
2074 2003-03-16  Paul Brook  <paul@nowt.org>
2076         * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
2077         * options.c (g95_parse_arg): Ditto.
2078         * module.c (mio_symbol_attribute): Handle the always_explicit bit.
2079         * resolve.c (resolve_formal_arglist): The always_explicit sould be set
2080         for the procedure, not the parameter.
2081         * trans-array.c (g95_trans_g77_array): New function.
2082         (g95_trans_assumed_size): Use it.
2083         (g95_trans_dummy_array_bias): Ditto.
2084         (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
2085         (g95_conv_expr_descriptor): ... to here.  Update callers.
2086         * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
2087         (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
2088         * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
2089         * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
2090         * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
2091         (g95_sym_type): Ditto.
2093 2003-03-15  Paul Brook  <paul@nowt.org>
2095         * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
2096         first chain.
2097         * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
2099 2003-03-14  Paul Brook  <paul@nowt.org>
2101         * trans-array.c (g95_array_is_packed): Remove.
2102         (g95_conv_array_base): Correctly handle all descriptorless cases.
2103         (g95_conv_array_stride): Use descriptorless strides.
2104         (g95_trans_dummy_array_bias): Don't always repack the array.
2105         (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
2106         packed.
2107         * trans-types.c (g95_get_nodesc_array_type): Differentiate between
2108         dummy and non-dummy arrays...
2109         (g95_sym_type, g95_get_derived_type): ... like these.
2110         (g95_get_array_type_bounds): Allow discontiguous arrays.
2112 2003-03-12  Paul Brook  <paul@nowt.org>
2114         * array.c (g95_resolve_array_spec): Fix comment.
2115         * g95.h (symbol_attributes): New flag always_explicit.
2116         * resolve.c (resolve_formal_arglist): Set it always_explicit.
2117         * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
2118         * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
2119         (g95_trans_array_bounds): Allow assumed shape arrays.
2120         (g95_trans_repack_array): Remove.
2121         (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
2122         * trans-decl.c (g95_build_qualified_array): Only ignore absent
2123         bounds for assumed size arrays.
2124         (g95_build_dummy_array_decl): Use descriptorless arrays.
2125         * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
2126         (g95_trans_pointer_assign): Fix typo.
2127         * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
2128         code.
2129         (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
2130         * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
2131         Also modify callers.
2132         * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
2134 2003-03-08  Paul Brook  <paul@nowt.org>
2136         * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
2137         (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
2138         * resolve.c (compare_spec_to_ref): Allow full array sections.
2140 2003-03-08  Paul Brook  <paul@nowt.org>
2142         * expr.c (g95_simplify_expr): Also simplify array index and
2143         substring expressions.
2144         * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
2145         * trans-array.c (g95_trans_array_bounds): New function.
2146         (g95_trans_auto_array_allocation): Use it.
2147         (g95_trans_assumed_size): Rewrite.
2148         * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2149         (gfor_fndecl_repack): Remove.
2150         (g95_build_qualified_array): Handle absent upper bounds.
2151         (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
2152         (g95_get_symbol_decl): Update.
2153         (g95_build_intrinsic_function_decls): Initialize new decls.
2154         * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2155         (gfor_fndecl_repack): Remove.
2156         * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
2157         * trans-types.c: (g95_build_array_type): Merge duplicated code..
2158         (g95_get_nodesc_array_type): Handle absent bounds.
2159         * trans-types.h (g95_get_nodesc_array_type): Declare.
2161 2003-03-04  Paul Brook  <paul@nowt.org>
2163         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
2164         builtin-types.def.
2166 2003-03-02  Paul Brook  <paul@nowt.org>
2168         * options.c (g95_init_options): Drfault to 1.
2169         (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
2170         * trans-array.c (g95_conv_array_data, g95_conv_array_base,
2171         g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
2172         Handle non-constant size automatic arrays.
2173         (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
2174         generic bound functions.
2175         (g95_trans_auto_array_allocation): Don't create a descriptor.
2176         (g95_trans_assumed_size): New function (broken).
2177         (g95_trans_dummy_array_bias): Remove unused var.
2178         * trans-array.h (g95_trans_assumed_size): Declare.
2179         * trans-decl.c (create_index_var): New fuction.
2180         (g95_build_qualified_array): New function.
2181         (g95_get_symbol_decl): Use it.
2182         (g95_trans_deferred_vars): Handle assumed shape seperately.
2183         * trans-types.c (get_element_type): Handle heap allocated arrays.
2184         (g95_is_nodesc_array): Include non-const size arrays.
2185         (g95_get_nodesc_array_type): Ditto.
2187 2003-02-23  Paul Brook  <paul@nowt.org>
2189         * trans-array.c (g95_array_init_size): Should use stride, not size of
2190         last dimension.
2192 2003-02-18  Paul Brook  <paul@nowt.org>
2194         * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
2195         after intrinsic function check.
2197 2003-02-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2199         * io.c (match_io): Fix missing return value and remove useless
2200         assignment.
2201         * match.c (g95_match): Remove useless assignment.
2202         * module.c (parse_string):  Remove useless post increment.
2203         * simplify.c (g95_simplify_verify): Remove useless assignment.
2205 2003-02-15  Paul Brook  <paul@nowt.org>
2207         * expr.c (restricted_intrinsic): Handle bad values gracefully.
2208         * g95.h (symbol_attribute): Add referenced member.
2209         (g95_symbol): Add dummy_order member.
2210         (g95_set_sym_referenced): Declare.
2211         * match.c (g95_match_assignment, g95_match_call): Use it
2212         * primary.c (match_actual_arg, g95_match_rvalue,
2213         g95_match_variable): Ditto.
2214         * symbol.c (next_dummy_order): New variable.
2215         (g95_set_sym_referenced): New function.
2216         (check_done): New function.
2217         (g95_add_*): Use it.
2218         * trans-decl.c: Make formatting conform to GCC standards.
2219         (g95_defer_symbol_init): Add dummy variables in the right order.
2220         (g95_get_symbol_decl): Only accept referenced variables.
2221         (g95_create_module_variable): Module variables are always required.
2222         (generatr_local_decls): New function.
2223         (generate_local_vars): New function.
2224         (g95_generate_function_code): Use it.
2226 2003-02-13  Paul Brook  <paul@nowt.org>
2228         * trans-decl.c (g95_conv_struct_cons): Remove.
2229         (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
2230         * trans-expr.c (g95_conv_structure): New function.
2231         (g95_conv_expr): Use it.
2233 2003-02-09  Paul Brook  <paul@nowt.org>
2235         * trans-array.c (g95_array_init_size): Don't evaluate the linit
2236         expressions multiple times.
2237         (g95_trans_auto_arry_allocation): Use pointer not tmp.
2239 2003-02-08  Paul Brook  <paul@nowt.org>
2241         * module.c (mio_symtree_ref): Declare as static.
2242         (mio_expr): Remove dead code.
2243         (read_module): Set the symtree link for fixups.
2244         * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
2245         (build_round_expr): ... to this.
2246         (g95_conv_intrinsic_aint): New function.
2247         (g95_conv_intrinsic_function): Use it.
2249 2003-02-08  Paul Brook  <paul@nowt.org>
2251         * trans-array.c (g95_trans_array_constructor_value): Use the acutal
2252         offset after modificaton, not the increment expression.
2253         * dependency.c: Kill excess whitespace.
2255 2003-02-07  Sanjiv Gupta  <sanjivg@noida.hcltech.com>
2257         * dependency.h: Remove some function declarations.
2258         * dependency.c (get_no_of_elements): Change this function not to
2259         return int.
2260         * other: Add comments for all modified functions.
2262 2003-02-06  Paul Brook  <paul@nowt.org>
2264         * g95spec.c (lang_specific_functions): Fix initializer warning.
2265         * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
2266         for structure type names.
2267         * trans-decl.c (g95_cons_structure_cons): New function.
2268         (g95_get_symbol_decl): Use it.
2269         * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
2270         referencing code.
2272 2003-02-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2274         * resolve.c (compare_cases): Add const to casts.
2276 2003-01-30  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2278         * g95.h (g95_check_f): Change a1 to f1m.
2279         * intrinsic.c (add_sym_1m, check_specific,
2280         g95_intrinsic_func_interface): Use it.
2282         * module.c (init_pi_tree): Remove useless cast.
2283         (fp2): Fix argument type.
2285         * parse.c (parse_select_block): Add comment.
2287 2003-02-05  Toon Moene  <toon@moene.indiv.nluug.nl>
2289         * lang-options.h: Fix warning involving C90 concatenated
2290         strings.
2292 2003-02-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2293             Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2295         * io.c (format_asterisk): Complete initializer to kill warning.
2296         * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
2297         DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
2298         (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
2299         new defines to complete initializers.  Kills all warnings.
2301         * Make-lang.in: Comment cleanup.
2303 2003-02-05  Paul Brook  <paul@nowt.org>
2305         * array.c (g95_free_constructor): Handle NULL expressions.
2306         * resolve.c (resolve_structure_cons): Ditto.
2307         * decl.c (g95_match_null): New Function.
2308         (variable_decl): Use it.
2309         * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
2310         * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
2311         * trans-types.c (g95_set_decl_attributes): Remove empty function.
2313 2003-02-05  Paul Brook  <paul@nowt.org>
2315         * trans.h (build1_v): New macro.
2316         (build_v): Remove pointless and incorrect prototype.
2317         * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
2318         * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
2320 2003-02-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2322         * Make-lang.in (F95_OBJS): Remove one more dead file.
2324 2003-02-01  Paul Brook  <paul@nowt.org>
2326         * lang-specs.h: Don't pass -ffixed-form to the linker.
2327         * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
2329 2003-02-01  Paul Brook  <paul@nowt.org>
2331         * Make-lang.in (F95_OBJS): Remove dead files.
2332         * trans-array.c (g95_array_init_size): Do the right thing when
2333         ubound=NULL.
2334         * trans-decl.c (g95_generate_function_code): Initialize deffered
2335         symbol list before translating contained subroutines.
2336         * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
2337         scalar invariant values here...
2338         (g95_conv_variable, g95_conv_function_call): ... instead of here ...
2339         * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
2341 2003-01-29  Paul Brook  <paul@nowt.org>
2343         * trans-array.c (g95_add_loop_code): Put pre code in the right block.
2344         (g95_walk_elemental_function_args): Reverse chains before adding.
2345         (g95_reverse_ss): Move about a bit.
2346         * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
2347         function arguments.
2349 2003-01-28  Paul Brook  <paul@nowt.org>
2351         * intrinsic.c (resolve_intrinsic): Use correct union member.
2352         * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
2353         parameters.
2354         * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
2355         use associated variables.
2356         * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
2357         * trans-expr.c (g95_conv_expr_present): ... to here.
2358         * trans.h: Declare it.
2359         * trans-types.c (g95_sym_type): Assume subroutine if not specified.
2361 2003-01-28  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2363         * array.c (expand_iterator): Suppress useless assignment.
2364         * decl.c (match_char_spec): Ditto.
2365         * io.c (match_io_iterator): Ditto.
2366         * primary.c (match_real_constant): Ditto.
2367         * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
2368         Ditto.  Also, use g95_intrinsic_op not int for intrinsic operators.
2369         * matchexp.c (match_add_operand, match_level_5): Likewise.
2370         * module.c (parse_atom, find_enum): Likewise.
2371         * resolve.c: move #include <string.h>
2372         (resolve_select): Fix serious typo.
2374 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.n>
2376         * Make-lang.in: Don't build with broken tree-ssa-pre.
2378 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2380         * resolve.c (resolve_index): Add a TODO.
2381         * symbol.c: Remove useless "#include <ctype.h>".
2383 2003-01-27  Paul Brook  <paul@nowt.org>
2385         * check.c (check_rest): Allow different type kinds as an extension.
2386         * g95.h (g95_resolve_f): Add f1m.
2387         * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
2388         * intrinsic.h: Chenge prototypes for MIN and MAX.
2389         * iresolve.c (g95_resolve_minmax): New function.
2390         (g95_resolve_min, g95_resolve_max): Use it.
2391         * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
2392         arguments once.
2393         (g95_conv_intrinsic_present): Fix logic.
2395 2003-01-27  Steven Bossche  <s.bosscher@student.tudelft.nl>
2397         * g95.h (g95_case): Don't be a tree, be a double linked list.
2398         * match.c (match_case_selector): Remove redundant semantics check.
2399         Clean up a few goto's to make it a tiny little bit faster.
2400         * resolve.c (case_tree): Die.
2401         (compare_cases): Accept and compare unbounded cases too.
2402         (check_case_overlap): Don't build a tree.  Instead, merge-sort the
2403         whole list of g95_cases passed from resolve_select.
2404         (sane_logical_select): Die.
2405         (check_case_expr): Return FAILURE if a CASE label is of the wrong
2406         type kind.
2407         (resolve_select): Fixup case expression for computed GOTOs, put it
2408         in expr, not expr2, for easier handing in the parse tree dumper and
2409         the code generator.  Rewrite the rest of the function: Kill
2410         unreachable case labels and unreachable case blocks.
2411         * dump-parse-tree.c (g95_show_code_node): Always dump expr for
2412         an EXEC_SELECT, not case2 anymore.
2413         * trans-const.c (g95_conv_constant_to_tree): New function.
2414         (g95_conv_constant): Use it.
2415         * trans-const.h: Declare prototype for the new function.
2416         * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
2417         g95_trans_character_select): New static functions.
2418         (g95_trans_select): Rewrite.
2420 2003-01-26  Paul Brook  <paul@nowt.org>
2422         * intrinsic.c (add_fnctions): Properly add dreal.
2423         * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
2424         (g95_conv_intrinsic_function): Use it.
2425         * trans-io.c (build_dt): Abort on internal files (unimplemented).
2427 2003-01-26  Paul Brook  <paul@nowt.org>
2429         Widespread changes to the handling of symbols in expressions.  These
2430         are now linked via g95_symtree nodes.
2431         * parse.c (g95_fixup_sibling symbols): New function.
2432         (parse_contained): Use it.
2433         * g95.h (symbol_attribute): Add contained.  Indicates a symbol is a
2434         contained procedure that has bee correctly fixed up.
2435         (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
2437 2003-01-24  Paul Brook  <paul@nowt.org>
2439         * trans-array.c (g95_walk_expr): Function result attributes are in
2440         sym->result.
2441         * trans-expr.c (g95_conv_function_call,
2442         g95_trans_arrayfunc_assign): Ditto.
2443         * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
2445 2003-01-23  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2447         * expr.c (check_restricted): Fix error message.
2448         * symbol.c (free_st_labels): Plug memleak.
2450 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2452         * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
2453         reduce_binary_aa, reduce_binary, eval_intrinsic,
2454         eval_intrinsic_f2): Use typesafe prototypes for eval functions.
2455         * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
2456         for typesafe intrinsics helper functions.
2457         (g95_intrinsic_sym): Use them.
2458         * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
2459         add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
2460         add_sym_5, add_conv, resolve_intrinsic, do_simplify,
2461         check_specific, g95_intrinsic_func_interface,
2462         g95_intrinsic_sub_interface): Adjust all calls to intrinsics
2463         helper functions.
2464         * trans-decl.c (g95_get_extern_function_decl): Likewise.
2465         * Make-lang.in: Don't disable warnings for strict prototypes
2466         any longer, everything is typesafe now.
2468 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2470         * bbt.c (duplicate_node): Make static.
2471         * module.c (module_name): Make static.
2472         * scanner.c (include_dirs): Make static.
2474 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2476         Hard coded _gfor_'s should not show up anymore.
2477         * g95.h (PREFIX): New macro.
2478         * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
2479         hard-coded "_gfor".
2480         (g95_resolve_random_number): Likewise.
2481         * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
2482         * trans-io.c: Remove 'prefix' macro.  Replace all uses with
2483         the new PREFIX macro from g95.h.
2485 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2487         The troubles of forking... Andy implemented this just now too.
2488         Let's stick to that and keep the trees close.
2489         * g95.h (g95_st_label): 'format' member is now a g95_expr.
2490         * io.c: Revert previous changes.
2491         (g95_match_format): Match the format string as a character
2492         literal expression.
2493         * match.h (g95_statement_label): Declare external.
2494         * parse.c: Revert previous changes.
2495         * symbol.c (g95_free_st_label): Free a g95_expr instead
2496         if a 'char *'.
2497         * trans-io.c: Revert previous changes.
2498         (build_dt): Use set_string to set the format string.
2500 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2502         * io.c (format_string): Make non-static.
2503         (g95_match_format): Remember the format string.
2504         (terminate_io): Add I/O termination for empty I/O lists.
2505         * match.h: Declare external format_string.
2506         * parse.c (check_statement_label): Attack the format string
2507         to a format label for FORMAT statements.
2508         * trans-io.c (g95_add_field): Define prefix macro.  Replace
2509         all uses of PREFIX define with a use of this macro.
2510         (build_dt): Implement formatted I/O for format labels.
2512 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2514         * lang-options.h: Kill "-std=F".
2515         * options.c: Remove unimplemented "-std=F".  Modify
2516         web address.
2517         * misc.c (g95_terminal_width): New function.
2518         * error.c (g95_error_init_1): Use g95_terminal_width.
2519         * g95.h: Add prototype for g95_terminal_width, remove
2520         fmode flag.
2522 2003-01-19  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2524         * Make-lang.in: Fix typo.
2526 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2528         * g95.h (struct g95_case): Remove unused cruft, new member
2529         'where' to keep track of the locus of the default case.
2530         * match.c (g95_match_case): Add locus to the current case.
2531         (match_case_selector): Likewise.
2532         * parse.c (parse_select_block): Move semantics check for
2533         multiple DEFAULT cases out of here to...
2534         * resolve.c (check_case_overlap): ...here.  Return sooner
2535         when possible.
2536         (check_case_expr): Take two g95_cases now, use to sure the
2537         expression kinds are the same.
2538         (resolve_select): Cleanup.
2540 2003-01-18  Paul Brook  <paul@nowt.org>
2542         * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
2543         * trans-decl.c (g95_set_symbol_decl): Handle non-array result
2544         variables.
2545         (g95_get_extern_function_decl): Put decls in the correct context.
2547 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2549         * trans-io.c: Port changes from Andy to set ERR flag.
2551 2003-01-17  Paul Brook  <paul@nowt.org>
2553         * trans-array.c: Add various comments.
2554         (g95_ss_terminator): Declare as const.
2555         (g95_walk_expr): Remove first parameter and update all callers.
2556         (g95_walk_op_expr): Initialize scalar SS properly.
2557         * trans-array.h (g95_walk_expr): Update prototype.
2558         * trans-expr.c: Update for new g95_walk_expr.
2559         * trans-intrinsic.c: Ditto.
2560         * trans-io.c: Ditto.
2561         * trans.h: Various comments for SS chains.
2563 2003-01-17  Paul Brook  <paul@nowt.org>
2565         * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
2566         and RRSPACING.
2567         * intrinsic.c (add_functions): Use them.
2568         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
2569         * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
2571 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2573         Fallout of a small merge conflict:
2574         * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
2576 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2578         * initrinsic.c: New add_sym_* functions for strong typing.
2579         (add_conv): Make prototype strict.
2580         * dump-parse-tree.c, dependency.c: Include config.h
2581         * resolve.c, trans-io.c: Fix typos.
2583 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2585         * dump-parse-tree.c (g95_show_code_node): Show the
2586         condition for a computed GOTO that was transformed
2587         to a SELECT CASE construct.
2588         * resolve.c (check_case_overlap): Revert previous switch
2589         to treaps, it was too slow and didn't catch all trouble.
2590         (resolve_symbol): Be more flexible about module procedures.
2591         * symbol.c (check_conflict): Point to relevant section in
2592         the standard for dubious conflict.  Allow procedure
2593         dummy arguments to be optional again.
2594         * trans-io (add_field): Rename to g95_add_field.  Change
2595         all callers.
2596         * trans-stmt (trans_select): Handle unbounded cases for
2597         integer SELECT CASE constructs.  Fix/add more comment.
2599 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2601         * g95.h: Uses GCC's function attribute macros.
2602         * error.c, module.c, parse.c, g95.h: More function attributes.
2604 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2605         Forgot a file...
2606         * trans-decl.c (get_label_decl): Use TREE_LINENO instead
2607         of DECL_SOURCE_LINE, and TREE_FILENAME instead of
2608         DECL_SOURCE_FILE.
2610 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2612         * f95-lang.c (pushdecl): Use TREE_LINENO instead of
2613         DECL_SOURCE_LINE.
2614         * trans.c (g95_trans_code): Use annotate_all_with_file_line
2615         instead of nowdead wrap_all_with_wfl.
2617 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2619         * parse.c (g95_parse_file): In verbose mode, dump the parse tree
2620         before generating code, so we can still see it even if the code
2621         generation phase dies.
2623 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2625         * decl.c (build_sym): Split out initialization expression parts...
2626         (add_init_expr_to_sym): ...to here.
2627         (variable_decl): Add the symbol following an attribute list to the
2628         symbol tree before parsing the optional initialization expression
2629         if the symbol is not of a derived type.
2630         * primary.c (g95_match_rvalue): Don't assume a symbol always has
2631         a value if it is a PARAMETER.
2633 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2635         * misc.c: Don't #include <mcheck.h>
2636         * module.c: Ditto.  Kill uses of mtrace, muntrace.  If there
2637         ever was a glibc bug, then either this was never reported to
2638         glibc people, or it has been fixed for so long that there's
2639         no information you can find about it, anywhere.
2641 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2643         Fix warnings:
2644         * module.c (attr_bits, bt_types, array_spec_types):
2645         Switch 'const' and 'static'.
2646         * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
2648         GNU'ify source code:
2649         * trans-io.c: Numerous fixes, one fixed warning and a few
2650         TODO markers so that we don't forget about them.
2652 2003-01-13  Paul Brook  <paul@nowt.org>
2654         * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
2655         * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
2656         Add G95_ISYM_SCALE.
2657         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
2658         * match.c (g95_match_stop): Fix dumb == -> != error.
2660 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2662         * dump-parse-tree.c (show_indent): Add line breaks.  This
2663         whole dumping process needs cleanups.
2664         * f95-lang.c (g95_mark_addressable): Fix prototype to match
2665         the langhook.  Fix 'return's accordingly.
2666         * g95-support.h: Adjust prototype.
2667         * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
2668         * lang-options.h: Add '-fsyntax-only'.
2669         * options.c (g95_init_options): Init 'no_backend'.
2670         (g95_parse_arg): Deal with '-fsyntax-only'.
2671         * parse.c (g95_parse_file): Do not generate code if 'no_backend'
2672         is set.
2674 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2675         Patch from Arnaud
2676         * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
2677         arguments.  Also make sure that if a symbol is marked INTRINSIC,
2678         an intrinsic with the symbol's name actually exists.
2679         (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
2680         Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
2681         ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
2683 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2685         * resolve.c (resolve_contained_functions): Fix condition, don't
2686         throw internal_error if a child namespace has no name.  Apparently
2687         this can be the case?
2689 2003-01-11  Paul Brook  <paul@nowt.org>
2691         Port changes from Andy's tree:
2692         * g95.h (g95_code): Add stop_code.
2693         * match.c (g95_match_stop): Detter syntax checking.
2694         * resolve.c (resolve_generic_f0): Return match type.
2695         (resolve_generic_f): Remove dead/duplicated code.
2696         (resolve_specific_f): Ditto.
2697         * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
2698         * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
2699         * trans-stmt.c (g95_trans_stop): Handle new STOP format.
2701 2003-01-11  Paul Brook  <paul@nowt.org>
2703         * trans-array.c: Various documentation/comment changes.
2704         * trans-stmt.c: Ditto.
2707 2003-01-10  Paul Brook  <paul@nowt.org>
2709         * options.c/h: Add -fdump-parse-tree as alias of -v.
2711 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2713         * dump-parse-tree.c (g95_show_namespace): Fixed another
2714         typo.  Sorry, it's Friday...
2716 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2718         Spotted by Tobi:
2719         * trans-array.c, trans-array.h, trans.c, trans-const.c,
2720         trans-const.h, trans-decl.c, trans-expr.c, trans.h
2721         trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
2722         trans-types.c: Fix bogus copyright years, add 2003.
2723         * trans-types.h: Give copyright header.
2725 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2727         * dump-parse-tree.c (g95_show_namespace): Fixed typo.
2728         * expr.c, options.c, scanner.c: Add some more 'const' markers.
2729         * intrinsic.c: Some constant strings moved to read-only memory.
2730         * io.c (format_asterisk): Move to...
2731         * g95.h: ...here.
2733 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2735         * dump-parse-tree.c (g95_show_namespace): Dump implicit
2736         types for ranges instead of per-letter.  Indent the
2737         'CONTAINS' just like everything else.
2738         * resolve.c (resolve_contained_functions): Clarify comment.
2739         Explain non-obvious conditional expression.  Improve
2740         diagnostics if tyoe cannot be resolved.
2741         Port semi-fix from Andy's tree:
2742         (was_declared): Move up before first use.
2743         (generic_sym, specific_sym): New functions.  Code moved
2744         out if procedure_kind.
2745         (procedure_kind): Simplify using new functions.
2746         (resolve_generic_f): Make sure the functions we find in
2747         a parent namespace is generic.
2748         (resolve_specific_f): Ditto for specific functions.
2750 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2752         * trans-stmt.c, trans.c: Fix some code style issues. Add
2753         some more comment (but still not enough!).
2755 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2757         * symbol.c (flavors, procedures, intents, acces_types,
2758         access_types, ifsrc_types): Make const.
2759         * misc.c (g95_string2code): Make 'm' param 'const'.
2760         * module.c (find_enum, write_atom, mio_name): Make
2761         'm' param 'const'.
2762         (attr_bits, bt_types, array_spec_types, array_ref_types,
2763         ref_types, expr_types): Make const.
2764         * g95.h: Adjust external decls.
2766 2003-01-09  Paul Brook  <paul@nowt.org>
2768         * Testsuite: Add a load of new cases.
2770 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2772         * Make-file.in: Add dependency on back end header files;
2773         a parallel build should work now.
2774         * f95-lang-c (lang_identifier): Remove bogus comment.
2775         (g95_be_parse_file): Fix prototype.
2776         (g95_init): Make static.
2777         (g95_finish): Make static.
2778         * error.c (g95_syntax_error): Kill. Make define in...
2779         * g95.h (g95_syntax_error): Define.
2780         (g95.options): Make 'source' member 'const'.
2781         * interface.c (g95_match_interface): Explain
2782         hard-to-read condition.
2783         (g95_match_end_interface): Ditto.
2784         * trans_const.c (g95_build_string_const): Make 's' parameter
2785         'const'.
2786         * trans_const.h: Adjust protoype accordingly.
2787         * trans-decl.c: Include tree-dump.h
2788         (g95_generate_function_code): Build fixes for recent changes
2789         in the tree-ssa branch.
2791 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2793         * format.c: Kill, move code from here...
2794         * io.c: ...to here.
2795         * Make-lang.in: Adjust.
2796         * MANIFEST: Ditto.
2797         * match.h: Ditto.
2798         * BUGS: Mention where to submit bugs.  Move old content...
2799         * TODO: ...to here.  New file.
2801 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2802         Fix most warnings, and suppress the ones we can't fix for now.
2803         * Make-lang.in: Suppress warnings about bad proto's in g95.h,
2804         these warnings just clutter the screen and there's not much
2805         we can do about them for now anyway.
2806         * check.c, iresolve.c: Mark unused function parameters.
2807         * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
2808         they should be resolved before they get here.
2809         * error.c: Remove unused FILE *status_out.
2810         * f95-lang.c (g95_init): Remove bogus cast.
2811         * Many files: Make things 'const' where required.
2812         * g95.h: Fix prototypes for all modified functions above.
2813         (g95_options): Remove 'object' member.
2815 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2817         * Make-file.in: Cleanup bogus targets.  Add more comment.
2818         * lang-options.h: New option '-w'.
2819         * g95.h: add no_options field to struct g95_options.
2820         * options.c (g95_init_options): Default no_warnings to off.
2821         (g95_parse_arg): Recognise the '-w' switch and its alias,
2822         '-fno-warnings'.
2823         * error.c (g95_warning, g95_warning_now): Don't emit warning if
2824         no_warning option is set.
2825         * iresolve.c (g95_resolve_shape): Fix warning.
2827 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2829         * primary.c (g95_next_string_char): Rename next_string_char, and
2830         make static.  Adjust callers accordingly.
2831         * resolve.c (resolve_generic_f0): Return try, not match.  Adjust
2832         callers accordingly.
2833         * g95.h: Split out all g95_match* functions to...
2834         * match.h: ...here. New file.
2835         * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
2836         matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
2838 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2840         * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
2841         g95_merge_new_implicit): New functions.
2842         (g95_match_implicit_none, g95_match_implicit): Move from here...
2843         * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
2844         Modify to use the new functions in symbol.c.
2845         * g95.h: Add and move prototypes.
2847 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2849         * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
2850         node compare function.
2851         (g95_insert_bbt): Likewise.
2852         (g95_insert_bbt_with_overlap): Likewise.
2853         (g95_delete_bbt): Likewise.
2854         (delete_treap): Likewise. Also fix a potential bug when calling it.
2855         * module.c (compare_pointers): Change proto to compare_fn.
2856         (compare_integers): Likewise.
2857         (compare_true_names): Likewise.
2858         (find_true_name): Adjust call to compare_true_names to match proto.
2859         (require_atom, write_atom, mio_name): Fix 'const' warnings.
2860         (init_pi_tree): Make compare a compare_fn instead of (int *).
2861         * resolve.c (compare_cases): Change proto to compare_fn.
2862         * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
2863         it static, and rename to compare_symtree.
2864         (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
2865         function.
2866         * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
2867         of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
2869 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2870         * Make-lang.in: Fix spaces/tabs issues from previous patch.
2871         * patch.options: Blow away Paul's checkin mistake :-)
2872         * io.c (terminate_io): Fix memory leak (Arnaud).
2874 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2876         * Make-lang.in: Teach about building DVI, info manual.
2877         * g95.texi: New file.
2879 2003-01-02  Paul Brook  <paul@nowt.org>
2881         * trans-array.c (g95_reverse_ss): Make static and don't use.
2882         (g95_conv_ss_descriptor): Don't use g95_loopinfo
2883         (g95_conv_array_parameters): Modify for pointer assignments.
2884         (g95_walk_subexpr): New function.
2885         (g95_walk_expr*): Use it.
2886         * trans-array.h (g95_reverse_ss): Remove prototype.
2887         * trans-expr.c (g95_trans_pointer_assign): Implement.
2888         (Many): Set se.want_pointer before calling g95_conv_array_parameter.
2889         * trans-intrinsic.c: Sync with scalarizer changes.
2890         * trans-io.c: Ditto.
2892 2002-12-29  Paul Brook  <paul@nowt.org>
2894         * trans-array.c: Document calling convention for arrays.
2896 2002-12-19  Paul Brook  <paul@nowt.org>
2898         * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
2899         assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
2900         optional parameters for some intrinsics.
2901         (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
2902         * trans-expr.c (g95_conv_function_call): Pass NULL for absent
2903         optional parameters.
2904         * trans.h (g95_se): Add ignore_optional flag.
2906 2002-12-15  Paul Brook  <paul@nowt.org>
2908         * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
2909         * trans-decl.c (g95_generate_function_code): Use TDI_original.
2911 2002-12-14  Paul Brook  <paul@nowt.org>
2913         * trans-stmt.c (g95_trans_call): Use resolved symbol name.
2915 2002-12-12  Paul Brook  <paul@nowt.org>
2917         * trans-array.c (g95_trans_array_constructor_subarray): Fully
2918         initialize the scalarizer.
2919         (various): Update to new format of g95_expr->value.constructor.
2921 2002-12-08  Paul Brook  <paul@nowt.org>
2923         * trans-array.c (g95_put_offset_into_var): New function.
2924         (g95_trans_array_constructor_subarray): New function.
2925         (g95_trans_array_constructor_value): Use it.
2926         (g95_array_cons_size): Don't abort() on array components.
2928 2002-12-08  Paul Brook  <paul@nowt.org>
2930         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
2931         * support.c: Update #includes.
2932         (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
2933         * trans-array.c: Update #includes.
2934         * trans.c: Ditto.
2935         * trans-const.c: Ditto.
2936         * trans-io.c: Ditto.
2937         * trans-types.c: Ditto.
2938         (g95_init_types): Set size_type_node.
2939         * trans-decl.c: Update #includes.
2940         (gfor_fndecl_adjust{l,r}): Declare and initialize.
2941         * trans-stmt.c: Update #includes.
2942         (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
2943         (g95_trans_select): Fix check for unbounded ranges.
2944         * trans-expr.c: Update #includes.
2945         (g95_conv_string_tmp): New function.
2946         (g95_conv_concat_op): Use it.
2947         * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
2948         * Trans-intrisic.c: Update #includes.
2949         (g95_conv_intrinsic_strcmp): New function.
2950         (g95_conv_intrinsic_adjust): Ditto.
2951         (g95_conv_intrinsic_function: Use them.
2953 2002-11-30  Paul Brook  <paul@nowt.org>
2955         * trans-array.c (g95_walk_function_expr): Handle non-array return by
2956         reference.
2957         * trans-dec.c (g95_build_function_decl): Handle character return
2958         parammeters.
2959         (g95_get_fake_result_decl): Ditto.
2960         (g95_trans_deferred_vars): Ditto.
2961         * trans-expr.c (g95_conv_function_call): Ditto.
2962         (g95_trans_arrayfunc_assign) Limit to array valued functions.
2963         * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
2964         (g95_conv_intrinsic_function): Use it.
2965         * trans-types.c (g95_sym_type): Handle functions returning strings.
2966         (g95_return_by_reference): Ditto.
2967         (g95_get_function_type): Ditto.
2969 2002-11-18  Paul Brook  <paul@nowt.org>
2971         * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
2972         requires a temporary.
2973         (g95_trans_select): Handle computed gotos.
2974         * trans-types.c (g95_build_array_type): Warn about non-functional
2975         assumed shape arrays.
2976         * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
2977         blocks.
2978         * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
2979         (g95_conv_intrinsic_int): New function.
2980         (g95_conv_intrinsic_mod): New function.
2981         (g95_conv_intrinsic_ichar): New function.
2982         (g95_conv_intrinsic_function): Use them.
2983         (g95_conv_intrinsic_dim): Use g95_evaluate_now.
2985 2002-11-17  Toon Moene  <toon@moene.indiv.nluug.nl>
2987         * trans-types.c (g95_build_array_type): Assumed
2988         sized arrays can have rank > 1.
2989         * trans.c (g95_trans_code): Remove erroneous
2990         warning about CONTINUE.
2991         * trans-expr.c (g95_conv_variable): Remove
2992         erroneous assert.
2994 2002-11-15  Paul Brook  <paul@nowt.org>
2996         * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
2998 2002-10-31  Paul Brook  <paul@nowt.org>
3000         * f95-tree.c: Remove tree copying stuff that's now in gimple.c
3001         * trans-expr.c (g95_conv_component_ref): Handle character string
3002         components.
3003         (g95_conv_string_parameter): Ditto.
3004         * trans-types.c (g95_get_derived_type): Add length decl to caracter
3005         string components.
3007 2002-10-10  Paul Brook  <paul@nowt.org>
3009         * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
3010         * trans-expr.c (g95_conv_function_call): Remove unreliable return value
3011         check.
3012         * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
3013         (g95_conv_intrinsic_function): Handle size and shape intrinsics.
3014         (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
3015         * trans-types.c (pvoid_type_node): Declare and initialize.
3016         * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
3017         (g95_array_allocate): Fix when base==data.
3018         (g95_conv_array_parameter): Correctly handle reduced rank sections.
3019         * trans-io.c (g95_trans_write): Correctly handle string modifiers.
3021 2002-10-09  Paul Brook  <paul@nowt.org>
3023         * (g95_conv_expr_reference): Handle character strings correctly.
3025 2002-10-07  Paul Brook  <paul@nowt.org>
3027         (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
3028         langhook.
3029         * trans-array.c (g95_build_array_initializer): Remove.
3030         (g95_conv_array_initializer): New Function.
3031         (g95_trans_auto_arry_allocation): Cleanup.
3032         (g95_trans_init_character_array): Remove.
3033         * g95spec.c: Link in libgforbegin.
3034         * trans.c (g95_generate_code): Rename main function to MAIN__.
3035         (g95_create_var): New function.
3036         (g95_create_var_np): New function.
3037         (g95_evaluate_now): New function.
3038         (g95_start_block): New function.
3039         (g95_finish_block): New function.
3040         (g95_add_expr_to_block): New function.
3041         (g95_add_block_to_block): New function.
3042         * trans-expr.c (g95_conv_componen_ref): New function.
3043         * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
3044         (F95_OBJS): Add dependency.o.
3045         * f95-lang.c (g95_is_simple_stmt): Remove.
3046         * f95-tree.c (mark_not_simple): New function.
3047         (unshare_all_trees): New function.
3048         (create_tmp_var, create_tmp_alias_var): Remove.
3049         * support.c (declare_tmp_vars, tree_last_decl): Remove.
3050         * trans*: Convert to new IR using GENERIC trees.  Don't bother about
3051         SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
3053 2002-10-01  Paul Brook  <paul@nowt.org>
3055         * trans-array.c: Add support for descriptorless arrays.
3056         (g95_conv_array_data): New function.
3057         (g95_conv_array_base): New function.
3058         * trans-array.h: Declare these here.
3059         * trans-decl.c(g95_create_mopdule_variable): Perform variable
3060         initialization and creation here.
3061         (g95_create_module_vars): Instead of here.
3062         * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
3063         * trans-intrinsic.c: Ditto.
3064         * trans-types.c (g95_is_nodesc_array): New function.
3065         (g95_get_nodesc_array_type): New function.
3066         (g95_sym_type, g95_get_derived_type): Use them.
3067         * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
3069 2002-09-28  Paul Brook  <paul@nowt.org>
3071         * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
3072         * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
3073         parameters.
3075 2002-09-24  Paul Brook  <paul@nowt.org>
3077         * f95-lang.c (listify): Remove declaration.
3078         (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
3079         (listify)
3080         * f95-tree.c (get_name): New function.
3081         * trans.c (module_namespace): Remove.
3082         * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
3083         * trans-types.c: Ditto.
3085 2002-09-19  Paul Brook  <paul@nowt.org>
3087         * trans-array.c (g95_get_array_cons_size): New Function.
3088         (g95_con_ss_startstride): Handle Array constructors.
3089         (g95_conv_loop_setup): Ditto.
3090         (g95_conv_array_parameter): Ditto.
3091         * tras-decl.c (g95_finish_var_decl): Make initializes variables
3092         static.
3094 2002-09-19  Paul Brook  <paul@nowt.org>
3096         * trans.c (g95_simple_fold_tmp): Detect variables inside
3097         NON_LVALUE_EXPR.
3098         * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
3100 2002-09-18  Steven Bosscher <s.bosscher@student.tudelft.nl>
3102         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
3104 2002-09-14  Paul Brook  <paul@nowt.org>
3106         * trans.c (g95_create_module_variable): Move to trans-decl.c.
3107         * trans-const.c (g95_conv_string_init): New Function.
3108         * trans-const.h: Declare it.
3109         * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
3110         variables. Don't bail on intrinsic symbols.
3111         (get_extern_function_decl): Handle specific intrinsic functions.
3112         * trans-types.c (g95_sym_type): Dummy functions don't return
3113         reference types.
3114         * trans-array.c (g95_build_array_initializer): New Function.
3115         (g95_trans_auto_array_allocation): Build initializer for static decls.
3116         Don't use mpz_addmul, it's GMP4 only.
3118 2002-09-12  Paul Brook  <paul@nowt.org>
3120         * trans-decl.c (g95_generate_code): Fix thinko with return variable.
3121         (g95_get_extern_function_decl, g95_build_function_decl): Mangle
3122         assembler names for module procedures.
3124 2002-09-11  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
3126         * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
3127         dependency/
3129 2002-09-10  Paul Brook  <paul@nowt.org>
3131         * trans-array.c: Change format of G95_SS_TEMP strictures.
3132         (g95_check_fncall_dependancy): New function.
3133         (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
3134         offsets.
3135         * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
3136         result variables.
3137         (g95_build_function_decl): Don't assume result arrays are packed.
3138         (g95_trans-deferred-vars): Handle array result variables.
3139         (g95_generate_fuction_code): Clear saved_function_decls.
3140         * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
3141         reference.
3142         (g95_trans_arrayfunc_assign): New function.
3143         (g95_trans_assignment): Use it.
3144         * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
3145         (g95_se): Add direct_byref.
3146         * trans-types.c: Use sym->result rather than sym where appropriate.
3147         * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
3148         Update other functions to use this.
3149         (g95_is_intrinsic_libcall): New function.
3150         (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
3151         (g95_walk_intrinsic_function): Ditto.
3153 2002-09-08  Paul Brook  <paul@nowt.org>
3155         * trans-types.c: Change rank field to dtype field in array descriptor.
3156         * trans-array.c: Implement filling of dtype array descriptor field.
3157         * trans-intrinsic.c: Fix broken LEN intrinsic.
3159 2002-09-07  Paul Brook  <paul@nowt.org>
3161         * trans-intrinsic.c: Remove outdated todo intrinsic list.
3162         (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
3163         (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
3165 2002-09-06  Paul Brook  <paul@nowt.org>
3167         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
3168         (gt-f95-trans-types.h): Add dependancy information.
3169         * config-lang.in (gtfiles): Add trans-types.c
3170         * f95-lang.c (g95_be_parse_file): Pass error and warning counts
3171         back to top-level code.
3172         * trans-array.c, trans-types.c: Change format of array descriptor.
3173         (g95_conv_descriptor_dimension): New function.
3174         * trans-types.h (g95_conv_descriptor_rank): define.
3175         * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
3176         intrinsics.
3178 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
3180         * trans-array.c, trans-types.c: Add rank information to descriptor.
3182 2002-09-06  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
3184         * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
3186 2002-09-04  Paul Brook  <paul@nowt.org>
3188         * f95-lang.c (g95_create_decls): New function.
3189         (g95_init):  Move initialization of external decls to above, and call
3190         from g95_be_parse_file.
3191         * trans.c (g95_finish_stmt): Don't amputate the decl chain.
3192         * trans-types.c (g95_init_types): Always name integer and char types.
3193         (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
3195 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
3197         * Make-lang.in: Add options.c to F95_PARSER_OBJS
3199 2002-09-02  Paul Brook  <paul@nowt.org>
3201         * g95_generate_code: Clear the attr for __fortran_main.
3202         * trans-types.c (g95_finish_type): New function.
3203         * g95_init_io_state_type: Use g95_finish_type.
3204         * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
3206 2002-09-01  Paul Brook  <paul@nowt.org>
3208         * README.backend: Warn about the dangers of extra config.h files.
3209         Remove obsolete libgfor stuff.
3210         * config-lang.in: Add target-libgfor dependancy.
3211         * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
3213 2002-09-01  Toon Moene  <toon@moene.indiv.nluug.nl>
3215         * g95_conv_mpz_to_tree: Free storage pointed to by q,
3216         not by buff.
3218 2002-08-30  Paul Brook  <paul@nowt.org>
3220         * trans-intrinsic.c (g95_conv_intrinsic_function,
3221         g95_walk_intrinsic_function): Added ANY and ALL.
3222         (g95_conv_intrinsic_anyall): New function.
3223         * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in
3224         mangled name