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