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