OSDN Git Service

da0257291a2afdc4d4613ccf43a934e5a6e009d8
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2
3         * trans-decl.c (build_function_decl): Fix spelling in comment.
4         (build_entry_thunks): Remove code with no function.
5         (gfc_build_intrinsic_function_decls): Remove empty line.
6
7         * resolve.c (resolve_entries): Fix a bunch of comment typos.
8
9 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
10
11         * fortran/f95-lang.c (gfc_init_decl_processing): Adjust
12         build_common_tree_nodes call.
13
14 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
15
16         * trans-types.c: Spelling and formatting fixes.
17
18 2004-08-23  Richard Henderson  <rth@redhat.com>
19
20         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
21         of going through an intermediate string.  Fix 32/64 int/long bug.
22
23 2004-08-23  Eric Christopher  <echristo@redhat.com>
24
25         * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
26         usage. Use build_vector_type_for_mode for vector types.
27
28 2004-08-22  Richard Henderson  <rth@redhat.com>
29
30         PR 13465
31         * data.c (find_con_by_offset): Search ordered list; handle
32         elements with repeat counts.
33         (gfc_assign_data_value_range): New.
34         * gfortran.h (struct gfc_data_value): Make repeat unsigned.
35         (gfc_assign_data_value_range): Declare.
36         * match.c (top_val_list): Extract repeat count into a temporary.
37         * resolve.c (values): Make left unsigned.
38         (next_data_value): Don't decrement left.
39         (check_data_variable): Use gfc_assign_data_value_range.
40
41 2004-08-22  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
42
43         * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
44
45 2004-08-22  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
46
47         * check.c (gfc_check_reduction): Rename to ...
48         (check_reduction): ... this. Make static. Don't check type of
49         first argument.
50         (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
51         * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
52         SUM to use new check functions.
53         (check_specific): Change logic to call new functions.
54         * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
55         Add prototypes.
56         (gfc_check_reduction): Remove prototype.
57
58 2004-08-20  Paul Brook  <paul@codesourcery.com>
59         Canqun Yang  <canqun@nudt.edu.cn>
60
61         PR fortran/17077
62         * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
63         for automatic arrays.
64         * trans-types.c (gfc_get_nodesc_array_type): Add comment.
65
66 2004-08-19  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
67         (Port from g95)
68
69         PR fortran/17074
70         * match.c (match_simple_forall, match_simple_where): Forward-declare.
71         (gfc_match_if): Order statement list alphabetically, add WHERE and
72         FORALL, remove double PAUSE.
73         (gfc_match_simple_where, match_forall_header,
74         gfc_match_simple_forall): New functions.
75         (gfc_match_forall): Use match_forall_header.
76
77 2004-08-19  Paul Brook  <paul@codesourcery.com>
78
79         PR fortran/17091
80         * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
81         * symbol.c (gfc_clear_attr): Use memset.
82
83 2004-08-19  Paul Brook  <paul@codesourcery.com>
84
85         PR fortran/14976
86         PR fortran/16228
87         * data.c (assign_substring_data_value): Remove.
88         (create_character_intializer): New function.
89         (gfc_assign_data_value): Track the typespec for the current
90         subobject.  Use create_character_intializer.
91
92 2004-08-19  Erik Schnetter  <schnetter@aei.mpg.de>
93
94         PR fortran/16946
95         * check.c (gfc_check_reduction): New function.
96         (gfc_check_minval_maxval): Removed.
97         (gfc_check_product): Removed.
98         (gfc_check_sum): Removed.
99         * intrinsic.h: Add/remove declarations for these.
100         * gfortran.h: Add field f3red to union gfc_check_f.
101         * intrinsic.c (add_sym_3red): New function.
102         (add_functions): Register maxval, minval, product, and sum intrinsics
103         through add_sym_3red.
104         (check_specific): Handle f3red union field.
105         * iresolve.c: Whitespace change.
106
107 2004-08-18  Paul Brook  <paul@codesourcery.com>
108
109         * trans-types.c (gfc_sym_type): Use pointer types for optional args.
110
111 2004-08-18  Victor Leikehman  <lei@il.ibm.com>
112
113         PR fortran/13278
114         * trans-io.c (transfer_namelist_element): New. Recursively handle
115         derived-type variables.  Pass string lengths.
116         (build_dt): Code moved to build_namelist, with some
117         changes and additions.
118         (gfc_build_io_library_fndecls): Declare the fifth
119         argument in st_set_nml_var_char -- string_length.
120
121 2004-08-17  Paul Brook  <paul@codesourcery.com>
122         Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
123
124         PR fortran/13082
125         * decl.c (get_proc_name): Update mystery comment.
126         (gfc_match_entry): Check for errors earlier.  Add entry point to list.
127         * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
128         * gfortran.h (symbol_attribute): Add entry_master.  Document entry.
129         (struct gfc_entry_list): Define.
130         (gfc_get_entry_list): Define.
131         (struct gfc_namespace): Add refs and entries.
132         (enum gfc_exec_op): Add EXEC_ENTRY.
133         (struct gfc_code): Add ext.entry.
134         * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
135         (mio_symbol_attribute): Don't save/reture addr->entry.
136         (mio_namespace_ref): Refcount namespaces.
137         * parse.c (accept_statement): Handle ST_ENTRY.
138         (gfc_fixup_sibling_symbols): Mark symbol as referenced.
139         (parse_contained): Fixup sibling references to entry points
140         after parsing the procedure body.
141         * resolve.c (resolve_contained_fntype): New function.
142         (merge_argument_lists, resolve_entries): New functions.
143         (resolve_contained_functions): Use them.
144         (resolve_code): Handle EXEC_ENTRY.
145         (gfc_resolve): Call resolve_entries.
146         * st.c (gfc_free_statement): Handle EXEC_ENTRY.
147         * symbol.c (gfc_get_namespace): Refcount namespaces.
148         (gfc_free_namespace): Ditto.
149         * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
150         optional when multiple entry points are present.
151         * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
152         (gfc_get_extern_function_decl): Add assertion.  Fix coment.
153         (create_function_arglist, trans_function_start, build_entry_thunks):
154         New functions.
155         (gfc_build_function_decl): Rename ...
156         (build_function_decl): ... to this.
157         (gfc_create_function_decl): New function.
158         (gfc_generate_contained_functions): Use it.
159         (gfc_trans_entry_master_switch): New function.
160         (gfc_generate_function_code): Use new functions.
161         * trans-stmt.c (gfc_trans_entry): New function.
162         * trans-stmt.h (gfc_trans_entry): Add prototype.
163         * trans-types.c (gfc_get_function_type): Add entry point argument.
164         * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
165         (gfc_generate_module_code): Call gfc_create_function_decl.
166         * trans.h (gfc_build_function_decl): Remove.
167         (gfc_create_function_decl): Add prototype.
168
169 2004-08-15  Andrew Pinski  <apinski@apple.com>
170
171         PR fortran/17030
172         * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
173         for cabs{,f} and copysign{,f}.
174         * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
175         (gfor_fndecl_math_cabs): Delete.
176         (gfor_fndecl_math_sign4): Delete.
177         (gfor_fndecl_math_sign8): Delete.
178         (gfc_build_intrinsic_function_decls): Remove the
179         initializing of cabs{,f} and copysign{,f} functions.
180         * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
181         instead of the functions definitions.
182         (gfc_conv_intrinsic_sign): Likewise.
183         * trans.h (gfor_fndecl_math_cabsf): Delete.
184         (gfor_fndecl_math_cabs): Delete.
185         (gfor_fndecl_math_sign4): Delete.
186         (gfor_fndecl_math_sign8): Delete.
187
188 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
189
190         * trans-array.c (gfc_trans_array_constructor_value): Use
191         build_int_cst.
192         * trans-const.c (gfc_build_string_const,
193         gfc_init_constants, gfc_conv_mpz_to_tree,
194         gfc_conv_constant_to_tree): Likewise.
195         * trans-decl.c (gfc_get_symbol_decl): Likewise.
196         * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
197         gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
198         * trans-io.c (add_case, set_error_locus, build_dt,
199         transfer_expr): Likewise.
200         * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
201         gfc_trans_stop, gfc_trans_character_select): Likewise.
202         * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
203         * trans.c (gfc_trans_runtime_check): Likewise.
204
205 2004-08-14  Paul Brook  <paul@codesourcery.com>
206
207         * trans-decl.c (gfc_build_function_decl): Remove dead code.
208
209 2004-08-14  Paul Brook  <paul@codesourcery.com>
210
211         * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
212
213 2004-08-13  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
214
215         * gfortran.h: Add comments.
216         * parse.c (parse_contained): Fix comment typo.
217         * resolve.c (was_declared): Ditto.
218         * symbol.c: Ditto.
219
220 2004-08-11  Paul Brook  <paul@codeourcery.com>
221
222         PR fortran/16917
223         * intrinsic.c (add_functions): Add dfloat as an alias for dble.
224
225 2004-08-10  Richard Henderson  <rth@redhat.com>
226
227         * f95-lang.c (gfc_init_builtin_functions): Remove
228          __builtin_stack_alloc, add __builtin_alloca.
229         * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
230         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
231
232 2004-08-10  Paul Brook  <paul@codesourcery.com>
233
234         * trans-io.c (transfer_expr): Handle pointters.
235
236 2004-08-10  Paul Brook  <paul@codesourcery.com>
237
238         PR fortran/16919
239         * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
240         (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
241         (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
242         Handle GFC_SS_COMPONENT.
243         (gfc_conv_ss_startstride): Ditto.  Set ss->shape.
244         (gfc_conv_loop_setup): Tweak commends. Remove dead code.
245         Use ss->shape.
246         (gfc_conv_array_initializer): Call specific initializer routines.
247         * trans-expr.c (gfc_trans_structure_assign): New function.
248         (gfc_trans_subarray_assign): New function.
249         (gfc_trans_subcomponent_assign): New fucntion
250         (gfc_conv_structure): Use them.
251         * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
252         (gfc_ss): Add shape.
253
254 2004-08-08  Victor Leikehman  <lei@il.ibm.com>
255
256         * simplify.c (gfc_simplify_shape): Bugfix.
257         * expr.c (gfc_copy_shape_excluding): New function.
258         * gfortran.h (gfc_get_shape): Bugfix.
259         (gfc_copy_shape_excluding): Added declaration.
260         * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
261         gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
262         gfc_resolve_ubound, gfc_resolve_transpose): Added compile
263         time resolution of shape.
264
265 2004-08-06  Janne Blomqvist  <jblomqvi@cc.hut.fi>
266
267         * intrinsic.c (add_subroutines): Add getenv and
268         get_environment_variable. (add_sym_5s): New function.
269         * intrinsic.h (gfc_resolve_get_environment_variable): Add
270         prototype.
271         * iresolve.c (gfc_resolve_get_environment_variable): New
272         function.
273
274 2004-08-06  Feng Wang  <fengwang@nudt.edu.cn>
275
276         * f95-lang.c (gfc_init_builtin_functions): Fix the number of
277         __builtin_pow[f] arguments.
278
279 2004-08-06  Steven G. Kargl  <kargls@comcast.net>
280
281         * arith.c: Add #define for model numbers.  Remove global GMP variables.
282         (natural_logarithm,common_logarithm,exponential,sine,
283         cosine,arctangent,hypercos,hypersine ): Remove.
284         (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
285         (arctangent2,gfc_arith_init_1,gfc_arith_done_1
286         gfc_check_real_range, gfc_constant_result, gfc_range_check,
287         gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
288         gfc_arith_divide,complex_reciprocal,complex_pow_ui,
289         gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
290         gfc_convert_complex,gfc_int2real,gfc_int2complex,
291         gfc_real2int,gfc_real2real,gfc_real2complex,
292         gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
293         to MPFR, use new functions.
294         * arith.h: Remove extern global variables.
295         (natural_logarithm,common_logarithm,exponential, sine, cosine,
296         arctangent,hypercos,hypersine): Remove prototypes.
297         (arctangent2): Update prototype from GMP to MPFR.
298         (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
299         * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
300         * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
301         * gfortran.h (GFC_REAL_BITS): Remove.
302         (arith): Add ARITH_NAN.
303         Include mpfr.h.  Define GFC_RND_MODE.
304         Rename GCC_GFORTRAN_H GFC_GFC_H.
305         (gfc_expr): Convert GMP to MPFR.
306         * module.c: Add arith.h, correct type in comment.
307         (mio_gmp_real): Convert GMP to MPFR.
308         (mio_expr):  Use gfc_set_model_kind().
309         * primary.c:  Update copyright date with 2004.
310         (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
311         * simplify.c: Remove global GMP variables
312         (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
313         gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
314         gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
315         gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
316         gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
317         gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
318         gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
319         gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
320         gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
321         gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
322         gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
323         gfc_simplify_rrspacing,gfc_simplify_scale,
324         gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
325         gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
326         gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
327         gfc_simplify_init_1,gfc_simplify_done_1):  Convert GMP to MPFR.
328         Use new functions.
329         * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
330         gfc_conv_mpf_to_tree.  Convert it to use MPFR
331         (gfc_conv_constant_to_tree): Use it.
332         * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
333         * trans-intrinsic.c: Add arith.h, remove gmp.h
334         (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
335
336 2004-08-06  Victor Leikehman  <lei@il.ibm.com>
337         Paul Brook  <paul@codesourcery.com>
338
339         * trans-array.c (gfc_trans_allocate_array_storage,
340         gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
341         gfc_conv_loop_setup): For functions, if the shape of the result
342         is not known in compile-time, generate an empty array descriptor for
343         the result and let the callee to allocate the memory.
344         (gfc_trans_dummy_array_bias): Do nothing for pointers.
345         (gfc_conv_expr_descriptor): Use function return values directly.
346         * trans-expr.c (gfc_conv_function_call): Always add byref call
347         insn to pre chain.
348         (gfc_trans_pointer_assignment): Add comments.
349         (gfc_trans_arrayfunc_assign): Don't chain on expression.
350
351 2004-08-01  Roger Sayle  <roger@eyesopen.com>
352
353         * options.c (gfc_init_options): Don't warn about the use GNU
354         extensions by default.
355         (gfc_post_options): Warn about GNU extensions with -pedantic.
356         (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
357
358 2004-07-30  Richard Henderson  <rth@redhat.com>
359
360         * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
361         for TREE_CONSTANTs.
362
363 2004-07-25  Richard Henderson  <rth@redhat.com>
364
365         * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
366         and DECL_IGNORED_P on RESULT_DECL.
367         (gfc_generate_constructors): Likewise.
368
369 2004-07-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
370
371         PR fortran/16465
372         * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
373         options.
374         (ffixed-line-length-80, ffixed-line-length-132): Remove.
375         * options.c (gfc_handle_options): Deal with changed options.
376         * scanner.c (load_line): Change second arg to 'char **',
377         allocate if pointing to NULL. Keep track of buffer's length.
378         Adapt buffer size to overlong lines. Pad lines to full length
379         in fixed form.
380         (load_file): Adapt to new interface of load_line.
381
382 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
383
384         * trans.h (builtin_function): Declare.
385
386 2004-07-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
387
388         PR fortran/16404
389         (parts ported from g95)
390         * parse.h (gfc_state_data): New field do_variable.
391         (gfc_check_do_variable): Add prototype.
392         * parse.c (push_state): Initialize field 'do_variable'.
393         (gfc_check_do_variable): New function.
394         (parse_do_block): Remember do iterator variable.
395         (parse_file): Initialize field 'do_variable'.
396         * match.c (gfc_match_assignment, gfc_match_do,
397         gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
398         Add previously missing checks.
399         (gfc_match_return): Reformat error message.
400         * io.c (match_out_tag): New function.
401         (match_open_element, match_close_element,
402         match_file_element, match_dt_element): Call match_out_tag
403         instead of match_vtag where appropriate.
404         (match_io_iterator, match_io_element): Add missing check.
405         (match_io): Reformat error message.
406         (match_inquire_element): Call match_out_tag where appropriate.
407
408         * parse.c (gfc_check_do_variable): Fix error locus.
409
410 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
411
412         PR fortran/15129
413         * trans-decl.c (gfc_build_function_decl): Create a new chardecl
414         for every assumed length character dummy argument.
415
416         PR fortran/15140
417         * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
418
419         PR fortran/13792
420         * simplify.c (gfc_simplify_bound): Copy the bound expression.
421
422 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
423
424         PR fortran/15324
425         * trans-array.c gfc_trans_g77_array,
426         gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
427         for assumed length characters.
428         (gfc_conv_expr_descriptor): Set se->string_length if dealing
429         with a character expression.
430         (gfc_cvonv_array_parameter): Pass string length when passing
431         character array according to g77 conventions.
432
433 2004-07-12  Paul Brook  <paul@codesourcery.com>
434
435         * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
436         * trans-array.c (gfc_trans_auto_array_allocation): Remove
437         initialization code.
438         * trans-common.c (create_common): Use gfc_conv_initializer.
439         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
440         * trans-expr.c (gfc_conv_initializer): New function.
441         (gfc_conv_structure): Use it.
442         * trans.h (gfc_conv_initializer): Add prototype.
443
444 2004-07-11  Paul Brook  <paul@codesourcery.com>
445
446         PR fortran/15986
447         * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
448         variables.
449         (parse_contained): Mark contained symbols as referenced.
450
451 2004-07-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
452
453         PR fortran/16455
454         * module.c (gfc_dump_module, gfc_use_module): Print locus
455         when opening of module file fails.
456
457         PR fortran/16404
458         * io.c (match_io): Flag 'WRITE(...), ...' as extension.
459
460         PR fortran/16404
461         * match.c (gfc_match_program): A program name is obligatory.
462         (gfc_match_return): RETURN in main program is an extension.
463         (gfc_match_block_data): A space is required before a block data
464         name.
465
466         PR fortran/16433
467         * primary.c (match_boz_constant): Call gfc_notify_std only if
468         we actually have a non-standard boz-literal-constant.
469
470         PR fortran/15754
471         * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
472         warning if assigning NULL().
473
474 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
475
476         * f95-lang.c (set_block): Remove.
477         (gfc_clear_binding_stack): New.
478         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
479         (struct binding_level): Remove block_created_by_back_end.
480         (clear_binding_level): Likewise.
481         (poplevel): Don't handle block_created_by_back_end.
482
483 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
484
485         * trans-decl.c (gfc_create_module_variable): Nothing to do if
486         symbol is in common, because we ...
487         (gfc_generate_module_vars): Call gfc_trans_common.
488
489 2004-07-10  Paul Brook  <paul@codesourcery.com>
490
491         * trans-array.c (gfc_build_null_descriptor): New function.
492         (gfc_trans_static_array_pointer): Use it.
493         * trans-array.h (gfc_build_null_descriptor): Add prototype.
494         * trans-expr.c (gfc_conv_structure): Handle array pointers.
495
496 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
497
498         PR fortran/16336
499         * decl.c (gfc_match_save): Use-associated common block
500         doesn't collide.
501         * gfortran.h (gfc_common_head): Add new field 'name'.
502         Fix typo in comment after #endif.
503         * match.c (gfc_get_common): Add new argument from_common,
504         mangle name if flag is set, fill in new field in structure
505         gfc_common_head.
506         (match_common): Set new arg in call to gfc_get_common,
507         use-associated common block doesn't collide.
508         * match.h (gfc_get_common): Adapt prototype.
509         * module.c (load_commons): Set new arg in call to
510         gfc_get_common.
511         * symbol.c (free_common_tree): New function.
512         (gfc_free_namespace): Call new function.
513         * trans-common.c (several functions): Remove argument
514         'name', use name from gfc_common_head instead.
515
516 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
517
518         * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
519         and RHS match. Return early if the RHS is NULL().
520
521         PR fortran/16336
522         * match.c (match_common): Fix error reporting for used common.
523
524         PR fortran/15969
525         * trans-expr.c (gfc_conv_structure): Handle initialization
526         of scalar pointer components.
527
528         * parse.c (decode_statement): Fix matching of BLOCK DATA.
529
530         * trans-decl.c (generate_local_decl): Remove workaround obsoleted
531         by fix for PR 15481.
532
533 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
534
535         * trans-common.c: Fix whitespace issues, make variable names
536         more readable.
537         (create_common): Additionally, make loop logic more obvious.
538
539 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
540         Paul Brook  <paul@codesourcery.com>
541
542         PR fortran/13415
543         * trans-common.c (calculate_length): Remove ...
544         (get_segment_info): Merge into here.  Save field type.
545         (build_field): Use saved type.
546         (create_common, new_condition, new_segment, finish_equivalences):
547         Use new get_segment_info.
548         * trans-types.c: Update comment.
549
550 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
551
552         PR fortran/14077
553         * moduele.c (mio_symbol): Don't I/O initial values unless
554         symbol is a parameter.
555
556 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
557
558         PR fortran/13201
559         * resolve.c (resolve_symbol): Verify that the shape of a
560         parameter array is not only explicit, but also constant.
561         * array.c (gfc_is_compile_time_shape): New function.
562         * gfortran.h (gfc_is_compile_time_shape): Add prototype.
563
564 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
565
566         PR fortran/15481
567         PR fortran/13372
568         PR fortran/13575
569         PR fortran/15978
570         * module.c (write_symbol, write_symtree): Remove workaround.
571         * primary.c (match_actual_arglist): Enhance comment.
572         (gfc_match_rvalue): Handle function call with first argument
573         a keyword argument correctly.
574         * resolve.c (resolve_symbol): Change call to
575         gfc_set_default_type to issue error if no implicit type
576         can be found.
577         * trans-decl.c (gfc_create_module_variable): Remove workaround.
578
579 2004-07-08  Paul Brook  <paul@codesourcery.com>
580
581         * intrinsic.c (add_sym_4s): New function.
582         (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
583
584 2004-07-04  Janne Blomqvist  <jblomqvi@cc.hut.fi>
585         Paul Brook  <paul@codesourcery.com>
586
587         PR fortran/15280
588         PR fortran/15665
589         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
590         GFC_ISYM_COMMAND_ARGUMENT_COUNT.
591         * intrinsic.c (add_functions):  Identify iargc.  Add
592         command_argument_count.
593         (add_subroutines): Resolve getarg.  Add get_command and
594         get_command_argument.
595         * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
596         gfc_resolve_get_command_argument): Add prototypes.
597         * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
598         gfc_resolve_get_command_argument): New functions.
599         * trans-decl.c (gfor_fndecl_iargc): New variable.
600         (gfc_build_intrinsic_function_decls): Set it.
601         * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
602         (gfc_conv_intrinsic_function): Use it.
603         * trans.h (gfor_fndecl_iargc): Declare.
604
605 2004-07-04  Matthias Klose  <doko@debian.org>
606
607         * Make-lang.in: Generate and install gfortran man page.
608         * invoke.texi: Remove extra '@c man end'.
609
610 2004-07-04  Richard Henderson  <rth@redhat.com>
611
612         * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
613
614 2004-07-04  Paul Brook  <paul@codesourcery.com>
615
616         * decl.c (gfc_match_implicit_range): Don't use typespec.
617         (gfc_match_implicit): Handle character selectors.
618         * gfortran.h (gfc_set_implicit): Remove prototype.
619         (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
620         * parse.c (accept_statement): Don't call gfc_set_implicit.
621         * symbol.c (new_ts): Remove.
622         (gfc_set_implicit_none): Use same loop bounds as other functions.
623         (gfc_set_implicit): Remove.
624         (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
625         (gfc_merge_new_implicit): Combine with gfc_set_implicit.
626
627 2004-06-30  Richard Henderson  <rth@redhat.com>
628
629         * match.c (var_element): Remove unused variable.
630
631         * trans-decl.c (gfc_generate_function_code): Don't set
632         x_whole_function_mode_p.
633         (gfc_generate_constructors): Likewise.
634
635 2004-06-30  Richard Henderson  <rth@redhat.com>
636
637         * trans-decl.c (gfc_generate_function_code): Don't set
638         immediate_size_expand.
639         (gfc_generate_constructors): Likewise.
640
641 2004-06-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
642
643         PR fortran/16161
644         * decl.c (gfc_match_type_spec): Rename second argument to
645         'implicit_flag', reverse meaning. Don't match_char_spec if
646         'implicit_flag' is set. Rename to ...
647         (match_type_spec): ... this.
648         (gfc_match_implicit_none, match_implicit_range): Move here
649         from match.c.
650         (gfc_match_implicit): Move here from match.c, try to
651         match_char_len if match_implicit_range doesn't succeed for
652         CHARACTER implicits. Call renamed fucntion match_type_spec.
653         (gfc_match_data_decl, match_prefix): Call renamed function
654         match_type_spec.
655         * match.c (gfc_match_implicit_none, match_implicit_range,
656         gfc_match_implicit): Move to decl.c.
657         * match.h (gfc_match_implicit_none, gfc_match_implicit):
658         Move protoypes to section 'decl.c'.
659         (gfc_match_type_spec): Remove prototype.
660
661 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
662
663         * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
664         copyright years.
665
666 2004-06-29  Steven Bosscher  <stevenb@suse.de>
667
668         Make sure types in assignments are compatible.  Mostly mechanical.
669         * trans-const.h (gfc_index_one_node): New define.
670         * trans-array.c (gfc_trans_allocate_array_storage,
671         gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
672         gfc_trans_array_constructor_value, gfc_trans_array_constructor,
673         gfc_conv_array_ubound, gfc_conv_array_ref,
674         gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
675         gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
676         gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
677         gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
678         types in assignments, conversions and conditionals for expressions.
679         * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
680         gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
681         gfc_conv_function_call, gfc_trans_pointer_assignment,
682         gfc_trans_scalar_assign): Likewise.
683         * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
684         gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
685         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
686         gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
687         gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
688         gfc_conv_allocated, gfc_conv_associated,
689         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
690         * trans-io.c (set_string): Likewise.
691         * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
692         gfc_do_allocate, generate_loop_for_temp_to_lhs,
693         generate_loop_for_rhs_to_temp, compute_inner_temp_size,
694         compute_overall_iter_number, gfc_trans_assign_need_temp,
695         gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
696         gfc_evaluate_where_mask, gfc_trans_where_assign,
697         gfc_trans_where_2): Likewise.
698         * trans-types.c (gfc_get_character_type, gfc_build_array_type,
699         gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
700
701         * trans.c (gfc_add_modify_expr): Add sanity check that types
702         for the lhs and rhs are the same for scalar assignments.
703
704 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
705
706         * dump-parse-tree.c (show_common): New function.
707         (gfc_show_namespace): Show commons.
708
709 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
710         Andrew Vaught  <andyv@firstinter.net>
711
712         PR fortran/13249
713         PR fortran/15481
714         * decl.c (gfc_match_save): Adapt to new common structures,
715         don't allow saving USE-associated common.
716         * dump-parse-tree (gfc_show_attr): (saved_)common are not
717         symbol attributes any longer.
718         (gfc_show_symbol): Don't show old-style commons any longer.
719         (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
720         interface.
721         * gfortran.h (symbol_attribute): Remove common and saved_common
722         attributes.
723         (gfc_symbol): Remove common_head element.
724         (gfc_common_head): New struct.
725         (gfc_get_common_head): New macro.
726         (gfc_symtree): Add field 'common' to union.
727         (gfc_namespace): Add field 'common_root'; change type of field
728         'blank_common' to blank_common.
729         (gfc_add_data): New prototype.
730         (gfc_traverse_symtree): Expect a symtree as first argument
731         instead of namespace.
732         * match.c (gfc_get_common): New function.
733         (match_common_name): Change to take char * as argument, adapt,
734         fix bug with empty name.
735         (gfc_match_common): Adapt to new data structures. Disallow
736         redeclaration of USE-associated COMMON-block. Fix bug with
737         empty common.
738         (var_element): Adapt to new common structures.
739         * match.h (gfc_get_common): Declare.
740         * module.c: Add 2004 to copyright years, add commons to module
741         file layout description.
742         (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
743         for removed attributes.
744         (mio_symbol): Adapt to new way of storing common relations.
745         (load_commons): New function.
746         (read_module): Skip common list on first pass, load_commons at
747         second.
748         (write_commons): New function.
749         (write_module): Call write_commons().
750         * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
751         functions related to removed attributes.
752         (gfc_add_data): New function.
753         (gfc_clear_attr): Don't set removed attributes.
754         (gfc_copy_attr): Don't copy removed attributes.
755         (traverse_symtree): Remove.
756         (gfc_traverse_symtree): Don't traverse symbol
757         tree of the passed namespace, but require a symtree to be passed
758         instead. Unify with traverse_symtree.
759         (gfc_traverse_ns): Call gfc_traverse_symtree according to new
760         interface.
761         (save_symbol): Remove setting of removed attribute.
762         * trans-common.c (gfc_sym_mangled_common_id): Change to
763         take 'char *' argument instead of 'gfc_symbol'.
764         (build_common_decl, new_segment, translate_common): Adapt to new
765         data structures, add new
766         argument name.
767         (create_common): Adapt to new data structures, add new
768         argument name. Fix typo in intialization of derived types.
769         (finish_equivalences): Add second argument in call to
770         create_common.
771         (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
772         (gfc_trans_common): Adapt to new data structures.
773         * trans-decl.c (gfc_create_module_variables): Remove test for
774         removed attribute.
775
776 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
777
778         * io.c: Add 2004 to copyright years.
779
780 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
781         Andrew Vaught  <andyv@firstinter.net>
782
783         * gfortran.h (gfc_gsymbol): New typedef.
784         (gfc_gsym_root): New variable.
785         (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
786         * parse.c (global_used): New function.
787         (parse_block_data): Check for double empty BLOCK DATA,
788         use global symbol table.
789         (parse_module): Use global symbol table.
790         (add_global_procedure, add_global_program): New functions.
791         (gfc_parse_file): Use global symbol table.
792         * symbol.c (gfc_gsym_root): New variable.
793         (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
794         functions.
795
796 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
797
798         * module.c (mio_gmp_real): Correct writing of negative numbers.
799
800 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
801
802         PR fortran/15963
803         * expr.c (check_intrinsic_op): Allow comparison of characters.
804         Make logic easier.
805
806 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
807         Andrew Vaught  <andyv@firstinter.net>
808
809         * decl.c (contained_procedure): New function.
810         (match_end): Verify correctness of END STATEMENT in
811         all cases.
812
813 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
814         Andrew Vaught  <andyv@firstinter.net>
815
816         PR fortran/15190
817         * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
818         (decode_statement): Enforce required space in free-form.
819
820 2004-06-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
821
822         * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
823         * trans-array.c (gfc_conv_descriptor_data): Add operand
824         for COMPONENT_REF.
825         (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
826         (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
827         (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
828         * trans-common.c (create_common): Likewise.
829         * trans-expr.c (gfc_conv_component_ref): Likewise.
830         * trans-io.c (set_parameter_value): Likewise.
831         (set_parameter_ref, set_string, set_flag, io_result): Likewise.
832         (transfer_expr): Likewise.
833         * trans-decl.c (gfc_trans_auto_character_variable):
834         Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
835         (gfc_gimplify_function): New function.
836         (gfc_generate_function-code): Properly handle nested functions.
837         * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
838
839 2004-06-22  Janne Blomqvist  <jblomqvi@cc.hut.fi>
840
841         PR fortran/15750
842         * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
843         (gfc_resolve_inquire): Resolve the iolength tag.  Return
844         SUCCESS at end of function if no failure has occured.
845         * resolve.c (resolve_code): Resolve if iolength is encountered.
846         * trans-io.c: (ioparm_iolength, iocall_iolength,
847         iocall_iolength_done): New variables.
848         (last_dt): Add IOLENGTH.
849         (gfc_build_io_library_fndecls ): Set iolength related variables.
850         (gfc_trans_iolength): Implement.
851         (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
852
853 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de
854
855         PR fortran/15511
856         * scanner.c (load_line): Don't truncate preprocessor lines.
857         Reformat error message.
858         (preprocessor_line): Issue warning in case of malformed
859         preprocessor line.
860
861 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
862
863         * resolve.c (resolve_symbol): Add comment in function body.
864         (check_data_variable): Change type of mark to ar_type, adapt code
865         accordingly.
866
867 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
868
869         * array.c (gfc_insert_constructor): Avoid redundant call to
870         mpz_comp. Add 2004 to copyright years.
871
872 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
873
874         * trans.h (stmtblock_t): Change has_scope to unsigned int.
875
876 2004-06-20  Steven G. Kargl  <kargls@comcast.net>
877
878         * arith.c (gfc_range_check): correct complex underflow.
879
880 2004-06-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
881
882         PR fortran/15962
883         * match.c (match_case_selector): Call gfc_match_init_expr
884         instead of gfc_match_expr.
885         * resolve.c (validate_case_label_expr): No need to check for
886         constant, since it wouldn't have been matched with the fix to
887         match.c.
888
889 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
890
891         PR fortran/15211
892         * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
893         of strings.
894
895 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
896
897         PR fortran/15510
898         * trans-deecl.c (generate_local_decl): Do not issue warning for
899         unused variables if they're use associated.
900
901 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
902         Andrew Vaught <andyv@firstinter.net>
903
904         PR fortran/14928
905         * gfortran.h (gfc_check_f): Add new field f3ml.
906         * check.c (gfc_check_minloc_maxloc): Take argument list instead
907         of individual arguments, reorder if necessary.
908         * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
909         * intrinsic.c (add_sym_3ml): New function.
910         (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
911         (check_specific): Catch special case MINLOC, MAXLOC.
912
913 2004-06-14  Paul Brook  <paul@codesourcery.com>
914
915         * intrinsic.c (add_sym_2s): Use correct function types.
916
917 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
918
919         * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize.  Move data.c
920         * data.c (gfc_get_section_index):  Remove dependency on trans.h.
921
922 2004-06-12  Steven G. Kargl  <kargls@comcast.net>
923
924         * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
925         gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
926         * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
927         GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
928         * trans-intrinsic.c:  Use symbols.
929         * intrinsic.c (add_sym_2s): New function.
930         * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
931         * intrinsic.h: Function prototypes.
932         * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
933         gfc_resolve_srand):  New functions.
934
935 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
936
937         PR fortran/14957
938         * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
939         contained procedure.
940
941 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
942
943         PR fortran/12841
944         * interface.c (compare_parameter, compare_actual_formal): Don't
945         check types and array shapes for NULL()
946         * trans-expr.c (conv_function_call): No double indirection for
947         NULL()
948
949 2004-06-09  Toon Moene  <toon@moene.indiv.nluug.nl>
950
951         * trans-expr.c (gfc_conv_cst_int_power): Compute
952         x**(-n) by converting it to (1/x)**n instead of
953         1/x**n.
954
955 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
956
957         PR fortran/13372
958         * module.c (write_symbol, write_symtree): Don't write symbols
959         wrongly added to namespace.
960         * trans-decl.c (gfc_create_module_variable): Don't create a
961         backend decl for a symbol incorrectly added to namespace.
962
963 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
964
965         PR fortran/13201
966         * resolve.c (resolve_symbol): Verify that parameter array has an
967         explicit shape. Fix typos and coding style issues in surrounding
968         lines.
969
970 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
971
972         PR fortran/15478
973         * gfortran.texi: The documentation doesn't contain infomration on
974         how to report bugs, and shouldn't, so remove the line which
975         says it does.
976
977 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
978
979         * intrinsic.c (sort_actual): Keep track of type of missing
980         arguments. (Missing from previous commit.)
981
982 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
983
984         * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
985         * interface.c (compare_actual_formal): Keep type of omitted
986         optional arguments.
987         * trans-expr.c (gfc_conv_function_call): Add string length
988         argument for omitted string argument.
989
990 2004-06-03  Paul Brook  <paul@codesourcery.com>
991
992         * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
993         lists instead of compound expr chains.
994         (gfc_trans_code): Annotate statement lists.
995
996 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
997
998         * trans-array.c: Fix spelling in comments.
999
1000 2004-06-02  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1001
1002         PR fortran/15557
1003         * data.c (assign_substring_data_value): New function.
1004         (gfc_assign_data_value): Call the new function if we're dealing
1005         with a substring LHS.
1006
1007 2004-06-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1008
1009         PR fortran/15477
1010         * gfortran.h (GFC_VERSION): Remove.
1011         * gfortran.texi (version-gfortran): Remove, replace by version-GCC
1012         where used.
1013
1014 2004-05-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1015
1016         * trans-types.c: Fix spelling & layout in comments.
1017
1018 2004-05-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1019
1020         PR fortran/14067
1021         * trans-const.c (gfc_conv_string_init): Allow variable string
1022         length lower than initialization string length.
1023
1024 2004-05-30  Paul Brook  <paul@codesourcery.com>
1025
1026         PR fortran/15620
1027         * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
1028         * trans-expr.c (gfc_trans_string_copy): New function.
1029         (gfc_conv_statement_function): Use them.  Create temp vars.  Enforce
1030         character lengths.
1031         (gfc_conv_string_parameter): Use gfc_trans_string_copy.
1032         * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
1033         * trans.h (struct gfc_saved_var): Define.
1034         (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
1035
1036 2004-05-30  Steven G. Kargl  <kargls@comcast.net>
1037
1038         * iresolve.c (gfc_resolve_random_number): Clean up conditional.
1039
1040 2004-05-29  Steven G. Kargl  <kargls@comcast.net>
1041
1042         * simplify.c (gfc_simplify_log): Remove useless line of code.
1043
1044 2004-05-29  Paul Brook  <paul@codesourcery.com>
1045
1046         * trans-common.c (find_equivalence): Find multiple rules.
1047
1048 2004-05-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1049
1050         * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
1051         (gfc_current_locus): Declare new global variable.
1052         * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
1053         (gfc_current_locus1): Rename ...
1054         (gfc_current_locus): ... to this.
1055         (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
1056         skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
1057         gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
1058         gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
1059         and gfc_current_locus(), respectively.
1060         * array.c (match_subscript, gfc_match_array_ref, match_array_list,
1061         match_array_cons_element, gfc_match_array_constructor):
1062         Read/modify gfc_current_locus instead of calling gfc_set_locus()
1063         and gfc_current_locus().
1064         * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
1065         match_attr_spec, gfc_match_function_decl, gfc_match_end,
1066         attr_decl1, gfc_match_save): Likewise.
1067         * error.c (error_print, gfc_internal_error): Likewise.
1068         * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
1069         * interface.c (gfc_add_interface): Likewise.
1070         * io.c (gfc_match_format, match_dt_format, match_dt_element,
1071         match_io_iterator, match_io): Likewise.
1072         * match.c (gfc_match_space, gfc_match_eos,
1073         gfc_match_small_literal_int, gfc_match_st_label,
1074         gfc_match_strings, gfc_match_name, gfc_match_iterator,
1075         gfc_match_char, gfc_match, gfc_match_assignment,
1076         gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
1077         gfc_match_nullify, gfc_match_call, match_implicit_range,
1078         gfc_match_implicit, gfc_match_data, match_case_selector,
1079         gfc_match_case, match_forall_iterator): Likewise.
1080         * matchexp.c (gfc_match_defined_op_name, next_operator,
1081         match_level_1, match_mult_operand, match_ext_mult_operand,
1082         match_add_operand, match_ext_add_operand, match_level_2,
1083         match_level_3, match_level_4, match_and_operand, match_or_operand,
1084         match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
1085         * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
1086         * parse.c (match_word, decode_statement, next_free, next_fixed,
1087         add_statement, verify_st_order, parse_if_block, gfc_parse_file):
1088         Likewise.
1089         * primary.c (match_digits, match_integer_constant,
1090         match_boz_constant, match_real_constant, match_substring,
1091         next_string_char, match_charkind_name, match_string_constant,
1092         match_logical_constant, match_const_complex_part,
1093         match_complex_constant, match_actual_arg, match_keyword_arg,
1094         gfc_match_actual_arglist, gfc_match_structure_constructor,
1095         gfc_match_rvalue, gfc_match_variable): Likewise.
1096         * st.c (gfc_get_code): Likewise.
1097         * symbol.c (check_conflict, check_used, check_done,
1098         duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
1099         gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
1100         gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
1101
1102 2004-05-26  Roger Sayle  <roger@eyesopen.com>
1103
1104         * io.c (format_asterisk): Silence compiler warnings by correcting
1105         the number of elements of a "locus" initializer.
1106
1107 2004-05-25  Roger Sayle  <roger@eyesopen.com>
1108
1109         PR fortran/13912
1110         * matchexp.c: Allow unary operators after arithmetic operators
1111         as a GNU extension.
1112         (match_ext_mult_operand, match_ext_add_operand): New functions.
1113         (match_mult_operand): Tweak to call match_ext_mult_operand.
1114         (match_add_operand): Tweak to call match_ext_mult_operand.
1115         (match_level_2): Rearrange to call match_ext_add_operand.
1116
1117 2004-05-25  Paul Brook  <paul@codesourcery.com>
1118
1119         * expr.c (check_inquiry): Remove bogus tests.
1120
1121 2004-05-23  Paul Brook  <paul@codesourcery.com>
1122
1123         PR fortran/13773
1124         * expr.c (restricted_args): Remove redundant checks/argument.
1125         (external_spec_function): Update to match.
1126         (restricted_intrinsic): Rewrite.
1127
1128 2004-05-23  Paul Brook  <paul@codesourcery.com>
1129         Victor Leikehman  <lei@haifasphere.co.il>
1130
1131         * gfortran.h (struct gfc_symbol): Add equiv_built.
1132         * trans-common.c: Change int to HOST_WIDE_INT.  Capitalize error
1133         messages.
1134         (current_length): Remove.
1135         (add_segments): New function.
1136         (build_equiv_decl): Create initialized common blocks.
1137         (build_common_decl): Always add decl to bindings.
1138         (create_common): Create initializers.
1139         (find_segment_info): Reformat to match coding conventions.
1140         (new_condition): Use add_segments.
1141         (add_condition, find_equivalence, add_equivalences): Move iteration
1142         inside functions.  Only process each segment once.
1143         (new_segment, finish_equivalences, translate_common): Simplify.
1144
1145 2004-05-23  Steven G. Kargl  <kargls@comcast.net>
1146
1147         * check.c (gfc_check_random_seed): Issue for too many arguments.
1148
1149 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
1150
1151         * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
1152
1153 2004-05-22  Paul Brook  <paul@codesourcery.com>
1154
1155         * dump-parse-tree.c (gfc_show_equiv): New function.
1156         (gfc_show_namespace): Use it.
1157
1158 2004-05-22  Victor Leikehman  <lei@haifasphere.co.il>
1159
1160         PR fortran/13249
1161         * symbol.c (gfc_add_common): Disable checks to work around other more
1162         fundamental inadequacies.
1163
1164 2004-05-22  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
1165
1166         * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
1167         only for functions.
1168         (gfc_build_function_decl): Likewise.
1169
1170 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
1171
1172         * check.c (gfc_check_system_clock): New function.
1173         * intrinsic.c (add_sym_3s): New function.
1174         (add_subroutines): Use it.
1175         * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
1176         Add prototypes.
1177         * iresolve.c (gfc_resolve_system_clock): New function.
1178
1179 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
1180
1181         * invoke.texi: Document -Wunderflow and spell check.
1182         * lang.opt: Add Wunderflow.
1183         * gfortran.h (gfc_option_t): Add warn_underflow option.
1184         * options.c (gfc_init_options, set_Wall): Use it.
1185         * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
1186         * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
1187         gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
1188         gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
1189         * arith.c (common_logarithm): Fix typo in comment.
1190
1191 2004-05-21  Roger Sayle  <roger@eyesopen.com>
1192
1193         * io.c (check_format): As a GNU extension, allow the comma after a
1194         string literal to be optional in a format.  Use gfc_notify_std to
1195         issue an error/warning as appropriate.
1196
1197 2004-05-21  Roger Sayle  <roger@eyesopen.com>
1198
1199         * io.c (check_format): Use gfc_notify_std to determine whether to
1200         issue an error/warning for omitting the digits from the X format.
1201
1202 2004-05-20  Roger Sayle  <roger@eyesopen.com>
1203
1204         * io.c (check_format): Allow the number before the X format to
1205         be optional when not -pedantic.
1206
1207 2004-05-18  Feng Wang  <fengwang@nudt.edu.cn>
1208         Paul Brook  <paul@codesourcery.com>
1209
1210         * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
1211         Create decls for __builtin_pow{,f}.
1212         * gfortran.h (PREFIX_LEN): Define.
1213         * trans-decl.c (gfor_fndecl_math_powi): Add.
1214         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
1215         (gfc_build_intrinsic_function_decls): Create decls for powi.
1216         * trans-expr.c (powi_table): Add.
1217         (gfc_conv_integer_power): Remove.
1218         (gfc_conv_powi): New function.
1219         (gfc_conv_cst_int_power): New function.
1220         (gfc_conv_power_op): Use new powi routines.
1221         * trans.h (struct gfc_powdecl_list): Add.
1222         (gfor_fndecl_math_powi): Add.
1223         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
1224
1225 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1226
1227         * trans.c, trans-decl.c: Fix comment typos.
1228
1229 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1230
1231         * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
1232
1233 2004-05-18  Steve Kargl  <kargls@comcast.net>
1234
1235         * arith.c (gfc_int2complex): Fix incorrect range checking.
1236
1237 2004-05-18  Paul Brook  <paul@codesourcery.com>
1238
1239         PR fortran/13930
1240         * decl.c (add_init_expr_to_sym): Remove incorrect check.
1241         (default_initializer): Move to expr.c.
1242         (variable_decl): Don't assign default initializer to variables.
1243         * expr.c (gfc_default_initializer): Move to here.
1244         * gfortran.h (gfc_default_initializer): Add prototype.
1245         * resolve.c (resolve_symbol): Check for illegal initializers.
1246         Assign default initializer.
1247
1248 2004-05-17  Steve Kargl  <kargls@comcast.net>
1249
1250         * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
1251
1252 2004-05-17  Steve Kargl  <kargls@comcast.net>
1253
1254         * arith.c (gfc_real2complex): Range checking wrong part of complex
1255         number.
1256
1257 2004-05-16  Paul Brook  <paul@codesourcery.com>
1258
1259         * options.c (gfc_handle_module_path_options): Fix buffer overrun.
1260
1261 2004-05-16  Paul Brook  <paul@codesourcery.com>
1262
1263         * arith.c (gfc_range_check): Fix logic error.
1264
1265 2004-05-16  Steve Kargl  <sgk@troutmask.apl.washington.edu>
1266
1267         * arith.c: Fix comment typos.
1268
1269 2004-05-15  Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1270
1271         PR fortran/13742
1272         * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
1273         not initialized in a disallowed fashion.
1274         * match.c (gfc_match_common): Likewise.
1275         (var_element): Verify that variable is not in the blank COMMON,
1276         if it is in a common.
1277
1278 2004-05-15  Joseph S. Myers  <jsm@polyomino.org.uk>
1279
1280         * Make-lang.in (f95.generated-manpages): Remove.
1281         (f95.srcextra): New.
1282         (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
1283         f95.maintainer-clean): Generate info and dvi files in objdir/doc.
1284         (f95.dvi): Remove.
1285         (dvi): New.
1286         (f95.install-info): Remove.
1287         (install-info): New.
1288
1289 2004-05-15  Victor Leikehman  <lei@haifasphere.co.il>
1290
1291         * decl.c (add_init_expr_to_sym): Check for variable size arrays.
1292
1293 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1294
1295         * primary.c (match_boz_constant): Use gfc_notify_std() for
1296         issuing a warning or an error.
1297
1298 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1299
1300         PR fortran/13826
1301         * primary.c (match_structure_constructor): Rename ...
1302         (gfc_match_structure_constructor): ... to this. Make non-static.
1303         (gfc_match_rvalue): Call renamed function.
1304         * match.h (gfc_match_structure_constructor): Declare.
1305         * match.c (gfc_match_data_constant): Handle structure
1306         constructor.
1307
1308 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1309
1310         PR fortran/13702
1311         (Port from g95)
1312         * gfortran.h (gfc_linebuf): New typedef.
1313         (linebuf): Remove.
1314         (gfc_file): Revamped, use new gfc_linebuf.
1315         (locus): Revamped, use new types.
1316         (gfc_current_file): Remove.
1317         (gfc_current_form, gfc_source_file): New global variables.
1318         * match.c (gfc_match_space, gfc_match_strings): Use
1319         gfc_current_form to find source form.
1320         * module.c (gfc_dump_module): Use gfc_source_file when printing
1321         module header.
1322         * error.c (show_locus, show_loci) Use new data structures to print
1323         locus.
1324         * scanner.c (first_file, first_duplicated_file, gfc_current_file):
1325         Remove.
1326         (file_head, current_file, gfc_current_form, line_head, line_tail,
1327         gfc_current_locus1, gfc_source_file): New global variables.
1328         (gfc_scanner_init1): Set new global variables.
1329         (gfc_scanner_done1): Free new data structures.
1330         (gfc_current_locus): Return pointer to gfc_current_locus1.
1331         (gfc_set_locus): Set gfc_current_locus1.
1332         (gfc_at_eof): Set new variables.
1333         (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
1334         to new locus structure.
1335         (gfc_check_include): Remove.
1336         (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
1337         (gfc_skip_comments): Use gfc_current_form, find locus with
1338         gfc_current_locus1.
1339         (gfc_next_char): Use gfc_current_form.
1340         (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
1341         (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
1342         comment formatting.
1343         (get_file): New function.
1344         (preprocessor_line, include_line): New functions.
1345         (load_file): Move down, rewrite to match new data structures.
1346         (gfc_new_file): Rewrite to match new data structures.
1347         * parse.c (next_statement): Remove code which is now useless. Use
1348         gfc_source_form and gfc_source_file where appropriate.
1349         * trans-decl.c (gfc_get_label_decl): adapt to new data structures
1350         when determining locus of frontend code.
1351         * trans-io.c (set_error_locus): Same.
1352         * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
1353         * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
1354         preprocessor flags.
1355         (all): Add missing initializers.
1356
1357 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1358
1359         * Make-lang.in (trans-common.o): Remove redundant dependency.
1360         (data.c): Replace object file name ...
1361         (data.o): ... by the correct one.
1362
1363 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1364
1365         * dump-parse-tree.c (gfc_show_array_ref): Print colon only
1366         for ranges when dumping array references.
1367
1368 2004-05-14  Victor Leikehman  <lei@haifasphere.co.il>
1369
1370         * decl.c (variable_decl): Always apply default initializer.
1371
1372 2004-05-08  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1373
1374         PR fortran/15206
1375         * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
1376         handle zero correctly.
1377
1378 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1379
1380         * match.c (gfc_match): Eliminate dead code.
1381
1382 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1383
1384         * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
1385         Detect bad continuation line in fixed form sources.
1386
1387 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1388
1389         PR fortran/15205
1390         * iresolve.c (gfc_resolve_nearest): Add new function.
1391         * intrinsic.h: ... declare it here.
1392         * intrinsic.c (add_functions): ... add it as resolving function
1393         for NEAREST.
1394
1395 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1396
1397         PR fortran/14066
1398         * match.c (gfc_match_do): Allow infinite loops with
1399         label-do-stmt. Do not enforce space after comma.
1400
1401 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1402
1403         PR fortran/15051
1404         * parse.c (parse_interface): Allow empty INTERFACE, remove
1405         seen_body.
1406
1407 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1408
1409         * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
1410         decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
1411         expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
1412         intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
1413         matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
1414         primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
1415         trans-array.c, trans-array.h, trans-common.c, trans-const.c,
1416         trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
1417         trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
1418         trans-types.h, trans.c, trans.h: Update copyright years and
1419         boilerplate.
1420         * data.c: Likewise, also removed two whitespace-only lines.
1421         * gfortranspec.c, lang.opt: Update copyright years.
1422
1423 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1424
1425         PR fortran/14568
1426         * trans-decl.c (generate_local_decl): Don't warn for unused
1427         variables which are in common blocks.
1428
1429 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
1430
1431         * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
1432         trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
1433         trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
1434
1435 2004-05-13  Victor Leikehman  <lei@haifasphere.co.il>
1436
1437         PR fortran/15314
1438         * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
1439
1440 2004-05-13  Joseph S. Myers  <jsm@polyomino.org.uk>
1441
1442         * gfortran.texi: Use @table @emph instead of @itemize @emph.
1443         Remove "set DEVELOPMENT".
1444         (Compiling GFORTRAN): Remove.
1445
1446 2004-05-09  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
1447
1448         * array.c (match_subscript, match_array_ref): Add comments
1449         explaining argument 'init'.
1450         * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
1451         trans-expr.c, trans.c: Fix some typos in comments.
1452         * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
1453         * primary.c (match_digits, match_integer_constant): Add comment
1454         explaining signflag.
1455
1456 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1457
1458         PR fortran/13940
1459         * primary.c: Include system.h and flags.h, needed for pedantic.
1460         (match_boz_constant): Allow "x" for hexadecimal constants, warn if
1461         pedantic is set.
1462
1463 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1464
1465         PR fortran/13940
1466         * match.c (match_data_constant): Handle case where
1467         gfc_find_symbol sets sym to NULL
1468
1469 2004-04-28  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1470
1471         * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
1472         dependency on mathbuiltins.def
1473
1474 2004-04-24  Victor Leikehman  <lei@il.ibm.com>
1475
1476         * trans-io.c (transfer_expr): Implemented recursive printing
1477         of derived types.
1478
1479 2004-04-24  Andrew Pinski  <pinskia@physics.uc.edu>
1480
1481         * gfortranspec.c: Do not include multilib.h.
1482
1483 2004-04-24  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
1484
1485         * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
1486         2004 to copyright years.
1487         * trans-expr.c, trans-decl.c: Comment update, we now generate
1488         GENERIC, not SIMPLE. Add 2004 to copyright years.
1489
1490 2004-04-24  Paul Brook  <paul@codesourcery.com>
1491
1492         * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
1493
1494 2004-04-24  Feng Wang  <fengwang@nudt.edu.cn>
1495
1496         PR 14817
1497         * arith.c (gfc_arith_divide): Fix complex divide.
1498
1499 2004-04-23  Andrew Pinski  <pinskia@physics.uc.edu>
1500
1501         * gfortranspec.c: Include the target headers.
1502
1503 2004-04-18  Feng Wang  <fengwang@nudt.edu.cn>
1504
1505         PR fortran/14921
1506         PR fortran/14540
1507         * arith.c (arctangent2): New function.
1508         * arith.h (arctangent2): Add function prototype.
1509         * simplify.c (gfc_simplify_atan2): Use it.
1510         (gfc_simplify_log): Use it.
1511
1512 2004-04-12  Diego Novillo  <dnovillo@redhat.com>
1513
1514         * fortran/f95-lang.c (gfc_expand_stmt): Remove.
1515         (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
1516
1517 2004-04-11  Bud Davis  <bdavis9659@comcast.net>
1518
1519         PR fortran/14872
1520         * trans-io.c (build_dt): Change REC to value.
1521
1522 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
1523
1524         PR 14394
1525         * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
1526         the real value when converting mpf to string.
1527
1528 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
1529
1530         PR 14395
1531         * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
1532         the result.
1533
1534 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
1535
1536         PR fortran/14377
1537         * simplify.c (simplify_min_max): Convert the type of the result.
1538
1539 2004-04-11  Paul Brook  <paul@codesourcery.com>
1540
1541         * gfortran.texi: Use full target triplet.
1542
1543 2004-04-11  Paul Brook  <paul@codesourcery.com>
1544
1545         * Make-lang.in (GFORTRAN_TEXI): Set it.
1546         (fortran/dfortran.dvi): Use it.  Add fortran to include paths.
1547         (fortran/gfortran.info): Ditto.
1548         * gfortran.texi: Major update.
1549         * invoke.texi: New file.
1550
1551 2004-04-10  Paul Brook  <paul@codesourcery.com>
1552
1553         * trans-array.c (gfc_trans_allocate_temp_array,
1554         gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
1555         * trans-decl.c (gfc_build_dummy_array_decl,
1556         gfc_get_symbol_decl, gfc_build_function_decl,
1557         gfc_create_module_variable): Ditto.
1558         * trans-expr.c (gfc_conv_variable): Ditto.
1559         * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
1560         * trans.h (GFC_DECL_STRING): Remove.
1561         (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
1562         GFC_DECL_ASSIGN): Renumber flags.
1563
1564 2004-04-05  Paul Brook  <paul@codesourcery.com>
1565
1566         PR 13252
1567         PR 14081
1568         * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
1569         and stack_restore.
1570         * gfortran.h (struct gfc_charlen): Add backend_decl.
1571         * trans-array.c (gfc_trans_allocate_temp_array,
1572         gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
1573         (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
1574         Remove old, broken string handling.
1575         (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1576         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1577         gfc_trans_deferred_array): Handle character arrays.
1578         * trans-const.c (gfc_conv_const_charlen): New function.
1579         * trans-const.h (gfc_conv_const_charlen): Add prototype.
1580         * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
1581         as static.
1582         (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
1583         (gfc_create_string_length): New function.
1584         (gfc_get_symbol_decl): Create lengths for character variables.
1585         (gfc_get_fake_result_decl): Ditto.
1586         (gfc_build_function_decl): Only set length for assumed length
1587         character arguments.
1588         (gfc_trans_dummy_character): New function.
1589         (gfc_trans_auto_character_variable): Rewrite.
1590         (gfc_trans_deferred_vars): Handle more types of character variable.
1591         (gfc_create_module_variable): String lengths have moved.
1592         (gfc_generate_function_code): Initialize deferred var chain earlier.
1593         * trans-expr.c (gfc_conv_init_string_length): Rename ...
1594         (gfc_trans_init_string_length):  ... to this.
1595         (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
1596         gfc_conv_function_call): Update to new format for character variables.
1597         (gfc_conv_string_length): Remove.
1598         (gfc_conv_string_parameter): Update assertion.
1599         * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
1600         * trans-io.c (set_string): Use new macro names.
1601         * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
1602         * trans-types.c (gfc_get_character_type): Use existing length expr.
1603         (gfc_is_nodesc_array): Make public.
1604         (gfc_get_dtype_cst): Rename ...
1605         (gfc_get_dtype): ... to this.  Handle unknown size arrays.
1606         (gfc_get_nodesc_array_type): Use new name.
1607         (gfc_sym_type): New character variable code.
1608         (gfc_get_derived_type): Ditto.
1609         (gfc_get_function_type): Evaluate character variable lengths.
1610         * trans-types.h (gfc_strlen_kind): Define.
1611         (gfc_is_nodesc_array): Add prototype.
1612         * trans.h: Update prototypes.
1613         (struct lang_type): Update comments.
1614         (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
1615         (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
1616
1617 2004-04-04  Paul Brook  <paul@codesourcery.com>
1618
1619         * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
1620         * options.c (gfc_init.options, gfc_handle_option): Ditto.
1621         * trans-expr.c (gfc_conv_function_call): Ditto.
1622         * trans-types.c (gfc_is_nodesc_array): Ditto
1623         * lang.opt (fg77-calls): Remove.
1624
1625 2004-04-04  Paul Brook  <paul@codesourcery.com>
1626
1627         * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
1628         (gfc_conv_descriptor_base): Rename ...
1629         (gfc_conv_descriptor_offset): ... to this.
1630         (gfc_trans_allocate_array_storage): Set offset to zero.
1631         (gfc_conv_array_base): Rename ...
1632         (gfc_conv_array_offset): ... to this.
1633         (gfc_conv_array_index_ref): Add offset parameter.
1634         (gfc_conv_array_ref): Include offset.
1635         (gfc_trans_preloop_setup): Use existing offset.
1636         (gfc_trans_allocate_temp_array,  gfc_array_allocate,
1637         gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1638         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1639         gfc_conf_ss_descriptor): Set offset.
1640         * trans-array.h: Rename prototypes.
1641         * trans-const.h (gfc_index_zero_node): Define.
1642         * trans-decl.c (gfc_build_qualified_array): Change base to offset.
1643         * trans-types.c (gfc_get_array_type_bounds): Ditto.
1644         (gfc_get_nodesc_array_type): Calculate offset before upper bound.
1645
1646 2004-03-25  Diego Novillo  <dnovillo@redhat.com>
1647
1648         * convert.c (convert): Don't handle WITH_RECORD_EXPR.
1649
1650 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
1651
1652         PR 14055
1653         * arith.c (gfc_convert_integer,gfc_convert_real):  Removed leading '+'
1654         before conversion by gmp library call.
1655
1656 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
1657
1658         PR 12921
1659         * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
1660
1661 2004-02-24  Richard Henderson  <rth@redhat.com>
1662
1663         * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
1664
1665 2004-02-19  Loren J. Rittle  <ljrittle@acm.org>
1666
1667         * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
1668         (fortran/gfortran.info): ... to here.
1669         (f95.srcinfo): New.
1670
1671 2004-02-16  Richard Henderson  <rth@redhat.com>
1672
1673         * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
1674         * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
1675         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
1676         (gfc_expand_function): Rename from expand_function_body, make static,
1677         don't do anything except invoke tree_rest_of_compilation.
1678         (gfc_be_parse_file): Invoke cgraph.
1679         (gfc_expand_decl): Remove.
1680         (gfc_init_builtin_functions): Add __builtin_init_trampoline and
1681         __builtin_adjust_trampoline.
1682         * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
1683         (gfc_finalize): New.
1684         (gfc_generate_function_code): Use it.  Lower nested functions.
1685         * trans-expr.c (gfc_conv_function_call): Add static chain operand
1686         to call_expr.
1687         * trans.c (gfc_build_function_call): Likewise.
1688         * trans.h (expand_function_body): Remove.
1689
1690 2004-02-15  Victor Leikehman  <lei@il.ibm.com>
1691
1692         PR gfortran/13433
1693         * trans-decl.c (gfc_build_function_decl) For functions
1694         returning CHARACTER pass an extra length argument,
1695         following g77 calling conventions.
1696         * trans-types.c (gfc_get_function_type) Ditto.
1697         * trans-expr.c (gfc_conv_function_call) Ditto.
1698
1699 2004-02-14  Paul Brook  <paul@codesourcery.com>
1700
1701         * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
1702
1703 2004-02-12  Paul Brook  <paul@nowt.org>
1704
1705         * BUGS: Remove.
1706
1707 2004-02-08  Steve Kargl  <sgk@troutmask.apl.washington.edu>
1708
1709         * gfortran.texi: Fix typos.
1710
1711 2004-02-07  Bud Davis  <bdavis9659@comcast.net>
1712
1713         PR gfortran/13909
1714         * intrinsic.c (add_conversions) Use logical conversion instead
1715         of real.
1716         * trans-types.c (gfc_get_logical_type) implemented logical*1
1717         and logical*2.
1718
1719 2004-01-17  Paul Brook  <paul@codesourcery.com>
1720
1721         * lang-specs.h: Remove %<fixed-form.
1722
1723 2004-01-15  Toon Moene  <toon@moene.indiv.nluug.nl>
1724
1725         * lang-specs.h: Enable preprocessing of source files
1726         ending in .F, .fpp, .FPP, .F90 and .F95.
1727
1728 2004-01-13  Toon Moene  <toon@moene.indiv.nluug.nl>
1729
1730         PR fortran/12912
1731         * lang-specs.h: Enable compilation of files ending
1732         in .f, .for and .FOR.
1733
1734 2004-01-11  Paul Brook  <paul@codesourcery.com>
1735
1736         * trans-stmt.c (gfc_trans_if_1): New function.
1737         (gfc_trans_if): Use it.
1738
1739 2004-01-11  Erik Schnetter  <schnetter@uni-tuebingen.de>
1740
1741         * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
1742         (gfc_option_t): Add max_identifier_length.
1743         * lang.opt: Add fmax-identifier-length.
1744         * match.c (parse_name): Use limit.
1745         * options.c (gfc_init_options): Set max_identifier_length.
1746         (gfc_handle_option): Ditto.
1747
1748 2004-01-11  Feng Wang  <fengwang@nudt.edu.cn>
1749
1750         * intrinsic.c (add_functions): Add resolve function to dcmplx.
1751         * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
1752         * iresolve.c (gfc_resolve_dcmplx): New function.
1753
1754 2004-01-10  Paul Brook  <paul@codesourcery.com>
1755
1756         * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
1757         * trans-types.c (gfc_sym_type): Handle external dummy procedures.
1758         (gfc_return_by_reference): Correct condition.
1759         (gfc_get_function_type): Ditto.
1760
1761 2004-01-10  Paul Brook  <paul@codesourcery.com>
1762
1763         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
1764         types.
1765
1766 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
1767
1768         * iresolve.c: Use correct kind.
1769
1770 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
1771
1772         PR fortran/13467
1773         * trans-decl.c (gfc_create_module_variable):  Output array valued
1774         parameters.
1775
1776 2004-01-10  Paul Brook  <paul@codesourcery.com>
1777
1778         * resolve.c (resolve_branch): Get error message right way round.
1779
1780 2004-01-10  Canqun Yang <canqun@nudt.edu.cn>
1781
1782         * trans-array (gfc_conv_loop_setup): Adjust comment to track
1783         reality.
1784         (gfc_array_allocate): Don't count size of element twice.
1785
1786 2004-01-04  Paul Brook  <paul@codesourcery.com>
1787
1788         * lang.opt (i8, r8, std=*): Remove RejectNegative.
1789
1790 2004-01-04  Paul Brook  <paul@codesourcery.com>
1791
1792         * error.c (gfc_notify_std): New function.
1793         * gfortran.h (gfc_notify_std): Declare.
1794         (GFC_STD_*): Define.
1795         (gfc_option_t): Add warn_std and allow_std.
1796         * intrinsic.c (gfc_init_expr_extensions): Fix logic.
1797         (gfc_intrinsic_func_interface): Use gfc_notify_std.
1798         * check.c (check_rest): Use gfc_notify_std.
1799         * match.c (gfc_match_pause): Ditto.
1800         (gfc_match_assign): Ditto.
1801         (gfc_match_goto): Ditto.
1802         * resolve.c (resolve_branch): Ditto.
1803         * lang.opt: Add std=<foo> and w.
1804         * options.c (gfc_init_options): Set allow_std and warn_std.
1805         (gfc_handle_option): Handle OPT_std_* and OPT_w.
1806
1807 2004-01-01  Paul Brook  <paul@codesourcery.com>
1808
1809         * array.c (gfc_append_constructor): Take constructor, not expression.
1810         * data.c (struct gfc_expr_stack): Remove.
1811         (expr_stack): Remove.
1812         (find_con_by_offset): Rename from find_expr_in_con.
1813         (find_con_by_component): Rename from find_component_in_con.
1814         (gfc_get_expr_stack): Remove.
1815         (gfc_assign_data_value): Rewrite.
1816         (gfc_expr_push): Remove.
1817         (gfc_expr_pop): Remove.
1818         (gfc_advance_section): Rename from
1819         gfc_modify_index_and_calculate_offset.  Handle unbounded sections.
1820         (gfc_get_section_index): Handle unbounded sections.
1821         * gfortran.h: Update prototypes.
1822         * resolve.c (check_data_variable): Array section maight not be the
1823         last ref.
1824
1825 2004-01-01  Paul Brook  <paul@codesourcery.com>
1826
1827         PR fortran/13432
1828         * resolve.c (resolve_symbol): Allow assumed length function results.
1829
1830 2004-01-01  Steve Kargl  <sgk@troutmask.apl.washington.edu>
1831
1832         * match.c (gfc_match_pause): Fix spelling.
1833
1834 2004-01-01  Steven Bosscher  <stevenb@suse.de>
1835
1836         PR fortran/13251
1837         * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
1838         reference from the expression.
1839
1840 2003-12-26  Feng Wang  <fengwang@nudt.edu.cn>
1841
1842         * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
1843         dumping.
1844         * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
1845         (gfc_exec_op): New EXEC_LABEL_ASSIGN.
1846         (symbol_attribute):New variable attribute: assign.
1847         * io.c (resolve_tag):Integer variable is allowed.
1848         (match_dt_format): Add ASSIGN statement. Set assign flag.
1849         * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
1850         (gfc_match_assign): Add ASSIGN statement. Set assign flag.
1851         (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
1852         * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
1853         (next_statement): Add ST_LABEL_ASSIGNMENT.
1854         (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
1855         * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
1856         (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
1857         * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
1858         * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
1859         assign.  Put them into the stuct lang_decl.
1860         * trans-io.c (set_string): Add the assign statement.
1861         * trans-stmt.c (gfc_trans_label_assign): New function.
1862         (gfc_trans_goto): Translate ASSIGNED GOTO statement.
1863         * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
1864         * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
1865         * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
1866         (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
1867         (GFC_DECL_ASSIGN(node)): New macro to access flag.
1868
1869 2003-12-31  Huang Chun <chunhuang73@hotmail.com>
1870
1871         PR fortran/13434
1872         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
1873         minval/maxval.
1874
1875 2003-12-22  Toon Moene  <toon@moene.indiv.nluug.nl>
1876
1877         * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
1878         that arguments to subroutines/functions can't alias themselves, nor global
1879         memory.
1880
1881 2003-12-20  Steven Bosscher  <stevenb@suse.de>
1882
1883         * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
1884         * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
1885
1886 2003-12-12  Huang Chun <chunhuang73@hotmail.com>
1887
1888         * primary.c (match_substring): Fix substring bug for start point
1889         or end point is NULL.
1890         * trans-expr.c (gfc_conv_substring): Ditto
1891         * trans-types.c (gfc_sym_type): Get correct type of scalar
1892         character variables.
1893         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
1894         derived type.
1895
1896 2003-12-10  Richard Henderson  <rth@redhat.com>
1897
1898         * options.c (gfc_post_options): Don't ever use rtl inlining.
1899
1900 2003-12-05  Canqun Yang  <canqun@nudt.edu.cn>
1901
1902         * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
1903         * trans-equivalence.c: Remove.
1904         * trans-decl.c (gfc_get_symbol_decl): Update to match.
1905         (gfc_generate_function_code): Ditto.
1906         * trans-array.c (gfc_conv_array_parameter): Ditto.
1907         * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
1908         (F95_ADDITIONAL_OBJS): Add stor-layout.o
1909         * trans.h (gfc_trans_equivalence): Remove.
1910         * gfortran.h (struct gfc_equiv): Add used field.
1911         (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
1912         equiv_offset fields.
1913
1914 2003-12-05  Richard Henderson  <rth@redhat.com>
1915
1916         * trans.c (gfc_build_addr_expr): New.
1917         (gfc_build_indirect_ref, gfc_build_array_ref): New.
1918         * trans.h: Declare them.
1919         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1920         trans-stmt.c, trans.c (*): Use them.
1921
1922         * f95-lang.c (gfc_post_options): Remove dead prototype.
1923         * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
1924         * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
1925         allocation size.
1926
1927 2003-12-01  Feng Wang  <fengwang@nudt.edu.cn>
1928
1929         * io.c (gfc_match_format): Check for missing format label.
1930
1931 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
1932
1933         PR fortran/13155
1934         * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
1935         from interfaces in modules.
1936
1937 2003-11-30  Paul Brook  <paul@nowt.org>
1938
1939         * trans-array.c (gfc_trans_g77_array): Make non-static.
1940         (gfc_trans_assumed_size): Remove.
1941         (gfc_trans_dummy_array_bias): Explicitly free temporary.
1942         * trans-array.h (gfc_trans_g77_array): Add prototype.
1943         (gfc_trans_assumed_size): Remove.
1944         * trans-decls.c (gfor_fndecl_push_context): Remove.
1945         (gfor_fndecl_pop_context): Remove.
1946         (gfc_build_function)decls): Don't create them.
1947         (gfc_trans_deferred_vars): Update to match. Remove dead code.
1948         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
1949
1950 2003-11-30  Kejia Zhao  <kejia_zh@nudt.edu.cn>
1951
1952         * trans-array.c (gfc_conv_array_parameter): Simplify
1953         array argument passing for array name actual argument.
1954         * trans-expr.c (gfc_conv_function_call): Ditto
1955         * trans-types.c (gfc_is_nodesc_array):Ditto.
1956
1957 2003-11-30  Paul Brook  <paul@nowt.org>
1958
1959         * f95-lang.c (gfc_post_options): Move ...
1960         * options.c (gfc_post_options): .. to here.  Handle inlining options.
1961         * gfortran.h (gfc_post_options): Add prototype.
1962
1963 2003-11-28  Richard Henderson  <rth@redhat.com>
1964
1965         * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
1966
1967 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
1968
1969         * trans.h (has_alternate_specifier): New global variable.
1970         * match.c (gfc_match_call): Handle actual arguments associated with
1971         alternate return indicators.
1972         * trans-expr.c (gfc_conv_function_call): Ditto
1973         * trans-stmt.c (gfc_trans_call): Ditto
1974         (gfc_trans_return): Handle return statement with value.
1975         * trans-decl.c (gfc_generate_function_code): Handle functions with
1976         asterisk dummy.
1977         (gfc_get_fake_result_decl): Ditto
1978         * trans-types.c (gfc_get_function_type): Ditto
1979         * resolve.c (resolve_actual_arglist): Check alternate return indicators.
1980         (resolve_formal_arglist): Check asterisk dummy.
1981
1982 2003-11-27  Paul Brook  <paul@nowt.org>
1983
1984         * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
1985         allocation interface.
1986         (gfc_conv_ array_parameter): Ditto.
1987         (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
1988         * trans-array.c: Update prototype.
1989         * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
1990         (gfc_trans_auto_character_variable): Use new memory alloc interface.
1991         * trans-expr.c (gfc_conv_string_tmp): Ditto.
1992         (gfc_conv_function_call): Use gfc_conv_string_tmp.
1993         * trans-stmt.c (gfc_do_allocate):  Use new memory alloc interface.
1994         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
1995         * trans.h (gfc_ss_info): Remove unused pdata field.
1996         * trans.c (gfc_create_var_np): Change T to V.
1997
1998 2003-11-26  Richard Henderson  <rth@redhat.com>
1999
2000         * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
2001         * trans-intrinsic.c (gfc_intrinsic_map): ... here.  Add SCALE,
2002         FRACTION, NEAREST, SET_EXPONENT.
2003         (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
2004         Fix GTY marking.  Remove unnecessary const's.
2005         (LIBM_FUNCTION): Rename from I_LIB.
2006         (LIBF_FUNCTION): New.
2007         (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
2008         conventions.  Assume the expr signature is correct.  Mark const.
2009         (gfc_conv_intrinsic_exponent): Use library functions.
2010         (gfc_conv_intrinsic_set_exponent): Remove.
2011         (gfc_conv_intrinsic_scale): Remove.
2012         (gfc_conv_intrinsic_nearest): Remove.
2013         (gfc_conv_intrinsic_fraction): Remove.
2014         (gfc_conv_intrinsic_function): Update.
2015         * trans-decl.c (gfor_fndecl_math_exponent4): New.
2016         (gfor_fndecl_math_exponent8): New.
2017         (gfc_build_intrinsic_function_decls): Set them.
2018         * trans.h: Declare them.
2019
2020 2003-11-25  Canqun Yang  <canqun@nudt.edu.cn>
2021
2022         * trans-common.c (gfc_layout_global_equiv): Locate the error for
2023         underflow COMMON block.
2024         (gfc_trans_one_common): Fix bug for size of COMMON block containing
2025         EQUIVALENCE object. Also fix typo in an error message.
2026
2027 2003-11-25  Diego Novillo  <dnovillo@redhat.com>
2028
2029         * Make-lang.in: Add check-gfortran to lang_checks.
2030         (check-f95): Alias for check-gfortran.
2031
2032 2003-11-25  Jason Merrill  <jason@redhat.com>
2033
2034         * Make-lang.in (f95.tags): Create TAGS.sub files in each
2035         directory and TAGS files that include them for each front end.
2036
2037 2003-11-24  Paul Brook  <paul@nowt.org>
2038
2039         PR fortran/13154
2040         * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
2041
2042 2003-11-24  Paul Brook  <paul@nowt.org>
2043
2044         * expr.c (simplify_const_ref): Return SUCCESS for things we don't
2045         handle.
2046         * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
2047
2048 2003-11-24  Paul Brook  <paul@nowt.org>
2049
2050         PR fortran/13105
2051         * array.c (gfc_array_ref_shape): Handle elemental dimensions.
2052         * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
2053
2054 2003-11-20  Richard Henderson  <rth@redhat.com>
2055
2056         * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
2057         (gfc_conv_array_base): Likewise.
2058         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
2059         * trans-expr.c (gfc_conv_string_tmp): Likewise.
2060         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
2061         * trans-stmt.c (gfc_trans_character_select): Likewise.
2062
2063 2003-11-13  Paul Brook  <paul@nowt.org>
2064
2065         * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
2066
2067 2003-11-13  Canqun Yang  <canqun@nudt.edu.cn>
2068
2069         * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
2070         (resolve_equivalence): New function.
2071         (resolve_equivalence_derived): New function.
2072
2073 2003-11-12  Richard Henderson  <rth@redhat.com>
2074
2075         * trans.c (gfc_trans_code): Use annotate_with_locus instead of
2076         annotate_all_with_locus.
2077
2078 2003-11-11  Canqun Yang  <canqun@nudt.edu.cn>
2079
2080         * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
2081         * trans-decl.c (gfc_finish_var_decl): Modified.
2082
2083 2003-11-08  Paul Brook  <paul@nowt.org>
2084
2085         PR fortran/12704
2086         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
2087         arrays.
2088
2089 2003-11-06  Paul Brook  <paul@nowt.org>
2090
2091         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
2092
2093 2003-11-02  Canqun Yang  <canqun@nudt.edu.cn>
2094
2095         * match.c (gfc_match_stopcode): Assign '0' to stop_code.
2096
2097 2003-10-27  Anthony Green  <green@redhat.com>
2098
2099         * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
2100         (f95.stagefeedback): Ditto.
2101
2102 2003-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
2103
2104         PR fortran/12682
2105         * Make-lang.in (f95.stageprofile): Add.
2106         (f95.stagefeedback): Add.
2107
2108 2003-10-23  Richard Henderson  <rth@redhat.com>
2109
2110         * f96-lang.c (gfc_gimplify_expr): Remove.
2111         (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
2112         (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
2113
2114 2003-10-23  Richard Henderson  <rth@redhat.com>
2115
2116         * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
2117
2118 2003-10-20  Paul Brook  <paul@nowt.org>
2119
2120         * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
2121         * trans-stmt.c (gfc_trans_do_while): Ditto.
2122
2123 2003-10-17  Paul Brook  <paul@nowt.org>
2124
2125         * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
2126
2127 2003-10-17  Paul Brook  <paul@nowt.org>
2128
2129         * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
2130
2131 2003-10-17  Feng Wang  <wf_cs@yahoo.com>
2132
2133         * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
2134         (gfc_resolve_minloc): Ditto.
2135         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
2136         Return the value after subtracting the lower bound.
2137
2138 2003-10-16  Richard Henderson  <rth@redhat.com>
2139
2140         * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
2141
2142 2003-10-16  Steven Bosscher  <steven@gcc.gnu.org>
2143
2144         * lang.c: Remove -M option for now, it's in the way for C.
2145
2146 2003-10-14  Jason Merrill  <jason@redhat.com>
2147
2148         * Make-lang.in (f95.tags): New rule.
2149
2150 2003-10-13  Richard Henderson  <rth@redhat.com>
2151
2152         * trans.c (gfc_trans_code): Use annotate_all_with_locus.
2153
2154 2003-10-13  Paul Brook  <paul@nowt.org>
2155
2156         * trans-decl.c (generate_local_decl): Don't create junk variables.
2157
2158 2003-10-13  Paul Brook  <paul@nowt.org>
2159
2160         * resolve.c (resolve_formal_arglist): Use function result decl in
2161         preference to function decl.
2162
2163 2003-10-12  Richard Henderson  <rth@redhat.com>
2164
2165         * f95-lang.c (gfc_define_builtin): New const_p argument.  Set
2166         TREE_READONLY.  Update all callers.
2167
2168 2003-10-12  Feng Wang  <wf_cs@yahoo.com>
2169
2170         * iresolve.c (gfc_resolve_cshift): Change to match implementation.
2171         * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
2172         (gfc_is_intrinsic_libcall): Add CSHIFT.
2173
2174 2003-10-12  Richard Henderson  <rth@redhat.com>
2175
2176         * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
2177         (gfc_trans_array_constructor_value): Likewise.
2178         (gfc_conv_array_initializer): Likewise.
2179         * trans-stmt.c (gfc_trans_character_select): Likewise.
2180
2181 2003-11-12  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2182
2183         * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
2184
2185 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
2186
2187         * check.c (gfc_check_repeat): Check arguments are scalar.
2188         (gfc_check_trim): New function.
2189         * intrinsic.h (gfc_check_trim): Add prototype.
2190         * intrinsic.c (add_functions): Use it.
2191         * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
2192         Decalare.
2193         * trans-decl.c: Ditto.
2194         (gfc_build_intrinsic_fucntion_decls): Set them.
2195         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
2196         (gfc_conv_intrinsic_trim): New function.
2197         (gfc_conv_intrinsic_repeat): New function.
2198         (gfc_conv_intrinsic_function): Use them.
2199
2200 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
2201
2202         * trans-types.c (gfc_sym_type): Handle result variables.
2203
2204 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
2205
2206         * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
2207         gfc_get_character_type.
2208
2209 2003-10-11  Feng Wang  <wf_cs@yahoo.com>
2210
2211         * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
2212
2213 2003-10-11  Paul Brook  <paul@nowt.org>
2214
2215         * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
2216         (gfc_resolve_dprod): New function.
2217         (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
2218         * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
2219         (gfc_resolve_dprod): Declare.
2220         * intrinsic.c (add_functions): Use them.
2221         * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
2222
2223 2003-10-06  Richard Henderson  <rth@redhat.com>
2224
2225         * f95-lang.c (gfc_init_builtin_functions): Add clzll.
2226         * trans-intrinsic.c (call_builtin_clz): Use it.
2227
2228 2003-10-05  Paul Brook  <paul@nowt.org>
2229
2230         * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
2231         * trans-decl.c (gfc_generate_function_code): Set
2232         cfun->function_end_locus.
2233
2234 2003-09-24  Jason Merrill  <jason@redhat.com>
2235
2236         * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
2237         TREE_LOCUS.
2238
2239 2003-09-21  Lifang Zeng  <zlf605@hotmail.com>
2240         Paul Brook  <paul@nowt.org>
2241
2242         * Make-lang.in (F95_OBJS): Add fortran/data.o.
2243         * array.c (gfc_inser_constructor): New function.
2244         (gfc_get_constructor): New function.
2245         (gfc_free_constructor): Initialize offset and repeat.
2246         (iterator_stack): Remove.
2247         (expand_info): Add offset, component and repeat fields.
2248         (expand_constructor): Set them.
2249         (expand): Set new fields.
2250         (gfc_copy_constructor): Ditto. Avoid recursion.
2251         * gfortran.h: Add prototypes for new functions.
2252         (gfc_constructor): Add offset, component and repeat.
2253         (iteratio_stack): Move to here.
2254         * resolve.c (check_data_variable): Convert data values into variable
2255         initializers.
2256         (traverse_data_list): Build implicit loop chain.
2257         (gfc_resolve): Ditto.
2258         * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
2259         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
2260         * trans-expr.c (gfc_conv_structure): Handle array initializers.
2261         (gfc_conv_expr): Update to match.
2262         * trans.h (gfc_conv_structure): Declare.
2263         * data.c: New file.
2264
2265 2003-09-20  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2266
2267         * trans.h: Add declarations for gfor_fndecl_si_kind and
2268         gfor_fndecl_sr_kind.
2269         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2270         * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
2271         (g95_conv_intrinsic_sr_kind): New function.
2272         (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
2273         SELECTED_REAL_KIND.
2274
2275 2003-09-17  Lars Segerlund  <Lars.Segerlund@comsys.se>
2276
2277         * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
2278         instead of _4 and _8 as postfix for libgfortran calls.
2279
2280 2003-09-16  Paul Brook  <paul@nowt.org>
2281
2282         * array.c (compare_bounds): New function.
2283         (gfc_compare_array_spec): Use it.
2284
2285 2003-09-14  Paul Brook  <paul@nowt.org>
2286
2287         * primary.c (gfc_match_rvalue): Make sure sym->result is set.
2288         * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
2289
2290 2003-09-14  Paul Brook  <paul@nowt.org>
2291
2292         * check.c (dim_rank_check): Allow assumed bounds if requested.
2293         (gfc_check_lbound): Call it.
2294         (gfc_check_ubound): Ditto.
2295         (gfc_check_size): Change to match.
2296         * simplify.c (gfc_simplify_bound): New function.
2297         (gfc_simplify_lbound): New function.
2298         (gfc_simplify_ubound): New function.
2299         * intrinsic.h: Declare them.
2300         * intrinsic.c (add_functions): Use them.
2301
2302 2003-09-14  Paul Brook  <paul@nowt.org>
2303
2304         * io.c (format_lex): Initialize negative_flag.
2305         (check_format): Intialize repeat.
2306         * trans-io.c (gfc_new_nml_name_expr): Declare static.
2307         (gfc_new_var_expr): Ditto.
2308
2309 2003-09-14  Paul Brook  <paul@nowt.org>
2310
2311         * trans-array.c (gfc_conv_array_initializer): Handle derived types.
2312         * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
2313
2314 2003-09-12  Paul Brook  <paul@nowt.org>
2315
2316         * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
2317
2318 2003-09-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
2319
2320         * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
2321         for a correct expression.
2322
2323 2003-09-10  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2324
2325         * trans-intrinsic.c (real_compnt_info): New struct.
2326         (prepare_arg_info): New function.
2327         (gfc_conv_intrinsic_set_exponent): New function.
2328         (gfc_conv_intrinsic_scale): New function.
2329         (gfc_conv_intrinsic_nearest): New function.
2330         (gfc_conv_intrinsic_fraction): New function.
2331         (gfc_conv_intrinsic_exponent): New function.
2332         (gfc_conv_intrinsic_spacing): New function.
2333         (gfc_conv_intrinsic_rrspacing): New function.
2334         (gfc_conv_intrinsic_function): Use them.
2335
2336 2003-08-24 XiaoQiang Zhang  (zhangapache@yahoo.com>
2337
2338         * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
2339         build_int_2 changed from (high, low) to (low, high).
2340         * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
2341         ioparm_namelist_read_mode, iocall_set_nml_val_int,
2342         iocall_set_nml_val_float, iocall_set_nml_val_char,
2343         iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
2344         (gfc_build_io_library_fndecls): Add variable initialization.
2345         (gfc_new_nml_name_expr, get_new_var_expr): New function.
2346         (build_dt): Add namelist support.
2347         * io.c (value): New variable.
2348         (check_format): Support FMT_H now.
2349
2350 2003-09-07  Paul Brook  <paul@nowt.org>
2351
2352         * io.c (gfc_resolve_dt): Error if format label is not defined.
2353
2354 2003-09-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2355
2356         * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
2357         about case_switch's break. The other is about building the condition
2358         statement tree, which judges the argument in the range of the
2359         corresponding integer type.
2360         * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
2361         for the large values.
2362
2363 2003-09-05  Paul Brook  <paul@nowt.org>
2364
2365         * f95-lang.c (expand_function_body): Gimplify the function.
2366
2367 2003-09-04  Jeff Law  <law@redhat.com>
2368
2369         * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
2370         index zero!
2371
2372 2003-09-04  Paul Brook  <paul@nowt.org>
2373
2374         * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
2375         (gfc_expand_stmt): New function.
2376         (LANG_HOOKS_RTL_EXPAND_STMT): Define.
2377         (expand_function_body): Use tree_rest_of_compilation.
2378         * trans-decl.c (gfc_generate_function_code): Don't free cfun.
2379
2380 2003-09-03  Jeff Law  <law@redhat.com>
2381
2382         * f95-lang.c (gfc_init_builtin_functions): C arrays start at
2383         index zero!
2384
2385 2003-08-30  Paul Brook  <paul@nowt.org>
2386
2387         * f95-lang.c (builtin_function): Remove #if 0 code.
2388         (gfc_define_builtin): New function.
2389         (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
2390         * mathbuiltins.def: New file.
2391         * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
2392         (gfc_intrinsic_map): Use mathbuiltins.def.
2393         (gfc_intrinsic_builtin_t): Remove.
2394         (gfc_build_intrinsic_lib_fndecls): Update.
2395         * trans-types.c (gfc_init_types): Remove redundant initilaization of
2396         signed_size_type_node.
2397
2398 2003-08-29  Paul Brook  <paul@nowt.org>
2399
2400         * arith.c (gfc_real_kinds): Use correct minimum exponents.
2401
2402 2003-08-22  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2403
2404         * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
2405         (gfc_conv_intrinsic_function): Add MODULO.
2406
2407 2003-08-22  Jason Merrill  <jason@redhat.com>
2408
2409         * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
2410
2411 2003-08-22  Andreas Jaeger  <aj@suse.de>
2412
2413         * Make-lang.in (f95.install-common): Add DESTDIR support.
2414         * (f95.install-info): Likewise.
2415         (f95.uninstall): Likewise.
2416
2417 2003-08-19  Diego Novillo  <dnovillo@redhat.com>
2418
2419         * trans-types.c (gfc_init_types): Initialize
2420         signed_size_type_node with size_type_node.
2421
2422 2003-08-18  Paul Brook  <paul@nowt.org>
2423
2424         * dependency.c (gfc_dependency): New enum.
2425         (check_another_array_ref): Remove.
2426         (gfc_get_array_from_component): Remove.
2427         (get_x): Remove.
2428         (get_range): Remove.
2429         (get_no_of_elements): Use mpz_t, not mpf_t.
2430         (transform_sections): New function.
2431         (gfc_check_range_range): Rename ...
2432         (gfc_check_section_vs_section): ... to this.  Use new function.
2433         (gfc_is_inside_range): Rewrite to match.
2434         (gfc_check_element_vs_section): Ditto.
2435         (gfc_check_element_vs_element): Ditto.
2436         (get_deps): Ditto.
2437         (gfc_dep_resolver): Ditto.  Remove unused parameter.
2438         * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
2439         gfc_check_element_vs_element, gfc_is_inside_range,
2440         gfc_get_array_from_component): Remove prototypes for static functions.
2441         (gfc_dep_resolver): Update prototype.
2442         * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
2443
2444 2003-08-15  Paul Brook  <paul@nowt.org>
2445
2446         * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
2447         return values to parent scope.
2448         (gfc_build_dummy_array_decl): Ditto.
2449
2450 2003-08-14  Paul Brook  <paul@nowt.org>
2451
2452         * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
2453         size of the type, not the pointer.
2454         * resolve.c (resolve_symbol): Give more accurate error message.
2455
2456 2003-08-10  Paul Brook  <paul@nowt.org>
2457
2458         * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
2459
2460 2003-08-10  Paul Brook  <paul@nowt.org>
2461
2462         * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
2463         type components.
2464
2465 2003-08-10  Chun Huang  <compiler@sohu.com>
2466
2467         * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
2468         (resolve_symbol): Ditto.
2469         * trans-expr.c (gfc_conv_statement_function): New function.
2470         (gfc_conv_function_expr): Use it.
2471
2472 2003-08-10  Paul Brook  <paul@nowt.org>
2473
2474         * trans-array.c (gfc_conv_ss_startstride): Handle functions.
2475         (walk_function_expr): Set section rank.
2476         * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
2477
2478 2003-08-10  Paul Brook  <paul@nowt.org>
2479
2480         * intrinsic.c (add_sym): Prefix names with correct string.
2481         (add_sym_0s): New function.
2482         (add_subroutines): Register abort.
2483
2484 2003-08-10  Erik Schnetter  <schnetter@uni-tuebingen.de>
2485
2486         * gfortran.h: Introduce options to control the mangling.
2487         * lang.opt: Likewise.
2488         * options.c (gfc_init_options): Handle the options.
2489         * trans-common.c (gfc_sym_mangled_common_id): New function.
2490         (gfc_build_common_decl): Call it.
2491         * trans-decl.c (gfc_sym_mangled_function_id): New function.
2492         (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
2493
2494 2003-08-09  Paul Brook  <paul@nowt.org>
2495
2496         * module.c (mio_symbol): Always ouput a namespace for formal args.
2497         (load_needed): Namespace now belong to their proper symbol.
2498         (gfc_dump_module): Change G95=>GFORTRAN.
2499
2500 2003-08-05  Paul Brook  <paul@nowt.org>
2501
2502         * options.c: Force -fg77-calls.
2503
2504 2003-08-02  Paul Brook  <paul@nowt.org>
2505
2506         * Makelang.in: Rename G95_* to GFORTRAN_*.
2507         * All sources: Rename G95_* to GFC_*.
2508
2509 2003-08-01  Paul Brook  <paul@nowt.org>
2510
2511         * fortran/Make-lang.in: Use GMPLIBS.
2512         * fortran/config-lang.in: Set need_gmp.
2513         * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
2514
2515 2003-07-27  Andreas Jaeger  <aj@suse.de>
2516
2517         * trans-decl.c (gfc_generate_constructors): Convert prototype to
2518         ISO C90.
2519         * trans-const.c (gfc_init_constants): Likewise.
2520         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
2521
2522         * gfortranspec.c: Convert to ISO C90.
2523         (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
2524
2525 2003-07-26  Paul Brook  <paul@nowt.org>
2526
2527         * lang.opt: Add -fdump-parse-tree.
2528         * options.c (gfc_handle_option): Ditto.
2529         * resolve.c (resolve_forall_iterators): Convert to proper type.
2530         * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
2531
2532 2003-07-26  Paul Brook  <paul@nowt.org>
2533
2534         * Makefile.in: Add build dependencies on files common with rest of gcc.
2535
2536 2003-07-26  Lifang Zeng  <zlf605@hotmail.com>
2537
2538         * trans.h: Declare g95_trans_pointer_assignment.
2539         * trans-expr.c (g95_trans_pointer_assignment): New function.
2540         (g95_trans_pointer_assign): Use it.
2541         * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
2542         (g95_trans_pointer_assign_need_temp): New function.
2543
2544 2003-07-26  Paul Brook  <paul@nowt.org>
2545
2546         * gfortran.texi: Replace references to g95.
2547
2548 2003-07-26  Paul Brook  <paul@nowt.org>
2549
2550         Rename g95_* to gfc_*.
2551
2552 2003-07-25  Paul Brook  <paul@nowt.org>
2553
2554         * gfortran.h: Rename from g95.h.
2555         * trans-types.c (boolean_type_node, booelan_true_node,
2556         boolean_false_node): Remove.
2557         * trans-types.h: Ditto.
2558
2559 2003-07-25  Chun Huang  <compiler@sohu.com>
2560
2561         * parse.c (accept_statement): Implement BLOCK DATA statement.
2562         * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
2563         variables.
2564
2565 2003-07-24  Lifang Zeng  <zlf605@hotmail.com>
2566
2567         * trans-stmt.c (temporary_list): Define.
2568         (g95_trans_assign_need_temp): New function.
2569         (g95_trans_forall_1): Modified for WHERE.
2570         (g95_trans_where_assign): Modified.
2571         (g95_trans_where_2): Modified.
2572         (g95_evaluate_where_mask): Modified.
2573         (g95_trans_where): Modified.
2574         (g95_get_temp_expr): Removed.
2575         (g95_add_to_where_stmt_list): Removed.
2576         (compute_overall_iter_number): Modified for WHERE.
2577         * trans.h: Remove where_stmt_list.
2578
2579 2003-07-24  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2580
2581         * lang.opt: Correct description of options -J and -M.
2582
2583 2003-07-23  Steven Bosscher   <steven@gcc.gnu.org>
2584
2585         * lang.opt: Move help text to here.
2586         * lang-options.h: Remove.
2587
2588 2003-07-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2589         * iresolve.c (g95_resolve_transpose): Proper variable in switch.
2590         * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
2591         on kind.
2592
2593 2003-07-22  Steven Bosscher  <steven@gcc.gnu.org>
2594         Paul Brook  <paul@nowt.org>
2595
2596         * check.c (check_rest): Use global pedantic flag.
2597         * io.c (data_desc): Ditto.
2598         * error.c (g95_warning, g95_warning_now): Use global flag.
2599         * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
2600         (expand_function_body): Update to new prototypes.
2601         (g95_init): Use new option names.
2602         * g95.h (g95_option_t): Standardize names.
2603         (g95_init_options, g95_handle_option): Update prototypes.
2604         * interface.c: Use new option names.
2605         * match.c: Ditto.
2606         * module.c: Ditto.
2607         * parse.c: Ditto.
2608         * primary.c: Ditto.
2609         * resolve.c: Ditto.
2610         * scanner.c: Ditto.
2611         * simplify.c: Ditto.
2612         * symbol.c: Ditto.
2613         * trans-array.c: Ditto.
2614         * trans-expr.c: Ditto.
2615         * trans-types.c: Ditto.
2616         * trans-decl.c: Ditto.
2617         (g95_build_library_function_decl): Remove obsolete VPARAMS.
2618         * trans.h: Ditto.
2619         * options.c (g95_display_help): Remove.
2620         (g95_init_options): Convert to new scheme.
2621         (set_Wall): Ditto
2622         (g95module_option): Ditto, rename from g95_parse_arg.
2623         (g95_handle_module_path_options): New function.
2624         * trans-equivalence.c: Fix error message.
2625         * lang.opt: Corrections.
2626
2627 2003-07-21  Steven Bosscher  <steven@gcc.gnu.org>
2628
2629         * lang.opt: New file.
2630
2631 2003-07-21  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2632
2633         * decl.c (match_attr_spec): Set colon_seen.
2634
2635 2003-07-14  Paul Brook  <paul@nowt.org>
2636
2637         * trans-array.c: Update comment.
2638         (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
2639         * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
2640         minmaxloc,minmaxval): Ditto.
2641         * trans-io.c (g95_trans_transfer): Ditto.
2642         * trans-stmt.c: Remove unneeded prototypes.
2643         (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
2644         (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
2645         (compute_inner_temp_size): Remove bits of dead code. Add comments.
2646         Don't share loopinfo.
2647         (compute_overall_iter_number): Declare as static.
2648         (allocate_temp_for_forall_nest): Ditto.
2649         (g95_trans_forall_1): Don't pass shared loopinfo.
2650         * trans.c (g95_start_block): Expand comment.
2651
2652 2003-07-12  Paul Brook  <paul@nowt.org>
2653
2654         * arith.c (g95_index_integer_kind): Remove unused initializer.
2655         * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
2656         index by size of element.
2657         (generate_loop_for_rhs_to_temp): Ditto.
2658         (allocate_temp_for_forall_nest): Use element size, not index size.
2659
2660 2003-07-11  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2661
2662         * arith.c (g95_index_integer_kind): Add a TODO.
2663         * simplify.c (g95_simplify_nearest): Add a TODO.
2664
2665 2003-07-09  Chun Huang  <compiler@sohu.com>
2666
2667         * trans.h: Add declarations for gfor_fndecl_string_scan and
2668         gfor_fndecl_string_verify.
2669         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2670         * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
2671         (g95_conv_intrinsic_verify): New function.
2672         (g95_conv_intrinsic_function): Add SCAN and VERIFY.
2673         * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
2674         of parameter 'BACK=.TRUE.'
2675
2676 2003-07-05  Lifang Zeng  <zlf605@hotmail.com>
2677
2678         * trans-stmt.c (iter_info, forall_info): Define.
2679         (g95_trans_forall_block): Remove.
2680         (g95_trans_forall_loop): Use forall info blocks.
2681         (g95_trans_nested_forall_loop): New function.
2682         (g95_do_allocate): Handle things other than logical masks.
2683         (generate_loop_for_temp_to_lhs): New function.
2684         (generate_loop_for_rsh_to_temp): New function.
2685         (compute_inner_temp_size): New function.
2686         (compute_overall_iter_number): New function.
2687         (allocate_temp_for_forall_nest): New function.
2688         (g95_trans_forall): Move body ...
2689         (g95_trans_forall_1): ... to here.  Handle loops with temporaries.
2690
2691 2003-07-02  Paul Brook  <paul@nowt.org>
2692
2693         * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
2694         in correct scope.  Change callers to match.
2695         * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
2696         * iresolve.c (g95_resolve_reshape): Only use constant shapes.
2697
2698 2003-07-02  Paul Brook  <paul@nowt.org>
2699
2700         * trans-array.c (g95_conv_loop_setup): Remove dead var.  Use
2701         expression shape for all expressions.
2702         * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
2703
2704 2003-07-03  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2705
2706         * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
2707         g95_parse_arg), intrinsic.c (g95_convert_type): support of
2708         -Wconversion.
2709         * intrinsic.c, g95.h: Add g95_convert_type_warn,
2710         * resolve.c (g95_resolve_index): Call it.
2711
2712 2003-07-02  Paul Brook  <paul@nowt.org>
2713
2714         * iresolve.c (g95_resolve_reshape): Set expression shape.
2715         (g95_resolve_shape): Ditto.
2716         * simplify.c (g95_simplify_shape): Move common code outside condition.
2717         * trans-array.c (g95_conv_array_initializer): Teach it how to count.
2718
2719 2003-07-01  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2720
2721         * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
2722         conformance checks.
2723
2724 2003-06-29  Paul Brook  <paul@nowt.org>
2725
2726         * array.c (g95_simplify_iterator_var): Don't bother with return value.
2727         * expr.c (find_array_element, find_component_ref): New functions.
2728         (remove_subobject_ref): New function.
2729         (simplify_const_ref): Use them.  Rename from simplify_component_ref.
2730         (simplify_ref_chain): New function.
2731         (g95_simplify_expr): Use it.  Simplify parameter variable subobjects.
2732         (g95_specification_expr): Simplify the expression.
2733         * resolve.c (resolve_operator): Check simplifications return code.
2734         (g95_resolve_expr): Ditto.
2735
2736 2003-06-26  Paul Brook  <paul@nowt.org>
2737
2738         * expr.c (simplify_component_ref): New function.
2739         (g95_simplify_expr): Use it.
2740         * resolve.c (resolve_structure_cons): Handle references.
2741
2742 2003-06-25  Paul Brook  <paul@nowt.org>
2743
2744         * trans-io.c (build_dt): Handle internal units.
2745
2746 2003-06-25  Canqun Yang  <canqun@yahoo.com.cn>
2747
2748         * trans-common.c (g95_build_common_decl): Array index range starts at 0.
2749         (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
2750         Use g95_array_index_type instead of integer_type_node.
2751         (g95_build_common_decl, g95_set_common_master_type): Use
2752         g95_character1_type_node instead of char_type_node.
2753         * trans-equivalence.c (g95_layout_local_equiv): As above.
2754
2755 2003-06-24  Steven G. Kargl  <kargls@attbi.com>
2756
2757         * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
2758         remove last remains of -fquiet.
2759
2760 2003-06-22  Paul Brook  <paul@nowt.org>
2761
2762         * resolve.c (resolve_operator): Don't fail if we can't simplify.
2763         (g95_resolve_expr): Ditto.
2764         (resolce_code): Mark as static.
2765         * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
2766         gimplifer doesn't (yet).
2767
2768 2003-06-20  Paul Brook  <paul@nowt.org>
2769
2770         * g95.h: Add ST_PAUSE and EXEC_PAUSE.
2771         * match.c (g95_match_if): Add ST_PAUSE.
2772         (g95_match_stopcode): New function.
2773         (g95_match_pause, g95_match_stop): Use it.
2774         * parse.c (g95_ascii_statement): Handle ST_PAUSE.
2775         (decode_stmt, next_statement, parse_executable): Ditto.
2776         * resolve.c (resolve_code): Ditto.
2777         * st.c (g95_free_statement): Ditto.
2778         * trans-stmt.c (g95_trans_pause): New function.
2779         * trans-stmt.h: Declare it.
2780         * trans.c (g95_trans_code): Use it.
2781         * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
2782         Declare.
2783         (g95_build_builtin_function_decls): Initialize them.
2784         * trans.h: Ditto.
2785         * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
2786
2787 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2788
2789         * io.c (g95_match_open , g95_match_close, g95_match_inquire,
2790         match_filepos): Fix error handling.
2791
2792 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2793
2794         * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
2795         Add assertions on arguments.
2796         * resolve.c (expression_shape): Remove useless &.
2797         * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
2798         g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
2799         g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
2800         g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
2801         g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
2802         g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
2803         (g95_simplify_not, g95_simplify_scale): Add assertions.
2804
2805 2003-06-15  Paul Brook  <paul@nowt.org>
2806
2807         Clean up stuff to work with the ssa optimizers.
2808         * convert.c (convert): Handle BOOLEAN_TYPEs.
2809         * f95-lang.c (g95_truthvalue_conversion): Implement.
2810         * trans-array.c (g95_trans_array_constructor_value): Group multiple
2811         scalar values.
2812         * trans.h (g95_truthvalue_conversion): Declare.
2813         * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
2814         * trans-stmt.c (g95_trans_character_select): Don't create array
2815         assignments.  Mark labels as indirect jump targets.
2816         * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
2817         (g95_get_dtype_cst): Handle LOGICAL types.
2818
2819 2003-06-14  Paul Brook  <paul@nowt.org>
2820
2821         * f95-lang.c (g95_gimplify_expr): New function.
2822         * trans-array.c (g95_trans_array_constructor_value): Don't create
2823         array assignments.
2824         (g95_conv_expr_descriptor): Rename simple->gimple.
2825         * trans-expr.c (conv_expr_op): Use proper logical operators.
2826         * trans-intrinsic.c (build_fixbound_expr): New function.
2827         (build_fix_expr): Ditto.
2828         (g95_conv_intinsic_aint): Use them. Use builtin functions.
2829         (g95_conv_intrinsic_function): Add FLOOR and CEILING.
2830
2831 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2832
2833         * array.c (g95_compare_array_spec): Remove unreachable code.
2834         * expr.c (g95_copy_expr): Likewise.
2835         * intrinsic.c (g95_convert_type): Likewise.
2836         * misc.c (g95_code2string): Likewise.
2837         * simplify.c (g95_simplify_ishft, g95_simplify_real,
2838         g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
2839         * trans-stmt.c (g95_trans_select): Likewise.
2840         * primary.c (extend_ref): Add an assertion.
2841         * simplify.c (g95_convert_constant): Add const.
2842         * intrinsic.h: Remove g95_check_x_ni.
2843         * f95-lang.c (g95_finish): Call g95_release_include_path.
2844
2845 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2846
2847         * resolve.c (resolve_contained_functions): Fix typo introduced on
2848         2003-01-13.
2849
2850 2003-06-09  Paul Brook  <paul@nowt.org>
2851
2852         * g95.h: Include system.h not hwint.h.
2853         * many: use safe-ctype.h not ctype.h.  Change isalpha -> ISALPHA, etc.
2854         * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
2855
2856 2003-06-09  Paul Brook  <paul@nowt.org>
2857
2858         * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
2859         * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
2860         * trans-decl.c (g95_add_decl_to_functions): Make non-static.
2861         (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
2862         (g95_generate_function_code): Translate COMMON and EQUIVALENCE
2863         objects.
2864         * trans.h (g95_trans_equivalence, g95_trans_common,
2865         g95_add_decl_to_function): Declare.
2866         * trans-common.c, trans-equivalence.c: New files.
2867
2868 2003-06-08  Steven Bosscher  <steven@gcc.gnu.org>
2869
2870         * intrinsic.c (g95_intrinsic_extension): Remove.
2871         (add_functions): Substitute g95_check_x for g95_check_x_ni
2872         everywhere.
2873         (g95_init_expr_extensions): New function.
2874         (g95_intrinsic_func_interface): Use it.
2875         * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
2876         * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
2877         g95_check_precision, g95_check_present, g95_check_radix,
2878         g95_check_range, g95_check_selected_real_kind): Do not set
2879         g95_intrinsic_extension.
2880         (g95_check_x_ni): Remove now duplicate of g95_check_x.
2881
2882         * expr.c (check_inquiry): Add FIXME, fixup some code style.
2883
2884 2003-06-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2885
2886         * g95.h (ref_type): Name this type explicitly.
2887         * module.c (MIO_NAME): Add specialisations of mio_name.
2888         (mio_symbol_attribute, mio_typespec, mio_array_ref,
2889         mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
2890         (ab_attribute): Name this type explicitly.
2891         (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
2892
2893 2003-06-05  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2894
2895         * trans-intrinsic.c (g95_conv_allocated): New function.
2896         (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
2897
2898 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
2899
2900         * f95-lang.c: Don't include g95-support.h
2901         (g95_mark_addressable): Add prototype.
2902         (g95_init_decl_processing): Remove C front end hack.
2903         * f95-tree.c: Remove file.
2904         * support.c: Remove file.
2905         * g95-support.h: Remove file.
2906         * trans-types.c (g95_init_types): Set up boolean
2907         type related tree nodes.
2908         * Make-lang.in: Remove rules for dead files and
2909         dependencies on them.
2910
2911 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
2912
2913         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
2914         C front end dependency.  Also, convert.c does not depend on
2915         g95-support.h anymore.
2916         * convert.c: Don't include c-common.h and g95-support.h
2917         * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
2918         (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
2919         stmts_are_full_exprs_p, current_stmt_tree,
2920         current_scope_stmt_stack): Remove.
2921         * g95-support.h (unsigned_conversion_warning): Kill proto.
2922         (boolean_type_node, boolean_true_node, boolean_false_node):
2923         Don't define here.  Instead, make then true tree nodes in
2924         trans-types.
2925         * support.c (c_global_trees): Die, C front end, die!!!
2926         (g95_init_c_decl_hacks): Don't touch intmax_type_node,
2927         uintmax_type_node, string_type_node and const_string_type_node.
2928         (decl_constant_value, overflow_warning): Make static functions.
2929         They are in death row too, though.
2930         (default_conversion, c_expand_asm_operands): Remove.
2931         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
2932         trans.c: Don't include c-common.h.
2933         * trans-types.c (boolean_type_node, boolean_true_node,
2934         boolean_false_node): Make them real tree nodes.
2935         * trans-types.h (intmax_type_node, string_type_node,
2936         const_string_type_node): Hack to work around C dependencies
2937         in builtin-types.def.
2938
2939 2003-06-04  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2940
2941         * decl.c (decl_types): Add some iterators-like sentinels.
2942         * decl.c (match_attr_spec): Use them.
2943         Use "decl_types" instead of "int".
2944         Add cast in call to g95_match_strings.
2945         * dump-parse-tree.c (g95_show_namespace):  Use "g95_intrinsic_op"
2946         instead of "int".
2947         * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
2948         (g95_interface_info): Use "g95_intrinsic_op".
2949         * dump-parse-tree.c (g95_show_namespace): Use them.
2950         * interface.c (g95_check_interfaces): Use them.
2951         * module.c (read_module, write_module): Use them.
2952         * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
2953         Use "g95_intrinsic_op".
2954         * interface.c (check_operator_interface): Use "g95_intrinsic_op".
2955         Add a default case in switch statement.
2956         * intrinsic.h (g95_generic_isym_id): Moved to...
2957         * g95.h (g95_generic_isym_id): here.
2958         (g95_intrinsic_sym): Use "g95_generic_isym_id".
2959         * intrinsic.c (make_generic): Use "g95_generice_isym_id".
2960         * trans-intrinsic.c (g95_intrinsic_map_t,
2961          g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
2962         * match.c (g95_match_intrinsic_op): Add cast in call to
2963         g95_match_strings.
2964
2965 2003-06-03  Steven Bosscher  <steven@gcc.gnu.org>
2966
2967         * support.c (skip_evaluation, warn_conversion, lvalue_p,
2968         lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
2969         constant_fits_type_p, convert_and_check,
2970         unsigned_conversion_warning): Remove these ugly remnants
2971         we inherited from the C front end.
2972         (function_types_compatible): Remove '#if 0'-edcode.
2973         (build_modify_expr): Likewise.
2974         (convert_for_assignment): Don't use the deceased functions.
2975         The parameter fundecl is now unused.
2976         (decl_constant_value): Always just return decl.  In fact
2977         this function is not used at present, but it might be in
2978         the future, when we start using the tree inliner.
2979         (overflow_warning, default_conversion, c_expand_asm_operands):
2980         Abort when these are called, they are part of the C type
2981         checking implementation and therefore poison to Fortran.
2982
2983 2003-06-04  Steven Bosscher  <steven@gcc.gnu.org>
2984
2985         * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
2986         c-pretty-print.o and c-dump.o.  Add a comment on why we
2987         depend on c-semantics.c.
2988         * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
2989         Don't use the C front end tree dumper hook to dump the
2990         language specific tree representation -- we don't have
2991         one.  So instead, inherit the default langhook.
2992
2993 2003-06-02  Paul Brook  <paul@nowt.org>
2994
2995         * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
2996
2997 2003-06-02  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
2998
2999         * check.c (g95_check_associated): Use proper types.  Remove
3000         extraneous argument in call to g95_error().
3001
3002 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
3003
3004         * resolve.c (resolve_operator): Make logical operands convert to the
3005         type with higher kind.
3006
3007 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
3008
3009         * check.c (g95_check_associated): Make sure both pointer and target has
3010         the same type and rank. Null pointer or array section with vector
3011         subscript as target are not allowed.
3012         * trans.h: Declare gfor_fndecl_associated.
3013         * trans-decl.c: (g95_build_builtin_function_decls): Initialize
3014         gfor_fndecl_associated.
3015         * trans-intrinsic.c (g95_conv_associated): New function.
3016         (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
3017
3018 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
3019
3020         * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
3021         according to POINTER itself rather than TARGET.
3022         (g95_conv_expr_descriptor): Make lbound start at 1.
3023         * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
3024
3025 2003-06-01  Paul Brook  <paul@nowt.org>
3026
3027         * expr.c (g95_type_convert_binary): Make it match the standard.
3028         * g95.texi: Remove dead link.
3029
3030 2003-06-01  Steven Bosscher  <steven@gcc.gnu.org>
3031
3032         * g95.texi: Cleanup somewhat in preparation for inclusion
3033         in GCC CVS.
3034
3035 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3036             Canqun Yang  <canqun@yahoo.com.cn>
3037
3038         * resolve.c (compare_bound_int, resolve_where_shape): Proper return
3039         type.
3040         (g95_find_forall_index): Return proper value.
3041         (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
3042         compare the return value from g95_find_forall_index.
3043
3044 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3045         * g95.h, io.c (g95_st_label): Remove "length".
3046         (g95_symtree): Remove "link".
3047         (g95_case): Remove "code".
3048         * arith.c, arith.h (g95_compare_string, g95_convert_integer,
3049         g95_convert_real): Make an argument pointer to const.
3050         * decl.c (colon_seen): Add a TODO.
3051         * interface.c (g95_compare_types): Fix typo.
3052         * interface.c (compare_interfaces): Preserve value of "p".
3053         * intrinsic.c (sort_actual): Remove "i".
3054         * match.c (g95_match_assign): Proper type in call to g95_match().
3055         * parse.c (next_free): Avoid duplicate call due to macro.
3056         * parse.c (check_statement_label): wrong type in call to g95_error.
3057         * primary.c (match_real_constant): Add a TODO.
3058         * resolve.c (resolve_select):  Remove useless conditional.
3059         * simplify.c (g95_simplify_repeat): Proper assignment to
3060         "value.character.string".
3061         * simplify.c (g95_simplify_reshape): Wrong variable in call to
3062         g95_error.
3063
3064 2003-05-20  Canqun Yang  <canqun@yahoo.com.cn>
3065
3066         * trans-stmt.c: Remove unnecessary include file defaults.h.
3067
3068 2003-05-19  Lifang Zeng  <zlf605@hotmail.com>
3069
3070         * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
3071         stride.
3072         (g95_trans_forall): Allow arbitrary number of FORALL indexes and
3073         actual variables used as FORALL indexes.
3074
3075 2003-05-15  Paul Brook  <paul@nowt.org>
3076
3077         * trans-array.c (g95_trans_static_array_pointer): Use
3078         null_pointer_node.
3079         (g95_trans_deferred_array): Initialize static array pointers.
3080         * trans-expr.c (g95_conv_function_call): Use formal arglist to
3081         correctly pass POINTER and absent CHARACTER arguments.
3082
3083 2003-05-14  Lifang Zeng  <zlf605@hotmail.com>
3084
3085         * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
3086         (g95_resolve_forall_body): Resolve FORALL body.
3087         (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
3088         (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
3089         (g95_find_forall_index): Check whether the FORALL index appears in
3090         the expression or not.
3091         (resolve_code): Modified.
3092
3093 2003-05-14  Paul Brook  <paul@nowt.org>
3094
3095         * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
3096
3097 2003-05-13  Paul Brook  <paul@nowt.org>
3098
3099         * trans-types.c (g95_max_array_element_size): Now a tree node.
3100         (g95_init_types): Work out max size properly.
3101         (g95_get_dtype_cst): Modify to match.
3102
3103 2003-05-11  Paul Brook  <paul@nowt.org>
3104
3105         * trans-io.c (add_case): Create a label decl for case labels.
3106
3107 2003-05-11  Paul Brook  <paul@nowt.org>
3108
3109         * arith.c (g95_integer_index_kind): New variable.
3110         * f95-lang.c (g95_init): Move frontend initialization here ...
3111         (g95_post_options): ... from here.
3112         * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
3113         * intrinsic.c (add_functions): Use index kinds.
3114         * iresolve.c: Convert to index_kind where needed.
3115         * resolve.c (g95_resolve_index): Make public, use index_kind.
3116         (resolve_array_ref): Adjust to match.
3117         * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
3118         * trans-stmt.c: Ditto.
3119         * trans-types.c: Ditto.
3120         * trans-types.h (g95_array_index_kind): Remove declaration.
3121         * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
3122
3123 2003-05-07  Paul Brook  <paul@nowt.org>
3124
3125         * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
3126         * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
3127         of bound indices.
3128
3129 2003-05-07  Paul Brook  <paul@nowt.org>
3130
3131         * trans-array.c (trans_static_array_pointer,
3132         g95_trans_array_constructor_value, g95_conv_array_initializer,
3133         g95_conv_structure): CONSTRUCTOR nodes only have one operand.
3134         (g95_add_loop_ss_code): Convert subscripts to the correct type.
3135         * trans-stmt.c (g95_trans_character_select): Ditto.
3136         * trans-types.c (g95_init_types): Ditto.
3137
3138 2003-05-07  Steven Bosscher  <steven@gcc.gnu.org>
3139
3140         * f95-lang.c (expand_function_body): Use input_line, not lineno.
3141         * trans-decl.c (g95_generate_function_code,
3142         g95_generate_constructors): Likewise.
3143         * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
3144         g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
3145         Likewise.
3146
3147 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
3148         * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
3149         with components point to the DERIVED type itself, and two DERIVED
3150         type with components point to each other.
3151         * trans-expr.c (g95_conv_componet_ref): Modified
3152
3153 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
3154         * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
3155         null_pointer_node.
3156         (g95_trans_pointer_assign): Implement Nullify.
3157
3158 2003-05-01  Paul Brook  <paul@nowt.org>
3159
3160         * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
3161         * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
3162
3163 2003-05-01  Paul Brook  <paul@nowr.org>
3164
3165         * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
3166         trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
3167         IS_EMPTY_STMT.
3168
3169 2003-05-01  Canqun Yang  <canqun@yahoo.com.cn>
3170
3171         * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
3172         CASE_LABEL_EXPR.
3173
3174 2003-04-28  Paul Brook  <paul@nowt.org>
3175
3176         * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
3177         as their kind suggests.
3178         (g95_resolve_reshape): Ditto.
3179
3180 2003-04-28  Chun Huang  <compiler@sohu.com>
3181
3182         * trans-expr.c (g95_conv_substring_expr): New function.
3183         (g95_conv_expr): Use it.
3184
3185 2003-04-28  Paul Brook  <paul@nowt.org>
3186
3187         * iresolve.c (g95_resolve_transpose): Make it match the
3188         implementation.
3189         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
3190
3191 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
3192
3193         * trans-types.c (g95_add_field_to_struct): New function to
3194         add a field to a UNION_TYPE or RECORD_TYPE.
3195         * trans-types.h (g95_add_field_to_struct): Prototype.
3196         (g95_get_derived_type): Use g95_add_field_to_struct to add
3197         components.
3198         * trans-io.c (g95_add_field): Remove.
3199         (ADD_FIELD): Use new g95_add_field_to_struct function.
3200         (ADD_STRING): Likewise.
3201         * trans-stmt.c (g95_trans_select): Likewise.
3202         (g95_add_field): Remove duplicated function.
3203
3204 2003-04-18  Canqun Yang  <canqun@yahoo.com.cn>
3205
3206         Port implementation for CHARACTER SELECT from Andy's tree.
3207         * trans-stmt.c (g95_trans_character_select): Implement character
3208         select. (g95_add_field): New function.
3209         * trans-decl.c: Declare 'gfor_gndecl_select_string'.
3210         (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
3211         * g95.h (struct g95_case): Add field 'int n'.
3212         * trans.h: Declare 'gfor_fndecl_select_string'.
3213
3214 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
3215
3216         * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
3217         (g95_insert_bbd): Die on duplicates.
3218         * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
3219
3220 2003-04-14  Steven Bosscher  <steven@gcc.gnu.org>
3221
3222         * g95.texi: Require GMP 4.0 -- like we actually
3223         do.  Explain the testsuite and what-goes-where.
3224         Don't use undefined texinfo symbol.  Break very
3225         long line.  Remove finished item from the list
3226         of open projects.
3227
3228 2003-04-11  Canqun Yang  <canqun@yahoo.com.cn>
3229
3230         * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
3231         LOGICAL type.
3232
3233 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
3234
3235         * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
3236         (g95_trans_forall_body): New function.
3237
3238 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
3239
3240         * resolve.c (resove_where): New function.
3241         (resolve_where_shape): New function.
3242         (resolve_code): Add call to 'resolve_where'
3243         * trans-stmt.c (g95_trans_where): Modified.
3244         (g95_trans_where_2): New function.
3245         (g95_trans_where_assign): New function.
3246         (g95_evaluate_where_mask): New function.
3247         (g95_add_to_stmt_list): New function.
3248         (g95_get_temp_expr): New function.
3249         * trans.h (where_stmt_list): New structure.
3250
3251 2003-04-10  Paul Brook  <paul@nowt.org>
3252
3253         * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
3254         (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
3255
3256 2003-04-10  Steven Bosscher  <steven@gcc.gnu.org>
3257
3258         Update after mainline -> tree-ssa-branch merge.
3259         * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
3260         call.
3261         (g95_init): Update for new lang_hooks definition.
3262         (g95_post_options): New langhook.
3263         (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
3264         * scanner.c (g95_new_file): Comment update.
3265
3266 2003-04-09  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3267
3268         * g95.h, lang-options.h: Add -Wimplicit-interface.
3269         * options.c (g95_init_options, g95_parse_arg): Set it.
3270         * interface.c (check_intents): Warn about call with implicit
3271         interface.
3272         * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
3273         g95_procedure_use.
3274
3275 2003-04-05  Paul Brook  <paul@nowt.org>
3276
3277         * iresolve.c (g95_resolve_spread): Don't resole based on type.
3278         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
3279
3280 2003-03-29  Paul Brook  <paul@nowt.org>
3281
3282         * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
3283         (g95_resolve_unpack): Ditto.
3284         * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
3285         (g95_conv_intrinsic_function): Use it.  Remove PACK and UNPACK.
3286         (g95_is_intrinsic_libcall): Add PACK and UNPACK.
3287
3288 2003-03-25  Paul Brook  <paul@nowt.org>
3289
3290         * arith.c (g95_unary_user, g95_user): Remove dead functions.
3291         * arith.h: Ditto.
3292         * array.c (g95_free_array_ref): Ditto.
3293         * g95.h: Ditto.
3294         * symbol.c (g95_use_derived_tree): Ditto.
3295         * intrinsic.c (add_functions): Use simplification for SCALE.
3296         * primary.c (g95_match_rvalue): Test sym, not symtree.
3297
3298 2003-03-25  Paul Brook  <paul@nowt.org>
3299
3300         * trans-decl.c (build_function_decl): Add parameter before it gets
3301         turned into a constant.
3302         * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
3303         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
3304         * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
3305
3306 2003-03-22  Paul Brook  <paul@nowt.org>
3307
3308         * trans-array.c (g95_conv_array_initializer): Allow scalar
3309         expressions.
3310         * trans-decl.c (g95_finish_var_decl): Result variables are not
3311         module variables.
3312         * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
3313         (g95_conv_intrinsic_function): Use it.
3314         * trans-types.h (g95_type_spec): Remove dead declaration.
3315
3316 2003-03-21  Paul Brook  <paul@nowt.org>
3317
3318         * trans-decl.c (g95_build_function_decl): Mark string parameters.
3319
3320 2003-03-20  Paul Brook  <paul@nowt.org>
3321
3322         * trans-decl.c (g95_build_function_decl): Put character length
3323         parameters at the end of the function declaration.
3324         * trans-expr.c (g95_conv_function_call): Ditto.
3325         * trans-types.c (g95_get_function_type): Ditto.
3326
3327 2003-03-20  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3328
3329         * resolve.c (resolve_formal_arglist): Don't impose intent for
3330         procedure arguments of pure functions.
3331         (resolve_select): Remove redundant assignment.
3332
3333 2003-03-19  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3334
3335         * arith.c (validate_logical), g95.h, options.c (g95_init_options):
3336         Remove option l1.
3337         * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
3338         * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
3339         const.
3340         * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
3341         Order list.
3342         * symbol.c (g95_add_type): Fix typo in comment.
3343
3344
3345 2003-03-16  Paul Brook  <paul@nowt.org>
3346
3347         * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
3348         * expr.c (g95_build_call): Remove.
3349         * f95-lang.c (puchdecl_top_level): New function.
3350         * g95.h (g95_code): Store resolved symbol, not just the name.
3351         * intrinsic.c (g95_intrinsic_namespace): New global namespace.
3352         (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
3353         (g95_get_intrinsic_sub_symbol): New function.
3354         * iresolve.c (g95_resolve_cpu_time): Use it.
3355         (g95_resolve_random_number): Ditto.
3356         * resolve.c: Set code->resolved_sym instead of code->sub_name.
3357         * trans-decl.c (g95_get_extern_function_decl): Give external decls
3358         the correct DECL_CONTEXT.  Add global symbold to the global scope.
3359         * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
3360         fixed.
3361
3362 2003-03-16  Paul Brook  <paul@nowt.org>
3363
3364         * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
3365         * options.c (g95_parse_arg): Ditto.
3366         * module.c (mio_symbol_attribute): Handle the always_explicit bit.
3367         * resolve.c (resolve_formal_arglist): The always_explicit sould be set
3368         for the procedure, not the parameter.
3369         * trans-array.c (g95_trans_g77_array): New function.
3370         (g95_trans_assumed_size): Use it.
3371         (g95_trans_dummy_array_bias): Ditto.
3372         (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
3373         (g95_conv_expr_descriptor): ... to here.  Update callers.
3374         * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
3375         (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
3376         * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
3377         * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
3378         * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
3379         (g95_sym_type): Ditto.
3380
3381 2003-03-15  Paul Brook  <paul@nowt.org>
3382
3383         * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
3384         first chain.
3385         * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
3386
3387 2003-03-14  Paul Brook  <paul@nowt.org>
3388
3389         * trans-array.c (g95_array_is_packed): Remove.
3390         (g95_conv_array_base): Correctly handle all descriptorless cases.
3391         (g95_conv_array_stride): Use descriptorless strides.
3392         (g95_trans_dummy_array_bias): Don't always repack the array.
3393         (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
3394         packed.
3395         * trans-types.c (g95_get_nodesc_array_type): Differentiate between
3396         dummy and non-dummy arrays...
3397         (g95_sym_type, g95_get_derived_type): ... like these.
3398         (g95_get_array_type_bounds): Allow discontiguous arrays.
3399
3400 2003-03-12  Paul Brook  <paul@nowt.org>
3401
3402         * array.c (g95_resolve_array_spec): Fix comment.
3403         * g95.h (symbol_attributes): New flag always_explicit.
3404         * resolve.c (resolve_formal_arglist): Set it always_explicit.
3405         * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
3406         * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
3407         (g95_trans_array_bounds): Allow assumed shape arrays.
3408         (g95_trans_repack_array): Remove.
3409         (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
3410         * trans-decl.c (g95_build_qualified_array): Only ignore absent
3411         bounds for assumed size arrays.
3412         (g95_build_dummy_array_decl): Use descriptorless arrays.
3413         * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
3414         (g95_trans_pointer_assign): Fix typo.
3415         * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
3416         code.
3417         (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
3418         * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
3419         Also modify callers.
3420         * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
3421
3422 2003-03-08  Paul Brook  <paul@nowt.org>
3423
3424         * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
3425         (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
3426         * resolve.c (compare_spec_to_ref): Allow full array sections.
3427
3428 2003-03-08  Paul Brook  <paul@nowt.org>
3429
3430         * expr.c (g95_simplify_expr): Also simplify array index and
3431         substring expressions.
3432         * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
3433         * trans-array.c (g95_trans_array_bounds): New function.
3434         (g95_trans_auto_array_allocation): Use it.
3435         (g95_trans_assumed_size): Rewrite.
3436         * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
3437         (gfor_fndecl_repack): Remove.
3438         (g95_build_qualified_array): Handle absent upper bounds.
3439         (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
3440         (g95_get_symbol_decl): Update.
3441         (g95_build_intrinsic_function_decls): Initialize new decls.
3442         * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
3443         (gfor_fndecl_repack): Remove.
3444         * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
3445         * trans-types.c: (g95_build_array_type): Merge duplicated code..
3446         (g95_get_nodesc_array_type): Handle absent bounds.
3447         * trans-types.h (g95_get_nodesc_array_type): Declare.
3448
3449 2003-03-04  Paul Brook  <paul@nowt.org>
3450
3451         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
3452         builtin-types.def.
3453
3454 2003-03-02  Paul Brook  <paul@nowt.org>
3455
3456         * options.c (g95_init_options): Drfault to 1.
3457         (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
3458         * trans-array.c (g95_conv_array_data, g95_conv_array_base,
3459         g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
3460         Handle non-constant size automatic arrays.
3461         (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
3462         generic bound functions.
3463         (g95_trans_auto_array_allocation): Don't create a descriptor.
3464         (g95_trans_assumed_size): New function (broken).
3465         (g95_trans_dummy_array_bias): Remove unused var.
3466         * trans-array.h (g95_trans_assumed_size): Declare.
3467         * trans-decl.c (create_index_var): New fuction.
3468         (g95_build_qualified_array): New function.
3469         (g95_get_symbol_decl): Use it.
3470         (g95_trans_deferred_vars): Handle assumed shape seperately.
3471         * trans-types.c (get_element_type): Handle heap allocated arrays.
3472         (g95_is_nodesc_array): Include non-const size arrays.
3473         (g95_get_nodesc_array_type): Ditto.
3474
3475 2003-02-23  Paul Brook  <paul@nowt.org>
3476
3477         * trans-array.c (g95_array_init_size): Should use stride, not size of
3478         last dimension.
3479
3480 2003-02-18  Paul Brook  <paul@nowt.org>
3481
3482         * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
3483         after intrinsic function check.
3484
3485 2003-02-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3486
3487         * io.c (match_io): Fix missing return value and remove useless
3488         assignment.
3489         * match.c (g95_match): Remove useless assignment.
3490         * module.c (parse_string):  Remove useless post increment.
3491         * simplify.c (g95_simplify_verify): Remove useless assignment.
3492
3493 2003-02-15  Paul Brook  <paul@nowt.org>
3494
3495         * expr.c (restricted_intrinsic): Handle bad values gracefully.
3496         * g95.h (symbol_attribute): Add referenced member.
3497         (g95_symbol): Add dummy_order member.
3498         (g95_set_sym_referenced): Declare.
3499         * match.c (g95_match_assignment, g95_match_call): Use it
3500         * primary.c (match_actual_arg, g95_match_rvalue,
3501         g95_match_variable): Ditto.
3502         * symbol.c (next_dummy_order): New variable.
3503         (g95_set_sym_referenced): New function.
3504         (check_done): New function.
3505         (g95_add_*): Use it.
3506         * trans-decl.c: Make formatting conform to GCC standards.
3507         (g95_defer_symbol_init): Add dummy variables in the right order.
3508         (g95_get_symbol_decl): Only accept referenced variables.
3509         (g95_create_module_variable): Module variables are always required.
3510         (generatr_local_decls): New function.
3511         (generate_local_vars): New function.
3512         (g95_generate_function_code): Use it.
3513
3514 2003-02-13  Paul Brook  <paul@nowt.org>
3515
3516         * trans-decl.c (g95_conv_struct_cons): Remove.
3517         (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
3518         * trans-expr.c (g95_conv_structure): New function.
3519         (g95_conv_expr): Use it.
3520
3521 2003-02-09  Paul Brook  <paul@nowt.org>
3522
3523         * trans-array.c (g95_array_init_size): Don't evaluate the linit
3524         expressions multiple times.
3525         (g95_trans_auto_arry_allocation): Use pointer not tmp.
3526
3527 2003-02-08  Paul Brook  <paul@nowt.org>
3528
3529         * module.c (mio_symtree_ref): Declare as static.
3530         (mio_expr): Remove dead code.
3531         (read_module): Set the symtree link for fixups.
3532         * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
3533         (build_round_expr): ... to this.
3534         (g95_conv_intrinsic_aint): New function.
3535         (g95_conv_intrinsic_function): Use it.
3536
3537 2003-02-08  Paul Brook  <paul@nowt.org>
3538
3539         * trans-array.c (g95_trans_array_constructor_value): Use the acutal
3540         offset after modificaton, not the increment expression.
3541         * dependency.c: Kill excess whitespace.
3542
3543 2003-02-07  Sanjiv Gupta  <sanjivg@noida.hcltech.com>
3544
3545         * dependency.h: Remove some function declarations.
3546         * dependency.c (get_no_of_elements): Change this function not to
3547         return int.
3548         * other: Add comments for all modified functions.
3549
3550 2003-02-06  Paul Brook  <paul@nowt.org>
3551
3552         * g95spec.c (lang_specific_functions): Fix initializer warning.
3553         * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
3554         for structure type names.
3555         * trans-decl.c (g95_cons_structure_cons): New function.
3556         (g95_get_symbol_decl): Use it.
3557         * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
3558         referencing code.
3559
3560 2003-02-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3561
3562         * resolve.c (compare_cases): Add const to casts.
3563
3564 2003-01-30  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3565
3566         * g95.h (g95_check_f): Change a1 to f1m.
3567         * intrinsic.c (add_sym_1m, check_specific,
3568         g95_intrinsic_func_interface): Use it.
3569
3570         * module.c (init_pi_tree): Remove useless cast.
3571         (fp2): Fix argument type.
3572
3573         * parse.c (parse_select_block): Add comment.
3574
3575 2003-02-05  Toon Moene  <toon@moene.indiv.nluug.nl>
3576
3577         * lang-options.h: Fix warning involving C90 concatenated
3578         strings.
3579
3580 2003-02-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3581             Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3582
3583         * io.c (format_asterisk): Complete initializer to kill warning.
3584         * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
3585         DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
3586         (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
3587         new defines to complete initializers.  Kills all warnings.
3588
3589         * Make-lang.in: Comment cleanup.
3590
3591 2003-02-05  Paul Brook  <paul@nowt.org>
3592
3593         * array.c (g95_free_constructor): Handle NULL expressions.
3594         * resolve.c (resolve_structure_cons): Ditto.
3595         * decl.c (g95_match_null): New Function.
3596         (variable_decl): Use it.
3597         * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
3598         * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
3599         * trans-types.c (g95_set_decl_attributes): Remove empty function.
3600
3601 2003-02-05  Paul Brook  <paul@nowt.org>
3602
3603         * trans.h (build1_v): New macro.
3604         (build_v): Remove pointless and incorrect prototype.
3605         * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
3606         * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
3607
3608 2003-02-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3609
3610         * Make-lang.in (F95_OBJS): Remove one more dead file.
3611
3612 2003-02-01  Paul Brook  <paul@nowt.org>
3613
3614         * lang-specs.h: Don't pass -ffixed-form to the linker.
3615         * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
3616
3617 2003-02-01  Paul Brook  <paul@nowt.org>
3618
3619         * Make-lang.in (F95_OBJS): Remove dead files.
3620         * trans-array.c (g95_array_init_size): Do the right thing when
3621         ubound=NULL.
3622         * trans-decl.c (g95_generate_function_code): Initialize deffered
3623         symbol list before translating contained subroutines.
3624         * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
3625         scalar invariant values here...
3626         (g95_conv_variable, g95_conv_function_call): ... instead of here ...
3627         * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
3628
3629 2003-01-29  Paul Brook  <paul@nowt.org>
3630
3631         * trans-array.c (g95_add_loop_code): Put pre code in the right block.
3632         (g95_walk_elemental_function_args): Reverse chains before adding.
3633         (g95_reverse_ss): Move about a bit.
3634         * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
3635         function arguments.
3636
3637 2003-01-28  Paul Brook  <paul@nowt.org>
3638
3639         * intrinsic.c (resolve_intrinsic): Use correct union member.
3640         * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
3641         parameters.
3642         * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
3643         use associated variables.
3644         * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
3645         * trans-expr.c (g95_conv_expr_present): ... to here.
3646         * trans.h: Declare it.
3647         * trans-types.c (g95_sym_type): Assume subroutine if not specified.
3648
3649 2003-01-28  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3650
3651         * array.c (expand_iterator): Suppress useless assignment.
3652         * decl.c (match_char_spec): Ditto.
3653         * io.c (match_io_iterator): Ditto.
3654         * primary.c (match_real_constant): Ditto.
3655         * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
3656         Ditto.  Also, use g95_intrinsic_op not int for intrinsic operators.
3657         * matchexp.c (match_add_operand, match_level_5): Likewise.
3658         * module.c (parse_atom, find_enum): Likewise.
3659         * resolve.c: move #include <string.h>
3660         (resolve_select): Fix serious typo.
3661
3662 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.n>
3663
3664         * Make-lang.in: Don't build with broken tree-ssa-pre.
3665
3666 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3667
3668         * resolve.c (resolve_index): Add a TODO.
3669         * symbol.c: Remove useless "#include <ctype.h>".
3670
3671 2003-01-27  Paul Brook  <paul@nowt.org>
3672
3673         * check.c (check_rest): Allow different type kinds as an extension.
3674         * g95.h (g95_resolve_f): Add f1m.
3675         * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
3676         * intrinsic.h: Chenge prototypes for MIN and MAX.
3677         * iresolve.c (g95_resolve_minmax): New function.
3678         (g95_resolve_min, g95_resolve_max): Use it.
3679         * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
3680         arguments once.
3681         (g95_conv_intrinsic_present): Fix logic.
3682
3683 2003-01-27  Steven Bossche  <s.bosscher@student.tudelft.nl>
3684
3685         * g95.h (g95_case): Don't be a tree, be a double linked list.
3686         * match.c (match_case_selector): Remove redundant semantics check.
3687         Clean up a few goto's to make it a tiny little bit faster.
3688         * resolve.c (case_tree): Die.
3689         (compare_cases): Accept and compare unbounded cases too.
3690         (check_case_overlap): Don't build a tree.  Instead, merge-sort the
3691         whole list of g95_cases passed from resolve_select.
3692         (sane_logical_select): Die.
3693         (check_case_expr): Return FAILURE if a CASE label is of the wrong
3694         type kind.
3695         (resolve_select): Fixup case expression for computed GOTOs, put it
3696         in expr, not expr2, for easier handing in the parse tree dumper and
3697         the code generator.  Rewrite the rest of the function: Kill
3698         unreachable case labels and unreachable case blocks.
3699         * dump-parse-tree.c (g95_show_code_node): Always dump expr for
3700         an EXEC_SELECT, not case2 anymore.
3701         * trans-const.c (g95_conv_constant_to_tree): New function.
3702         (g95_conv_constant): Use it.
3703         * trans-const.h: Declare prototype for the new function.
3704         * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
3705         g95_trans_character_select): New static functions.
3706         (g95_trans_select): Rewrite.
3707
3708 2003-01-26  Paul Brook  <paul@nowt.org>
3709
3710         * intrinsic.c (add_fnctions): Properly add dreal.
3711         * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
3712         (g95_conv_intrinsic_function): Use it.
3713         * trans-io.c (build_dt): Abort on internal files (unimplemented).
3714
3715 2003-01-26  Paul Brook  <paul@nowt.org>
3716
3717         Widespread changes to the handling of symbols in expressions.  These
3718         are now linked via g95_symtree nodes.
3719         * parse.c (g95_fixup_sibling symbols): New function.
3720         (parse_contained): Use it.
3721         * g95.h (symbol_attribute): Add contained.  Indicates a symbol is a
3722         contained procedure that has bee correctly fixed up.
3723         (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
3724
3725 2003-01-24  Paul Brook  <paul@nowt.org>
3726
3727         * trans-array.c (g95_walk_expr): Function result attributes are in
3728         sym->result.
3729         * trans-expr.c (g95_conv_function_call,
3730         g95_trans_arrayfunc_assign): Ditto.
3731         * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
3732
3733 2003-01-23  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3734
3735         * expr.c (check_restricted): Fix error message.
3736         * symbol.c (free_st_labels): Plug memleak.
3737
3738 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3739
3740         * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
3741         reduce_binary_aa, reduce_binary, eval_intrinsic,
3742         eval_intrinsic_f2): Use typesafe prototypes for eval functions.
3743         * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
3744         for typesafe intrinsics helper functions.
3745         (g95_intrinsic_sym): Use them.
3746         * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
3747         add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
3748         add_sym_5, add_conv, resolve_intrinsic, do_simplify,
3749         check_specific, g95_intrinsic_func_interface,
3750         g95_intrinsic_sub_interface): Adjust all calls to intrinsics
3751         helper functions.
3752         * trans-decl.c (g95_get_extern_function_decl): Likewise.
3753         * Make-lang.in: Don't disable warnings for strict prototypes
3754         any longer, everything is typesafe now.
3755
3756 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3757
3758         * bbt.c (duplicate_node): Make static.
3759         * module.c (module_name): Make static.
3760         * scanner.c (include_dirs): Make static.
3761
3762 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3763
3764         Hard coded _gfor_'s should not show up anymore.
3765         * g95.h (PREFIX): New macro.
3766         * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
3767         hard-coded "_gfor".
3768         (g95_resolve_random_number): Likewise.
3769         * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
3770         * trans-io.c: Remove 'prefix' macro.  Replace all uses with
3771         the new PREFIX macro from g95.h.
3772
3773 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3774
3775         The troubles of forking... Andy implemented this just now too.
3776         Let's stick to that and keep the trees close.
3777         * g95.h (g95_st_label): 'format' member is now a g95_expr.
3778         * io.c: Revert previous changes.
3779         (g95_match_format): Match the format string as a character
3780         literal expression.
3781         * match.h (g95_statement_label): Declare external.
3782         * parse.c: Revert previous changes.
3783         * symbol.c (g95_free_st_label): Free a g95_expr instead
3784         if a 'char *'.
3785         * trans-io.c: Revert previous changes.
3786         (build_dt): Use set_string to set the format string.
3787
3788 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3789
3790         * io.c (format_string): Make non-static.
3791         (g95_match_format): Remember the format string.
3792         (terminate_io): Add I/O termination for empty I/O lists.
3793         * match.h: Declare external format_string.
3794         * parse.c (check_statement_label): Attack the format string
3795         to a format label for FORMAT statements.
3796         * trans-io.c (g95_add_field): Define prefix macro.  Replace
3797         all uses of PREFIX define with a use of this macro.
3798         (build_dt): Implement formatted I/O for format labels.
3799
3800 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3801
3802         * lang-options.h: Kill "-std=F".
3803         * options.c: Remove unimplemented "-std=F".  Modify
3804         web address.
3805         * misc.c (g95_terminal_width): New function.
3806         * error.c (g95_error_init_1): Use g95_terminal_width.
3807         * g95.h: Add prototype for g95_terminal_width, remove
3808         fmode flag.
3809
3810 2003-01-19  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3811
3812         * Make-lang.in: Fix typo.
3813
3814 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3815
3816         * g95.h (struct g95_case): Remove unused cruft, new member
3817         'where' to keep track of the locus of the default case.
3818         * match.c (g95_match_case): Add locus to the current case.
3819         (match_case_selector): Likewise.
3820         * parse.c (parse_select_block): Move semantics check for
3821         multiple DEFAULT cases out of here to...
3822         * resolve.c (check_case_overlap): ...here.  Return sooner
3823         when possible.
3824         (check_case_expr): Take two g95_cases now, use to sure the
3825         expression kinds are the same.
3826         (resolve_select): Cleanup.
3827
3828 2003-01-18  Paul Brook  <paul@nowt.org>
3829
3830         * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
3831         * trans-decl.c (g95_set_symbol_decl): Handle non-array result
3832         variables.
3833         (g95_get_extern_function_decl): Put decls in the correct context.
3834
3835 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3836
3837         * trans-io.c: Port changes from Andy to set ERR flag.
3838
3839 2003-01-17  Paul Brook  <paul@nowt.org>
3840
3841         * trans-array.c: Add various comments.
3842         (g95_ss_terminator): Declare as const.
3843         (g95_walk_expr): Remove first parameter and update all callers.
3844         (g95_walk_op_expr): Initialize scalar SS properly.
3845         * trans-array.h (g95_walk_expr): Update prototype.
3846         * trans-expr.c: Update for new g95_walk_expr.
3847         * trans-intrinsic.c: Ditto.
3848         * trans-io.c: Ditto.
3849         * trans.h: Various comments for SS chains.
3850
3851 2003-01-17  Paul Brook  <paul@nowt.org>
3852
3853         * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
3854         and RRSPACING.
3855         * intrinsic.c (add_functions): Use them.
3856         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
3857         * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
3858
3859 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3860
3861         Fallout of a small merge conflict:
3862         * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
3863
3864 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3865
3866         * initrinsic.c: New add_sym_* functions for strong typing.
3867         (add_conv): Make prototype strict.
3868         * dump-parse-tree.c, dependency.c: Include config.h
3869         * resolve.c, trans-io.c: Fix typos.
3870
3871 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3872
3873         * dump-parse-tree.c (g95_show_code_node): Show the
3874         condition for a computed GOTO that was transformed
3875         to a SELECT CASE construct.
3876         * resolve.c (check_case_overlap): Revert previous switch
3877         to treaps, it was too slow and didn't catch all trouble.
3878         (resolve_symbol): Be more flexible about module procedures.
3879         * symbol.c (check_conflict): Point to relevant section in
3880         the standard for dubious conflict.  Allow procedure
3881         dummy arguments to be optional again.
3882         * trans-io (add_field): Rename to g95_add_field.  Change
3883         all callers.
3884         * trans-stmt (trans_select): Handle unbounded cases for
3885         integer SELECT CASE constructs.  Fix/add more comment.
3886
3887 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3888
3889         * g95.h: Uses GCC's function attribute macros.
3890         * error.c, module.c, parse.c, g95.h: More function attributes.
3891
3892 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3893         Forgot a file...
3894         * trans-decl.c (get_label_decl): Use TREE_LINENO instead
3895         of DECL_SOURCE_LINE, and TREE_FILENAME instead of
3896         DECL_SOURCE_FILE.
3897
3898 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3899
3900         * f95-lang.c (pushdecl): Use TREE_LINENO instead of
3901         DECL_SOURCE_LINE.
3902         * trans.c (g95_trans_code): Use annotate_all_with_file_line
3903         instead of nowdead wrap_all_with_wfl.
3904
3905 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3906
3907         * parse.c (g95_parse_file): In verbose mode, dump the parse tree
3908         before generating code, so we can still see it even if the code
3909         generation phase dies.
3910
3911 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3912
3913         * decl.c (build_sym): Split out initialization expression parts...
3914         (add_init_expr_to_sym): ...to here.
3915         (variable_decl): Add the symbol following an attribute list to the
3916         symbol tree before parsing the optional initialization expression
3917         if the symbol is not of a derived type.
3918         * primary.c (g95_match_rvalue): Don't assume a symbol always has
3919         a value if it is a PARAMETER.
3920
3921 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3922
3923         * misc.c: Don't #include <mcheck.h>
3924         * module.c: Ditto.  Kill uses of mtrace, muntrace.  If there
3925         ever was a glibc bug, then either this was never reported to
3926         glibc people, or it has been fixed for so long that there's
3927         no information you can find about it, anywhere.
3928
3929 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3930
3931         Fix warnings:
3932         * module.c (attr_bits, bt_types, array_spec_types):
3933         Switch 'const' and 'static'.
3934         * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
3935
3936         GNU'ify source code:
3937         * trans-io.c: Numerous fixes, one fixed warning and a few
3938         TODO markers so that we don't forget about them.
3939
3940 2003-01-13  Paul Brook  <paul@nowt.org>
3941
3942         * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
3943         * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
3944         Add G95_ISYM_SCALE.
3945         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
3946         * match.c (g95_match_stop): Fix dumb == -> != error.
3947
3948 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3949
3950         * dump-parse-tree.c (show_indent): Add line breaks.  This
3951         whole dumping process needs cleanups.
3952         * f95-lang.c (g95_mark_addressable): Fix prototype to match
3953         the langhook.  Fix 'return's accordingly.
3954         * g95-support.h: Adjust prototype.
3955         * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
3956         * lang-options.h: Add '-fsyntax-only'.
3957         * options.c (g95_init_options): Init 'no_backend'.
3958         (g95_parse_arg): Deal with '-fsyntax-only'.
3959         * parse.c (g95_parse_file): Do not generate code if 'no_backend'
3960         is set.
3961
3962 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3963         Patch from Arnaud
3964         * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
3965         arguments.  Also make sure that if a symbol is marked INTRINSIC,
3966         an intrinsic with the symbol's name actually exists.
3967         (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
3968         Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
3969         ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
3970
3971 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3972
3973         * resolve.c (resolve_contained_functions): Fix condition, don't
3974         throw internal_error if a child namespace has no name.  Apparently
3975         this can be the case?
3976
3977 2003-01-11  Paul Brook  <paul@nowt.org>
3978
3979         Port changes from Andy's tree:
3980         * g95.h (g95_code): Add stop_code.
3981         * match.c (g95_match_stop): Detter syntax checking.
3982         * resolve.c (resolve_generic_f0): Return match type.
3983         (resolve_generic_f): Remove dead/duplicated code.
3984         (resolve_specific_f): Ditto.
3985         * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
3986         * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
3987         * trans-stmt.c (g95_trans_stop): Handle new STOP format.
3988
3989 2003-01-11  Paul Brook  <paul@nowt.org>
3990
3991         * trans-array.c: Various documentation/comment changes.
3992         * trans-stmt.c: Ditto.
3993
3994
3995 2003-01-10  Paul Brook  <paul@nowt.org>
3996
3997         * options.c/h: Add -fdump-parse-tree as alias of -v.
3998
3999 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4000
4001         * dump-parse-tree.c (g95_show_namespace): Fixed another
4002         typo.  Sorry, it's Friday...
4003
4004 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4005
4006         Spotted by Tobi:
4007         * trans-array.c, trans-array.h, trans.c, trans-const.c,
4008         trans-const.h, trans-decl.c, trans-expr.c, trans.h
4009         trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
4010         trans-types.c: Fix bogus copyright years, add 2003.
4011         * trans-types.h: Give copyright header.
4012
4013 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4014
4015         * dump-parse-tree.c (g95_show_namespace): Fixed typo.
4016         * expr.c, options.c, scanner.c: Add some more 'const' markers.
4017         * intrinsic.c: Some constant strings moved to read-only memory.
4018         * io.c (format_asterisk): Move to...
4019         * g95.h: ...here.
4020
4021 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4022
4023         * dump-parse-tree.c (g95_show_namespace): Dump implicit
4024         types for ranges instead of per-letter.  Indent the
4025         'CONTAINS' just like everything else.
4026         * resolve.c (resolve_contained_functions): Clarify comment.
4027         Explain non-obvious conditional expression.  Improve
4028         diagnostics if tyoe cannot be resolved.
4029         Port semi-fix from Andy's tree:
4030         (was_declared): Move up before first use.
4031         (generic_sym, specific_sym): New functions.  Code moved
4032         out if procedure_kind.
4033         (procedure_kind): Simplify using new functions.
4034         (resolve_generic_f): Make sure the functions we find in
4035         a parent namespace is generic.
4036         (resolve_specific_f): Ditto for specific functions.
4037
4038 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4039
4040         * trans-stmt.c, trans.c: Fix some code style issues. Add
4041         some more comment (but still not enough!).
4042
4043 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4044
4045         * symbol.c (flavors, procedures, intents, acces_types,
4046         access_types, ifsrc_types): Make const.
4047         * misc.c (g95_string2code): Make 'm' param 'const'.
4048         * module.c (find_enum, write_atom, mio_name): Make
4049         'm' param 'const'.
4050         (attr_bits, bt_types, array_spec_types, array_ref_types,
4051         ref_types, expr_types): Make const.
4052         * g95.h: Adjust external decls.
4053
4054 2003-01-09  Paul Brook  <paul@nowt.org>
4055
4056         * Testsuite: Add a load of new cases.
4057
4058 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4059
4060         * Make-file.in: Add dependency on back end header files;
4061         a parallel build should work now.
4062         * f95-lang-c (lang_identifier): Remove bogus comment.
4063         (g95_be_parse_file): Fix prototype.
4064         (g95_init): Make static.
4065         (g95_finish): Make static.
4066         * error.c (g95_syntax_error): Kill. Make define in...
4067         * g95.h (g95_syntax_error): Define.
4068         (g95.options): Make 'source' member 'const'.
4069         * interface.c (g95_match_interface): Explain
4070         hard-to-read condition.
4071         (g95_match_end_interface): Ditto.
4072         * trans_const.c (g95_build_string_const): Make 's' parameter
4073         'const'.
4074         * trans_const.h: Adjust protoype accordingly.
4075         * trans-decl.c: Include tree-dump.h
4076         (g95_generate_function_code): Build fixes for recent changes
4077         in the tree-ssa branch.
4078
4079 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4080
4081         * format.c: Kill, move code from here...
4082         * io.c: ...to here.
4083         * Make-lang.in: Adjust.
4084         * MANIFEST: Ditto.
4085         * match.h: Ditto.
4086         * BUGS: Mention where to submit bugs.  Move old content...
4087         * TODO: ...to here.  New file.
4088
4089 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4090         Fix most warnings, and suppress the ones we can't fix for now.
4091         * Make-lang.in: Suppress warnings about bad proto's in g95.h,
4092         these warnings just clutter the screen and there's not much
4093         we can do about them for now anyway.
4094         * check.c, iresolve.c: Mark unused function parameters.
4095         * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
4096         they should be resolved before they get here.
4097         * error.c: Remove unused FILE *status_out.
4098         * f95-lang.c (g95_init): Remove bogus cast.
4099         * Many files: Make things 'const' where required.
4100         * g95.h: Fix prototypes for all modified functions above.
4101         (g95_options): Remove 'object' member.
4102
4103 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4104
4105         * Make-file.in: Cleanup bogus targets.  Add more comment.
4106         * lang-options.h: New option '-w'.
4107         * g95.h: add no_options field to struct g95_options.
4108         * options.c (g95_init_options): Default no_warnings to off.
4109         (g95_parse_arg): Recognise the '-w' switch and its alias,
4110         '-fno-warnings'.
4111         * error.c (g95_warning, g95_warning_now): Don't emit warning if
4112         no_warning option is set.
4113         * iresolve.c (g95_resolve_shape): Fix warning.
4114
4115 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4116
4117         * primary.c (g95_next_string_char): Rename next_string_char, and
4118         make static.  Adjust callers accordingly.
4119         * resolve.c (resolve_generic_f0): Return try, not match.  Adjust
4120         callers accordingly.
4121         * g95.h: Split out all g95_match* functions to...
4122         * match.h: ...here. New file.
4123         * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
4124         matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
4125
4126 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4127
4128         * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
4129         g95_merge_new_implicit): New functions.
4130         (g95_match_implicit_none, g95_match_implicit): Move from here...
4131         * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
4132         Modify to use the new functions in symbol.c.
4133         * g95.h: Add and move prototypes.
4134
4135 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4136
4137         * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
4138         node compare function.
4139         (g95_insert_bbt): Likewise.
4140         (g95_insert_bbt_with_overlap): Likewise.
4141         (g95_delete_bbt): Likewise.
4142         (delete_treap): Likewise. Also fix a potential bug when calling it.
4143         * module.c (compare_pointers): Change proto to compare_fn.
4144         (compare_integers): Likewise.
4145         (compare_true_names): Likewise.
4146         (find_true_name): Adjust call to compare_true_names to match proto.
4147         (require_atom, write_atom, mio_name): Fix 'const' warnings.
4148         (init_pi_tree): Make compare a compare_fn instead of (int *).
4149         * resolve.c (compare_cases): Change proto to compare_fn.
4150         * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
4151         it static, and rename to compare_symtree.
4152         (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
4153         function.
4154         * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
4155         of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
4156
4157 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4158         * Make-lang.in: Fix spaces/tabs issues from previous patch.
4159         * patch.options: Blow away Paul's checkin mistake :-)
4160         * io.c (terminate_io): Fix memory leak (Arnaud).
4161
4162 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4163
4164         * Make-lang.in: Teach about building DVI, info manual.
4165         * g95.texi: New file.
4166
4167 2003-01-02  Paul Brook  <paul@nowt.org>
4168
4169         * trans-array.c (g95_reverse_ss): Make static and don't use.
4170         (g95_conv_ss_descriptor): Don't use g95_loopinfo
4171         (g95_conv_array_parameters): Modify for pointer assignments.
4172         (g95_walk_subexpr): New function.
4173         (g95_walk_expr*): Use it.
4174         * trans-array.h (g95_reverse_ss): Remove prototype.
4175         * trans-expr.c (g95_trans_pointer_assign): Implement.
4176         (Many): Set se.want_pointer before calling g95_conv_array_parameter.
4177         * trans-intrinsic.c: Sync with scalarizer changes.
4178         * trans-io.c: Ditto.
4179
4180 2002-12-29  Paul Brook  <paul@nowt.org>
4181
4182         * trans-array.c: Document calling convention for arrays.
4183
4184 2002-12-19  Paul Brook  <paul@nowt.org>
4185
4186         * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
4187         assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
4188         optional parameters for some intrinsics.
4189         (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
4190         * trans-expr.c (g95_conv_function_call): Pass NULL for absent
4191         optional parameters.
4192         * trans.h (g95_se): Add ignore_optional flag.
4193
4194 2002-12-15  Paul Brook  <paul@nowt.org>
4195
4196         * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
4197         * trans-decl.c (g95_generate_function_code): Use TDI_original.
4198
4199 2002-12-14  Paul Brook  <paul@nowt.org>
4200
4201         * trans-stmt.c (g95_trans_call): Use resolved symbol name.
4202
4203 2002-12-12  Paul Brook  <paul@nowt.org>
4204
4205         * trans-array.c (g95_trans_array_constructor_subarray): Fully
4206         initialize the scalarizer.
4207         (various): Update to new format of g95_expr->value.constructor.
4208
4209 2002-12-08  Paul Brook  <paul@nowt.org>
4210
4211         * trans-array.c (g95_put_offset_into_var): New function.
4212         (g95_trans_array_constructor_subarray): New function.
4213         (g95_trans_array_constructor_value): Use it.
4214         (g95_array_cons_size): Don't abort() on array components.
4215
4216 2002-12-08  Paul Brook  <paul@nowt.org>
4217
4218         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
4219         * support.c: Update #includes.
4220         (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
4221         * trans-array.c: Update #includes.
4222         * trans.c: Ditto.
4223         * trans-const.c: Ditto.
4224         * trans-io.c: Ditto.
4225         * trans-types.c: Ditto.
4226         (g95_init_types): Set size_type_node.
4227         * trans-decl.c: Update #includes.
4228         (gfor_fndecl_adjust{l,r}): Declare and initialize.
4229         * trans-stmt.c: Update #includes.
4230         (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
4231         (g95_trans_select): Fix check for unbounded ranges.
4232         * trans-expr.c: Update #includes.
4233         (g95_conv_string_tmp): New function.
4234         (g95_conv_concat_op): Use it.
4235         * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
4236         * Trans-intrisic.c: Update #includes.
4237         (g95_conv_intrinsic_strcmp): New function.
4238         (g95_conv_intrinsic_adjust): Ditto.
4239         (g95_conv_intrinsic_function: Use them.
4240
4241 2002-11-30  Paul Brook  <paul@nowt.org>
4242
4243         * trans-array.c (g95_walk_function_expr): Handle non-array return by
4244         reference.
4245         * trans-dec.c (g95_build_function_decl): Handle character return
4246         parammeters.
4247         (g95_get_fake_result_decl): Ditto.
4248         (g95_trans_deferred_vars): Ditto.
4249         * trans-expr.c (g95_conv_function_call): Ditto.
4250         (g95_trans_arrayfunc_assign) Limit to array valued functions.
4251         * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
4252         (g95_conv_intrinsic_function): Use it.
4253         * trans-types.c (g95_sym_type): Handle functions returning strings.
4254         (g95_return_by_reference): Ditto.
4255         (g95_get_function_type): Ditto.
4256
4257 2002-11-18  Paul Brook  <paul@nowt.org>
4258
4259         * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
4260         requires a temporary.
4261         (g95_trans_select): Handle computed gotos.
4262         * trans-types.c (g95_build_array_type): Warn about non-functional
4263         assumed shape arrays.
4264         * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
4265         blocks.
4266         * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
4267         (g95_conv_intrinsic_int): New function.
4268         (g95_conv_intrinsic_mod): New function.
4269         (g95_conv_intrinsic_ichar): New function.
4270         (g95_conv_intrinsic_function): Use them.
4271         (g95_conv_intrinsic_dim): Use g95_evaluate_now.
4272
4273 2002-11-17  Toon Moene  <toon@moene.indiv.nluug.nl>
4274
4275         * trans-types.c (g95_build_array_type): Assumed
4276         sized arrays can have rank > 1.
4277         * trans.c (g95_trans_code): Remove erroneous
4278         warning about CONTINUE.
4279         * trans-expr.c (g95_conv_variable): Remove
4280         erroneous assert.
4281
4282 2002-11-15  Paul Brook  <paul@nowt.org>
4283
4284         * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
4285
4286 2002-10-31  Paul Brook  <paul@nowt.org>
4287
4288         * f95-tree.c: Remove tree copying stuff that's now in gimple.c
4289         * trans-expr.c (g95_conv_component_ref): Handle character string
4290         components.
4291         (g95_conv_string_parameter): Ditto.
4292         * trans-types.c (g95_get_derived_type): Add length decl to caracter
4293         string components.
4294
4295 2002-10-10  Paul Brook  <paul@nowt.org>
4296
4297         * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
4298         * trans-expr.c (g95_conv_function_call): Remove unreliable return value
4299         check.
4300         * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
4301         (g95_conv_intrinsic_function): Handle size and shape intrinsics.
4302         (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
4303         * trans-types.c (pvoid_type_node): Declare and initialize.
4304         * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
4305         (g95_array_allocate): Fix when base==data.
4306         (g95_conv_array_parameter): Correctly handle reduced rank sections.
4307         * trans-io.c (g95_trans_write): Correctly handle string modifiers.
4308
4309 2002-10-09  Paul Brook  <paul@nowt.org>
4310
4311         * (g95_conv_expr_reference): Handle character strings correctly.
4312
4313 2002-10-07  Paul Brook  <paul@nowt.org>
4314
4315         (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
4316         langhook.
4317         * trans-array.c (g95_build_array_initializer): Remove.
4318         (g95_conv_array_initializer): New Function.
4319         (g95_trans_auto_arry_allocation): Cleanup.
4320         (g95_trans_init_character_array): Remove.
4321         * g95spec.c: Link in libgforbegin.
4322         * trans.c (g95_generate_code): Rename main function to MAIN__.
4323         (g95_create_var): New function.
4324         (g95_create_var_np): New function.
4325         (g95_evaluate_now): New function.
4326         (g95_start_block): New function.
4327         (g95_finish_block): New function.
4328         (g95_add_expr_to_block): New function.
4329         (g95_add_block_to_block): New function.
4330         * trans-expr.c (g95_conv_componen_ref): New function.
4331         * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
4332         (F95_OBJS): Add dependency.o.
4333         * f95-lang.c (g95_is_simple_stmt): Remove.
4334         * f95-tree.c (mark_not_simple): New function.
4335         (unshare_all_trees): New function.
4336         (create_tmp_var, create_tmp_alias_var): Remove.
4337         * support.c (declare_tmp_vars, tree_last_decl): Remove.
4338         * trans*: Convert to new IR using GENERIC trees.  Don't bother about
4339         SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
4340
4341 2002-10-01  Paul Brook  <paul@nowt.org>
4342
4343         * trans-array.c: Add support for descriptorless arrays.
4344         (g95_conv_array_data): New function.
4345         (g95_conv_array_base): New function.
4346         * trans-array.h: Declare these here.
4347         * trans-decl.c(g95_create_mopdule_variable): Perform variable
4348         initialization and creation here.
4349         (g95_create_module_vars): Instead of here.
4350         * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
4351         * trans-intrinsic.c: Ditto.
4352         * trans-types.c (g95_is_nodesc_array): New function.
4353         (g95_get_nodesc_array_type): New function.
4354         (g95_sym_type, g95_get_derived_type): Use them.
4355         * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
4356
4357 2002-09-28  Paul Brook  <paul@nowt.org>
4358
4359         * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
4360         * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
4361         parameters.
4362
4363 2002-09-24  Paul Brook  <paul@nowt.org>
4364
4365         * f95-lang.c (listify): Remove declaration.
4366         (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
4367         (listify)
4368         * f95-tree.c (get_name): New function.
4369         * trans.c (module_namespace): Remove.
4370         * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
4371         * trans-types.c: Ditto.
4372
4373 2002-09-19  Paul Brook  <paul@nowt.org>
4374
4375         * trans-array.c (g95_get_array_cons_size): New Function.
4376         (g95_con_ss_startstride): Handle Array constructors.
4377         (g95_conv_loop_setup): Ditto.
4378         (g95_conv_array_parameter): Ditto.
4379         * tras-decl.c (g95_finish_var_decl): Make initializes variables
4380         static.
4381
4382 2002-09-19  Paul Brook  <paul@nowt.org>
4383
4384         * trans.c (g95_simple_fold_tmp): Detect variables inside
4385         NON_LVALUE_EXPR.
4386         * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
4387
4388 2002-09-18  Steven Bosscher <s.bosscher@student.tudelft.nl>
4389
4390         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
4391
4392 2002-09-14  Paul Brook  <paul@nowt.org>
4393
4394         * trans.c (g95_create_module_variable): Move to trans-decl.c.
4395         * trans-const.c (g95_conv_string_init): New Function.
4396         * trans-const.h: Declare it.
4397         * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
4398         variables. Don't bail on intrinsic symbols.
4399         (get_extern_function_decl): Handle specific intrinsic functions.
4400         * trans-types.c (g95_sym_type): Dummy functions don't return
4401         reference types.
4402         * trans-array.c (g95_build_array_initializer): New Function.
4403         (g95_trans_auto_array_allocation): Build initializer for static decls.
4404         Don't use mpz_addmul, it's GMP4 only.
4405
4406 2002-09-12  Paul Brook  <paul@nowt.org>
4407
4408         * trans-decl.c (g95_generate_code): Fix thinko with return variable.
4409         (g95_get_extern_function_decl, g95_build_function_decl): Mangle
4410         assembler names for module procedures.
4411
4412 2002-09-11  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
4413
4414         * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
4415         dependency/
4416
4417 2002-09-10  Paul Brook  <paul@nowt.org>
4418
4419         * trans-array.c: Change format of G95_SS_TEMP strictures.
4420         (g95_check_fncall_dependancy): New function.
4421         (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
4422         offsets.
4423         * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
4424         result variables.
4425         (g95_build_function_decl): Don't assume result arrays are packed.
4426         (g95_trans-deferred-vars): Handle array result variables.
4427         (g95_generate_fuction_code): Clear saved_function_decls.
4428         * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
4429         reference.
4430         (g95_trans_arrayfunc_assign): New function.
4431         (g95_trans_assignment): Use it.
4432         * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
4433         (g95_se): Add direct_byref.
4434         * trans-types.c: Use sym->result rather than sym where appropriate.
4435         * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
4436         Update other functions to use this.
4437         (g95_is_intrinsic_libcall): New function.
4438         (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
4439         (g95_walk_intrinsic_function): Ditto.
4440
4441 2002-09-08  Paul Brook  <paul@nowt.org>
4442
4443         * trans-types.c: Change rank field to dtype field in array descriptor.
4444         * trans-array.c: Implement filling of dtype array descriptor field.
4445         * trans-intrinsic.c: Fix broken LEN intrinsic.
4446
4447 2002-09-07  Paul Brook  <paul@nowt.org>
4448
4449         * trans-intrinsic.c: Remove outdated todo intrinsic list.
4450         (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
4451         (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
4452
4453 2002-09-06  Paul Brook  <paul@nowt.org>
4454
4455         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
4456         (gt-f95-trans-types.h): Add dependancy information.
4457         * config-lang.in (gtfiles): Add trans-types.c
4458         * f95-lang.c (g95_be_parse_file): Pass error and warning counts
4459         back to top-level code.
4460         * trans-array.c, trans-types.c: Change format of array descriptor.
4461         (g95_conv_descriptor_dimension): New function.
4462         * trans-types.h (g95_conv_descriptor_rank): define.
4463         * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
4464         intrinsics.
4465
4466 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
4467
4468         * trans-array.c, trans-types.c: Add rank information to descriptor.
4469
4470 2002-09-06  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
4471
4472         * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
4473
4474 2002-09-04  Paul Brook  <paul@nowt.org>
4475
4476         * f95-lang.c (g95_create_decls): New function.
4477         (g95_init):  Move initialization of external decls to above, and call
4478         from g95_be_parse_file.
4479         * trans.c (g95_finish_stmt): Don't amputate the decl chain.
4480         * trans-types.c (g95_init_types): Always name integer and char types.
4481         (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
4482
4483 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
4484
4485         * Make-lang.in: Add options.c to F95_PARSER_OBJS
4486
4487 2002-09-02  Paul Brook  <paul@nowt.org>
4488
4489         * g95_generate_code: Clear the attr for __fortran_main.
4490         * trans-types.c (g95_finish_type): New function.
4491         * g95_init_io_state_type: Use g95_finish_type.
4492         * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
4493
4494 2002-09-01  Paul Brook  <paul@nowt.org>
4495
4496         * README.backend: Warn about the dangers of extra config.h files.
4497         Remove obsolete libgfor stuff.
4498         * config-lang.in: Add target-libgfor dependancy.
4499         * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
4500
4501 2002-09-01  Toon Moene  <toon@moene.indiv.nluug.nl>
4502
4503         * g95_conv_mpz_to_tree: Free storage pointed to by q,
4504         not by buff.
4505
4506 2002-08-30  Paul Brook  <paul@nowt.org>
4507
4508         * trans-intrinsic.c (g95_conv_intrinsic_function,
4509         g95_walk_intrinsic_function): Added ANY and ALL.
4510         (g95_conv_intrinsic_anyall): New function.
4511         * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in
4512         mangled name