OSDN Git Service

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