1 2005-04-19 Steven G. Kargl <kargls@comcast.net>
3 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
5 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
6 Steven G. Kargl <kargls@comcast.net>
8 * invoke.texi: Update -Waliasing description
10 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
13 * resolve.c (resolve_variable): If e->symtree is not set, this
14 ought to be a FAILURE, and not a segfault.
16 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
23 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
24 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
25 declarations of old namelist functions.
26 (build_dt): Simplified call to transfer_namelist_element.
27 (nml_get_addr_expr): Generates address expression for start of
28 object data. New function.
29 (nml_full_name): Qualified name for derived type components. New
31 (transfer_namelist_element): Modified for calls to new functions
32 and improved derived type handling.
34 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
36 * scanner.c (gfc_next_char_literal): Reset truncation flag
37 for lines ending in a comment for both fixed and free form.
38 (load_line): Do not set truncated flag if only truncating
41 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
44 * gfortran.h (gfc_linebuf): Add truncated field.
45 * parse.c (next_statement): Handle warning for truncated
47 * scanner.c (load_line): Return if line was truncated.
48 No longer warn for truncated lines. Remove unused parameters.
49 (load_file): Store load_line return value to linebuf.
50 (gfc_error_recovery): Do not advance line at the end.
52 2005-04-14 Steven G. Kargl <kargls@comcast.net>
54 * gfortran.h (gfc_real_info): Add subnormal struct member.
55 * arith.c (gfc_arith_init_1): Set it.
56 (gfc_check_real_range): Use it.
57 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
59 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
61 * simplify.c: Fix a comment typo.
63 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
65 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
67 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
69 * simplify.c (gfc_simplify_nearest): Overhaul.
71 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
73 * interface.c: Fix a comment typo.
75 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
77 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
80 2005-04-09 Steven G. Kargl <kargls@comcast.net>
82 * simplify.c (gfc_simplify_anint): Use mpfr_round()
83 (gfc_simplify_dnint): ditto.
84 (gfc_simplify_nint): ditto.
86 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
89 * io.c (check_format): Allow an optional comma
92 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
94 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
95 comment according to GNU coding style.
96 (gfc_match_if): Remove gfc_ prefix in call to
99 2005-04-08 Diego Novillo <dnovillo@redhat.com>
101 * match.c (gfc_match_arithmetic_if): Declare static.
103 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
106 * match.c (gfc_match_arithmetic_if): New function to match an
107 arithmetic IF statement.
108 (gfc_match_if): Use gfc_match_arithmetic_if to match an
109 arithmetic IF statement embedded in a simple IF statement.
111 2005-04-07 Steven G. Kargl <kargls@comcast.net>
113 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
115 2005-04-06 Steven G. Kargl <kargls@comcast.net>
117 * invoke.texi: Remove documentation of -std=f90
119 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
121 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
122 non-pointer assignment.
124 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
129 * array.c (resolve_character_array_constructor): New function. Set
130 constant character array's character length.
131 (gfc_resolve_array_constructor): Use it.
132 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
134 (gfc_set_constant_character_len): New function. Set constant character
135 expression according the given length.
136 * match.h (gfc_set_constant_character_len): Add prototype.
138 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
140 * intrinsic.texi: BES?? functions are not in the f95 standard.
142 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
144 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
146 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
148 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
149 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
151 2005-04-02 Steven G. Kargl <kargls@comcast.net>
153 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
155 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
157 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
158 trans.h: Fix comment typos.
160 2005-03-29 Steven G. Kargl <kargls@comcast.net>
162 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
163 flag_default_integer, flag_default_real
164 * invoke.texi: Update documentation
165 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
166 fdefault-integer-8, and fdefault-real-8 definitions.
167 * options.c (gfc_init_options): Set option defaults
168 (gfc_handle_option): Handle command line options.
169 * trans-types.c (gfc_init_kinds): Use options.
171 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
173 * f95-lang.c (builtin_function): Process the attrs parameter
174 and apply the "const" attribute to the builtin if found.
176 2005-03-27 Steven G. Kargl <kargls@comcast.net>
178 * intrinsic.texi: Document AIMAG, AINT, ALL
180 2005-03-26 Steven G. Kargl <kargls@comcast.net>
182 * arith.c (check_result): Fix illogical logic.
184 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
186 * trans-common.c (create_common): Build RECORD_NODE for common blocks
187 contain no equivalence objects.
188 (add_equivalences): New argument saw_equiv.
189 (trans_common): New local variable saw_equiv.
190 (finish_equivalences): Add a local variable dummy, Always pass true
191 for the 3rd parameter to create_common.
193 2005-03-25 Steven G. Kargl <kargls@comcast.net>
195 * intrinsic.texi: Fix "make dvi"
197 2005-03-24 Steven G. Kargl <kargls@comcast.net>
199 * intrinsic.texi: New file.
200 * gfortran.texi: Include it; white space change; fix typo.
202 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
204 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
206 2005-03-23 Steven Bosscher <stevenb@suse.de>
208 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
209 * trans-array.c (gfc_trans_allocate_array_storage,
210 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
211 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
212 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
213 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
214 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
215 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
216 gfc_conv_expr_descriptor): Likewise.
217 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
218 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
219 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
220 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
221 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
222 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
223 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
224 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
225 gfc_conv_intrinsic_merge, prepare_arg_info,
226 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
227 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
228 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
229 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
230 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
231 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
233 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
234 * trans.c (gfc_add_modify_expr): Likewise.
236 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
238 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
239 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
240 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
241 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
242 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
243 gfc_check_perror): new functions to check newly implemented
245 * gfortran.h: adding symbols for new intrinsics.
246 * intrinsic.c (add_functions): adding new intrinsics.
247 (add_subroutines): adding new intrinsics.
248 * intrinsic.h: prototype for all checking and resolving
250 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
251 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
252 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
253 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
254 gfc_resolve_kill_sub, gfc_resolve_link_sub,
255 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
256 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
257 gfc_resolve_perror): new functions to resolve intrinsics.
258 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
261 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
263 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
264 in which the variable is declared.
267 * resolve.c (was_declared): Also check for dummy attribute.
269 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
271 * gfortran.h (arith): Remove ARITH_0TO0.
272 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
273 (gfc_arith_power): Remove special casing of zero to integral
276 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
278 * Make-lang.in (fortran-warn): Remove -Wno-error.
279 (expr.o-warn, resolve.o-warn, simplify.o-warn,
280 trans-common.o-warn): Specify -Wno-error.
282 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
284 * trans-array.c (gfc_trans_static_array_pointer,
285 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
286 comment and formatting typos.
288 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
290 * invoke.texi: Fix typos.
292 2005-03-15 Zack Weinberg <zack@codesourcery.com>
294 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
296 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
298 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
299 to zero on label_tree.
301 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
304 * io.c (resolve_tag): Add checking on assigned label.
305 (match_dt_format): Does not set symbol assign attribute.
306 * match.c (gfc_match_goto):Does not set symbol assign attribute.
307 * resolve.c (resolve_code): Add checking on assigned label.
308 * trans-common.c (build_field): Deals with common variable assigned
310 * trans-stmt.c (gfc_conv_label_variable): New function.
311 (gfc_trans_label_assign): Use it.
312 (gfc_trans_goto): Ditto.
313 * trans-io.c (set_string): Ditto.
314 * trans.h (gfc_conv_label_variable): Add prototype.
316 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
319 * symbol.c (check_conflict): A dummy argument can't be a statement
322 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
324 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
325 the argument of the shift to the unsigned type.
327 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
330 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
332 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
335 * resolve.c (gfc_resolve): Check if character lengths are
336 specification expressions.
338 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
341 * trans-array.c (gfc_stack_space_left): Remove unused variable.
342 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
344 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
345 Remove declaration / prototype.
346 * trans-common.c (build_equiv_decl): Give union a name. Check if
347 it can be put on the stack.
348 * trans-decl.c (gfc_stack_space_left): Move function here.
349 (gfc_build_qualified_array): Fix comment typo.
350 * trans.h (gfc_put_var_on_stack): Add prototype.
352 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
354 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
355 * decl.c, trans.c: Don't use C++ style comments.
356 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
357 ifsrc): Give names to enums and use ENUM_BITFIELD.
358 (gfc_access): Remove trailing comma.
360 2005-03-05 Steven G. Kargl <kargls@comcast.net>
363 * primary.c (match_complex_constant): Mangled complex constant may
364 be an implied do-loop. Give implied do-loop matcher a chance.
366 2005-03-05 Steven G. Kargl <kargls@comcast.net>
369 * resolve.c (compare_shapes): New function.
370 (resolve_operator): Use it.
372 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
374 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
375 type for COMPLEX constants.
377 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
380 * trans-expr.c (gfc_conv_function_call): Correctly dereference
381 argument from a pointer function also if it has a result clause.
383 2005-03-04 Steven G. Kargl <kargls@comcast.net>
385 * expr.c (gfc_copy_shape_excluding): Change && to ||.
387 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
389 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
392 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
396 * simplify.c (gfc_simplify_bound): Rename to ...
397 (simplify_bound): ... this and overhaul.
399 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
401 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
402 (gfc_conv_intrinsic_function): update function calls
404 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
407 * trans-types.c (gfc_max_integer_kind): Declare
408 (gfc_init_kinds): Initialize it.
409 * gfortran.h (gfc_max_integer_kind): extern it.
410 * primary.c (match_boz_constant): Use it; remove gfortran extension
411 of kind suffixes on BOZ literal constants
414 2005-02-27 Steven G. Kargl <kargls@comcast.net>
416 * arith.c (gfc_check_real_range): Remove multiple returns
417 (check_result): New function.
418 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
419 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
422 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
424 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
427 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
429 Unrevert previously reverted patch. Adding this fix:
430 * module.c (find_true_name): Deal with NULL module.
432 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
434 Revert yesterday's patch:
435 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
437 * gfortran.h (gfc_component, gfc_actual_arglist, ...
438 ... argument. Copy string instead of pointing to it.
440 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
442 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
443 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
445 * module.c (mio_namespace_ref, load_needed): Likewise.
446 * parse.c (parse_interface, parse_contained): Likewise. Here the
447 correct second argument matters.
448 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
449 parent's implicit types if this is set.
450 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
451 * trans-common.c (build_common_decl): Likewise.
453 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
455 * symbol.c (gfc_set_default_type): Issue error only once, by setting
456 and checking 'untyped' attribute.
458 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
459 fields into new struct 'op' inside the 'value' union.
460 * arith.c (eval_intrinsic): Adapt all users.
461 * dependency.c (gfc_check_dependency): Likewise.
462 * dump-parse-tree.c (gfc_show_expr): Likewise.
463 * expr.c (gfc_get_expr): Don't clear removed fields.
464 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
465 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
466 check_intrinsic_op): Adapt to new field names.
467 * interface.c (gfc_extend_expr): Likewise. Also explicitly
468 nullify 'esym' and 'isym' fields of new function call.
469 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
470 Adapt to renamed structure fields.
471 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
472 * module.c (mio_expr): Likewise.
473 * resolve.c (resolve_operator): Likewise.
474 (gfc_find_forall_index): Likewise. Only look through operands
475 if dealing with EXPR_OP
476 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
477 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
478 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
481 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
482 'name' a 'const char *'.
483 (gfc_symbol): Likewise, also for 'module'.
484 (gfc_symtree): Make 'name' a 'const char *'.
485 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
486 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
488 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
489 initialize 'SYM->module'.
490 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
491 pointer instead of empty string.
492 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
493 * interface.c (gfc_compare_types): Adapt check to account for possible
495 (compare_actual_formal): Check for NULL pointer instead of empty
497 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
498 Add 'const' qualifier.
499 (conv_name): Return a heap allocated string.
500 (find_conv): Add 'const' qualifier to 'target'.
501 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
502 (make_generic): Check for NULL pointer instead of empty string.
503 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
504 (add_conv): No need to strcpy result from 'conv_name'.
505 (sort_actual): Check for NULL pointer instead of empty string.
506 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
508 * module.c (compare_true_names): Compare pointers instead of strings
510 (find_true_name): Initialize string fields with gfc_get_string.
511 (mio_pool_string): New function.
512 (mio_internal_string): Adapt comment.
513 (mio_component_ref, mio_component, mio_actual_arg): Use
514 'mio_pool_string' instead of 'mio_internal_string'.
515 (mio_symbol_interface): Add 'const' qualifier to string arguments.
516 Add level of indirection. Use 'mio_pool_string' instead of
517 'mio_internal_string'.
518 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
519 (write_common, write_symbol): Use 'mio_pool_string' instead of
520 'mio_internal_string'.
521 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
522 instead of empty string.
523 (write_operator, write_generic): Pass correct type variable to
524 'mio_symbol_interface'.
525 (write_symtree): Use 'mio_pool_string' instead of
526 'mio_internal_string'.
527 * primary.c (match_keyword_arg): Adapt check to possible
528 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
529 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
530 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
532 (ambiguous_symbol): Check for NULL pointer instead of empty string.
533 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
535 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
536 pointer instead of empty string.
537 * trans-decl.c (gfc_sym_mangled_identifier,
538 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
539 gfc_get_symbol_decl): Likewise.
540 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
541 argument. Copy string instead of pointing to it.
543 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
545 * intrinsic.h, st.c: Update copyright.
547 2005-02-20 Steven G. Kargl <kargls@comcast.net>
549 * symbol.c: Typos in comments.
551 2005-02-20 Steven G. Kargl <kargls@comcast.net>
553 * expr.c (gfc_type_convert_binary): Typo in comment.
555 2005-02-19 Steven G. Kargl <kargls@comcast.net>
557 * check.c (gfc_check_selected_int_kind): New function.
558 * intrinsic.h: Prototype it.
559 * intrinsic.c (add_function): Use it.
560 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
561 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
563 2005-02-19 Steven G. Kargl <kargls@comcast.net>
565 * check.c (gfc_check_int): improve checking of optional kind
566 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
568 2005-02-19 Steven G. Kargl <kargls@comcast.net>
570 * check.c (gfc_check_achar): New function
571 * intrinsic.h: Prototype it.
572 * intrinsic.c (add_function): Use it.
574 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
576 * trans-stmt.c (generate_loop_for_temp_to_lhs,
577 generate_loop_for_rhs_to_temp): Remove if whose condition is
580 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
582 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
583 (gfc_use_derived): ... this function.
585 2005-02-09 Richard Henderson <rth@redhat.com>
587 * f95-lang.c (gfc_init_builtin_functions): Call
588 build_common_builtin_nodes; do not define any functions handled
591 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
593 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
595 (gfc_is_constant_expr): Check 'ref' to determine if substring
596 reference is constant.
597 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
598 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
600 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
602 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
604 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
605 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
606 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
607 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
608 gfc_add_procedure): Add argument.
609 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
610 gfc_match_null, match_type_spec, match_attr_spec,
611 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
612 Update callers to match.
613 (gfc_match_entry) : Likewise, fix comment typo.
614 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
615 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
616 gfc_match_derived_decl): Update callers.
617 * interface.c (gfc_match_interface): Likewise.
618 * match.c (gfc_match_label, gfc_add_flavor,
619 gfc_match_call, gfc_match_common, gfc_match_block_data,
620 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
622 * parse.c (parse_derived, parse_interface, parse_contained),
623 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
624 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
625 * symbol.c (check_conflict, check_used): Add new 'name' argument,
626 use when printing error message.
627 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
628 gfc_add_generic, gfc_add_in_common, gfc_add_data,
629 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
630 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
631 gfc_add_procedure): Add new 'name' argument. Pass along to
632 check_conflict and check_used.
633 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
634 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
635 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
636 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
637 argument in calls to any of the modified functions.
639 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
641 * gfortran.texi: Don't give last update date.
643 2006-01-30 Richard Henderson <rth@redhat.com>
645 * options.c (gfc_init_options): Zero flag_errno_math.
647 2005-01-29 Paul Brook <paul@codesourcery.com>
650 * check.c (real_or_complex_check): New function.
651 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
652 * intrinsic.c (add_functions): Use new check functions.
653 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
656 2005-01-29 Steven G. Kargl <kargls@comcast.net>
659 * expr.c (gfc_check_assign): Check for conformance of logical operands
661 2004-01-27 Steven Bosscher <stevenb@suse.de>
663 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
664 TREE_USED for all labels.
665 (gfc_trans_entry_master_switch): Use it instead of building a
667 * trans-io.c (add_case): Likewise.
668 * trans-stmt.c (gfc_trans_integer_select): Likewise.
670 2004-01-23 Paul Brook <paul@codesourcery.com>
671 Steven G. Kargl <kargls@comcast.net>
674 * arith.c (gfc_convert_real): Remove sign handling.
675 * primary.c (match_digits): Allow whitespace after initial sign.
676 (match_real_const): Handle signs here. Allow whitespace after
677 initial sign. Remove dead code.
678 (match_const_complex_part): Remove.
679 (match_complex_part): Use match_{real,integer}_const.
680 (match_complex_constant): Cross-promote integer types.
682 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
685 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
686 transpose_c8 for complex types.
688 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
690 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
691 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
692 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
693 Follow spelling conventions.
695 2005-01-22 Bud Davis <bdavis9659@comcast.net>
698 * trans-io.c (gfc_trans_inquire): Added code to support
701 2005-01-22 Steven G. Kargl <kargls@comcast.net>
703 * intrinsic.c (make_alias): Add standard argument.
704 (add_functions): Update make_alias calls.
706 2005-01-22 Paul Brook <paul@codesourcery.com>
708 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
710 2005-01-22 Paul Brook <paul@codesourcery.com>
712 * gfortran.h (gfc_check_access): Add prototype.
713 * match.c (gfc_match_namelist): Remove TODO.
714 * module.c (check_access): Rename ...
715 (gfc_check_access): ... to this. Boolify. Update callers.
716 * resolve.c (resolve_symbol): Check for private objects in public
719 2005-01-22 Paul Brook <paul@codesourcery.com>
721 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
722 does not have an explicit type.
723 (gfc_match_variable): Resolve implicit derived types in all cases.
724 Resolve contained function types from their own namespace, not the
726 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
727 checking. Resolve from the contained namespace, not the parent.
729 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
732 * trans-const.c (gfc_conv_constant_to_tree): Give logical
733 constants the correct type.
736 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
738 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
741 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
743 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
744 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
745 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
746 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
747 trans-io.c, trans-stmt.c, trans.c: Update copyright.
749 2005-01-17 Ira Rosen <irar@il.ibm.com>
751 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
753 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
756 * error.c (error_char): Line-buffer errors / warnings.
758 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
760 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
761 unsigned issue. Use build_int_cst instead of converting
762 integer_zero_node. Remove unnecessary conversion.
764 * trans-types.c (gfc_get_character_type_len): : Use
765 gfc_charlen_type_node as basic type for the range field.
767 * trans-intrinsic.c (build_fixbound_expr,
768 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
769 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
770 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
771 of converting 'integer_zero_node' or 'integer_one_node'
773 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
775 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
776 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
777 'build_int_cst' instead of converting 'integer_zero_node' or
778 'integer_one_node' respectively.
780 * trans-intrinsic.c (gfc_conv_intrinsic_index,
781 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
782 'gfc'-prefix from local variable, remove dead code, use correct
783 type when inserting argument.
785 * trans-intrinsic.c, trans-types.c: Update copyright years.
787 2005-01-16 Steven G. Kargl <kargls@comcast.net>
790 * resolve.c (check_case_overlap): Typo in comment.
791 (validate_case_label_expr): Fix up kinds of case values
792 (resolve_select): Properly handle kind mismatches.
794 2004-01-16 Paul Brook <paul@codesourcery.com>
797 * trans-common.c (translate_common): Remove duplicate function call.
798 (finish_equivalences): Preserve alignment when biasing offsets.
800 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
802 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
803 ASCII-like character encoding.
805 2005-01-14 Steven G. Kargl <kargls@comcast.net>
807 * resolve.c (compare_case): Cleanup.
809 2005-01-14 Steven G. Kargl <kargls@comcast.net>
811 * resolve.c (compare_case): Give arguments correct type.
813 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
815 * iresolve.c, trans-common.c, trans-types.c: Fix comment
818 2005-01-09 Paul Brook <paul@codesourcery.com>
821 * trans-common.c (current_common, current_offset): Remove.
822 (create_common): Add head argument.
823 (align_segment): New function.
824 (apply_segment_offset): New function.
825 (translate_common): Merge code from new_segment. Handle alignment.
826 (new_segment): Remove.
827 (finish_equivalences): Ensure proper alignment.
829 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
831 * trans-const.c: Don't include unused math.h.
833 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
834 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
835 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
837 (prepare_arg_info): Fix formatting, indenting and remove trailing
839 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
842 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
843 gfc_constant_result, gfc_range_check, gfc_arith_power,
844 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
845 gfc_real2complex, gfc_complex2int, gfc_complex2real,
846 gfc_complex2complex): Fix whitespace issues.
847 * check.c (must_be, type_check, numeric_check, int_or_real_check,
848 logical_array_check, array_check, scalar_check, nonoptional_check,
849 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
850 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
851 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
852 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
853 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
854 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
855 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
856 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
857 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
858 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
859 gfc_check_lbound, gfc_check_logical, min_max_args,
860 gfc_check_min_max_integer, gfc_check_min_max_real,
861 gfc_check_min_max_double, gfc_check_matmul,
862 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
863 gfc_check_pack, gfc_check_precision, gfc_check_radix,
864 gfc_check_range, gfc_check_real, gfc_check_repeat,
865 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
866 gfc_check_set_exponent): Fix formatting issues.
867 (gfc_check_size, gfc_check_sign): Alphabetize function order,
868 remove whitespace-only line.
869 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
870 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
871 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
872 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
873 gfc_check_random_number, gfc_check_random_seed,
874 gfc_check_second_sub, gfc_check_system_clock,
875 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
876 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
877 gfc_check_unlink_sub): Fix formatting issues.
879 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
881 * gfortran.h: Remove outdated comment. Don't include stdio.h
884 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
886 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
887 output of 'gfortran --version'.
889 2005-01-03 Steven G. Kargl <kargls@comcast.net>
891 * arith.c: Add system.h; remove string.h
897 * check.c: Remove stdlib.h and stdarg.h
898 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
899 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
900 * f95-lang.c: Add system.h; remove stdio.h
901 * interface.c: Add system.h; remove stdlib.h and string.h
902 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
903 * io.c: Remove string.h
905 * match.c: Remove stdarg.h and string.h
906 * misc.c: Update copyright; add system.h; remove stdlib.h,
907 string.h, and sys/stat.h
908 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
910 * option.c: Remove string.h and stdlib.h
912 * scanner.c: Update copyright; add system.h; remove stdlib.h,
913 stdio.h, string.h, and strings.h
914 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
915 * trans-array.c: Remove stdio.h and gmp.h
916 * trans-const.c: Ditto
917 * trans-expr.c: Ditto
919 * trans-stmt.c: Ditto
921 * trans-intrinsic.c: Remove stdio.h and string.h
923 2004-12-29 Steven G. Kargl <kargls@comcast.net>
925 * gfortran.h (gfc_case): fix typo in comment.
927 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
929 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
930 logical shift. Call fold. Remove 0-bit shift shortcut.
931 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
932 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
933 result if width(arg 1) < 4 bytes. Call fold.
936 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
937 in front of function to match the standard. Correct handling
940 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
942 * trans-expr.c (gfc_conv_cst_int_power): Only check for
943 flag_unsafe_math_optimizations if we have a float type.
945 2004-12-23 Steven G. Kargl <kargls@comcast.net>
947 * gfortran.texi: Fix typo.
949 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
951 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
954 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
957 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
958 (gfc_match_nullify): Make sure that ')' is in front of the end of
961 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
964 2004-12-14 Richard Henderson <rth@redhat.com>
966 * gfortran.h (gfc_expr.function.name): Make const.
967 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
968 (gfc_get_string): Update prototype.
969 * iresolve.c: Include tree.h.
970 (string_node, HASH_SIZE, string_head, hash): Remove.
971 (gfc_get_string): Use vsnprintf, get_identifier.
972 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
973 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
974 (gfc_done_1): Don't call gfc_iresolve_done_1.
975 * module.c (mio_allocated_string): Take and return const char *,
976 instead of modifying char**.
977 (mio_expr): Update to match.
978 * resolve.c (pure_function): Constify name argument.
979 (resolve_function): Constify name.
980 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
982 2004-12-12 Richard Henderson <rth@redhat.com>
984 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
985 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
986 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
987 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
988 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
989 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
990 gfc_resolve_unpack: Use PREFIX.
992 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
995 * match.c (gfc_match_common): Skip whitespace.
997 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1000 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
1001 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
1002 integer kind check; Issue error for -std=f95 when needed.
1003 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
1005 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
1006 Promote arguments to same kind.
1008 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1009 Paul Brook <paul@codesourcery.com>
1012 * resolve.c (gfc_resolve_iterator_expr): New function.
1013 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
1014 start, end and stride to correct type.
1015 (resolve_code): Pass extra argument.
1016 * array.c (resolve_array_list): Pass extra argument.
1017 * gfortran.h (gfc_resolve): Add prototype.
1018 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
1019 Handle real type iterators.
1021 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1024 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
1025 same kind as C's 'int'.
1026 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
1028 2004-12-08 Richard Henderson <rth@redhat.com>
1030 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
1031 to the output expression.
1032 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
1034 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
1037 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1040 * resolve.c (resolve_code): Impose correct restrictions on
1043 * decl.c (gfc_match_end): Use locus of END when eos is an error.
1045 2004-12-02 Steven G. Kargl <kargls@comcast.net>
1046 Paul Brook <paul@codesourcery.com>
1048 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
1049 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
1050 (gfc_check_stat, gfc_check_stat_sub): New functions.
1051 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
1052 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
1053 fstat, and stat to intrinsics symbol tables.
1054 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
1055 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
1056 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
1057 (gfc_resolve_stat, gfc_resolve_flush): New functions.
1058 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
1059 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
1061 2004-12-02 Steven G. Kargl <kargls@comcast.net>
1063 * intrinsic.c: Fix and add comments, fix function declarations
1064 (OPTIONAL,REQUIRED): New symbols
1065 (add_functions,add_subroutines): Use symbols
1066 (gmp.h): Remove unused include
1068 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
1070 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
1073 2004-11-24 Steven Bosscher <stevenb@suse.de>
1075 * options.c (gfc_post_options): Don't clear flag_inline_functions.
1077 2004-11-20 Steven G. Kargl <kargls@comcast.net>
1079 * check.c (gfc_check_getcwd_sub): Fix seg fault.
1081 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
1082 gfc_check_unlink,gfc_check_unlink_sub): New functions
1083 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
1084 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
1085 exit to intrinsics symbol tables.
1086 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
1087 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
1088 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
1089 gfc_resolve_unlink_sub): Add and sort prototypes.
1090 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
1091 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
1092 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
1094 2004-11-16 Paul Brook <paul@codesourcery.com>
1097 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
1098 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
1099 * trans-types.c (gfc_get_dtype): Accept array type rather than element
1101 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
1102 (gfc_get_array_type_bounds): Ditto.
1103 (gfc_get_derived_type): Recurse into derived type pointers.
1104 * trans-types.h (gfc_get_dtype): Add prototype.
1105 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
1107 2004-11-15 Paul Brook <paul@codesourcery.com>
1109 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
1111 2004-11-10 Paul Brook <paul@codesourcery.com>
1114 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
1115 * trans-io.c (transfer_array_component): Ditto.
1117 2004-11-10 Paul Brook <paul@codesourcery.com>
1119 * invoke.texi: Fix typo.
1121 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
1123 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
1124 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
1125 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
1126 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
1127 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
1129 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1132 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
1134 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
1136 * gfortranspec.c: Replace GNU CC with GCC.
1138 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1140 * gfortranspec.c (lang_specific_driver): Change year to 2004.
1142 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1145 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
1148 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1151 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
1152 module procedures as if they were module variables.
1154 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1159 * module.c (write_symbol1): Set module_name for dummy arguments.
1161 2004-11-02 Paul Brook <paul@codesourcery.com>
1163 * intrinsic.c (check_intrinsic_standard): Include error locus.
1165 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
1166 locus to check_intrinsic_standard.
1168 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
1171 * gfortran.h: Change GFC_STD_* flags to more appropriate
1172 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
1173 gfc_option_t): Add field for warning about use of nonstandard
1175 * intrinsic.c (add_sym): Add parameter for standard version, check
1176 this against current standard.
1177 (add_sym_0): Pass standard parameter to add_sym.
1178 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
1179 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
1180 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
1181 (make_generic): Add parameter for standard, check this
1182 against currently selected standard.
1183 (add_functions, add_subroutines): Add parameter to tell which
1184 standard an intrinsic belongs to.
1185 (check_intrinsic_standard): New function.
1186 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
1187 (gfc_intrinsic_sub_interface): Ditto.
1188 * lang.opt: Add Wnonstd-intrinsics option.
1189 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
1191 (set_Wall): Add warning about nonstd intrinsics.
1192 (gfc_handle_option): Change to use new GFC_STD_* flags,
1194 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
1196 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
1198 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
1200 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1202 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
1204 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1206 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
1209 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
1211 * check.c (gfc_check_rand): Allow missing optional argument.
1212 (gfc_check_irand): Ditto.
1213 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
1215 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
1217 PR fortran/13490, PR fortran/17912
1218 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
1219 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
1220 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
1221 warning when compiling with pedantic.
1222 * gcc/fortran/arith.c: Set minimum integer values to reflect
1223 realities of two's complement signed integers. Added
1226 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
1228 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
1229 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
1232 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1234 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
1236 (gfc_generate_function_code): Fix formatting issue.
1238 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1240 * module.c: Fix formatting issues.
1242 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1244 * module.c (mio_interface_rest): Set where member of interface
1247 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
1250 * options.c (gfc_handle_option): Add break after handing the
1253 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
1255 * arith.c: Fix formatting issues.
1257 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1260 * resolve.c (resolve_operator): Use correct operator name in message.
1262 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1264 * primary.c (match_boz_constant): Allow kind parameter suffixes.
1265 Move standard warning further to the front.
1267 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
1269 * trans-stmt.c: Fix a comment typo.
1271 2004-10-07 Paul Brook <paul@codesourcery.com>
1274 * trans-array.c (gfc_trans_deferred_array): Leave use associated
1277 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1280 * simplify.c (twos_complement): New function.
1281 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
1283 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
1285 2004-10-06 Paul Brook <paul@codesourcery.com>
1287 * trans-stmt.c (gfc_trans_simple_do): New function.
1288 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
1289 loop. Update comments.
1291 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1294 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
1298 * intrinsic.c (add_sym_5): Remove.
1299 (add_subroutines): Add resolution function for MVBITS.
1300 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
1302 * iresolve.c (gfc_resolve_mvbits): New function.
1303 (gfc_resolve_random_number): Remove empty line at end of function.
1305 * trans-const.c (gfc_build_cstring_const): New function.
1306 (gfc_init_cst): Use new function.
1307 * trans-const.h (gfc_build_cstring_const): Add prototype.
1308 * trans-io.c (set_string, set_error_locus): Use new function.
1309 * trans-stmt.c (gfc_trans_goto): Use new function.
1312 * parse.c (accept_statement): Don't treat END DO like END IF and
1314 (parse_do_block): Generate possible END DO label inside END DO
1318 * check.c (gfc_check_system_sub): New function.
1319 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
1320 * intrinsic.c (add_functions): Add 'system'.
1321 (add_subroutines): Add 'system'.
1322 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
1323 Move prototypes to other suborutines.
1324 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
1326 (gfc_resolve_system_clock): Fix formatting of prototype.
1327 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
1329 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
1332 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
1334 * scanner.c (preprocessor_line): Accept preprocessor lines without
1335 file names. Check file names for closing quotes. Handle escaped
1336 quotes in file names.
1338 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1339 Paul Brook <paul@codesourcery.com>
1341 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
1342 Use gfc_get_expr_charlen.
1343 * trans-expr.c (gfc_get_expr_charlen): New function.
1344 * trans.h (gfc_get_expr_charlen): Add prototype.
1346 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
1348 * trans-intrinsic.c: Fix a comment typo.
1350 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1352 * simplify.c (range_check): Remove blank line at beginning of function.
1353 (gfc_simplify_dint): Same at end of function.
1354 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
1355 (gfc_simplify_bound): Fix indentation.
1356 (gfc_simplify_log10): Simplify calculation.
1357 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
1359 (gfc_simplify_nearest): Same at end of function.
1360 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
1362 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
1363 gfc_simplify_spacing): Simplify calulations.
1365 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
1367 * trans-intrinsic.c: Fix comments on spacing and rrspacing
1368 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
1370 2004-10-01 Jan Hubicka <jh@suse.cz>
1372 * f95-lang.c (gfc_expand_function): Update call of
1373 tree_rest_of_compilation.
1374 * trans-decl.c (gfc_generate_constructors): Likewise.
1376 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1378 * trans-intrinsic.c: Comment fixes.
1380 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1382 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
1384 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1386 * trans-types.c (gfc_return_by_reference): Remove superfluous
1389 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
1390 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
1393 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
1394 function to determine return type.
1396 2004-09-20 Jan Hubicka <jh@suse.cz>
1398 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
1400 (gfc_generate_function_code): Likewise.
1402 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1405 * simplify.c (gfc_simplify_reshape): Set shape of return value
1408 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1409 Zack Weinberg <zack@codesourcery.com>
1411 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
1412 enumeration constants.
1414 2004-09-17 Paul Brook <paul@codesourcery.com>
1416 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
1417 (gfc_linebuf_header_size): Define.
1418 * scanner.c (load_file): Use it.
1420 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1422 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
1423 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
1424 resolve.c, scanner.c, trans-array.c, trans-array.h,
1425 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
1426 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1427 trans.h: Fix comment typos. Follow spelling conventions.
1429 2004-09-16 Victor Leikehman <lei@il.ibm.com>
1432 * trans-io.c (transfer_array_component): New function.
1433 (transfer_expr): For array fields, call transfer_array_component.
1435 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1437 * gfortran.texi: Fix a typo.
1439 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1441 * parse.c (eof_buf): Rename eof to eof_buf.
1442 (unexpected_eof): Same.
1443 (gfc_parse_file): Same.
1445 2004-09-15 Steven G. Kargl <kargls@comcast.net>
1447 * check.c (gfc_check_getcwd_sub): New function.
1448 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
1449 * intrinsic.c (add_functions): Add function definition;
1451 * intrinsic.c (add_subroutines): Add subroutine definitions.
1452 * intrinsic.h: Add prototypes.
1453 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
1455 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
1457 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1460 * module.c (write_symbol): Don't fill in module name here.
1461 (write_symbol0): Fill in here instead.
1463 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
1465 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
1466 trans-array.c, trans-common.c, trans-expr.c,
1467 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
1468 comment typos. Follow spelling conventions.
1470 2004-09-09 Paul Brook <paul@codesourcery.com>
1472 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
1474 2004-09-08 Paul Brook <paul@codesourcery.com>
1476 * array.c: Don't include assert.h.
1477 * data.c: Don't include assert.h. Replace assert and abort with
1478 gcc_assert and gcc_unreachable.
1479 * dependency.c: Ditto.
1480 * f95-lang.c: Ditto.
1481 * iresolve.c: Ditto.
1483 * simplify.c: Ditto.
1485 * trans-array.c: Ditto.
1486 * trans-common.c: Ditto.
1487 * trans-const.c: Ditto.
1488 * trans-decl.c: Ditto.
1489 * trans-expr.c: Ditto.
1490 * trans-intrinsic.c: Ditto.
1491 * trans-io.c: Ditto.
1492 * trans-stmt.c: Ditto.
1493 * trans-types.c: Ditto.
1496 2004-09-07 Per Bothner <per@bothner.com>
1497 Paul Brook <paul@codesourcery.com>
1499 * error.c (show_locus): Handle mapped locations.
1500 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
1501 * gfortran.h: Include input.h.
1502 (struct gfc_linebuf): Use source_location.
1503 * scanner.c (get_file): Initialize linemap.
1504 (preprocessor_line): Pass extra argument to get_file.
1505 (load_file): Ditto. Setup linemap.
1506 (gfc_new_file): Handle mapped locations.
1507 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
1508 Set decl source locations.
1509 (gfc_trans_common): Set blank common block location.
1510 * trans-decl.c (gfc_set_decl_location): New function.
1511 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
1512 (trans_function_start): Move call to gfc_set_backend_locus..
1513 (build_function_decl): ... to here.
1514 (build_entry_thunks): Set and restore the backend locus.
1515 (gfc_generate_constructors): Remove excess arguments to
1516 init_function_start.
1517 (gfc_generate_block_data): Add comments. Set the decl locus.
1518 * trans-io.c (set_error_locus): Handle mapped locations.
1519 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
1520 (gfc_trans_code): Use SET_EXPR_LOCATION.
1521 (gfc_generate_code): Override the location of the new symbol.
1522 * trans.h (gfc_set_decl_location): Add prototype.
1524 2004-08-31 Paul Brook <paul@codesourcery.com>
1526 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
1528 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1531 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
1534 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1539 * resolve.c (resolve_transfer): New function.
1540 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
1542 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1545 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
1548 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1550 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
1552 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1555 * trans-types.c (gfc_return_by_reference): Remove TODO error,
1556 add comment pointing out possible issue WRT compatibility with g77.
1558 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1560 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
1561 all occurences of 'gfc_strlen_type_node' by
1562 'gfc_charlen_type_node'.
1563 * trans-types.h: Same. Also update comment accordingly.
1565 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1567 * primary.c: Update copyright boilerplate to say GCC.
1568 * f95-lang.c: Change initial comment to say gfortran.
1570 2004-08-31 Paul Brook <paul@codesourcery.com>
1572 * trans-types.h: Add comments.
1573 (intmax_type_node, string_type_node, const_string_type_node): Remove.
1575 2004-08-30 Richard Henderson <rth@redhat.com>
1577 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
1578 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
1579 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
1580 c_long, c_long_long.
1581 (gfc_logical_info): Add c_bool.
1582 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
1583 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
1584 rather than gfc_int[48]_type_node for allocate choice.
1585 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
1586 local copies of some kind type nodes.
1587 (gfc_build_builtin_function_decls): Likewise.
1588 * trans-expr.c (gfc_conv_power_op): Likewise.
1589 * trans-intrinsic.c (gfc_conv_intrinsic_index,
1590 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
1591 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
1592 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
1593 gfc_trans_character_select, gfc_trans_allocate): Likewise.
1594 * trans-io.c (gfc_pint4_type_node): Move into ...
1595 (gfc_build_io_library_fndecls): ... here. Cache local copies of
1596 some kind type nodes.
1597 * trans-types.c (gfc_type_nodes): Remove.
1598 (gfc_character1_type_node, gfc_strlen_type_node): New.
1599 (gfc_integer_types, gfc_logical_types): New.
1600 (gfc_real_types, gfc_complex_types): New.
1601 (gfc_init_kinds): Fill in real mode_precision.
1602 (gfc_build_int_type, gfc_build_real_type): New.
1603 (gfc_build_complex_type, gfc_build_logical_type): New.
1604 (c_size_t_size): New.
1605 (gfc_init_types): Loop over kinds.
1606 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
1607 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
1608 (gfc_get_character_type_len): Likewise.
1609 (gfc_type_for_size): Loop over kinds; use a reduced set of
1610 unsigned type nodes.
1611 (gfc_type_for_mode): Loop over kinds.
1612 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
1613 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
1614 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
1615 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
1616 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
1617 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
1618 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
1619 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
1620 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
1621 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
1622 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
1623 gfc_complex8_type_node, gfc_complex16_type_node,
1624 gfc_logical1_type_node, gfc_logical2_type_node,
1625 gfc_logical4_type_node, gfc_logical8_type_node,
1626 gfc_logical16_type_node, gfc_strlen_kind): Remove.
1627 (gfc_character1_type_node): Turn in to a variable.
1628 (gfc_strlen_type_node): Likewise.
1630 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1632 * gfortran.h (gfc_namespace): Add new field is_block_data.
1633 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
1634 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
1635 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
1636 * trans.h (gfc_generate_block_data): Add prototype.
1637 * trans-decl.c (gfc_generate_block_data): New function.
1639 2004-08-29 Richard Henderson <rth@redhat.com>
1641 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
1642 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
1643 than two HOST_WIDE_INT.
1645 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1648 * decl.c (free_variable, free_value, gfc_free_data, var_list,
1649 var_element, top_var_list, match_data_constant, top_val_list,
1650 gfc_match_data): Move here from match.c.
1651 (match_old_style_init): New function.
1652 (variable_decl): Match old-style initialization.
1653 * expr.c (gfc_get_variable_expr): New function.
1654 * gfortran.h (gfc_get_variable_expr): Add prototype.
1655 * gfortran.texi: Start documentation for supported extensions.
1656 * match.c: Remove the functions moved to decl.c.
1657 * match.h (gfc_match_data): Move prototype to under decl.c.
1658 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
1661 2004-08-29 Steven G. Kargl <kargls@comcast.net>
1662 Paul Brook <paul@codesourcery.com>
1664 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
1665 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
1666 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1667 (build_builtin_fntypes): New function.
1668 (gfc_init_builtin_functions): Use it.
1669 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
1670 and GFC_ISYM_ERF{,C}.
1671 (gfc_c_int_kind): Declare.
1672 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
1673 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
1674 gfc_resolve_g77_math1): Add prototypes.
1675 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
1676 * mathbuiltins.def: Add comment. Change third argument. Use
1677 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
1678 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
1679 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1680 * trans-types.c (gfc_c_int_kind): Declare.
1681 (gfc_init_kinds): Set it.
1683 2004-08-29 Steven G. Kargl <kargls@comcast.net>
1684 Paul Brook <paul@codesourcery.com>
1686 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
1687 (gfc_check_f, gfc_simplify_f): Add f0.
1688 * intrinsic.c (do_check): Call f0. Flatten.
1689 (add_sym_0): Fix prototype. Set f0.
1690 (add_functions): Add getgid, getgid and getuid.
1691 (resolve_intrinsic): Remove obsolete comment.
1692 (do_simplify): Call f0.
1693 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
1694 gfc_resolve_getuid): Add prototypes.
1695 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
1696 gfc_resolve_getuid): New functions.
1697 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
1700 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1702 * error.c (gfc_error_init_1): Remove blank line in front of
1703 function body. Add missing blank.
1704 (gfc_buffer_error, error_char, error_string): Remove blank line in
1705 front of function body.
1706 (show_locus): Add comma in comment.
1707 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
1708 gfc_push_error, gfc_pop_error): Remove blank line in front of
1710 (gfc_get_errors): Typo fix in comment in front of function. Remove
1711 blank line in front of function body.
1713 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1715 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
1716 variable declaration of same name.
1717 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
1718 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
1719 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
1720 Replace all calls to gfc_default_*_kind with variable accesses.
1721 * trans-types.c: Same as above.
1722 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
1723 static qualifier. Replace all occurences.
1724 (gfc_default_*_kind): Remove functions.
1726 2004-08-26 Richard Henderson <rth@redhat.com>
1728 * arith.c: Include system.h, not real system headers.
1729 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
1730 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
1731 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
1732 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
1733 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
1734 gfc_index_integer_kind, gfc_default_integer_kind,
1735 gfc_default_real_kind,gfc_default_double_kind,
1736 gfc_default_character_kind, gfc_default_logical_kind,
1737 gfc_default_complex_kind, validate_integer, validate_real,
1738 validate_logical, validate_character,
1739 gfc_validate_kind): Move to trans-types.c.
1740 (gfc_set_model_kind): Use gfc_validate_kind.
1741 (gfc_set_model): Just copy the current precision to default.
1742 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
1743 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
1744 * gfortran.h: Update file commentary.
1745 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
1746 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
1747 gfc_default_double_kind_1, gfc_default_character_kind_1,
1748 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
1749 (gfc_init_kinds): New.
1750 (gfc_init_types): Don't set gfc_index_integer_kind here.
1751 * trans-types.h (gfc_init_kinds): Declare.
1752 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
1754 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1756 * check.c (gfc_check_atan2): New function.
1757 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
1758 * intrinsic.h (gfc_check_atan2): Add prototype.
1760 2004-08-25 Richard Henderson <rth@redhat.com>
1762 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
1763 false and we don't validate the kind.
1764 (gfc_check_integer_range, gfc_check_real_range): Update to match.
1765 * check.c (kind_check): Likewise.
1766 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
1767 (match_char_spec, match_logical_spec): Likewise.
1768 * gfortran.h (gfc_validate_kind): Likewise.
1769 * options.c (gfc_handle_option): Likewise.
1770 * primary.c (match_integer_constant, match_real_constant,
1771 match_string_constant, match_logical_constant,
1772 match_const_complex_part): Likewise.
1773 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
1774 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
1775 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
1776 gfc_simplify_maxexponent, gfc_simplify_minexponent,
1777 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
1778 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
1779 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
1780 gfc_simplify_tiny): Likewise.
1781 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
1782 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1783 prepare_arg_info): Likewise.
1785 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1787 * expr.c (gfc_check_assign): Add comment. Add new warning.
1788 * trans-expr.c (gfc_conv_function_call): Correctly dereference
1789 result of pointer valued function when not in pointer assignment.
1791 2004-08-25 Paul Brook <paul@codesourcery.com>
1793 * config-lang.in: Remove dead commented line.
1794 * module.c: Replace g95 with gfortran in comment.
1796 2004-08-25 Paul Brook <paul@codesourcery.com>
1799 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
1801 2004-08-25 Paul Brook <paul@codesourcery.com>
1804 * trans-array.c (gfc_trans_allocate_temp_array): Remove
1805 string_length argument.
1806 (gfc_trans_array_ctor_element): New function.
1807 (gfc_trans_array_constructor_subarray): Use it.
1808 (gfc_trans_array_constructor_value): Ditto. Handle constant
1810 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
1811 (gfc_trans_array_constructor): Use them.
1812 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
1813 (gfc_conv_ss_descriptor): Remember section string length.
1814 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
1815 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
1816 (gfc_conv_expr_descriptor): Ditto.
1817 (gfc_conv_loop_setup): Ditto. Spelling fixes.
1818 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
1819 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
1820 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
1821 (gfc_conv_variable): Set string_length from section.
1822 (gfc_conv_function_call): Remove extra argument.
1823 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
1824 * trans-types.c (gfc_get_character_type_len): New function.
1825 (gfc_get_character_type): Use it.
1826 (gfc_get_dtype): Return zero for internal types.
1827 * trans-types.h (gfc_get_character_type_len): Add prototype.
1828 * trans.h (struct gfc_ss): Move string_length out of union.
1830 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1832 * trans.h (build2_v, build3_v): New macros.
1834 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
1836 * trans-array.c (gfc_conv_descriptor_data,
1837 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
1838 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
1839 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
1840 gfc_trans_allocate_temp_array,
1841 gfc_trans_array_constructor_subarray,
1842 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
1843 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
1844 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
1845 gfc_conv_array_ref, gfc_trans_preloop_setup,
1846 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
1847 gfc_conv_loop_setup, gfc_array_init_size,
1848 gfc_conv_array_initializer, gfc_trans_array_bounds,
1849 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1850 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
1851 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
1852 of build and build_v as appropriate.
1853 * trans-common.c (create_common): Same.
1854 * trans-decl.c (gfc_trans_auto_character_variable,
1855 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
1856 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
1857 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
1858 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
1859 gfc_conv_expr_op, gfc_conv_function_call,
1860 gfc_trans_structure_assign): Same.
1861 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
1862 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
1863 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1864 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
1865 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
1866 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
1867 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
1868 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
1869 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
1870 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
1871 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
1872 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
1873 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
1874 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
1875 gfc_conv_intrinsic_iargc): Same.
1876 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
1877 set_flag, add_case, io_result, transfer_namelist_element,
1878 transfer_expr): Same.
1879 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
1880 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
1881 gfc_trans_integer_select, gfc_trans_logical_select,
1882 gfc_trans_character_select, gfc_trans_forall_loop,
1883 gfc_trans_nested_forall_loop, gfc_do_allocate,
1884 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
1885 compute_inner_temp_size, compute_overall_iter_number,
1886 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
1887 gfc_trans_forall_1, gfc_evaluate_where_mask,
1888 gfc_trans_where_assign, gfc_trans_allocate): Same.
1889 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
1890 * trans.c (gfc_add_modify_expr, gfc_finish_block,
1891 gfc_build_array_ref, gfc_build_function_call,
1892 gfc_trans_runtime_check): Same.
1894 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1896 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
1897 build_int_cst to build_int_cst_wide in accordance to Nathan's
1900 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
1902 * trans-array.c (gfc_trans_array_constructor_value): Adjust
1903 build_int_cst calls.
1904 * trans-const.c (gfc_build_string_const, gfc_init_constants,
1905 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
1906 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
1907 gfc_trans_entry_master_switch): Likewise.
1908 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
1909 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
1910 * trans-io.c (add_case, set_error_locus,
1911 transfer_namelist_element, transfer_expr): Likewise.
1912 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
1913 gfc_trans_stop, gfc_trans_character_select): Likewise.
1914 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
1915 * trans.c (gfc_trans_runtime_check): Likewise.
1917 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1919 * trans-decl.c, trans-types.c: Add and remove blank lines as
1922 2004-08-24 Richard Henderson <rth@redhat.com>
1924 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
1926 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1928 * resolve.c (merge_argument_lists): Revert unintentionally
1931 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1933 * trans-decl.c (build_function_decl): Fix spelling in comment.
1934 (build_entry_thunks): Remove code with no function.
1935 (gfc_build_intrinsic_function_decls): Remove empty line.
1937 * resolve.c (resolve_entries): Fix a bunch of comment typos.
1939 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1941 * f95-lang.c (gfc_init_decl_processing): Adjust
1942 build_common_tree_nodes call.
1944 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1946 * trans-types.c: Spelling and formatting fixes.
1948 2004-08-23 Richard Henderson <rth@redhat.com>
1950 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
1951 of going through an intermediate string. Fix 32/64 int/long bug.
1953 2004-08-23 Eric Christopher <echristo@redhat.com>
1955 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
1956 usage. Use build_vector_type_for_mode for vector types.
1958 2004-08-22 Richard Henderson <rth@redhat.com>
1961 * data.c (find_con_by_offset): Search ordered list; handle
1962 elements with repeat counts.
1963 (gfc_assign_data_value_range): New.
1964 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
1965 (gfc_assign_data_value_range): Declare.
1966 * match.c (top_val_list): Extract repeat count into a temporary.
1967 * resolve.c (values): Make left unsigned.
1968 (next_data_value): Don't decrement left.
1969 (check_data_variable): Use gfc_assign_data_value_range.
1971 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1973 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
1975 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1977 * check.c (gfc_check_reduction): Rename to ...
1978 (check_reduction): ... this. Make static. Don't check type of
1980 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
1981 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
1982 SUM to use new check functions.
1983 (check_specific): Change logic to call new functions.
1984 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
1986 (gfc_check_reduction): Remove prototype.
1988 2004-08-20 Paul Brook <paul@codesourcery.com>
1989 Canqun Yang <canqun@nudt.edu.cn>
1992 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
1993 for automatic arrays.
1994 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
1996 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2000 * match.c (match_simple_forall, match_simple_where): Forward-declare.
2001 (gfc_match_if): Order statement list alphabetically, add WHERE and
2002 FORALL, remove double PAUSE.
2003 (gfc_match_simple_where, match_forall_header,
2004 gfc_match_simple_forall): New functions.
2005 (gfc_match_forall): Use match_forall_header.
2007 2004-08-19 Paul Brook <paul@codesourcery.com>
2010 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
2011 * symbol.c (gfc_clear_attr): Use memset.
2013 2004-08-19 Paul Brook <paul@codesourcery.com>
2017 * data.c (assign_substring_data_value): Remove.
2018 (create_character_intializer): New function.
2019 (gfc_assign_data_value): Track the typespec for the current
2020 subobject. Use create_character_intializer.
2022 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
2025 * check.c (gfc_check_reduction): New function.
2026 (gfc_check_minval_maxval): Removed.
2027 (gfc_check_product): Removed.
2028 (gfc_check_sum): Removed.
2029 * intrinsic.h: Add/remove declarations for these.
2030 * gfortran.h: Add field f3red to union gfc_check_f.
2031 * intrinsic.c (add_sym_3red): New function.
2032 (add_functions): Register maxval, minval, product, and sum intrinsics
2033 through add_sym_3red.
2034 (check_specific): Handle f3red union field.
2035 * iresolve.c: Whitespace change.
2037 2004-08-18 Paul Brook <paul@codesourcery.com>
2039 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
2041 2004-08-18 Victor Leikehman <lei@il.ibm.com>
2044 * trans-io.c (transfer_namelist_element): New. Recursively handle
2045 derived-type variables. Pass string lengths.
2046 (build_dt): Code moved to build_namelist, with some
2047 changes and additions.
2048 (gfc_build_io_library_fndecls): Declare the fifth
2049 argument in st_set_nml_var_char -- string_length.
2051 2004-08-17 Paul Brook <paul@codesourcery.com>
2052 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2055 * decl.c (get_proc_name): Update mystery comment.
2056 (gfc_match_entry): Check for errors earlier. Add entry point to list.
2057 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
2058 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
2059 (struct gfc_entry_list): Define.
2060 (gfc_get_entry_list): Define.
2061 (struct gfc_namespace): Add refs and entries.
2062 (enum gfc_exec_op): Add EXEC_ENTRY.
2063 (struct gfc_code): Add ext.entry.
2064 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
2065 (mio_symbol_attribute): Don't save/reture addr->entry.
2066 (mio_namespace_ref): Refcount namespaces.
2067 * parse.c (accept_statement): Handle ST_ENTRY.
2068 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
2069 (parse_contained): Fixup sibling references to entry points
2070 after parsing the procedure body.
2071 * resolve.c (resolve_contained_fntype): New function.
2072 (merge_argument_lists, resolve_entries): New functions.
2073 (resolve_contained_functions): Use them.
2074 (resolve_code): Handle EXEC_ENTRY.
2075 (gfc_resolve): Call resolve_entries.
2076 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
2077 * symbol.c (gfc_get_namespace): Refcount namespaces.
2078 (gfc_free_namespace): Ditto.
2079 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
2080 optional when multiple entry points are present.
2081 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
2082 (gfc_get_extern_function_decl): Add assertion. Fix coment.
2083 (create_function_arglist, trans_function_start, build_entry_thunks):
2085 (gfc_build_function_decl): Rename ...
2086 (build_function_decl): ... to this.
2087 (gfc_create_function_decl): New function.
2088 (gfc_generate_contained_functions): Use it.
2089 (gfc_trans_entry_master_switch): New function.
2090 (gfc_generate_function_code): Use new functions.
2091 * trans-stmt.c (gfc_trans_entry): New function.
2092 * trans-stmt.h (gfc_trans_entry): Add prototype.
2093 * trans-types.c (gfc_get_function_type): Add entry point argument.
2094 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
2095 (gfc_generate_module_code): Call gfc_create_function_decl.
2096 * trans.h (gfc_build_function_decl): Remove.
2097 (gfc_create_function_decl): Add prototype.
2099 2004-08-15 Andrew Pinski <apinski@apple.com>
2102 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
2103 for cabs{,f} and copysign{,f}.
2104 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
2105 (gfor_fndecl_math_cabs): Delete.
2106 (gfor_fndecl_math_sign4): Delete.
2107 (gfor_fndecl_math_sign8): Delete.
2108 (gfc_build_intrinsic_function_decls): Remove the
2109 initializing of cabs{,f} and copysign{,f} functions.
2110 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
2111 instead of the functions definitions.
2112 (gfc_conv_intrinsic_sign): Likewise.
2113 * trans.h (gfor_fndecl_math_cabsf): Delete.
2114 (gfor_fndecl_math_cabs): Delete.
2115 (gfor_fndecl_math_sign4): Delete.
2116 (gfor_fndecl_math_sign8): Delete.
2118 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
2120 * trans-array.c (gfc_trans_array_constructor_value): Use
2122 * trans-const.c (gfc_build_string_const,
2123 gfc_init_constants, gfc_conv_mpz_to_tree,
2124 gfc_conv_constant_to_tree): Likewise.
2125 * trans-decl.c (gfc_get_symbol_decl): Likewise.
2126 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2127 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2128 * trans-io.c (add_case, set_error_locus, build_dt,
2129 transfer_expr): Likewise.
2130 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2131 gfc_trans_stop, gfc_trans_character_select): Likewise.
2132 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2133 * trans.c (gfc_trans_runtime_check): Likewise.
2135 2004-08-14 Paul Brook <paul@codesourcery.com>
2137 * trans-decl.c (gfc_build_function_decl): Remove dead code.
2139 2004-08-14 Paul Brook <paul@codesourcery.com>
2141 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
2143 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2145 * gfortran.h: Add comments.
2146 * parse.c (parse_contained): Fix comment typo.
2147 * resolve.c (was_declared): Ditto.
2150 2004-08-11 Paul Brook <paul@codeourcery.com>
2153 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
2155 2004-08-10 Richard Henderson <rth@redhat.com>
2157 * f95-lang.c (gfc_init_builtin_functions): Remove
2158 __builtin_stack_alloc, add __builtin_alloca.
2159 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
2160 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
2162 2004-08-10 Paul Brook <paul@codesourcery.com>
2164 * trans-io.c (transfer_expr): Handle pointters.
2166 2004-08-10 Paul Brook <paul@codesourcery.com>
2169 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
2170 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
2171 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
2172 Handle GFC_SS_COMPONENT.
2173 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
2174 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
2176 (gfc_conv_array_initializer): Call specific initializer routines.
2177 * trans-expr.c (gfc_trans_structure_assign): New function.
2178 (gfc_trans_subarray_assign): New function.
2179 (gfc_trans_subcomponent_assign): New fucntion
2180 (gfc_conv_structure): Use them.
2181 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
2182 (gfc_ss): Add shape.
2184 2004-08-08 Victor Leikehman <lei@il.ibm.com>
2186 * simplify.c (gfc_simplify_shape): Bugfix.
2187 * expr.c (gfc_copy_shape_excluding): New function.
2188 * gfortran.h (gfc_get_shape): Bugfix.
2189 (gfc_copy_shape_excluding): Added declaration.
2190 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2191 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
2192 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
2193 time resolution of shape.
2195 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
2197 * intrinsic.c (add_subroutines): Add getenv and
2198 get_environment_variable. (add_sym_5s): New function.
2199 * intrinsic.h (gfc_resolve_get_environment_variable): Add
2201 * iresolve.c (gfc_resolve_get_environment_variable): New
2204 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
2206 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
2207 __builtin_pow[f] arguments.
2209 2004-08-06 Steven G. Kargl <kargls@comcast.net>
2211 * arith.c: Add #define for model numbers. Remove global GMP variables.
2212 (natural_logarithm,common_logarithm,exponential,sine,
2213 cosine,arctangent,hypercos,hypersine ): Remove.
2214 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
2215 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
2216 gfc_check_real_range, gfc_constant_result, gfc_range_check,
2217 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
2218 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
2219 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
2220 gfc_convert_complex,gfc_int2real,gfc_int2complex,
2221 gfc_real2int,gfc_real2real,gfc_real2complex,
2222 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
2223 to MPFR, use new functions.
2224 * arith.h: Remove extern global variables.
2225 (natural_logarithm,common_logarithm,exponential, sine, cosine,
2226 arctangent,hypercos,hypersine): Remove prototypes.
2227 (arctangent2): Update prototype from GMP to MPFR.
2228 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
2229 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
2230 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
2231 * gfortran.h (GFC_REAL_BITS): Remove.
2232 (arith): Add ARITH_NAN.
2233 Include mpfr.h. Define GFC_RND_MODE.
2234 Rename GCC_GFORTRAN_H GFC_GFC_H.
2235 (gfc_expr): Convert GMP to MPFR.
2236 * module.c: Add arith.h, correct type in comment.
2237 (mio_gmp_real): Convert GMP to MPFR.
2238 (mio_expr): Use gfc_set_model_kind().
2239 * primary.c: Update copyright date with 2004.
2240 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
2241 * simplify.c: Remove global GMP variables
2242 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
2243 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
2244 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
2245 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
2246 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
2247 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
2248 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
2249 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
2250 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
2251 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
2252 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
2253 gfc_simplify_rrspacing,gfc_simplify_scale,
2254 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
2255 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
2256 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
2257 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
2259 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
2260 gfc_conv_mpf_to_tree. Convert it to use MPFR
2261 (gfc_conv_constant_to_tree): Use it.
2262 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
2263 * trans-intrinsic.c: Add arith.h, remove gmp.h
2264 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
2266 2004-08-06 Victor Leikehman <lei@il.ibm.com>
2267 Paul Brook <paul@codesourcery.com>
2269 * trans-array.c (gfc_trans_allocate_array_storage,
2270 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
2271 gfc_conv_loop_setup): For functions, if the shape of the result
2272 is not known in compile-time, generate an empty array descriptor for
2273 the result and let the callee to allocate the memory.
2274 (gfc_trans_dummy_array_bias): Do nothing for pointers.
2275 (gfc_conv_expr_descriptor): Use function return values directly.
2276 * trans-expr.c (gfc_conv_function_call): Always add byref call
2278 (gfc_trans_pointer_assignment): Add comments.
2279 (gfc_trans_arrayfunc_assign): Don't chain on expression.
2281 2004-08-01 Roger Sayle <roger@eyesopen.com>
2283 * options.c (gfc_init_options): Don't warn about the use GNU
2284 extensions by default.
2285 (gfc_post_options): Warn about GNU extensions with -pedantic.
2286 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
2288 2004-07-30 Richard Henderson <rth@redhat.com>
2290 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
2293 2004-07-25 Richard Henderson <rth@redhat.com>
2295 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
2296 and DECL_IGNORED_P on RESULT_DECL.
2297 (gfc_generate_constructors): Likewise.
2299 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2302 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
2304 (ffixed-line-length-80, ffixed-line-length-132): Remove.
2305 * options.c (gfc_handle_options): Deal with changed options.
2306 * scanner.c (load_line): Change second arg to 'char **',
2307 allocate if pointing to NULL. Keep track of buffer's length.
2308 Adapt buffer size to overlong lines. Pad lines to full length
2310 (load_file): Adapt to new interface of load_line.
2312 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2314 * trans.h (builtin_function): Declare.
2316 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2319 (parts ported from g95)
2320 * parse.h (gfc_state_data): New field do_variable.
2321 (gfc_check_do_variable): Add prototype.
2322 * parse.c (push_state): Initialize field 'do_variable'.
2323 (gfc_check_do_variable): New function.
2324 (parse_do_block): Remember do iterator variable.
2325 (parse_file): Initialize field 'do_variable'.
2326 * match.c (gfc_match_assignment, gfc_match_do,
2327 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
2328 Add previously missing checks.
2329 (gfc_match_return): Reformat error message.
2330 * io.c (match_out_tag): New function.
2331 (match_open_element, match_close_element,
2332 match_file_element, match_dt_element): Call match_out_tag
2333 instead of match_vtag where appropriate.
2334 (match_io_iterator, match_io_element): Add missing check.
2335 (match_io): Reformat error message.
2336 (match_inquire_element): Call match_out_tag where appropriate.
2338 * parse.c (gfc_check_do_variable): Fix error locus.
2340 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2343 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
2344 for every assumed length character dummy argument.
2347 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
2350 * simplify.c (gfc_simplify_bound): Copy the bound expression.
2352 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2355 * trans-array.c gfc_trans_g77_array,
2356 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
2357 for assumed length characters.
2358 (gfc_conv_expr_descriptor): Set se->string_length if dealing
2359 with a character expression.
2360 (gfc_cvonv_array_parameter): Pass string length when passing
2361 character array according to g77 conventions.
2363 2004-07-12 Paul Brook <paul@codesourcery.com>
2365 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
2366 * trans-array.c (gfc_trans_auto_array_allocation): Remove
2367 initialization code.
2368 * trans-common.c (create_common): Use gfc_conv_initializer.
2369 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
2370 * trans-expr.c (gfc_conv_initializer): New function.
2371 (gfc_conv_structure): Use it.
2372 * trans.h (gfc_conv_initializer): Add prototype.
2374 2004-07-11 Paul Brook <paul@codesourcery.com>
2377 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
2379 (parse_contained): Mark contained symbols as referenced.
2381 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2384 * module.c (gfc_dump_module, gfc_use_module): Print locus
2385 when opening of module file fails.
2388 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
2391 * match.c (gfc_match_program): A program name is obligatory.
2392 (gfc_match_return): RETURN in main program is an extension.
2393 (gfc_match_block_data): A space is required before a block data
2397 * primary.c (match_boz_constant): Call gfc_notify_std only if
2398 we actually have a non-standard boz-literal-constant.
2401 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
2402 warning if assigning NULL().
2404 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
2406 * f95-lang.c (set_block): Remove.
2407 (gfc_clear_binding_stack): New.
2408 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
2409 (struct binding_level): Remove block_created_by_back_end.
2410 (clear_binding_level): Likewise.
2411 (poplevel): Don't handle block_created_by_back_end.
2413 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2415 * trans-decl.c (gfc_create_module_variable): Nothing to do if
2416 symbol is in common, because we ...
2417 (gfc_generate_module_vars): Call gfc_trans_common.
2419 2004-07-10 Paul Brook <paul@codesourcery.com>
2421 * trans-array.c (gfc_build_null_descriptor): New function.
2422 (gfc_trans_static_array_pointer): Use it.
2423 * trans-array.h (gfc_build_null_descriptor): Add prototype.
2424 * trans-expr.c (gfc_conv_structure): Handle array pointers.
2426 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2429 * decl.c (gfc_match_save): Use-associated common block
2431 * gfortran.h (gfc_common_head): Add new field 'name'.
2432 Fix typo in comment after #endif.
2433 * match.c (gfc_get_common): Add new argument from_common,
2434 mangle name if flag is set, fill in new field in structure
2436 (match_common): Set new arg in call to gfc_get_common,
2437 use-associated common block doesn't collide.
2438 * match.h (gfc_get_common): Adapt prototype.
2439 * module.c (load_commons): Set new arg in call to
2441 * symbol.c (free_common_tree): New function.
2442 (gfc_free_namespace): Call new function.
2443 * trans-common.c (several functions): Remove argument
2444 'name', use name from gfc_common_head instead.
2446 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2448 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
2449 and RHS match. Return early if the RHS is NULL().
2452 * match.c (match_common): Fix error reporting for used common.
2455 * trans-expr.c (gfc_conv_structure): Handle initialization
2456 of scalar pointer components.
2458 * parse.c (decode_statement): Fix matching of BLOCK DATA.
2460 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
2461 by fix for PR 15481.
2463 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2465 * trans-common.c: Fix whitespace issues, make variable names
2467 (create_common): Additionally, make loop logic more obvious.
2469 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2470 Paul Brook <paul@codesourcery.com>
2473 * trans-common.c (calculate_length): Remove ...
2474 (get_segment_info): Merge into here. Save field type.
2475 (build_field): Use saved type.
2476 (create_common, new_condition, new_segment, finish_equivalences):
2477 Use new get_segment_info.
2478 * trans-types.c: Update comment.
2480 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2483 * moduele.c (mio_symbol): Don't I/O initial values unless
2484 symbol is a parameter.
2486 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2489 * resolve.c (resolve_symbol): Verify that the shape of a
2490 parameter array is not only explicit, but also constant.
2491 * array.c (gfc_is_compile_time_shape): New function.
2492 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
2494 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2500 * module.c (write_symbol, write_symtree): Remove workaround.
2501 * primary.c (match_actual_arglist): Enhance comment.
2502 (gfc_match_rvalue): Handle function call with first argument
2503 a keyword argument correctly.
2504 * resolve.c (resolve_symbol): Change call to
2505 gfc_set_default_type to issue error if no implicit type
2507 * trans-decl.c (gfc_create_module_variable): Remove workaround.
2509 2004-07-08 Paul Brook <paul@codesourcery.com>
2511 * intrinsic.c (add_sym_4s): New function.
2512 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
2514 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
2515 Paul Brook <paul@codesourcery.com>
2519 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
2520 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
2521 * intrinsic.c (add_functions): Identify iargc. Add
2522 command_argument_count.
2523 (add_subroutines): Resolve getarg. Add get_command and
2524 get_command_argument.
2525 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
2526 gfc_resolve_get_command_argument): Add prototypes.
2527 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
2528 gfc_resolve_get_command_argument): New functions.
2529 * trans-decl.c (gfor_fndecl_iargc): New variable.
2530 (gfc_build_intrinsic_function_decls): Set it.
2531 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
2532 (gfc_conv_intrinsic_function): Use it.
2533 * trans.h (gfor_fndecl_iargc): Declare.
2535 2004-07-04 Matthias Klose <doko@debian.org>
2537 * Make-lang.in: Generate and install gfortran man page.
2538 * invoke.texi: Remove extra '@c man end'.
2540 2004-07-04 Richard Henderson <rth@redhat.com>
2542 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
2544 2004-07-04 Paul Brook <paul@codesourcery.com>
2546 * decl.c (gfc_match_implicit_range): Don't use typespec.
2547 (gfc_match_implicit): Handle character selectors.
2548 * gfortran.h (gfc_set_implicit): Remove prototype.
2549 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
2550 * parse.c (accept_statement): Don't call gfc_set_implicit.
2551 * symbol.c (new_ts): Remove.
2552 (gfc_set_implicit_none): Use same loop bounds as other functions.
2553 (gfc_set_implicit): Remove.
2554 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
2555 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
2557 2004-06-30 Richard Henderson <rth@redhat.com>
2559 * match.c (var_element): Remove unused variable.
2561 * trans-decl.c (gfc_generate_function_code): Don't set
2562 x_whole_function_mode_p.
2563 (gfc_generate_constructors): Likewise.
2565 2004-06-30 Richard Henderson <rth@redhat.com>
2567 * trans-decl.c (gfc_generate_function_code): Don't set
2568 immediate_size_expand.
2569 (gfc_generate_constructors): Likewise.
2571 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2574 * decl.c (gfc_match_type_spec): Rename second argument to
2575 'implicit_flag', reverse meaning. Don't match_char_spec if
2576 'implicit_flag' is set. Rename to ...
2577 (match_type_spec): ... this.
2578 (gfc_match_implicit_none, match_implicit_range): Move here
2580 (gfc_match_implicit): Move here from match.c, try to
2581 match_char_len if match_implicit_range doesn't succeed for
2582 CHARACTER implicits. Call renamed fucntion match_type_spec.
2583 (gfc_match_data_decl, match_prefix): Call renamed function
2585 * match.c (gfc_match_implicit_none, match_implicit_range,
2586 gfc_match_implicit): Move to decl.c.
2587 * match.h (gfc_match_implicit_none, gfc_match_implicit):
2588 Move protoypes to section 'decl.c'.
2589 (gfc_match_type_spec): Remove prototype.
2591 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2593 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
2596 2004-06-29 Steven Bosscher <stevenb@suse.de>
2598 Make sure types in assignments are compatible. Mostly mechanical.
2599 * trans-const.h (gfc_index_one_node): New define.
2600 * trans-array.c (gfc_trans_allocate_array_storage,
2601 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
2602 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
2603 gfc_conv_array_ubound, gfc_conv_array_ref,
2604 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
2605 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
2606 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
2607 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
2608 types in assignments, conversions and conditionals for expressions.
2609 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
2610 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
2611 gfc_conv_function_call, gfc_trans_pointer_assignment,
2612 gfc_trans_scalar_assign): Likewise.
2613 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
2614 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
2615 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
2616 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
2617 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
2618 gfc_conv_allocated, gfc_conv_associated,
2619 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
2620 * trans-io.c (set_string): Likewise.
2621 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
2622 gfc_do_allocate, generate_loop_for_temp_to_lhs,
2623 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
2624 compute_overall_iter_number, gfc_trans_assign_need_temp,
2625 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
2626 gfc_evaluate_where_mask, gfc_trans_where_assign,
2627 gfc_trans_where_2): Likewise.
2628 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
2629 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
2631 * trans.c (gfc_add_modify_expr): Add sanity check that types
2632 for the lhs and rhs are the same for scalar assignments.
2634 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2636 * dump-parse-tree.c (show_common): New function.
2637 (gfc_show_namespace): Show commons.
2639 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2640 Andrew Vaught <andyv@firstinter.net>
2644 * decl.c (gfc_match_save): Adapt to new common structures,
2645 don't allow saving USE-associated common.
2646 * dump-parse-tree (gfc_show_attr): (saved_)common are not
2647 symbol attributes any longer.
2648 (gfc_show_symbol): Don't show old-style commons any longer.
2649 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
2651 * gfortran.h (symbol_attribute): Remove common and saved_common
2653 (gfc_symbol): Remove common_head element.
2654 (gfc_common_head): New struct.
2655 (gfc_get_common_head): New macro.
2656 (gfc_symtree): Add field 'common' to union.
2657 (gfc_namespace): Add field 'common_root'; change type of field
2658 'blank_common' to blank_common.
2659 (gfc_add_data): New prototype.
2660 (gfc_traverse_symtree): Expect a symtree as first argument
2661 instead of namespace.
2662 * match.c (gfc_get_common): New function.
2663 (match_common_name): Change to take char * as argument, adapt,
2664 fix bug with empty name.
2665 (gfc_match_common): Adapt to new data structures. Disallow
2666 redeclaration of USE-associated COMMON-block. Fix bug with
2668 (var_element): Adapt to new common structures.
2669 * match.h (gfc_get_common): Declare.
2670 * module.c: Add 2004 to copyright years, add commons to module
2671 file layout description.
2672 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
2673 for removed attributes.
2674 (mio_symbol): Adapt to new way of storing common relations.
2675 (load_commons): New function.
2676 (read_module): Skip common list on first pass, load_commons at
2678 (write_commons): New function.
2679 (write_module): Call write_commons().
2680 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
2681 functions related to removed attributes.
2682 (gfc_add_data): New function.
2683 (gfc_clear_attr): Don't set removed attributes.
2684 (gfc_copy_attr): Don't copy removed attributes.
2685 (traverse_symtree): Remove.
2686 (gfc_traverse_symtree): Don't traverse symbol
2687 tree of the passed namespace, but require a symtree to be passed
2688 instead. Unify with traverse_symtree.
2689 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
2691 (save_symbol): Remove setting of removed attribute.
2692 * trans-common.c (gfc_sym_mangled_common_id): Change to
2693 take 'char *' argument instead of 'gfc_symbol'.
2694 (build_common_decl, new_segment, translate_common): Adapt to new
2695 data structures, add new
2697 (create_common): Adapt to new data structures, add new
2698 argument name. Fix typo in intialization of derived types.
2699 (finish_equivalences): Add second argument in call to
2701 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
2702 (gfc_trans_common): Adapt to new data structures.
2703 * trans-decl.c (gfc_create_module_variables): Remove test for
2706 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2708 * io.c: Add 2004 to copyright years.
2710 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2711 Andrew Vaught <andyv@firstinter.net>
2713 * gfortran.h (gfc_gsymbol): New typedef.
2714 (gfc_gsym_root): New variable.
2715 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
2716 * parse.c (global_used): New function.
2717 (parse_block_data): Check for double empty BLOCK DATA,
2718 use global symbol table.
2719 (parse_module): Use global symbol table.
2720 (add_global_procedure, add_global_program): New functions.
2721 (gfc_parse_file): Use global symbol table.
2722 * symbol.c (gfc_gsym_root): New variable.
2723 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
2726 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2728 * module.c (mio_gmp_real): Correct writing of negative numbers.
2730 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2733 * expr.c (check_intrinsic_op): Allow comparison of characters.
2736 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2737 Andrew Vaught <andyv@firstinter.net>
2739 * decl.c (contained_procedure): New function.
2740 (match_end): Verify correctness of END STATEMENT in
2743 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2744 Andrew Vaught <andyv@firstinter.net>
2747 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
2748 (decode_statement): Enforce required space in free-form.
2750 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2752 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
2753 * trans-array.c (gfc_conv_descriptor_data): Add operand
2755 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
2756 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
2757 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
2758 * trans-common.c (create_common): Likewise.
2759 * trans-expr.c (gfc_conv_component_ref): Likewise.
2760 * trans-io.c (set_parameter_value): Likewise.
2761 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
2762 (transfer_expr): Likewise.
2763 * trans-decl.c (gfc_trans_auto_character_variable):
2764 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
2765 (gfc_gimplify_function): New function.
2766 (gfc_generate_function-code): Properly handle nested functions.
2767 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
2769 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
2772 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
2773 (gfc_resolve_inquire): Resolve the iolength tag. Return
2774 SUCCESS at end of function if no failure has occured.
2775 * resolve.c (resolve_code): Resolve if iolength is encountered.
2776 * trans-io.c: (ioparm_iolength, iocall_iolength,
2777 iocall_iolength_done): New variables.
2778 (last_dt): Add IOLENGTH.
2779 (gfc_build_io_library_fndecls ): Set iolength related variables.
2780 (gfc_trans_iolength): Implement.
2781 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
2783 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
2786 * scanner.c (load_line): Don't truncate preprocessor lines.
2787 Reformat error message.
2788 (preprocessor_line): Issue warning in case of malformed
2791 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2793 * resolve.c (resolve_symbol): Add comment in function body.
2794 (check_data_variable): Change type of mark to ar_type, adapt code
2797 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2799 * array.c (gfc_insert_constructor): Avoid redundant call to
2800 mpz_comp. Add 2004 to copyright years.
2802 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
2804 * trans.h (stmtblock_t): Change has_scope to unsigned int.
2806 2004-06-20 Steven G. Kargl <kargls@comcast.net>
2808 * arith.c (gfc_range_check): correct complex underflow.
2810 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2813 * match.c (match_case_selector): Call gfc_match_init_expr
2814 instead of gfc_match_expr.
2815 * resolve.c (validate_case_label_expr): No need to check for
2816 constant, since it wouldn't have been matched with the fix to
2819 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2822 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
2825 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2828 * trans-deecl.c (generate_local_decl): Do not issue warning for
2829 unused variables if they're use associated.
2831 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2832 Andrew Vaught <andyv@firstinter.net>
2835 * gfortran.h (gfc_check_f): Add new field f3ml.
2836 * check.c (gfc_check_minloc_maxloc): Take argument list instead
2837 of individual arguments, reorder if necessary.
2838 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
2839 * intrinsic.c (add_sym_3ml): New function.
2840 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
2841 (check_specific): Catch special case MINLOC, MAXLOC.
2843 2004-06-14 Paul Brook <paul@codesourcery.com>
2845 * intrinsic.c (add_sym_2s): Use correct function types.
2847 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2849 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
2850 * data.c (gfc_get_section_index): Remove dependency on trans.h.
2852 2004-06-12 Steven G. Kargl <kargls@comcast.net>
2854 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
2855 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
2856 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
2857 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
2858 * trans-intrinsic.c: Use symbols.
2859 * intrinsic.c (add_sym_2s): New function.
2860 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
2861 * intrinsic.h: Function prototypes.
2862 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
2863 gfc_resolve_srand): New functions.
2865 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2868 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
2869 contained procedure.
2871 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2874 * interface.c (compare_parameter, compare_actual_formal): Don't
2875 check types and array shapes for NULL()
2876 * trans-expr.c (conv_function_call): No double indirection for
2879 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
2881 * trans-expr.c (gfc_conv_cst_int_power): Compute
2882 x**(-n) by converting it to (1/x)**n instead of
2885 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2888 * module.c (write_symbol, write_symtree): Don't write symbols
2889 wrongly added to namespace.
2890 * trans-decl.c (gfc_create_module_variable): Don't create a
2891 backend decl for a symbol incorrectly added to namespace.
2893 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2896 * resolve.c (resolve_symbol): Verify that parameter array has an
2897 explicit shape. Fix typos and coding style issues in surrounding
2900 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2903 * gfortran.texi: The documentation doesn't contain infomration on
2904 how to report bugs, and shouldn't, so remove the line which
2907 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2909 * intrinsic.c (sort_actual): Keep track of type of missing
2910 arguments. (Missing from previous commit.)
2912 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2914 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
2915 * interface.c (compare_actual_formal): Keep type of omitted
2917 * trans-expr.c (gfc_conv_function_call): Add string length
2918 argument for omitted string argument.
2920 2004-06-03 Paul Brook <paul@codesourcery.com>
2922 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
2923 lists instead of compound expr chains.
2924 (gfc_trans_code): Annotate statement lists.
2926 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2928 * trans-array.c: Fix spelling in comments.
2930 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2933 * data.c (assign_substring_data_value): New function.
2934 (gfc_assign_data_value): Call the new function if we're dealing
2935 with a substring LHS.
2937 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2940 * gfortran.h (GFC_VERSION): Remove.
2941 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
2944 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2946 * trans-types.c: Fix spelling & layout in comments.
2948 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2951 * trans-const.c (gfc_conv_string_init): Allow variable string
2952 length lower than initialization string length.
2954 2004-05-30 Paul Brook <paul@codesourcery.com>
2957 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
2958 * trans-expr.c (gfc_trans_string_copy): New function.
2959 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
2961 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
2962 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
2963 * trans.h (struct gfc_saved_var): Define.
2964 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
2966 2004-05-30 Steven G. Kargl <kargls@comcast.net>
2968 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
2970 2004-05-29 Steven G. Kargl <kargls@comcast.net>
2972 * simplify.c (gfc_simplify_log): Remove useless line of code.
2974 2004-05-29 Paul Brook <paul@codesourcery.com>
2976 * trans-common.c (find_equivalence): Find multiple rules.
2978 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2980 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
2981 (gfc_current_locus): Declare new global variable.
2982 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
2983 (gfc_current_locus1): Rename ...
2984 (gfc_current_locus): ... to this.
2985 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
2986 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
2987 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
2988 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
2989 and gfc_current_locus(), respectively.
2990 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
2991 match_array_cons_element, gfc_match_array_constructor):
2992 Read/modify gfc_current_locus instead of calling gfc_set_locus()
2993 and gfc_current_locus().
2994 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
2995 match_attr_spec, gfc_match_function_decl, gfc_match_end,
2996 attr_decl1, gfc_match_save): Likewise.
2997 * error.c (error_print, gfc_internal_error): Likewise.
2998 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
2999 * interface.c (gfc_add_interface): Likewise.
3000 * io.c (gfc_match_format, match_dt_format, match_dt_element,
3001 match_io_iterator, match_io): Likewise.
3002 * match.c (gfc_match_space, gfc_match_eos,
3003 gfc_match_small_literal_int, gfc_match_st_label,
3004 gfc_match_strings, gfc_match_name, gfc_match_iterator,
3005 gfc_match_char, gfc_match, gfc_match_assignment,
3006 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
3007 gfc_match_nullify, gfc_match_call, match_implicit_range,
3008 gfc_match_implicit, gfc_match_data, match_case_selector,
3009 gfc_match_case, match_forall_iterator): Likewise.
3010 * matchexp.c (gfc_match_defined_op_name, next_operator,
3011 match_level_1, match_mult_operand, match_ext_mult_operand,
3012 match_add_operand, match_ext_add_operand, match_level_2,
3013 match_level_3, match_level_4, match_and_operand, match_or_operand,
3014 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
3015 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
3016 * parse.c (match_word, decode_statement, next_free, next_fixed,
3017 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
3019 * primary.c (match_digits, match_integer_constant,
3020 match_boz_constant, match_real_constant, match_substring,
3021 next_string_char, match_charkind_name, match_string_constant,
3022 match_logical_constant, match_const_complex_part,
3023 match_complex_constant, match_actual_arg, match_keyword_arg,
3024 gfc_match_actual_arglist, gfc_match_structure_constructor,
3025 gfc_match_rvalue, gfc_match_variable): Likewise.
3026 * st.c (gfc_get_code): Likewise.
3027 * symbol.c (check_conflict, check_used, check_done,
3028 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
3029 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
3030 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
3032 2004-05-26 Roger Sayle <roger@eyesopen.com>
3034 * io.c (format_asterisk): Silence compiler warnings by correcting
3035 the number of elements of a "locus" initializer.
3037 2004-05-25 Roger Sayle <roger@eyesopen.com>
3040 * matchexp.c: Allow unary operators after arithmetic operators
3042 (match_ext_mult_operand, match_ext_add_operand): New functions.
3043 (match_mult_operand): Tweak to call match_ext_mult_operand.
3044 (match_add_operand): Tweak to call match_ext_mult_operand.
3045 (match_level_2): Rearrange to call match_ext_add_operand.
3047 2004-05-25 Paul Brook <paul@codesourcery.com>
3049 * expr.c (check_inquiry): Remove bogus tests.
3051 2004-05-23 Paul Brook <paul@codesourcery.com>
3054 * expr.c (restricted_args): Remove redundant checks/argument.
3055 (external_spec_function): Update to match.
3056 (restricted_intrinsic): Rewrite.
3058 2004-05-23 Paul Brook <paul@codesourcery.com>
3059 Victor Leikehman <lei@haifasphere.co.il>
3061 * gfortran.h (struct gfc_symbol): Add equiv_built.
3062 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
3064 (current_length): Remove.
3065 (add_segments): New function.
3066 (build_equiv_decl): Create initialized common blocks.
3067 (build_common_decl): Always add decl to bindings.
3068 (create_common): Create initializers.
3069 (find_segment_info): Reformat to match coding conventions.
3070 (new_condition): Use add_segments.
3071 (add_condition, find_equivalence, add_equivalences): Move iteration
3072 inside functions. Only process each segment once.
3073 (new_segment, finish_equivalences, translate_common): Simplify.
3075 2004-05-23 Steven G. Kargl <kargls@comcast.net>
3077 * check.c (gfc_check_random_seed): Issue for too many arguments.
3079 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3081 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
3083 2004-05-22 Paul Brook <paul@codesourcery.com>
3085 * dump-parse-tree.c (gfc_show_equiv): New function.
3086 (gfc_show_namespace): Use it.
3088 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
3091 * symbol.c (gfc_add_common): Disable checks to work around other more
3092 fundamental inadequacies.
3094 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3096 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
3098 (gfc_build_function_decl): Likewise.
3100 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3102 * check.c (gfc_check_system_clock): New function.
3103 * intrinsic.c (add_sym_3s): New function.
3104 (add_subroutines): Use it.
3105 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
3107 * iresolve.c (gfc_resolve_system_clock): New function.
3109 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3111 * invoke.texi: Document -Wunderflow and spell check.
3112 * lang.opt: Add Wunderflow.
3113 * gfortran.h (gfc_option_t): Add warn_underflow option.
3114 * options.c (gfc_init_options, set_Wall): Use it.
3115 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
3116 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
3117 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
3118 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
3119 * arith.c (common_logarithm): Fix typo in comment.
3121 2004-05-21 Roger Sayle <roger@eyesopen.com>
3123 * io.c (check_format): As a GNU extension, allow the comma after a
3124 string literal to be optional in a format. Use gfc_notify_std to
3125 issue an error/warning as appropriate.
3127 2004-05-21 Roger Sayle <roger@eyesopen.com>
3129 * io.c (check_format): Use gfc_notify_std to determine whether to
3130 issue an error/warning for omitting the digits from the X format.
3132 2004-05-20 Roger Sayle <roger@eyesopen.com>
3134 * io.c (check_format): Allow the number before the X format to
3135 be optional when not -pedantic.
3137 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
3138 Paul Brook <paul@codesourcery.com>
3140 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
3141 Create decls for __builtin_pow{,f}.
3142 * gfortran.h (PREFIX_LEN): Define.
3143 * trans-decl.c (gfor_fndecl_math_powi): Add.
3144 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3145 (gfc_build_intrinsic_function_decls): Create decls for powi.
3146 * trans-expr.c (powi_table): Add.
3147 (gfc_conv_integer_power): Remove.
3148 (gfc_conv_powi): New function.
3149 (gfc_conv_cst_int_power): New function.
3150 (gfc_conv_power_op): Use new powi routines.
3151 * trans.h (struct gfc_powdecl_list): Add.
3152 (gfor_fndecl_math_powi): Add.
3153 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3155 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3157 * trans.c, trans-decl.c: Fix comment typos.
3159 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3161 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
3163 2004-05-18 Steve Kargl <kargls@comcast.net>
3165 * arith.c (gfc_int2complex): Fix incorrect range checking.
3167 2004-05-18 Paul Brook <paul@codesourcery.com>
3170 * decl.c (add_init_expr_to_sym): Remove incorrect check.
3171 (default_initializer): Move to expr.c.
3172 (variable_decl): Don't assign default initializer to variables.
3173 * expr.c (gfc_default_initializer): Move to here.
3174 * gfortran.h (gfc_default_initializer): Add prototype.
3175 * resolve.c (resolve_symbol): Check for illegal initializers.
3176 Assign default initializer.
3178 2004-05-17 Steve Kargl <kargls@comcast.net>
3180 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
3182 2004-05-17 Steve Kargl <kargls@comcast.net>
3184 * arith.c (gfc_real2complex): Range checking wrong part of complex
3187 2004-05-16 Paul Brook <paul@codesourcery.com>
3189 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
3191 2004-05-16 Paul Brook <paul@codesourcery.com>
3193 * arith.c (gfc_range_check): Fix logic error.
3195 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
3197 * arith.c: Fix comment typos.
3199 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3202 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
3203 not initialized in a disallowed fashion.
3204 * match.c (gfc_match_common): Likewise.
3205 (var_element): Verify that variable is not in the blank COMMON,
3206 if it is in a common.
3208 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
3210 * Make-lang.in (f95.generated-manpages): Remove.
3211 (f95.srcextra): New.
3212 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
3213 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
3216 (f95.install-info): Remove.
3217 (install-info): New.
3219 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
3221 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
3223 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3225 * primary.c (match_boz_constant): Use gfc_notify_std() for
3226 issuing a warning or an error.
3228 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3231 * primary.c (match_structure_constructor): Rename ...
3232 (gfc_match_structure_constructor): ... to this. Make non-static.
3233 (gfc_match_rvalue): Call renamed function.
3234 * match.h (gfc_match_structure_constructor): Declare.
3235 * match.c (gfc_match_data_constant): Handle structure
3238 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3242 * gfortran.h (gfc_linebuf): New typedef.
3244 (gfc_file): Revamped, use new gfc_linebuf.
3245 (locus): Revamped, use new types.
3246 (gfc_current_file): Remove.
3247 (gfc_current_form, gfc_source_file): New global variables.
3248 * match.c (gfc_match_space, gfc_match_strings): Use
3249 gfc_current_form to find source form.
3250 * module.c (gfc_dump_module): Use gfc_source_file when printing
3252 * error.c (show_locus, show_loci) Use new data structures to print
3254 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
3256 (file_head, current_file, gfc_current_form, line_head, line_tail,
3257 gfc_current_locus1, gfc_source_file): New global variables.
3258 (gfc_scanner_init1): Set new global variables.
3259 (gfc_scanner_done1): Free new data structures.
3260 (gfc_current_locus): Return pointer to gfc_current_locus1.
3261 (gfc_set_locus): Set gfc_current_locus1.
3262 (gfc_at_eof): Set new variables.
3263 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
3264 to new locus structure.
3265 (gfc_check_include): Remove.
3266 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
3267 (gfc_skip_comments): Use gfc_current_form, find locus with
3269 (gfc_next_char): Use gfc_current_form.
3270 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
3271 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
3273 (get_file): New function.
3274 (preprocessor_line, include_line): New functions.
3275 (load_file): Move down, rewrite to match new data structures.
3276 (gfc_new_file): Rewrite to match new data structures.
3277 * parse.c (next_statement): Remove code which is now useless. Use
3278 gfc_source_form and gfc_source_file where appropriate.
3279 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
3280 when determining locus of frontend code.
3281 * trans-io.c (set_error_locus): Same.
3282 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
3283 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
3285 (all): Add missing initializers.
3287 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3289 * Make-lang.in (trans-common.o): Remove redundant dependency.
3290 (data.c): Replace object file name ...
3291 (data.o): ... by the correct one.
3293 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3295 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
3296 for ranges when dumping array references.
3298 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
3300 * decl.c (variable_decl): Always apply default initializer.
3302 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3305 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
3306 handle zero correctly.
3308 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3310 * match.c (gfc_match): Eliminate dead code.
3312 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3314 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
3315 Detect bad continuation line in fixed form sources.
3317 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3320 * iresolve.c (gfc_resolve_nearest): Add new function.
3321 * intrinsic.h: ... declare it here.
3322 * intrinsic.c (add_functions): ... add it as resolving function
3325 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3328 * match.c (gfc_match_do): Allow infinite loops with
3329 label-do-stmt. Do not enforce space after comma.
3331 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3334 * parse.c (parse_interface): Allow empty INTERFACE, remove
3337 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3339 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
3340 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
3341 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
3342 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
3343 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
3344 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
3345 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
3346 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
3347 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
3348 trans-types.h, trans.c, trans.h: Update copyright years and
3350 * data.c: Likewise, also removed two whitespace-only lines.
3351 * gfortranspec.c, lang.opt: Update copyright years.
3353 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3356 * trans-decl.c (generate_local_decl): Don't warn for unused
3357 variables which are in common blocks.
3359 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3361 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
3362 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
3363 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
3365 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
3368 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
3370 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
3372 * gfortran.texi: Use @table @emph instead of @itemize @emph.
3373 Remove "set DEVELOPMENT".
3374 (Compiling GFORTRAN): Remove.
3376 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3378 * array.c (match_subscript, match_array_ref): Add comments
3379 explaining argument 'init'.
3380 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
3381 trans-expr.c, trans.c: Fix some typos in comments.
3382 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
3383 * primary.c (match_digits, match_integer_constant): Add comment
3384 explaining signflag.
3386 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3389 * primary.c: Include system.h and flags.h, needed for pedantic.
3390 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
3393 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3396 * match.c (match_data_constant): Handle case where
3397 gfc_find_symbol sets sym to NULL
3399 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3401 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
3402 dependency on mathbuiltins.def
3404 2004-04-24 Victor Leikehman <lei@il.ibm.com>
3406 * trans-io.c (transfer_expr): Implemented recursive printing
3409 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
3411 * gfortranspec.c: Do not include multilib.h.
3413 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3415 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
3416 2004 to copyright years.
3417 * trans-expr.c, trans-decl.c: Comment update, we now generate
3418 GENERIC, not SIMPLE. Add 2004 to copyright years.
3420 2004-04-24 Paul Brook <paul@codesourcery.com>
3422 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
3424 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
3427 * arith.c (gfc_arith_divide): Fix complex divide.
3429 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
3431 * gfortranspec.c: Include the target headers.
3433 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
3437 * arith.c (arctangent2): New function.
3438 * arith.h (arctangent2): Add function prototype.
3439 * simplify.c (gfc_simplify_atan2): Use it.
3440 (gfc_simplify_log): Use it.
3442 2004-04-12 Diego Novillo <dnovillo@redhat.com>
3444 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
3445 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
3447 2004-04-11 Bud Davis <bdavis9659@comcast.net>
3450 * trans-io.c (build_dt): Change REC to value.
3452 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3455 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
3456 the real value when converting mpf to string.
3458 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3461 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
3464 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3467 * simplify.c (simplify_min_max): Convert the type of the result.
3469 2004-04-11 Paul Brook <paul@codesourcery.com>
3471 * gfortran.texi: Use full target triplet.
3473 2004-04-11 Paul Brook <paul@codesourcery.com>
3475 * Make-lang.in (GFORTRAN_TEXI): Set it.
3476 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
3477 (fortran/gfortran.info): Ditto.
3478 * gfortran.texi: Major update.
3479 * invoke.texi: New file.
3481 2004-04-10 Paul Brook <paul@codesourcery.com>
3483 * trans-array.c (gfc_trans_allocate_temp_array,
3484 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
3485 * trans-decl.c (gfc_build_dummy_array_decl,
3486 gfc_get_symbol_decl, gfc_build_function_decl,
3487 gfc_create_module_variable): Ditto.
3488 * trans-expr.c (gfc_conv_variable): Ditto.
3489 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
3490 * trans.h (GFC_DECL_STRING): Remove.
3491 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
3492 GFC_DECL_ASSIGN): Renumber flags.
3494 2004-04-05 Paul Brook <paul@codesourcery.com>
3498 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
3500 * gfortran.h (struct gfc_charlen): Add backend_decl.
3501 * trans-array.c (gfc_trans_allocate_temp_array,
3502 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
3503 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
3504 Remove old, broken string handling.
3505 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
3506 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
3507 gfc_trans_deferred_array): Handle character arrays.
3508 * trans-const.c (gfc_conv_const_charlen): New function.
3509 * trans-const.h (gfc_conv_const_charlen): Add prototype.
3510 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
3512 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
3513 (gfc_create_string_length): New function.
3514 (gfc_get_symbol_decl): Create lengths for character variables.
3515 (gfc_get_fake_result_decl): Ditto.
3516 (gfc_build_function_decl): Only set length for assumed length
3517 character arguments.
3518 (gfc_trans_dummy_character): New function.
3519 (gfc_trans_auto_character_variable): Rewrite.
3520 (gfc_trans_deferred_vars): Handle more types of character variable.
3521 (gfc_create_module_variable): String lengths have moved.
3522 (gfc_generate_function_code): Initialize deferred var chain earlier.
3523 * trans-expr.c (gfc_conv_init_string_length): Rename ...
3524 (gfc_trans_init_string_length): ... to this.
3525 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
3526 gfc_conv_function_call): Update to new format for character variables.
3527 (gfc_conv_string_length): Remove.
3528 (gfc_conv_string_parameter): Update assertion.
3529 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
3530 * trans-io.c (set_string): Use new macro names.
3531 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
3532 * trans-types.c (gfc_get_character_type): Use existing length expr.
3533 (gfc_is_nodesc_array): Make public.
3534 (gfc_get_dtype_cst): Rename ...
3535 (gfc_get_dtype): ... to this. Handle unknown size arrays.
3536 (gfc_get_nodesc_array_type): Use new name.
3537 (gfc_sym_type): New character variable code.
3538 (gfc_get_derived_type): Ditto.
3539 (gfc_get_function_type): Evaluate character variable lengths.
3540 * trans-types.h (gfc_strlen_kind): Define.
3541 (gfc_is_nodesc_array): Add prototype.
3542 * trans.h: Update prototypes.
3543 (struct lang_type): Update comments.
3544 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
3545 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
3547 2004-04-04 Paul Brook <paul@codesourcery.com>
3549 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
3550 * options.c (gfc_init.options, gfc_handle_option): Ditto.
3551 * trans-expr.c (gfc_conv_function_call): Ditto.
3552 * trans-types.c (gfc_is_nodesc_array): Ditto
3553 * lang.opt (fg77-calls): Remove.
3555 2004-04-04 Paul Brook <paul@codesourcery.com>
3557 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
3558 (gfc_conv_descriptor_base): Rename ...
3559 (gfc_conv_descriptor_offset): ... to this.
3560 (gfc_trans_allocate_array_storage): Set offset to zero.
3561 (gfc_conv_array_base): Rename ...
3562 (gfc_conv_array_offset): ... to this.
3563 (gfc_conv_array_index_ref): Add offset parameter.
3564 (gfc_conv_array_ref): Include offset.
3565 (gfc_trans_preloop_setup): Use existing offset.
3566 (gfc_trans_allocate_temp_array, gfc_array_allocate,
3567 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
3568 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
3569 gfc_conf_ss_descriptor): Set offset.
3570 * trans-array.h: Rename prototypes.
3571 * trans-const.h (gfc_index_zero_node): Define.
3572 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
3573 * trans-types.c (gfc_get_array_type_bounds): Ditto.
3574 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
3576 2004-03-25 Diego Novillo <dnovillo@redhat.com>
3578 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
3580 2004-03-24 Bud Davis <bdavis9659@comcast.net>
3583 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
3584 before conversion by gmp library call.
3586 2004-03-24 Bud Davis <bdavis9659@comcast.net>
3589 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
3591 2004-02-24 Richard Henderson <rth@redhat.com>
3593 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
3595 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
3597 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
3598 (fortran/gfortran.info): ... to here.
3601 2004-02-16 Richard Henderson <rth@redhat.com>
3603 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
3604 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
3605 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
3606 (gfc_expand_function): Rename from expand_function_body, make static,
3607 don't do anything except invoke tree_rest_of_compilation.
3608 (gfc_be_parse_file): Invoke cgraph.
3609 (gfc_expand_decl): Remove.
3610 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
3611 __builtin_adjust_trampoline.
3612 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
3613 (gfc_finalize): New.
3614 (gfc_generate_function_code): Use it. Lower nested functions.
3615 * trans-expr.c (gfc_conv_function_call): Add static chain operand
3617 * trans.c (gfc_build_function_call): Likewise.
3618 * trans.h (expand_function_body): Remove.
3620 2004-02-15 Victor Leikehman <lei@il.ibm.com>
3623 * trans-decl.c (gfc_build_function_decl) For functions
3624 returning CHARACTER pass an extra length argument,
3625 following g77 calling conventions.
3626 * trans-types.c (gfc_get_function_type) Ditto.
3627 * trans-expr.c (gfc_conv_function_call) Ditto.
3629 2004-02-14 Paul Brook <paul@codesourcery.com>
3631 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
3633 2004-02-12 Paul Brook <paul@nowt.org>
3637 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
3639 * gfortran.texi: Fix typos.
3641 2004-02-07 Bud Davis <bdavis9659@comcast.net>
3644 * intrinsic.c (add_conversions) Use logical conversion instead
3646 * trans-types.c (gfc_get_logical_type) implemented logical*1
3649 2004-01-17 Paul Brook <paul@codesourcery.com>
3651 * lang-specs.h: Remove %<fixed-form.
3653 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
3655 * lang-specs.h: Enable preprocessing of source files
3656 ending in .F, .fpp, .FPP, .F90 and .F95.
3658 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
3661 * lang-specs.h: Enable compilation of files ending
3662 in .f, .for and .FOR.
3664 2004-01-11 Paul Brook <paul@codesourcery.com>
3666 * trans-stmt.c (gfc_trans_if_1): New function.
3667 (gfc_trans_if): Use it.
3669 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
3671 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
3672 (gfc_option_t): Add max_identifier_length.
3673 * lang.opt: Add fmax-identifier-length.
3674 * match.c (parse_name): Use limit.
3675 * options.c (gfc_init_options): Set max_identifier_length.
3676 (gfc_handle_option): Ditto.
3678 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
3680 * intrinsic.c (add_functions): Add resolve function to dcmplx.
3681 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
3682 * iresolve.c (gfc_resolve_dcmplx): New function.
3684 2004-01-10 Paul Brook <paul@codesourcery.com>
3686 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
3687 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
3688 (gfc_return_by_reference): Correct condition.
3689 (gfc_get_function_type): Ditto.
3691 2004-01-10 Paul Brook <paul@codesourcery.com>
3693 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
3696 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
3698 * iresolve.c: Use correct kind.
3700 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
3703 * trans-decl.c (gfc_create_module_variable): Output array valued
3706 2004-01-10 Paul Brook <paul@codesourcery.com>
3708 * resolve.c (resolve_branch): Get error message right way round.
3710 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
3712 * trans-array (gfc_conv_loop_setup): Adjust comment to track
3714 (gfc_array_allocate): Don't count size of element twice.
3716 2004-01-04 Paul Brook <paul@codesourcery.com>
3718 * lang.opt (i8, r8, std=*): Remove RejectNegative.
3720 2004-01-04 Paul Brook <paul@codesourcery.com>
3722 * error.c (gfc_notify_std): New function.
3723 * gfortran.h (gfc_notify_std): Declare.
3724 (GFC_STD_*): Define.
3725 (gfc_option_t): Add warn_std and allow_std.
3726 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
3727 (gfc_intrinsic_func_interface): Use gfc_notify_std.
3728 * check.c (check_rest): Use gfc_notify_std.
3729 * match.c (gfc_match_pause): Ditto.
3730 (gfc_match_assign): Ditto.
3731 (gfc_match_goto): Ditto.
3732 * resolve.c (resolve_branch): Ditto.
3733 * lang.opt: Add std=<foo> and w.
3734 * options.c (gfc_init_options): Set allow_std and warn_std.
3735 (gfc_handle_option): Handle OPT_std_* and OPT_w.
3737 2004-01-01 Paul Brook <paul@codesourcery.com>
3739 * array.c (gfc_append_constructor): Take constructor, not expression.
3740 * data.c (struct gfc_expr_stack): Remove.
3741 (expr_stack): Remove.
3742 (find_con_by_offset): Rename from find_expr_in_con.
3743 (find_con_by_component): Rename from find_component_in_con.
3744 (gfc_get_expr_stack): Remove.
3745 (gfc_assign_data_value): Rewrite.
3746 (gfc_expr_push): Remove.
3747 (gfc_expr_pop): Remove.
3748 (gfc_advance_section): Rename from
3749 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
3750 (gfc_get_section_index): Handle unbounded sections.
3751 * gfortran.h: Update prototypes.
3752 * resolve.c (check_data_variable): Array section maight not be the
3755 2004-01-01 Paul Brook <paul@codesourcery.com>
3758 * resolve.c (resolve_symbol): Allow assumed length function results.
3760 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
3762 * match.c (gfc_match_pause): Fix spelling.
3764 2004-01-01 Steven Bosscher <stevenb@suse.de>
3767 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
3768 reference from the expression.
3770 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
3772 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
3774 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
3775 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
3776 (symbol_attribute):New variable attribute: assign.
3777 * io.c (resolve_tag):Integer variable is allowed.
3778 (match_dt_format): Add ASSIGN statement. Set assign flag.
3779 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
3780 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
3781 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
3782 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
3783 (next_statement): Add ST_LABEL_ASSIGNMENT.
3784 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
3785 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
3786 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
3787 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
3788 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
3789 assign. Put them into the stuct lang_decl.
3790 * trans-io.c (set_string): Add the assign statement.
3791 * trans-stmt.c (gfc_trans_label_assign): New function.
3792 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
3793 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
3794 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
3795 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
3796 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
3797 (GFC_DECL_ASSIGN(node)): New macro to access flag.
3799 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
3802 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
3805 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
3807 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
3808 that arguments to subroutines/functions can't alias themselves, nor global
3811 2003-12-20 Steven Bosscher <stevenb@suse.de>
3813 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
3814 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
3816 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
3818 * primary.c (match_substring): Fix substring bug for start point
3819 or end point is NULL.
3820 * trans-expr.c (gfc_conv_substring): Ditto
3821 * trans-types.c (gfc_sym_type): Get correct type of scalar
3822 character variables.
3823 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
3826 2003-12-10 Richard Henderson <rth@redhat.com>
3828 * options.c (gfc_post_options): Don't ever use rtl inlining.
3830 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
3832 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
3833 * trans-equivalence.c: Remove.
3834 * trans-decl.c (gfc_get_symbol_decl): Update to match.
3835 (gfc_generate_function_code): Ditto.
3836 * trans-array.c (gfc_conv_array_parameter): Ditto.
3837 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
3838 (F95_ADDITIONAL_OBJS): Add stor-layout.o
3839 * trans.h (gfc_trans_equivalence): Remove.
3840 * gfortran.h (struct gfc_equiv): Add used field.
3841 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
3842 equiv_offset fields.
3844 2003-12-05 Richard Henderson <rth@redhat.com>
3846 * trans.c (gfc_build_addr_expr): New.
3847 (gfc_build_indirect_ref, gfc_build_array_ref): New.
3848 * trans.h: Declare them.
3849 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
3850 trans-stmt.c, trans.c (*): Use them.
3852 * f95-lang.c (gfc_post_options): Remove dead prototype.
3853 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
3854 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
3857 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
3859 * io.c (gfc_match_format): Check for missing format label.
3861 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
3864 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
3865 from interfaces in modules.
3867 2003-11-30 Paul Brook <paul@nowt.org>
3869 * trans-array.c (gfc_trans_g77_array): Make non-static.
3870 (gfc_trans_assumed_size): Remove.
3871 (gfc_trans_dummy_array_bias): Explicitly free temporary.
3872 * trans-array.h (gfc_trans_g77_array): Add prototype.
3873 (gfc_trans_assumed_size): Remove.
3874 * trans-decls.c (gfor_fndecl_push_context): Remove.
3875 (gfor_fndecl_pop_context): Remove.
3876 (gfc_build_function)decls): Don't create them.
3877 (gfc_trans_deferred_vars): Update to match. Remove dead code.
3878 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
3880 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
3882 * trans-array.c (gfc_conv_array_parameter): Simplify
3883 array argument passing for array name actual argument.
3884 * trans-expr.c (gfc_conv_function_call): Ditto
3885 * trans-types.c (gfc_is_nodesc_array):Ditto.
3887 2003-11-30 Paul Brook <paul@nowt.org>
3889 * f95-lang.c (gfc_post_options): Move ...
3890 * options.c (gfc_post_options): .. to here. Handle inlining options.
3891 * gfortran.h (gfc_post_options): Add prototype.
3893 2003-11-28 Richard Henderson <rth@redhat.com>
3895 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
3897 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
3899 * trans.h (has_alternate_specifier): New global variable.
3900 * match.c (gfc_match_call): Handle actual arguments associated with
3901 alternate return indicators.
3902 * trans-expr.c (gfc_conv_function_call): Ditto
3903 * trans-stmt.c (gfc_trans_call): Ditto
3904 (gfc_trans_return): Handle return statement with value.
3905 * trans-decl.c (gfc_generate_function_code): Handle functions with
3907 (gfc_get_fake_result_decl): Ditto
3908 * trans-types.c (gfc_get_function_type): Ditto
3909 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
3910 (resolve_formal_arglist): Check asterisk dummy.
3912 2003-11-27 Paul Brook <paul@nowt.org>
3914 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
3915 allocation interface.
3916 (gfc_conv_ array_parameter): Ditto.
3917 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
3918 * trans-array.c: Update prototype.
3919 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
3920 (gfc_trans_auto_character_variable): Use new memory alloc interface.
3921 * trans-expr.c (gfc_conv_string_tmp): Ditto.
3922 (gfc_conv_function_call): Use gfc_conv_string_tmp.
3923 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
3924 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
3925 * trans.h (gfc_ss_info): Remove unused pdata field.
3926 * trans.c (gfc_create_var_np): Change T to V.
3928 2003-11-26 Richard Henderson <rth@redhat.com>
3930 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
3931 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
3932 FRACTION, NEAREST, SET_EXPONENT.
3933 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
3934 Fix GTY marking. Remove unnecessary const's.
3935 (LIBM_FUNCTION): Rename from I_LIB.
3936 (LIBF_FUNCTION): New.
3937 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
3938 conventions. Assume the expr signature is correct. Mark const.
3939 (gfc_conv_intrinsic_exponent): Use library functions.
3940 (gfc_conv_intrinsic_set_exponent): Remove.
3941 (gfc_conv_intrinsic_scale): Remove.
3942 (gfc_conv_intrinsic_nearest): Remove.
3943 (gfc_conv_intrinsic_fraction): Remove.
3944 (gfc_conv_intrinsic_function): Update.
3945 * trans-decl.c (gfor_fndecl_math_exponent4): New.
3946 (gfor_fndecl_math_exponent8): New.
3947 (gfc_build_intrinsic_function_decls): Set them.
3948 * trans.h: Declare them.
3950 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
3952 * trans-common.c (gfc_layout_global_equiv): Locate the error for
3953 underflow COMMON block.
3954 (gfc_trans_one_common): Fix bug for size of COMMON block containing
3955 EQUIVALENCE object. Also fix typo in an error message.
3957 2003-11-25 Diego Novillo <dnovillo@redhat.com>
3959 * Make-lang.in: Add check-gfortran to lang_checks.
3960 (check-f95): Alias for check-gfortran.
3962 2003-11-25 Jason Merrill <jason@redhat.com>
3964 * Make-lang.in (f95.tags): Create TAGS.sub files in each
3965 directory and TAGS files that include them for each front end.
3967 2003-11-24 Paul Brook <paul@nowt.org>
3970 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
3972 2003-11-24 Paul Brook <paul@nowt.org>
3974 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
3976 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
3978 2003-11-24 Paul Brook <paul@nowt.org>
3981 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
3982 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
3984 2003-11-20 Richard Henderson <rth@redhat.com>
3986 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
3987 (gfc_conv_array_base): Likewise.
3988 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
3989 * trans-expr.c (gfc_conv_string_tmp): Likewise.
3990 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
3991 * trans-stmt.c (gfc_trans_character_select): Likewise.
3993 2003-11-13 Paul Brook <paul@nowt.org>
3995 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
3997 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
3999 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
4000 (resolve_equivalence): New function.
4001 (resolve_equivalence_derived): New function.
4003 2003-11-12 Richard Henderson <rth@redhat.com>
4005 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
4006 annotate_all_with_locus.
4008 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
4010 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
4011 * trans-decl.c (gfc_finish_var_decl): Modified.
4013 2003-11-08 Paul Brook <paul@nowt.org>
4016 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
4019 2003-11-06 Paul Brook <paul@nowt.org>
4021 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
4023 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
4025 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
4027 2003-10-27 Anthony Green <green@redhat.com>
4029 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
4030 (f95.stagefeedback): Ditto.
4032 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
4035 * Make-lang.in (f95.stageprofile): Add.
4036 (f95.stagefeedback): Add.
4038 2003-10-23 Richard Henderson <rth@redhat.com>
4040 * f96-lang.c (gfc_gimplify_expr): Remove.
4041 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
4042 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
4044 2003-10-23 Richard Henderson <rth@redhat.com>
4046 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
4048 2003-10-20 Paul Brook <paul@nowt.org>
4050 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
4051 * trans-stmt.c (gfc_trans_do_while): Ditto.
4053 2003-10-17 Paul Brook <paul@nowt.org>
4055 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
4057 2003-10-17 Paul Brook <paul@nowt.org>
4059 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
4061 2003-10-17 Feng Wang <wf_cs@yahoo.com>
4063 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
4064 (gfc_resolve_minloc): Ditto.
4065 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
4066 Return the value after subtracting the lower bound.
4068 2003-10-16 Richard Henderson <rth@redhat.com>
4070 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
4072 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
4074 * lang.c: Remove -M option for now, it's in the way for C.
4076 2003-10-14 Jason Merrill <jason@redhat.com>
4078 * Make-lang.in (f95.tags): New rule.
4080 2003-10-13 Richard Henderson <rth@redhat.com>
4082 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
4084 2003-10-13 Paul Brook <paul@nowt.org>
4086 * trans-decl.c (generate_local_decl): Don't create junk variables.
4088 2003-10-13 Paul Brook <paul@nowt.org>
4090 * resolve.c (resolve_formal_arglist): Use function result decl in
4091 preference to function decl.
4093 2003-10-12 Richard Henderson <rth@redhat.com>
4095 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
4096 TREE_READONLY. Update all callers.
4098 2003-10-12 Feng Wang <wf_cs@yahoo.com>
4100 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
4101 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
4102 (gfc_is_intrinsic_libcall): Add CSHIFT.
4104 2003-10-12 Richard Henderson <rth@redhat.com>
4106 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
4107 (gfc_trans_array_constructor_value): Likewise.
4108 (gfc_conv_array_initializer): Likewise.
4109 * trans-stmt.c (gfc_trans_character_select): Likewise.
4111 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
4113 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
4115 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4117 * check.c (gfc_check_repeat): Check arguments are scalar.
4118 (gfc_check_trim): New function.
4119 * intrinsic.h (gfc_check_trim): Add prototype.
4120 * intrinsic.c (add_functions): Use it.
4121 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
4123 * trans-decl.c: Ditto.
4124 (gfc_build_intrinsic_fucntion_decls): Set them.
4125 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
4126 (gfc_conv_intrinsic_trim): New function.
4127 (gfc_conv_intrinsic_repeat): New function.
4128 (gfc_conv_intrinsic_function): Use them.
4130 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4132 * trans-types.c (gfc_sym_type): Handle result variables.
4134 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4136 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
4137 gfc_get_character_type.
4139 2003-10-11 Feng Wang <wf_cs@yahoo.com>
4141 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
4143 2003-10-11 Paul Brook <paul@nowt.org>
4145 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
4146 (gfc_resolve_dprod): New function.
4147 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
4148 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
4149 (gfc_resolve_dprod): Declare.
4150 * intrinsic.c (add_functions): Use them.
4151 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
4153 2003-10-06 Richard Henderson <rth@redhat.com>
4155 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
4156 * trans-intrinsic.c (call_builtin_clz): Use it.
4158 2003-10-05 Paul Brook <paul@nowt.org>
4160 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
4161 * trans-decl.c (gfc_generate_function_code): Set
4162 cfun->function_end_locus.
4164 2003-09-24 Jason Merrill <jason@redhat.com>
4166 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
4169 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
4170 Paul Brook <paul@nowt.org>
4172 * Make-lang.in (F95_OBJS): Add fortran/data.o.
4173 * array.c (gfc_inser_constructor): New function.
4174 (gfc_get_constructor): New function.
4175 (gfc_free_constructor): Initialize offset and repeat.
4176 (iterator_stack): Remove.
4177 (expand_info): Add offset, component and repeat fields.
4178 (expand_constructor): Set them.
4179 (expand): Set new fields.
4180 (gfc_copy_constructor): Ditto. Avoid recursion.
4181 * gfortran.h: Add prototypes for new functions.
4182 (gfc_constructor): Add offset, component and repeat.
4183 (iteratio_stack): Move to here.
4184 * resolve.c (check_data_variable): Convert data values into variable
4186 (traverse_data_list): Build implicit loop chain.
4187 (gfc_resolve): Ditto.
4188 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
4189 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
4190 * trans-expr.c (gfc_conv_structure): Handle array initializers.
4191 (gfc_conv_expr): Update to match.
4192 * trans.h (gfc_conv_structure): Declare.
4195 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
4197 * trans.h: Add declarations for gfor_fndecl_si_kind and
4198 gfor_fndecl_sr_kind.
4199 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4200 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
4201 (g95_conv_intrinsic_sr_kind): New function.
4202 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
4205 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
4207 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
4208 instead of _4 and _8 as postfix for libgfortran calls.
4210 2003-09-16 Paul Brook <paul@nowt.org>
4212 * array.c (compare_bounds): New function.
4213 (gfc_compare_array_spec): Use it.
4215 2003-09-14 Paul Brook <paul@nowt.org>
4217 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
4218 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
4220 2003-09-14 Paul Brook <paul@nowt.org>
4222 * check.c (dim_rank_check): Allow assumed bounds if requested.
4223 (gfc_check_lbound): Call it.
4224 (gfc_check_ubound): Ditto.
4225 (gfc_check_size): Change to match.
4226 * simplify.c (gfc_simplify_bound): New function.
4227 (gfc_simplify_lbound): New function.
4228 (gfc_simplify_ubound): New function.
4229 * intrinsic.h: Declare them.
4230 * intrinsic.c (add_functions): Use them.
4232 2003-09-14 Paul Brook <paul@nowt.org>
4234 * io.c (format_lex): Initialize negative_flag.
4235 (check_format): Intialize repeat.
4236 * trans-io.c (gfc_new_nml_name_expr): Declare static.
4237 (gfc_new_var_expr): Ditto.
4239 2003-09-14 Paul Brook <paul@nowt.org>
4241 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
4242 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
4244 2003-09-12 Paul Brook <paul@nowt.org>
4246 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
4248 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
4250 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
4251 for a correct expression.
4253 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
4255 * trans-intrinsic.c (real_compnt_info): New struct.
4256 (prepare_arg_info): New function.
4257 (gfc_conv_intrinsic_set_exponent): New function.
4258 (gfc_conv_intrinsic_scale): New function.
4259 (gfc_conv_intrinsic_nearest): New function.
4260 (gfc_conv_intrinsic_fraction): New function.
4261 (gfc_conv_intrinsic_exponent): New function.
4262 (gfc_conv_intrinsic_spacing): New function.
4263 (gfc_conv_intrinsic_rrspacing): New function.
4264 (gfc_conv_intrinsic_function): Use them.
4266 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
4268 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
4269 build_int_2 changed from (high, low) to (low, high).
4270 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
4271 ioparm_namelist_read_mode, iocall_set_nml_val_int,
4272 iocall_set_nml_val_float, iocall_set_nml_val_char,
4273 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
4274 (gfc_build_io_library_fndecls): Add variable initialization.
4275 (gfc_new_nml_name_expr, get_new_var_expr): New function.
4276 (build_dt): Add namelist support.
4277 * io.c (value): New variable.
4278 (check_format): Support FMT_H now.
4280 2003-09-07 Paul Brook <paul@nowt.org>
4282 * io.c (gfc_resolve_dt): Error if format label is not defined.
4284 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
4286 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
4287 about case_switch's break. The other is about building the condition
4288 statement tree, which judges the argument in the range of the
4289 corresponding integer type.
4290 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
4291 for the large values.
4293 2003-09-05 Paul Brook <paul@nowt.org>
4295 * f95-lang.c (expand_function_body): Gimplify the function.
4297 2003-09-04 Jeff Law <law@redhat.com>
4299 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
4302 2003-09-04 Paul Brook <paul@nowt.org>
4304 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
4305 (gfc_expand_stmt): New function.
4306 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
4307 (expand_function_body): Use tree_rest_of_compilation.
4308 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
4310 2003-09-03 Jeff Law <law@redhat.com>
4312 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
4315 2003-08-30 Paul Brook <paul@nowt.org>
4317 * f95-lang.c (builtin_function): Remove #if 0 code.
4318 (gfc_define_builtin): New function.
4319 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
4320 * mathbuiltins.def: New file.
4321 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
4322 (gfc_intrinsic_map): Use mathbuiltins.def.
4323 (gfc_intrinsic_builtin_t): Remove.
4324 (gfc_build_intrinsic_lib_fndecls): Update.
4325 * trans-types.c (gfc_init_types): Remove redundant initilaization of
4326 signed_size_type_node.
4328 2003-08-29 Paul Brook <paul@nowt.org>
4330 * arith.c (gfc_real_kinds): Use correct minimum exponents.
4332 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
4334 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
4335 (gfc_conv_intrinsic_function): Add MODULO.
4337 2003-08-22 Jason Merrill <jason@redhat.com>
4339 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
4341 2003-08-22 Andreas Jaeger <aj@suse.de>
4343 * Make-lang.in (f95.install-common): Add DESTDIR support.
4344 * (f95.install-info): Likewise.
4345 (f95.uninstall): Likewise.
4347 2003-08-19 Diego Novillo <dnovillo@redhat.com>
4349 * trans-types.c (gfc_init_types): Initialize
4350 signed_size_type_node with size_type_node.
4352 2003-08-18 Paul Brook <paul@nowt.org>
4354 * dependency.c (gfc_dependency): New enum.
4355 (check_another_array_ref): Remove.
4356 (gfc_get_array_from_component): Remove.
4358 (get_range): Remove.
4359 (get_no_of_elements): Use mpz_t, not mpf_t.
4360 (transform_sections): New function.
4361 (gfc_check_range_range): Rename ...
4362 (gfc_check_section_vs_section): ... to this. Use new function.
4363 (gfc_is_inside_range): Rewrite to match.
4364 (gfc_check_element_vs_section): Ditto.
4365 (gfc_check_element_vs_element): Ditto.
4367 (gfc_dep_resolver): Ditto. Remove unused parameter.
4368 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
4369 gfc_check_element_vs_element, gfc_is_inside_range,
4370 gfc_get_array_from_component): Remove prototypes for static functions.
4371 (gfc_dep_resolver): Update prototype.
4372 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
4374 2003-08-15 Paul Brook <paul@nowt.org>
4376 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
4377 return values to parent scope.
4378 (gfc_build_dummy_array_decl): Ditto.
4380 2003-08-14 Paul Brook <paul@nowt.org>
4382 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
4383 size of the type, not the pointer.
4384 * resolve.c (resolve_symbol): Give more accurate error message.
4386 2003-08-10 Paul Brook <paul@nowt.org>
4388 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
4390 2003-08-10 Paul Brook <paul@nowt.org>
4392 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
4395 2003-08-10 Chun Huang <compiler@sohu.com>
4397 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
4398 (resolve_symbol): Ditto.
4399 * trans-expr.c (gfc_conv_statement_function): New function.
4400 (gfc_conv_function_expr): Use it.
4402 2003-08-10 Paul Brook <paul@nowt.org>
4404 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
4405 (walk_function_expr): Set section rank.
4406 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
4408 2003-08-10 Paul Brook <paul@nowt.org>
4410 * intrinsic.c (add_sym): Prefix names with correct string.
4411 (add_sym_0s): New function.
4412 (add_subroutines): Register abort.
4414 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
4416 * gfortran.h: Introduce options to control the mangling.
4417 * lang.opt: Likewise.
4418 * options.c (gfc_init_options): Handle the options.
4419 * trans-common.c (gfc_sym_mangled_common_id): New function.
4420 (gfc_build_common_decl): Call it.
4421 * trans-decl.c (gfc_sym_mangled_function_id): New function.
4422 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
4424 2003-08-09 Paul Brook <paul@nowt.org>
4426 * module.c (mio_symbol): Always ouput a namespace for formal args.
4427 (load_needed): Namespace now belong to their proper symbol.
4428 (gfc_dump_module): Change G95=>GFORTRAN.
4430 2003-08-05 Paul Brook <paul@nowt.org>
4432 * options.c: Force -fg77-calls.
4434 2003-08-02 Paul Brook <paul@nowt.org>
4436 * Makelang.in: Rename G95_* to GFORTRAN_*.
4437 * All sources: Rename G95_* to GFC_*.
4439 2003-08-01 Paul Brook <paul@nowt.org>
4441 * fortran/Make-lang.in: Use GMPLIBS.
4442 * fortran/config-lang.in: Set need_gmp.
4443 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
4445 2003-07-27 Andreas Jaeger <aj@suse.de>
4447 * trans-decl.c (gfc_generate_constructors): Convert prototype to
4449 * trans-const.c (gfc_init_constants): Likewise.
4450 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
4452 * gfortranspec.c: Convert to ISO C90.
4453 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
4455 2003-07-26 Paul Brook <paul@nowt.org>
4457 * lang.opt: Add -fdump-parse-tree.
4458 * options.c (gfc_handle_option): Ditto.
4459 * resolve.c (resolve_forall_iterators): Convert to proper type.
4460 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
4462 2003-07-26 Paul Brook <paul@nowt.org>
4464 * Makefile.in: Add build dependencies on files common with rest of gcc.
4466 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
4468 * trans.h: Declare g95_trans_pointer_assignment.
4469 * trans-expr.c (g95_trans_pointer_assignment): New function.
4470 (g95_trans_pointer_assign): Use it.
4471 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
4472 (g95_trans_pointer_assign_need_temp): New function.
4474 2003-07-26 Paul Brook <paul@nowt.org>
4476 * gfortran.texi: Replace references to g95.
4478 2003-07-26 Paul Brook <paul@nowt.org>
4480 Rename g95_* to gfc_*.
4482 2003-07-25 Paul Brook <paul@nowt.org>
4484 * gfortran.h: Rename from g95.h.
4485 * trans-types.c (boolean_type_node, booelan_true_node,
4486 boolean_false_node): Remove.
4487 * trans-types.h: Ditto.
4489 2003-07-25 Chun Huang <compiler@sohu.com>
4491 * parse.c (accept_statement): Implement BLOCK DATA statement.
4492 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
4495 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
4497 * trans-stmt.c (temporary_list): Define.
4498 (g95_trans_assign_need_temp): New function.
4499 (g95_trans_forall_1): Modified for WHERE.
4500 (g95_trans_where_assign): Modified.
4501 (g95_trans_where_2): Modified.
4502 (g95_evaluate_where_mask): Modified.
4503 (g95_trans_where): Modified.
4504 (g95_get_temp_expr): Removed.
4505 (g95_add_to_where_stmt_list): Removed.
4506 (compute_overall_iter_number): Modified for WHERE.
4507 * trans.h: Remove where_stmt_list.
4509 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4511 * lang.opt: Correct description of options -J and -M.
4513 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
4515 * lang.opt: Move help text to here.
4516 * lang-options.h: Remove.
4518 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4519 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
4520 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
4523 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
4524 Paul Brook <paul@nowt.org>
4526 * check.c (check_rest): Use global pedantic flag.
4527 * io.c (data_desc): Ditto.
4528 * error.c (g95_warning, g95_warning_now): Use global flag.
4529 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
4530 (expand_function_body): Update to new prototypes.
4531 (g95_init): Use new option names.
4532 * g95.h (g95_option_t): Standardize names.
4533 (g95_init_options, g95_handle_option): Update prototypes.
4534 * interface.c: Use new option names.
4541 * simplify.c: Ditto.
4543 * trans-array.c: Ditto.
4544 * trans-expr.c: Ditto.
4545 * trans-types.c: Ditto.
4546 * trans-decl.c: Ditto.
4547 (g95_build_library_function_decl): Remove obsolete VPARAMS.
4549 * options.c (g95_display_help): Remove.
4550 (g95_init_options): Convert to new scheme.
4552 (g95module_option): Ditto, rename from g95_parse_arg.
4553 (g95_handle_module_path_options): New function.
4554 * trans-equivalence.c: Fix error message.
4555 * lang.opt: Corrections.
4557 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
4559 * lang.opt: New file.
4561 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4563 * decl.c (match_attr_spec): Set colon_seen.
4565 2003-07-14 Paul Brook <paul@nowt.org>
4567 * trans-array.c: Update comment.
4568 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
4569 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
4570 minmaxloc,minmaxval): Ditto.
4571 * trans-io.c (g95_trans_transfer): Ditto.
4572 * trans-stmt.c: Remove unneeded prototypes.
4573 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
4574 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
4575 (compute_inner_temp_size): Remove bits of dead code. Add comments.
4576 Don't share loopinfo.
4577 (compute_overall_iter_number): Declare as static.
4578 (allocate_temp_for_forall_nest): Ditto.
4579 (g95_trans_forall_1): Don't pass shared loopinfo.
4580 * trans.c (g95_start_block): Expand comment.
4582 2003-07-12 Paul Brook <paul@nowt.org>
4584 * arith.c (g95_index_integer_kind): Remove unused initializer.
4585 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
4586 index by size of element.
4587 (generate_loop_for_rhs_to_temp): Ditto.
4588 (allocate_temp_for_forall_nest): Use element size, not index size.
4590 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4592 * arith.c (g95_index_integer_kind): Add a TODO.
4593 * simplify.c (g95_simplify_nearest): Add a TODO.
4595 2003-07-09 Chun Huang <compiler@sohu.com>
4597 * trans.h: Add declarations for gfor_fndecl_string_scan and
4598 gfor_fndecl_string_verify.
4599 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4600 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
4601 (g95_conv_intrinsic_verify): New function.
4602 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
4603 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
4604 of parameter 'BACK=.TRUE.'
4606 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
4608 * trans-stmt.c (iter_info, forall_info): Define.
4609 (g95_trans_forall_block): Remove.
4610 (g95_trans_forall_loop): Use forall info blocks.
4611 (g95_trans_nested_forall_loop): New function.
4612 (g95_do_allocate): Handle things other than logical masks.
4613 (generate_loop_for_temp_to_lhs): New function.
4614 (generate_loop_for_rsh_to_temp): New function.
4615 (compute_inner_temp_size): New function.
4616 (compute_overall_iter_number): New function.
4617 (allocate_temp_for_forall_nest): New function.
4618 (g95_trans_forall): Move body ...
4619 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
4621 2003-07-02 Paul Brook <paul@nowt.org>
4623 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
4624 in correct scope. Change callers to match.
4625 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
4626 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
4628 2003-07-02 Paul Brook <paul@nowt.org>
4630 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
4631 expression shape for all expressions.
4632 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
4634 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4636 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
4637 g95_parse_arg), intrinsic.c (g95_convert_type): support of
4639 * intrinsic.c, g95.h: Add g95_convert_type_warn,
4640 * resolve.c (g95_resolve_index): Call it.
4642 2003-07-02 Paul Brook <paul@nowt.org>
4644 * iresolve.c (g95_resolve_reshape): Set expression shape.
4645 (g95_resolve_shape): Ditto.
4646 * simplify.c (g95_simplify_shape): Move common code outside condition.
4647 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
4649 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4651 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
4654 2003-06-29 Paul Brook <paul@nowt.org>
4656 * array.c (g95_simplify_iterator_var): Don't bother with return value.
4657 * expr.c (find_array_element, find_component_ref): New functions.
4658 (remove_subobject_ref): New function.
4659 (simplify_const_ref): Use them. Rename from simplify_component_ref.
4660 (simplify_ref_chain): New function.
4661 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
4662 (g95_specification_expr): Simplify the expression.
4663 * resolve.c (resolve_operator): Check simplifications return code.
4664 (g95_resolve_expr): Ditto.
4666 2003-06-26 Paul Brook <paul@nowt.org>
4668 * expr.c (simplify_component_ref): New function.
4669 (g95_simplify_expr): Use it.
4670 * resolve.c (resolve_structure_cons): Handle references.
4672 2003-06-25 Paul Brook <paul@nowt.org>
4674 * trans-io.c (build_dt): Handle internal units.
4676 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
4678 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
4679 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
4680 Use g95_array_index_type instead of integer_type_node.
4681 (g95_build_common_decl, g95_set_common_master_type): Use
4682 g95_character1_type_node instead of char_type_node.
4683 * trans-equivalence.c (g95_layout_local_equiv): As above.
4685 2003-06-24 Steven G. Kargl <kargls@attbi.com>
4687 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
4688 remove last remains of -fquiet.
4690 2003-06-22 Paul Brook <paul@nowt.org>
4692 * resolve.c (resolve_operator): Don't fail if we can't simplify.
4693 (g95_resolve_expr): Ditto.
4694 (resolce_code): Mark as static.
4695 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
4696 gimplifer doesn't (yet).
4698 2003-06-20 Paul Brook <paul@nowt.org>
4700 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
4701 * match.c (g95_match_if): Add ST_PAUSE.
4702 (g95_match_stopcode): New function.
4703 (g95_match_pause, g95_match_stop): Use it.
4704 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
4705 (decode_stmt, next_statement, parse_executable): Ditto.
4706 * resolve.c (resolve_code): Ditto.
4707 * st.c (g95_free_statement): Ditto.
4708 * trans-stmt.c (g95_trans_pause): New function.
4709 * trans-stmt.h: Declare it.
4710 * trans.c (g95_trans_code): Use it.
4711 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
4713 (g95_build_builtin_function_decls): Initialize them.
4715 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
4717 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4719 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
4720 match_filepos): Fix error handling.
4722 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4724 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
4725 Add assertions on arguments.
4726 * resolve.c (expression_shape): Remove useless &.
4727 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
4728 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
4729 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
4730 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
4731 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
4732 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
4733 (g95_simplify_not, g95_simplify_scale): Add assertions.
4735 2003-06-15 Paul Brook <paul@nowt.org>
4737 Clean up stuff to work with the ssa optimizers.
4738 * convert.c (convert): Handle BOOLEAN_TYPEs.
4739 * f95-lang.c (g95_truthvalue_conversion): Implement.
4740 * trans-array.c (g95_trans_array_constructor_value): Group multiple
4742 * trans.h (g95_truthvalue_conversion): Declare.
4743 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
4744 * trans-stmt.c (g95_trans_character_select): Don't create array
4745 assignments. Mark labels as indirect jump targets.
4746 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
4747 (g95_get_dtype_cst): Handle LOGICAL types.
4749 2003-06-14 Paul Brook <paul@nowt.org>
4751 * f95-lang.c (g95_gimplify_expr): New function.
4752 * trans-array.c (g95_trans_array_constructor_value): Don't create
4754 (g95_conv_expr_descriptor): Rename simple->gimple.
4755 * trans-expr.c (conv_expr_op): Use proper logical operators.
4756 * trans-intrinsic.c (build_fixbound_expr): New function.
4757 (build_fix_expr): Ditto.
4758 (g95_conv_intinsic_aint): Use them. Use builtin functions.
4759 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
4761 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4763 * array.c (g95_compare_array_spec): Remove unreachable code.
4764 * expr.c (g95_copy_expr): Likewise.
4765 * intrinsic.c (g95_convert_type): Likewise.
4766 * misc.c (g95_code2string): Likewise.
4767 * simplify.c (g95_simplify_ishft, g95_simplify_real,
4768 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
4769 * trans-stmt.c (g95_trans_select): Likewise.
4770 * primary.c (extend_ref): Add an assertion.
4771 * simplify.c (g95_convert_constant): Add const.
4772 * intrinsic.h: Remove g95_check_x_ni.
4773 * f95-lang.c (g95_finish): Call g95_release_include_path.
4775 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4777 * resolve.c (resolve_contained_functions): Fix typo introduced on
4780 2003-06-09 Paul Brook <paul@nowt.org>
4782 * g95.h: Include system.h not hwint.h.
4783 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
4784 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
4786 2003-06-09 Paul Brook <paul@nowt.org>
4788 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
4789 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
4790 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
4791 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
4792 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
4794 * trans.h (g95_trans_equivalence, g95_trans_common,
4795 g95_add_decl_to_function): Declare.
4796 * trans-common.c, trans-equivalence.c: New files.
4798 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
4800 * intrinsic.c (g95_intrinsic_extension): Remove.
4801 (add_functions): Substitute g95_check_x for g95_check_x_ni
4803 (g95_init_expr_extensions): New function.
4804 (g95_intrinsic_func_interface): Use it.
4805 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
4806 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
4807 g95_check_precision, g95_check_present, g95_check_radix,
4808 g95_check_range, g95_check_selected_real_kind): Do not set
4809 g95_intrinsic_extension.
4810 (g95_check_x_ni): Remove now duplicate of g95_check_x.
4812 * expr.c (check_inquiry): Add FIXME, fixup some code style.
4814 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4816 * g95.h (ref_type): Name this type explicitly.
4817 * module.c (MIO_NAME): Add specialisations of mio_name.
4818 (mio_symbol_attribute, mio_typespec, mio_array_ref,
4819 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
4820 (ab_attribute): Name this type explicitly.
4821 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
4823 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
4825 * trans-intrinsic.c (g95_conv_allocated): New function.
4826 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
4828 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
4830 * f95-lang.c: Don't include g95-support.h
4831 (g95_mark_addressable): Add prototype.
4832 (g95_init_decl_processing): Remove C front end hack.
4833 * f95-tree.c: Remove file.
4834 * support.c: Remove file.
4835 * g95-support.h: Remove file.
4836 * trans-types.c (g95_init_types): Set up boolean
4837 type related tree nodes.
4838 * Make-lang.in: Remove rules for dead files and
4839 dependencies on them.
4841 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
4843 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
4844 C front end dependency. Also, convert.c does not depend on
4845 g95-support.h anymore.
4846 * convert.c: Don't include c-common.h and g95-support.h
4847 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
4848 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
4849 stmts_are_full_exprs_p, current_stmt_tree,
4850 current_scope_stmt_stack): Remove.
4851 * g95-support.h (unsigned_conversion_warning): Kill proto.
4852 (boolean_type_node, boolean_true_node, boolean_false_node):
4853 Don't define here. Instead, make then true tree nodes in
4855 * support.c (c_global_trees): Die, C front end, die!!!
4856 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
4857 uintmax_type_node, string_type_node and const_string_type_node.
4858 (decl_constant_value, overflow_warning): Make static functions.
4859 They are in death row too, though.
4860 (default_conversion, c_expand_asm_operands): Remove.
4861 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
4862 trans.c: Don't include c-common.h.
4863 * trans-types.c (boolean_type_node, boolean_true_node,
4864 boolean_false_node): Make them real tree nodes.
4865 * trans-types.h (intmax_type_node, string_type_node,
4866 const_string_type_node): Hack to work around C dependencies
4867 in builtin-types.def.
4869 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4871 * decl.c (decl_types): Add some iterators-like sentinels.
4872 * decl.c (match_attr_spec): Use them.
4873 Use "decl_types" instead of "int".
4874 Add cast in call to g95_match_strings.
4875 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
4877 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
4878 (g95_interface_info): Use "g95_intrinsic_op".
4879 * dump-parse-tree.c (g95_show_namespace): Use them.
4880 * interface.c (g95_check_interfaces): Use them.
4881 * module.c (read_module, write_module): Use them.
4882 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
4883 Use "g95_intrinsic_op".
4884 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
4885 Add a default case in switch statement.
4886 * intrinsic.h (g95_generic_isym_id): Moved to...
4887 * g95.h (g95_generic_isym_id): here.
4888 (g95_intrinsic_sym): Use "g95_generic_isym_id".
4889 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
4890 * trans-intrinsic.c (g95_intrinsic_map_t,
4891 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
4892 * match.c (g95_match_intrinsic_op): Add cast in call to
4895 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
4897 * support.c (skip_evaluation, warn_conversion, lvalue_p,
4898 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
4899 constant_fits_type_p, convert_and_check,
4900 unsigned_conversion_warning): Remove these ugly remnants
4901 we inherited from the C front end.
4902 (function_types_compatible): Remove '#if 0'-edcode.
4903 (build_modify_expr): Likewise.
4904 (convert_for_assignment): Don't use the deceased functions.
4905 The parameter fundecl is now unused.
4906 (decl_constant_value): Always just return decl. In fact
4907 this function is not used at present, but it might be in
4908 the future, when we start using the tree inliner.
4909 (overflow_warning, default_conversion, c_expand_asm_operands):
4910 Abort when these are called, they are part of the C type
4911 checking implementation and therefore poison to Fortran.
4913 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
4915 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
4916 c-pretty-print.o and c-dump.o. Add a comment on why we
4917 depend on c-semantics.c.
4918 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
4919 Don't use the C front end tree dumper hook to dump the
4920 language specific tree representation -- we don't have
4921 one. So instead, inherit the default langhook.
4923 2003-06-02 Paul Brook <paul@nowt.org>
4925 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
4927 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4929 * check.c (g95_check_associated): Use proper types. Remove
4930 extraneous argument in call to g95_error().
4932 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4934 * resolve.c (resolve_operator): Make logical operands convert to the
4935 type with higher kind.
4937 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4939 * check.c (g95_check_associated): Make sure both pointer and target has
4940 the same type and rank. Null pointer or array section with vector
4941 subscript as target are not allowed.
4942 * trans.h: Declare gfor_fndecl_associated.
4943 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
4944 gfor_fndecl_associated.
4945 * trans-intrinsic.c (g95_conv_associated): New function.
4946 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
4948 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4950 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
4951 according to POINTER itself rather than TARGET.
4952 (g95_conv_expr_descriptor): Make lbound start at 1.
4953 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
4955 2003-06-01 Paul Brook <paul@nowt.org>
4957 * expr.c (g95_type_convert_binary): Make it match the standard.
4958 * g95.texi: Remove dead link.
4960 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
4962 * g95.texi: Cleanup somewhat in preparation for inclusion
4965 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4966 Canqun Yang <canqun@yahoo.com.cn>
4968 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
4970 (g95_find_forall_index): Return proper value.
4971 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
4972 compare the return value from g95_find_forall_index.
4974 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4975 * g95.h, io.c (g95_st_label): Remove "length".
4976 (g95_symtree): Remove "link".
4977 (g95_case): Remove "code".
4978 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
4979 g95_convert_real): Make an argument pointer to const.
4980 * decl.c (colon_seen): Add a TODO.
4981 * interface.c (g95_compare_types): Fix typo.
4982 * interface.c (compare_interfaces): Preserve value of "p".
4983 * intrinsic.c (sort_actual): Remove "i".
4984 * match.c (g95_match_assign): Proper type in call to g95_match().
4985 * parse.c (next_free): Avoid duplicate call due to macro.
4986 * parse.c (check_statement_label): wrong type in call to g95_error.
4987 * primary.c (match_real_constant): Add a TODO.
4988 * resolve.c (resolve_select): Remove useless conditional.
4989 * simplify.c (g95_simplify_repeat): Proper assignment to
4990 "value.character.string".
4991 * simplify.c (g95_simplify_reshape): Wrong variable in call to
4994 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
4996 * trans-stmt.c: Remove unnecessary include file defaults.h.
4998 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
5000 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
5002 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
5003 actual variables used as FORALL indexes.
5005 2003-05-15 Paul Brook <paul@nowt.org>
5007 * trans-array.c (g95_trans_static_array_pointer): Use
5009 (g95_trans_deferred_array): Initialize static array pointers.
5010 * trans-expr.c (g95_conv_function_call): Use formal arglist to
5011 correctly pass POINTER and absent CHARACTER arguments.
5013 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
5015 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
5016 (g95_resolve_forall_body): Resolve FORALL body.
5017 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
5018 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
5019 (g95_find_forall_index): Check whether the FORALL index appears in
5020 the expression or not.
5021 (resolve_code): Modified.
5023 2003-05-14 Paul Brook <paul@nowt.org>
5025 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
5027 2003-05-13 Paul Brook <paul@nowt.org>
5029 * trans-types.c (g95_max_array_element_size): Now a tree node.
5030 (g95_init_types): Work out max size properly.
5031 (g95_get_dtype_cst): Modify to match.
5033 2003-05-11 Paul Brook <paul@nowt.org>
5035 * trans-io.c (add_case): Create a label decl for case labels.
5037 2003-05-11 Paul Brook <paul@nowt.org>
5039 * arith.c (g95_integer_index_kind): New variable.
5040 * f95-lang.c (g95_init): Move frontend initialization here ...
5041 (g95_post_options): ... from here.
5042 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
5043 * intrinsic.c (add_functions): Use index kinds.
5044 * iresolve.c: Convert to index_kind where needed.
5045 * resolve.c (g95_resolve_index): Make public, use index_kind.
5046 (resolve_array_ref): Adjust to match.
5047 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
5048 * trans-stmt.c: Ditto.
5049 * trans-types.c: Ditto.
5050 * trans-types.h (g95_array_index_kind): Remove declaration.
5051 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
5053 2003-05-07 Paul Brook <paul@nowt.org>
5055 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
5056 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
5059 2003-05-07 Paul Brook <paul@nowt.org>
5061 * trans-array.c (trans_static_array_pointer,
5062 g95_trans_array_constructor_value, g95_conv_array_initializer,
5063 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
5064 (g95_add_loop_ss_code): Convert subscripts to the correct type.
5065 * trans-stmt.c (g95_trans_character_select): Ditto.
5066 * trans-types.c (g95_init_types): Ditto.
5068 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
5070 * f95-lang.c (expand_function_body): Use input_line, not lineno.
5071 * trans-decl.c (g95_generate_function_code,
5072 g95_generate_constructors): Likewise.
5073 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
5074 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
5077 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5078 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
5079 with components point to the DERIVED type itself, and two DERIVED
5080 type with components point to each other.
5081 * trans-expr.c (g95_conv_componet_ref): Modified
5083 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5084 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
5086 (g95_trans_pointer_assign): Implement Nullify.
5088 2003-05-01 Paul Brook <paul@nowt.org>
5090 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
5091 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
5093 2003-05-01 Paul Brook <paul@nowr.org>
5095 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
5096 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
5099 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
5101 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
5104 2003-04-28 Paul Brook <paul@nowt.org>
5106 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
5107 as their kind suggests.
5108 (g95_resolve_reshape): Ditto.
5110 2003-04-28 Chun Huang <compiler@sohu.com>
5112 * trans-expr.c (g95_conv_substring_expr): New function.
5113 (g95_conv_expr): Use it.
5115 2003-04-28 Paul Brook <paul@nowt.org>
5117 * iresolve.c (g95_resolve_transpose): Make it match the
5119 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
5121 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
5123 * trans-types.c (g95_add_field_to_struct): New function to
5124 add a field to a UNION_TYPE or RECORD_TYPE.
5125 * trans-types.h (g95_add_field_to_struct): Prototype.
5126 (g95_get_derived_type): Use g95_add_field_to_struct to add
5128 * trans-io.c (g95_add_field): Remove.
5129 (ADD_FIELD): Use new g95_add_field_to_struct function.
5130 (ADD_STRING): Likewise.
5131 * trans-stmt.c (g95_trans_select): Likewise.
5132 (g95_add_field): Remove duplicated function.
5134 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
5136 Port implementation for CHARACTER SELECT from Andy's tree.
5137 * trans-stmt.c (g95_trans_character_select): Implement character
5138 select. (g95_add_field): New function.
5139 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
5140 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
5141 * g95.h (struct g95_case): Add field 'int n'.
5142 * trans.h: Declare 'gfor_fndecl_select_string'.
5144 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
5146 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
5147 (g95_insert_bbd): Die on duplicates.
5148 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
5150 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
5152 * g95.texi: Require GMP 4.0 -- like we actually
5153 do. Explain the testsuite and what-goes-where.
5154 Don't use undefined texinfo symbol. Break very
5155 long line. Remove finished item from the list
5158 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
5160 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
5163 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
5165 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
5166 (g95_trans_forall_body): New function.
5168 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
5170 * resolve.c (resove_where): New function.
5171 (resolve_where_shape): New function.
5172 (resolve_code): Add call to 'resolve_where'
5173 * trans-stmt.c (g95_trans_where): Modified.
5174 (g95_trans_where_2): New function.
5175 (g95_trans_where_assign): New function.
5176 (g95_evaluate_where_mask): New function.
5177 (g95_add_to_stmt_list): New function.
5178 (g95_get_temp_expr): New function.
5179 * trans.h (where_stmt_list): New structure.
5181 2003-04-10 Paul Brook <paul@nowt.org>
5183 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
5184 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
5186 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
5188 Update after mainline -> tree-ssa-branch merge.
5189 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
5191 (g95_init): Update for new lang_hooks definition.
5192 (g95_post_options): New langhook.
5193 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
5194 * scanner.c (g95_new_file): Comment update.
5196 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5198 * g95.h, lang-options.h: Add -Wimplicit-interface.
5199 * options.c (g95_init_options, g95_parse_arg): Set it.
5200 * interface.c (check_intents): Warn about call with implicit
5202 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
5205 2003-04-05 Paul Brook <paul@nowt.org>
5207 * iresolve.c (g95_resolve_spread): Don't resole based on type.
5208 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
5210 2003-03-29 Paul Brook <paul@nowt.org>
5212 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
5213 (g95_resolve_unpack): Ditto.
5214 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
5215 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
5216 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
5218 2003-03-25 Paul Brook <paul@nowt.org>
5220 * arith.c (g95_unary_user, g95_user): Remove dead functions.
5222 * array.c (g95_free_array_ref): Ditto.
5224 * symbol.c (g95_use_derived_tree): Ditto.
5225 * intrinsic.c (add_functions): Use simplification for SCALE.
5226 * primary.c (g95_match_rvalue): Test sym, not symtree.
5228 2003-03-25 Paul Brook <paul@nowt.org>
5230 * trans-decl.c (build_function_decl): Add parameter before it gets
5231 turned into a constant.
5232 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
5233 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
5234 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
5236 2003-03-22 Paul Brook <paul@nowt.org>
5238 * trans-array.c (g95_conv_array_initializer): Allow scalar
5240 * trans-decl.c (g95_finish_var_decl): Result variables are not
5242 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
5243 (g95_conv_intrinsic_function): Use it.
5244 * trans-types.h (g95_type_spec): Remove dead declaration.
5246 2003-03-21 Paul Brook <paul@nowt.org>
5248 * trans-decl.c (g95_build_function_decl): Mark string parameters.
5250 2003-03-20 Paul Brook <paul@nowt.org>
5252 * trans-decl.c (g95_build_function_decl): Put character length
5253 parameters at the end of the function declaration.
5254 * trans-expr.c (g95_conv_function_call): Ditto.
5255 * trans-types.c (g95_get_function_type): Ditto.
5257 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5259 * resolve.c (resolve_formal_arglist): Don't impose intent for
5260 procedure arguments of pure functions.
5261 (resolve_select): Remove redundant assignment.
5263 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5265 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
5267 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
5268 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
5270 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
5272 * symbol.c (g95_add_type): Fix typo in comment.
5275 2003-03-16 Paul Brook <paul@nowt.org>
5277 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
5278 * expr.c (g95_build_call): Remove.
5279 * f95-lang.c (puchdecl_top_level): New function.
5280 * g95.h (g95_code): Store resolved symbol, not just the name.
5281 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
5282 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
5283 (g95_get_intrinsic_sub_symbol): New function.
5284 * iresolve.c (g95_resolve_cpu_time): Use it.
5285 (g95_resolve_random_number): Ditto.
5286 * resolve.c: Set code->resolved_sym instead of code->sub_name.
5287 * trans-decl.c (g95_get_extern_function_decl): Give external decls
5288 the correct DECL_CONTEXT. Add global symbold to the global scope.
5289 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
5292 2003-03-16 Paul Brook <paul@nowt.org>
5294 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
5295 * options.c (g95_parse_arg): Ditto.
5296 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
5297 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
5298 for the procedure, not the parameter.
5299 * trans-array.c (g95_trans_g77_array): New function.
5300 (g95_trans_assumed_size): Use it.
5301 (g95_trans_dummy_array_bias): Ditto.
5302 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
5303 (g95_conv_expr_descriptor): ... to here. Update callers.
5304 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
5305 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
5306 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
5307 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
5308 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
5309 (g95_sym_type): Ditto.
5311 2003-03-15 Paul Brook <paul@nowt.org>
5313 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
5315 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
5317 2003-03-14 Paul Brook <paul@nowt.org>
5319 * trans-array.c (g95_array_is_packed): Remove.
5320 (g95_conv_array_base): Correctly handle all descriptorless cases.
5321 (g95_conv_array_stride): Use descriptorless strides.
5322 (g95_trans_dummy_array_bias): Don't always repack the array.
5323 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
5325 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
5326 dummy and non-dummy arrays...
5327 (g95_sym_type, g95_get_derived_type): ... like these.
5328 (g95_get_array_type_bounds): Allow discontiguous arrays.
5330 2003-03-12 Paul Brook <paul@nowt.org>
5332 * array.c (g95_resolve_array_spec): Fix comment.
5333 * g95.h (symbol_attributes): New flag always_explicit.
5334 * resolve.c (resolve_formal_arglist): Set it always_explicit.
5335 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
5336 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
5337 (g95_trans_array_bounds): Allow assumed shape arrays.
5338 (g95_trans_repack_array): Remove.
5339 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
5340 * trans-decl.c (g95_build_qualified_array): Only ignore absent
5341 bounds for assumed size arrays.
5342 (g95_build_dummy_array_decl): Use descriptorless arrays.
5343 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
5344 (g95_trans_pointer_assign): Fix typo.
5345 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
5347 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
5348 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
5349 Also modify callers.
5350 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
5352 2003-03-08 Paul Brook <paul@nowt.org>
5354 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
5355 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
5356 * resolve.c (compare_spec_to_ref): Allow full array sections.
5358 2003-03-08 Paul Brook <paul@nowt.org>
5360 * expr.c (g95_simplify_expr): Also simplify array index and
5361 substring expressions.
5362 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
5363 * trans-array.c (g95_trans_array_bounds): New function.
5364 (g95_trans_auto_array_allocation): Use it.
5365 (g95_trans_assumed_size): Rewrite.
5366 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5367 (gfor_fndecl_repack): Remove.
5368 (g95_build_qualified_array): Handle absent upper bounds.
5369 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
5370 (g95_get_symbol_decl): Update.
5371 (g95_build_intrinsic_function_decls): Initialize new decls.
5372 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5373 (gfor_fndecl_repack): Remove.
5374 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
5375 * trans-types.c: (g95_build_array_type): Merge duplicated code..
5376 (g95_get_nodesc_array_type): Handle absent bounds.
5377 * trans-types.h (g95_get_nodesc_array_type): Declare.
5379 2003-03-04 Paul Brook <paul@nowt.org>
5381 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
5384 2003-03-02 Paul Brook <paul@nowt.org>
5386 * options.c (g95_init_options): Drfault to 1.
5387 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
5388 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
5389 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
5390 Handle non-constant size automatic arrays.
5391 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
5392 generic bound functions.
5393 (g95_trans_auto_array_allocation): Don't create a descriptor.
5394 (g95_trans_assumed_size): New function (broken).
5395 (g95_trans_dummy_array_bias): Remove unused var.
5396 * trans-array.h (g95_trans_assumed_size): Declare.
5397 * trans-decl.c (create_index_var): New fuction.
5398 (g95_build_qualified_array): New function.
5399 (g95_get_symbol_decl): Use it.
5400 (g95_trans_deferred_vars): Handle assumed shape seperately.
5401 * trans-types.c (get_element_type): Handle heap allocated arrays.
5402 (g95_is_nodesc_array): Include non-const size arrays.
5403 (g95_get_nodesc_array_type): Ditto.
5405 2003-02-23 Paul Brook <paul@nowt.org>
5407 * trans-array.c (g95_array_init_size): Should use stride, not size of
5410 2003-02-18 Paul Brook <paul@nowt.org>
5412 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
5413 after intrinsic function check.
5415 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5417 * io.c (match_io): Fix missing return value and remove useless
5419 * match.c (g95_match): Remove useless assignment.
5420 * module.c (parse_string): Remove useless post increment.
5421 * simplify.c (g95_simplify_verify): Remove useless assignment.
5423 2003-02-15 Paul Brook <paul@nowt.org>
5425 * expr.c (restricted_intrinsic): Handle bad values gracefully.
5426 * g95.h (symbol_attribute): Add referenced member.
5427 (g95_symbol): Add dummy_order member.
5428 (g95_set_sym_referenced): Declare.
5429 * match.c (g95_match_assignment, g95_match_call): Use it
5430 * primary.c (match_actual_arg, g95_match_rvalue,
5431 g95_match_variable): Ditto.
5432 * symbol.c (next_dummy_order): New variable.
5433 (g95_set_sym_referenced): New function.
5434 (check_done): New function.
5435 (g95_add_*): Use it.
5436 * trans-decl.c: Make formatting conform to GCC standards.
5437 (g95_defer_symbol_init): Add dummy variables in the right order.
5438 (g95_get_symbol_decl): Only accept referenced variables.
5439 (g95_create_module_variable): Module variables are always required.
5440 (generatr_local_decls): New function.
5441 (generate_local_vars): New function.
5442 (g95_generate_function_code): Use it.
5444 2003-02-13 Paul Brook <paul@nowt.org>
5446 * trans-decl.c (g95_conv_struct_cons): Remove.
5447 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
5448 * trans-expr.c (g95_conv_structure): New function.
5449 (g95_conv_expr): Use it.
5451 2003-02-09 Paul Brook <paul@nowt.org>
5453 * trans-array.c (g95_array_init_size): Don't evaluate the linit
5454 expressions multiple times.
5455 (g95_trans_auto_arry_allocation): Use pointer not tmp.
5457 2003-02-08 Paul Brook <paul@nowt.org>
5459 * module.c (mio_symtree_ref): Declare as static.
5460 (mio_expr): Remove dead code.
5461 (read_module): Set the symtree link for fixups.
5462 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
5463 (build_round_expr): ... to this.
5464 (g95_conv_intrinsic_aint): New function.
5465 (g95_conv_intrinsic_function): Use it.
5467 2003-02-08 Paul Brook <paul@nowt.org>
5469 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
5470 offset after modificaton, not the increment expression.
5471 * dependency.c: Kill excess whitespace.
5473 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
5475 * dependency.h: Remove some function declarations.
5476 * dependency.c (get_no_of_elements): Change this function not to
5478 * other: Add comments for all modified functions.
5480 2003-02-06 Paul Brook <paul@nowt.org>
5482 * g95spec.c (lang_specific_functions): Fix initializer warning.
5483 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
5484 for structure type names.
5485 * trans-decl.c (g95_cons_structure_cons): New function.
5486 (g95_get_symbol_decl): Use it.
5487 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
5490 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5492 * resolve.c (compare_cases): Add const to casts.
5494 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5496 * g95.h (g95_check_f): Change a1 to f1m.
5497 * intrinsic.c (add_sym_1m, check_specific,
5498 g95_intrinsic_func_interface): Use it.
5500 * module.c (init_pi_tree): Remove useless cast.
5501 (fp2): Fix argument type.
5503 * parse.c (parse_select_block): Add comment.
5505 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
5507 * lang-options.h: Fix warning involving C90 concatenated
5510 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5511 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5513 * io.c (format_asterisk): Complete initializer to kill warning.
5514 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
5515 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
5516 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
5517 new defines to complete initializers. Kills all warnings.
5519 * Make-lang.in: Comment cleanup.
5521 2003-02-05 Paul Brook <paul@nowt.org>
5523 * array.c (g95_free_constructor): Handle NULL expressions.
5524 * resolve.c (resolve_structure_cons): Ditto.
5525 * decl.c (g95_match_null): New Function.
5526 (variable_decl): Use it.
5527 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
5528 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
5529 * trans-types.c (g95_set_decl_attributes): Remove empty function.
5531 2003-02-05 Paul Brook <paul@nowt.org>
5533 * trans.h (build1_v): New macro.
5534 (build_v): Remove pointless and incorrect prototype.
5535 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
5536 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
5538 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
5540 * Make-lang.in (F95_OBJS): Remove one more dead file.
5542 2003-02-01 Paul Brook <paul@nowt.org>
5544 * lang-specs.h: Don't pass -ffixed-form to the linker.
5545 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
5547 2003-02-01 Paul Brook <paul@nowt.org>
5549 * Make-lang.in (F95_OBJS): Remove dead files.
5550 * trans-array.c (g95_array_init_size): Do the right thing when
5552 * trans-decl.c (g95_generate_function_code): Initialize deffered
5553 symbol list before translating contained subroutines.
5554 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
5555 scalar invariant values here...
5556 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
5557 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
5559 2003-01-29 Paul Brook <paul@nowt.org>
5561 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
5562 (g95_walk_elemental_function_args): Reverse chains before adding.
5563 (g95_reverse_ss): Move about a bit.
5564 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
5567 2003-01-28 Paul Brook <paul@nowt.org>
5569 * intrinsic.c (resolve_intrinsic): Use correct union member.
5570 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
5572 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
5573 use associated variables.
5574 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
5575 * trans-expr.c (g95_conv_expr_present): ... to here.
5576 * trans.h: Declare it.
5577 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
5579 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5581 * array.c (expand_iterator): Suppress useless assignment.
5582 * decl.c (match_char_spec): Ditto.
5583 * io.c (match_io_iterator): Ditto.
5584 * primary.c (match_real_constant): Ditto.
5585 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
5586 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
5587 * matchexp.c (match_add_operand, match_level_5): Likewise.
5588 * module.c (parse_atom, find_enum): Likewise.
5589 * resolve.c: move #include <string.h>
5590 (resolve_select): Fix serious typo.
5592 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
5594 * Make-lang.in: Don't build with broken tree-ssa-pre.
5596 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
5598 * resolve.c (resolve_index): Add a TODO.
5599 * symbol.c: Remove useless "#include <ctype.h>".
5601 2003-01-27 Paul Brook <paul@nowt.org>
5603 * check.c (check_rest): Allow different type kinds as an extension.
5604 * g95.h (g95_resolve_f): Add f1m.
5605 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
5606 * intrinsic.h: Chenge prototypes for MIN and MAX.
5607 * iresolve.c (g95_resolve_minmax): New function.
5608 (g95_resolve_min, g95_resolve_max): Use it.
5609 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
5611 (g95_conv_intrinsic_present): Fix logic.
5613 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
5615 * g95.h (g95_case): Don't be a tree, be a double linked list.
5616 * match.c (match_case_selector): Remove redundant semantics check.
5617 Clean up a few goto's to make it a tiny little bit faster.
5618 * resolve.c (case_tree): Die.
5619 (compare_cases): Accept and compare unbounded cases too.
5620 (check_case_overlap): Don't build a tree. Instead, merge-sort the
5621 whole list of g95_cases passed from resolve_select.
5622 (sane_logical_select): Die.
5623 (check_case_expr): Return FAILURE if a CASE label is of the wrong
5625 (resolve_select): Fixup case expression for computed GOTOs, put it
5626 in expr, not expr2, for easier handing in the parse tree dumper and
5627 the code generator. Rewrite the rest of the function: Kill
5628 unreachable case labels and unreachable case blocks.
5629 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
5630 an EXEC_SELECT, not case2 anymore.
5631 * trans-const.c (g95_conv_constant_to_tree): New function.
5632 (g95_conv_constant): Use it.
5633 * trans-const.h: Declare prototype for the new function.
5634 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
5635 g95_trans_character_select): New static functions.
5636 (g95_trans_select): Rewrite.
5638 2003-01-26 Paul Brook <paul@nowt.org>
5640 * intrinsic.c (add_fnctions): Properly add dreal.
5641 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
5642 (g95_conv_intrinsic_function): Use it.
5643 * trans-io.c (build_dt): Abort on internal files (unimplemented).
5645 2003-01-26 Paul Brook <paul@nowt.org>
5647 Widespread changes to the handling of symbols in expressions. These
5648 are now linked via g95_symtree nodes.
5649 * parse.c (g95_fixup_sibling symbols): New function.
5650 (parse_contained): Use it.
5651 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
5652 contained procedure that has bee correctly fixed up.
5653 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
5655 2003-01-24 Paul Brook <paul@nowt.org>
5657 * trans-array.c (g95_walk_expr): Function result attributes are in
5659 * trans-expr.c (g95_conv_function_call,
5660 g95_trans_arrayfunc_assign): Ditto.
5661 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
5663 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
5665 * expr.c (check_restricted): Fix error message.
5666 * symbol.c (free_st_labels): Plug memleak.
5668 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
5670 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
5671 reduce_binary_aa, reduce_binary, eval_intrinsic,
5672 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
5673 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
5674 for typesafe intrinsics helper functions.
5675 (g95_intrinsic_sym): Use them.
5676 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
5677 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
5678 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
5679 check_specific, g95_intrinsic_func_interface,
5680 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
5682 * trans-decl.c (g95_get_extern_function_decl): Likewise.
5683 * Make-lang.in: Don't disable warnings for strict prototypes
5684 any longer, everything is typesafe now.
5686 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
5688 * bbt.c (duplicate_node): Make static.
5689 * module.c (module_name): Make static.
5690 * scanner.c (include_dirs): Make static.
5692 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5694 Hard coded _gfor_'s should not show up anymore.
5695 * g95.h (PREFIX): New macro.
5696 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
5698 (g95_resolve_random_number): Likewise.
5699 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
5700 * trans-io.c: Remove 'prefix' macro. Replace all uses with
5701 the new PREFIX macro from g95.h.
5703 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5705 The troubles of forking... Andy implemented this just now too.
5706 Let's stick to that and keep the trees close.
5707 * g95.h (g95_st_label): 'format' member is now a g95_expr.
5708 * io.c: Revert previous changes.
5709 (g95_match_format): Match the format string as a character
5711 * match.h (g95_statement_label): Declare external.
5712 * parse.c: Revert previous changes.
5713 * symbol.c (g95_free_st_label): Free a g95_expr instead
5715 * trans-io.c: Revert previous changes.
5716 (build_dt): Use set_string to set the format string.
5718 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5720 * io.c (format_string): Make non-static.
5721 (g95_match_format): Remember the format string.
5722 (terminate_io): Add I/O termination for empty I/O lists.
5723 * match.h: Declare external format_string.
5724 * parse.c (check_statement_label): Attack the format string
5725 to a format label for FORMAT statements.
5726 * trans-io.c (g95_add_field): Define prefix macro. Replace
5727 all uses of PREFIX define with a use of this macro.
5728 (build_dt): Implement formatted I/O for format labels.
5730 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5732 * lang-options.h: Kill "-std=F".
5733 * options.c: Remove unimplemented "-std=F". Modify
5735 * misc.c (g95_terminal_width): New function.
5736 * error.c (g95_error_init_1): Use g95_terminal_width.
5737 * g95.h: Add prototype for g95_terminal_width, remove
5740 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
5742 * Make-lang.in: Fix typo.
5744 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
5746 * g95.h (struct g95_case): Remove unused cruft, new member
5747 'where' to keep track of the locus of the default case.
5748 * match.c (g95_match_case): Add locus to the current case.
5749 (match_case_selector): Likewise.
5750 * parse.c (parse_select_block): Move semantics check for
5751 multiple DEFAULT cases out of here to...
5752 * resolve.c (check_case_overlap): ...here. Return sooner
5754 (check_case_expr): Take two g95_cases now, use to sure the
5755 expression kinds are the same.
5756 (resolve_select): Cleanup.
5758 2003-01-18 Paul Brook <paul@nowt.org>
5760 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
5761 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
5763 (g95_get_extern_function_decl): Put decls in the correct context.
5765 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
5767 * trans-io.c: Port changes from Andy to set ERR flag.
5769 2003-01-17 Paul Brook <paul@nowt.org>
5771 * trans-array.c: Add various comments.
5772 (g95_ss_terminator): Declare as const.
5773 (g95_walk_expr): Remove first parameter and update all callers.
5774 (g95_walk_op_expr): Initialize scalar SS properly.
5775 * trans-array.h (g95_walk_expr): Update prototype.
5776 * trans-expr.c: Update for new g95_walk_expr.
5777 * trans-intrinsic.c: Ditto.
5778 * trans-io.c: Ditto.
5779 * trans.h: Various comments for SS chains.
5781 2003-01-17 Paul Brook <paul@nowt.org>
5783 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
5785 * intrinsic.c (add_functions): Use them.
5786 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
5787 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
5789 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5791 Fallout of a small merge conflict:
5792 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
5794 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5796 * initrinsic.c: New add_sym_* functions for strong typing.
5797 (add_conv): Make prototype strict.
5798 * dump-parse-tree.c, dependency.c: Include config.h
5799 * resolve.c, trans-io.c: Fix typos.
5801 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5803 * dump-parse-tree.c (g95_show_code_node): Show the
5804 condition for a computed GOTO that was transformed
5805 to a SELECT CASE construct.
5806 * resolve.c (check_case_overlap): Revert previous switch
5807 to treaps, it was too slow and didn't catch all trouble.
5808 (resolve_symbol): Be more flexible about module procedures.
5809 * symbol.c (check_conflict): Point to relevant section in
5810 the standard for dubious conflict. Allow procedure
5811 dummy arguments to be optional again.
5812 * trans-io (add_field): Rename to g95_add_field. Change
5814 * trans-stmt (trans_select): Handle unbounded cases for
5815 integer SELECT CASE constructs. Fix/add more comment.
5817 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5819 * g95.h: Uses GCC's function attribute macros.
5820 * error.c, module.c, parse.c, g95.h: More function attributes.
5822 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
5824 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
5825 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
5828 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
5830 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
5832 * trans.c (g95_trans_code): Use annotate_all_with_file_line
5833 instead of nowdead wrap_all_with_wfl.
5835 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5837 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
5838 before generating code, so we can still see it even if the code
5839 generation phase dies.
5841 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5843 * decl.c (build_sym): Split out initialization expression parts...
5844 (add_init_expr_to_sym): ...to here.
5845 (variable_decl): Add the symbol following an attribute list to the
5846 symbol tree before parsing the optional initialization expression
5847 if the symbol is not of a derived type.
5848 * primary.c (g95_match_rvalue): Don't assume a symbol always has
5849 a value if it is a PARAMETER.
5851 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5853 * misc.c: Don't #include <mcheck.h>
5854 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
5855 ever was a glibc bug, then either this was never reported to
5856 glibc people, or it has been fixed for so long that there's
5857 no information you can find about it, anywhere.
5859 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5862 * module.c (attr_bits, bt_types, array_spec_types):
5863 Switch 'const' and 'static'.
5864 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
5866 GNU'ify source code:
5867 * trans-io.c: Numerous fixes, one fixed warning and a few
5868 TODO markers so that we don't forget about them.
5870 2003-01-13 Paul Brook <paul@nowt.org>
5872 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
5873 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
5875 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
5876 * match.c (g95_match_stop): Fix dumb == -> != error.
5878 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
5880 * dump-parse-tree.c (show_indent): Add line breaks. This
5881 whole dumping process needs cleanups.
5882 * f95-lang.c (g95_mark_addressable): Fix prototype to match
5883 the langhook. Fix 'return's accordingly.
5884 * g95-support.h: Adjust prototype.
5885 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
5886 * lang-options.h: Add '-fsyntax-only'.
5887 * options.c (g95_init_options): Init 'no_backend'.
5888 (g95_parse_arg): Deal with '-fsyntax-only'.
5889 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
5892 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
5894 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
5895 arguments. Also make sure that if a symbol is marked INTRINSIC,
5896 an intrinsic with the symbol's name actually exists.
5897 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
5898 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
5899 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
5901 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
5903 * resolve.c (resolve_contained_functions): Fix condition, don't
5904 throw internal_error if a child namespace has no name. Apparently
5905 this can be the case?
5907 2003-01-11 Paul Brook <paul@nowt.org>
5909 Port changes from Andy's tree:
5910 * g95.h (g95_code): Add stop_code.
5911 * match.c (g95_match_stop): Detter syntax checking.
5912 * resolve.c (resolve_generic_f0): Return match type.
5913 (resolve_generic_f): Remove dead/duplicated code.
5914 (resolve_specific_f): Ditto.
5915 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
5916 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
5917 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
5919 2003-01-11 Paul Brook <paul@nowt.org>
5921 * trans-array.c: Various documentation/comment changes.
5922 * trans-stmt.c: Ditto.
5925 2003-01-10 Paul Brook <paul@nowt.org>
5927 * options.c/h: Add -fdump-parse-tree as alias of -v.
5929 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5931 * dump-parse-tree.c (g95_show_namespace): Fixed another
5932 typo. Sorry, it's Friday...
5934 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5937 * trans-array.c, trans-array.h, trans.c, trans-const.c,
5938 trans-const.h, trans-decl.c, trans-expr.c, trans.h
5939 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
5940 trans-types.c: Fix bogus copyright years, add 2003.
5941 * trans-types.h: Give copyright header.
5943 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5945 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
5946 * expr.c, options.c, scanner.c: Add some more 'const' markers.
5947 * intrinsic.c: Some constant strings moved to read-only memory.
5948 * io.c (format_asterisk): Move to...
5951 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5953 * dump-parse-tree.c (g95_show_namespace): Dump implicit
5954 types for ranges instead of per-letter. Indent the
5955 'CONTAINS' just like everything else.
5956 * resolve.c (resolve_contained_functions): Clarify comment.
5957 Explain non-obvious conditional expression. Improve
5958 diagnostics if tyoe cannot be resolved.
5959 Port semi-fix from Andy's tree:
5960 (was_declared): Move up before first use.
5961 (generic_sym, specific_sym): New functions. Code moved
5962 out if procedure_kind.
5963 (procedure_kind): Simplify using new functions.
5964 (resolve_generic_f): Make sure the functions we find in
5965 a parent namespace is generic.
5966 (resolve_specific_f): Ditto for specific functions.
5968 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5970 * trans-stmt.c, trans.c: Fix some code style issues. Add
5971 some more comment (but still not enough!).
5973 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5975 * symbol.c (flavors, procedures, intents, acces_types,
5976 access_types, ifsrc_types): Make const.
5977 * misc.c (g95_string2code): Make 'm' param 'const'.
5978 * module.c (find_enum, write_atom, mio_name): Make
5980 (attr_bits, bt_types, array_spec_types, array_ref_types,
5981 ref_types, expr_types): Make const.
5982 * g95.h: Adjust external decls.
5984 2003-01-09 Paul Brook <paul@nowt.org>
5986 * Testsuite: Add a load of new cases.
5988 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
5990 * Make-file.in: Add dependency on back end header files;
5991 a parallel build should work now.
5992 * f95-lang-c (lang_identifier): Remove bogus comment.
5993 (g95_be_parse_file): Fix prototype.
5994 (g95_init): Make static.
5995 (g95_finish): Make static.
5996 * error.c (g95_syntax_error): Kill. Make define in...
5997 * g95.h (g95_syntax_error): Define.
5998 (g95.options): Make 'source' member 'const'.
5999 * interface.c (g95_match_interface): Explain
6000 hard-to-read condition.
6001 (g95_match_end_interface): Ditto.
6002 * trans_const.c (g95_build_string_const): Make 's' parameter
6004 * trans_const.h: Adjust protoype accordingly.
6005 * trans-decl.c: Include tree-dump.h
6006 (g95_generate_function_code): Build fixes for recent changes
6007 in the tree-ssa branch.
6009 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6011 * format.c: Kill, move code from here...
6013 * Make-lang.in: Adjust.
6016 * BUGS: Mention where to submit bugs. Move old content...
6017 * TODO: ...to here. New file.
6019 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6020 Fix most warnings, and suppress the ones we can't fix for now.
6021 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
6022 these warnings just clutter the screen and there's not much
6023 we can do about them for now anyway.
6024 * check.c, iresolve.c: Mark unused function parameters.
6025 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
6026 they should be resolved before they get here.
6027 * error.c: Remove unused FILE *status_out.
6028 * f95-lang.c (g95_init): Remove bogus cast.
6029 * Many files: Make things 'const' where required.
6030 * g95.h: Fix prototypes for all modified functions above.
6031 (g95_options): Remove 'object' member.
6033 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6035 * Make-file.in: Cleanup bogus targets. Add more comment.
6036 * lang-options.h: New option '-w'.
6037 * g95.h: add no_options field to struct g95_options.
6038 * options.c (g95_init_options): Default no_warnings to off.
6039 (g95_parse_arg): Recognise the '-w' switch and its alias,
6041 * error.c (g95_warning, g95_warning_now): Don't emit warning if
6042 no_warning option is set.
6043 * iresolve.c (g95_resolve_shape): Fix warning.
6045 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6047 * primary.c (g95_next_string_char): Rename next_string_char, and
6048 make static. Adjust callers accordingly.
6049 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
6050 callers accordingly.
6051 * g95.h: Split out all g95_match* functions to...
6052 * match.h: ...here. New file.
6053 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
6054 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
6056 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6058 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
6059 g95_merge_new_implicit): New functions.
6060 (g95_match_implicit_none, g95_match_implicit): Move from here...
6061 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
6062 Modify to use the new functions in symbol.c.
6063 * g95.h: Add and move prototypes.
6065 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6067 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
6068 node compare function.
6069 (g95_insert_bbt): Likewise.
6070 (g95_insert_bbt_with_overlap): Likewise.
6071 (g95_delete_bbt): Likewise.
6072 (delete_treap): Likewise. Also fix a potential bug when calling it.
6073 * module.c (compare_pointers): Change proto to compare_fn.
6074 (compare_integers): Likewise.
6075 (compare_true_names): Likewise.
6076 (find_true_name): Adjust call to compare_true_names to match proto.
6077 (require_atom, write_atom, mio_name): Fix 'const' warnings.
6078 (init_pi_tree): Make compare a compare_fn instead of (int *).
6079 * resolve.c (compare_cases): Change proto to compare_fn.
6080 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
6081 it static, and rename to compare_symtree.
6082 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
6084 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
6085 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
6087 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6088 * Make-lang.in: Fix spaces/tabs issues from previous patch.
6089 * patch.options: Blow away Paul's checkin mistake :-)
6090 * io.c (terminate_io): Fix memory leak (Arnaud).
6092 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6094 * Make-lang.in: Teach about building DVI, info manual.
6095 * g95.texi: New file.
6097 2003-01-02 Paul Brook <paul@nowt.org>
6099 * trans-array.c (g95_reverse_ss): Make static and don't use.
6100 (g95_conv_ss_descriptor): Don't use g95_loopinfo
6101 (g95_conv_array_parameters): Modify for pointer assignments.
6102 (g95_walk_subexpr): New function.
6103 (g95_walk_expr*): Use it.
6104 * trans-array.h (g95_reverse_ss): Remove prototype.
6105 * trans-expr.c (g95_trans_pointer_assign): Implement.
6106 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
6107 * trans-intrinsic.c: Sync with scalarizer changes.
6108 * trans-io.c: Ditto.
6110 2002-12-29 Paul Brook <paul@nowt.org>
6112 * trans-array.c: Document calling convention for arrays.
6114 2002-12-19 Paul Brook <paul@nowt.org>
6116 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
6117 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
6118 optional parameters for some intrinsics.
6119 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
6120 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
6121 optional parameters.
6122 * trans.h (g95_se): Add ignore_optional flag.
6124 2002-12-15 Paul Brook <paul@nowt.org>
6126 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
6127 * trans-decl.c (g95_generate_function_code): Use TDI_original.
6129 2002-12-14 Paul Brook <paul@nowt.org>
6131 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
6133 2002-12-12 Paul Brook <paul@nowt.org>
6135 * trans-array.c (g95_trans_array_constructor_subarray): Fully
6136 initialize the scalarizer.
6137 (various): Update to new format of g95_expr->value.constructor.
6139 2002-12-08 Paul Brook <paul@nowt.org>
6141 * trans-array.c (g95_put_offset_into_var): New function.
6142 (g95_trans_array_constructor_subarray): New function.
6143 (g95_trans_array_constructor_value): Use it.
6144 (g95_array_cons_size): Don't abort() on array components.
6146 2002-12-08 Paul Brook <paul@nowt.org>
6148 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
6149 * support.c: Update #includes.
6150 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
6151 * trans-array.c: Update #includes.
6153 * trans-const.c: Ditto.
6154 * trans-io.c: Ditto.
6155 * trans-types.c: Ditto.
6156 (g95_init_types): Set size_type_node.
6157 * trans-decl.c: Update #includes.
6158 (gfor_fndecl_adjust{l,r}): Declare and initialize.
6159 * trans-stmt.c: Update #includes.
6160 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
6161 (g95_trans_select): Fix check for unbounded ranges.
6162 * trans-expr.c: Update #includes.
6163 (g95_conv_string_tmp): New function.
6164 (g95_conv_concat_op): Use it.
6165 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
6166 * Trans-intrisic.c: Update #includes.
6167 (g95_conv_intrinsic_strcmp): New function.
6168 (g95_conv_intrinsic_adjust): Ditto.
6169 (g95_conv_intrinsic_function: Use them.
6171 2002-11-30 Paul Brook <paul@nowt.org>
6173 * trans-array.c (g95_walk_function_expr): Handle non-array return by
6175 * trans-dec.c (g95_build_function_decl): Handle character return
6177 (g95_get_fake_result_decl): Ditto.
6178 (g95_trans_deferred_vars): Ditto.
6179 * trans-expr.c (g95_conv_function_call): Ditto.
6180 (g95_trans_arrayfunc_assign) Limit to array valued functions.
6181 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
6182 (g95_conv_intrinsic_function): Use it.
6183 * trans-types.c (g95_sym_type): Handle functions returning strings.
6184 (g95_return_by_reference): Ditto.
6185 (g95_get_function_type): Ditto.
6187 2002-11-18 Paul Brook <paul@nowt.org>
6189 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
6190 requires a temporary.
6191 (g95_trans_select): Handle computed gotos.
6192 * trans-types.c (g95_build_array_type): Warn about non-functional
6193 assumed shape arrays.
6194 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
6196 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
6197 (g95_conv_intrinsic_int): New function.
6198 (g95_conv_intrinsic_mod): New function.
6199 (g95_conv_intrinsic_ichar): New function.
6200 (g95_conv_intrinsic_function): Use them.
6201 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
6203 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
6205 * trans-types.c (g95_build_array_type): Assumed
6206 sized arrays can have rank > 1.
6207 * trans.c (g95_trans_code): Remove erroneous
6208 warning about CONTINUE.
6209 * trans-expr.c (g95_conv_variable): Remove
6212 2002-11-15 Paul Brook <paul@nowt.org>
6214 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
6216 2002-10-31 Paul Brook <paul@nowt.org>
6218 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
6219 * trans-expr.c (g95_conv_component_ref): Handle character string
6221 (g95_conv_string_parameter): Ditto.
6222 * trans-types.c (g95_get_derived_type): Add length decl to caracter
6225 2002-10-10 Paul Brook <paul@nowt.org>
6227 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
6228 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
6230 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
6231 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
6232 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
6233 * trans-types.c (pvoid_type_node): Declare and initialize.
6234 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
6235 (g95_array_allocate): Fix when base==data.
6236 (g95_conv_array_parameter): Correctly handle reduced rank sections.
6237 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
6239 2002-10-09 Paul Brook <paul@nowt.org>
6241 * (g95_conv_expr_reference): Handle character strings correctly.
6243 2002-10-07 Paul Brook <paul@nowt.org>
6245 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
6247 * trans-array.c (g95_build_array_initializer): Remove.
6248 (g95_conv_array_initializer): New Function.
6249 (g95_trans_auto_arry_allocation): Cleanup.
6250 (g95_trans_init_character_array): Remove.
6251 * g95spec.c: Link in libgforbegin.
6252 * trans.c (g95_generate_code): Rename main function to MAIN__.
6253 (g95_create_var): New function.
6254 (g95_create_var_np): New function.
6255 (g95_evaluate_now): New function.
6256 (g95_start_block): New function.
6257 (g95_finish_block): New function.
6258 (g95_add_expr_to_block): New function.
6259 (g95_add_block_to_block): New function.
6260 * trans-expr.c (g95_conv_componen_ref): New function.
6261 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
6262 (F95_OBJS): Add dependency.o.
6263 * f95-lang.c (g95_is_simple_stmt): Remove.
6264 * f95-tree.c (mark_not_simple): New function.
6265 (unshare_all_trees): New function.
6266 (create_tmp_var, create_tmp_alias_var): Remove.
6267 * support.c (declare_tmp_vars, tree_last_decl): Remove.
6268 * trans*: Convert to new IR using GENERIC trees. Don't bother about
6269 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
6271 2002-10-01 Paul Brook <paul@nowt.org>
6273 * trans-array.c: Add support for descriptorless arrays.
6274 (g95_conv_array_data): New function.
6275 (g95_conv_array_base): New function.
6276 * trans-array.h: Declare these here.
6277 * trans-decl.c(g95_create_mopdule_variable): Perform variable
6278 initialization and creation here.
6279 (g95_create_module_vars): Instead of here.
6280 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
6281 * trans-intrinsic.c: Ditto.
6282 * trans-types.c (g95_is_nodesc_array): New function.
6283 (g95_get_nodesc_array_type): New function.
6284 (g95_sym_type, g95_get_derived_type): Use them.
6285 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
6287 2002-09-28 Paul Brook <paul@nowt.org>
6289 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
6290 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
6293 2002-09-24 Paul Brook <paul@nowt.org>
6295 * f95-lang.c (listify): Remove declaration.
6296 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
6298 * f95-tree.c (get_name): New function.
6299 * trans.c (module_namespace): Remove.
6300 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
6301 * trans-types.c: Ditto.
6303 2002-09-19 Paul Brook <paul@nowt.org>
6305 * trans-array.c (g95_get_array_cons_size): New Function.
6306 (g95_con_ss_startstride): Handle Array constructors.
6307 (g95_conv_loop_setup): Ditto.
6308 (g95_conv_array_parameter): Ditto.
6309 * tras-decl.c (g95_finish_var_decl): Make initializes variables
6312 2002-09-19 Paul Brook <paul@nowt.org>
6314 * trans.c (g95_simple_fold_tmp): Detect variables inside
6316 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
6318 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
6320 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
6322 2002-09-14 Paul Brook <paul@nowt.org>
6324 * trans.c (g95_create_module_variable): Move to trans-decl.c.
6325 * trans-const.c (g95_conv_string_init): New Function.
6326 * trans-const.h: Declare it.
6327 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
6328 variables. Don't bail on intrinsic symbols.
6329 (get_extern_function_decl): Handle specific intrinsic functions.
6330 * trans-types.c (g95_sym_type): Dummy functions don't return
6332 * trans-array.c (g95_build_array_initializer): New Function.
6333 (g95_trans_auto_array_allocation): Build initializer for static decls.
6334 Don't use mpz_addmul, it's GMP4 only.
6336 2002-09-12 Paul Brook <paul@nowt.org>
6338 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
6339 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
6340 assembler names for module procedures.
6342 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
6344 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
6347 2002-09-10 Paul Brook <paul@nowt.org>
6349 * trans-array.c: Change format of G95_SS_TEMP strictures.
6350 (g95_check_fncall_dependancy): New function.
6351 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
6353 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
6355 (g95_build_function_decl): Don't assume result arrays are packed.
6356 (g95_trans-deferred-vars): Handle array result variables.
6357 (g95_generate_fuction_code): Clear saved_function_decls.
6358 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
6360 (g95_trans_arrayfunc_assign): New function.
6361 (g95_trans_assignment): Use it.
6362 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
6363 (g95_se): Add direct_byref.
6364 * trans-types.c: Use sym->result rather than sym where appropriate.
6365 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
6366 Update other functions to use this.
6367 (g95_is_intrinsic_libcall): New function.
6368 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
6369 (g95_walk_intrinsic_function): Ditto.
6371 2002-09-08 Paul Brook <paul@nowt.org>
6373 * trans-types.c: Change rank field to dtype field in array descriptor.
6374 * trans-array.c: Implement filling of dtype array descriptor field.
6375 * trans-intrinsic.c: Fix broken LEN intrinsic.
6377 2002-09-07 Paul Brook <paul@nowt.org>
6379 * trans-intrinsic.c: Remove outdated todo intrinsic list.
6380 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
6381 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
6383 2002-09-06 Paul Brook <paul@nowt.org>
6385 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
6386 (gt-f95-trans-types.h): Add dependancy information.
6387 * config-lang.in (gtfiles): Add trans-types.c
6388 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
6389 back to top-level code.
6390 * trans-array.c, trans-types.c: Change format of array descriptor.
6391 (g95_conv_descriptor_dimension): New function.
6392 * trans-types.h (g95_conv_descriptor_rank): define.
6393 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
6396 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6398 * trans-array.c, trans-types.c: Add rank information to descriptor.
6400 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
6402 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
6404 2002-09-04 Paul Brook <paul@nowt.org>
6406 * f95-lang.c (g95_create_decls): New function.
6407 (g95_init): Move initialization of external decls to above, and call
6408 from g95_be_parse_file.
6409 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
6410 * trans-types.c (g95_init_types): Always name integer and char types.
6411 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
6413 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6415 * Make-lang.in: Add options.c to F95_PARSER_OBJS
6417 2002-09-02 Paul Brook <paul@nowt.org>
6419 * g95_generate_code: Clear the attr for __fortran_main.
6420 * trans-types.c (g95_finish_type): New function.
6421 * g95_init_io_state_type: Use g95_finish_type.
6422 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
6424 2002-09-01 Paul Brook <paul@nowt.org>
6426 * README.backend: Warn about the dangers of extra config.h files.
6427 Remove obsolete libgfor stuff.
6428 * config-lang.in: Add target-libgfor dependancy.
6429 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
6431 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
6433 * g95_conv_mpz_to_tree: Free storage pointed to by q,
6436 2002-08-30 Paul Brook <paul@nowt.org>
6438 * trans-intrinsic.c (g95_conv_intrinsic_function,
6439 g95_walk_intrinsic_function): Added ANY and ALL.
6440 (g95_conv_intrinsic_anyall): New function.
6441 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in