OSDN Git Service

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