1 2005-04-07 Steven G. Kargl <kargls@comcast.net>
3 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
5 2005-04-06 Steven G. Kargl <kargls@comcast.net>
7 * invoke.texi: Remove documentation of -std=f90
9 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
11 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
12 non-pointer assignment.
14 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
19 * array.c (resolve_character_array_constructor): New function. Set
20 constant character array's character length.
21 (gfc_resolve_array_constructor): Use it.
22 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
24 (gfc_set_constant_character_len): New function. Set constant character
25 expression according the given length.
26 * match.h (gfc_set_constant_character_len): Add prototype.
28 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
30 * intrinsic.texi: BES?? functions are not in the f95 standard.
32 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
34 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
36 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
38 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
39 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
41 2005-04-02 Steven G. Kargl <kargls@comcast.net>
43 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
45 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
47 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
48 trans.h: Fix comment typos.
50 2005-03-29 Steven G. Kargl <kargls@comcast.net>
52 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
53 flag_default_integer, flag_default_real
54 * invoke.texi: Update documentation
55 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
56 fdefault-integer-8, and fdefault-real-8 definitions.
57 * options.c (gfc_init_options): Set option defaults
58 (gfc_handle_option): Handle command line options.
59 * trans-types.c (gfc_init_kinds): Use options.
61 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
63 * f95-lang.c (builtin_function): Process the attrs parameter
64 and apply the "const" attribute to the builtin if found.
66 2005-03-27 Steven G. Kargl <kargls@comcast.net>
68 * intrinsic.texi: Document AIMAG, AINT, ALL
70 2005-03-26 Steven G. Kargl <kargls@comcast.net>
72 * arith.c (check_result): Fix illogical logic.
74 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
76 * trans-common.c (create_common): Build RECORD_NODE for common blocks
77 contain no equivalence objects.
78 (add_equivalences): New argument saw_equiv.
79 (trans_common): New local variable saw_equiv.
80 (finish_equivalences): Add a local variable dummy, Always pass true
81 for the 3rd parameter to create_common.
83 2005-03-25 Steven G. Kargl <kargls@comcast.net>
85 * intrinsic.texi: Fix "make dvi"
87 2005-03-24 Steven G. Kargl <kargls@comcast.net>
89 * intrinsic.texi: New file.
90 * gfortran.texi: Include it; white space change; fix typo.
92 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
94 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
96 2005-03-23 Steven Bosscher <stevenb@suse.de>
98 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
99 * trans-array.c (gfc_trans_allocate_array_storage,
100 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
101 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
102 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
103 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
104 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
105 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
106 gfc_conv_expr_descriptor): Likewise.
107 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
108 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
109 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
110 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
111 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
112 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
113 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
114 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
115 gfc_conv_intrinsic_merge, prepare_arg_info,
116 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
117 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
118 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
119 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
120 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
121 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
123 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
124 * trans.c (gfc_add_modify_expr): Likewise.
126 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
128 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
129 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
130 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
131 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
132 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
133 gfc_check_perror): new functions to check newly implemented
135 * gfortran.h: adding symbols for new intrinsics.
136 * intrinsic.c (add_functions): adding new intrinsics.
137 (add_subroutines): adding new intrinsics.
138 * intrinsic.h: prototype for all checking and resolving
140 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
141 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
142 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
143 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
144 gfc_resolve_kill_sub, gfc_resolve_link_sub,
145 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
146 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
147 gfc_resolve_perror): new functions to resolve intrinsics.
148 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
151 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
153 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
154 in which the variable is declared.
157 * resolve.c (was_declared): Also check for dummy attribute.
159 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
161 * gfortran.h (arith): Remove ARITH_0TO0.
162 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
163 (gfc_arith_power): Remove special casing of zero to integral
166 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
168 * Make-lang.in (fortran-warn): Remove -Wno-error.
169 (expr.o-warn, resolve.o-warn, simplify.o-warn,
170 trans-common.o-warn): Specify -Wno-error.
172 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
174 * trans-array.c (gfc_trans_static_array_pointer,
175 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
176 comment and formatting typos.
178 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
180 * invoke.texi: Fix typos.
182 2005-03-15 Zack Weinberg <zack@codesourcery.com>
184 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
186 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
188 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
189 to zero on label_tree.
191 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
194 * io.c (resolve_tag): Add checking on assigned label.
195 (match_dt_format): Does not set symbol assign attribute.
196 * match.c (gfc_match_goto):Does not set symbol assign attribute.
197 * resolve.c (resolve_code): Add checking on assigned label.
198 * trans-common.c (build_field): Deals with common variable assigned
200 * trans-stmt.c (gfc_conv_label_variable): New function.
201 (gfc_trans_label_assign): Use it.
202 (gfc_trans_goto): Ditto.
203 * trans-io.c (set_string): Ditto.
204 * trans.h (gfc_conv_label_variable): Add prototype.
206 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
209 * symbol.c (check_conflict): A dummy argument can't be a statement
212 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
214 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
215 the argument of the shift to the unsigned type.
217 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
220 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
222 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
225 * resolve.c (gfc_resolve): Check if character lengths are
226 specification expressions.
228 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
231 * trans-array.c (gfc_stack_space_left): Remove unused variable.
232 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
234 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
235 Remove declaration / prototype.
236 * trans-common.c (build_equiv_decl): Give union a name. Check if
237 it can be put on the stack.
238 * trans-decl.c (gfc_stack_space_left): Move function here.
239 (gfc_build_qualified_array): Fix comment typo.
240 * trans.h (gfc_put_var_on_stack): Add prototype.
242 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
244 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
245 * decl.c, trans.c: Don't use C++ style comments.
246 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
247 ifsrc): Give names to enums and use ENUM_BITFIELD.
248 (gfc_access): Remove trailing comma.
250 2005-03-05 Steven G. Kargl <kargls@comcast.net>
253 * primary.c (match_complex_constant): Mangled complex constant may
254 be an implied do-loop. Give implied do-loop matcher a chance.
256 2005-03-05 Steven G. Kargl <kargls@comcast.net>
259 * resolve.c (compare_shapes): New function.
260 (resolve_operator): Use it.
262 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
264 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
265 type for COMPLEX constants.
267 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
270 * trans-expr.c (gfc_conv_function_call): Correctly dereference
271 argument from a pointer function also if it has a result clause.
273 2005-03-04 Steven G. Kargl <kargls@comcast.net>
275 * expr.c (gfc_copy_shape_excluding): Change && to ||.
277 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
279 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
282 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
286 * simplify.c (gfc_simplify_bound): Rename to ...
287 (simplify_bound): ... this and overhaul.
289 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
291 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
292 (gfc_conv_intrinsic_function): update function calls
294 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
297 * trans-types.c (gfc_max_integer_kind): Declare
298 (gfc_init_kinds): Initialize it.
299 * gfortran.h (gfc_max_integer_kind): extern it.
300 * primary.c (match_boz_constant): Use it; remove gfortran extension
301 of kind suffixes on BOZ literal constants
304 2005-02-27 Steven G. Kargl <kargls@comcast.net>
306 * arith.c (gfc_check_real_range): Remove multiple returns
307 (check_result): New function.
308 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
309 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
312 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
314 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
317 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
319 Unrevert previously reverted patch. Adding this fix:
320 * module.c (find_true_name): Deal with NULL module.
322 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
324 Revert yesterday's patch:
325 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
327 * gfortran.h (gfc_component, gfc_actual_arglist, ...
328 ... argument. Copy string instead of pointing to it.
330 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
332 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
333 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
335 * module.c (mio_namespace_ref, load_needed): Likewise.
336 * parse.c (parse_interface, parse_contained): Likewise. Here the
337 correct second argument matters.
338 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
339 parent's implicit types if this is set.
340 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
341 * trans-common.c (build_common_decl): Likewise.
343 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
345 * symbol.c (gfc_set_default_type): Issue error only once, by setting
346 and checking 'untyped' attribute.
348 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
349 fields into new struct 'op' inside the 'value' union.
350 * arith.c (eval_intrinsic): Adapt all users.
351 * dependency.c (gfc_check_dependency): Likewise.
352 * dump-parse-tree.c (gfc_show_expr): Likewise.
353 * expr.c (gfc_get_expr): Don't clear removed fields.
354 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
355 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
356 check_intrinsic_op): Adapt to new field names.
357 * interface.c (gfc_extend_expr): Likewise. Also explicitly
358 nullify 'esym' and 'isym' fields of new function call.
359 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
360 Adapt to renamed structure fields.
361 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
362 * module.c (mio_expr): Likewise.
363 * resolve.c (resolve_operator): Likewise.
364 (gfc_find_forall_index): Likewise. Only look through operands
365 if dealing with EXPR_OP
366 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
367 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
368 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
371 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
372 'name' a 'const char *'.
373 (gfc_symbol): Likewise, also for 'module'.
374 (gfc_symtree): Make 'name' a 'const char *'.
375 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
376 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
378 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
379 initialize 'SYM->module'.
380 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
381 pointer instead of empty string.
382 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
383 * interface.c (gfc_compare_types): Adapt check to account for possible
385 (compare_actual_formal): Check for NULL pointer instead of empty
387 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
388 Add 'const' qualifier.
389 (conv_name): Return a heap allocated string.
390 (find_conv): Add 'const' qualifier to 'target'.
391 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
392 (make_generic): Check for NULL pointer instead of empty string.
393 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
394 (add_conv): No need to strcpy result from 'conv_name'.
395 (sort_actual): Check for NULL pointer instead of empty string.
396 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
398 * module.c (compare_true_names): Compare pointers instead of strings
400 (find_true_name): Initialize string fields with gfc_get_string.
401 (mio_pool_string): New function.
402 (mio_internal_string): Adapt comment.
403 (mio_component_ref, mio_component, mio_actual_arg): Use
404 'mio_pool_string' instead of 'mio_internal_string'.
405 (mio_symbol_interface): Add 'const' qualifier to string arguments.
406 Add level of indirection. Use 'mio_pool_string' instead of
407 'mio_internal_string'.
408 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
409 (write_common, write_symbol): Use 'mio_pool_string' instead of
410 'mio_internal_string'.
411 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
412 instead of empty string.
413 (write_operator, write_generic): Pass correct type variable to
414 'mio_symbol_interface'.
415 (write_symtree): Use 'mio_pool_string' instead of
416 'mio_internal_string'.
417 * primary.c (match_keyword_arg): Adapt check to possible
418 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
419 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
420 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
422 (ambiguous_symbol): Check for NULL pointer instead of empty string.
423 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
425 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
426 pointer instead of empty string.
427 * trans-decl.c (gfc_sym_mangled_identifier,
428 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
429 gfc_get_symbol_decl): Likewise.
430 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
431 argument. Copy string instead of pointing to it.
433 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
435 * intrinsic.h, st.c: Update copyright.
437 2005-02-20 Steven G. Kargl <kargls@comcast.net>
439 * symbol.c: Typos in comments.
441 2005-02-20 Steven G. Kargl <kargls@comcast.net>
443 * expr.c (gfc_type_convert_binary): Typo in comment.
445 2005-02-19 Steven G. Kargl <kargls@comcast.net>
447 * check.c (gfc_check_selected_int_kind): New function.
448 * intrinsic.h: Prototype it.
449 * intrinsic.c (add_function): Use it.
450 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
451 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
453 2005-02-19 Steven G. Kargl <kargls@comcast.net>
455 * check.c (gfc_check_int): improve checking of optional kind
456 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
458 2005-02-19 Steven G. Kargl <kargls@comcast.net>
460 * check.c (gfc_check_achar): New function
461 * intrinsic.h: Prototype it.
462 * intrinsic.c (add_function): Use it.
464 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
466 * trans-stmt.c (generate_loop_for_temp_to_lhs,
467 generate_loop_for_rhs_to_temp): Remove if whose condition is
470 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
472 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
473 (gfc_use_derived): ... this function.
475 2005-02-09 Richard Henderson <rth@redhat.com>
477 * f95-lang.c (gfc_init_builtin_functions): Call
478 build_common_builtin_nodes; do not define any functions handled
481 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
483 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
485 (gfc_is_constant_expr): Check 'ref' to determine if substring
486 reference is constant.
487 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
488 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
490 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
492 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
494 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
495 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
496 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
497 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
498 gfc_add_procedure): Add argument.
499 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
500 gfc_match_null, match_type_spec, match_attr_spec,
501 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
502 Update callers to match.
503 (gfc_match_entry) : Likewise, fix comment typo.
504 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
505 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
506 gfc_match_derived_decl): Update callers.
507 * interface.c (gfc_match_interface): Likewise.
508 * match.c (gfc_match_label, gfc_add_flavor,
509 gfc_match_call, gfc_match_common, gfc_match_block_data,
510 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
512 * parse.c (parse_derived, parse_interface, parse_contained),
513 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
514 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
515 * symbol.c (check_conflict, check_used): Add new 'name' argument,
516 use when printing error message.
517 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
518 gfc_add_generic, gfc_add_in_common, gfc_add_data,
519 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
520 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
521 gfc_add_procedure): Add new 'name' argument. Pass along to
522 check_conflict and check_used.
523 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
524 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
525 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
526 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
527 argument in calls to any of the modified functions.
529 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
531 * gfortran.texi: Don't give last update date.
533 2006-01-30 Richard Henderson <rth@redhat.com>
535 * options.c (gfc_init_options): Zero flag_errno_math.
537 2005-01-29 Paul Brook <paul@codesourcery.com>
540 * check.c (real_or_complex_check): New function.
541 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
542 * intrinsic.c (add_functions): Use new check functions.
543 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
546 2005-01-29 Steven G. Kargl <kargls@comcast.net>
549 * expr.c (gfc_check_assign): Check for conformance of logical operands
551 2004-01-27 Steven Bosscher <stevenb@suse.de>
553 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
554 TREE_USED for all labels.
555 (gfc_trans_entry_master_switch): Use it instead of building a
557 * trans-io.c (add_case): Likewise.
558 * trans-stmt.c (gfc_trans_integer_select): Likewise.
560 2004-01-23 Paul Brook <paul@codesourcery.com>
561 Steven G. Kargl <kargls@comcast.net>
564 * arith.c (gfc_convert_real): Remove sign handling.
565 * primary.c (match_digits): Allow whitespace after initial sign.
566 (match_real_const): Handle signs here. Allow whitespace after
567 initial sign. Remove dead code.
568 (match_const_complex_part): Remove.
569 (match_complex_part): Use match_{real,integer}_const.
570 (match_complex_constant): Cross-promote integer types.
572 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
575 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
576 transpose_c8 for complex types.
578 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
580 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
581 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
582 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
583 Follow spelling conventions.
585 2005-01-22 Bud Davis <bdavis9659@comcast.net>
588 * trans-io.c (gfc_trans_inquire): Added code to support
591 2005-01-22 Steven G. Kargl <kargls@comcast.net>
593 * intrinsic.c (make_alias): Add standard argument.
594 (add_functions): Update make_alias calls.
596 2005-01-22 Paul Brook <paul@codesourcery.com>
598 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
600 2005-01-22 Paul Brook <paul@codesourcery.com>
602 * gfortran.h (gfc_check_access): Add prototype.
603 * match.c (gfc_match_namelist): Remove TODO.
604 * module.c (check_access): Rename ...
605 (gfc_check_access): ... to this. Boolify. Update callers.
606 * resolve.c (resolve_symbol): Check for private objects in public
609 2005-01-22 Paul Brook <paul@codesourcery.com>
611 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
612 does not have an explicit type.
613 (gfc_match_variable): Resolve implicit derived types in all cases.
614 Resolve contained function types from their own namespace, not the
616 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
617 checking. Resolve from the contained namespace, not the parent.
619 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
622 * trans-const.c (gfc_conv_constant_to_tree): Give logical
623 constants the correct type.
626 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
628 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
631 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
633 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
634 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
635 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
636 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
637 trans-io.c, trans-stmt.c, trans.c: Update copyright.
639 2005-01-17 Ira Rosen <irar@il.ibm.com>
641 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
643 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
646 * error.c (error_char): Line-buffer errors / warnings.
648 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
650 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
651 unsigned issue. Use build_int_cst instead of converting
652 integer_zero_node. Remove unnecessary conversion.
654 * trans-types.c (gfc_get_character_type_len): : Use
655 gfc_charlen_type_node as basic type for the range field.
657 * trans-intrinsic.c (build_fixbound_expr,
658 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
659 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
660 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
661 of converting 'integer_zero_node' or 'integer_one_node'
663 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
665 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
666 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
667 'build_int_cst' instead of converting 'integer_zero_node' or
668 'integer_one_node' respectively.
670 * trans-intrinsic.c (gfc_conv_intrinsic_index,
671 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
672 'gfc'-prefix from local variable, remove dead code, use correct
673 type when inserting argument.
675 * trans-intrinsic.c, trans-types.c: Update copyright years.
677 2005-01-16 Steven G. Kargl <kargls@comcast.net>
680 * resolve.c (check_case_overlap): Typo in comment.
681 (validate_case_label_expr): Fix up kinds of case values
682 (resolve_select): Properly handle kind mismatches.
684 2004-01-16 Paul Brook <paul@codesourcery.com>
687 * trans-common.c (translate_common): Remove duplicate function call.
688 (finish_equivalences): Preserve alignment when biasing offsets.
690 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
692 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
693 ASCII-like character encoding.
695 2005-01-14 Steven G. Kargl <kargls@comcast.net>
697 * resolve.c (compare_case): Cleanup.
699 2005-01-14 Steven G. Kargl <kargls@comcast.net>
701 * resolve.c (compare_case): Give arguments correct type.
703 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
705 * iresolve.c, trans-common.c, trans-types.c: Fix comment
708 2005-01-09 Paul Brook <paul@codesourcery.com>
711 * trans-common.c (current_common, current_offset): Remove.
712 (create_common): Add head argument.
713 (align_segment): New function.
714 (apply_segment_offset): New function.
715 (translate_common): Merge code from new_segment. Handle alignment.
716 (new_segment): Remove.
717 (finish_equivalences): Ensure proper alignment.
719 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
721 * trans-const.c: Don't include unused math.h.
723 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
724 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
725 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
727 (prepare_arg_info): Fix formatting, indenting and remove trailing
729 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
732 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
733 gfc_constant_result, gfc_range_check, gfc_arith_power,
734 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
735 gfc_real2complex, gfc_complex2int, gfc_complex2real,
736 gfc_complex2complex): Fix whitespace issues.
737 * check.c (must_be, type_check, numeric_check, int_or_real_check,
738 logical_array_check, array_check, scalar_check, nonoptional_check,
739 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
740 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
741 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
742 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
743 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
744 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
745 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
746 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
747 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
748 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
749 gfc_check_lbound, gfc_check_logical, min_max_args,
750 gfc_check_min_max_integer, gfc_check_min_max_real,
751 gfc_check_min_max_double, gfc_check_matmul,
752 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
753 gfc_check_pack, gfc_check_precision, gfc_check_radix,
754 gfc_check_range, gfc_check_real, gfc_check_repeat,
755 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
756 gfc_check_set_exponent): Fix formatting issues.
757 (gfc_check_size, gfc_check_sign): Alphabetize function order,
758 remove whitespace-only line.
759 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
760 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
761 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
762 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
763 gfc_check_random_number, gfc_check_random_seed,
764 gfc_check_second_sub, gfc_check_system_clock,
765 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
766 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
767 gfc_check_unlink_sub): Fix formatting issues.
769 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
771 * gfortran.h: Remove outdated comment. Don't include stdio.h
774 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
776 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
777 output of 'gfortran --version'.
779 2005-01-03 Steven G. Kargl <kargls@comcast.net>
781 * arith.c: Add system.h; remove string.h
787 * check.c: Remove stdlib.h and stdarg.h
788 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
789 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
790 * f95-lang.c: Add system.h; remove stdio.h
791 * interface.c: Add system.h; remove stdlib.h and string.h
792 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
793 * io.c: Remove string.h
795 * match.c: Remove stdarg.h and string.h
796 * misc.c: Update copyright; add system.h; remove stdlib.h,
797 string.h, and sys/stat.h
798 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
800 * option.c: Remove string.h and stdlib.h
802 * scanner.c: Update copyright; add system.h; remove stdlib.h,
803 stdio.h, string.h, and strings.h
804 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
805 * trans-array.c: Remove stdio.h and gmp.h
806 * trans-const.c: Ditto
807 * trans-expr.c: Ditto
809 * trans-stmt.c: Ditto
811 * trans-intrinsic.c: Remove stdio.h and string.h
813 2004-12-29 Steven G. Kargl <kargls@comcast.net>
815 * gfortran.h (gfc_case): fix typo in comment.
817 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
819 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
820 logical shift. Call fold. Remove 0-bit shift shortcut.
821 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
822 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
823 result if width(arg 1) < 4 bytes. Call fold.
826 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
827 in front of function to match the standard. Correct handling
830 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
832 * trans-expr.c (gfc_conv_cst_int_power): Only check for
833 flag_unsafe_math_optimizations if we have a float type.
835 2004-12-23 Steven G. Kargl <kargls@comcast.net>
837 * gfortran.texi: Fix typo.
839 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
841 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
844 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
847 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
848 (gfc_match_nullify): Make sure that ')' is in front of the end of
851 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
854 2004-12-14 Richard Henderson <rth@redhat.com>
856 * gfortran.h (gfc_expr.function.name): Make const.
857 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
858 (gfc_get_string): Update prototype.
859 * iresolve.c: Include tree.h.
860 (string_node, HASH_SIZE, string_head, hash): Remove.
861 (gfc_get_string): Use vsnprintf, get_identifier.
862 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
863 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
864 (gfc_done_1): Don't call gfc_iresolve_done_1.
865 * module.c (mio_allocated_string): Take and return const char *,
866 instead of modifying char**.
867 (mio_expr): Update to match.
868 * resolve.c (pure_function): Constify name argument.
869 (resolve_function): Constify name.
870 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
872 2004-12-12 Richard Henderson <rth@redhat.com>
874 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
875 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
876 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
877 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
878 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
879 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
880 gfc_resolve_unpack: Use PREFIX.
882 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
885 * match.c (gfc_match_common): Skip whitespace.
887 2004-12-12 Steven G. Kargl <kargls@comcast.net>
890 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
891 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
892 integer kind check; Issue error for -std=f95 when needed.
893 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
895 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
896 Promote arguments to same kind.
898 2004-12-12 Steven G. Kargl <kargls@comcast.net>
899 Paul Brook <paul@codesourcery.com>
902 * resolve.c (gfc_resolve_iterator_expr): New function.
903 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
904 start, end and stride to correct type.
905 (resolve_code): Pass extra argument.
906 * array.c (resolve_array_list): Pass extra argument.
907 * gfortran.h (gfc_resolve): Add prototype.
908 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
909 Handle real type iterators.
911 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
914 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
915 same kind as C's 'int'.
916 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
918 2004-12-08 Richard Henderson <rth@redhat.com>
920 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
921 to the output expression.
922 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
924 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
927 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
930 * resolve.c (resolve_code): Impose correct restrictions on
933 * decl.c (gfc_match_end): Use locus of END when eos is an error.
935 2004-12-02 Steven G. Kargl <kargls@comcast.net>
936 Paul Brook <paul@codesourcery.com>
938 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
939 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
940 (gfc_check_stat, gfc_check_stat_sub): New functions.
941 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
942 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
943 fstat, and stat to intrinsics symbol tables.
944 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
945 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
946 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
947 (gfc_resolve_stat, gfc_resolve_flush): New functions.
948 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
949 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
951 2004-12-02 Steven G. Kargl <kargls@comcast.net>
953 * intrinsic.c: Fix and add comments, fix function declarations
954 (OPTIONAL,REQUIRED): New symbols
955 (add_functions,add_subroutines): Use symbols
956 (gmp.h): Remove unused include
958 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
960 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
963 2004-11-24 Steven Bosscher <stevenb@suse.de>
965 * options.c (gfc_post_options): Don't clear flag_inline_functions.
967 2004-11-20 Steven G. Kargl <kargls@comcast.net>
969 * check.c (gfc_check_getcwd_sub): Fix seg fault.
971 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
972 gfc_check_unlink,gfc_check_unlink_sub): New functions
973 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
974 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
975 exit to intrinsics symbol tables.
976 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
977 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
978 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
979 gfc_resolve_unlink_sub): Add and sort prototypes.
980 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
981 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
982 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
984 2004-11-16 Paul Brook <paul@codesourcery.com>
987 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
988 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
989 * trans-types.c (gfc_get_dtype): Accept array type rather than element
991 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
992 (gfc_get_array_type_bounds): Ditto.
993 (gfc_get_derived_type): Recurse into derived type pointers.
994 * trans-types.h (gfc_get_dtype): Add prototype.
995 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
997 2004-11-15 Paul Brook <paul@codesourcery.com>
999 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
1001 2004-11-10 Paul Brook <paul@codesourcery.com>
1004 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
1005 * trans-io.c (transfer_array_component): Ditto.
1007 2004-11-10 Paul Brook <paul@codesourcery.com>
1009 * invoke.texi: Fix typo.
1011 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
1013 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
1014 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
1015 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
1016 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
1017 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
1019 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1022 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
1024 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
1026 * gfortranspec.c: Replace GNU CC with GCC.
1028 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1030 * gfortranspec.c (lang_specific_driver): Change year to 2004.
1032 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1035 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
1038 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1041 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
1042 module procedures as if they were module variables.
1044 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1049 * module.c (write_symbol1): Set module_name for dummy arguments.
1051 2004-11-02 Paul Brook <paul@codesourcery.com>
1053 * intrinsic.c (check_intrinsic_standard): Include error locus.
1055 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
1056 locus to check_intrinsic_standard.
1058 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
1061 * gfortran.h: Change GFC_STD_* flags to more appropriate
1062 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
1063 gfc_option_t): Add field for warning about use of nonstandard
1065 * intrinsic.c (add_sym): Add parameter for standard version, check
1066 this against current standard.
1067 (add_sym_0): Pass standard parameter to add_sym.
1068 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
1069 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
1070 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
1071 (make_generic): Add parameter for standard, check this
1072 against currently selected standard.
1073 (add_functions, add_subroutines): Add parameter to tell which
1074 standard an intrinsic belongs to.
1075 (check_intrinsic_standard): New function.
1076 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
1077 (gfc_intrinsic_sub_interface): Ditto.
1078 * lang.opt: Add Wnonstd-intrinsics option.
1079 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
1081 (set_Wall): Add warning about nonstd intrinsics.
1082 (gfc_handle_option): Change to use new GFC_STD_* flags,
1084 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
1086 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
1088 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
1090 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1092 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
1094 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1096 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
1099 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
1101 * check.c (gfc_check_rand): Allow missing optional argument.
1102 (gfc_check_irand): Ditto.
1103 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
1105 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
1107 PR fortran/13490, PR fortran/17912
1108 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
1109 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
1110 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
1111 warning when compiling with pedantic.
1112 * gcc/fortran/arith.c: Set minimum integer values to reflect
1113 realities of two's complement signed integers. Added
1116 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
1118 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
1119 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
1122 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1124 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
1126 (gfc_generate_function_code): Fix formatting issue.
1128 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1130 * module.c: Fix formatting issues.
1132 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1134 * module.c (mio_interface_rest): Set where member of interface
1137 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
1140 * options.c (gfc_handle_option): Add break after handing the
1143 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
1145 * arith.c: Fix formatting issues.
1147 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1150 * resolve.c (resolve_operator): Use correct operator name in message.
1152 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1154 * primary.c (match_boz_constant): Allow kind parameter suffixes.
1155 Move standard warning further to the front.
1157 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
1159 * trans-stmt.c: Fix a comment typo.
1161 2004-10-07 Paul Brook <paul@codesourcery.com>
1164 * trans-array.c (gfc_trans_deferred_array): Leave use associated
1167 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1170 * simplify.c (twos_complement): New function.
1171 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
1173 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
1175 2004-10-06 Paul Brook <paul@codesourcery.com>
1177 * trans-stmt.c (gfc_trans_simple_do): New function.
1178 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
1179 loop. Update comments.
1181 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1184 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
1188 * intrinsic.c (add_sym_5): Remove.
1189 (add_subroutines): Add resolution function for MVBITS.
1190 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
1192 * iresolve.c (gfc_resolve_mvbits): New function.
1193 (gfc_resolve_random_number): Remove empty line at end of function.
1195 * trans-const.c (gfc_build_cstring_const): New function.
1196 (gfc_init_cst): Use new function.
1197 * trans-const.h (gfc_build_cstring_const): Add prototype.
1198 * trans-io.c (set_string, set_error_locus): Use new function.
1199 * trans-stmt.c (gfc_trans_goto): Use new function.
1202 * parse.c (accept_statement): Don't treat END DO like END IF and
1204 (parse_do_block): Generate possible END DO label inside END DO
1208 * check.c (gfc_check_system_sub): New function.
1209 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
1210 * intrinsic.c (add_functions): Add 'system'.
1211 (add_subroutines): Add 'system'.
1212 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
1213 Move prototypes to other suborutines.
1214 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
1216 (gfc_resolve_system_clock): Fix formatting of prototype.
1217 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
1219 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
1222 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
1224 * scanner.c (preprocessor_line): Accept preprocessor lines without
1225 file names. Check file names for closing quotes. Handle escaped
1226 quotes in file names.
1228 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1229 Paul Brook <paul@codesourcery.com>
1231 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
1232 Use gfc_get_expr_charlen.
1233 * trans-expr.c (gfc_get_expr_charlen): New function.
1234 * trans.h (gfc_get_expr_charlen): Add prototype.
1236 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
1238 * trans-intrinsic.c: Fix a comment typo.
1240 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1242 * simplify.c (range_check): Remove blank line at beginning of function.
1243 (gfc_simplify_dint): Same at end of function.
1244 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
1245 (gfc_simplify_bound): Fix indentation.
1246 (gfc_simplify_log10): Simplify calculation.
1247 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
1249 (gfc_simplify_nearest): Same at end of function.
1250 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
1252 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
1253 gfc_simplify_spacing): Simplify calulations.
1255 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
1257 * trans-intrinsic.c: Fix comments on spacing and rrspacing
1258 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
1260 2004-10-01 Jan Hubicka <jh@suse.cz>
1262 * f95-lang.c (gfc_expand_function): Update call of
1263 tree_rest_of_compilation.
1264 * trans-decl.c (gfc_generate_constructors): Likewise.
1266 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1268 * trans-intrinsic.c: Comment fixes.
1270 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1272 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
1274 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1276 * trans-types.c (gfc_return_by_reference): Remove superfluous
1279 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
1280 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
1283 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
1284 function to determine return type.
1286 2004-09-20 Jan Hubicka <jh@suse.cz>
1288 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
1290 (gfc_generate_function_code): Likewise.
1292 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1295 * simplify.c (gfc_simplify_reshape): Set shape of return value
1298 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1299 Zack Weinberg <zack@codesourcery.com>
1301 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
1302 enumeration constants.
1304 2004-09-17 Paul Brook <paul@codesourcery.com>
1306 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
1307 (gfc_linebuf_header_size): Define.
1308 * scanner.c (load_file): Use it.
1310 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1312 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
1313 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
1314 resolve.c, scanner.c, trans-array.c, trans-array.h,
1315 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
1316 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1317 trans.h: Fix comment typos. Follow spelling conventions.
1319 2004-09-16 Victor Leikehman <lei@il.ibm.com>
1322 * trans-io.c (transfer_array_component): New function.
1323 (transfer_expr): For array fields, call transfer_array_component.
1325 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1327 * gfortran.texi: Fix a typo.
1329 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1331 * parse.c (eof_buf): Rename eof to eof_buf.
1332 (unexpected_eof): Same.
1333 (gfc_parse_file): Same.
1335 2004-09-15 Steven G. Kargl <kargls@comcast.net>
1337 * check.c (gfc_check_getcwd_sub): New function.
1338 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
1339 * intrinsic.c (add_functions): Add function definition;
1341 * intrinsic.c (add_subroutines): Add subroutine definitions.
1342 * intrinsic.h: Add prototypes.
1343 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
1345 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
1347 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1350 * module.c (write_symbol): Don't fill in module name here.
1351 (write_symbol0): Fill in here instead.
1353 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
1355 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
1356 trans-array.c, trans-common.c, trans-expr.c,
1357 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
1358 comment typos. Follow spelling conventions.
1360 2004-09-09 Paul Brook <paul@codesourcery.com>
1362 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
1364 2004-09-08 Paul Brook <paul@codesourcery.com>
1366 * array.c: Don't include assert.h.
1367 * data.c: Don't include assert.h. Replace assert and abort with
1368 gcc_assert and gcc_unreachable.
1369 * dependency.c: Ditto.
1370 * f95-lang.c: Ditto.
1371 * iresolve.c: Ditto.
1373 * simplify.c: Ditto.
1375 * trans-array.c: Ditto.
1376 * trans-common.c: Ditto.
1377 * trans-const.c: Ditto.
1378 * trans-decl.c: Ditto.
1379 * trans-expr.c: Ditto.
1380 * trans-intrinsic.c: Ditto.
1381 * trans-io.c: Ditto.
1382 * trans-stmt.c: Ditto.
1383 * trans-types.c: Ditto.
1386 2004-09-07 Per Bothner <per@bothner.com>
1387 Paul Brook <paul@codesourcery.com>
1389 * error.c (show_locus): Handle mapped locations.
1390 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
1391 * gfortran.h: Include input.h.
1392 (struct gfc_linebuf): Use source_location.
1393 * scanner.c (get_file): Initialize linemap.
1394 (preprocessor_line): Pass extra argument to get_file.
1395 (load_file): Ditto. Setup linemap.
1396 (gfc_new_file): Handle mapped locations.
1397 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
1398 Set decl source locations.
1399 (gfc_trans_common): Set blank common block location.
1400 * trans-decl.c (gfc_set_decl_location): New function.
1401 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
1402 (trans_function_start): Move call to gfc_set_backend_locus..
1403 (build_function_decl): ... to here.
1404 (build_entry_thunks): Set and restore the backend locus.
1405 (gfc_generate_constructors): Remove excess arguments to
1406 init_function_start.
1407 (gfc_generate_block_data): Add comments. Set the decl locus.
1408 * trans-io.c (set_error_locus): Handle mapped locations.
1409 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
1410 (gfc_trans_code): Use SET_EXPR_LOCATION.
1411 (gfc_generate_code): Override the location of the new symbol.
1412 * trans.h (gfc_set_decl_location): Add prototype.
1414 2004-08-31 Paul Brook <paul@codesourcery.com>
1416 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
1418 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1421 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
1424 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1429 * resolve.c (resolve_transfer): New function.
1430 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
1432 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1435 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
1438 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1440 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
1442 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1445 * trans-types.c (gfc_return_by_reference): Remove TODO error,
1446 add comment pointing out possible issue WRT compatibility with g77.
1448 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1450 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
1451 all occurences of 'gfc_strlen_type_node' by
1452 'gfc_charlen_type_node'.
1453 * trans-types.h: Same. Also update comment accordingly.
1455 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1457 * primary.c: Update copyright boilerplate to say GCC.
1458 * f95-lang.c: Change initial comment to say gfortran.
1460 2004-08-31 Paul Brook <paul@codesourcery.com>
1462 * trans-types.h: Add comments.
1463 (intmax_type_node, string_type_node, const_string_type_node): Remove.
1465 2004-08-30 Richard Henderson <rth@redhat.com>
1467 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
1468 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
1469 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
1470 c_long, c_long_long.
1471 (gfc_logical_info): Add c_bool.
1472 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
1473 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
1474 rather than gfc_int[48]_type_node for allocate choice.
1475 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
1476 local copies of some kind type nodes.
1477 (gfc_build_builtin_function_decls): Likewise.
1478 * trans-expr.c (gfc_conv_power_op): Likewise.
1479 * trans-intrinsic.c (gfc_conv_intrinsic_index,
1480 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
1481 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
1482 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
1483 gfc_trans_character_select, gfc_trans_allocate): Likewise.
1484 * trans-io.c (gfc_pint4_type_node): Move into ...
1485 (gfc_build_io_library_fndecls): ... here. Cache local copies of
1486 some kind type nodes.
1487 * trans-types.c (gfc_type_nodes): Remove.
1488 (gfc_character1_type_node, gfc_strlen_type_node): New.
1489 (gfc_integer_types, gfc_logical_types): New.
1490 (gfc_real_types, gfc_complex_types): New.
1491 (gfc_init_kinds): Fill in real mode_precision.
1492 (gfc_build_int_type, gfc_build_real_type): New.
1493 (gfc_build_complex_type, gfc_build_logical_type): New.
1494 (c_size_t_size): New.
1495 (gfc_init_types): Loop over kinds.
1496 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
1497 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
1498 (gfc_get_character_type_len): Likewise.
1499 (gfc_type_for_size): Loop over kinds; use a reduced set of
1500 unsigned type nodes.
1501 (gfc_type_for_mode): Loop over kinds.
1502 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
1503 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
1504 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
1505 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
1506 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
1507 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
1508 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
1509 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
1510 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
1511 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
1512 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
1513 gfc_complex8_type_node, gfc_complex16_type_node,
1514 gfc_logical1_type_node, gfc_logical2_type_node,
1515 gfc_logical4_type_node, gfc_logical8_type_node,
1516 gfc_logical16_type_node, gfc_strlen_kind): Remove.
1517 (gfc_character1_type_node): Turn in to a variable.
1518 (gfc_strlen_type_node): Likewise.
1520 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1522 * gfortran.h (gfc_namespace): Add new field is_block_data.
1523 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
1524 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
1525 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
1526 * trans.h (gfc_generate_block_data): Add prototype.
1527 * trans-decl.c (gfc_generate_block_data): New function.
1529 2004-08-29 Richard Henderson <rth@redhat.com>
1531 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
1532 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
1533 than two HOST_WIDE_INT.
1535 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1538 * decl.c (free_variable, free_value, gfc_free_data, var_list,
1539 var_element, top_var_list, match_data_constant, top_val_list,
1540 gfc_match_data): Move here from match.c.
1541 (match_old_style_init): New function.
1542 (variable_decl): Match old-style initialization.
1543 * expr.c (gfc_get_variable_expr): New function.
1544 * gfortran.h (gfc_get_variable_expr): Add prototype.
1545 * gfortran.texi: Start documentation for supported extensions.
1546 * match.c: Remove the functions moved to decl.c.
1547 * match.h (gfc_match_data): Move prototype to under decl.c.
1548 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
1551 2004-08-29 Steven G. Kargl <kargls@comcast.net>
1552 Paul Brook <paul@codesourcery.com>
1554 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
1555 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
1556 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1557 (build_builtin_fntypes): New function.
1558 (gfc_init_builtin_functions): Use it.
1559 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
1560 and GFC_ISYM_ERF{,C}.
1561 (gfc_c_int_kind): Declare.
1562 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
1563 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
1564 gfc_resolve_g77_math1): Add prototypes.
1565 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
1566 * mathbuiltins.def: Add comment. Change third argument. Use
1567 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
1568 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
1569 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1570 * trans-types.c (gfc_c_int_kind): Declare.
1571 (gfc_init_kinds): Set it.
1573 2004-08-29 Steven G. Kargl <kargls@comcast.net>
1574 Paul Brook <paul@codesourcery.com>
1576 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
1577 (gfc_check_f, gfc_simplify_f): Add f0.
1578 * intrinsic.c (do_check): Call f0. Flatten.
1579 (add_sym_0): Fix prototype. Set f0.
1580 (add_functions): Add getgid, getgid and getuid.
1581 (resolve_intrinsic): Remove obsolete comment.
1582 (do_simplify): Call f0.
1583 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
1584 gfc_resolve_getuid): Add prototypes.
1585 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
1586 gfc_resolve_getuid): New functions.
1587 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
1590 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1592 * error.c (gfc_error_init_1): Remove blank line in front of
1593 function body. Add missing blank.
1594 (gfc_buffer_error, error_char, error_string): Remove blank line in
1595 front of function body.
1596 (show_locus): Add comma in comment.
1597 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
1598 gfc_push_error, gfc_pop_error): Remove blank line in front of
1600 (gfc_get_errors): Typo fix in comment in front of function. Remove
1601 blank line in front of function body.
1603 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1605 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
1606 variable declaration of same name.
1607 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
1608 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
1609 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
1610 Replace all calls to gfc_default_*_kind with variable accesses.
1611 * trans-types.c: Same as above.
1612 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
1613 static qualifier. Replace all occurences.
1614 (gfc_default_*_kind): Remove functions.
1616 2004-08-26 Richard Henderson <rth@redhat.com>
1618 * arith.c: Include system.h, not real system headers.
1619 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
1620 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
1621 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
1622 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
1623 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
1624 gfc_index_integer_kind, gfc_default_integer_kind,
1625 gfc_default_real_kind,gfc_default_double_kind,
1626 gfc_default_character_kind, gfc_default_logical_kind,
1627 gfc_default_complex_kind, validate_integer, validate_real,
1628 validate_logical, validate_character,
1629 gfc_validate_kind): Move to trans-types.c.
1630 (gfc_set_model_kind): Use gfc_validate_kind.
1631 (gfc_set_model): Just copy the current precision to default.
1632 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
1633 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
1634 * gfortran.h: Update file commentary.
1635 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
1636 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
1637 gfc_default_double_kind_1, gfc_default_character_kind_1,
1638 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
1639 (gfc_init_kinds): New.
1640 (gfc_init_types): Don't set gfc_index_integer_kind here.
1641 * trans-types.h (gfc_init_kinds): Declare.
1642 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
1644 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1646 * check.c (gfc_check_atan2): New function.
1647 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
1648 * intrinsic.h (gfc_check_atan2): Add prototype.
1650 2004-08-25 Richard Henderson <rth@redhat.com>
1652 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
1653 false and we don't validate the kind.
1654 (gfc_check_integer_range, gfc_check_real_range): Update to match.
1655 * check.c (kind_check): Likewise.
1656 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
1657 (match_char_spec, match_logical_spec): Likewise.
1658 * gfortran.h (gfc_validate_kind): Likewise.
1659 * options.c (gfc_handle_option): Likewise.
1660 * primary.c (match_integer_constant, match_real_constant,
1661 match_string_constant, match_logical_constant,
1662 match_const_complex_part): Likewise.
1663 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
1664 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
1665 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
1666 gfc_simplify_maxexponent, gfc_simplify_minexponent,
1667 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
1668 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
1669 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
1670 gfc_simplify_tiny): Likewise.
1671 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
1672 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1673 prepare_arg_info): Likewise.
1675 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1677 * expr.c (gfc_check_assign): Add comment. Add new warning.
1678 * trans-expr.c (gfc_conv_function_call): Correctly dereference
1679 result of pointer valued function when not in pointer assignment.
1681 2004-08-25 Paul Brook <paul@codesourcery.com>
1683 * config-lang.in: Remove dead commented line.
1684 * module.c: Replace g95 with gfortran in comment.
1686 2004-08-25 Paul Brook <paul@codesourcery.com>
1689 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
1691 2004-08-25 Paul Brook <paul@codesourcery.com>
1694 * trans-array.c (gfc_trans_allocate_temp_array): Remove
1695 string_length argument.
1696 (gfc_trans_array_ctor_element): New function.
1697 (gfc_trans_array_constructor_subarray): Use it.
1698 (gfc_trans_array_constructor_value): Ditto. Handle constant
1700 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
1701 (gfc_trans_array_constructor): Use them.
1702 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
1703 (gfc_conv_ss_descriptor): Remember section string length.
1704 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
1705 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
1706 (gfc_conv_expr_descriptor): Ditto.
1707 (gfc_conv_loop_setup): Ditto. Spelling fixes.
1708 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
1709 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
1710 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
1711 (gfc_conv_variable): Set string_length from section.
1712 (gfc_conv_function_call): Remove extra argument.
1713 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
1714 * trans-types.c (gfc_get_character_type_len): New function.
1715 (gfc_get_character_type): Use it.
1716 (gfc_get_dtype): Return zero for internal types.
1717 * trans-types.h (gfc_get_character_type_len): Add prototype.
1718 * trans.h (struct gfc_ss): Move string_length out of union.
1720 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1722 * trans.h (build2_v, build3_v): New macros.
1724 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
1726 * trans-array.c (gfc_conv_descriptor_data,
1727 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
1728 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
1729 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
1730 gfc_trans_allocate_temp_array,
1731 gfc_trans_array_constructor_subarray,
1732 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
1733 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
1734 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
1735 gfc_conv_array_ref, gfc_trans_preloop_setup,
1736 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
1737 gfc_conv_loop_setup, gfc_array_init_size,
1738 gfc_conv_array_initializer, gfc_trans_array_bounds,
1739 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1740 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
1741 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
1742 of build and build_v as appropriate.
1743 * trans-common.c (create_common): Same.
1744 * trans-decl.c (gfc_trans_auto_character_variable,
1745 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
1746 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
1747 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
1748 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
1749 gfc_conv_expr_op, gfc_conv_function_call,
1750 gfc_trans_structure_assign): Same.
1751 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
1752 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
1753 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1754 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
1755 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
1756 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
1757 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
1758 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
1759 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
1760 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
1761 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
1762 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
1763 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
1764 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
1765 gfc_conv_intrinsic_iargc): Same.
1766 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
1767 set_flag, add_case, io_result, transfer_namelist_element,
1768 transfer_expr): Same.
1769 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
1770 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
1771 gfc_trans_integer_select, gfc_trans_logical_select,
1772 gfc_trans_character_select, gfc_trans_forall_loop,
1773 gfc_trans_nested_forall_loop, gfc_do_allocate,
1774 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
1775 compute_inner_temp_size, compute_overall_iter_number,
1776 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
1777 gfc_trans_forall_1, gfc_evaluate_where_mask,
1778 gfc_trans_where_assign, gfc_trans_allocate): Same.
1779 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
1780 * trans.c (gfc_add_modify_expr, gfc_finish_block,
1781 gfc_build_array_ref, gfc_build_function_call,
1782 gfc_trans_runtime_check): Same.
1784 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1786 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
1787 build_int_cst to build_int_cst_wide in accordance to Nathan's
1790 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
1792 * trans-array.c (gfc_trans_array_constructor_value): Adjust
1793 build_int_cst calls.
1794 * trans-const.c (gfc_build_string_const, gfc_init_constants,
1795 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
1796 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
1797 gfc_trans_entry_master_switch): Likewise.
1798 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
1799 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
1800 * trans-io.c (add_case, set_error_locus,
1801 transfer_namelist_element, transfer_expr): Likewise.
1802 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
1803 gfc_trans_stop, gfc_trans_character_select): Likewise.
1804 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
1805 * trans.c (gfc_trans_runtime_check): Likewise.
1807 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1809 * trans-decl.c, trans-types.c: Add and remove blank lines as
1812 2004-08-24 Richard Henderson <rth@redhat.com>
1814 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
1816 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1818 * resolve.c (merge_argument_lists): Revert unintentionally
1821 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1823 * trans-decl.c (build_function_decl): Fix spelling in comment.
1824 (build_entry_thunks): Remove code with no function.
1825 (gfc_build_intrinsic_function_decls): Remove empty line.
1827 * resolve.c (resolve_entries): Fix a bunch of comment typos.
1829 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1831 * f95-lang.c (gfc_init_decl_processing): Adjust
1832 build_common_tree_nodes call.
1834 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1836 * trans-types.c: Spelling and formatting fixes.
1838 2004-08-23 Richard Henderson <rth@redhat.com>
1840 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
1841 of going through an intermediate string. Fix 32/64 int/long bug.
1843 2004-08-23 Eric Christopher <echristo@redhat.com>
1845 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
1846 usage. Use build_vector_type_for_mode for vector types.
1848 2004-08-22 Richard Henderson <rth@redhat.com>
1851 * data.c (find_con_by_offset): Search ordered list; handle
1852 elements with repeat counts.
1853 (gfc_assign_data_value_range): New.
1854 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
1855 (gfc_assign_data_value_range): Declare.
1856 * match.c (top_val_list): Extract repeat count into a temporary.
1857 * resolve.c (values): Make left unsigned.
1858 (next_data_value): Don't decrement left.
1859 (check_data_variable): Use gfc_assign_data_value_range.
1861 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1863 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
1865 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1867 * check.c (gfc_check_reduction): Rename to ...
1868 (check_reduction): ... this. Make static. Don't check type of
1870 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
1871 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
1872 SUM to use new check functions.
1873 (check_specific): Change logic to call new functions.
1874 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
1876 (gfc_check_reduction): Remove prototype.
1878 2004-08-20 Paul Brook <paul@codesourcery.com>
1879 Canqun Yang <canqun@nudt.edu.cn>
1882 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
1883 for automatic arrays.
1884 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
1886 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1890 * match.c (match_simple_forall, match_simple_where): Forward-declare.
1891 (gfc_match_if): Order statement list alphabetically, add WHERE and
1892 FORALL, remove double PAUSE.
1893 (gfc_match_simple_where, match_forall_header,
1894 gfc_match_simple_forall): New functions.
1895 (gfc_match_forall): Use match_forall_header.
1897 2004-08-19 Paul Brook <paul@codesourcery.com>
1900 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
1901 * symbol.c (gfc_clear_attr): Use memset.
1903 2004-08-19 Paul Brook <paul@codesourcery.com>
1907 * data.c (assign_substring_data_value): Remove.
1908 (create_character_intializer): New function.
1909 (gfc_assign_data_value): Track the typespec for the current
1910 subobject. Use create_character_intializer.
1912 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
1915 * check.c (gfc_check_reduction): New function.
1916 (gfc_check_minval_maxval): Removed.
1917 (gfc_check_product): Removed.
1918 (gfc_check_sum): Removed.
1919 * intrinsic.h: Add/remove declarations for these.
1920 * gfortran.h: Add field f3red to union gfc_check_f.
1921 * intrinsic.c (add_sym_3red): New function.
1922 (add_functions): Register maxval, minval, product, and sum intrinsics
1923 through add_sym_3red.
1924 (check_specific): Handle f3red union field.
1925 * iresolve.c: Whitespace change.
1927 2004-08-18 Paul Brook <paul@codesourcery.com>
1929 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
1931 2004-08-18 Victor Leikehman <lei@il.ibm.com>
1934 * trans-io.c (transfer_namelist_element): New. Recursively handle
1935 derived-type variables. Pass string lengths.
1936 (build_dt): Code moved to build_namelist, with some
1937 changes and additions.
1938 (gfc_build_io_library_fndecls): Declare the fifth
1939 argument in st_set_nml_var_char -- string_length.
1941 2004-08-17 Paul Brook <paul@codesourcery.com>
1942 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1945 * decl.c (get_proc_name): Update mystery comment.
1946 (gfc_match_entry): Check for errors earlier. Add entry point to list.
1947 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
1948 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
1949 (struct gfc_entry_list): Define.
1950 (gfc_get_entry_list): Define.
1951 (struct gfc_namespace): Add refs and entries.
1952 (enum gfc_exec_op): Add EXEC_ENTRY.
1953 (struct gfc_code): Add ext.entry.
1954 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
1955 (mio_symbol_attribute): Don't save/reture addr->entry.
1956 (mio_namespace_ref): Refcount namespaces.
1957 * parse.c (accept_statement): Handle ST_ENTRY.
1958 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
1959 (parse_contained): Fixup sibling references to entry points
1960 after parsing the procedure body.
1961 * resolve.c (resolve_contained_fntype): New function.
1962 (merge_argument_lists, resolve_entries): New functions.
1963 (resolve_contained_functions): Use them.
1964 (resolve_code): Handle EXEC_ENTRY.
1965 (gfc_resolve): Call resolve_entries.
1966 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
1967 * symbol.c (gfc_get_namespace): Refcount namespaces.
1968 (gfc_free_namespace): Ditto.
1969 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
1970 optional when multiple entry points are present.
1971 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
1972 (gfc_get_extern_function_decl): Add assertion. Fix coment.
1973 (create_function_arglist, trans_function_start, build_entry_thunks):
1975 (gfc_build_function_decl): Rename ...
1976 (build_function_decl): ... to this.
1977 (gfc_create_function_decl): New function.
1978 (gfc_generate_contained_functions): Use it.
1979 (gfc_trans_entry_master_switch): New function.
1980 (gfc_generate_function_code): Use new functions.
1981 * trans-stmt.c (gfc_trans_entry): New function.
1982 * trans-stmt.h (gfc_trans_entry): Add prototype.
1983 * trans-types.c (gfc_get_function_type): Add entry point argument.
1984 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
1985 (gfc_generate_module_code): Call gfc_create_function_decl.
1986 * trans.h (gfc_build_function_decl): Remove.
1987 (gfc_create_function_decl): Add prototype.
1989 2004-08-15 Andrew Pinski <apinski@apple.com>
1992 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
1993 for cabs{,f} and copysign{,f}.
1994 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
1995 (gfor_fndecl_math_cabs): Delete.
1996 (gfor_fndecl_math_sign4): Delete.
1997 (gfor_fndecl_math_sign8): Delete.
1998 (gfc_build_intrinsic_function_decls): Remove the
1999 initializing of cabs{,f} and copysign{,f} functions.
2000 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
2001 instead of the functions definitions.
2002 (gfc_conv_intrinsic_sign): Likewise.
2003 * trans.h (gfor_fndecl_math_cabsf): Delete.
2004 (gfor_fndecl_math_cabs): Delete.
2005 (gfor_fndecl_math_sign4): Delete.
2006 (gfor_fndecl_math_sign8): Delete.
2008 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
2010 * trans-array.c (gfc_trans_array_constructor_value): Use
2012 * trans-const.c (gfc_build_string_const,
2013 gfc_init_constants, gfc_conv_mpz_to_tree,
2014 gfc_conv_constant_to_tree): Likewise.
2015 * trans-decl.c (gfc_get_symbol_decl): Likewise.
2016 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2017 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2018 * trans-io.c (add_case, set_error_locus, build_dt,
2019 transfer_expr): Likewise.
2020 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2021 gfc_trans_stop, gfc_trans_character_select): Likewise.
2022 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2023 * trans.c (gfc_trans_runtime_check): Likewise.
2025 2004-08-14 Paul Brook <paul@codesourcery.com>
2027 * trans-decl.c (gfc_build_function_decl): Remove dead code.
2029 2004-08-14 Paul Brook <paul@codesourcery.com>
2031 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
2033 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2035 * gfortran.h: Add comments.
2036 * parse.c (parse_contained): Fix comment typo.
2037 * resolve.c (was_declared): Ditto.
2040 2004-08-11 Paul Brook <paul@codeourcery.com>
2043 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
2045 2004-08-10 Richard Henderson <rth@redhat.com>
2047 * f95-lang.c (gfc_init_builtin_functions): Remove
2048 __builtin_stack_alloc, add __builtin_alloca.
2049 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
2050 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
2052 2004-08-10 Paul Brook <paul@codesourcery.com>
2054 * trans-io.c (transfer_expr): Handle pointters.
2056 2004-08-10 Paul Brook <paul@codesourcery.com>
2059 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
2060 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
2061 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
2062 Handle GFC_SS_COMPONENT.
2063 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
2064 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
2066 (gfc_conv_array_initializer): Call specific initializer routines.
2067 * trans-expr.c (gfc_trans_structure_assign): New function.
2068 (gfc_trans_subarray_assign): New function.
2069 (gfc_trans_subcomponent_assign): New fucntion
2070 (gfc_conv_structure): Use them.
2071 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
2072 (gfc_ss): Add shape.
2074 2004-08-08 Victor Leikehman <lei@il.ibm.com>
2076 * simplify.c (gfc_simplify_shape): Bugfix.
2077 * expr.c (gfc_copy_shape_excluding): New function.
2078 * gfortran.h (gfc_get_shape): Bugfix.
2079 (gfc_copy_shape_excluding): Added declaration.
2080 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2081 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
2082 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
2083 time resolution of shape.
2085 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
2087 * intrinsic.c (add_subroutines): Add getenv and
2088 get_environment_variable. (add_sym_5s): New function.
2089 * intrinsic.h (gfc_resolve_get_environment_variable): Add
2091 * iresolve.c (gfc_resolve_get_environment_variable): New
2094 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
2096 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
2097 __builtin_pow[f] arguments.
2099 2004-08-06 Steven G. Kargl <kargls@comcast.net>
2101 * arith.c: Add #define for model numbers. Remove global GMP variables.
2102 (natural_logarithm,common_logarithm,exponential,sine,
2103 cosine,arctangent,hypercos,hypersine ): Remove.
2104 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
2105 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
2106 gfc_check_real_range, gfc_constant_result, gfc_range_check,
2107 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
2108 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
2109 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
2110 gfc_convert_complex,gfc_int2real,gfc_int2complex,
2111 gfc_real2int,gfc_real2real,gfc_real2complex,
2112 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
2113 to MPFR, use new functions.
2114 * arith.h: Remove extern global variables.
2115 (natural_logarithm,common_logarithm,exponential, sine, cosine,
2116 arctangent,hypercos,hypersine): Remove prototypes.
2117 (arctangent2): Update prototype from GMP to MPFR.
2118 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
2119 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
2120 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
2121 * gfortran.h (GFC_REAL_BITS): Remove.
2122 (arith): Add ARITH_NAN.
2123 Include mpfr.h. Define GFC_RND_MODE.
2124 Rename GCC_GFORTRAN_H GFC_GFC_H.
2125 (gfc_expr): Convert GMP to MPFR.
2126 * module.c: Add arith.h, correct type in comment.
2127 (mio_gmp_real): Convert GMP to MPFR.
2128 (mio_expr): Use gfc_set_model_kind().
2129 * primary.c: Update copyright date with 2004.
2130 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
2131 * simplify.c: Remove global GMP variables
2132 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
2133 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
2134 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
2135 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
2136 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
2137 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
2138 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
2139 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
2140 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
2141 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
2142 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
2143 gfc_simplify_rrspacing,gfc_simplify_scale,
2144 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
2145 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
2146 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
2147 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
2149 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
2150 gfc_conv_mpf_to_tree. Convert it to use MPFR
2151 (gfc_conv_constant_to_tree): Use it.
2152 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
2153 * trans-intrinsic.c: Add arith.h, remove gmp.h
2154 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
2156 2004-08-06 Victor Leikehman <lei@il.ibm.com>
2157 Paul Brook <paul@codesourcery.com>
2159 * trans-array.c (gfc_trans_allocate_array_storage,
2160 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
2161 gfc_conv_loop_setup): For functions, if the shape of the result
2162 is not known in compile-time, generate an empty array descriptor for
2163 the result and let the callee to allocate the memory.
2164 (gfc_trans_dummy_array_bias): Do nothing for pointers.
2165 (gfc_conv_expr_descriptor): Use function return values directly.
2166 * trans-expr.c (gfc_conv_function_call): Always add byref call
2168 (gfc_trans_pointer_assignment): Add comments.
2169 (gfc_trans_arrayfunc_assign): Don't chain on expression.
2171 2004-08-01 Roger Sayle <roger@eyesopen.com>
2173 * options.c (gfc_init_options): Don't warn about the use GNU
2174 extensions by default.
2175 (gfc_post_options): Warn about GNU extensions with -pedantic.
2176 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
2178 2004-07-30 Richard Henderson <rth@redhat.com>
2180 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
2183 2004-07-25 Richard Henderson <rth@redhat.com>
2185 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
2186 and DECL_IGNORED_P on RESULT_DECL.
2187 (gfc_generate_constructors): Likewise.
2189 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2192 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
2194 (ffixed-line-length-80, ffixed-line-length-132): Remove.
2195 * options.c (gfc_handle_options): Deal with changed options.
2196 * scanner.c (load_line): Change second arg to 'char **',
2197 allocate if pointing to NULL. Keep track of buffer's length.
2198 Adapt buffer size to overlong lines. Pad lines to full length
2200 (load_file): Adapt to new interface of load_line.
2202 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2204 * trans.h (builtin_function): Declare.
2206 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2209 (parts ported from g95)
2210 * parse.h (gfc_state_data): New field do_variable.
2211 (gfc_check_do_variable): Add prototype.
2212 * parse.c (push_state): Initialize field 'do_variable'.
2213 (gfc_check_do_variable): New function.
2214 (parse_do_block): Remember do iterator variable.
2215 (parse_file): Initialize field 'do_variable'.
2216 * match.c (gfc_match_assignment, gfc_match_do,
2217 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
2218 Add previously missing checks.
2219 (gfc_match_return): Reformat error message.
2220 * io.c (match_out_tag): New function.
2221 (match_open_element, match_close_element,
2222 match_file_element, match_dt_element): Call match_out_tag
2223 instead of match_vtag where appropriate.
2224 (match_io_iterator, match_io_element): Add missing check.
2225 (match_io): Reformat error message.
2226 (match_inquire_element): Call match_out_tag where appropriate.
2228 * parse.c (gfc_check_do_variable): Fix error locus.
2230 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2233 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
2234 for every assumed length character dummy argument.
2237 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
2240 * simplify.c (gfc_simplify_bound): Copy the bound expression.
2242 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2245 * trans-array.c gfc_trans_g77_array,
2246 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
2247 for assumed length characters.
2248 (gfc_conv_expr_descriptor): Set se->string_length if dealing
2249 with a character expression.
2250 (gfc_cvonv_array_parameter): Pass string length when passing
2251 character array according to g77 conventions.
2253 2004-07-12 Paul Brook <paul@codesourcery.com>
2255 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
2256 * trans-array.c (gfc_trans_auto_array_allocation): Remove
2257 initialization code.
2258 * trans-common.c (create_common): Use gfc_conv_initializer.
2259 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
2260 * trans-expr.c (gfc_conv_initializer): New function.
2261 (gfc_conv_structure): Use it.
2262 * trans.h (gfc_conv_initializer): Add prototype.
2264 2004-07-11 Paul Brook <paul@codesourcery.com>
2267 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
2269 (parse_contained): Mark contained symbols as referenced.
2271 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2274 * module.c (gfc_dump_module, gfc_use_module): Print locus
2275 when opening of module file fails.
2278 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
2281 * match.c (gfc_match_program): A program name is obligatory.
2282 (gfc_match_return): RETURN in main program is an extension.
2283 (gfc_match_block_data): A space is required before a block data
2287 * primary.c (match_boz_constant): Call gfc_notify_std only if
2288 we actually have a non-standard boz-literal-constant.
2291 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
2292 warning if assigning NULL().
2294 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
2296 * f95-lang.c (set_block): Remove.
2297 (gfc_clear_binding_stack): New.
2298 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
2299 (struct binding_level): Remove block_created_by_back_end.
2300 (clear_binding_level): Likewise.
2301 (poplevel): Don't handle block_created_by_back_end.
2303 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2305 * trans-decl.c (gfc_create_module_variable): Nothing to do if
2306 symbol is in common, because we ...
2307 (gfc_generate_module_vars): Call gfc_trans_common.
2309 2004-07-10 Paul Brook <paul@codesourcery.com>
2311 * trans-array.c (gfc_build_null_descriptor): New function.
2312 (gfc_trans_static_array_pointer): Use it.
2313 * trans-array.h (gfc_build_null_descriptor): Add prototype.
2314 * trans-expr.c (gfc_conv_structure): Handle array pointers.
2316 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2319 * decl.c (gfc_match_save): Use-associated common block
2321 * gfortran.h (gfc_common_head): Add new field 'name'.
2322 Fix typo in comment after #endif.
2323 * match.c (gfc_get_common): Add new argument from_common,
2324 mangle name if flag is set, fill in new field in structure
2326 (match_common): Set new arg in call to gfc_get_common,
2327 use-associated common block doesn't collide.
2328 * match.h (gfc_get_common): Adapt prototype.
2329 * module.c (load_commons): Set new arg in call to
2331 * symbol.c (free_common_tree): New function.
2332 (gfc_free_namespace): Call new function.
2333 * trans-common.c (several functions): Remove argument
2334 'name', use name from gfc_common_head instead.
2336 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2338 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
2339 and RHS match. Return early if the RHS is NULL().
2342 * match.c (match_common): Fix error reporting for used common.
2345 * trans-expr.c (gfc_conv_structure): Handle initialization
2346 of scalar pointer components.
2348 * parse.c (decode_statement): Fix matching of BLOCK DATA.
2350 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
2351 by fix for PR 15481.
2353 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2355 * trans-common.c: Fix whitespace issues, make variable names
2357 (create_common): Additionally, make loop logic more obvious.
2359 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2360 Paul Brook <paul@codesourcery.com>
2363 * trans-common.c (calculate_length): Remove ...
2364 (get_segment_info): Merge into here. Save field type.
2365 (build_field): Use saved type.
2366 (create_common, new_condition, new_segment, finish_equivalences):
2367 Use new get_segment_info.
2368 * trans-types.c: Update comment.
2370 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2373 * moduele.c (mio_symbol): Don't I/O initial values unless
2374 symbol is a parameter.
2376 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2379 * resolve.c (resolve_symbol): Verify that the shape of a
2380 parameter array is not only explicit, but also constant.
2381 * array.c (gfc_is_compile_time_shape): New function.
2382 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
2384 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2390 * module.c (write_symbol, write_symtree): Remove workaround.
2391 * primary.c (match_actual_arglist): Enhance comment.
2392 (gfc_match_rvalue): Handle function call with first argument
2393 a keyword argument correctly.
2394 * resolve.c (resolve_symbol): Change call to
2395 gfc_set_default_type to issue error if no implicit type
2397 * trans-decl.c (gfc_create_module_variable): Remove workaround.
2399 2004-07-08 Paul Brook <paul@codesourcery.com>
2401 * intrinsic.c (add_sym_4s): New function.
2402 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
2404 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
2405 Paul Brook <paul@codesourcery.com>
2409 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
2410 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
2411 * intrinsic.c (add_functions): Identify iargc. Add
2412 command_argument_count.
2413 (add_subroutines): Resolve getarg. Add get_command and
2414 get_command_argument.
2415 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
2416 gfc_resolve_get_command_argument): Add prototypes.
2417 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
2418 gfc_resolve_get_command_argument): New functions.
2419 * trans-decl.c (gfor_fndecl_iargc): New variable.
2420 (gfc_build_intrinsic_function_decls): Set it.
2421 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
2422 (gfc_conv_intrinsic_function): Use it.
2423 * trans.h (gfor_fndecl_iargc): Declare.
2425 2004-07-04 Matthias Klose <doko@debian.org>
2427 * Make-lang.in: Generate and install gfortran man page.
2428 * invoke.texi: Remove extra '@c man end'.
2430 2004-07-04 Richard Henderson <rth@redhat.com>
2432 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
2434 2004-07-04 Paul Brook <paul@codesourcery.com>
2436 * decl.c (gfc_match_implicit_range): Don't use typespec.
2437 (gfc_match_implicit): Handle character selectors.
2438 * gfortran.h (gfc_set_implicit): Remove prototype.
2439 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
2440 * parse.c (accept_statement): Don't call gfc_set_implicit.
2441 * symbol.c (new_ts): Remove.
2442 (gfc_set_implicit_none): Use same loop bounds as other functions.
2443 (gfc_set_implicit): Remove.
2444 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
2445 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
2447 2004-06-30 Richard Henderson <rth@redhat.com>
2449 * match.c (var_element): Remove unused variable.
2451 * trans-decl.c (gfc_generate_function_code): Don't set
2452 x_whole_function_mode_p.
2453 (gfc_generate_constructors): Likewise.
2455 2004-06-30 Richard Henderson <rth@redhat.com>
2457 * trans-decl.c (gfc_generate_function_code): Don't set
2458 immediate_size_expand.
2459 (gfc_generate_constructors): Likewise.
2461 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2464 * decl.c (gfc_match_type_spec): Rename second argument to
2465 'implicit_flag', reverse meaning. Don't match_char_spec if
2466 'implicit_flag' is set. Rename to ...
2467 (match_type_spec): ... this.
2468 (gfc_match_implicit_none, match_implicit_range): Move here
2470 (gfc_match_implicit): Move here from match.c, try to
2471 match_char_len if match_implicit_range doesn't succeed for
2472 CHARACTER implicits. Call renamed fucntion match_type_spec.
2473 (gfc_match_data_decl, match_prefix): Call renamed function
2475 * match.c (gfc_match_implicit_none, match_implicit_range,
2476 gfc_match_implicit): Move to decl.c.
2477 * match.h (gfc_match_implicit_none, gfc_match_implicit):
2478 Move protoypes to section 'decl.c'.
2479 (gfc_match_type_spec): Remove prototype.
2481 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2483 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
2486 2004-06-29 Steven Bosscher <stevenb@suse.de>
2488 Make sure types in assignments are compatible. Mostly mechanical.
2489 * trans-const.h (gfc_index_one_node): New define.
2490 * trans-array.c (gfc_trans_allocate_array_storage,
2491 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
2492 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
2493 gfc_conv_array_ubound, gfc_conv_array_ref,
2494 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
2495 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
2496 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
2497 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
2498 types in assignments, conversions and conditionals for expressions.
2499 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
2500 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
2501 gfc_conv_function_call, gfc_trans_pointer_assignment,
2502 gfc_trans_scalar_assign): Likewise.
2503 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
2504 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
2505 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
2506 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
2507 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
2508 gfc_conv_allocated, gfc_conv_associated,
2509 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
2510 * trans-io.c (set_string): Likewise.
2511 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
2512 gfc_do_allocate, generate_loop_for_temp_to_lhs,
2513 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
2514 compute_overall_iter_number, gfc_trans_assign_need_temp,
2515 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
2516 gfc_evaluate_where_mask, gfc_trans_where_assign,
2517 gfc_trans_where_2): Likewise.
2518 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
2519 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
2521 * trans.c (gfc_add_modify_expr): Add sanity check that types
2522 for the lhs and rhs are the same for scalar assignments.
2524 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2526 * dump-parse-tree.c (show_common): New function.
2527 (gfc_show_namespace): Show commons.
2529 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2530 Andrew Vaught <andyv@firstinter.net>
2534 * decl.c (gfc_match_save): Adapt to new common structures,
2535 don't allow saving USE-associated common.
2536 * dump-parse-tree (gfc_show_attr): (saved_)common are not
2537 symbol attributes any longer.
2538 (gfc_show_symbol): Don't show old-style commons any longer.
2539 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
2541 * gfortran.h (symbol_attribute): Remove common and saved_common
2543 (gfc_symbol): Remove common_head element.
2544 (gfc_common_head): New struct.
2545 (gfc_get_common_head): New macro.
2546 (gfc_symtree): Add field 'common' to union.
2547 (gfc_namespace): Add field 'common_root'; change type of field
2548 'blank_common' to blank_common.
2549 (gfc_add_data): New prototype.
2550 (gfc_traverse_symtree): Expect a symtree as first argument
2551 instead of namespace.
2552 * match.c (gfc_get_common): New function.
2553 (match_common_name): Change to take char * as argument, adapt,
2554 fix bug with empty name.
2555 (gfc_match_common): Adapt to new data structures. Disallow
2556 redeclaration of USE-associated COMMON-block. Fix bug with
2558 (var_element): Adapt to new common structures.
2559 * match.h (gfc_get_common): Declare.
2560 * module.c: Add 2004 to copyright years, add commons to module
2561 file layout description.
2562 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
2563 for removed attributes.
2564 (mio_symbol): Adapt to new way of storing common relations.
2565 (load_commons): New function.
2566 (read_module): Skip common list on first pass, load_commons at
2568 (write_commons): New function.
2569 (write_module): Call write_commons().
2570 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
2571 functions related to removed attributes.
2572 (gfc_add_data): New function.
2573 (gfc_clear_attr): Don't set removed attributes.
2574 (gfc_copy_attr): Don't copy removed attributes.
2575 (traverse_symtree): Remove.
2576 (gfc_traverse_symtree): Don't traverse symbol
2577 tree of the passed namespace, but require a symtree to be passed
2578 instead. Unify with traverse_symtree.
2579 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
2581 (save_symbol): Remove setting of removed attribute.
2582 * trans-common.c (gfc_sym_mangled_common_id): Change to
2583 take 'char *' argument instead of 'gfc_symbol'.
2584 (build_common_decl, new_segment, translate_common): Adapt to new
2585 data structures, add new
2587 (create_common): Adapt to new data structures, add new
2588 argument name. Fix typo in intialization of derived types.
2589 (finish_equivalences): Add second argument in call to
2591 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
2592 (gfc_trans_common): Adapt to new data structures.
2593 * trans-decl.c (gfc_create_module_variables): Remove test for
2596 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2598 * io.c: Add 2004 to copyright years.
2600 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2601 Andrew Vaught <andyv@firstinter.net>
2603 * gfortran.h (gfc_gsymbol): New typedef.
2604 (gfc_gsym_root): New variable.
2605 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
2606 * parse.c (global_used): New function.
2607 (parse_block_data): Check for double empty BLOCK DATA,
2608 use global symbol table.
2609 (parse_module): Use global symbol table.
2610 (add_global_procedure, add_global_program): New functions.
2611 (gfc_parse_file): Use global symbol table.
2612 * symbol.c (gfc_gsym_root): New variable.
2613 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
2616 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2618 * module.c (mio_gmp_real): Correct writing of negative numbers.
2620 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2623 * expr.c (check_intrinsic_op): Allow comparison of characters.
2626 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2627 Andrew Vaught <andyv@firstinter.net>
2629 * decl.c (contained_procedure): New function.
2630 (match_end): Verify correctness of END STATEMENT in
2633 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2634 Andrew Vaught <andyv@firstinter.net>
2637 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
2638 (decode_statement): Enforce required space in free-form.
2640 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2642 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
2643 * trans-array.c (gfc_conv_descriptor_data): Add operand
2645 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
2646 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
2647 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
2648 * trans-common.c (create_common): Likewise.
2649 * trans-expr.c (gfc_conv_component_ref): Likewise.
2650 * trans-io.c (set_parameter_value): Likewise.
2651 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
2652 (transfer_expr): Likewise.
2653 * trans-decl.c (gfc_trans_auto_character_variable):
2654 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
2655 (gfc_gimplify_function): New function.
2656 (gfc_generate_function-code): Properly handle nested functions.
2657 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
2659 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
2662 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
2663 (gfc_resolve_inquire): Resolve the iolength tag. Return
2664 SUCCESS at end of function if no failure has occured.
2665 * resolve.c (resolve_code): Resolve if iolength is encountered.
2666 * trans-io.c: (ioparm_iolength, iocall_iolength,
2667 iocall_iolength_done): New variables.
2668 (last_dt): Add IOLENGTH.
2669 (gfc_build_io_library_fndecls ): Set iolength related variables.
2670 (gfc_trans_iolength): Implement.
2671 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
2673 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
2676 * scanner.c (load_line): Don't truncate preprocessor lines.
2677 Reformat error message.
2678 (preprocessor_line): Issue warning in case of malformed
2681 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2683 * resolve.c (resolve_symbol): Add comment in function body.
2684 (check_data_variable): Change type of mark to ar_type, adapt code
2687 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2689 * array.c (gfc_insert_constructor): Avoid redundant call to
2690 mpz_comp. Add 2004 to copyright years.
2692 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
2694 * trans.h (stmtblock_t): Change has_scope to unsigned int.
2696 2004-06-20 Steven G. Kargl <kargls@comcast.net>
2698 * arith.c (gfc_range_check): correct complex underflow.
2700 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2703 * match.c (match_case_selector): Call gfc_match_init_expr
2704 instead of gfc_match_expr.
2705 * resolve.c (validate_case_label_expr): No need to check for
2706 constant, since it wouldn't have been matched with the fix to
2709 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2712 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
2715 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2718 * trans-deecl.c (generate_local_decl): Do not issue warning for
2719 unused variables if they're use associated.
2721 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2722 Andrew Vaught <andyv@firstinter.net>
2725 * gfortran.h (gfc_check_f): Add new field f3ml.
2726 * check.c (gfc_check_minloc_maxloc): Take argument list instead
2727 of individual arguments, reorder if necessary.
2728 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
2729 * intrinsic.c (add_sym_3ml): New function.
2730 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
2731 (check_specific): Catch special case MINLOC, MAXLOC.
2733 2004-06-14 Paul Brook <paul@codesourcery.com>
2735 * intrinsic.c (add_sym_2s): Use correct function types.
2737 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2739 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
2740 * data.c (gfc_get_section_index): Remove dependency on trans.h.
2742 2004-06-12 Steven G. Kargl <kargls@comcast.net>
2744 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
2745 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
2746 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
2747 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
2748 * trans-intrinsic.c: Use symbols.
2749 * intrinsic.c (add_sym_2s): New function.
2750 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
2751 * intrinsic.h: Function prototypes.
2752 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
2753 gfc_resolve_srand): New functions.
2755 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2758 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
2759 contained procedure.
2761 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2764 * interface.c (compare_parameter, compare_actual_formal): Don't
2765 check types and array shapes for NULL()
2766 * trans-expr.c (conv_function_call): No double indirection for
2769 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
2771 * trans-expr.c (gfc_conv_cst_int_power): Compute
2772 x**(-n) by converting it to (1/x)**n instead of
2775 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2778 * module.c (write_symbol, write_symtree): Don't write symbols
2779 wrongly added to namespace.
2780 * trans-decl.c (gfc_create_module_variable): Don't create a
2781 backend decl for a symbol incorrectly added to namespace.
2783 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2786 * resolve.c (resolve_symbol): Verify that parameter array has an
2787 explicit shape. Fix typos and coding style issues in surrounding
2790 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2793 * gfortran.texi: The documentation doesn't contain infomration on
2794 how to report bugs, and shouldn't, so remove the line which
2797 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2799 * intrinsic.c (sort_actual): Keep track of type of missing
2800 arguments. (Missing from previous commit.)
2802 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2804 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
2805 * interface.c (compare_actual_formal): Keep type of omitted
2807 * trans-expr.c (gfc_conv_function_call): Add string length
2808 argument for omitted string argument.
2810 2004-06-03 Paul Brook <paul@codesourcery.com>
2812 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
2813 lists instead of compound expr chains.
2814 (gfc_trans_code): Annotate statement lists.
2816 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2818 * trans-array.c: Fix spelling in comments.
2820 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2823 * data.c (assign_substring_data_value): New function.
2824 (gfc_assign_data_value): Call the new function if we're dealing
2825 with a substring LHS.
2827 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2830 * gfortran.h (GFC_VERSION): Remove.
2831 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
2834 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2836 * trans-types.c: Fix spelling & layout in comments.
2838 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2841 * trans-const.c (gfc_conv_string_init): Allow variable string
2842 length lower than initialization string length.
2844 2004-05-30 Paul Brook <paul@codesourcery.com>
2847 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
2848 * trans-expr.c (gfc_trans_string_copy): New function.
2849 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
2851 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
2852 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
2853 * trans.h (struct gfc_saved_var): Define.
2854 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
2856 2004-05-30 Steven G. Kargl <kargls@comcast.net>
2858 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
2860 2004-05-29 Steven G. Kargl <kargls@comcast.net>
2862 * simplify.c (gfc_simplify_log): Remove useless line of code.
2864 2004-05-29 Paul Brook <paul@codesourcery.com>
2866 * trans-common.c (find_equivalence): Find multiple rules.
2868 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2870 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
2871 (gfc_current_locus): Declare new global variable.
2872 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
2873 (gfc_current_locus1): Rename ...
2874 (gfc_current_locus): ... to this.
2875 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
2876 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
2877 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
2878 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
2879 and gfc_current_locus(), respectively.
2880 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
2881 match_array_cons_element, gfc_match_array_constructor):
2882 Read/modify gfc_current_locus instead of calling gfc_set_locus()
2883 and gfc_current_locus().
2884 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
2885 match_attr_spec, gfc_match_function_decl, gfc_match_end,
2886 attr_decl1, gfc_match_save): Likewise.
2887 * error.c (error_print, gfc_internal_error): Likewise.
2888 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
2889 * interface.c (gfc_add_interface): Likewise.
2890 * io.c (gfc_match_format, match_dt_format, match_dt_element,
2891 match_io_iterator, match_io): Likewise.
2892 * match.c (gfc_match_space, gfc_match_eos,
2893 gfc_match_small_literal_int, gfc_match_st_label,
2894 gfc_match_strings, gfc_match_name, gfc_match_iterator,
2895 gfc_match_char, gfc_match, gfc_match_assignment,
2896 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
2897 gfc_match_nullify, gfc_match_call, match_implicit_range,
2898 gfc_match_implicit, gfc_match_data, match_case_selector,
2899 gfc_match_case, match_forall_iterator): Likewise.
2900 * matchexp.c (gfc_match_defined_op_name, next_operator,
2901 match_level_1, match_mult_operand, match_ext_mult_operand,
2902 match_add_operand, match_ext_add_operand, match_level_2,
2903 match_level_3, match_level_4, match_and_operand, match_or_operand,
2904 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
2905 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
2906 * parse.c (match_word, decode_statement, next_free, next_fixed,
2907 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
2909 * primary.c (match_digits, match_integer_constant,
2910 match_boz_constant, match_real_constant, match_substring,
2911 next_string_char, match_charkind_name, match_string_constant,
2912 match_logical_constant, match_const_complex_part,
2913 match_complex_constant, match_actual_arg, match_keyword_arg,
2914 gfc_match_actual_arglist, gfc_match_structure_constructor,
2915 gfc_match_rvalue, gfc_match_variable): Likewise.
2916 * st.c (gfc_get_code): Likewise.
2917 * symbol.c (check_conflict, check_used, check_done,
2918 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
2919 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
2920 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
2922 2004-05-26 Roger Sayle <roger@eyesopen.com>
2924 * io.c (format_asterisk): Silence compiler warnings by correcting
2925 the number of elements of a "locus" initializer.
2927 2004-05-25 Roger Sayle <roger@eyesopen.com>
2930 * matchexp.c: Allow unary operators after arithmetic operators
2932 (match_ext_mult_operand, match_ext_add_operand): New functions.
2933 (match_mult_operand): Tweak to call match_ext_mult_operand.
2934 (match_add_operand): Tweak to call match_ext_mult_operand.
2935 (match_level_2): Rearrange to call match_ext_add_operand.
2937 2004-05-25 Paul Brook <paul@codesourcery.com>
2939 * expr.c (check_inquiry): Remove bogus tests.
2941 2004-05-23 Paul Brook <paul@codesourcery.com>
2944 * expr.c (restricted_args): Remove redundant checks/argument.
2945 (external_spec_function): Update to match.
2946 (restricted_intrinsic): Rewrite.
2948 2004-05-23 Paul Brook <paul@codesourcery.com>
2949 Victor Leikehman <lei@haifasphere.co.il>
2951 * gfortran.h (struct gfc_symbol): Add equiv_built.
2952 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
2954 (current_length): Remove.
2955 (add_segments): New function.
2956 (build_equiv_decl): Create initialized common blocks.
2957 (build_common_decl): Always add decl to bindings.
2958 (create_common): Create initializers.
2959 (find_segment_info): Reformat to match coding conventions.
2960 (new_condition): Use add_segments.
2961 (add_condition, find_equivalence, add_equivalences): Move iteration
2962 inside functions. Only process each segment once.
2963 (new_segment, finish_equivalences, translate_common): Simplify.
2965 2004-05-23 Steven G. Kargl <kargls@comcast.net>
2967 * check.c (gfc_check_random_seed): Issue for too many arguments.
2969 2004-05-22 Steven G. Kargl <kargls@comcast.net>
2971 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
2973 2004-05-22 Paul Brook <paul@codesourcery.com>
2975 * dump-parse-tree.c (gfc_show_equiv): New function.
2976 (gfc_show_namespace): Use it.
2978 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
2981 * symbol.c (gfc_add_common): Disable checks to work around other more
2982 fundamental inadequacies.
2984 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2986 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
2988 (gfc_build_function_decl): Likewise.
2990 2004-05-22 Steven G. Kargl <kargls@comcast.net>
2992 * check.c (gfc_check_system_clock): New function.
2993 * intrinsic.c (add_sym_3s): New function.
2994 (add_subroutines): Use it.
2995 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
2997 * iresolve.c (gfc_resolve_system_clock): New function.
2999 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3001 * invoke.texi: Document -Wunderflow and spell check.
3002 * lang.opt: Add Wunderflow.
3003 * gfortran.h (gfc_option_t): Add warn_underflow option.
3004 * options.c (gfc_init_options, set_Wall): Use it.
3005 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
3006 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
3007 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
3008 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
3009 * arith.c (common_logarithm): Fix typo in comment.
3011 2004-05-21 Roger Sayle <roger@eyesopen.com>
3013 * io.c (check_format): As a GNU extension, allow the comma after a
3014 string literal to be optional in a format. Use gfc_notify_std to
3015 issue an error/warning as appropriate.
3017 2004-05-21 Roger Sayle <roger@eyesopen.com>
3019 * io.c (check_format): Use gfc_notify_std to determine whether to
3020 issue an error/warning for omitting the digits from the X format.
3022 2004-05-20 Roger Sayle <roger@eyesopen.com>
3024 * io.c (check_format): Allow the number before the X format to
3025 be optional when not -pedantic.
3027 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
3028 Paul Brook <paul@codesourcery.com>
3030 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
3031 Create decls for __builtin_pow{,f}.
3032 * gfortran.h (PREFIX_LEN): Define.
3033 * trans-decl.c (gfor_fndecl_math_powi): Add.
3034 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3035 (gfc_build_intrinsic_function_decls): Create decls for powi.
3036 * trans-expr.c (powi_table): Add.
3037 (gfc_conv_integer_power): Remove.
3038 (gfc_conv_powi): New function.
3039 (gfc_conv_cst_int_power): New function.
3040 (gfc_conv_power_op): Use new powi routines.
3041 * trans.h (struct gfc_powdecl_list): Add.
3042 (gfor_fndecl_math_powi): Add.
3043 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3045 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3047 * trans.c, trans-decl.c: Fix comment typos.
3049 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3051 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
3053 2004-05-18 Steve Kargl <kargls@comcast.net>
3055 * arith.c (gfc_int2complex): Fix incorrect range checking.
3057 2004-05-18 Paul Brook <paul@codesourcery.com>
3060 * decl.c (add_init_expr_to_sym): Remove incorrect check.
3061 (default_initializer): Move to expr.c.
3062 (variable_decl): Don't assign default initializer to variables.
3063 * expr.c (gfc_default_initializer): Move to here.
3064 * gfortran.h (gfc_default_initializer): Add prototype.
3065 * resolve.c (resolve_symbol): Check for illegal initializers.
3066 Assign default initializer.
3068 2004-05-17 Steve Kargl <kargls@comcast.net>
3070 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
3072 2004-05-17 Steve Kargl <kargls@comcast.net>
3074 * arith.c (gfc_real2complex): Range checking wrong part of complex
3077 2004-05-16 Paul Brook <paul@codesourcery.com>
3079 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
3081 2004-05-16 Paul Brook <paul@codesourcery.com>
3083 * arith.c (gfc_range_check): Fix logic error.
3085 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
3087 * arith.c: Fix comment typos.
3089 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3092 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
3093 not initialized in a disallowed fashion.
3094 * match.c (gfc_match_common): Likewise.
3095 (var_element): Verify that variable is not in the blank COMMON,
3096 if it is in a common.
3098 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
3100 * Make-lang.in (f95.generated-manpages): Remove.
3101 (f95.srcextra): New.
3102 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
3103 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
3106 (f95.install-info): Remove.
3107 (install-info): New.
3109 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
3111 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
3113 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3115 * primary.c (match_boz_constant): Use gfc_notify_std() for
3116 issuing a warning or an error.
3118 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3121 * primary.c (match_structure_constructor): Rename ...
3122 (gfc_match_structure_constructor): ... to this. Make non-static.
3123 (gfc_match_rvalue): Call renamed function.
3124 * match.h (gfc_match_structure_constructor): Declare.
3125 * match.c (gfc_match_data_constant): Handle structure
3128 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3132 * gfortran.h (gfc_linebuf): New typedef.
3134 (gfc_file): Revamped, use new gfc_linebuf.
3135 (locus): Revamped, use new types.
3136 (gfc_current_file): Remove.
3137 (gfc_current_form, gfc_source_file): New global variables.
3138 * match.c (gfc_match_space, gfc_match_strings): Use
3139 gfc_current_form to find source form.
3140 * module.c (gfc_dump_module): Use gfc_source_file when printing
3142 * error.c (show_locus, show_loci) Use new data structures to print
3144 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
3146 (file_head, current_file, gfc_current_form, line_head, line_tail,
3147 gfc_current_locus1, gfc_source_file): New global variables.
3148 (gfc_scanner_init1): Set new global variables.
3149 (gfc_scanner_done1): Free new data structures.
3150 (gfc_current_locus): Return pointer to gfc_current_locus1.
3151 (gfc_set_locus): Set gfc_current_locus1.
3152 (gfc_at_eof): Set new variables.
3153 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
3154 to new locus structure.
3155 (gfc_check_include): Remove.
3156 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
3157 (gfc_skip_comments): Use gfc_current_form, find locus with
3159 (gfc_next_char): Use gfc_current_form.
3160 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
3161 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
3163 (get_file): New function.
3164 (preprocessor_line, include_line): New functions.
3165 (load_file): Move down, rewrite to match new data structures.
3166 (gfc_new_file): Rewrite to match new data structures.
3167 * parse.c (next_statement): Remove code which is now useless. Use
3168 gfc_source_form and gfc_source_file where appropriate.
3169 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
3170 when determining locus of frontend code.
3171 * trans-io.c (set_error_locus): Same.
3172 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
3173 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
3175 (all): Add missing initializers.
3177 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3179 * Make-lang.in (trans-common.o): Remove redundant dependency.
3180 (data.c): Replace object file name ...
3181 (data.o): ... by the correct one.
3183 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3185 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
3186 for ranges when dumping array references.
3188 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
3190 * decl.c (variable_decl): Always apply default initializer.
3192 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3195 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
3196 handle zero correctly.
3198 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3200 * match.c (gfc_match): Eliminate dead code.
3202 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3204 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
3205 Detect bad continuation line in fixed form sources.
3207 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3210 * iresolve.c (gfc_resolve_nearest): Add new function.
3211 * intrinsic.h: ... declare it here.
3212 * intrinsic.c (add_functions): ... add it as resolving function
3215 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3218 * match.c (gfc_match_do): Allow infinite loops with
3219 label-do-stmt. Do not enforce space after comma.
3221 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3224 * parse.c (parse_interface): Allow empty INTERFACE, remove
3227 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3229 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
3230 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
3231 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
3232 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
3233 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
3234 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
3235 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
3236 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
3237 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
3238 trans-types.h, trans.c, trans.h: Update copyright years and
3240 * data.c: Likewise, also removed two whitespace-only lines.
3241 * gfortranspec.c, lang.opt: Update copyright years.
3243 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3246 * trans-decl.c (generate_local_decl): Don't warn for unused
3247 variables which are in common blocks.
3249 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3251 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
3252 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
3253 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
3255 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
3258 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
3260 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
3262 * gfortran.texi: Use @table @emph instead of @itemize @emph.
3263 Remove "set DEVELOPMENT".
3264 (Compiling GFORTRAN): Remove.
3266 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3268 * array.c (match_subscript, match_array_ref): Add comments
3269 explaining argument 'init'.
3270 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
3271 trans-expr.c, trans.c: Fix some typos in comments.
3272 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
3273 * primary.c (match_digits, match_integer_constant): Add comment
3274 explaining signflag.
3276 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3279 * primary.c: Include system.h and flags.h, needed for pedantic.
3280 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
3283 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3286 * match.c (match_data_constant): Handle case where
3287 gfc_find_symbol sets sym to NULL
3289 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3291 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
3292 dependency on mathbuiltins.def
3294 2004-04-24 Victor Leikehman <lei@il.ibm.com>
3296 * trans-io.c (transfer_expr): Implemented recursive printing
3299 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
3301 * gfortranspec.c: Do not include multilib.h.
3303 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3305 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
3306 2004 to copyright years.
3307 * trans-expr.c, trans-decl.c: Comment update, we now generate
3308 GENERIC, not SIMPLE. Add 2004 to copyright years.
3310 2004-04-24 Paul Brook <paul@codesourcery.com>
3312 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
3314 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
3317 * arith.c (gfc_arith_divide): Fix complex divide.
3319 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
3321 * gfortranspec.c: Include the target headers.
3323 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
3327 * arith.c (arctangent2): New function.
3328 * arith.h (arctangent2): Add function prototype.
3329 * simplify.c (gfc_simplify_atan2): Use it.
3330 (gfc_simplify_log): Use it.
3332 2004-04-12 Diego Novillo <dnovillo@redhat.com>
3334 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
3335 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
3337 2004-04-11 Bud Davis <bdavis9659@comcast.net>
3340 * trans-io.c (build_dt): Change REC to value.
3342 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3345 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
3346 the real value when converting mpf to string.
3348 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3351 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
3354 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3357 * simplify.c (simplify_min_max): Convert the type of the result.
3359 2004-04-11 Paul Brook <paul@codesourcery.com>
3361 * gfortran.texi: Use full target triplet.
3363 2004-04-11 Paul Brook <paul@codesourcery.com>
3365 * Make-lang.in (GFORTRAN_TEXI): Set it.
3366 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
3367 (fortran/gfortran.info): Ditto.
3368 * gfortran.texi: Major update.
3369 * invoke.texi: New file.
3371 2004-04-10 Paul Brook <paul@codesourcery.com>
3373 * trans-array.c (gfc_trans_allocate_temp_array,
3374 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
3375 * trans-decl.c (gfc_build_dummy_array_decl,
3376 gfc_get_symbol_decl, gfc_build_function_decl,
3377 gfc_create_module_variable): Ditto.
3378 * trans-expr.c (gfc_conv_variable): Ditto.
3379 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
3380 * trans.h (GFC_DECL_STRING): Remove.
3381 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
3382 GFC_DECL_ASSIGN): Renumber flags.
3384 2004-04-05 Paul Brook <paul@codesourcery.com>
3388 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
3390 * gfortran.h (struct gfc_charlen): Add backend_decl.
3391 * trans-array.c (gfc_trans_allocate_temp_array,
3392 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
3393 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
3394 Remove old, broken string handling.
3395 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
3396 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
3397 gfc_trans_deferred_array): Handle character arrays.
3398 * trans-const.c (gfc_conv_const_charlen): New function.
3399 * trans-const.h (gfc_conv_const_charlen): Add prototype.
3400 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
3402 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
3403 (gfc_create_string_length): New function.
3404 (gfc_get_symbol_decl): Create lengths for character variables.
3405 (gfc_get_fake_result_decl): Ditto.
3406 (gfc_build_function_decl): Only set length for assumed length
3407 character arguments.
3408 (gfc_trans_dummy_character): New function.
3409 (gfc_trans_auto_character_variable): Rewrite.
3410 (gfc_trans_deferred_vars): Handle more types of character variable.
3411 (gfc_create_module_variable): String lengths have moved.
3412 (gfc_generate_function_code): Initialize deferred var chain earlier.
3413 * trans-expr.c (gfc_conv_init_string_length): Rename ...
3414 (gfc_trans_init_string_length): ... to this.
3415 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
3416 gfc_conv_function_call): Update to new format for character variables.
3417 (gfc_conv_string_length): Remove.
3418 (gfc_conv_string_parameter): Update assertion.
3419 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
3420 * trans-io.c (set_string): Use new macro names.
3421 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
3422 * trans-types.c (gfc_get_character_type): Use existing length expr.
3423 (gfc_is_nodesc_array): Make public.
3424 (gfc_get_dtype_cst): Rename ...
3425 (gfc_get_dtype): ... to this. Handle unknown size arrays.
3426 (gfc_get_nodesc_array_type): Use new name.
3427 (gfc_sym_type): New character variable code.
3428 (gfc_get_derived_type): Ditto.
3429 (gfc_get_function_type): Evaluate character variable lengths.
3430 * trans-types.h (gfc_strlen_kind): Define.
3431 (gfc_is_nodesc_array): Add prototype.
3432 * trans.h: Update prototypes.
3433 (struct lang_type): Update comments.
3434 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
3435 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
3437 2004-04-04 Paul Brook <paul@codesourcery.com>
3439 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
3440 * options.c (gfc_init.options, gfc_handle_option): Ditto.
3441 * trans-expr.c (gfc_conv_function_call): Ditto.
3442 * trans-types.c (gfc_is_nodesc_array): Ditto
3443 * lang.opt (fg77-calls): Remove.
3445 2004-04-04 Paul Brook <paul@codesourcery.com>
3447 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
3448 (gfc_conv_descriptor_base): Rename ...
3449 (gfc_conv_descriptor_offset): ... to this.
3450 (gfc_trans_allocate_array_storage): Set offset to zero.
3451 (gfc_conv_array_base): Rename ...
3452 (gfc_conv_array_offset): ... to this.
3453 (gfc_conv_array_index_ref): Add offset parameter.
3454 (gfc_conv_array_ref): Include offset.
3455 (gfc_trans_preloop_setup): Use existing offset.
3456 (gfc_trans_allocate_temp_array, gfc_array_allocate,
3457 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
3458 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
3459 gfc_conf_ss_descriptor): Set offset.
3460 * trans-array.h: Rename prototypes.
3461 * trans-const.h (gfc_index_zero_node): Define.
3462 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
3463 * trans-types.c (gfc_get_array_type_bounds): Ditto.
3464 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
3466 2004-03-25 Diego Novillo <dnovillo@redhat.com>
3468 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
3470 2004-03-24 Bud Davis <bdavis9659@comcast.net>
3473 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
3474 before conversion by gmp library call.
3476 2004-03-24 Bud Davis <bdavis9659@comcast.net>
3479 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
3481 2004-02-24 Richard Henderson <rth@redhat.com>
3483 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
3485 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
3487 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
3488 (fortran/gfortran.info): ... to here.
3491 2004-02-16 Richard Henderson <rth@redhat.com>
3493 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
3494 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
3495 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
3496 (gfc_expand_function): Rename from expand_function_body, make static,
3497 don't do anything except invoke tree_rest_of_compilation.
3498 (gfc_be_parse_file): Invoke cgraph.
3499 (gfc_expand_decl): Remove.
3500 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
3501 __builtin_adjust_trampoline.
3502 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
3503 (gfc_finalize): New.
3504 (gfc_generate_function_code): Use it. Lower nested functions.
3505 * trans-expr.c (gfc_conv_function_call): Add static chain operand
3507 * trans.c (gfc_build_function_call): Likewise.
3508 * trans.h (expand_function_body): Remove.
3510 2004-02-15 Victor Leikehman <lei@il.ibm.com>
3513 * trans-decl.c (gfc_build_function_decl) For functions
3514 returning CHARACTER pass an extra length argument,
3515 following g77 calling conventions.
3516 * trans-types.c (gfc_get_function_type) Ditto.
3517 * trans-expr.c (gfc_conv_function_call) Ditto.
3519 2004-02-14 Paul Brook <paul@codesourcery.com>
3521 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
3523 2004-02-12 Paul Brook <paul@nowt.org>
3527 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
3529 * gfortran.texi: Fix typos.
3531 2004-02-07 Bud Davis <bdavis9659@comcast.net>
3534 * intrinsic.c (add_conversions) Use logical conversion instead
3536 * trans-types.c (gfc_get_logical_type) implemented logical*1
3539 2004-01-17 Paul Brook <paul@codesourcery.com>
3541 * lang-specs.h: Remove %<fixed-form.
3543 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
3545 * lang-specs.h: Enable preprocessing of source files
3546 ending in .F, .fpp, .FPP, .F90 and .F95.
3548 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
3551 * lang-specs.h: Enable compilation of files ending
3552 in .f, .for and .FOR.
3554 2004-01-11 Paul Brook <paul@codesourcery.com>
3556 * trans-stmt.c (gfc_trans_if_1): New function.
3557 (gfc_trans_if): Use it.
3559 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
3561 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
3562 (gfc_option_t): Add max_identifier_length.
3563 * lang.opt: Add fmax-identifier-length.
3564 * match.c (parse_name): Use limit.
3565 * options.c (gfc_init_options): Set max_identifier_length.
3566 (gfc_handle_option): Ditto.
3568 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
3570 * intrinsic.c (add_functions): Add resolve function to dcmplx.
3571 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
3572 * iresolve.c (gfc_resolve_dcmplx): New function.
3574 2004-01-10 Paul Brook <paul@codesourcery.com>
3576 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
3577 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
3578 (gfc_return_by_reference): Correct condition.
3579 (gfc_get_function_type): Ditto.
3581 2004-01-10 Paul Brook <paul@codesourcery.com>
3583 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
3586 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
3588 * iresolve.c: Use correct kind.
3590 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
3593 * trans-decl.c (gfc_create_module_variable): Output array valued
3596 2004-01-10 Paul Brook <paul@codesourcery.com>
3598 * resolve.c (resolve_branch): Get error message right way round.
3600 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
3602 * trans-array (gfc_conv_loop_setup): Adjust comment to track
3604 (gfc_array_allocate): Don't count size of element twice.
3606 2004-01-04 Paul Brook <paul@codesourcery.com>
3608 * lang.opt (i8, r8, std=*): Remove RejectNegative.
3610 2004-01-04 Paul Brook <paul@codesourcery.com>
3612 * error.c (gfc_notify_std): New function.
3613 * gfortran.h (gfc_notify_std): Declare.
3614 (GFC_STD_*): Define.
3615 (gfc_option_t): Add warn_std and allow_std.
3616 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
3617 (gfc_intrinsic_func_interface): Use gfc_notify_std.
3618 * check.c (check_rest): Use gfc_notify_std.
3619 * match.c (gfc_match_pause): Ditto.
3620 (gfc_match_assign): Ditto.
3621 (gfc_match_goto): Ditto.
3622 * resolve.c (resolve_branch): Ditto.
3623 * lang.opt: Add std=<foo> and w.
3624 * options.c (gfc_init_options): Set allow_std and warn_std.
3625 (gfc_handle_option): Handle OPT_std_* and OPT_w.
3627 2004-01-01 Paul Brook <paul@codesourcery.com>
3629 * array.c (gfc_append_constructor): Take constructor, not expression.
3630 * data.c (struct gfc_expr_stack): Remove.
3631 (expr_stack): Remove.
3632 (find_con_by_offset): Rename from find_expr_in_con.
3633 (find_con_by_component): Rename from find_component_in_con.
3634 (gfc_get_expr_stack): Remove.
3635 (gfc_assign_data_value): Rewrite.
3636 (gfc_expr_push): Remove.
3637 (gfc_expr_pop): Remove.
3638 (gfc_advance_section): Rename from
3639 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
3640 (gfc_get_section_index): Handle unbounded sections.
3641 * gfortran.h: Update prototypes.
3642 * resolve.c (check_data_variable): Array section maight not be the
3645 2004-01-01 Paul Brook <paul@codesourcery.com>
3648 * resolve.c (resolve_symbol): Allow assumed length function results.
3650 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
3652 * match.c (gfc_match_pause): Fix spelling.
3654 2004-01-01 Steven Bosscher <stevenb@suse.de>
3657 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
3658 reference from the expression.
3660 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
3662 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
3664 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
3665 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
3666 (symbol_attribute):New variable attribute: assign.
3667 * io.c (resolve_tag):Integer variable is allowed.
3668 (match_dt_format): Add ASSIGN statement. Set assign flag.
3669 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
3670 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
3671 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
3672 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
3673 (next_statement): Add ST_LABEL_ASSIGNMENT.
3674 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
3675 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
3676 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
3677 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
3678 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
3679 assign. Put them into the stuct lang_decl.
3680 * trans-io.c (set_string): Add the assign statement.
3681 * trans-stmt.c (gfc_trans_label_assign): New function.
3682 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
3683 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
3684 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
3685 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
3686 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
3687 (GFC_DECL_ASSIGN(node)): New macro to access flag.
3689 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
3692 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
3695 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
3697 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
3698 that arguments to subroutines/functions can't alias themselves, nor global
3701 2003-12-20 Steven Bosscher <stevenb@suse.de>
3703 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
3704 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
3706 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
3708 * primary.c (match_substring): Fix substring bug for start point
3709 or end point is NULL.
3710 * trans-expr.c (gfc_conv_substring): Ditto
3711 * trans-types.c (gfc_sym_type): Get correct type of scalar
3712 character variables.
3713 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
3716 2003-12-10 Richard Henderson <rth@redhat.com>
3718 * options.c (gfc_post_options): Don't ever use rtl inlining.
3720 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
3722 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
3723 * trans-equivalence.c: Remove.
3724 * trans-decl.c (gfc_get_symbol_decl): Update to match.
3725 (gfc_generate_function_code): Ditto.
3726 * trans-array.c (gfc_conv_array_parameter): Ditto.
3727 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
3728 (F95_ADDITIONAL_OBJS): Add stor-layout.o
3729 * trans.h (gfc_trans_equivalence): Remove.
3730 * gfortran.h (struct gfc_equiv): Add used field.
3731 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
3732 equiv_offset fields.
3734 2003-12-05 Richard Henderson <rth@redhat.com>
3736 * trans.c (gfc_build_addr_expr): New.
3737 (gfc_build_indirect_ref, gfc_build_array_ref): New.
3738 * trans.h: Declare them.
3739 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
3740 trans-stmt.c, trans.c (*): Use them.
3742 * f95-lang.c (gfc_post_options): Remove dead prototype.
3743 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
3744 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
3747 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
3749 * io.c (gfc_match_format): Check for missing format label.
3751 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
3754 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
3755 from interfaces in modules.
3757 2003-11-30 Paul Brook <paul@nowt.org>
3759 * trans-array.c (gfc_trans_g77_array): Make non-static.
3760 (gfc_trans_assumed_size): Remove.
3761 (gfc_trans_dummy_array_bias): Explicitly free temporary.
3762 * trans-array.h (gfc_trans_g77_array): Add prototype.
3763 (gfc_trans_assumed_size): Remove.
3764 * trans-decls.c (gfor_fndecl_push_context): Remove.
3765 (gfor_fndecl_pop_context): Remove.
3766 (gfc_build_function)decls): Don't create them.
3767 (gfc_trans_deferred_vars): Update to match. Remove dead code.
3768 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
3770 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
3772 * trans-array.c (gfc_conv_array_parameter): Simplify
3773 array argument passing for array name actual argument.
3774 * trans-expr.c (gfc_conv_function_call): Ditto
3775 * trans-types.c (gfc_is_nodesc_array):Ditto.
3777 2003-11-30 Paul Brook <paul@nowt.org>
3779 * f95-lang.c (gfc_post_options): Move ...
3780 * options.c (gfc_post_options): .. to here. Handle inlining options.
3781 * gfortran.h (gfc_post_options): Add prototype.
3783 2003-11-28 Richard Henderson <rth@redhat.com>
3785 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
3787 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
3789 * trans.h (has_alternate_specifier): New global variable.
3790 * match.c (gfc_match_call): Handle actual arguments associated with
3791 alternate return indicators.
3792 * trans-expr.c (gfc_conv_function_call): Ditto
3793 * trans-stmt.c (gfc_trans_call): Ditto
3794 (gfc_trans_return): Handle return statement with value.
3795 * trans-decl.c (gfc_generate_function_code): Handle functions with
3797 (gfc_get_fake_result_decl): Ditto
3798 * trans-types.c (gfc_get_function_type): Ditto
3799 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
3800 (resolve_formal_arglist): Check asterisk dummy.
3802 2003-11-27 Paul Brook <paul@nowt.org>
3804 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
3805 allocation interface.
3806 (gfc_conv_ array_parameter): Ditto.
3807 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
3808 * trans-array.c: Update prototype.
3809 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
3810 (gfc_trans_auto_character_variable): Use new memory alloc interface.
3811 * trans-expr.c (gfc_conv_string_tmp): Ditto.
3812 (gfc_conv_function_call): Use gfc_conv_string_tmp.
3813 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
3814 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
3815 * trans.h (gfc_ss_info): Remove unused pdata field.
3816 * trans.c (gfc_create_var_np): Change T to V.
3818 2003-11-26 Richard Henderson <rth@redhat.com>
3820 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
3821 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
3822 FRACTION, NEAREST, SET_EXPONENT.
3823 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
3824 Fix GTY marking. Remove unnecessary const's.
3825 (LIBM_FUNCTION): Rename from I_LIB.
3826 (LIBF_FUNCTION): New.
3827 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
3828 conventions. Assume the expr signature is correct. Mark const.
3829 (gfc_conv_intrinsic_exponent): Use library functions.
3830 (gfc_conv_intrinsic_set_exponent): Remove.
3831 (gfc_conv_intrinsic_scale): Remove.
3832 (gfc_conv_intrinsic_nearest): Remove.
3833 (gfc_conv_intrinsic_fraction): Remove.
3834 (gfc_conv_intrinsic_function): Update.
3835 * trans-decl.c (gfor_fndecl_math_exponent4): New.
3836 (gfor_fndecl_math_exponent8): New.
3837 (gfc_build_intrinsic_function_decls): Set them.
3838 * trans.h: Declare them.
3840 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
3842 * trans-common.c (gfc_layout_global_equiv): Locate the error for
3843 underflow COMMON block.
3844 (gfc_trans_one_common): Fix bug for size of COMMON block containing
3845 EQUIVALENCE object. Also fix typo in an error message.
3847 2003-11-25 Diego Novillo <dnovillo@redhat.com>
3849 * Make-lang.in: Add check-gfortran to lang_checks.
3850 (check-f95): Alias for check-gfortran.
3852 2003-11-25 Jason Merrill <jason@redhat.com>
3854 * Make-lang.in (f95.tags): Create TAGS.sub files in each
3855 directory and TAGS files that include them for each front end.
3857 2003-11-24 Paul Brook <paul@nowt.org>
3860 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
3862 2003-11-24 Paul Brook <paul@nowt.org>
3864 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
3866 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
3868 2003-11-24 Paul Brook <paul@nowt.org>
3871 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
3872 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
3874 2003-11-20 Richard Henderson <rth@redhat.com>
3876 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
3877 (gfc_conv_array_base): Likewise.
3878 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
3879 * trans-expr.c (gfc_conv_string_tmp): Likewise.
3880 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
3881 * trans-stmt.c (gfc_trans_character_select): Likewise.
3883 2003-11-13 Paul Brook <paul@nowt.org>
3885 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
3887 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
3889 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
3890 (resolve_equivalence): New function.
3891 (resolve_equivalence_derived): New function.
3893 2003-11-12 Richard Henderson <rth@redhat.com>
3895 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
3896 annotate_all_with_locus.
3898 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
3900 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
3901 * trans-decl.c (gfc_finish_var_decl): Modified.
3903 2003-11-08 Paul Brook <paul@nowt.org>
3906 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
3909 2003-11-06 Paul Brook <paul@nowt.org>
3911 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
3913 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
3915 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
3917 2003-10-27 Anthony Green <green@redhat.com>
3919 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
3920 (f95.stagefeedback): Ditto.
3922 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
3925 * Make-lang.in (f95.stageprofile): Add.
3926 (f95.stagefeedback): Add.
3928 2003-10-23 Richard Henderson <rth@redhat.com>
3930 * f96-lang.c (gfc_gimplify_expr): Remove.
3931 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
3932 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
3934 2003-10-23 Richard Henderson <rth@redhat.com>
3936 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
3938 2003-10-20 Paul Brook <paul@nowt.org>
3940 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
3941 * trans-stmt.c (gfc_trans_do_while): Ditto.
3943 2003-10-17 Paul Brook <paul@nowt.org>
3945 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
3947 2003-10-17 Paul Brook <paul@nowt.org>
3949 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
3951 2003-10-17 Feng Wang <wf_cs@yahoo.com>
3953 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
3954 (gfc_resolve_minloc): Ditto.
3955 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
3956 Return the value after subtracting the lower bound.
3958 2003-10-16 Richard Henderson <rth@redhat.com>
3960 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
3962 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
3964 * lang.c: Remove -M option for now, it's in the way for C.
3966 2003-10-14 Jason Merrill <jason@redhat.com>
3968 * Make-lang.in (f95.tags): New rule.
3970 2003-10-13 Richard Henderson <rth@redhat.com>
3972 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
3974 2003-10-13 Paul Brook <paul@nowt.org>
3976 * trans-decl.c (generate_local_decl): Don't create junk variables.
3978 2003-10-13 Paul Brook <paul@nowt.org>
3980 * resolve.c (resolve_formal_arglist): Use function result decl in
3981 preference to function decl.
3983 2003-10-12 Richard Henderson <rth@redhat.com>
3985 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
3986 TREE_READONLY. Update all callers.
3988 2003-10-12 Feng Wang <wf_cs@yahoo.com>
3990 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
3991 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
3992 (gfc_is_intrinsic_libcall): Add CSHIFT.
3994 2003-10-12 Richard Henderson <rth@redhat.com>
3996 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
3997 (gfc_trans_array_constructor_value): Likewise.
3998 (gfc_conv_array_initializer): Likewise.
3999 * trans-stmt.c (gfc_trans_character_select): Likewise.
4001 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
4003 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
4005 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4007 * check.c (gfc_check_repeat): Check arguments are scalar.
4008 (gfc_check_trim): New function.
4009 * intrinsic.h (gfc_check_trim): Add prototype.
4010 * intrinsic.c (add_functions): Use it.
4011 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
4013 * trans-decl.c: Ditto.
4014 (gfc_build_intrinsic_fucntion_decls): Set them.
4015 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
4016 (gfc_conv_intrinsic_trim): New function.
4017 (gfc_conv_intrinsic_repeat): New function.
4018 (gfc_conv_intrinsic_function): Use them.
4020 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4022 * trans-types.c (gfc_sym_type): Handle result variables.
4024 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4026 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
4027 gfc_get_character_type.
4029 2003-10-11 Feng Wang <wf_cs@yahoo.com>
4031 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
4033 2003-10-11 Paul Brook <paul@nowt.org>
4035 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
4036 (gfc_resolve_dprod): New function.
4037 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
4038 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
4039 (gfc_resolve_dprod): Declare.
4040 * intrinsic.c (add_functions): Use them.
4041 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
4043 2003-10-06 Richard Henderson <rth@redhat.com>
4045 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
4046 * trans-intrinsic.c (call_builtin_clz): Use it.
4048 2003-10-05 Paul Brook <paul@nowt.org>
4050 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
4051 * trans-decl.c (gfc_generate_function_code): Set
4052 cfun->function_end_locus.
4054 2003-09-24 Jason Merrill <jason@redhat.com>
4056 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
4059 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
4060 Paul Brook <paul@nowt.org>
4062 * Make-lang.in (F95_OBJS): Add fortran/data.o.
4063 * array.c (gfc_inser_constructor): New function.
4064 (gfc_get_constructor): New function.
4065 (gfc_free_constructor): Initialize offset and repeat.
4066 (iterator_stack): Remove.
4067 (expand_info): Add offset, component and repeat fields.
4068 (expand_constructor): Set them.
4069 (expand): Set new fields.
4070 (gfc_copy_constructor): Ditto. Avoid recursion.
4071 * gfortran.h: Add prototypes for new functions.
4072 (gfc_constructor): Add offset, component and repeat.
4073 (iteratio_stack): Move to here.
4074 * resolve.c (check_data_variable): Convert data values into variable
4076 (traverse_data_list): Build implicit loop chain.
4077 (gfc_resolve): Ditto.
4078 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
4079 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
4080 * trans-expr.c (gfc_conv_structure): Handle array initializers.
4081 (gfc_conv_expr): Update to match.
4082 * trans.h (gfc_conv_structure): Declare.
4085 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
4087 * trans.h: Add declarations for gfor_fndecl_si_kind and
4088 gfor_fndecl_sr_kind.
4089 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4090 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
4091 (g95_conv_intrinsic_sr_kind): New function.
4092 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
4095 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
4097 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
4098 instead of _4 and _8 as postfix for libgfortran calls.
4100 2003-09-16 Paul Brook <paul@nowt.org>
4102 * array.c (compare_bounds): New function.
4103 (gfc_compare_array_spec): Use it.
4105 2003-09-14 Paul Brook <paul@nowt.org>
4107 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
4108 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
4110 2003-09-14 Paul Brook <paul@nowt.org>
4112 * check.c (dim_rank_check): Allow assumed bounds if requested.
4113 (gfc_check_lbound): Call it.
4114 (gfc_check_ubound): Ditto.
4115 (gfc_check_size): Change to match.
4116 * simplify.c (gfc_simplify_bound): New function.
4117 (gfc_simplify_lbound): New function.
4118 (gfc_simplify_ubound): New function.
4119 * intrinsic.h: Declare them.
4120 * intrinsic.c (add_functions): Use them.
4122 2003-09-14 Paul Brook <paul@nowt.org>
4124 * io.c (format_lex): Initialize negative_flag.
4125 (check_format): Intialize repeat.
4126 * trans-io.c (gfc_new_nml_name_expr): Declare static.
4127 (gfc_new_var_expr): Ditto.
4129 2003-09-14 Paul Brook <paul@nowt.org>
4131 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
4132 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
4134 2003-09-12 Paul Brook <paul@nowt.org>
4136 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
4138 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
4140 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
4141 for a correct expression.
4143 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
4145 * trans-intrinsic.c (real_compnt_info): New struct.
4146 (prepare_arg_info): New function.
4147 (gfc_conv_intrinsic_set_exponent): New function.
4148 (gfc_conv_intrinsic_scale): New function.
4149 (gfc_conv_intrinsic_nearest): New function.
4150 (gfc_conv_intrinsic_fraction): New function.
4151 (gfc_conv_intrinsic_exponent): New function.
4152 (gfc_conv_intrinsic_spacing): New function.
4153 (gfc_conv_intrinsic_rrspacing): New function.
4154 (gfc_conv_intrinsic_function): Use them.
4156 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
4158 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
4159 build_int_2 changed from (high, low) to (low, high).
4160 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
4161 ioparm_namelist_read_mode, iocall_set_nml_val_int,
4162 iocall_set_nml_val_float, iocall_set_nml_val_char,
4163 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
4164 (gfc_build_io_library_fndecls): Add variable initialization.
4165 (gfc_new_nml_name_expr, get_new_var_expr): New function.
4166 (build_dt): Add namelist support.
4167 * io.c (value): New variable.
4168 (check_format): Support FMT_H now.
4170 2003-09-07 Paul Brook <paul@nowt.org>
4172 * io.c (gfc_resolve_dt): Error if format label is not defined.
4174 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
4176 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
4177 about case_switch's break. The other is about building the condition
4178 statement tree, which judges the argument in the range of the
4179 corresponding integer type.
4180 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
4181 for the large values.
4183 2003-09-05 Paul Brook <paul@nowt.org>
4185 * f95-lang.c (expand_function_body): Gimplify the function.
4187 2003-09-04 Jeff Law <law@redhat.com>
4189 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
4192 2003-09-04 Paul Brook <paul@nowt.org>
4194 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
4195 (gfc_expand_stmt): New function.
4196 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
4197 (expand_function_body): Use tree_rest_of_compilation.
4198 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
4200 2003-09-03 Jeff Law <law@redhat.com>
4202 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
4205 2003-08-30 Paul Brook <paul@nowt.org>
4207 * f95-lang.c (builtin_function): Remove #if 0 code.
4208 (gfc_define_builtin): New function.
4209 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
4210 * mathbuiltins.def: New file.
4211 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
4212 (gfc_intrinsic_map): Use mathbuiltins.def.
4213 (gfc_intrinsic_builtin_t): Remove.
4214 (gfc_build_intrinsic_lib_fndecls): Update.
4215 * trans-types.c (gfc_init_types): Remove redundant initilaization of
4216 signed_size_type_node.
4218 2003-08-29 Paul Brook <paul@nowt.org>
4220 * arith.c (gfc_real_kinds): Use correct minimum exponents.
4222 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
4224 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
4225 (gfc_conv_intrinsic_function): Add MODULO.
4227 2003-08-22 Jason Merrill <jason@redhat.com>
4229 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
4231 2003-08-22 Andreas Jaeger <aj@suse.de>
4233 * Make-lang.in (f95.install-common): Add DESTDIR support.
4234 * (f95.install-info): Likewise.
4235 (f95.uninstall): Likewise.
4237 2003-08-19 Diego Novillo <dnovillo@redhat.com>
4239 * trans-types.c (gfc_init_types): Initialize
4240 signed_size_type_node with size_type_node.
4242 2003-08-18 Paul Brook <paul@nowt.org>
4244 * dependency.c (gfc_dependency): New enum.
4245 (check_another_array_ref): Remove.
4246 (gfc_get_array_from_component): Remove.
4248 (get_range): Remove.
4249 (get_no_of_elements): Use mpz_t, not mpf_t.
4250 (transform_sections): New function.
4251 (gfc_check_range_range): Rename ...
4252 (gfc_check_section_vs_section): ... to this. Use new function.
4253 (gfc_is_inside_range): Rewrite to match.
4254 (gfc_check_element_vs_section): Ditto.
4255 (gfc_check_element_vs_element): Ditto.
4257 (gfc_dep_resolver): Ditto. Remove unused parameter.
4258 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
4259 gfc_check_element_vs_element, gfc_is_inside_range,
4260 gfc_get_array_from_component): Remove prototypes for static functions.
4261 (gfc_dep_resolver): Update prototype.
4262 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
4264 2003-08-15 Paul Brook <paul@nowt.org>
4266 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
4267 return values to parent scope.
4268 (gfc_build_dummy_array_decl): Ditto.
4270 2003-08-14 Paul Brook <paul@nowt.org>
4272 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
4273 size of the type, not the pointer.
4274 * resolve.c (resolve_symbol): Give more accurate error message.
4276 2003-08-10 Paul Brook <paul@nowt.org>
4278 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
4280 2003-08-10 Paul Brook <paul@nowt.org>
4282 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
4285 2003-08-10 Chun Huang <compiler@sohu.com>
4287 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
4288 (resolve_symbol): Ditto.
4289 * trans-expr.c (gfc_conv_statement_function): New function.
4290 (gfc_conv_function_expr): Use it.
4292 2003-08-10 Paul Brook <paul@nowt.org>
4294 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
4295 (walk_function_expr): Set section rank.
4296 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
4298 2003-08-10 Paul Brook <paul@nowt.org>
4300 * intrinsic.c (add_sym): Prefix names with correct string.
4301 (add_sym_0s): New function.
4302 (add_subroutines): Register abort.
4304 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
4306 * gfortran.h: Introduce options to control the mangling.
4307 * lang.opt: Likewise.
4308 * options.c (gfc_init_options): Handle the options.
4309 * trans-common.c (gfc_sym_mangled_common_id): New function.
4310 (gfc_build_common_decl): Call it.
4311 * trans-decl.c (gfc_sym_mangled_function_id): New function.
4312 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
4314 2003-08-09 Paul Brook <paul@nowt.org>
4316 * module.c (mio_symbol): Always ouput a namespace for formal args.
4317 (load_needed): Namespace now belong to their proper symbol.
4318 (gfc_dump_module): Change G95=>GFORTRAN.
4320 2003-08-05 Paul Brook <paul@nowt.org>
4322 * options.c: Force -fg77-calls.
4324 2003-08-02 Paul Brook <paul@nowt.org>
4326 * Makelang.in: Rename G95_* to GFORTRAN_*.
4327 * All sources: Rename G95_* to GFC_*.
4329 2003-08-01 Paul Brook <paul@nowt.org>
4331 * fortran/Make-lang.in: Use GMPLIBS.
4332 * fortran/config-lang.in: Set need_gmp.
4333 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
4335 2003-07-27 Andreas Jaeger <aj@suse.de>
4337 * trans-decl.c (gfc_generate_constructors): Convert prototype to
4339 * trans-const.c (gfc_init_constants): Likewise.
4340 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
4342 * gfortranspec.c: Convert to ISO C90.
4343 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
4345 2003-07-26 Paul Brook <paul@nowt.org>
4347 * lang.opt: Add -fdump-parse-tree.
4348 * options.c (gfc_handle_option): Ditto.
4349 * resolve.c (resolve_forall_iterators): Convert to proper type.
4350 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
4352 2003-07-26 Paul Brook <paul@nowt.org>
4354 * Makefile.in: Add build dependencies on files common with rest of gcc.
4356 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
4358 * trans.h: Declare g95_trans_pointer_assignment.
4359 * trans-expr.c (g95_trans_pointer_assignment): New function.
4360 (g95_trans_pointer_assign): Use it.
4361 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
4362 (g95_trans_pointer_assign_need_temp): New function.
4364 2003-07-26 Paul Brook <paul@nowt.org>
4366 * gfortran.texi: Replace references to g95.
4368 2003-07-26 Paul Brook <paul@nowt.org>
4370 Rename g95_* to gfc_*.
4372 2003-07-25 Paul Brook <paul@nowt.org>
4374 * gfortran.h: Rename from g95.h.
4375 * trans-types.c (boolean_type_node, booelan_true_node,
4376 boolean_false_node): Remove.
4377 * trans-types.h: Ditto.
4379 2003-07-25 Chun Huang <compiler@sohu.com>
4381 * parse.c (accept_statement): Implement BLOCK DATA statement.
4382 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
4385 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
4387 * trans-stmt.c (temporary_list): Define.
4388 (g95_trans_assign_need_temp): New function.
4389 (g95_trans_forall_1): Modified for WHERE.
4390 (g95_trans_where_assign): Modified.
4391 (g95_trans_where_2): Modified.
4392 (g95_evaluate_where_mask): Modified.
4393 (g95_trans_where): Modified.
4394 (g95_get_temp_expr): Removed.
4395 (g95_add_to_where_stmt_list): Removed.
4396 (compute_overall_iter_number): Modified for WHERE.
4397 * trans.h: Remove where_stmt_list.
4399 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4401 * lang.opt: Correct description of options -J and -M.
4403 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
4405 * lang.opt: Move help text to here.
4406 * lang-options.h: Remove.
4408 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4409 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
4410 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
4413 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
4414 Paul Brook <paul@nowt.org>
4416 * check.c (check_rest): Use global pedantic flag.
4417 * io.c (data_desc): Ditto.
4418 * error.c (g95_warning, g95_warning_now): Use global flag.
4419 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
4420 (expand_function_body): Update to new prototypes.
4421 (g95_init): Use new option names.
4422 * g95.h (g95_option_t): Standardize names.
4423 (g95_init_options, g95_handle_option): Update prototypes.
4424 * interface.c: Use new option names.
4431 * simplify.c: Ditto.
4433 * trans-array.c: Ditto.
4434 * trans-expr.c: Ditto.
4435 * trans-types.c: Ditto.
4436 * trans-decl.c: Ditto.
4437 (g95_build_library_function_decl): Remove obsolete VPARAMS.
4439 * options.c (g95_display_help): Remove.
4440 (g95_init_options): Convert to new scheme.
4442 (g95module_option): Ditto, rename from g95_parse_arg.
4443 (g95_handle_module_path_options): New function.
4444 * trans-equivalence.c: Fix error message.
4445 * lang.opt: Corrections.
4447 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
4449 * lang.opt: New file.
4451 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4453 * decl.c (match_attr_spec): Set colon_seen.
4455 2003-07-14 Paul Brook <paul@nowt.org>
4457 * trans-array.c: Update comment.
4458 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
4459 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
4460 minmaxloc,minmaxval): Ditto.
4461 * trans-io.c (g95_trans_transfer): Ditto.
4462 * trans-stmt.c: Remove unneeded prototypes.
4463 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
4464 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
4465 (compute_inner_temp_size): Remove bits of dead code. Add comments.
4466 Don't share loopinfo.
4467 (compute_overall_iter_number): Declare as static.
4468 (allocate_temp_for_forall_nest): Ditto.
4469 (g95_trans_forall_1): Don't pass shared loopinfo.
4470 * trans.c (g95_start_block): Expand comment.
4472 2003-07-12 Paul Brook <paul@nowt.org>
4474 * arith.c (g95_index_integer_kind): Remove unused initializer.
4475 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
4476 index by size of element.
4477 (generate_loop_for_rhs_to_temp): Ditto.
4478 (allocate_temp_for_forall_nest): Use element size, not index size.
4480 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4482 * arith.c (g95_index_integer_kind): Add a TODO.
4483 * simplify.c (g95_simplify_nearest): Add a TODO.
4485 2003-07-09 Chun Huang <compiler@sohu.com>
4487 * trans.h: Add declarations for gfor_fndecl_string_scan and
4488 gfor_fndecl_string_verify.
4489 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4490 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
4491 (g95_conv_intrinsic_verify): New function.
4492 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
4493 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
4494 of parameter 'BACK=.TRUE.'
4496 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
4498 * trans-stmt.c (iter_info, forall_info): Define.
4499 (g95_trans_forall_block): Remove.
4500 (g95_trans_forall_loop): Use forall info blocks.
4501 (g95_trans_nested_forall_loop): New function.
4502 (g95_do_allocate): Handle things other than logical masks.
4503 (generate_loop_for_temp_to_lhs): New function.
4504 (generate_loop_for_rsh_to_temp): New function.
4505 (compute_inner_temp_size): New function.
4506 (compute_overall_iter_number): New function.
4507 (allocate_temp_for_forall_nest): New function.
4508 (g95_trans_forall): Move body ...
4509 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
4511 2003-07-02 Paul Brook <paul@nowt.org>
4513 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
4514 in correct scope. Change callers to match.
4515 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
4516 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
4518 2003-07-02 Paul Brook <paul@nowt.org>
4520 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
4521 expression shape for all expressions.
4522 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
4524 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4526 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
4527 g95_parse_arg), intrinsic.c (g95_convert_type): support of
4529 * intrinsic.c, g95.h: Add g95_convert_type_warn,
4530 * resolve.c (g95_resolve_index): Call it.
4532 2003-07-02 Paul Brook <paul@nowt.org>
4534 * iresolve.c (g95_resolve_reshape): Set expression shape.
4535 (g95_resolve_shape): Ditto.
4536 * simplify.c (g95_simplify_shape): Move common code outside condition.
4537 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
4539 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4541 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
4544 2003-06-29 Paul Brook <paul@nowt.org>
4546 * array.c (g95_simplify_iterator_var): Don't bother with return value.
4547 * expr.c (find_array_element, find_component_ref): New functions.
4548 (remove_subobject_ref): New function.
4549 (simplify_const_ref): Use them. Rename from simplify_component_ref.
4550 (simplify_ref_chain): New function.
4551 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
4552 (g95_specification_expr): Simplify the expression.
4553 * resolve.c (resolve_operator): Check simplifications return code.
4554 (g95_resolve_expr): Ditto.
4556 2003-06-26 Paul Brook <paul@nowt.org>
4558 * expr.c (simplify_component_ref): New function.
4559 (g95_simplify_expr): Use it.
4560 * resolve.c (resolve_structure_cons): Handle references.
4562 2003-06-25 Paul Brook <paul@nowt.org>
4564 * trans-io.c (build_dt): Handle internal units.
4566 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
4568 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
4569 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
4570 Use g95_array_index_type instead of integer_type_node.
4571 (g95_build_common_decl, g95_set_common_master_type): Use
4572 g95_character1_type_node instead of char_type_node.
4573 * trans-equivalence.c (g95_layout_local_equiv): As above.
4575 2003-06-24 Steven G. Kargl <kargls@attbi.com>
4577 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
4578 remove last remains of -fquiet.
4580 2003-06-22 Paul Brook <paul@nowt.org>
4582 * resolve.c (resolve_operator): Don't fail if we can't simplify.
4583 (g95_resolve_expr): Ditto.
4584 (resolce_code): Mark as static.
4585 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
4586 gimplifer doesn't (yet).
4588 2003-06-20 Paul Brook <paul@nowt.org>
4590 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
4591 * match.c (g95_match_if): Add ST_PAUSE.
4592 (g95_match_stopcode): New function.
4593 (g95_match_pause, g95_match_stop): Use it.
4594 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
4595 (decode_stmt, next_statement, parse_executable): Ditto.
4596 * resolve.c (resolve_code): Ditto.
4597 * st.c (g95_free_statement): Ditto.
4598 * trans-stmt.c (g95_trans_pause): New function.
4599 * trans-stmt.h: Declare it.
4600 * trans.c (g95_trans_code): Use it.
4601 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
4603 (g95_build_builtin_function_decls): Initialize them.
4605 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
4607 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4609 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
4610 match_filepos): Fix error handling.
4612 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4614 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
4615 Add assertions on arguments.
4616 * resolve.c (expression_shape): Remove useless &.
4617 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
4618 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
4619 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
4620 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
4621 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
4622 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
4623 (g95_simplify_not, g95_simplify_scale): Add assertions.
4625 2003-06-15 Paul Brook <paul@nowt.org>
4627 Clean up stuff to work with the ssa optimizers.
4628 * convert.c (convert): Handle BOOLEAN_TYPEs.
4629 * f95-lang.c (g95_truthvalue_conversion): Implement.
4630 * trans-array.c (g95_trans_array_constructor_value): Group multiple
4632 * trans.h (g95_truthvalue_conversion): Declare.
4633 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
4634 * trans-stmt.c (g95_trans_character_select): Don't create array
4635 assignments. Mark labels as indirect jump targets.
4636 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
4637 (g95_get_dtype_cst): Handle LOGICAL types.
4639 2003-06-14 Paul Brook <paul@nowt.org>
4641 * f95-lang.c (g95_gimplify_expr): New function.
4642 * trans-array.c (g95_trans_array_constructor_value): Don't create
4644 (g95_conv_expr_descriptor): Rename simple->gimple.
4645 * trans-expr.c (conv_expr_op): Use proper logical operators.
4646 * trans-intrinsic.c (build_fixbound_expr): New function.
4647 (build_fix_expr): Ditto.
4648 (g95_conv_intinsic_aint): Use them. Use builtin functions.
4649 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
4651 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4653 * array.c (g95_compare_array_spec): Remove unreachable code.
4654 * expr.c (g95_copy_expr): Likewise.
4655 * intrinsic.c (g95_convert_type): Likewise.
4656 * misc.c (g95_code2string): Likewise.
4657 * simplify.c (g95_simplify_ishft, g95_simplify_real,
4658 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
4659 * trans-stmt.c (g95_trans_select): Likewise.
4660 * primary.c (extend_ref): Add an assertion.
4661 * simplify.c (g95_convert_constant): Add const.
4662 * intrinsic.h: Remove g95_check_x_ni.
4663 * f95-lang.c (g95_finish): Call g95_release_include_path.
4665 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4667 * resolve.c (resolve_contained_functions): Fix typo introduced on
4670 2003-06-09 Paul Brook <paul@nowt.org>
4672 * g95.h: Include system.h not hwint.h.
4673 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
4674 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
4676 2003-06-09 Paul Brook <paul@nowt.org>
4678 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
4679 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
4680 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
4681 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
4682 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
4684 * trans.h (g95_trans_equivalence, g95_trans_common,
4685 g95_add_decl_to_function): Declare.
4686 * trans-common.c, trans-equivalence.c: New files.
4688 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
4690 * intrinsic.c (g95_intrinsic_extension): Remove.
4691 (add_functions): Substitute g95_check_x for g95_check_x_ni
4693 (g95_init_expr_extensions): New function.
4694 (g95_intrinsic_func_interface): Use it.
4695 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
4696 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
4697 g95_check_precision, g95_check_present, g95_check_radix,
4698 g95_check_range, g95_check_selected_real_kind): Do not set
4699 g95_intrinsic_extension.
4700 (g95_check_x_ni): Remove now duplicate of g95_check_x.
4702 * expr.c (check_inquiry): Add FIXME, fixup some code style.
4704 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4706 * g95.h (ref_type): Name this type explicitly.
4707 * module.c (MIO_NAME): Add specialisations of mio_name.
4708 (mio_symbol_attribute, mio_typespec, mio_array_ref,
4709 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
4710 (ab_attribute): Name this type explicitly.
4711 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
4713 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
4715 * trans-intrinsic.c (g95_conv_allocated): New function.
4716 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
4718 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
4720 * f95-lang.c: Don't include g95-support.h
4721 (g95_mark_addressable): Add prototype.
4722 (g95_init_decl_processing): Remove C front end hack.
4723 * f95-tree.c: Remove file.
4724 * support.c: Remove file.
4725 * g95-support.h: Remove file.
4726 * trans-types.c (g95_init_types): Set up boolean
4727 type related tree nodes.
4728 * Make-lang.in: Remove rules for dead files and
4729 dependencies on them.
4731 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
4733 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
4734 C front end dependency. Also, convert.c does not depend on
4735 g95-support.h anymore.
4736 * convert.c: Don't include c-common.h and g95-support.h
4737 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
4738 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
4739 stmts_are_full_exprs_p, current_stmt_tree,
4740 current_scope_stmt_stack): Remove.
4741 * g95-support.h (unsigned_conversion_warning): Kill proto.
4742 (boolean_type_node, boolean_true_node, boolean_false_node):
4743 Don't define here. Instead, make then true tree nodes in
4745 * support.c (c_global_trees): Die, C front end, die!!!
4746 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
4747 uintmax_type_node, string_type_node and const_string_type_node.
4748 (decl_constant_value, overflow_warning): Make static functions.
4749 They are in death row too, though.
4750 (default_conversion, c_expand_asm_operands): Remove.
4751 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
4752 trans.c: Don't include c-common.h.
4753 * trans-types.c (boolean_type_node, boolean_true_node,
4754 boolean_false_node): Make them real tree nodes.
4755 * trans-types.h (intmax_type_node, string_type_node,
4756 const_string_type_node): Hack to work around C dependencies
4757 in builtin-types.def.
4759 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4761 * decl.c (decl_types): Add some iterators-like sentinels.
4762 * decl.c (match_attr_spec): Use them.
4763 Use "decl_types" instead of "int".
4764 Add cast in call to g95_match_strings.
4765 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
4767 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
4768 (g95_interface_info): Use "g95_intrinsic_op".
4769 * dump-parse-tree.c (g95_show_namespace): Use them.
4770 * interface.c (g95_check_interfaces): Use them.
4771 * module.c (read_module, write_module): Use them.
4772 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
4773 Use "g95_intrinsic_op".
4774 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
4775 Add a default case in switch statement.
4776 * intrinsic.h (g95_generic_isym_id): Moved to...
4777 * g95.h (g95_generic_isym_id): here.
4778 (g95_intrinsic_sym): Use "g95_generic_isym_id".
4779 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
4780 * trans-intrinsic.c (g95_intrinsic_map_t,
4781 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
4782 * match.c (g95_match_intrinsic_op): Add cast in call to
4785 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
4787 * support.c (skip_evaluation, warn_conversion, lvalue_p,
4788 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
4789 constant_fits_type_p, convert_and_check,
4790 unsigned_conversion_warning): Remove these ugly remnants
4791 we inherited from the C front end.
4792 (function_types_compatible): Remove '#if 0'-edcode.
4793 (build_modify_expr): Likewise.
4794 (convert_for_assignment): Don't use the deceased functions.
4795 The parameter fundecl is now unused.
4796 (decl_constant_value): Always just return decl. In fact
4797 this function is not used at present, but it might be in
4798 the future, when we start using the tree inliner.
4799 (overflow_warning, default_conversion, c_expand_asm_operands):
4800 Abort when these are called, they are part of the C type
4801 checking implementation and therefore poison to Fortran.
4803 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
4805 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
4806 c-pretty-print.o and c-dump.o. Add a comment on why we
4807 depend on c-semantics.c.
4808 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
4809 Don't use the C front end tree dumper hook to dump the
4810 language specific tree representation -- we don't have
4811 one. So instead, inherit the default langhook.
4813 2003-06-02 Paul Brook <paul@nowt.org>
4815 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
4817 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4819 * check.c (g95_check_associated): Use proper types. Remove
4820 extraneous argument in call to g95_error().
4822 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4824 * resolve.c (resolve_operator): Make logical operands convert to the
4825 type with higher kind.
4827 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4829 * check.c (g95_check_associated): Make sure both pointer and target has
4830 the same type and rank. Null pointer or array section with vector
4831 subscript as target are not allowed.
4832 * trans.h: Declare gfor_fndecl_associated.
4833 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
4834 gfor_fndecl_associated.
4835 * trans-intrinsic.c (g95_conv_associated): New function.
4836 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
4838 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4840 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
4841 according to POINTER itself rather than TARGET.
4842 (g95_conv_expr_descriptor): Make lbound start at 1.
4843 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
4845 2003-06-01 Paul Brook <paul@nowt.org>
4847 * expr.c (g95_type_convert_binary): Make it match the standard.
4848 * g95.texi: Remove dead link.
4850 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
4852 * g95.texi: Cleanup somewhat in preparation for inclusion
4855 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4856 Canqun Yang <canqun@yahoo.com.cn>
4858 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
4860 (g95_find_forall_index): Return proper value.
4861 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
4862 compare the return value from g95_find_forall_index.
4864 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4865 * g95.h, io.c (g95_st_label): Remove "length".
4866 (g95_symtree): Remove "link".
4867 (g95_case): Remove "code".
4868 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
4869 g95_convert_real): Make an argument pointer to const.
4870 * decl.c (colon_seen): Add a TODO.
4871 * interface.c (g95_compare_types): Fix typo.
4872 * interface.c (compare_interfaces): Preserve value of "p".
4873 * intrinsic.c (sort_actual): Remove "i".
4874 * match.c (g95_match_assign): Proper type in call to g95_match().
4875 * parse.c (next_free): Avoid duplicate call due to macro.
4876 * parse.c (check_statement_label): wrong type in call to g95_error.
4877 * primary.c (match_real_constant): Add a TODO.
4878 * resolve.c (resolve_select): Remove useless conditional.
4879 * simplify.c (g95_simplify_repeat): Proper assignment to
4880 "value.character.string".
4881 * simplify.c (g95_simplify_reshape): Wrong variable in call to
4884 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
4886 * trans-stmt.c: Remove unnecessary include file defaults.h.
4888 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
4890 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
4892 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
4893 actual variables used as FORALL indexes.
4895 2003-05-15 Paul Brook <paul@nowt.org>
4897 * trans-array.c (g95_trans_static_array_pointer): Use
4899 (g95_trans_deferred_array): Initialize static array pointers.
4900 * trans-expr.c (g95_conv_function_call): Use formal arglist to
4901 correctly pass POINTER and absent CHARACTER arguments.
4903 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
4905 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
4906 (g95_resolve_forall_body): Resolve FORALL body.
4907 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
4908 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
4909 (g95_find_forall_index): Check whether the FORALL index appears in
4910 the expression or not.
4911 (resolve_code): Modified.
4913 2003-05-14 Paul Brook <paul@nowt.org>
4915 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
4917 2003-05-13 Paul Brook <paul@nowt.org>
4919 * trans-types.c (g95_max_array_element_size): Now a tree node.
4920 (g95_init_types): Work out max size properly.
4921 (g95_get_dtype_cst): Modify to match.
4923 2003-05-11 Paul Brook <paul@nowt.org>
4925 * trans-io.c (add_case): Create a label decl for case labels.
4927 2003-05-11 Paul Brook <paul@nowt.org>
4929 * arith.c (g95_integer_index_kind): New variable.
4930 * f95-lang.c (g95_init): Move frontend initialization here ...
4931 (g95_post_options): ... from here.
4932 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
4933 * intrinsic.c (add_functions): Use index kinds.
4934 * iresolve.c: Convert to index_kind where needed.
4935 * resolve.c (g95_resolve_index): Make public, use index_kind.
4936 (resolve_array_ref): Adjust to match.
4937 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
4938 * trans-stmt.c: Ditto.
4939 * trans-types.c: Ditto.
4940 * trans-types.h (g95_array_index_kind): Remove declaration.
4941 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
4943 2003-05-07 Paul Brook <paul@nowt.org>
4945 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
4946 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
4949 2003-05-07 Paul Brook <paul@nowt.org>
4951 * trans-array.c (trans_static_array_pointer,
4952 g95_trans_array_constructor_value, g95_conv_array_initializer,
4953 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
4954 (g95_add_loop_ss_code): Convert subscripts to the correct type.
4955 * trans-stmt.c (g95_trans_character_select): Ditto.
4956 * trans-types.c (g95_init_types): Ditto.
4958 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
4960 * f95-lang.c (expand_function_body): Use input_line, not lineno.
4961 * trans-decl.c (g95_generate_function_code,
4962 g95_generate_constructors): Likewise.
4963 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
4964 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
4967 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
4968 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
4969 with components point to the DERIVED type itself, and two DERIVED
4970 type with components point to each other.
4971 * trans-expr.c (g95_conv_componet_ref): Modified
4973 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
4974 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
4976 (g95_trans_pointer_assign): Implement Nullify.
4978 2003-05-01 Paul Brook <paul@nowt.org>
4980 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
4981 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
4983 2003-05-01 Paul Brook <paul@nowr.org>
4985 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
4986 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
4989 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
4991 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
4994 2003-04-28 Paul Brook <paul@nowt.org>
4996 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
4997 as their kind suggests.
4998 (g95_resolve_reshape): Ditto.
5000 2003-04-28 Chun Huang <compiler@sohu.com>
5002 * trans-expr.c (g95_conv_substring_expr): New function.
5003 (g95_conv_expr): Use it.
5005 2003-04-28 Paul Brook <paul@nowt.org>
5007 * iresolve.c (g95_resolve_transpose): Make it match the
5009 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
5011 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
5013 * trans-types.c (g95_add_field_to_struct): New function to
5014 add a field to a UNION_TYPE or RECORD_TYPE.
5015 * trans-types.h (g95_add_field_to_struct): Prototype.
5016 (g95_get_derived_type): Use g95_add_field_to_struct to add
5018 * trans-io.c (g95_add_field): Remove.
5019 (ADD_FIELD): Use new g95_add_field_to_struct function.
5020 (ADD_STRING): Likewise.
5021 * trans-stmt.c (g95_trans_select): Likewise.
5022 (g95_add_field): Remove duplicated function.
5024 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
5026 Port implementation for CHARACTER SELECT from Andy's tree.
5027 * trans-stmt.c (g95_trans_character_select): Implement character
5028 select. (g95_add_field): New function.
5029 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
5030 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
5031 * g95.h (struct g95_case): Add field 'int n'.
5032 * trans.h: Declare 'gfor_fndecl_select_string'.
5034 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
5036 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
5037 (g95_insert_bbd): Die on duplicates.
5038 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
5040 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
5042 * g95.texi: Require GMP 4.0 -- like we actually
5043 do. Explain the testsuite and what-goes-where.
5044 Don't use undefined texinfo symbol. Break very
5045 long line. Remove finished item from the list
5048 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
5050 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
5053 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
5055 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
5056 (g95_trans_forall_body): New function.
5058 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
5060 * resolve.c (resove_where): New function.
5061 (resolve_where_shape): New function.
5062 (resolve_code): Add call to 'resolve_where'
5063 * trans-stmt.c (g95_trans_where): Modified.
5064 (g95_trans_where_2): New function.
5065 (g95_trans_where_assign): New function.
5066 (g95_evaluate_where_mask): New function.
5067 (g95_add_to_stmt_list): New function.
5068 (g95_get_temp_expr): New function.
5069 * trans.h (where_stmt_list): New structure.
5071 2003-04-10 Paul Brook <paul@nowt.org>
5073 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
5074 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
5076 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
5078 Update after mainline -> tree-ssa-branch merge.
5079 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
5081 (g95_init): Update for new lang_hooks definition.
5082 (g95_post_options): New langhook.
5083 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
5084 * scanner.c (g95_new_file): Comment update.
5086 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5088 * g95.h, lang-options.h: Add -Wimplicit-interface.
5089 * options.c (g95_init_options, g95_parse_arg): Set it.
5090 * interface.c (check_intents): Warn about call with implicit
5092 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
5095 2003-04-05 Paul Brook <paul@nowt.org>
5097 * iresolve.c (g95_resolve_spread): Don't resole based on type.
5098 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
5100 2003-03-29 Paul Brook <paul@nowt.org>
5102 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
5103 (g95_resolve_unpack): Ditto.
5104 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
5105 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
5106 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
5108 2003-03-25 Paul Brook <paul@nowt.org>
5110 * arith.c (g95_unary_user, g95_user): Remove dead functions.
5112 * array.c (g95_free_array_ref): Ditto.
5114 * symbol.c (g95_use_derived_tree): Ditto.
5115 * intrinsic.c (add_functions): Use simplification for SCALE.
5116 * primary.c (g95_match_rvalue): Test sym, not symtree.
5118 2003-03-25 Paul Brook <paul@nowt.org>
5120 * trans-decl.c (build_function_decl): Add parameter before it gets
5121 turned into a constant.
5122 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
5123 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
5124 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
5126 2003-03-22 Paul Brook <paul@nowt.org>
5128 * trans-array.c (g95_conv_array_initializer): Allow scalar
5130 * trans-decl.c (g95_finish_var_decl): Result variables are not
5132 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
5133 (g95_conv_intrinsic_function): Use it.
5134 * trans-types.h (g95_type_spec): Remove dead declaration.
5136 2003-03-21 Paul Brook <paul@nowt.org>
5138 * trans-decl.c (g95_build_function_decl): Mark string parameters.
5140 2003-03-20 Paul Brook <paul@nowt.org>
5142 * trans-decl.c (g95_build_function_decl): Put character length
5143 parameters at the end of the function declaration.
5144 * trans-expr.c (g95_conv_function_call): Ditto.
5145 * trans-types.c (g95_get_function_type): Ditto.
5147 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5149 * resolve.c (resolve_formal_arglist): Don't impose intent for
5150 procedure arguments of pure functions.
5151 (resolve_select): Remove redundant assignment.
5153 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5155 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
5157 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
5158 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
5160 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
5162 * symbol.c (g95_add_type): Fix typo in comment.
5165 2003-03-16 Paul Brook <paul@nowt.org>
5167 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
5168 * expr.c (g95_build_call): Remove.
5169 * f95-lang.c (puchdecl_top_level): New function.
5170 * g95.h (g95_code): Store resolved symbol, not just the name.
5171 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
5172 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
5173 (g95_get_intrinsic_sub_symbol): New function.
5174 * iresolve.c (g95_resolve_cpu_time): Use it.
5175 (g95_resolve_random_number): Ditto.
5176 * resolve.c: Set code->resolved_sym instead of code->sub_name.
5177 * trans-decl.c (g95_get_extern_function_decl): Give external decls
5178 the correct DECL_CONTEXT. Add global symbold to the global scope.
5179 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
5182 2003-03-16 Paul Brook <paul@nowt.org>
5184 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
5185 * options.c (g95_parse_arg): Ditto.
5186 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
5187 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
5188 for the procedure, not the parameter.
5189 * trans-array.c (g95_trans_g77_array): New function.
5190 (g95_trans_assumed_size): Use it.
5191 (g95_trans_dummy_array_bias): Ditto.
5192 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
5193 (g95_conv_expr_descriptor): ... to here. Update callers.
5194 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
5195 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
5196 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
5197 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
5198 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
5199 (g95_sym_type): Ditto.
5201 2003-03-15 Paul Brook <paul@nowt.org>
5203 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
5205 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
5207 2003-03-14 Paul Brook <paul@nowt.org>
5209 * trans-array.c (g95_array_is_packed): Remove.
5210 (g95_conv_array_base): Correctly handle all descriptorless cases.
5211 (g95_conv_array_stride): Use descriptorless strides.
5212 (g95_trans_dummy_array_bias): Don't always repack the array.
5213 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
5215 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
5216 dummy and non-dummy arrays...
5217 (g95_sym_type, g95_get_derived_type): ... like these.
5218 (g95_get_array_type_bounds): Allow discontiguous arrays.
5220 2003-03-12 Paul Brook <paul@nowt.org>
5222 * array.c (g95_resolve_array_spec): Fix comment.
5223 * g95.h (symbol_attributes): New flag always_explicit.
5224 * resolve.c (resolve_formal_arglist): Set it always_explicit.
5225 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
5226 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
5227 (g95_trans_array_bounds): Allow assumed shape arrays.
5228 (g95_trans_repack_array): Remove.
5229 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
5230 * trans-decl.c (g95_build_qualified_array): Only ignore absent
5231 bounds for assumed size arrays.
5232 (g95_build_dummy_array_decl): Use descriptorless arrays.
5233 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
5234 (g95_trans_pointer_assign): Fix typo.
5235 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
5237 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
5238 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
5239 Also modify callers.
5240 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
5242 2003-03-08 Paul Brook <paul@nowt.org>
5244 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
5245 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
5246 * resolve.c (compare_spec_to_ref): Allow full array sections.
5248 2003-03-08 Paul Brook <paul@nowt.org>
5250 * expr.c (g95_simplify_expr): Also simplify array index and
5251 substring expressions.
5252 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
5253 * trans-array.c (g95_trans_array_bounds): New function.
5254 (g95_trans_auto_array_allocation): Use it.
5255 (g95_trans_assumed_size): Rewrite.
5256 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5257 (gfor_fndecl_repack): Remove.
5258 (g95_build_qualified_array): Handle absent upper bounds.
5259 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
5260 (g95_get_symbol_decl): Update.
5261 (g95_build_intrinsic_function_decls): Initialize new decls.
5262 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5263 (gfor_fndecl_repack): Remove.
5264 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
5265 * trans-types.c: (g95_build_array_type): Merge duplicated code..
5266 (g95_get_nodesc_array_type): Handle absent bounds.
5267 * trans-types.h (g95_get_nodesc_array_type): Declare.
5269 2003-03-04 Paul Brook <paul@nowt.org>
5271 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
5274 2003-03-02 Paul Brook <paul@nowt.org>
5276 * options.c (g95_init_options): Drfault to 1.
5277 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
5278 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
5279 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
5280 Handle non-constant size automatic arrays.
5281 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
5282 generic bound functions.
5283 (g95_trans_auto_array_allocation): Don't create a descriptor.
5284 (g95_trans_assumed_size): New function (broken).
5285 (g95_trans_dummy_array_bias): Remove unused var.
5286 * trans-array.h (g95_trans_assumed_size): Declare.
5287 * trans-decl.c (create_index_var): New fuction.
5288 (g95_build_qualified_array): New function.
5289 (g95_get_symbol_decl): Use it.
5290 (g95_trans_deferred_vars): Handle assumed shape seperately.
5291 * trans-types.c (get_element_type): Handle heap allocated arrays.
5292 (g95_is_nodesc_array): Include non-const size arrays.
5293 (g95_get_nodesc_array_type): Ditto.
5295 2003-02-23 Paul Brook <paul@nowt.org>
5297 * trans-array.c (g95_array_init_size): Should use stride, not size of
5300 2003-02-18 Paul Brook <paul@nowt.org>
5302 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
5303 after intrinsic function check.
5305 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5307 * io.c (match_io): Fix missing return value and remove useless
5309 * match.c (g95_match): Remove useless assignment.
5310 * module.c (parse_string): Remove useless post increment.
5311 * simplify.c (g95_simplify_verify): Remove useless assignment.
5313 2003-02-15 Paul Brook <paul@nowt.org>
5315 * expr.c (restricted_intrinsic): Handle bad values gracefully.
5316 * g95.h (symbol_attribute): Add referenced member.
5317 (g95_symbol): Add dummy_order member.
5318 (g95_set_sym_referenced): Declare.
5319 * match.c (g95_match_assignment, g95_match_call): Use it
5320 * primary.c (match_actual_arg, g95_match_rvalue,
5321 g95_match_variable): Ditto.
5322 * symbol.c (next_dummy_order): New variable.
5323 (g95_set_sym_referenced): New function.
5324 (check_done): New function.
5325 (g95_add_*): Use it.
5326 * trans-decl.c: Make formatting conform to GCC standards.
5327 (g95_defer_symbol_init): Add dummy variables in the right order.
5328 (g95_get_symbol_decl): Only accept referenced variables.
5329 (g95_create_module_variable): Module variables are always required.
5330 (generatr_local_decls): New function.
5331 (generate_local_vars): New function.
5332 (g95_generate_function_code): Use it.
5334 2003-02-13 Paul Brook <paul@nowt.org>
5336 * trans-decl.c (g95_conv_struct_cons): Remove.
5337 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
5338 * trans-expr.c (g95_conv_structure): New function.
5339 (g95_conv_expr): Use it.
5341 2003-02-09 Paul Brook <paul@nowt.org>
5343 * trans-array.c (g95_array_init_size): Don't evaluate the linit
5344 expressions multiple times.
5345 (g95_trans_auto_arry_allocation): Use pointer not tmp.
5347 2003-02-08 Paul Brook <paul@nowt.org>
5349 * module.c (mio_symtree_ref): Declare as static.
5350 (mio_expr): Remove dead code.
5351 (read_module): Set the symtree link for fixups.
5352 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
5353 (build_round_expr): ... to this.
5354 (g95_conv_intrinsic_aint): New function.
5355 (g95_conv_intrinsic_function): Use it.
5357 2003-02-08 Paul Brook <paul@nowt.org>
5359 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
5360 offset after modificaton, not the increment expression.
5361 * dependency.c: Kill excess whitespace.
5363 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
5365 * dependency.h: Remove some function declarations.
5366 * dependency.c (get_no_of_elements): Change this function not to
5368 * other: Add comments for all modified functions.
5370 2003-02-06 Paul Brook <paul@nowt.org>
5372 * g95spec.c (lang_specific_functions): Fix initializer warning.
5373 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
5374 for structure type names.
5375 * trans-decl.c (g95_cons_structure_cons): New function.
5376 (g95_get_symbol_decl): Use it.
5377 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
5380 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5382 * resolve.c (compare_cases): Add const to casts.
5384 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5386 * g95.h (g95_check_f): Change a1 to f1m.
5387 * intrinsic.c (add_sym_1m, check_specific,
5388 g95_intrinsic_func_interface): Use it.
5390 * module.c (init_pi_tree): Remove useless cast.
5391 (fp2): Fix argument type.
5393 * parse.c (parse_select_block): Add comment.
5395 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
5397 * lang-options.h: Fix warning involving C90 concatenated
5400 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5401 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5403 * io.c (format_asterisk): Complete initializer to kill warning.
5404 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
5405 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
5406 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
5407 new defines to complete initializers. Kills all warnings.
5409 * Make-lang.in: Comment cleanup.
5411 2003-02-05 Paul Brook <paul@nowt.org>
5413 * array.c (g95_free_constructor): Handle NULL expressions.
5414 * resolve.c (resolve_structure_cons): Ditto.
5415 * decl.c (g95_match_null): New Function.
5416 (variable_decl): Use it.
5417 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
5418 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
5419 * trans-types.c (g95_set_decl_attributes): Remove empty function.
5421 2003-02-05 Paul Brook <paul@nowt.org>
5423 * trans.h (build1_v): New macro.
5424 (build_v): Remove pointless and incorrect prototype.
5425 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
5426 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
5428 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
5430 * Make-lang.in (F95_OBJS): Remove one more dead file.
5432 2003-02-01 Paul Brook <paul@nowt.org>
5434 * lang-specs.h: Don't pass -ffixed-form to the linker.
5435 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
5437 2003-02-01 Paul Brook <paul@nowt.org>
5439 * Make-lang.in (F95_OBJS): Remove dead files.
5440 * trans-array.c (g95_array_init_size): Do the right thing when
5442 * trans-decl.c (g95_generate_function_code): Initialize deffered
5443 symbol list before translating contained subroutines.
5444 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
5445 scalar invariant values here...
5446 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
5447 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
5449 2003-01-29 Paul Brook <paul@nowt.org>
5451 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
5452 (g95_walk_elemental_function_args): Reverse chains before adding.
5453 (g95_reverse_ss): Move about a bit.
5454 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
5457 2003-01-28 Paul Brook <paul@nowt.org>
5459 * intrinsic.c (resolve_intrinsic): Use correct union member.
5460 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
5462 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
5463 use associated variables.
5464 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
5465 * trans-expr.c (g95_conv_expr_present): ... to here.
5466 * trans.h: Declare it.
5467 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
5469 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5471 * array.c (expand_iterator): Suppress useless assignment.
5472 * decl.c (match_char_spec): Ditto.
5473 * io.c (match_io_iterator): Ditto.
5474 * primary.c (match_real_constant): Ditto.
5475 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
5476 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
5477 * matchexp.c (match_add_operand, match_level_5): Likewise.
5478 * module.c (parse_atom, find_enum): Likewise.
5479 * resolve.c: move #include <string.h>
5480 (resolve_select): Fix serious typo.
5482 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
5484 * Make-lang.in: Don't build with broken tree-ssa-pre.
5486 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
5488 * resolve.c (resolve_index): Add a TODO.
5489 * symbol.c: Remove useless "#include <ctype.h>".
5491 2003-01-27 Paul Brook <paul@nowt.org>
5493 * check.c (check_rest): Allow different type kinds as an extension.
5494 * g95.h (g95_resolve_f): Add f1m.
5495 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
5496 * intrinsic.h: Chenge prototypes for MIN and MAX.
5497 * iresolve.c (g95_resolve_minmax): New function.
5498 (g95_resolve_min, g95_resolve_max): Use it.
5499 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
5501 (g95_conv_intrinsic_present): Fix logic.
5503 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
5505 * g95.h (g95_case): Don't be a tree, be a double linked list.
5506 * match.c (match_case_selector): Remove redundant semantics check.
5507 Clean up a few goto's to make it a tiny little bit faster.
5508 * resolve.c (case_tree): Die.
5509 (compare_cases): Accept and compare unbounded cases too.
5510 (check_case_overlap): Don't build a tree. Instead, merge-sort the
5511 whole list of g95_cases passed from resolve_select.
5512 (sane_logical_select): Die.
5513 (check_case_expr): Return FAILURE if a CASE label is of the wrong
5515 (resolve_select): Fixup case expression for computed GOTOs, put it
5516 in expr, not expr2, for easier handing in the parse tree dumper and
5517 the code generator. Rewrite the rest of the function: Kill
5518 unreachable case labels and unreachable case blocks.
5519 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
5520 an EXEC_SELECT, not case2 anymore.
5521 * trans-const.c (g95_conv_constant_to_tree): New function.
5522 (g95_conv_constant): Use it.
5523 * trans-const.h: Declare prototype for the new function.
5524 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
5525 g95_trans_character_select): New static functions.
5526 (g95_trans_select): Rewrite.
5528 2003-01-26 Paul Brook <paul@nowt.org>
5530 * intrinsic.c (add_fnctions): Properly add dreal.
5531 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
5532 (g95_conv_intrinsic_function): Use it.
5533 * trans-io.c (build_dt): Abort on internal files (unimplemented).
5535 2003-01-26 Paul Brook <paul@nowt.org>
5537 Widespread changes to the handling of symbols in expressions. These
5538 are now linked via g95_symtree nodes.
5539 * parse.c (g95_fixup_sibling symbols): New function.
5540 (parse_contained): Use it.
5541 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
5542 contained procedure that has bee correctly fixed up.
5543 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
5545 2003-01-24 Paul Brook <paul@nowt.org>
5547 * trans-array.c (g95_walk_expr): Function result attributes are in
5549 * trans-expr.c (g95_conv_function_call,
5550 g95_trans_arrayfunc_assign): Ditto.
5551 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
5553 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
5555 * expr.c (check_restricted): Fix error message.
5556 * symbol.c (free_st_labels): Plug memleak.
5558 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
5560 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
5561 reduce_binary_aa, reduce_binary, eval_intrinsic,
5562 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
5563 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
5564 for typesafe intrinsics helper functions.
5565 (g95_intrinsic_sym): Use them.
5566 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
5567 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
5568 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
5569 check_specific, g95_intrinsic_func_interface,
5570 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
5572 * trans-decl.c (g95_get_extern_function_decl): Likewise.
5573 * Make-lang.in: Don't disable warnings for strict prototypes
5574 any longer, everything is typesafe now.
5576 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
5578 * bbt.c (duplicate_node): Make static.
5579 * module.c (module_name): Make static.
5580 * scanner.c (include_dirs): Make static.
5582 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5584 Hard coded _gfor_'s should not show up anymore.
5585 * g95.h (PREFIX): New macro.
5586 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
5588 (g95_resolve_random_number): Likewise.
5589 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
5590 * trans-io.c: Remove 'prefix' macro. Replace all uses with
5591 the new PREFIX macro from g95.h.
5593 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5595 The troubles of forking... Andy implemented this just now too.
5596 Let's stick to that and keep the trees close.
5597 * g95.h (g95_st_label): 'format' member is now a g95_expr.
5598 * io.c: Revert previous changes.
5599 (g95_match_format): Match the format string as a character
5601 * match.h (g95_statement_label): Declare external.
5602 * parse.c: Revert previous changes.
5603 * symbol.c (g95_free_st_label): Free a g95_expr instead
5605 * trans-io.c: Revert previous changes.
5606 (build_dt): Use set_string to set the format string.
5608 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5610 * io.c (format_string): Make non-static.
5611 (g95_match_format): Remember the format string.
5612 (terminate_io): Add I/O termination for empty I/O lists.
5613 * match.h: Declare external format_string.
5614 * parse.c (check_statement_label): Attack the format string
5615 to a format label for FORMAT statements.
5616 * trans-io.c (g95_add_field): Define prefix macro. Replace
5617 all uses of PREFIX define with a use of this macro.
5618 (build_dt): Implement formatted I/O for format labels.
5620 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5622 * lang-options.h: Kill "-std=F".
5623 * options.c: Remove unimplemented "-std=F". Modify
5625 * misc.c (g95_terminal_width): New function.
5626 * error.c (g95_error_init_1): Use g95_terminal_width.
5627 * g95.h: Add prototype for g95_terminal_width, remove
5630 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
5632 * Make-lang.in: Fix typo.
5634 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
5636 * g95.h (struct g95_case): Remove unused cruft, new member
5637 'where' to keep track of the locus of the default case.
5638 * match.c (g95_match_case): Add locus to the current case.
5639 (match_case_selector): Likewise.
5640 * parse.c (parse_select_block): Move semantics check for
5641 multiple DEFAULT cases out of here to...
5642 * resolve.c (check_case_overlap): ...here. Return sooner
5644 (check_case_expr): Take two g95_cases now, use to sure the
5645 expression kinds are the same.
5646 (resolve_select): Cleanup.
5648 2003-01-18 Paul Brook <paul@nowt.org>
5650 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
5651 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
5653 (g95_get_extern_function_decl): Put decls in the correct context.
5655 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
5657 * trans-io.c: Port changes from Andy to set ERR flag.
5659 2003-01-17 Paul Brook <paul@nowt.org>
5661 * trans-array.c: Add various comments.
5662 (g95_ss_terminator): Declare as const.
5663 (g95_walk_expr): Remove first parameter and update all callers.
5664 (g95_walk_op_expr): Initialize scalar SS properly.
5665 * trans-array.h (g95_walk_expr): Update prototype.
5666 * trans-expr.c: Update for new g95_walk_expr.
5667 * trans-intrinsic.c: Ditto.
5668 * trans-io.c: Ditto.
5669 * trans.h: Various comments for SS chains.
5671 2003-01-17 Paul Brook <paul@nowt.org>
5673 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
5675 * intrinsic.c (add_functions): Use them.
5676 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
5677 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
5679 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5681 Fallout of a small merge conflict:
5682 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
5684 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5686 * initrinsic.c: New add_sym_* functions for strong typing.
5687 (add_conv): Make prototype strict.
5688 * dump-parse-tree.c, dependency.c: Include config.h
5689 * resolve.c, trans-io.c: Fix typos.
5691 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5693 * dump-parse-tree.c (g95_show_code_node): Show the
5694 condition for a computed GOTO that was transformed
5695 to a SELECT CASE construct.
5696 * resolve.c (check_case_overlap): Revert previous switch
5697 to treaps, it was too slow and didn't catch all trouble.
5698 (resolve_symbol): Be more flexible about module procedures.
5699 * symbol.c (check_conflict): Point to relevant section in
5700 the standard for dubious conflict. Allow procedure
5701 dummy arguments to be optional again.
5702 * trans-io (add_field): Rename to g95_add_field. Change
5704 * trans-stmt (trans_select): Handle unbounded cases for
5705 integer SELECT CASE constructs. Fix/add more comment.
5707 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5709 * g95.h: Uses GCC's function attribute macros.
5710 * error.c, module.c, parse.c, g95.h: More function attributes.
5712 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
5714 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
5715 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
5718 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
5720 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
5722 * trans.c (g95_trans_code): Use annotate_all_with_file_line
5723 instead of nowdead wrap_all_with_wfl.
5725 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5727 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
5728 before generating code, so we can still see it even if the code
5729 generation phase dies.
5731 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5733 * decl.c (build_sym): Split out initialization expression parts...
5734 (add_init_expr_to_sym): ...to here.
5735 (variable_decl): Add the symbol following an attribute list to the
5736 symbol tree before parsing the optional initialization expression
5737 if the symbol is not of a derived type.
5738 * primary.c (g95_match_rvalue): Don't assume a symbol always has
5739 a value if it is a PARAMETER.
5741 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5743 * misc.c: Don't #include <mcheck.h>
5744 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
5745 ever was a glibc bug, then either this was never reported to
5746 glibc people, or it has been fixed for so long that there's
5747 no information you can find about it, anywhere.
5749 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5752 * module.c (attr_bits, bt_types, array_spec_types):
5753 Switch 'const' and 'static'.
5754 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
5756 GNU'ify source code:
5757 * trans-io.c: Numerous fixes, one fixed warning and a few
5758 TODO markers so that we don't forget about them.
5760 2003-01-13 Paul Brook <paul@nowt.org>
5762 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
5763 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
5765 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
5766 * match.c (g95_match_stop): Fix dumb == -> != error.
5768 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
5770 * dump-parse-tree.c (show_indent): Add line breaks. This
5771 whole dumping process needs cleanups.
5772 * f95-lang.c (g95_mark_addressable): Fix prototype to match
5773 the langhook. Fix 'return's accordingly.
5774 * g95-support.h: Adjust prototype.
5775 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
5776 * lang-options.h: Add '-fsyntax-only'.
5777 * options.c (g95_init_options): Init 'no_backend'.
5778 (g95_parse_arg): Deal with '-fsyntax-only'.
5779 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
5782 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
5784 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
5785 arguments. Also make sure that if a symbol is marked INTRINSIC,
5786 an intrinsic with the symbol's name actually exists.
5787 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
5788 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
5789 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
5791 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
5793 * resolve.c (resolve_contained_functions): Fix condition, don't
5794 throw internal_error if a child namespace has no name. Apparently
5795 this can be the case?
5797 2003-01-11 Paul Brook <paul@nowt.org>
5799 Port changes from Andy's tree:
5800 * g95.h (g95_code): Add stop_code.
5801 * match.c (g95_match_stop): Detter syntax checking.
5802 * resolve.c (resolve_generic_f0): Return match type.
5803 (resolve_generic_f): Remove dead/duplicated code.
5804 (resolve_specific_f): Ditto.
5805 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
5806 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
5807 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
5809 2003-01-11 Paul Brook <paul@nowt.org>
5811 * trans-array.c: Various documentation/comment changes.
5812 * trans-stmt.c: Ditto.
5815 2003-01-10 Paul Brook <paul@nowt.org>
5817 * options.c/h: Add -fdump-parse-tree as alias of -v.
5819 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5821 * dump-parse-tree.c (g95_show_namespace): Fixed another
5822 typo. Sorry, it's Friday...
5824 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5827 * trans-array.c, trans-array.h, trans.c, trans-const.c,
5828 trans-const.h, trans-decl.c, trans-expr.c, trans.h
5829 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
5830 trans-types.c: Fix bogus copyright years, add 2003.
5831 * trans-types.h: Give copyright header.
5833 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5835 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
5836 * expr.c, options.c, scanner.c: Add some more 'const' markers.
5837 * intrinsic.c: Some constant strings moved to read-only memory.
5838 * io.c (format_asterisk): Move to...
5841 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5843 * dump-parse-tree.c (g95_show_namespace): Dump implicit
5844 types for ranges instead of per-letter. Indent the
5845 'CONTAINS' just like everything else.
5846 * resolve.c (resolve_contained_functions): Clarify comment.
5847 Explain non-obvious conditional expression. Improve
5848 diagnostics if tyoe cannot be resolved.
5849 Port semi-fix from Andy's tree:
5850 (was_declared): Move up before first use.
5851 (generic_sym, specific_sym): New functions. Code moved
5852 out if procedure_kind.
5853 (procedure_kind): Simplify using new functions.
5854 (resolve_generic_f): Make sure the functions we find in
5855 a parent namespace is generic.
5856 (resolve_specific_f): Ditto for specific functions.
5858 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5860 * trans-stmt.c, trans.c: Fix some code style issues. Add
5861 some more comment (but still not enough!).
5863 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5865 * symbol.c (flavors, procedures, intents, acces_types,
5866 access_types, ifsrc_types): Make const.
5867 * misc.c (g95_string2code): Make 'm' param 'const'.
5868 * module.c (find_enum, write_atom, mio_name): Make
5870 (attr_bits, bt_types, array_spec_types, array_ref_types,
5871 ref_types, expr_types): Make const.
5872 * g95.h: Adjust external decls.
5874 2003-01-09 Paul Brook <paul@nowt.org>
5876 * Testsuite: Add a load of new cases.
5878 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
5880 * Make-file.in: Add dependency on back end header files;
5881 a parallel build should work now.
5882 * f95-lang-c (lang_identifier): Remove bogus comment.
5883 (g95_be_parse_file): Fix prototype.
5884 (g95_init): Make static.
5885 (g95_finish): Make static.
5886 * error.c (g95_syntax_error): Kill. Make define in...
5887 * g95.h (g95_syntax_error): Define.
5888 (g95.options): Make 'source' member 'const'.
5889 * interface.c (g95_match_interface): Explain
5890 hard-to-read condition.
5891 (g95_match_end_interface): Ditto.
5892 * trans_const.c (g95_build_string_const): Make 's' parameter
5894 * trans_const.h: Adjust protoype accordingly.
5895 * trans-decl.c: Include tree-dump.h
5896 (g95_generate_function_code): Build fixes for recent changes
5897 in the tree-ssa branch.
5899 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
5901 * format.c: Kill, move code from here...
5903 * Make-lang.in: Adjust.
5906 * BUGS: Mention where to submit bugs. Move old content...
5907 * TODO: ...to here. New file.
5909 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
5910 Fix most warnings, and suppress the ones we can't fix for now.
5911 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
5912 these warnings just clutter the screen and there's not much
5913 we can do about them for now anyway.
5914 * check.c, iresolve.c: Mark unused function parameters.
5915 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
5916 they should be resolved before they get here.
5917 * error.c: Remove unused FILE *status_out.
5918 * f95-lang.c (g95_init): Remove bogus cast.
5919 * Many files: Make things 'const' where required.
5920 * g95.h: Fix prototypes for all modified functions above.
5921 (g95_options): Remove 'object' member.
5923 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
5925 * Make-file.in: Cleanup bogus targets. Add more comment.
5926 * lang-options.h: New option '-w'.
5927 * g95.h: add no_options field to struct g95_options.
5928 * options.c (g95_init_options): Default no_warnings to off.
5929 (g95_parse_arg): Recognise the '-w' switch and its alias,
5931 * error.c (g95_warning, g95_warning_now): Don't emit warning if
5932 no_warning option is set.
5933 * iresolve.c (g95_resolve_shape): Fix warning.
5935 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
5937 * primary.c (g95_next_string_char): Rename next_string_char, and
5938 make static. Adjust callers accordingly.
5939 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
5940 callers accordingly.
5941 * g95.h: Split out all g95_match* functions to...
5942 * match.h: ...here. New file.
5943 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
5944 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
5946 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
5948 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
5949 g95_merge_new_implicit): New functions.
5950 (g95_match_implicit_none, g95_match_implicit): Move from here...
5951 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
5952 Modify to use the new functions in symbol.c.
5953 * g95.h: Add and move prototypes.
5955 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5957 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
5958 node compare function.
5959 (g95_insert_bbt): Likewise.
5960 (g95_insert_bbt_with_overlap): Likewise.
5961 (g95_delete_bbt): Likewise.
5962 (delete_treap): Likewise. Also fix a potential bug when calling it.
5963 * module.c (compare_pointers): Change proto to compare_fn.
5964 (compare_integers): Likewise.
5965 (compare_true_names): Likewise.
5966 (find_true_name): Adjust call to compare_true_names to match proto.
5967 (require_atom, write_atom, mio_name): Fix 'const' warnings.
5968 (init_pi_tree): Make compare a compare_fn instead of (int *).
5969 * resolve.c (compare_cases): Change proto to compare_fn.
5970 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
5971 it static, and rename to compare_symtree.
5972 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
5974 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
5975 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
5977 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5978 * Make-lang.in: Fix spaces/tabs issues from previous patch.
5979 * patch.options: Blow away Paul's checkin mistake :-)
5980 * io.c (terminate_io): Fix memory leak (Arnaud).
5982 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5984 * Make-lang.in: Teach about building DVI, info manual.
5985 * g95.texi: New file.
5987 2003-01-02 Paul Brook <paul@nowt.org>
5989 * trans-array.c (g95_reverse_ss): Make static and don't use.
5990 (g95_conv_ss_descriptor): Don't use g95_loopinfo
5991 (g95_conv_array_parameters): Modify for pointer assignments.
5992 (g95_walk_subexpr): New function.
5993 (g95_walk_expr*): Use it.
5994 * trans-array.h (g95_reverse_ss): Remove prototype.
5995 * trans-expr.c (g95_trans_pointer_assign): Implement.
5996 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
5997 * trans-intrinsic.c: Sync with scalarizer changes.
5998 * trans-io.c: Ditto.
6000 2002-12-29 Paul Brook <paul@nowt.org>
6002 * trans-array.c: Document calling convention for arrays.
6004 2002-12-19 Paul Brook <paul@nowt.org>
6006 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
6007 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
6008 optional parameters for some intrinsics.
6009 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
6010 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
6011 optional parameters.
6012 * trans.h (g95_se): Add ignore_optional flag.
6014 2002-12-15 Paul Brook <paul@nowt.org>
6016 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
6017 * trans-decl.c (g95_generate_function_code): Use TDI_original.
6019 2002-12-14 Paul Brook <paul@nowt.org>
6021 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
6023 2002-12-12 Paul Brook <paul@nowt.org>
6025 * trans-array.c (g95_trans_array_constructor_subarray): Fully
6026 initialize the scalarizer.
6027 (various): Update to new format of g95_expr->value.constructor.
6029 2002-12-08 Paul Brook <paul@nowt.org>
6031 * trans-array.c (g95_put_offset_into_var): New function.
6032 (g95_trans_array_constructor_subarray): New function.
6033 (g95_trans_array_constructor_value): Use it.
6034 (g95_array_cons_size): Don't abort() on array components.
6036 2002-12-08 Paul Brook <paul@nowt.org>
6038 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
6039 * support.c: Update #includes.
6040 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
6041 * trans-array.c: Update #includes.
6043 * trans-const.c: Ditto.
6044 * trans-io.c: Ditto.
6045 * trans-types.c: Ditto.
6046 (g95_init_types): Set size_type_node.
6047 * trans-decl.c: Update #includes.
6048 (gfor_fndecl_adjust{l,r}): Declare and initialize.
6049 * trans-stmt.c: Update #includes.
6050 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
6051 (g95_trans_select): Fix check for unbounded ranges.
6052 * trans-expr.c: Update #includes.
6053 (g95_conv_string_tmp): New function.
6054 (g95_conv_concat_op): Use it.
6055 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
6056 * Trans-intrisic.c: Update #includes.
6057 (g95_conv_intrinsic_strcmp): New function.
6058 (g95_conv_intrinsic_adjust): Ditto.
6059 (g95_conv_intrinsic_function: Use them.
6061 2002-11-30 Paul Brook <paul@nowt.org>
6063 * trans-array.c (g95_walk_function_expr): Handle non-array return by
6065 * trans-dec.c (g95_build_function_decl): Handle character return
6067 (g95_get_fake_result_decl): Ditto.
6068 (g95_trans_deferred_vars): Ditto.
6069 * trans-expr.c (g95_conv_function_call): Ditto.
6070 (g95_trans_arrayfunc_assign) Limit to array valued functions.
6071 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
6072 (g95_conv_intrinsic_function): Use it.
6073 * trans-types.c (g95_sym_type): Handle functions returning strings.
6074 (g95_return_by_reference): Ditto.
6075 (g95_get_function_type): Ditto.
6077 2002-11-18 Paul Brook <paul@nowt.org>
6079 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
6080 requires a temporary.
6081 (g95_trans_select): Handle computed gotos.
6082 * trans-types.c (g95_build_array_type): Warn about non-functional
6083 assumed shape arrays.
6084 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
6086 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
6087 (g95_conv_intrinsic_int): New function.
6088 (g95_conv_intrinsic_mod): New function.
6089 (g95_conv_intrinsic_ichar): New function.
6090 (g95_conv_intrinsic_function): Use them.
6091 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
6093 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
6095 * trans-types.c (g95_build_array_type): Assumed
6096 sized arrays can have rank > 1.
6097 * trans.c (g95_trans_code): Remove erroneous
6098 warning about CONTINUE.
6099 * trans-expr.c (g95_conv_variable): Remove
6102 2002-11-15 Paul Brook <paul@nowt.org>
6104 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
6106 2002-10-31 Paul Brook <paul@nowt.org>
6108 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
6109 * trans-expr.c (g95_conv_component_ref): Handle character string
6111 (g95_conv_string_parameter): Ditto.
6112 * trans-types.c (g95_get_derived_type): Add length decl to caracter
6115 2002-10-10 Paul Brook <paul@nowt.org>
6117 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
6118 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
6120 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
6121 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
6122 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
6123 * trans-types.c (pvoid_type_node): Declare and initialize.
6124 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
6125 (g95_array_allocate): Fix when base==data.
6126 (g95_conv_array_parameter): Correctly handle reduced rank sections.
6127 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
6129 2002-10-09 Paul Brook <paul@nowt.org>
6131 * (g95_conv_expr_reference): Handle character strings correctly.
6133 2002-10-07 Paul Brook <paul@nowt.org>
6135 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
6137 * trans-array.c (g95_build_array_initializer): Remove.
6138 (g95_conv_array_initializer): New Function.
6139 (g95_trans_auto_arry_allocation): Cleanup.
6140 (g95_trans_init_character_array): Remove.
6141 * g95spec.c: Link in libgforbegin.
6142 * trans.c (g95_generate_code): Rename main function to MAIN__.
6143 (g95_create_var): New function.
6144 (g95_create_var_np): New function.
6145 (g95_evaluate_now): New function.
6146 (g95_start_block): New function.
6147 (g95_finish_block): New function.
6148 (g95_add_expr_to_block): New function.
6149 (g95_add_block_to_block): New function.
6150 * trans-expr.c (g95_conv_componen_ref): New function.
6151 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
6152 (F95_OBJS): Add dependency.o.
6153 * f95-lang.c (g95_is_simple_stmt): Remove.
6154 * f95-tree.c (mark_not_simple): New function.
6155 (unshare_all_trees): New function.
6156 (create_tmp_var, create_tmp_alias_var): Remove.
6157 * support.c (declare_tmp_vars, tree_last_decl): Remove.
6158 * trans*: Convert to new IR using GENERIC trees. Don't bother about
6159 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
6161 2002-10-01 Paul Brook <paul@nowt.org>
6163 * trans-array.c: Add support for descriptorless arrays.
6164 (g95_conv_array_data): New function.
6165 (g95_conv_array_base): New function.
6166 * trans-array.h: Declare these here.
6167 * trans-decl.c(g95_create_mopdule_variable): Perform variable
6168 initialization and creation here.
6169 (g95_create_module_vars): Instead of here.
6170 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
6171 * trans-intrinsic.c: Ditto.
6172 * trans-types.c (g95_is_nodesc_array): New function.
6173 (g95_get_nodesc_array_type): New function.
6174 (g95_sym_type, g95_get_derived_type): Use them.
6175 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
6177 2002-09-28 Paul Brook <paul@nowt.org>
6179 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
6180 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
6183 2002-09-24 Paul Brook <paul@nowt.org>
6185 * f95-lang.c (listify): Remove declaration.
6186 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
6188 * f95-tree.c (get_name): New function.
6189 * trans.c (module_namespace): Remove.
6190 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
6191 * trans-types.c: Ditto.
6193 2002-09-19 Paul Brook <paul@nowt.org>
6195 * trans-array.c (g95_get_array_cons_size): New Function.
6196 (g95_con_ss_startstride): Handle Array constructors.
6197 (g95_conv_loop_setup): Ditto.
6198 (g95_conv_array_parameter): Ditto.
6199 * tras-decl.c (g95_finish_var_decl): Make initializes variables
6202 2002-09-19 Paul Brook <paul@nowt.org>
6204 * trans.c (g95_simple_fold_tmp): Detect variables inside
6206 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
6208 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
6210 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
6212 2002-09-14 Paul Brook <paul@nowt.org>
6214 * trans.c (g95_create_module_variable): Move to trans-decl.c.
6215 * trans-const.c (g95_conv_string_init): New Function.
6216 * trans-const.h: Declare it.
6217 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
6218 variables. Don't bail on intrinsic symbols.
6219 (get_extern_function_decl): Handle specific intrinsic functions.
6220 * trans-types.c (g95_sym_type): Dummy functions don't return
6222 * trans-array.c (g95_build_array_initializer): New Function.
6223 (g95_trans_auto_array_allocation): Build initializer for static decls.
6224 Don't use mpz_addmul, it's GMP4 only.
6226 2002-09-12 Paul Brook <paul@nowt.org>
6228 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
6229 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
6230 assembler names for module procedures.
6232 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
6234 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
6237 2002-09-10 Paul Brook <paul@nowt.org>
6239 * trans-array.c: Change format of G95_SS_TEMP strictures.
6240 (g95_check_fncall_dependancy): New function.
6241 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
6243 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
6245 (g95_build_function_decl): Don't assume result arrays are packed.
6246 (g95_trans-deferred-vars): Handle array result variables.
6247 (g95_generate_fuction_code): Clear saved_function_decls.
6248 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
6250 (g95_trans_arrayfunc_assign): New function.
6251 (g95_trans_assignment): Use it.
6252 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
6253 (g95_se): Add direct_byref.
6254 * trans-types.c: Use sym->result rather than sym where appropriate.
6255 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
6256 Update other functions to use this.
6257 (g95_is_intrinsic_libcall): New function.
6258 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
6259 (g95_walk_intrinsic_function): Ditto.
6261 2002-09-08 Paul Brook <paul@nowt.org>
6263 * trans-types.c: Change rank field to dtype field in array descriptor.
6264 * trans-array.c: Implement filling of dtype array descriptor field.
6265 * trans-intrinsic.c: Fix broken LEN intrinsic.
6267 2002-09-07 Paul Brook <paul@nowt.org>
6269 * trans-intrinsic.c: Remove outdated todo intrinsic list.
6270 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
6271 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
6273 2002-09-06 Paul Brook <paul@nowt.org>
6275 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
6276 (gt-f95-trans-types.h): Add dependancy information.
6277 * config-lang.in (gtfiles): Add trans-types.c
6278 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
6279 back to top-level code.
6280 * trans-array.c, trans-types.c: Change format of array descriptor.
6281 (g95_conv_descriptor_dimension): New function.
6282 * trans-types.h (g95_conv_descriptor_rank): define.
6283 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
6286 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6288 * trans-array.c, trans-types.c: Add rank information to descriptor.
6290 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
6292 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
6294 2002-09-04 Paul Brook <paul@nowt.org>
6296 * f95-lang.c (g95_create_decls): New function.
6297 (g95_init): Move initialization of external decls to above, and call
6298 from g95_be_parse_file.
6299 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
6300 * trans-types.c (g95_init_types): Always name integer and char types.
6301 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
6303 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6305 * Make-lang.in: Add options.c to F95_PARSER_OBJS
6307 2002-09-02 Paul Brook <paul@nowt.org>
6309 * g95_generate_code: Clear the attr for __fortran_main.
6310 * trans-types.c (g95_finish_type): New function.
6311 * g95_init_io_state_type: Use g95_finish_type.
6312 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
6314 2002-09-01 Paul Brook <paul@nowt.org>
6316 * README.backend: Warn about the dangers of extra config.h files.
6317 Remove obsolete libgfor stuff.
6318 * config-lang.in: Add target-libgfor dependancy.
6319 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
6321 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
6323 * g95_conv_mpz_to_tree: Free storage pointed to by q,
6326 2002-08-30 Paul Brook <paul@nowt.org>
6328 * trans-intrinsic.c (g95_conv_intrinsic_function,
6329 g95_walk_intrinsic_function): Added ANY and ALL.
6330 (g95_conv_intrinsic_anyall): New function.
6331 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in