1 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4 * resolve.c (resolve_actual_arglist): Issue an error if a statement
5 functions is used as actual argument.
7 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
10 * interface.c (compare_parameter): Ignore type for EXPR_NULL
11 only if type is BT_UNKNOWN.
13 2005-04-25 Paul Brook <paul@codesourcery.com>
14 Steven G. Kargl <kargls@comcast.net>
17 * check.c (gfc_check_ichar_iachar): New function.
18 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
19 * intrinsic.c (add_functions): Use it.
20 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
21 character expression lengths.
23 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
26 * trans-common.c (translate_common): Cast offset and
27 common_segment->offset to type int for warning message.
29 2005-04-23 DJ Delorie <dj@redhat.com>
31 * trans-decl.c: Adjust warning() callers.
33 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
35 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
36 intermediate representation. Fix typo in comment.
38 2005-04-21 Steven G. Kargl <kargls@comcast.net>
40 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
41 simplify logic; Add a gcc_assert.
43 2005-04-19 Steven G. Kargl <kargls@comcast.net>
45 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
47 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
48 Steven G. Kargl <kargls@comcast.net>
50 * invoke.texi: Update -Waliasing description
52 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
55 * resolve.c (resolve_variable): If e->symtree is not set, this
56 ought to be a FAILURE, and not a segfault.
58 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
65 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
66 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
67 declarations of old namelist functions.
68 (build_dt): Simplified call to transfer_namelist_element.
69 (nml_get_addr_expr): Generates address expression for start of
70 object data. New function.
71 (nml_full_name): Qualified name for derived type components. New
73 (transfer_namelist_element): Modified for calls to new functions
74 and improved derived type handling.
76 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
78 * scanner.c (gfc_next_char_literal): Reset truncation flag
79 for lines ending in a comment for both fixed and free form.
80 (load_line): Do not set truncated flag if only truncating
83 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
86 * gfortran.h (gfc_linebuf): Add truncated field.
87 * parse.c (next_statement): Handle warning for truncated
89 * scanner.c (load_line): Return if line was truncated.
90 No longer warn for truncated lines. Remove unused parameters.
91 (load_file): Store load_line return value to linebuf.
92 (gfc_error_recovery): Do not advance line at the end.
94 2005-04-14 Steven G. Kargl <kargls@comcast.net>
96 * gfortran.h (gfc_real_info): Add subnormal struct member.
97 * arith.c (gfc_arith_init_1): Set it.
98 (gfc_check_real_range): Use it.
99 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
101 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
103 * simplify.c: Fix a comment typo.
105 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
107 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
109 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
111 * simplify.c (gfc_simplify_nearest): Overhaul.
113 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
115 * interface.c: Fix a comment typo.
117 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
119 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
122 2005-04-09 Steven G. Kargl <kargls@comcast.net>
124 * simplify.c (gfc_simplify_anint): Use mpfr_round()
125 (gfc_simplify_dnint): ditto.
126 (gfc_simplify_nint): ditto.
128 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
131 * io.c (check_format): Allow an optional comma
134 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
136 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
137 comment according to GNU coding style.
138 (gfc_match_if): Remove gfc_ prefix in call to
141 2005-04-08 Diego Novillo <dnovillo@redhat.com>
143 * match.c (gfc_match_arithmetic_if): Declare static.
145 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
148 * match.c (gfc_match_arithmetic_if): New function to match an
149 arithmetic IF statement.
150 (gfc_match_if): Use gfc_match_arithmetic_if to match an
151 arithmetic IF statement embedded in a simple IF statement.
153 2005-04-07 Steven G. Kargl <kargls@comcast.net>
155 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
157 2005-04-06 Steven G. Kargl <kargls@comcast.net>
159 * invoke.texi: Remove documentation of -std=f90
161 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
163 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
164 non-pointer assignment.
166 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
171 * array.c (resolve_character_array_constructor): New function. Set
172 constant character array's character length.
173 (gfc_resolve_array_constructor): Use it.
174 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
176 (gfc_set_constant_character_len): New function. Set constant character
177 expression according the given length.
178 * match.h (gfc_set_constant_character_len): Add prototype.
180 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
182 * intrinsic.texi: BES?? functions are not in the f95 standard.
184 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
186 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
188 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
190 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
191 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
193 2005-04-02 Steven G. Kargl <kargls@comcast.net>
195 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
197 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
199 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
200 trans.h: Fix comment typos.
202 2005-03-29 Steven G. Kargl <kargls@comcast.net>
204 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
205 flag_default_integer, flag_default_real
206 * invoke.texi: Update documentation
207 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
208 fdefault-integer-8, and fdefault-real-8 definitions.
209 * options.c (gfc_init_options): Set option defaults
210 (gfc_handle_option): Handle command line options.
211 * trans-types.c (gfc_init_kinds): Use options.
213 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
215 * f95-lang.c (builtin_function): Process the attrs parameter
216 and apply the "const" attribute to the builtin if found.
218 2005-03-27 Steven G. Kargl <kargls@comcast.net>
220 * intrinsic.texi: Document AIMAG, AINT, ALL
222 2005-03-26 Steven G. Kargl <kargls@comcast.net>
224 * arith.c (check_result): Fix illogical logic.
226 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
228 * trans-common.c (create_common): Build RECORD_NODE for common blocks
229 contain no equivalence objects.
230 (add_equivalences): New argument saw_equiv.
231 (trans_common): New local variable saw_equiv.
232 (finish_equivalences): Add a local variable dummy, Always pass true
233 for the 3rd parameter to create_common.
235 2005-03-25 Steven G. Kargl <kargls@comcast.net>
237 * intrinsic.texi: Fix "make dvi"
239 2005-03-24 Steven G. Kargl <kargls@comcast.net>
241 * intrinsic.texi: New file.
242 * gfortran.texi: Include it; white space change; fix typo.
244 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
246 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
248 2005-03-23 Steven Bosscher <stevenb@suse.de>
250 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
251 * trans-array.c (gfc_trans_allocate_array_storage,
252 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
253 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
254 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
255 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
256 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
257 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
258 gfc_conv_expr_descriptor): Likewise.
259 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
260 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
261 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
262 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
263 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
264 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
265 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
266 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
267 gfc_conv_intrinsic_merge, prepare_arg_info,
268 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
269 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
270 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
271 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
272 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
273 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
275 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
276 * trans.c (gfc_add_modify_expr): Likewise.
278 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
280 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
281 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
282 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
283 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
284 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
285 gfc_check_perror): new functions to check newly implemented
287 * gfortran.h: adding symbols for new intrinsics.
288 * intrinsic.c (add_functions): adding new intrinsics.
289 (add_subroutines): adding new intrinsics.
290 * intrinsic.h: prototype for all checking and resolving
292 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
293 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
294 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
295 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
296 gfc_resolve_kill_sub, gfc_resolve_link_sub,
297 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
298 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
299 gfc_resolve_perror): new functions to resolve intrinsics.
300 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
303 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
305 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
306 in which the variable is declared.
309 * resolve.c (was_declared): Also check for dummy attribute.
311 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
313 * gfortran.h (arith): Remove ARITH_0TO0.
314 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
315 (gfc_arith_power): Remove special casing of zero to integral
318 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
320 * Make-lang.in (fortran-warn): Remove -Wno-error.
321 (expr.o-warn, resolve.o-warn, simplify.o-warn,
322 trans-common.o-warn): Specify -Wno-error.
324 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
326 * trans-array.c (gfc_trans_static_array_pointer,
327 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
328 comment and formatting typos.
330 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
332 * invoke.texi: Fix typos.
334 2005-03-15 Zack Weinberg <zack@codesourcery.com>
336 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
338 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
340 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
341 to zero on label_tree.
343 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
346 * io.c (resolve_tag): Add checking on assigned label.
347 (match_dt_format): Does not set symbol assign attribute.
348 * match.c (gfc_match_goto):Does not set symbol assign attribute.
349 * resolve.c (resolve_code): Add checking on assigned label.
350 * trans-common.c (build_field): Deals with common variable assigned
352 * trans-stmt.c (gfc_conv_label_variable): New function.
353 (gfc_trans_label_assign): Use it.
354 (gfc_trans_goto): Ditto.
355 * trans-io.c (set_string): Ditto.
356 * trans.h (gfc_conv_label_variable): Add prototype.
358 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
361 * symbol.c (check_conflict): A dummy argument can't be a statement
364 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
366 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
367 the argument of the shift to the unsigned type.
369 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
372 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
374 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
377 * resolve.c (gfc_resolve): Check if character lengths are
378 specification expressions.
380 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
383 * trans-array.c (gfc_stack_space_left): Remove unused variable.
384 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
386 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
387 Remove declaration / prototype.
388 * trans-common.c (build_equiv_decl): Give union a name. Check if
389 it can be put on the stack.
390 * trans-decl.c (gfc_stack_space_left): Move function here.
391 (gfc_build_qualified_array): Fix comment typo.
392 * trans.h (gfc_put_var_on_stack): Add prototype.
394 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
396 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
397 * decl.c, trans.c: Don't use C++ style comments.
398 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
399 ifsrc): Give names to enums and use ENUM_BITFIELD.
400 (gfc_access): Remove trailing comma.
402 2005-03-05 Steven G. Kargl <kargls@comcast.net>
405 * primary.c (match_complex_constant): Mangled complex constant may
406 be an implied do-loop. Give implied do-loop matcher a chance.
408 2005-03-05 Steven G. Kargl <kargls@comcast.net>
411 * resolve.c (compare_shapes): New function.
412 (resolve_operator): Use it.
414 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
416 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
417 type for COMPLEX constants.
419 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
422 * trans-expr.c (gfc_conv_function_call): Correctly dereference
423 argument from a pointer function also if it has a result clause.
425 2005-03-04 Steven G. Kargl <kargls@comcast.net>
427 * expr.c (gfc_copy_shape_excluding): Change && to ||.
429 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
431 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
434 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
438 * simplify.c (gfc_simplify_bound): Rename to ...
439 (simplify_bound): ... this and overhaul.
441 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
443 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
444 (gfc_conv_intrinsic_function): update function calls
446 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
449 * trans-types.c (gfc_max_integer_kind): Declare
450 (gfc_init_kinds): Initialize it.
451 * gfortran.h (gfc_max_integer_kind): extern it.
452 * primary.c (match_boz_constant): Use it; remove gfortran extension
453 of kind suffixes on BOZ literal constants
456 2005-02-27 Steven G. Kargl <kargls@comcast.net>
458 * arith.c (gfc_check_real_range): Remove multiple returns
459 (check_result): New function.
460 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
461 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
464 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
466 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
469 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
471 Unrevert previously reverted patch. Adding this fix:
472 * module.c (find_true_name): Deal with NULL module.
474 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
476 Revert yesterday's patch:
477 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
479 * gfortran.h (gfc_component, gfc_actual_arglist, ...
480 ... argument. Copy string instead of pointing to it.
482 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
484 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
485 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
487 * module.c (mio_namespace_ref, load_needed): Likewise.
488 * parse.c (parse_interface, parse_contained): Likewise. Here the
489 correct second argument matters.
490 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
491 parent's implicit types if this is set.
492 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
493 * trans-common.c (build_common_decl): Likewise.
495 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
497 * symbol.c (gfc_set_default_type): Issue error only once, by setting
498 and checking 'untyped' attribute.
500 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
501 fields into new struct 'op' inside the 'value' union.
502 * arith.c (eval_intrinsic): Adapt all users.
503 * dependency.c (gfc_check_dependency): Likewise.
504 * dump-parse-tree.c (gfc_show_expr): Likewise.
505 * expr.c (gfc_get_expr): Don't clear removed fields.
506 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
507 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
508 check_intrinsic_op): Adapt to new field names.
509 * interface.c (gfc_extend_expr): Likewise. Also explicitly
510 nullify 'esym' and 'isym' fields of new function call.
511 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
512 Adapt to renamed structure fields.
513 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
514 * module.c (mio_expr): Likewise.
515 * resolve.c (resolve_operator): Likewise.
516 (gfc_find_forall_index): Likewise. Only look through operands
517 if dealing with EXPR_OP
518 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
519 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
520 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
523 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
524 'name' a 'const char *'.
525 (gfc_symbol): Likewise, also for 'module'.
526 (gfc_symtree): Make 'name' a 'const char *'.
527 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
528 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
530 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
531 initialize 'SYM->module'.
532 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
533 pointer instead of empty string.
534 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
535 * interface.c (gfc_compare_types): Adapt check to account for possible
537 (compare_actual_formal): Check for NULL pointer instead of empty
539 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
540 Add 'const' qualifier.
541 (conv_name): Return a heap allocated string.
542 (find_conv): Add 'const' qualifier to 'target'.
543 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
544 (make_generic): Check for NULL pointer instead of empty string.
545 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
546 (add_conv): No need to strcpy result from 'conv_name'.
547 (sort_actual): Check for NULL pointer instead of empty string.
548 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
550 * module.c (compare_true_names): Compare pointers instead of strings
552 (find_true_name): Initialize string fields with gfc_get_string.
553 (mio_pool_string): New function.
554 (mio_internal_string): Adapt comment.
555 (mio_component_ref, mio_component, mio_actual_arg): Use
556 'mio_pool_string' instead of 'mio_internal_string'.
557 (mio_symbol_interface): Add 'const' qualifier to string arguments.
558 Add level of indirection. Use 'mio_pool_string' instead of
559 'mio_internal_string'.
560 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
561 (write_common, write_symbol): Use 'mio_pool_string' instead of
562 'mio_internal_string'.
563 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
564 instead of empty string.
565 (write_operator, write_generic): Pass correct type variable to
566 'mio_symbol_interface'.
567 (write_symtree): Use 'mio_pool_string' instead of
568 'mio_internal_string'.
569 * primary.c (match_keyword_arg): Adapt check to possible
570 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
571 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
572 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
574 (ambiguous_symbol): Check for NULL pointer instead of empty string.
575 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
577 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
578 pointer instead of empty string.
579 * trans-decl.c (gfc_sym_mangled_identifier,
580 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
581 gfc_get_symbol_decl): Likewise.
582 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
583 argument. Copy string instead of pointing to it.
585 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
587 * intrinsic.h, st.c: Update copyright.
589 2005-02-20 Steven G. Kargl <kargls@comcast.net>
591 * symbol.c: Typos in comments.
593 2005-02-20 Steven G. Kargl <kargls@comcast.net>
595 * expr.c (gfc_type_convert_binary): Typo in comment.
597 2005-02-19 Steven G. Kargl <kargls@comcast.net>
599 * check.c (gfc_check_selected_int_kind): New function.
600 * intrinsic.h: Prototype it.
601 * intrinsic.c (add_function): Use it.
602 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
603 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
605 2005-02-19 Steven G. Kargl <kargls@comcast.net>
607 * check.c (gfc_check_int): improve checking of optional kind
608 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
610 2005-02-19 Steven G. Kargl <kargls@comcast.net>
612 * check.c (gfc_check_achar): New function
613 * intrinsic.h: Prototype it.
614 * intrinsic.c (add_function): Use it.
616 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
618 * trans-stmt.c (generate_loop_for_temp_to_lhs,
619 generate_loop_for_rhs_to_temp): Remove if whose condition is
622 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
624 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
625 (gfc_use_derived): ... this function.
627 2005-02-09 Richard Henderson <rth@redhat.com>
629 * f95-lang.c (gfc_init_builtin_functions): Call
630 build_common_builtin_nodes; do not define any functions handled
633 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
635 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
637 (gfc_is_constant_expr): Check 'ref' to determine if substring
638 reference is constant.
639 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
640 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
642 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
644 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
646 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
647 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
648 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
649 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
650 gfc_add_procedure): Add argument.
651 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
652 gfc_match_null, match_type_spec, match_attr_spec,
653 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
654 Update callers to match.
655 (gfc_match_entry) : Likewise, fix comment typo.
656 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
657 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
658 gfc_match_derived_decl): Update callers.
659 * interface.c (gfc_match_interface): Likewise.
660 * match.c (gfc_match_label, gfc_add_flavor,
661 gfc_match_call, gfc_match_common, gfc_match_block_data,
662 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
664 * parse.c (parse_derived, parse_interface, parse_contained),
665 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
666 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
667 * symbol.c (check_conflict, check_used): Add new 'name' argument,
668 use when printing error message.
669 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
670 gfc_add_generic, gfc_add_in_common, gfc_add_data,
671 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
672 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
673 gfc_add_procedure): Add new 'name' argument. Pass along to
674 check_conflict and check_used.
675 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
676 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
677 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
678 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
679 argument in calls to any of the modified functions.
681 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
683 * gfortran.texi: Don't give last update date.
685 2006-01-30 Richard Henderson <rth@redhat.com>
687 * options.c (gfc_init_options): Zero flag_errno_math.
689 2005-01-29 Paul Brook <paul@codesourcery.com>
692 * check.c (real_or_complex_check): New function.
693 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
694 * intrinsic.c (add_functions): Use new check functions.
695 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
698 2005-01-29 Steven G. Kargl <kargls@comcast.net>
701 * expr.c (gfc_check_assign): Check for conformance of logical operands
703 2004-01-27 Steven Bosscher <stevenb@suse.de>
705 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
706 TREE_USED for all labels.
707 (gfc_trans_entry_master_switch): Use it instead of building a
709 * trans-io.c (add_case): Likewise.
710 * trans-stmt.c (gfc_trans_integer_select): Likewise.
712 2004-01-23 Paul Brook <paul@codesourcery.com>
713 Steven G. Kargl <kargls@comcast.net>
716 * arith.c (gfc_convert_real): Remove sign handling.
717 * primary.c (match_digits): Allow whitespace after initial sign.
718 (match_real_const): Handle signs here. Allow whitespace after
719 initial sign. Remove dead code.
720 (match_const_complex_part): Remove.
721 (match_complex_part): Use match_{real,integer}_const.
722 (match_complex_constant): Cross-promote integer types.
724 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
727 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
728 transpose_c8 for complex types.
730 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
732 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
733 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
734 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
735 Follow spelling conventions.
737 2005-01-22 Bud Davis <bdavis9659@comcast.net>
740 * trans-io.c (gfc_trans_inquire): Added code to support
743 2005-01-22 Steven G. Kargl <kargls@comcast.net>
745 * intrinsic.c (make_alias): Add standard argument.
746 (add_functions): Update make_alias calls.
748 2005-01-22 Paul Brook <paul@codesourcery.com>
750 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
752 2005-01-22 Paul Brook <paul@codesourcery.com>
754 * gfortran.h (gfc_check_access): Add prototype.
755 * match.c (gfc_match_namelist): Remove TODO.
756 * module.c (check_access): Rename ...
757 (gfc_check_access): ... to this. Boolify. Update callers.
758 * resolve.c (resolve_symbol): Check for private objects in public
761 2005-01-22 Paul Brook <paul@codesourcery.com>
763 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
764 does not have an explicit type.
765 (gfc_match_variable): Resolve implicit derived types in all cases.
766 Resolve contained function types from their own namespace, not the
768 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
769 checking. Resolve from the contained namespace, not the parent.
771 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
774 * trans-const.c (gfc_conv_constant_to_tree): Give logical
775 constants the correct type.
778 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
780 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
783 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
785 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
786 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
787 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
788 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
789 trans-io.c, trans-stmt.c, trans.c: Update copyright.
791 2005-01-17 Ira Rosen <irar@il.ibm.com>
793 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
795 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
798 * error.c (error_char): Line-buffer errors / warnings.
800 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
802 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
803 unsigned issue. Use build_int_cst instead of converting
804 integer_zero_node. Remove unnecessary conversion.
806 * trans-types.c (gfc_get_character_type_len): : Use
807 gfc_charlen_type_node as basic type for the range field.
809 * trans-intrinsic.c (build_fixbound_expr,
810 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
811 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
812 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
813 of converting 'integer_zero_node' or 'integer_one_node'
815 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
817 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
818 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
819 'build_int_cst' instead of converting 'integer_zero_node' or
820 'integer_one_node' respectively.
822 * trans-intrinsic.c (gfc_conv_intrinsic_index,
823 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
824 'gfc'-prefix from local variable, remove dead code, use correct
825 type when inserting argument.
827 * trans-intrinsic.c, trans-types.c: Update copyright years.
829 2005-01-16 Steven G. Kargl <kargls@comcast.net>
832 * resolve.c (check_case_overlap): Typo in comment.
833 (validate_case_label_expr): Fix up kinds of case values
834 (resolve_select): Properly handle kind mismatches.
836 2004-01-16 Paul Brook <paul@codesourcery.com>
839 * trans-common.c (translate_common): Remove duplicate function call.
840 (finish_equivalences): Preserve alignment when biasing offsets.
842 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
844 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
845 ASCII-like character encoding.
847 2005-01-14 Steven G. Kargl <kargls@comcast.net>
849 * resolve.c (compare_case): Cleanup.
851 2005-01-14 Steven G. Kargl <kargls@comcast.net>
853 * resolve.c (compare_case): Give arguments correct type.
855 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
857 * iresolve.c, trans-common.c, trans-types.c: Fix comment
860 2005-01-09 Paul Brook <paul@codesourcery.com>
863 * trans-common.c (current_common, current_offset): Remove.
864 (create_common): Add head argument.
865 (align_segment): New function.
866 (apply_segment_offset): New function.
867 (translate_common): Merge code from new_segment. Handle alignment.
868 (new_segment): Remove.
869 (finish_equivalences): Ensure proper alignment.
871 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
873 * trans-const.c: Don't include unused math.h.
875 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
876 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
877 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
879 (prepare_arg_info): Fix formatting, indenting and remove trailing
881 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
884 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
885 gfc_constant_result, gfc_range_check, gfc_arith_power,
886 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
887 gfc_real2complex, gfc_complex2int, gfc_complex2real,
888 gfc_complex2complex): Fix whitespace issues.
889 * check.c (must_be, type_check, numeric_check, int_or_real_check,
890 logical_array_check, array_check, scalar_check, nonoptional_check,
891 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
892 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
893 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
894 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
895 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
896 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
897 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
898 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
899 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
900 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
901 gfc_check_lbound, gfc_check_logical, min_max_args,
902 gfc_check_min_max_integer, gfc_check_min_max_real,
903 gfc_check_min_max_double, gfc_check_matmul,
904 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
905 gfc_check_pack, gfc_check_precision, gfc_check_radix,
906 gfc_check_range, gfc_check_real, gfc_check_repeat,
907 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
908 gfc_check_set_exponent): Fix formatting issues.
909 (gfc_check_size, gfc_check_sign): Alphabetize function order,
910 remove whitespace-only line.
911 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
912 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
913 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
914 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
915 gfc_check_random_number, gfc_check_random_seed,
916 gfc_check_second_sub, gfc_check_system_clock,
917 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
918 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
919 gfc_check_unlink_sub): Fix formatting issues.
921 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
923 * gfortran.h: Remove outdated comment. Don't include stdio.h
926 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
928 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
929 output of 'gfortran --version'.
931 2005-01-03 Steven G. Kargl <kargls@comcast.net>
933 * arith.c: Add system.h; remove string.h
939 * check.c: Remove stdlib.h and stdarg.h
940 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
941 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
942 * f95-lang.c: Add system.h; remove stdio.h
943 * interface.c: Add system.h; remove stdlib.h and string.h
944 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
945 * io.c: Remove string.h
947 * match.c: Remove stdarg.h and string.h
948 * misc.c: Update copyright; add system.h; remove stdlib.h,
949 string.h, and sys/stat.h
950 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
952 * option.c: Remove string.h and stdlib.h
954 * scanner.c: Update copyright; add system.h; remove stdlib.h,
955 stdio.h, string.h, and strings.h
956 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
957 * trans-array.c: Remove stdio.h and gmp.h
958 * trans-const.c: Ditto
959 * trans-expr.c: Ditto
961 * trans-stmt.c: Ditto
963 * trans-intrinsic.c: Remove stdio.h and string.h
965 2004-12-29 Steven G. Kargl <kargls@comcast.net>
967 * gfortran.h (gfc_case): fix typo in comment.
969 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
971 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
972 logical shift. Call fold. Remove 0-bit shift shortcut.
973 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
974 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
975 result if width(arg 1) < 4 bytes. Call fold.
978 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
979 in front of function to match the standard. Correct handling
982 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
984 * trans-expr.c (gfc_conv_cst_int_power): Only check for
985 flag_unsafe_math_optimizations if we have a float type.
987 2004-12-23 Steven G. Kargl <kargls@comcast.net>
989 * gfortran.texi: Fix typo.
991 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
993 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
996 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
999 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
1000 (gfc_match_nullify): Make sure that ')' is in front of the end of
1003 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
1006 2004-12-14 Richard Henderson <rth@redhat.com>
1008 * gfortran.h (gfc_expr.function.name): Make const.
1009 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1010 (gfc_get_string): Update prototype.
1011 * iresolve.c: Include tree.h.
1012 (string_node, HASH_SIZE, string_head, hash): Remove.
1013 (gfc_get_string): Use vsnprintf, get_identifier.
1014 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1015 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
1016 (gfc_done_1): Don't call gfc_iresolve_done_1.
1017 * module.c (mio_allocated_string): Take and return const char *,
1018 instead of modifying char**.
1019 (mio_expr): Update to match.
1020 * resolve.c (pure_function): Constify name argument.
1021 (resolve_function): Constify name.
1022 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
1024 2004-12-12 Richard Henderson <rth@redhat.com>
1026 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
1027 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
1028 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
1029 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
1030 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
1031 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
1032 gfc_resolve_unpack: Use PREFIX.
1034 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1037 * match.c (gfc_match_common): Skip whitespace.
1039 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1042 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
1043 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
1044 integer kind check; Issue error for -std=f95 when needed.
1045 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
1047 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
1048 Promote arguments to same kind.
1050 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1051 Paul Brook <paul@codesourcery.com>
1054 * resolve.c (gfc_resolve_iterator_expr): New function.
1055 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
1056 start, end and stride to correct type.
1057 (resolve_code): Pass extra argument.
1058 * array.c (resolve_array_list): Pass extra argument.
1059 * gfortran.h (gfc_resolve): Add prototype.
1060 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
1061 Handle real type iterators.
1063 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1066 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
1067 same kind as C's 'int'.
1068 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
1070 2004-12-08 Richard Henderson <rth@redhat.com>
1072 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
1073 to the output expression.
1074 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
1076 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
1079 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1082 * resolve.c (resolve_code): Impose correct restrictions on
1085 * decl.c (gfc_match_end): Use locus of END when eos is an error.
1087 2004-12-02 Steven G. Kargl <kargls@comcast.net>
1088 Paul Brook <paul@codesourcery.com>
1090 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
1091 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
1092 (gfc_check_stat, gfc_check_stat_sub): New functions.
1093 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
1094 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
1095 fstat, and stat to intrinsics symbol tables.
1096 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
1097 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
1098 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
1099 (gfc_resolve_stat, gfc_resolve_flush): New functions.
1100 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
1101 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
1103 2004-12-02 Steven G. Kargl <kargls@comcast.net>
1105 * intrinsic.c: Fix and add comments, fix function declarations
1106 (OPTIONAL,REQUIRED): New symbols
1107 (add_functions,add_subroutines): Use symbols
1108 (gmp.h): Remove unused include
1110 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
1112 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
1115 2004-11-24 Steven Bosscher <stevenb@suse.de>
1117 * options.c (gfc_post_options): Don't clear flag_inline_functions.
1119 2004-11-20 Steven G. Kargl <kargls@comcast.net>
1121 * check.c (gfc_check_getcwd_sub): Fix seg fault.
1123 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
1124 gfc_check_unlink,gfc_check_unlink_sub): New functions
1125 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
1126 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
1127 exit to intrinsics symbol tables.
1128 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
1129 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
1130 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
1131 gfc_resolve_unlink_sub): Add and sort prototypes.
1132 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
1133 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
1134 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
1136 2004-11-16 Paul Brook <paul@codesourcery.com>
1139 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
1140 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
1141 * trans-types.c (gfc_get_dtype): Accept array type rather than element
1143 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
1144 (gfc_get_array_type_bounds): Ditto.
1145 (gfc_get_derived_type): Recurse into derived type pointers.
1146 * trans-types.h (gfc_get_dtype): Add prototype.
1147 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
1149 2004-11-15 Paul Brook <paul@codesourcery.com>
1151 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
1153 2004-11-10 Paul Brook <paul@codesourcery.com>
1156 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
1157 * trans-io.c (transfer_array_component): Ditto.
1159 2004-11-10 Paul Brook <paul@codesourcery.com>
1161 * invoke.texi: Fix typo.
1163 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
1165 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
1166 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
1167 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
1168 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
1169 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
1171 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1174 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
1176 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
1178 * gfortranspec.c: Replace GNU CC with GCC.
1180 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1182 * gfortranspec.c (lang_specific_driver): Change year to 2004.
1184 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1187 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
1190 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1193 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
1194 module procedures as if they were module variables.
1196 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1201 * module.c (write_symbol1): Set module_name for dummy arguments.
1203 2004-11-02 Paul Brook <paul@codesourcery.com>
1205 * intrinsic.c (check_intrinsic_standard): Include error locus.
1207 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
1208 locus to check_intrinsic_standard.
1210 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
1213 * gfortran.h: Change GFC_STD_* flags to more appropriate
1214 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
1215 gfc_option_t): Add field for warning about use of nonstandard
1217 * intrinsic.c (add_sym): Add parameter for standard version, check
1218 this against current standard.
1219 (add_sym_0): Pass standard parameter to add_sym.
1220 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
1221 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
1222 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
1223 (make_generic): Add parameter for standard, check this
1224 against currently selected standard.
1225 (add_functions, add_subroutines): Add parameter to tell which
1226 standard an intrinsic belongs to.
1227 (check_intrinsic_standard): New function.
1228 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
1229 (gfc_intrinsic_sub_interface): Ditto.
1230 * lang.opt: Add Wnonstd-intrinsics option.
1231 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
1233 (set_Wall): Add warning about nonstd intrinsics.
1234 (gfc_handle_option): Change to use new GFC_STD_* flags,
1236 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
1238 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
1240 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
1242 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1244 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
1246 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1248 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
1251 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
1253 * check.c (gfc_check_rand): Allow missing optional argument.
1254 (gfc_check_irand): Ditto.
1255 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
1257 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
1259 PR fortran/13490, PR fortran/17912
1260 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
1261 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
1262 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
1263 warning when compiling with pedantic.
1264 * gcc/fortran/arith.c: Set minimum integer values to reflect
1265 realities of two's complement signed integers. Added
1268 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
1270 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
1271 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
1274 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1276 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
1278 (gfc_generate_function_code): Fix formatting issue.
1280 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1282 * module.c: Fix formatting issues.
1284 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1286 * module.c (mio_interface_rest): Set where member of interface
1289 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
1292 * options.c (gfc_handle_option): Add break after handing the
1295 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
1297 * arith.c: Fix formatting issues.
1299 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1302 * resolve.c (resolve_operator): Use correct operator name in message.
1304 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1306 * primary.c (match_boz_constant): Allow kind parameter suffixes.
1307 Move standard warning further to the front.
1309 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
1311 * trans-stmt.c: Fix a comment typo.
1313 2004-10-07 Paul Brook <paul@codesourcery.com>
1316 * trans-array.c (gfc_trans_deferred_array): Leave use associated
1319 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1322 * simplify.c (twos_complement): New function.
1323 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
1325 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
1327 2004-10-06 Paul Brook <paul@codesourcery.com>
1329 * trans-stmt.c (gfc_trans_simple_do): New function.
1330 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
1331 loop. Update comments.
1333 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1336 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
1340 * intrinsic.c (add_sym_5): Remove.
1341 (add_subroutines): Add resolution function for MVBITS.
1342 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
1344 * iresolve.c (gfc_resolve_mvbits): New function.
1345 (gfc_resolve_random_number): Remove empty line at end of function.
1347 * trans-const.c (gfc_build_cstring_const): New function.
1348 (gfc_init_cst): Use new function.
1349 * trans-const.h (gfc_build_cstring_const): Add prototype.
1350 * trans-io.c (set_string, set_error_locus): Use new function.
1351 * trans-stmt.c (gfc_trans_goto): Use new function.
1354 * parse.c (accept_statement): Don't treat END DO like END IF and
1356 (parse_do_block): Generate possible END DO label inside END DO
1360 * check.c (gfc_check_system_sub): New function.
1361 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
1362 * intrinsic.c (add_functions): Add 'system'.
1363 (add_subroutines): Add 'system'.
1364 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
1365 Move prototypes to other suborutines.
1366 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
1368 (gfc_resolve_system_clock): Fix formatting of prototype.
1369 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
1371 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
1374 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
1376 * scanner.c (preprocessor_line): Accept preprocessor lines without
1377 file names. Check file names for closing quotes. Handle escaped
1378 quotes in file names.
1380 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1381 Paul Brook <paul@codesourcery.com>
1383 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
1384 Use gfc_get_expr_charlen.
1385 * trans-expr.c (gfc_get_expr_charlen): New function.
1386 * trans.h (gfc_get_expr_charlen): Add prototype.
1388 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
1390 * trans-intrinsic.c: Fix a comment typo.
1392 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1394 * simplify.c (range_check): Remove blank line at beginning of function.
1395 (gfc_simplify_dint): Same at end of function.
1396 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
1397 (gfc_simplify_bound): Fix indentation.
1398 (gfc_simplify_log10): Simplify calculation.
1399 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
1401 (gfc_simplify_nearest): Same at end of function.
1402 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
1404 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
1405 gfc_simplify_spacing): Simplify calulations.
1407 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
1409 * trans-intrinsic.c: Fix comments on spacing and rrspacing
1410 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
1412 2004-10-01 Jan Hubicka <jh@suse.cz>
1414 * f95-lang.c (gfc_expand_function): Update call of
1415 tree_rest_of_compilation.
1416 * trans-decl.c (gfc_generate_constructors): Likewise.
1418 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1420 * trans-intrinsic.c: Comment fixes.
1422 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1424 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
1426 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1428 * trans-types.c (gfc_return_by_reference): Remove superfluous
1431 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
1432 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
1435 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
1436 function to determine return type.
1438 2004-09-20 Jan Hubicka <jh@suse.cz>
1440 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
1442 (gfc_generate_function_code): Likewise.
1444 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1447 * simplify.c (gfc_simplify_reshape): Set shape of return value
1450 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1451 Zack Weinberg <zack@codesourcery.com>
1453 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
1454 enumeration constants.
1456 2004-09-17 Paul Brook <paul@codesourcery.com>
1458 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
1459 (gfc_linebuf_header_size): Define.
1460 * scanner.c (load_file): Use it.
1462 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1464 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
1465 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
1466 resolve.c, scanner.c, trans-array.c, trans-array.h,
1467 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
1468 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1469 trans.h: Fix comment typos. Follow spelling conventions.
1471 2004-09-16 Victor Leikehman <lei@il.ibm.com>
1474 * trans-io.c (transfer_array_component): New function.
1475 (transfer_expr): For array fields, call transfer_array_component.
1477 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1479 * gfortran.texi: Fix a typo.
1481 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1483 * parse.c (eof_buf): Rename eof to eof_buf.
1484 (unexpected_eof): Same.
1485 (gfc_parse_file): Same.
1487 2004-09-15 Steven G. Kargl <kargls@comcast.net>
1489 * check.c (gfc_check_getcwd_sub): New function.
1490 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
1491 * intrinsic.c (add_functions): Add function definition;
1493 * intrinsic.c (add_subroutines): Add subroutine definitions.
1494 * intrinsic.h: Add prototypes.
1495 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
1497 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
1499 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1502 * module.c (write_symbol): Don't fill in module name here.
1503 (write_symbol0): Fill in here instead.
1505 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
1507 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
1508 trans-array.c, trans-common.c, trans-expr.c,
1509 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
1510 comment typos. Follow spelling conventions.
1512 2004-09-09 Paul Brook <paul@codesourcery.com>
1514 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
1516 2004-09-08 Paul Brook <paul@codesourcery.com>
1518 * array.c: Don't include assert.h.
1519 * data.c: Don't include assert.h. Replace assert and abort with
1520 gcc_assert and gcc_unreachable.
1521 * dependency.c: Ditto.
1522 * f95-lang.c: Ditto.
1523 * iresolve.c: Ditto.
1525 * simplify.c: Ditto.
1527 * trans-array.c: Ditto.
1528 * trans-common.c: Ditto.
1529 * trans-const.c: Ditto.
1530 * trans-decl.c: Ditto.
1531 * trans-expr.c: Ditto.
1532 * trans-intrinsic.c: Ditto.
1533 * trans-io.c: Ditto.
1534 * trans-stmt.c: Ditto.
1535 * trans-types.c: Ditto.
1538 2004-09-07 Per Bothner <per@bothner.com>
1539 Paul Brook <paul@codesourcery.com>
1541 * error.c (show_locus): Handle mapped locations.
1542 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
1543 * gfortran.h: Include input.h.
1544 (struct gfc_linebuf): Use source_location.
1545 * scanner.c (get_file): Initialize linemap.
1546 (preprocessor_line): Pass extra argument to get_file.
1547 (load_file): Ditto. Setup linemap.
1548 (gfc_new_file): Handle mapped locations.
1549 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
1550 Set decl source locations.
1551 (gfc_trans_common): Set blank common block location.
1552 * trans-decl.c (gfc_set_decl_location): New function.
1553 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
1554 (trans_function_start): Move call to gfc_set_backend_locus..
1555 (build_function_decl): ... to here.
1556 (build_entry_thunks): Set and restore the backend locus.
1557 (gfc_generate_constructors): Remove excess arguments to
1558 init_function_start.
1559 (gfc_generate_block_data): Add comments. Set the decl locus.
1560 * trans-io.c (set_error_locus): Handle mapped locations.
1561 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
1562 (gfc_trans_code): Use SET_EXPR_LOCATION.
1563 (gfc_generate_code): Override the location of the new symbol.
1564 * trans.h (gfc_set_decl_location): Add prototype.
1566 2004-08-31 Paul Brook <paul@codesourcery.com>
1568 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
1570 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1573 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
1576 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1581 * resolve.c (resolve_transfer): New function.
1582 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
1584 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1587 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
1590 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1592 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
1594 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1597 * trans-types.c (gfc_return_by_reference): Remove TODO error,
1598 add comment pointing out possible issue WRT compatibility with g77.
1600 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1602 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
1603 all occurences of 'gfc_strlen_type_node' by
1604 'gfc_charlen_type_node'.
1605 * trans-types.h: Same. Also update comment accordingly.
1607 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1609 * primary.c: Update copyright boilerplate to say GCC.
1610 * f95-lang.c: Change initial comment to say gfortran.
1612 2004-08-31 Paul Brook <paul@codesourcery.com>
1614 * trans-types.h: Add comments.
1615 (intmax_type_node, string_type_node, const_string_type_node): Remove.
1617 2004-08-30 Richard Henderson <rth@redhat.com>
1619 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
1620 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
1621 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
1622 c_long, c_long_long.
1623 (gfc_logical_info): Add c_bool.
1624 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
1625 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
1626 rather than gfc_int[48]_type_node for allocate choice.
1627 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
1628 local copies of some kind type nodes.
1629 (gfc_build_builtin_function_decls): Likewise.
1630 * trans-expr.c (gfc_conv_power_op): Likewise.
1631 * trans-intrinsic.c (gfc_conv_intrinsic_index,
1632 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
1633 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
1634 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
1635 gfc_trans_character_select, gfc_trans_allocate): Likewise.
1636 * trans-io.c (gfc_pint4_type_node): Move into ...
1637 (gfc_build_io_library_fndecls): ... here. Cache local copies of
1638 some kind type nodes.
1639 * trans-types.c (gfc_type_nodes): Remove.
1640 (gfc_character1_type_node, gfc_strlen_type_node): New.
1641 (gfc_integer_types, gfc_logical_types): New.
1642 (gfc_real_types, gfc_complex_types): New.
1643 (gfc_init_kinds): Fill in real mode_precision.
1644 (gfc_build_int_type, gfc_build_real_type): New.
1645 (gfc_build_complex_type, gfc_build_logical_type): New.
1646 (c_size_t_size): New.
1647 (gfc_init_types): Loop over kinds.
1648 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
1649 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
1650 (gfc_get_character_type_len): Likewise.
1651 (gfc_type_for_size): Loop over kinds; use a reduced set of
1652 unsigned type nodes.
1653 (gfc_type_for_mode): Loop over kinds.
1654 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
1655 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
1656 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
1657 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
1658 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
1659 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
1660 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
1661 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
1662 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
1663 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
1664 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
1665 gfc_complex8_type_node, gfc_complex16_type_node,
1666 gfc_logical1_type_node, gfc_logical2_type_node,
1667 gfc_logical4_type_node, gfc_logical8_type_node,
1668 gfc_logical16_type_node, gfc_strlen_kind): Remove.
1669 (gfc_character1_type_node): Turn in to a variable.
1670 (gfc_strlen_type_node): Likewise.
1672 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1674 * gfortran.h (gfc_namespace): Add new field is_block_data.
1675 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
1676 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
1677 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
1678 * trans.h (gfc_generate_block_data): Add prototype.
1679 * trans-decl.c (gfc_generate_block_data): New function.
1681 2004-08-29 Richard Henderson <rth@redhat.com>
1683 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
1684 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
1685 than two HOST_WIDE_INT.
1687 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1690 * decl.c (free_variable, free_value, gfc_free_data, var_list,
1691 var_element, top_var_list, match_data_constant, top_val_list,
1692 gfc_match_data): Move here from match.c.
1693 (match_old_style_init): New function.
1694 (variable_decl): Match old-style initialization.
1695 * expr.c (gfc_get_variable_expr): New function.
1696 * gfortran.h (gfc_get_variable_expr): Add prototype.
1697 * gfortran.texi: Start documentation for supported extensions.
1698 * match.c: Remove the functions moved to decl.c.
1699 * match.h (gfc_match_data): Move prototype to under decl.c.
1700 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
1703 2004-08-29 Steven G. Kargl <kargls@comcast.net>
1704 Paul Brook <paul@codesourcery.com>
1706 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
1707 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
1708 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1709 (build_builtin_fntypes): New function.
1710 (gfc_init_builtin_functions): Use it.
1711 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
1712 and GFC_ISYM_ERF{,C}.
1713 (gfc_c_int_kind): Declare.
1714 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
1715 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
1716 gfc_resolve_g77_math1): Add prototypes.
1717 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
1718 * mathbuiltins.def: Add comment. Change third argument. Use
1719 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
1720 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
1721 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1722 * trans-types.c (gfc_c_int_kind): Declare.
1723 (gfc_init_kinds): Set it.
1725 2004-08-29 Steven G. Kargl <kargls@comcast.net>
1726 Paul Brook <paul@codesourcery.com>
1728 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
1729 (gfc_check_f, gfc_simplify_f): Add f0.
1730 * intrinsic.c (do_check): Call f0. Flatten.
1731 (add_sym_0): Fix prototype. Set f0.
1732 (add_functions): Add getgid, getgid and getuid.
1733 (resolve_intrinsic): Remove obsolete comment.
1734 (do_simplify): Call f0.
1735 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
1736 gfc_resolve_getuid): Add prototypes.
1737 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
1738 gfc_resolve_getuid): New functions.
1739 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
1742 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1744 * error.c (gfc_error_init_1): Remove blank line in front of
1745 function body. Add missing blank.
1746 (gfc_buffer_error, error_char, error_string): Remove blank line in
1747 front of function body.
1748 (show_locus): Add comma in comment.
1749 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
1750 gfc_push_error, gfc_pop_error): Remove blank line in front of
1752 (gfc_get_errors): Typo fix in comment in front of function. Remove
1753 blank line in front of function body.
1755 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1757 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
1758 variable declaration of same name.
1759 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
1760 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
1761 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
1762 Replace all calls to gfc_default_*_kind with variable accesses.
1763 * trans-types.c: Same as above.
1764 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
1765 static qualifier. Replace all occurences.
1766 (gfc_default_*_kind): Remove functions.
1768 2004-08-26 Richard Henderson <rth@redhat.com>
1770 * arith.c: Include system.h, not real system headers.
1771 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
1772 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
1773 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
1774 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
1775 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
1776 gfc_index_integer_kind, gfc_default_integer_kind,
1777 gfc_default_real_kind,gfc_default_double_kind,
1778 gfc_default_character_kind, gfc_default_logical_kind,
1779 gfc_default_complex_kind, validate_integer, validate_real,
1780 validate_logical, validate_character,
1781 gfc_validate_kind): Move to trans-types.c.
1782 (gfc_set_model_kind): Use gfc_validate_kind.
1783 (gfc_set_model): Just copy the current precision to default.
1784 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
1785 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
1786 * gfortran.h: Update file commentary.
1787 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
1788 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
1789 gfc_default_double_kind_1, gfc_default_character_kind_1,
1790 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
1791 (gfc_init_kinds): New.
1792 (gfc_init_types): Don't set gfc_index_integer_kind here.
1793 * trans-types.h (gfc_init_kinds): Declare.
1794 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
1796 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1798 * check.c (gfc_check_atan2): New function.
1799 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
1800 * intrinsic.h (gfc_check_atan2): Add prototype.
1802 2004-08-25 Richard Henderson <rth@redhat.com>
1804 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
1805 false and we don't validate the kind.
1806 (gfc_check_integer_range, gfc_check_real_range): Update to match.
1807 * check.c (kind_check): Likewise.
1808 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
1809 (match_char_spec, match_logical_spec): Likewise.
1810 * gfortran.h (gfc_validate_kind): Likewise.
1811 * options.c (gfc_handle_option): Likewise.
1812 * primary.c (match_integer_constant, match_real_constant,
1813 match_string_constant, match_logical_constant,
1814 match_const_complex_part): Likewise.
1815 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
1816 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
1817 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
1818 gfc_simplify_maxexponent, gfc_simplify_minexponent,
1819 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
1820 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
1821 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
1822 gfc_simplify_tiny): Likewise.
1823 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
1824 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1825 prepare_arg_info): Likewise.
1827 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1829 * expr.c (gfc_check_assign): Add comment. Add new warning.
1830 * trans-expr.c (gfc_conv_function_call): Correctly dereference
1831 result of pointer valued function when not in pointer assignment.
1833 2004-08-25 Paul Brook <paul@codesourcery.com>
1835 * config-lang.in: Remove dead commented line.
1836 * module.c: Replace g95 with gfortran in comment.
1838 2004-08-25 Paul Brook <paul@codesourcery.com>
1841 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
1843 2004-08-25 Paul Brook <paul@codesourcery.com>
1846 * trans-array.c (gfc_trans_allocate_temp_array): Remove
1847 string_length argument.
1848 (gfc_trans_array_ctor_element): New function.
1849 (gfc_trans_array_constructor_subarray): Use it.
1850 (gfc_trans_array_constructor_value): Ditto. Handle constant
1852 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
1853 (gfc_trans_array_constructor): Use them.
1854 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
1855 (gfc_conv_ss_descriptor): Remember section string length.
1856 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
1857 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
1858 (gfc_conv_expr_descriptor): Ditto.
1859 (gfc_conv_loop_setup): Ditto. Spelling fixes.
1860 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
1861 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
1862 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
1863 (gfc_conv_variable): Set string_length from section.
1864 (gfc_conv_function_call): Remove extra argument.
1865 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
1866 * trans-types.c (gfc_get_character_type_len): New function.
1867 (gfc_get_character_type): Use it.
1868 (gfc_get_dtype): Return zero for internal types.
1869 * trans-types.h (gfc_get_character_type_len): Add prototype.
1870 * trans.h (struct gfc_ss): Move string_length out of union.
1872 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1874 * trans.h (build2_v, build3_v): New macros.
1876 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
1878 * trans-array.c (gfc_conv_descriptor_data,
1879 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
1880 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
1881 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
1882 gfc_trans_allocate_temp_array,
1883 gfc_trans_array_constructor_subarray,
1884 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
1885 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
1886 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
1887 gfc_conv_array_ref, gfc_trans_preloop_setup,
1888 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
1889 gfc_conv_loop_setup, gfc_array_init_size,
1890 gfc_conv_array_initializer, gfc_trans_array_bounds,
1891 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1892 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
1893 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
1894 of build and build_v as appropriate.
1895 * trans-common.c (create_common): Same.
1896 * trans-decl.c (gfc_trans_auto_character_variable,
1897 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
1898 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
1899 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
1900 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
1901 gfc_conv_expr_op, gfc_conv_function_call,
1902 gfc_trans_structure_assign): Same.
1903 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
1904 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
1905 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1906 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
1907 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
1908 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
1909 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
1910 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
1911 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
1912 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
1913 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
1914 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
1915 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
1916 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
1917 gfc_conv_intrinsic_iargc): Same.
1918 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
1919 set_flag, add_case, io_result, transfer_namelist_element,
1920 transfer_expr): Same.
1921 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
1922 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
1923 gfc_trans_integer_select, gfc_trans_logical_select,
1924 gfc_trans_character_select, gfc_trans_forall_loop,
1925 gfc_trans_nested_forall_loop, gfc_do_allocate,
1926 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
1927 compute_inner_temp_size, compute_overall_iter_number,
1928 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
1929 gfc_trans_forall_1, gfc_evaluate_where_mask,
1930 gfc_trans_where_assign, gfc_trans_allocate): Same.
1931 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
1932 * trans.c (gfc_add_modify_expr, gfc_finish_block,
1933 gfc_build_array_ref, gfc_build_function_call,
1934 gfc_trans_runtime_check): Same.
1936 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1938 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
1939 build_int_cst to build_int_cst_wide in accordance to Nathan's
1942 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
1944 * trans-array.c (gfc_trans_array_constructor_value): Adjust
1945 build_int_cst calls.
1946 * trans-const.c (gfc_build_string_const, gfc_init_constants,
1947 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
1948 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
1949 gfc_trans_entry_master_switch): Likewise.
1950 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
1951 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
1952 * trans-io.c (add_case, set_error_locus,
1953 transfer_namelist_element, transfer_expr): Likewise.
1954 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
1955 gfc_trans_stop, gfc_trans_character_select): Likewise.
1956 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
1957 * trans.c (gfc_trans_runtime_check): Likewise.
1959 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1961 * trans-decl.c, trans-types.c: Add and remove blank lines as
1964 2004-08-24 Richard Henderson <rth@redhat.com>
1966 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
1968 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1970 * resolve.c (merge_argument_lists): Revert unintentionally
1973 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1975 * trans-decl.c (build_function_decl): Fix spelling in comment.
1976 (build_entry_thunks): Remove code with no function.
1977 (gfc_build_intrinsic_function_decls): Remove empty line.
1979 * resolve.c (resolve_entries): Fix a bunch of comment typos.
1981 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1983 * f95-lang.c (gfc_init_decl_processing): Adjust
1984 build_common_tree_nodes call.
1986 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1988 * trans-types.c: Spelling and formatting fixes.
1990 2004-08-23 Richard Henderson <rth@redhat.com>
1992 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
1993 of going through an intermediate string. Fix 32/64 int/long bug.
1995 2004-08-23 Eric Christopher <echristo@redhat.com>
1997 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
1998 usage. Use build_vector_type_for_mode for vector types.
2000 2004-08-22 Richard Henderson <rth@redhat.com>
2003 * data.c (find_con_by_offset): Search ordered list; handle
2004 elements with repeat counts.
2005 (gfc_assign_data_value_range): New.
2006 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
2007 (gfc_assign_data_value_range): Declare.
2008 * match.c (top_val_list): Extract repeat count into a temporary.
2009 * resolve.c (values): Make left unsigned.
2010 (next_data_value): Don't decrement left.
2011 (check_data_variable): Use gfc_assign_data_value_range.
2013 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2015 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
2017 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2019 * check.c (gfc_check_reduction): Rename to ...
2020 (check_reduction): ... this. Make static. Don't check type of
2022 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
2023 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
2024 SUM to use new check functions.
2025 (check_specific): Change logic to call new functions.
2026 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
2028 (gfc_check_reduction): Remove prototype.
2030 2004-08-20 Paul Brook <paul@codesourcery.com>
2031 Canqun Yang <canqun@nudt.edu.cn>
2034 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
2035 for automatic arrays.
2036 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
2038 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2042 * match.c (match_simple_forall, match_simple_where): Forward-declare.
2043 (gfc_match_if): Order statement list alphabetically, add WHERE and
2044 FORALL, remove double PAUSE.
2045 (gfc_match_simple_where, match_forall_header,
2046 gfc_match_simple_forall): New functions.
2047 (gfc_match_forall): Use match_forall_header.
2049 2004-08-19 Paul Brook <paul@codesourcery.com>
2052 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
2053 * symbol.c (gfc_clear_attr): Use memset.
2055 2004-08-19 Paul Brook <paul@codesourcery.com>
2059 * data.c (assign_substring_data_value): Remove.
2060 (create_character_intializer): New function.
2061 (gfc_assign_data_value): Track the typespec for the current
2062 subobject. Use create_character_intializer.
2064 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
2067 * check.c (gfc_check_reduction): New function.
2068 (gfc_check_minval_maxval): Removed.
2069 (gfc_check_product): Removed.
2070 (gfc_check_sum): Removed.
2071 * intrinsic.h: Add/remove declarations for these.
2072 * gfortran.h: Add field f3red to union gfc_check_f.
2073 * intrinsic.c (add_sym_3red): New function.
2074 (add_functions): Register maxval, minval, product, and sum intrinsics
2075 through add_sym_3red.
2076 (check_specific): Handle f3red union field.
2077 * iresolve.c: Whitespace change.
2079 2004-08-18 Paul Brook <paul@codesourcery.com>
2081 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
2083 2004-08-18 Victor Leikehman <lei@il.ibm.com>
2086 * trans-io.c (transfer_namelist_element): New. Recursively handle
2087 derived-type variables. Pass string lengths.
2088 (build_dt): Code moved to build_namelist, with some
2089 changes and additions.
2090 (gfc_build_io_library_fndecls): Declare the fifth
2091 argument in st_set_nml_var_char -- string_length.
2093 2004-08-17 Paul Brook <paul@codesourcery.com>
2094 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2097 * decl.c (get_proc_name): Update mystery comment.
2098 (gfc_match_entry): Check for errors earlier. Add entry point to list.
2099 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
2100 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
2101 (struct gfc_entry_list): Define.
2102 (gfc_get_entry_list): Define.
2103 (struct gfc_namespace): Add refs and entries.
2104 (enum gfc_exec_op): Add EXEC_ENTRY.
2105 (struct gfc_code): Add ext.entry.
2106 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
2107 (mio_symbol_attribute): Don't save/reture addr->entry.
2108 (mio_namespace_ref): Refcount namespaces.
2109 * parse.c (accept_statement): Handle ST_ENTRY.
2110 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
2111 (parse_contained): Fixup sibling references to entry points
2112 after parsing the procedure body.
2113 * resolve.c (resolve_contained_fntype): New function.
2114 (merge_argument_lists, resolve_entries): New functions.
2115 (resolve_contained_functions): Use them.
2116 (resolve_code): Handle EXEC_ENTRY.
2117 (gfc_resolve): Call resolve_entries.
2118 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
2119 * symbol.c (gfc_get_namespace): Refcount namespaces.
2120 (gfc_free_namespace): Ditto.
2121 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
2122 optional when multiple entry points are present.
2123 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
2124 (gfc_get_extern_function_decl): Add assertion. Fix coment.
2125 (create_function_arglist, trans_function_start, build_entry_thunks):
2127 (gfc_build_function_decl): Rename ...
2128 (build_function_decl): ... to this.
2129 (gfc_create_function_decl): New function.
2130 (gfc_generate_contained_functions): Use it.
2131 (gfc_trans_entry_master_switch): New function.
2132 (gfc_generate_function_code): Use new functions.
2133 * trans-stmt.c (gfc_trans_entry): New function.
2134 * trans-stmt.h (gfc_trans_entry): Add prototype.
2135 * trans-types.c (gfc_get_function_type): Add entry point argument.
2136 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
2137 (gfc_generate_module_code): Call gfc_create_function_decl.
2138 * trans.h (gfc_build_function_decl): Remove.
2139 (gfc_create_function_decl): Add prototype.
2141 2004-08-15 Andrew Pinski <apinski@apple.com>
2144 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
2145 for cabs{,f} and copysign{,f}.
2146 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
2147 (gfor_fndecl_math_cabs): Delete.
2148 (gfor_fndecl_math_sign4): Delete.
2149 (gfor_fndecl_math_sign8): Delete.
2150 (gfc_build_intrinsic_function_decls): Remove the
2151 initializing of cabs{,f} and copysign{,f} functions.
2152 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
2153 instead of the functions definitions.
2154 (gfc_conv_intrinsic_sign): Likewise.
2155 * trans.h (gfor_fndecl_math_cabsf): Delete.
2156 (gfor_fndecl_math_cabs): Delete.
2157 (gfor_fndecl_math_sign4): Delete.
2158 (gfor_fndecl_math_sign8): Delete.
2160 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
2162 * trans-array.c (gfc_trans_array_constructor_value): Use
2164 * trans-const.c (gfc_build_string_const,
2165 gfc_init_constants, gfc_conv_mpz_to_tree,
2166 gfc_conv_constant_to_tree): Likewise.
2167 * trans-decl.c (gfc_get_symbol_decl): Likewise.
2168 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2169 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2170 * trans-io.c (add_case, set_error_locus, build_dt,
2171 transfer_expr): Likewise.
2172 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2173 gfc_trans_stop, gfc_trans_character_select): Likewise.
2174 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2175 * trans.c (gfc_trans_runtime_check): Likewise.
2177 2004-08-14 Paul Brook <paul@codesourcery.com>
2179 * trans-decl.c (gfc_build_function_decl): Remove dead code.
2181 2004-08-14 Paul Brook <paul@codesourcery.com>
2183 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
2185 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2187 * gfortran.h: Add comments.
2188 * parse.c (parse_contained): Fix comment typo.
2189 * resolve.c (was_declared): Ditto.
2192 2004-08-11 Paul Brook <paul@codeourcery.com>
2195 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
2197 2004-08-10 Richard Henderson <rth@redhat.com>
2199 * f95-lang.c (gfc_init_builtin_functions): Remove
2200 __builtin_stack_alloc, add __builtin_alloca.
2201 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
2202 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
2204 2004-08-10 Paul Brook <paul@codesourcery.com>
2206 * trans-io.c (transfer_expr): Handle pointters.
2208 2004-08-10 Paul Brook <paul@codesourcery.com>
2211 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
2212 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
2213 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
2214 Handle GFC_SS_COMPONENT.
2215 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
2216 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
2218 (gfc_conv_array_initializer): Call specific initializer routines.
2219 * trans-expr.c (gfc_trans_structure_assign): New function.
2220 (gfc_trans_subarray_assign): New function.
2221 (gfc_trans_subcomponent_assign): New fucntion
2222 (gfc_conv_structure): Use them.
2223 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
2224 (gfc_ss): Add shape.
2226 2004-08-08 Victor Leikehman <lei@il.ibm.com>
2228 * simplify.c (gfc_simplify_shape): Bugfix.
2229 * expr.c (gfc_copy_shape_excluding): New function.
2230 * gfortran.h (gfc_get_shape): Bugfix.
2231 (gfc_copy_shape_excluding): Added declaration.
2232 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2233 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
2234 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
2235 time resolution of shape.
2237 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
2239 * intrinsic.c (add_subroutines): Add getenv and
2240 get_environment_variable. (add_sym_5s): New function.
2241 * intrinsic.h (gfc_resolve_get_environment_variable): Add
2243 * iresolve.c (gfc_resolve_get_environment_variable): New
2246 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
2248 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
2249 __builtin_pow[f] arguments.
2251 2004-08-06 Steven G. Kargl <kargls@comcast.net>
2253 * arith.c: Add #define for model numbers. Remove global GMP variables.
2254 (natural_logarithm,common_logarithm,exponential,sine,
2255 cosine,arctangent,hypercos,hypersine ): Remove.
2256 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
2257 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
2258 gfc_check_real_range, gfc_constant_result, gfc_range_check,
2259 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
2260 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
2261 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
2262 gfc_convert_complex,gfc_int2real,gfc_int2complex,
2263 gfc_real2int,gfc_real2real,gfc_real2complex,
2264 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
2265 to MPFR, use new functions.
2266 * arith.h: Remove extern global variables.
2267 (natural_logarithm,common_logarithm,exponential, sine, cosine,
2268 arctangent,hypercos,hypersine): Remove prototypes.
2269 (arctangent2): Update prototype from GMP to MPFR.
2270 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
2271 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
2272 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
2273 * gfortran.h (GFC_REAL_BITS): Remove.
2274 (arith): Add ARITH_NAN.
2275 Include mpfr.h. Define GFC_RND_MODE.
2276 Rename GCC_GFORTRAN_H GFC_GFC_H.
2277 (gfc_expr): Convert GMP to MPFR.
2278 * module.c: Add arith.h, correct type in comment.
2279 (mio_gmp_real): Convert GMP to MPFR.
2280 (mio_expr): Use gfc_set_model_kind().
2281 * primary.c: Update copyright date with 2004.
2282 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
2283 * simplify.c: Remove global GMP variables
2284 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
2285 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
2286 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
2287 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
2288 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
2289 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
2290 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
2291 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
2292 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
2293 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
2294 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
2295 gfc_simplify_rrspacing,gfc_simplify_scale,
2296 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
2297 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
2298 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
2299 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
2301 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
2302 gfc_conv_mpf_to_tree. Convert it to use MPFR
2303 (gfc_conv_constant_to_tree): Use it.
2304 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
2305 * trans-intrinsic.c: Add arith.h, remove gmp.h
2306 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
2308 2004-08-06 Victor Leikehman <lei@il.ibm.com>
2309 Paul Brook <paul@codesourcery.com>
2311 * trans-array.c (gfc_trans_allocate_array_storage,
2312 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
2313 gfc_conv_loop_setup): For functions, if the shape of the result
2314 is not known in compile-time, generate an empty array descriptor for
2315 the result and let the callee to allocate the memory.
2316 (gfc_trans_dummy_array_bias): Do nothing for pointers.
2317 (gfc_conv_expr_descriptor): Use function return values directly.
2318 * trans-expr.c (gfc_conv_function_call): Always add byref call
2320 (gfc_trans_pointer_assignment): Add comments.
2321 (gfc_trans_arrayfunc_assign): Don't chain on expression.
2323 2004-08-01 Roger Sayle <roger@eyesopen.com>
2325 * options.c (gfc_init_options): Don't warn about the use GNU
2326 extensions by default.
2327 (gfc_post_options): Warn about GNU extensions with -pedantic.
2328 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
2330 2004-07-30 Richard Henderson <rth@redhat.com>
2332 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
2335 2004-07-25 Richard Henderson <rth@redhat.com>
2337 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
2338 and DECL_IGNORED_P on RESULT_DECL.
2339 (gfc_generate_constructors): Likewise.
2341 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2344 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
2346 (ffixed-line-length-80, ffixed-line-length-132): Remove.
2347 * options.c (gfc_handle_options): Deal with changed options.
2348 * scanner.c (load_line): Change second arg to 'char **',
2349 allocate if pointing to NULL. Keep track of buffer's length.
2350 Adapt buffer size to overlong lines. Pad lines to full length
2352 (load_file): Adapt to new interface of load_line.
2354 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2356 * trans.h (builtin_function): Declare.
2358 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2361 (parts ported from g95)
2362 * parse.h (gfc_state_data): New field do_variable.
2363 (gfc_check_do_variable): Add prototype.
2364 * parse.c (push_state): Initialize field 'do_variable'.
2365 (gfc_check_do_variable): New function.
2366 (parse_do_block): Remember do iterator variable.
2367 (parse_file): Initialize field 'do_variable'.
2368 * match.c (gfc_match_assignment, gfc_match_do,
2369 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
2370 Add previously missing checks.
2371 (gfc_match_return): Reformat error message.
2372 * io.c (match_out_tag): New function.
2373 (match_open_element, match_close_element,
2374 match_file_element, match_dt_element): Call match_out_tag
2375 instead of match_vtag where appropriate.
2376 (match_io_iterator, match_io_element): Add missing check.
2377 (match_io): Reformat error message.
2378 (match_inquire_element): Call match_out_tag where appropriate.
2380 * parse.c (gfc_check_do_variable): Fix error locus.
2382 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2385 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
2386 for every assumed length character dummy argument.
2389 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
2392 * simplify.c (gfc_simplify_bound): Copy the bound expression.
2394 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2397 * trans-array.c gfc_trans_g77_array,
2398 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
2399 for assumed length characters.
2400 (gfc_conv_expr_descriptor): Set se->string_length if dealing
2401 with a character expression.
2402 (gfc_cvonv_array_parameter): Pass string length when passing
2403 character array according to g77 conventions.
2405 2004-07-12 Paul Brook <paul@codesourcery.com>
2407 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
2408 * trans-array.c (gfc_trans_auto_array_allocation): Remove
2409 initialization code.
2410 * trans-common.c (create_common): Use gfc_conv_initializer.
2411 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
2412 * trans-expr.c (gfc_conv_initializer): New function.
2413 (gfc_conv_structure): Use it.
2414 * trans.h (gfc_conv_initializer): Add prototype.
2416 2004-07-11 Paul Brook <paul@codesourcery.com>
2419 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
2421 (parse_contained): Mark contained symbols as referenced.
2423 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2426 * module.c (gfc_dump_module, gfc_use_module): Print locus
2427 when opening of module file fails.
2430 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
2433 * match.c (gfc_match_program): A program name is obligatory.
2434 (gfc_match_return): RETURN in main program is an extension.
2435 (gfc_match_block_data): A space is required before a block data
2439 * primary.c (match_boz_constant): Call gfc_notify_std only if
2440 we actually have a non-standard boz-literal-constant.
2443 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
2444 warning if assigning NULL().
2446 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
2448 * f95-lang.c (set_block): Remove.
2449 (gfc_clear_binding_stack): New.
2450 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
2451 (struct binding_level): Remove block_created_by_back_end.
2452 (clear_binding_level): Likewise.
2453 (poplevel): Don't handle block_created_by_back_end.
2455 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2457 * trans-decl.c (gfc_create_module_variable): Nothing to do if
2458 symbol is in common, because we ...
2459 (gfc_generate_module_vars): Call gfc_trans_common.
2461 2004-07-10 Paul Brook <paul@codesourcery.com>
2463 * trans-array.c (gfc_build_null_descriptor): New function.
2464 (gfc_trans_static_array_pointer): Use it.
2465 * trans-array.h (gfc_build_null_descriptor): Add prototype.
2466 * trans-expr.c (gfc_conv_structure): Handle array pointers.
2468 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2471 * decl.c (gfc_match_save): Use-associated common block
2473 * gfortran.h (gfc_common_head): Add new field 'name'.
2474 Fix typo in comment after #endif.
2475 * match.c (gfc_get_common): Add new argument from_common,
2476 mangle name if flag is set, fill in new field in structure
2478 (match_common): Set new arg in call to gfc_get_common,
2479 use-associated common block doesn't collide.
2480 * match.h (gfc_get_common): Adapt prototype.
2481 * module.c (load_commons): Set new arg in call to
2483 * symbol.c (free_common_tree): New function.
2484 (gfc_free_namespace): Call new function.
2485 * trans-common.c (several functions): Remove argument
2486 'name', use name from gfc_common_head instead.
2488 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2490 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
2491 and RHS match. Return early if the RHS is NULL().
2494 * match.c (match_common): Fix error reporting for used common.
2497 * trans-expr.c (gfc_conv_structure): Handle initialization
2498 of scalar pointer components.
2500 * parse.c (decode_statement): Fix matching of BLOCK DATA.
2502 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
2503 by fix for PR 15481.
2505 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2507 * trans-common.c: Fix whitespace issues, make variable names
2509 (create_common): Additionally, make loop logic more obvious.
2511 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2512 Paul Brook <paul@codesourcery.com>
2515 * trans-common.c (calculate_length): Remove ...
2516 (get_segment_info): Merge into here. Save field type.
2517 (build_field): Use saved type.
2518 (create_common, new_condition, new_segment, finish_equivalences):
2519 Use new get_segment_info.
2520 * trans-types.c: Update comment.
2522 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2525 * moduele.c (mio_symbol): Don't I/O initial values unless
2526 symbol is a parameter.
2528 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2531 * resolve.c (resolve_symbol): Verify that the shape of a
2532 parameter array is not only explicit, but also constant.
2533 * array.c (gfc_is_compile_time_shape): New function.
2534 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
2536 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2542 * module.c (write_symbol, write_symtree): Remove workaround.
2543 * primary.c (match_actual_arglist): Enhance comment.
2544 (gfc_match_rvalue): Handle function call with first argument
2545 a keyword argument correctly.
2546 * resolve.c (resolve_symbol): Change call to
2547 gfc_set_default_type to issue error if no implicit type
2549 * trans-decl.c (gfc_create_module_variable): Remove workaround.
2551 2004-07-08 Paul Brook <paul@codesourcery.com>
2553 * intrinsic.c (add_sym_4s): New function.
2554 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
2556 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
2557 Paul Brook <paul@codesourcery.com>
2561 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
2562 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
2563 * intrinsic.c (add_functions): Identify iargc. Add
2564 command_argument_count.
2565 (add_subroutines): Resolve getarg. Add get_command and
2566 get_command_argument.
2567 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
2568 gfc_resolve_get_command_argument): Add prototypes.
2569 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
2570 gfc_resolve_get_command_argument): New functions.
2571 * trans-decl.c (gfor_fndecl_iargc): New variable.
2572 (gfc_build_intrinsic_function_decls): Set it.
2573 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
2574 (gfc_conv_intrinsic_function): Use it.
2575 * trans.h (gfor_fndecl_iargc): Declare.
2577 2004-07-04 Matthias Klose <doko@debian.org>
2579 * Make-lang.in: Generate and install gfortran man page.
2580 * invoke.texi: Remove extra '@c man end'.
2582 2004-07-04 Richard Henderson <rth@redhat.com>
2584 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
2586 2004-07-04 Paul Brook <paul@codesourcery.com>
2588 * decl.c (gfc_match_implicit_range): Don't use typespec.
2589 (gfc_match_implicit): Handle character selectors.
2590 * gfortran.h (gfc_set_implicit): Remove prototype.
2591 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
2592 * parse.c (accept_statement): Don't call gfc_set_implicit.
2593 * symbol.c (new_ts): Remove.
2594 (gfc_set_implicit_none): Use same loop bounds as other functions.
2595 (gfc_set_implicit): Remove.
2596 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
2597 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
2599 2004-06-30 Richard Henderson <rth@redhat.com>
2601 * match.c (var_element): Remove unused variable.
2603 * trans-decl.c (gfc_generate_function_code): Don't set
2604 x_whole_function_mode_p.
2605 (gfc_generate_constructors): Likewise.
2607 2004-06-30 Richard Henderson <rth@redhat.com>
2609 * trans-decl.c (gfc_generate_function_code): Don't set
2610 immediate_size_expand.
2611 (gfc_generate_constructors): Likewise.
2613 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2616 * decl.c (gfc_match_type_spec): Rename second argument to
2617 'implicit_flag', reverse meaning. Don't match_char_spec if
2618 'implicit_flag' is set. Rename to ...
2619 (match_type_spec): ... this.
2620 (gfc_match_implicit_none, match_implicit_range): Move here
2622 (gfc_match_implicit): Move here from match.c, try to
2623 match_char_len if match_implicit_range doesn't succeed for
2624 CHARACTER implicits. Call renamed fucntion match_type_spec.
2625 (gfc_match_data_decl, match_prefix): Call renamed function
2627 * match.c (gfc_match_implicit_none, match_implicit_range,
2628 gfc_match_implicit): Move to decl.c.
2629 * match.h (gfc_match_implicit_none, gfc_match_implicit):
2630 Move protoypes to section 'decl.c'.
2631 (gfc_match_type_spec): Remove prototype.
2633 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2635 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
2638 2004-06-29 Steven Bosscher <stevenb@suse.de>
2640 Make sure types in assignments are compatible. Mostly mechanical.
2641 * trans-const.h (gfc_index_one_node): New define.
2642 * trans-array.c (gfc_trans_allocate_array_storage,
2643 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
2644 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
2645 gfc_conv_array_ubound, gfc_conv_array_ref,
2646 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
2647 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
2648 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
2649 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
2650 types in assignments, conversions and conditionals for expressions.
2651 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
2652 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
2653 gfc_conv_function_call, gfc_trans_pointer_assignment,
2654 gfc_trans_scalar_assign): Likewise.
2655 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
2656 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
2657 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
2658 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
2659 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
2660 gfc_conv_allocated, gfc_conv_associated,
2661 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
2662 * trans-io.c (set_string): Likewise.
2663 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
2664 gfc_do_allocate, generate_loop_for_temp_to_lhs,
2665 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
2666 compute_overall_iter_number, gfc_trans_assign_need_temp,
2667 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
2668 gfc_evaluate_where_mask, gfc_trans_where_assign,
2669 gfc_trans_where_2): Likewise.
2670 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
2671 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
2673 * trans.c (gfc_add_modify_expr): Add sanity check that types
2674 for the lhs and rhs are the same for scalar assignments.
2676 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2678 * dump-parse-tree.c (show_common): New function.
2679 (gfc_show_namespace): Show commons.
2681 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2682 Andrew Vaught <andyv@firstinter.net>
2686 * decl.c (gfc_match_save): Adapt to new common structures,
2687 don't allow saving USE-associated common.
2688 * dump-parse-tree (gfc_show_attr): (saved_)common are not
2689 symbol attributes any longer.
2690 (gfc_show_symbol): Don't show old-style commons any longer.
2691 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
2693 * gfortran.h (symbol_attribute): Remove common and saved_common
2695 (gfc_symbol): Remove common_head element.
2696 (gfc_common_head): New struct.
2697 (gfc_get_common_head): New macro.
2698 (gfc_symtree): Add field 'common' to union.
2699 (gfc_namespace): Add field 'common_root'; change type of field
2700 'blank_common' to blank_common.
2701 (gfc_add_data): New prototype.
2702 (gfc_traverse_symtree): Expect a symtree as first argument
2703 instead of namespace.
2704 * match.c (gfc_get_common): New function.
2705 (match_common_name): Change to take char * as argument, adapt,
2706 fix bug with empty name.
2707 (gfc_match_common): Adapt to new data structures. Disallow
2708 redeclaration of USE-associated COMMON-block. Fix bug with
2710 (var_element): Adapt to new common structures.
2711 * match.h (gfc_get_common): Declare.
2712 * module.c: Add 2004 to copyright years, add commons to module
2713 file layout description.
2714 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
2715 for removed attributes.
2716 (mio_symbol): Adapt to new way of storing common relations.
2717 (load_commons): New function.
2718 (read_module): Skip common list on first pass, load_commons at
2720 (write_commons): New function.
2721 (write_module): Call write_commons().
2722 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
2723 functions related to removed attributes.
2724 (gfc_add_data): New function.
2725 (gfc_clear_attr): Don't set removed attributes.
2726 (gfc_copy_attr): Don't copy removed attributes.
2727 (traverse_symtree): Remove.
2728 (gfc_traverse_symtree): Don't traverse symbol
2729 tree of the passed namespace, but require a symtree to be passed
2730 instead. Unify with traverse_symtree.
2731 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
2733 (save_symbol): Remove setting of removed attribute.
2734 * trans-common.c (gfc_sym_mangled_common_id): Change to
2735 take 'char *' argument instead of 'gfc_symbol'.
2736 (build_common_decl, new_segment, translate_common): Adapt to new
2737 data structures, add new
2739 (create_common): Adapt to new data structures, add new
2740 argument name. Fix typo in intialization of derived types.
2741 (finish_equivalences): Add second argument in call to
2743 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
2744 (gfc_trans_common): Adapt to new data structures.
2745 * trans-decl.c (gfc_create_module_variables): Remove test for
2748 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2750 * io.c: Add 2004 to copyright years.
2752 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2753 Andrew Vaught <andyv@firstinter.net>
2755 * gfortran.h (gfc_gsymbol): New typedef.
2756 (gfc_gsym_root): New variable.
2757 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
2758 * parse.c (global_used): New function.
2759 (parse_block_data): Check for double empty BLOCK DATA,
2760 use global symbol table.
2761 (parse_module): Use global symbol table.
2762 (add_global_procedure, add_global_program): New functions.
2763 (gfc_parse_file): Use global symbol table.
2764 * symbol.c (gfc_gsym_root): New variable.
2765 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
2768 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2770 * module.c (mio_gmp_real): Correct writing of negative numbers.
2772 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2775 * expr.c (check_intrinsic_op): Allow comparison of characters.
2778 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2779 Andrew Vaught <andyv@firstinter.net>
2781 * decl.c (contained_procedure): New function.
2782 (match_end): Verify correctness of END STATEMENT in
2785 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2786 Andrew Vaught <andyv@firstinter.net>
2789 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
2790 (decode_statement): Enforce required space in free-form.
2792 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2794 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
2795 * trans-array.c (gfc_conv_descriptor_data): Add operand
2797 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
2798 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
2799 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
2800 * trans-common.c (create_common): Likewise.
2801 * trans-expr.c (gfc_conv_component_ref): Likewise.
2802 * trans-io.c (set_parameter_value): Likewise.
2803 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
2804 (transfer_expr): Likewise.
2805 * trans-decl.c (gfc_trans_auto_character_variable):
2806 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
2807 (gfc_gimplify_function): New function.
2808 (gfc_generate_function-code): Properly handle nested functions.
2809 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
2811 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
2814 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
2815 (gfc_resolve_inquire): Resolve the iolength tag. Return
2816 SUCCESS at end of function if no failure has occured.
2817 * resolve.c (resolve_code): Resolve if iolength is encountered.
2818 * trans-io.c: (ioparm_iolength, iocall_iolength,
2819 iocall_iolength_done): New variables.
2820 (last_dt): Add IOLENGTH.
2821 (gfc_build_io_library_fndecls ): Set iolength related variables.
2822 (gfc_trans_iolength): Implement.
2823 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
2825 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
2828 * scanner.c (load_line): Don't truncate preprocessor lines.
2829 Reformat error message.
2830 (preprocessor_line): Issue warning in case of malformed
2833 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2835 * resolve.c (resolve_symbol): Add comment in function body.
2836 (check_data_variable): Change type of mark to ar_type, adapt code
2839 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2841 * array.c (gfc_insert_constructor): Avoid redundant call to
2842 mpz_comp. Add 2004 to copyright years.
2844 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
2846 * trans.h (stmtblock_t): Change has_scope to unsigned int.
2848 2004-06-20 Steven G. Kargl <kargls@comcast.net>
2850 * arith.c (gfc_range_check): correct complex underflow.
2852 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2855 * match.c (match_case_selector): Call gfc_match_init_expr
2856 instead of gfc_match_expr.
2857 * resolve.c (validate_case_label_expr): No need to check for
2858 constant, since it wouldn't have been matched with the fix to
2861 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2864 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
2867 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2870 * trans-deecl.c (generate_local_decl): Do not issue warning for
2871 unused variables if they're use associated.
2873 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2874 Andrew Vaught <andyv@firstinter.net>
2877 * gfortran.h (gfc_check_f): Add new field f3ml.
2878 * check.c (gfc_check_minloc_maxloc): Take argument list instead
2879 of individual arguments, reorder if necessary.
2880 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
2881 * intrinsic.c (add_sym_3ml): New function.
2882 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
2883 (check_specific): Catch special case MINLOC, MAXLOC.
2885 2004-06-14 Paul Brook <paul@codesourcery.com>
2887 * intrinsic.c (add_sym_2s): Use correct function types.
2889 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2891 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
2892 * data.c (gfc_get_section_index): Remove dependency on trans.h.
2894 2004-06-12 Steven G. Kargl <kargls@comcast.net>
2896 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
2897 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
2898 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
2899 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
2900 * trans-intrinsic.c: Use symbols.
2901 * intrinsic.c (add_sym_2s): New function.
2902 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
2903 * intrinsic.h: Function prototypes.
2904 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
2905 gfc_resolve_srand): New functions.
2907 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2910 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
2911 contained procedure.
2913 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2916 * interface.c (compare_parameter, compare_actual_formal): Don't
2917 check types and array shapes for NULL()
2918 * trans-expr.c (conv_function_call): No double indirection for
2921 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
2923 * trans-expr.c (gfc_conv_cst_int_power): Compute
2924 x**(-n) by converting it to (1/x)**n instead of
2927 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2930 * module.c (write_symbol, write_symtree): Don't write symbols
2931 wrongly added to namespace.
2932 * trans-decl.c (gfc_create_module_variable): Don't create a
2933 backend decl for a symbol incorrectly added to namespace.
2935 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2938 * resolve.c (resolve_symbol): Verify that parameter array has an
2939 explicit shape. Fix typos and coding style issues in surrounding
2942 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2945 * gfortran.texi: The documentation doesn't contain infomration on
2946 how to report bugs, and shouldn't, so remove the line which
2949 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2951 * intrinsic.c (sort_actual): Keep track of type of missing
2952 arguments. (Missing from previous commit.)
2954 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2956 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
2957 * interface.c (compare_actual_formal): Keep type of omitted
2959 * trans-expr.c (gfc_conv_function_call): Add string length
2960 argument for omitted string argument.
2962 2004-06-03 Paul Brook <paul@codesourcery.com>
2964 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
2965 lists instead of compound expr chains.
2966 (gfc_trans_code): Annotate statement lists.
2968 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2970 * trans-array.c: Fix spelling in comments.
2972 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2975 * data.c (assign_substring_data_value): New function.
2976 (gfc_assign_data_value): Call the new function if we're dealing
2977 with a substring LHS.
2979 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2982 * gfortran.h (GFC_VERSION): Remove.
2983 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
2986 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2988 * trans-types.c: Fix spelling & layout in comments.
2990 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2993 * trans-const.c (gfc_conv_string_init): Allow variable string
2994 length lower than initialization string length.
2996 2004-05-30 Paul Brook <paul@codesourcery.com>
2999 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
3000 * trans-expr.c (gfc_trans_string_copy): New function.
3001 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
3003 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
3004 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
3005 * trans.h (struct gfc_saved_var): Define.
3006 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
3008 2004-05-30 Steven G. Kargl <kargls@comcast.net>
3010 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
3012 2004-05-29 Steven G. Kargl <kargls@comcast.net>
3014 * simplify.c (gfc_simplify_log): Remove useless line of code.
3016 2004-05-29 Paul Brook <paul@codesourcery.com>
3018 * trans-common.c (find_equivalence): Find multiple rules.
3020 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3022 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
3023 (gfc_current_locus): Declare new global variable.
3024 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
3025 (gfc_current_locus1): Rename ...
3026 (gfc_current_locus): ... to this.
3027 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
3028 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
3029 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
3030 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
3031 and gfc_current_locus(), respectively.
3032 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
3033 match_array_cons_element, gfc_match_array_constructor):
3034 Read/modify gfc_current_locus instead of calling gfc_set_locus()
3035 and gfc_current_locus().
3036 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
3037 match_attr_spec, gfc_match_function_decl, gfc_match_end,
3038 attr_decl1, gfc_match_save): Likewise.
3039 * error.c (error_print, gfc_internal_error): Likewise.
3040 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
3041 * interface.c (gfc_add_interface): Likewise.
3042 * io.c (gfc_match_format, match_dt_format, match_dt_element,
3043 match_io_iterator, match_io): Likewise.
3044 * match.c (gfc_match_space, gfc_match_eos,
3045 gfc_match_small_literal_int, gfc_match_st_label,
3046 gfc_match_strings, gfc_match_name, gfc_match_iterator,
3047 gfc_match_char, gfc_match, gfc_match_assignment,
3048 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
3049 gfc_match_nullify, gfc_match_call, match_implicit_range,
3050 gfc_match_implicit, gfc_match_data, match_case_selector,
3051 gfc_match_case, match_forall_iterator): Likewise.
3052 * matchexp.c (gfc_match_defined_op_name, next_operator,
3053 match_level_1, match_mult_operand, match_ext_mult_operand,
3054 match_add_operand, match_ext_add_operand, match_level_2,
3055 match_level_3, match_level_4, match_and_operand, match_or_operand,
3056 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
3057 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
3058 * parse.c (match_word, decode_statement, next_free, next_fixed,
3059 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
3061 * primary.c (match_digits, match_integer_constant,
3062 match_boz_constant, match_real_constant, match_substring,
3063 next_string_char, match_charkind_name, match_string_constant,
3064 match_logical_constant, match_const_complex_part,
3065 match_complex_constant, match_actual_arg, match_keyword_arg,
3066 gfc_match_actual_arglist, gfc_match_structure_constructor,
3067 gfc_match_rvalue, gfc_match_variable): Likewise.
3068 * st.c (gfc_get_code): Likewise.
3069 * symbol.c (check_conflict, check_used, check_done,
3070 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
3071 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
3072 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
3074 2004-05-26 Roger Sayle <roger@eyesopen.com>
3076 * io.c (format_asterisk): Silence compiler warnings by correcting
3077 the number of elements of a "locus" initializer.
3079 2004-05-25 Roger Sayle <roger@eyesopen.com>
3082 * matchexp.c: Allow unary operators after arithmetic operators
3084 (match_ext_mult_operand, match_ext_add_operand): New functions.
3085 (match_mult_operand): Tweak to call match_ext_mult_operand.
3086 (match_add_operand): Tweak to call match_ext_mult_operand.
3087 (match_level_2): Rearrange to call match_ext_add_operand.
3089 2004-05-25 Paul Brook <paul@codesourcery.com>
3091 * expr.c (check_inquiry): Remove bogus tests.
3093 2004-05-23 Paul Brook <paul@codesourcery.com>
3096 * expr.c (restricted_args): Remove redundant checks/argument.
3097 (external_spec_function): Update to match.
3098 (restricted_intrinsic): Rewrite.
3100 2004-05-23 Paul Brook <paul@codesourcery.com>
3101 Victor Leikehman <lei@haifasphere.co.il>
3103 * gfortran.h (struct gfc_symbol): Add equiv_built.
3104 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
3106 (current_length): Remove.
3107 (add_segments): New function.
3108 (build_equiv_decl): Create initialized common blocks.
3109 (build_common_decl): Always add decl to bindings.
3110 (create_common): Create initializers.
3111 (find_segment_info): Reformat to match coding conventions.
3112 (new_condition): Use add_segments.
3113 (add_condition, find_equivalence, add_equivalences): Move iteration
3114 inside functions. Only process each segment once.
3115 (new_segment, finish_equivalences, translate_common): Simplify.
3117 2004-05-23 Steven G. Kargl <kargls@comcast.net>
3119 * check.c (gfc_check_random_seed): Issue for too many arguments.
3121 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3123 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
3125 2004-05-22 Paul Brook <paul@codesourcery.com>
3127 * dump-parse-tree.c (gfc_show_equiv): New function.
3128 (gfc_show_namespace): Use it.
3130 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
3133 * symbol.c (gfc_add_common): Disable checks to work around other more
3134 fundamental inadequacies.
3136 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3138 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
3140 (gfc_build_function_decl): Likewise.
3142 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3144 * check.c (gfc_check_system_clock): New function.
3145 * intrinsic.c (add_sym_3s): New function.
3146 (add_subroutines): Use it.
3147 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
3149 * iresolve.c (gfc_resolve_system_clock): New function.
3151 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3153 * invoke.texi: Document -Wunderflow and spell check.
3154 * lang.opt: Add Wunderflow.
3155 * gfortran.h (gfc_option_t): Add warn_underflow option.
3156 * options.c (gfc_init_options, set_Wall): Use it.
3157 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
3158 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
3159 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
3160 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
3161 * arith.c (common_logarithm): Fix typo in comment.
3163 2004-05-21 Roger Sayle <roger@eyesopen.com>
3165 * io.c (check_format): As a GNU extension, allow the comma after a
3166 string literal to be optional in a format. Use gfc_notify_std to
3167 issue an error/warning as appropriate.
3169 2004-05-21 Roger Sayle <roger@eyesopen.com>
3171 * io.c (check_format): Use gfc_notify_std to determine whether to
3172 issue an error/warning for omitting the digits from the X format.
3174 2004-05-20 Roger Sayle <roger@eyesopen.com>
3176 * io.c (check_format): Allow the number before the X format to
3177 be optional when not -pedantic.
3179 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
3180 Paul Brook <paul@codesourcery.com>
3182 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
3183 Create decls for __builtin_pow{,f}.
3184 * gfortran.h (PREFIX_LEN): Define.
3185 * trans-decl.c (gfor_fndecl_math_powi): Add.
3186 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3187 (gfc_build_intrinsic_function_decls): Create decls for powi.
3188 * trans-expr.c (powi_table): Add.
3189 (gfc_conv_integer_power): Remove.
3190 (gfc_conv_powi): New function.
3191 (gfc_conv_cst_int_power): New function.
3192 (gfc_conv_power_op): Use new powi routines.
3193 * trans.h (struct gfc_powdecl_list): Add.
3194 (gfor_fndecl_math_powi): Add.
3195 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3197 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3199 * trans.c, trans-decl.c: Fix comment typos.
3201 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3203 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
3205 2004-05-18 Steve Kargl <kargls@comcast.net>
3207 * arith.c (gfc_int2complex): Fix incorrect range checking.
3209 2004-05-18 Paul Brook <paul@codesourcery.com>
3212 * decl.c (add_init_expr_to_sym): Remove incorrect check.
3213 (default_initializer): Move to expr.c.
3214 (variable_decl): Don't assign default initializer to variables.
3215 * expr.c (gfc_default_initializer): Move to here.
3216 * gfortran.h (gfc_default_initializer): Add prototype.
3217 * resolve.c (resolve_symbol): Check for illegal initializers.
3218 Assign default initializer.
3220 2004-05-17 Steve Kargl <kargls@comcast.net>
3222 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
3224 2004-05-17 Steve Kargl <kargls@comcast.net>
3226 * arith.c (gfc_real2complex): Range checking wrong part of complex
3229 2004-05-16 Paul Brook <paul@codesourcery.com>
3231 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
3233 2004-05-16 Paul Brook <paul@codesourcery.com>
3235 * arith.c (gfc_range_check): Fix logic error.
3237 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
3239 * arith.c: Fix comment typos.
3241 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3244 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
3245 not initialized in a disallowed fashion.
3246 * match.c (gfc_match_common): Likewise.
3247 (var_element): Verify that variable is not in the blank COMMON,
3248 if it is in a common.
3250 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
3252 * Make-lang.in (f95.generated-manpages): Remove.
3253 (f95.srcextra): New.
3254 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
3255 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
3258 (f95.install-info): Remove.
3259 (install-info): New.
3261 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
3263 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
3265 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3267 * primary.c (match_boz_constant): Use gfc_notify_std() for
3268 issuing a warning or an error.
3270 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3273 * primary.c (match_structure_constructor): Rename ...
3274 (gfc_match_structure_constructor): ... to this. Make non-static.
3275 (gfc_match_rvalue): Call renamed function.
3276 * match.h (gfc_match_structure_constructor): Declare.
3277 * match.c (gfc_match_data_constant): Handle structure
3280 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3284 * gfortran.h (gfc_linebuf): New typedef.
3286 (gfc_file): Revamped, use new gfc_linebuf.
3287 (locus): Revamped, use new types.
3288 (gfc_current_file): Remove.
3289 (gfc_current_form, gfc_source_file): New global variables.
3290 * match.c (gfc_match_space, gfc_match_strings): Use
3291 gfc_current_form to find source form.
3292 * module.c (gfc_dump_module): Use gfc_source_file when printing
3294 * error.c (show_locus, show_loci) Use new data structures to print
3296 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
3298 (file_head, current_file, gfc_current_form, line_head, line_tail,
3299 gfc_current_locus1, gfc_source_file): New global variables.
3300 (gfc_scanner_init1): Set new global variables.
3301 (gfc_scanner_done1): Free new data structures.
3302 (gfc_current_locus): Return pointer to gfc_current_locus1.
3303 (gfc_set_locus): Set gfc_current_locus1.
3304 (gfc_at_eof): Set new variables.
3305 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
3306 to new locus structure.
3307 (gfc_check_include): Remove.
3308 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
3309 (gfc_skip_comments): Use gfc_current_form, find locus with
3311 (gfc_next_char): Use gfc_current_form.
3312 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
3313 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
3315 (get_file): New function.
3316 (preprocessor_line, include_line): New functions.
3317 (load_file): Move down, rewrite to match new data structures.
3318 (gfc_new_file): Rewrite to match new data structures.
3319 * parse.c (next_statement): Remove code which is now useless. Use
3320 gfc_source_form and gfc_source_file where appropriate.
3321 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
3322 when determining locus of frontend code.
3323 * trans-io.c (set_error_locus): Same.
3324 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
3325 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
3327 (all): Add missing initializers.
3329 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3331 * Make-lang.in (trans-common.o): Remove redundant dependency.
3332 (data.c): Replace object file name ...
3333 (data.o): ... by the correct one.
3335 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3337 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
3338 for ranges when dumping array references.
3340 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
3342 * decl.c (variable_decl): Always apply default initializer.
3344 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3347 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
3348 handle zero correctly.
3350 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3352 * match.c (gfc_match): Eliminate dead code.
3354 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3356 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
3357 Detect bad continuation line in fixed form sources.
3359 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3362 * iresolve.c (gfc_resolve_nearest): Add new function.
3363 * intrinsic.h: ... declare it here.
3364 * intrinsic.c (add_functions): ... add it as resolving function
3367 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3370 * match.c (gfc_match_do): Allow infinite loops with
3371 label-do-stmt. Do not enforce space after comma.
3373 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3376 * parse.c (parse_interface): Allow empty INTERFACE, remove
3379 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3381 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
3382 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
3383 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
3384 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
3385 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
3386 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
3387 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
3388 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
3389 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
3390 trans-types.h, trans.c, trans.h: Update copyright years and
3392 * data.c: Likewise, also removed two whitespace-only lines.
3393 * gfortranspec.c, lang.opt: Update copyright years.
3395 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3398 * trans-decl.c (generate_local_decl): Don't warn for unused
3399 variables which are in common blocks.
3401 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3403 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
3404 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
3405 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
3407 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
3410 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
3412 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
3414 * gfortran.texi: Use @table @emph instead of @itemize @emph.
3415 Remove "set DEVELOPMENT".
3416 (Compiling GFORTRAN): Remove.
3418 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3420 * array.c (match_subscript, match_array_ref): Add comments
3421 explaining argument 'init'.
3422 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
3423 trans-expr.c, trans.c: Fix some typos in comments.
3424 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
3425 * primary.c (match_digits, match_integer_constant): Add comment
3426 explaining signflag.
3428 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3431 * primary.c: Include system.h and flags.h, needed for pedantic.
3432 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
3435 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3438 * match.c (match_data_constant): Handle case where
3439 gfc_find_symbol sets sym to NULL
3441 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3443 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
3444 dependency on mathbuiltins.def
3446 2004-04-24 Victor Leikehman <lei@il.ibm.com>
3448 * trans-io.c (transfer_expr): Implemented recursive printing
3451 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
3453 * gfortranspec.c: Do not include multilib.h.
3455 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3457 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
3458 2004 to copyright years.
3459 * trans-expr.c, trans-decl.c: Comment update, we now generate
3460 GENERIC, not SIMPLE. Add 2004 to copyright years.
3462 2004-04-24 Paul Brook <paul@codesourcery.com>
3464 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
3466 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
3469 * arith.c (gfc_arith_divide): Fix complex divide.
3471 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
3473 * gfortranspec.c: Include the target headers.
3475 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
3479 * arith.c (arctangent2): New function.
3480 * arith.h (arctangent2): Add function prototype.
3481 * simplify.c (gfc_simplify_atan2): Use it.
3482 (gfc_simplify_log): Use it.
3484 2004-04-12 Diego Novillo <dnovillo@redhat.com>
3486 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
3487 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
3489 2004-04-11 Bud Davis <bdavis9659@comcast.net>
3492 * trans-io.c (build_dt): Change REC to value.
3494 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3497 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
3498 the real value when converting mpf to string.
3500 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3503 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
3506 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3509 * simplify.c (simplify_min_max): Convert the type of the result.
3511 2004-04-11 Paul Brook <paul@codesourcery.com>
3513 * gfortran.texi: Use full target triplet.
3515 2004-04-11 Paul Brook <paul@codesourcery.com>
3517 * Make-lang.in (GFORTRAN_TEXI): Set it.
3518 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
3519 (fortran/gfortran.info): Ditto.
3520 * gfortran.texi: Major update.
3521 * invoke.texi: New file.
3523 2004-04-10 Paul Brook <paul@codesourcery.com>
3525 * trans-array.c (gfc_trans_allocate_temp_array,
3526 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
3527 * trans-decl.c (gfc_build_dummy_array_decl,
3528 gfc_get_symbol_decl, gfc_build_function_decl,
3529 gfc_create_module_variable): Ditto.
3530 * trans-expr.c (gfc_conv_variable): Ditto.
3531 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
3532 * trans.h (GFC_DECL_STRING): Remove.
3533 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
3534 GFC_DECL_ASSIGN): Renumber flags.
3536 2004-04-05 Paul Brook <paul@codesourcery.com>
3540 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
3542 * gfortran.h (struct gfc_charlen): Add backend_decl.
3543 * trans-array.c (gfc_trans_allocate_temp_array,
3544 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
3545 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
3546 Remove old, broken string handling.
3547 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
3548 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
3549 gfc_trans_deferred_array): Handle character arrays.
3550 * trans-const.c (gfc_conv_const_charlen): New function.
3551 * trans-const.h (gfc_conv_const_charlen): Add prototype.
3552 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
3554 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
3555 (gfc_create_string_length): New function.
3556 (gfc_get_symbol_decl): Create lengths for character variables.
3557 (gfc_get_fake_result_decl): Ditto.
3558 (gfc_build_function_decl): Only set length for assumed length
3559 character arguments.
3560 (gfc_trans_dummy_character): New function.
3561 (gfc_trans_auto_character_variable): Rewrite.
3562 (gfc_trans_deferred_vars): Handle more types of character variable.
3563 (gfc_create_module_variable): String lengths have moved.
3564 (gfc_generate_function_code): Initialize deferred var chain earlier.
3565 * trans-expr.c (gfc_conv_init_string_length): Rename ...
3566 (gfc_trans_init_string_length): ... to this.
3567 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
3568 gfc_conv_function_call): Update to new format for character variables.
3569 (gfc_conv_string_length): Remove.
3570 (gfc_conv_string_parameter): Update assertion.
3571 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
3572 * trans-io.c (set_string): Use new macro names.
3573 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
3574 * trans-types.c (gfc_get_character_type): Use existing length expr.
3575 (gfc_is_nodesc_array): Make public.
3576 (gfc_get_dtype_cst): Rename ...
3577 (gfc_get_dtype): ... to this. Handle unknown size arrays.
3578 (gfc_get_nodesc_array_type): Use new name.
3579 (gfc_sym_type): New character variable code.
3580 (gfc_get_derived_type): Ditto.
3581 (gfc_get_function_type): Evaluate character variable lengths.
3582 * trans-types.h (gfc_strlen_kind): Define.
3583 (gfc_is_nodesc_array): Add prototype.
3584 * trans.h: Update prototypes.
3585 (struct lang_type): Update comments.
3586 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
3587 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
3589 2004-04-04 Paul Brook <paul@codesourcery.com>
3591 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
3592 * options.c (gfc_init.options, gfc_handle_option): Ditto.
3593 * trans-expr.c (gfc_conv_function_call): Ditto.
3594 * trans-types.c (gfc_is_nodesc_array): Ditto
3595 * lang.opt (fg77-calls): Remove.
3597 2004-04-04 Paul Brook <paul@codesourcery.com>
3599 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
3600 (gfc_conv_descriptor_base): Rename ...
3601 (gfc_conv_descriptor_offset): ... to this.
3602 (gfc_trans_allocate_array_storage): Set offset to zero.
3603 (gfc_conv_array_base): Rename ...
3604 (gfc_conv_array_offset): ... to this.
3605 (gfc_conv_array_index_ref): Add offset parameter.
3606 (gfc_conv_array_ref): Include offset.
3607 (gfc_trans_preloop_setup): Use existing offset.
3608 (gfc_trans_allocate_temp_array, gfc_array_allocate,
3609 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
3610 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
3611 gfc_conf_ss_descriptor): Set offset.
3612 * trans-array.h: Rename prototypes.
3613 * trans-const.h (gfc_index_zero_node): Define.
3614 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
3615 * trans-types.c (gfc_get_array_type_bounds): Ditto.
3616 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
3618 2004-03-25 Diego Novillo <dnovillo@redhat.com>
3620 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
3622 2004-03-24 Bud Davis <bdavis9659@comcast.net>
3625 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
3626 before conversion by gmp library call.
3628 2004-03-24 Bud Davis <bdavis9659@comcast.net>
3631 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
3633 2004-02-24 Richard Henderson <rth@redhat.com>
3635 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
3637 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
3639 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
3640 (fortran/gfortran.info): ... to here.
3643 2004-02-16 Richard Henderson <rth@redhat.com>
3645 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
3646 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
3647 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
3648 (gfc_expand_function): Rename from expand_function_body, make static,
3649 don't do anything except invoke tree_rest_of_compilation.
3650 (gfc_be_parse_file): Invoke cgraph.
3651 (gfc_expand_decl): Remove.
3652 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
3653 __builtin_adjust_trampoline.
3654 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
3655 (gfc_finalize): New.
3656 (gfc_generate_function_code): Use it. Lower nested functions.
3657 * trans-expr.c (gfc_conv_function_call): Add static chain operand
3659 * trans.c (gfc_build_function_call): Likewise.
3660 * trans.h (expand_function_body): Remove.
3662 2004-02-15 Victor Leikehman <lei@il.ibm.com>
3665 * trans-decl.c (gfc_build_function_decl) For functions
3666 returning CHARACTER pass an extra length argument,
3667 following g77 calling conventions.
3668 * trans-types.c (gfc_get_function_type) Ditto.
3669 * trans-expr.c (gfc_conv_function_call) Ditto.
3671 2004-02-14 Paul Brook <paul@codesourcery.com>
3673 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
3675 2004-02-12 Paul Brook <paul@nowt.org>
3679 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
3681 * gfortran.texi: Fix typos.
3683 2004-02-07 Bud Davis <bdavis9659@comcast.net>
3686 * intrinsic.c (add_conversions) Use logical conversion instead
3688 * trans-types.c (gfc_get_logical_type) implemented logical*1
3691 2004-01-17 Paul Brook <paul@codesourcery.com>
3693 * lang-specs.h: Remove %<fixed-form.
3695 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
3697 * lang-specs.h: Enable preprocessing of source files
3698 ending in .F, .fpp, .FPP, .F90 and .F95.
3700 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
3703 * lang-specs.h: Enable compilation of files ending
3704 in .f, .for and .FOR.
3706 2004-01-11 Paul Brook <paul@codesourcery.com>
3708 * trans-stmt.c (gfc_trans_if_1): New function.
3709 (gfc_trans_if): Use it.
3711 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
3713 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
3714 (gfc_option_t): Add max_identifier_length.
3715 * lang.opt: Add fmax-identifier-length.
3716 * match.c (parse_name): Use limit.
3717 * options.c (gfc_init_options): Set max_identifier_length.
3718 (gfc_handle_option): Ditto.
3720 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
3722 * intrinsic.c (add_functions): Add resolve function to dcmplx.
3723 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
3724 * iresolve.c (gfc_resolve_dcmplx): New function.
3726 2004-01-10 Paul Brook <paul@codesourcery.com>
3728 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
3729 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
3730 (gfc_return_by_reference): Correct condition.
3731 (gfc_get_function_type): Ditto.
3733 2004-01-10 Paul Brook <paul@codesourcery.com>
3735 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
3738 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
3740 * iresolve.c: Use correct kind.
3742 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
3745 * trans-decl.c (gfc_create_module_variable): Output array valued
3748 2004-01-10 Paul Brook <paul@codesourcery.com>
3750 * resolve.c (resolve_branch): Get error message right way round.
3752 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
3754 * trans-array (gfc_conv_loop_setup): Adjust comment to track
3756 (gfc_array_allocate): Don't count size of element twice.
3758 2004-01-04 Paul Brook <paul@codesourcery.com>
3760 * lang.opt (i8, r8, std=*): Remove RejectNegative.
3762 2004-01-04 Paul Brook <paul@codesourcery.com>
3764 * error.c (gfc_notify_std): New function.
3765 * gfortran.h (gfc_notify_std): Declare.
3766 (GFC_STD_*): Define.
3767 (gfc_option_t): Add warn_std and allow_std.
3768 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
3769 (gfc_intrinsic_func_interface): Use gfc_notify_std.
3770 * check.c (check_rest): Use gfc_notify_std.
3771 * match.c (gfc_match_pause): Ditto.
3772 (gfc_match_assign): Ditto.
3773 (gfc_match_goto): Ditto.
3774 * resolve.c (resolve_branch): Ditto.
3775 * lang.opt: Add std=<foo> and w.
3776 * options.c (gfc_init_options): Set allow_std and warn_std.
3777 (gfc_handle_option): Handle OPT_std_* and OPT_w.
3779 2004-01-01 Paul Brook <paul@codesourcery.com>
3781 * array.c (gfc_append_constructor): Take constructor, not expression.
3782 * data.c (struct gfc_expr_stack): Remove.
3783 (expr_stack): Remove.
3784 (find_con_by_offset): Rename from find_expr_in_con.
3785 (find_con_by_component): Rename from find_component_in_con.
3786 (gfc_get_expr_stack): Remove.
3787 (gfc_assign_data_value): Rewrite.
3788 (gfc_expr_push): Remove.
3789 (gfc_expr_pop): Remove.
3790 (gfc_advance_section): Rename from
3791 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
3792 (gfc_get_section_index): Handle unbounded sections.
3793 * gfortran.h: Update prototypes.
3794 * resolve.c (check_data_variable): Array section maight not be the
3797 2004-01-01 Paul Brook <paul@codesourcery.com>
3800 * resolve.c (resolve_symbol): Allow assumed length function results.
3802 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
3804 * match.c (gfc_match_pause): Fix spelling.
3806 2004-01-01 Steven Bosscher <stevenb@suse.de>
3809 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
3810 reference from the expression.
3812 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
3814 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
3816 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
3817 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
3818 (symbol_attribute):New variable attribute: assign.
3819 * io.c (resolve_tag):Integer variable is allowed.
3820 (match_dt_format): Add ASSIGN statement. Set assign flag.
3821 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
3822 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
3823 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
3824 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
3825 (next_statement): Add ST_LABEL_ASSIGNMENT.
3826 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
3827 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
3828 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
3829 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
3830 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
3831 assign. Put them into the stuct lang_decl.
3832 * trans-io.c (set_string): Add the assign statement.
3833 * trans-stmt.c (gfc_trans_label_assign): New function.
3834 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
3835 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
3836 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
3837 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
3838 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
3839 (GFC_DECL_ASSIGN(node)): New macro to access flag.
3841 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
3844 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
3847 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
3849 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
3850 that arguments to subroutines/functions can't alias themselves, nor global
3853 2003-12-20 Steven Bosscher <stevenb@suse.de>
3855 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
3856 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
3858 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
3860 * primary.c (match_substring): Fix substring bug for start point
3861 or end point is NULL.
3862 * trans-expr.c (gfc_conv_substring): Ditto
3863 * trans-types.c (gfc_sym_type): Get correct type of scalar
3864 character variables.
3865 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
3868 2003-12-10 Richard Henderson <rth@redhat.com>
3870 * options.c (gfc_post_options): Don't ever use rtl inlining.
3872 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
3874 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
3875 * trans-equivalence.c: Remove.
3876 * trans-decl.c (gfc_get_symbol_decl): Update to match.
3877 (gfc_generate_function_code): Ditto.
3878 * trans-array.c (gfc_conv_array_parameter): Ditto.
3879 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
3880 (F95_ADDITIONAL_OBJS): Add stor-layout.o
3881 * trans.h (gfc_trans_equivalence): Remove.
3882 * gfortran.h (struct gfc_equiv): Add used field.
3883 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
3884 equiv_offset fields.
3886 2003-12-05 Richard Henderson <rth@redhat.com>
3888 * trans.c (gfc_build_addr_expr): New.
3889 (gfc_build_indirect_ref, gfc_build_array_ref): New.
3890 * trans.h: Declare them.
3891 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
3892 trans-stmt.c, trans.c (*): Use them.
3894 * f95-lang.c (gfc_post_options): Remove dead prototype.
3895 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
3896 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
3899 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
3901 * io.c (gfc_match_format): Check for missing format label.
3903 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
3906 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
3907 from interfaces in modules.
3909 2003-11-30 Paul Brook <paul@nowt.org>
3911 * trans-array.c (gfc_trans_g77_array): Make non-static.
3912 (gfc_trans_assumed_size): Remove.
3913 (gfc_trans_dummy_array_bias): Explicitly free temporary.
3914 * trans-array.h (gfc_trans_g77_array): Add prototype.
3915 (gfc_trans_assumed_size): Remove.
3916 * trans-decls.c (gfor_fndecl_push_context): Remove.
3917 (gfor_fndecl_pop_context): Remove.
3918 (gfc_build_function)decls): Don't create them.
3919 (gfc_trans_deferred_vars): Update to match. Remove dead code.
3920 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
3922 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
3924 * trans-array.c (gfc_conv_array_parameter): Simplify
3925 array argument passing for array name actual argument.
3926 * trans-expr.c (gfc_conv_function_call): Ditto
3927 * trans-types.c (gfc_is_nodesc_array):Ditto.
3929 2003-11-30 Paul Brook <paul@nowt.org>
3931 * f95-lang.c (gfc_post_options): Move ...
3932 * options.c (gfc_post_options): .. to here. Handle inlining options.
3933 * gfortran.h (gfc_post_options): Add prototype.
3935 2003-11-28 Richard Henderson <rth@redhat.com>
3937 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
3939 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
3941 * trans.h (has_alternate_specifier): New global variable.
3942 * match.c (gfc_match_call): Handle actual arguments associated with
3943 alternate return indicators.
3944 * trans-expr.c (gfc_conv_function_call): Ditto
3945 * trans-stmt.c (gfc_trans_call): Ditto
3946 (gfc_trans_return): Handle return statement with value.
3947 * trans-decl.c (gfc_generate_function_code): Handle functions with
3949 (gfc_get_fake_result_decl): Ditto
3950 * trans-types.c (gfc_get_function_type): Ditto
3951 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
3952 (resolve_formal_arglist): Check asterisk dummy.
3954 2003-11-27 Paul Brook <paul@nowt.org>
3956 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
3957 allocation interface.
3958 (gfc_conv_ array_parameter): Ditto.
3959 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
3960 * trans-array.c: Update prototype.
3961 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
3962 (gfc_trans_auto_character_variable): Use new memory alloc interface.
3963 * trans-expr.c (gfc_conv_string_tmp): Ditto.
3964 (gfc_conv_function_call): Use gfc_conv_string_tmp.
3965 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
3966 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
3967 * trans.h (gfc_ss_info): Remove unused pdata field.
3968 * trans.c (gfc_create_var_np): Change T to V.
3970 2003-11-26 Richard Henderson <rth@redhat.com>
3972 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
3973 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
3974 FRACTION, NEAREST, SET_EXPONENT.
3975 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
3976 Fix GTY marking. Remove unnecessary const's.
3977 (LIBM_FUNCTION): Rename from I_LIB.
3978 (LIBF_FUNCTION): New.
3979 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
3980 conventions. Assume the expr signature is correct. Mark const.
3981 (gfc_conv_intrinsic_exponent): Use library functions.
3982 (gfc_conv_intrinsic_set_exponent): Remove.
3983 (gfc_conv_intrinsic_scale): Remove.
3984 (gfc_conv_intrinsic_nearest): Remove.
3985 (gfc_conv_intrinsic_fraction): Remove.
3986 (gfc_conv_intrinsic_function): Update.
3987 * trans-decl.c (gfor_fndecl_math_exponent4): New.
3988 (gfor_fndecl_math_exponent8): New.
3989 (gfc_build_intrinsic_function_decls): Set them.
3990 * trans.h: Declare them.
3992 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
3994 * trans-common.c (gfc_layout_global_equiv): Locate the error for
3995 underflow COMMON block.
3996 (gfc_trans_one_common): Fix bug for size of COMMON block containing
3997 EQUIVALENCE object. Also fix typo in an error message.
3999 2003-11-25 Diego Novillo <dnovillo@redhat.com>
4001 * Make-lang.in: Add check-gfortran to lang_checks.
4002 (check-f95): Alias for check-gfortran.
4004 2003-11-25 Jason Merrill <jason@redhat.com>
4006 * Make-lang.in (f95.tags): Create TAGS.sub files in each
4007 directory and TAGS files that include them for each front end.
4009 2003-11-24 Paul Brook <paul@nowt.org>
4012 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
4014 2003-11-24 Paul Brook <paul@nowt.org>
4016 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
4018 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
4020 2003-11-24 Paul Brook <paul@nowt.org>
4023 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
4024 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
4026 2003-11-20 Richard Henderson <rth@redhat.com>
4028 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
4029 (gfc_conv_array_base): Likewise.
4030 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4031 * trans-expr.c (gfc_conv_string_tmp): Likewise.
4032 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
4033 * trans-stmt.c (gfc_trans_character_select): Likewise.
4035 2003-11-13 Paul Brook <paul@nowt.org>
4037 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
4039 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
4041 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
4042 (resolve_equivalence): New function.
4043 (resolve_equivalence_derived): New function.
4045 2003-11-12 Richard Henderson <rth@redhat.com>
4047 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
4048 annotate_all_with_locus.
4050 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
4052 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
4053 * trans-decl.c (gfc_finish_var_decl): Modified.
4055 2003-11-08 Paul Brook <paul@nowt.org>
4058 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
4061 2003-11-06 Paul Brook <paul@nowt.org>
4063 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
4065 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
4067 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
4069 2003-10-27 Anthony Green <green@redhat.com>
4071 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
4072 (f95.stagefeedback): Ditto.
4074 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
4077 * Make-lang.in (f95.stageprofile): Add.
4078 (f95.stagefeedback): Add.
4080 2003-10-23 Richard Henderson <rth@redhat.com>
4082 * f96-lang.c (gfc_gimplify_expr): Remove.
4083 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
4084 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
4086 2003-10-23 Richard Henderson <rth@redhat.com>
4088 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
4090 2003-10-20 Paul Brook <paul@nowt.org>
4092 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
4093 * trans-stmt.c (gfc_trans_do_while): Ditto.
4095 2003-10-17 Paul Brook <paul@nowt.org>
4097 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
4099 2003-10-17 Paul Brook <paul@nowt.org>
4101 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
4103 2003-10-17 Feng Wang <wf_cs@yahoo.com>
4105 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
4106 (gfc_resolve_minloc): Ditto.
4107 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
4108 Return the value after subtracting the lower bound.
4110 2003-10-16 Richard Henderson <rth@redhat.com>
4112 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
4114 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
4116 * lang.c: Remove -M option for now, it's in the way for C.
4118 2003-10-14 Jason Merrill <jason@redhat.com>
4120 * Make-lang.in (f95.tags): New rule.
4122 2003-10-13 Richard Henderson <rth@redhat.com>
4124 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
4126 2003-10-13 Paul Brook <paul@nowt.org>
4128 * trans-decl.c (generate_local_decl): Don't create junk variables.
4130 2003-10-13 Paul Brook <paul@nowt.org>
4132 * resolve.c (resolve_formal_arglist): Use function result decl in
4133 preference to function decl.
4135 2003-10-12 Richard Henderson <rth@redhat.com>
4137 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
4138 TREE_READONLY. Update all callers.
4140 2003-10-12 Feng Wang <wf_cs@yahoo.com>
4142 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
4143 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
4144 (gfc_is_intrinsic_libcall): Add CSHIFT.
4146 2003-10-12 Richard Henderson <rth@redhat.com>
4148 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
4149 (gfc_trans_array_constructor_value): Likewise.
4150 (gfc_conv_array_initializer): Likewise.
4151 * trans-stmt.c (gfc_trans_character_select): Likewise.
4153 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
4155 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
4157 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4159 * check.c (gfc_check_repeat): Check arguments are scalar.
4160 (gfc_check_trim): New function.
4161 * intrinsic.h (gfc_check_trim): Add prototype.
4162 * intrinsic.c (add_functions): Use it.
4163 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
4165 * trans-decl.c: Ditto.
4166 (gfc_build_intrinsic_fucntion_decls): Set them.
4167 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
4168 (gfc_conv_intrinsic_trim): New function.
4169 (gfc_conv_intrinsic_repeat): New function.
4170 (gfc_conv_intrinsic_function): Use them.
4172 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4174 * trans-types.c (gfc_sym_type): Handle result variables.
4176 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4178 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
4179 gfc_get_character_type.
4181 2003-10-11 Feng Wang <wf_cs@yahoo.com>
4183 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
4185 2003-10-11 Paul Brook <paul@nowt.org>
4187 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
4188 (gfc_resolve_dprod): New function.
4189 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
4190 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
4191 (gfc_resolve_dprod): Declare.
4192 * intrinsic.c (add_functions): Use them.
4193 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
4195 2003-10-06 Richard Henderson <rth@redhat.com>
4197 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
4198 * trans-intrinsic.c (call_builtin_clz): Use it.
4200 2003-10-05 Paul Brook <paul@nowt.org>
4202 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
4203 * trans-decl.c (gfc_generate_function_code): Set
4204 cfun->function_end_locus.
4206 2003-09-24 Jason Merrill <jason@redhat.com>
4208 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
4211 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
4212 Paul Brook <paul@nowt.org>
4214 * Make-lang.in (F95_OBJS): Add fortran/data.o.
4215 * array.c (gfc_inser_constructor): New function.
4216 (gfc_get_constructor): New function.
4217 (gfc_free_constructor): Initialize offset and repeat.
4218 (iterator_stack): Remove.
4219 (expand_info): Add offset, component and repeat fields.
4220 (expand_constructor): Set them.
4221 (expand): Set new fields.
4222 (gfc_copy_constructor): Ditto. Avoid recursion.
4223 * gfortran.h: Add prototypes for new functions.
4224 (gfc_constructor): Add offset, component and repeat.
4225 (iteratio_stack): Move to here.
4226 * resolve.c (check_data_variable): Convert data values into variable
4228 (traverse_data_list): Build implicit loop chain.
4229 (gfc_resolve): Ditto.
4230 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
4231 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
4232 * trans-expr.c (gfc_conv_structure): Handle array initializers.
4233 (gfc_conv_expr): Update to match.
4234 * trans.h (gfc_conv_structure): Declare.
4237 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
4239 * trans.h: Add declarations for gfor_fndecl_si_kind and
4240 gfor_fndecl_sr_kind.
4241 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4242 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
4243 (g95_conv_intrinsic_sr_kind): New function.
4244 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
4247 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
4249 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
4250 instead of _4 and _8 as postfix for libgfortran calls.
4252 2003-09-16 Paul Brook <paul@nowt.org>
4254 * array.c (compare_bounds): New function.
4255 (gfc_compare_array_spec): Use it.
4257 2003-09-14 Paul Brook <paul@nowt.org>
4259 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
4260 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
4262 2003-09-14 Paul Brook <paul@nowt.org>
4264 * check.c (dim_rank_check): Allow assumed bounds if requested.
4265 (gfc_check_lbound): Call it.
4266 (gfc_check_ubound): Ditto.
4267 (gfc_check_size): Change to match.
4268 * simplify.c (gfc_simplify_bound): New function.
4269 (gfc_simplify_lbound): New function.
4270 (gfc_simplify_ubound): New function.
4271 * intrinsic.h: Declare them.
4272 * intrinsic.c (add_functions): Use them.
4274 2003-09-14 Paul Brook <paul@nowt.org>
4276 * io.c (format_lex): Initialize negative_flag.
4277 (check_format): Intialize repeat.
4278 * trans-io.c (gfc_new_nml_name_expr): Declare static.
4279 (gfc_new_var_expr): Ditto.
4281 2003-09-14 Paul Brook <paul@nowt.org>
4283 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
4284 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
4286 2003-09-12 Paul Brook <paul@nowt.org>
4288 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
4290 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
4292 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
4293 for a correct expression.
4295 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
4297 * trans-intrinsic.c (real_compnt_info): New struct.
4298 (prepare_arg_info): New function.
4299 (gfc_conv_intrinsic_set_exponent): New function.
4300 (gfc_conv_intrinsic_scale): New function.
4301 (gfc_conv_intrinsic_nearest): New function.
4302 (gfc_conv_intrinsic_fraction): New function.
4303 (gfc_conv_intrinsic_exponent): New function.
4304 (gfc_conv_intrinsic_spacing): New function.
4305 (gfc_conv_intrinsic_rrspacing): New function.
4306 (gfc_conv_intrinsic_function): Use them.
4308 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
4310 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
4311 build_int_2 changed from (high, low) to (low, high).
4312 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
4313 ioparm_namelist_read_mode, iocall_set_nml_val_int,
4314 iocall_set_nml_val_float, iocall_set_nml_val_char,
4315 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
4316 (gfc_build_io_library_fndecls): Add variable initialization.
4317 (gfc_new_nml_name_expr, get_new_var_expr): New function.
4318 (build_dt): Add namelist support.
4319 * io.c (value): New variable.
4320 (check_format): Support FMT_H now.
4322 2003-09-07 Paul Brook <paul@nowt.org>
4324 * io.c (gfc_resolve_dt): Error if format label is not defined.
4326 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
4328 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
4329 about case_switch's break. The other is about building the condition
4330 statement tree, which judges the argument in the range of the
4331 corresponding integer type.
4332 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
4333 for the large values.
4335 2003-09-05 Paul Brook <paul@nowt.org>
4337 * f95-lang.c (expand_function_body): Gimplify the function.
4339 2003-09-04 Jeff Law <law@redhat.com>
4341 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
4344 2003-09-04 Paul Brook <paul@nowt.org>
4346 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
4347 (gfc_expand_stmt): New function.
4348 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
4349 (expand_function_body): Use tree_rest_of_compilation.
4350 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
4352 2003-09-03 Jeff Law <law@redhat.com>
4354 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
4357 2003-08-30 Paul Brook <paul@nowt.org>
4359 * f95-lang.c (builtin_function): Remove #if 0 code.
4360 (gfc_define_builtin): New function.
4361 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
4362 * mathbuiltins.def: New file.
4363 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
4364 (gfc_intrinsic_map): Use mathbuiltins.def.
4365 (gfc_intrinsic_builtin_t): Remove.
4366 (gfc_build_intrinsic_lib_fndecls): Update.
4367 * trans-types.c (gfc_init_types): Remove redundant initilaization of
4368 signed_size_type_node.
4370 2003-08-29 Paul Brook <paul@nowt.org>
4372 * arith.c (gfc_real_kinds): Use correct minimum exponents.
4374 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
4376 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
4377 (gfc_conv_intrinsic_function): Add MODULO.
4379 2003-08-22 Jason Merrill <jason@redhat.com>
4381 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
4383 2003-08-22 Andreas Jaeger <aj@suse.de>
4385 * Make-lang.in (f95.install-common): Add DESTDIR support.
4386 * (f95.install-info): Likewise.
4387 (f95.uninstall): Likewise.
4389 2003-08-19 Diego Novillo <dnovillo@redhat.com>
4391 * trans-types.c (gfc_init_types): Initialize
4392 signed_size_type_node with size_type_node.
4394 2003-08-18 Paul Brook <paul@nowt.org>
4396 * dependency.c (gfc_dependency): New enum.
4397 (check_another_array_ref): Remove.
4398 (gfc_get_array_from_component): Remove.
4400 (get_range): Remove.
4401 (get_no_of_elements): Use mpz_t, not mpf_t.
4402 (transform_sections): New function.
4403 (gfc_check_range_range): Rename ...
4404 (gfc_check_section_vs_section): ... to this. Use new function.
4405 (gfc_is_inside_range): Rewrite to match.
4406 (gfc_check_element_vs_section): Ditto.
4407 (gfc_check_element_vs_element): Ditto.
4409 (gfc_dep_resolver): Ditto. Remove unused parameter.
4410 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
4411 gfc_check_element_vs_element, gfc_is_inside_range,
4412 gfc_get_array_from_component): Remove prototypes for static functions.
4413 (gfc_dep_resolver): Update prototype.
4414 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
4416 2003-08-15 Paul Brook <paul@nowt.org>
4418 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
4419 return values to parent scope.
4420 (gfc_build_dummy_array_decl): Ditto.
4422 2003-08-14 Paul Brook <paul@nowt.org>
4424 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
4425 size of the type, not the pointer.
4426 * resolve.c (resolve_symbol): Give more accurate error message.
4428 2003-08-10 Paul Brook <paul@nowt.org>
4430 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
4432 2003-08-10 Paul Brook <paul@nowt.org>
4434 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
4437 2003-08-10 Chun Huang <compiler@sohu.com>
4439 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
4440 (resolve_symbol): Ditto.
4441 * trans-expr.c (gfc_conv_statement_function): New function.
4442 (gfc_conv_function_expr): Use it.
4444 2003-08-10 Paul Brook <paul@nowt.org>
4446 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
4447 (walk_function_expr): Set section rank.
4448 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
4450 2003-08-10 Paul Brook <paul@nowt.org>
4452 * intrinsic.c (add_sym): Prefix names with correct string.
4453 (add_sym_0s): New function.
4454 (add_subroutines): Register abort.
4456 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
4458 * gfortran.h: Introduce options to control the mangling.
4459 * lang.opt: Likewise.
4460 * options.c (gfc_init_options): Handle the options.
4461 * trans-common.c (gfc_sym_mangled_common_id): New function.
4462 (gfc_build_common_decl): Call it.
4463 * trans-decl.c (gfc_sym_mangled_function_id): New function.
4464 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
4466 2003-08-09 Paul Brook <paul@nowt.org>
4468 * module.c (mio_symbol): Always ouput a namespace for formal args.
4469 (load_needed): Namespace now belong to their proper symbol.
4470 (gfc_dump_module): Change G95=>GFORTRAN.
4472 2003-08-05 Paul Brook <paul@nowt.org>
4474 * options.c: Force -fg77-calls.
4476 2003-08-02 Paul Brook <paul@nowt.org>
4478 * Makelang.in: Rename G95_* to GFORTRAN_*.
4479 * All sources: Rename G95_* to GFC_*.
4481 2003-08-01 Paul Brook <paul@nowt.org>
4483 * fortran/Make-lang.in: Use GMPLIBS.
4484 * fortran/config-lang.in: Set need_gmp.
4485 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
4487 2003-07-27 Andreas Jaeger <aj@suse.de>
4489 * trans-decl.c (gfc_generate_constructors): Convert prototype to
4491 * trans-const.c (gfc_init_constants): Likewise.
4492 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
4494 * gfortranspec.c: Convert to ISO C90.
4495 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
4497 2003-07-26 Paul Brook <paul@nowt.org>
4499 * lang.opt: Add -fdump-parse-tree.
4500 * options.c (gfc_handle_option): Ditto.
4501 * resolve.c (resolve_forall_iterators): Convert to proper type.
4502 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
4504 2003-07-26 Paul Brook <paul@nowt.org>
4506 * Makefile.in: Add build dependencies on files common with rest of gcc.
4508 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
4510 * trans.h: Declare g95_trans_pointer_assignment.
4511 * trans-expr.c (g95_trans_pointer_assignment): New function.
4512 (g95_trans_pointer_assign): Use it.
4513 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
4514 (g95_trans_pointer_assign_need_temp): New function.
4516 2003-07-26 Paul Brook <paul@nowt.org>
4518 * gfortran.texi: Replace references to g95.
4520 2003-07-26 Paul Brook <paul@nowt.org>
4522 Rename g95_* to gfc_*.
4524 2003-07-25 Paul Brook <paul@nowt.org>
4526 * gfortran.h: Rename from g95.h.
4527 * trans-types.c (boolean_type_node, booelan_true_node,
4528 boolean_false_node): Remove.
4529 * trans-types.h: Ditto.
4531 2003-07-25 Chun Huang <compiler@sohu.com>
4533 * parse.c (accept_statement): Implement BLOCK DATA statement.
4534 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
4537 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
4539 * trans-stmt.c (temporary_list): Define.
4540 (g95_trans_assign_need_temp): New function.
4541 (g95_trans_forall_1): Modified for WHERE.
4542 (g95_trans_where_assign): Modified.
4543 (g95_trans_where_2): Modified.
4544 (g95_evaluate_where_mask): Modified.
4545 (g95_trans_where): Modified.
4546 (g95_get_temp_expr): Removed.
4547 (g95_add_to_where_stmt_list): Removed.
4548 (compute_overall_iter_number): Modified for WHERE.
4549 * trans.h: Remove where_stmt_list.
4551 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4553 * lang.opt: Correct description of options -J and -M.
4555 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
4557 * lang.opt: Move help text to here.
4558 * lang-options.h: Remove.
4560 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4561 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
4562 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
4565 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
4566 Paul Brook <paul@nowt.org>
4568 * check.c (check_rest): Use global pedantic flag.
4569 * io.c (data_desc): Ditto.
4570 * error.c (g95_warning, g95_warning_now): Use global flag.
4571 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
4572 (expand_function_body): Update to new prototypes.
4573 (g95_init): Use new option names.
4574 * g95.h (g95_option_t): Standardize names.
4575 (g95_init_options, g95_handle_option): Update prototypes.
4576 * interface.c: Use new option names.
4583 * simplify.c: Ditto.
4585 * trans-array.c: Ditto.
4586 * trans-expr.c: Ditto.
4587 * trans-types.c: Ditto.
4588 * trans-decl.c: Ditto.
4589 (g95_build_library_function_decl): Remove obsolete VPARAMS.
4591 * options.c (g95_display_help): Remove.
4592 (g95_init_options): Convert to new scheme.
4594 (g95module_option): Ditto, rename from g95_parse_arg.
4595 (g95_handle_module_path_options): New function.
4596 * trans-equivalence.c: Fix error message.
4597 * lang.opt: Corrections.
4599 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
4601 * lang.opt: New file.
4603 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4605 * decl.c (match_attr_spec): Set colon_seen.
4607 2003-07-14 Paul Brook <paul@nowt.org>
4609 * trans-array.c: Update comment.
4610 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
4611 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
4612 minmaxloc,minmaxval): Ditto.
4613 * trans-io.c (g95_trans_transfer): Ditto.
4614 * trans-stmt.c: Remove unneeded prototypes.
4615 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
4616 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
4617 (compute_inner_temp_size): Remove bits of dead code. Add comments.
4618 Don't share loopinfo.
4619 (compute_overall_iter_number): Declare as static.
4620 (allocate_temp_for_forall_nest): Ditto.
4621 (g95_trans_forall_1): Don't pass shared loopinfo.
4622 * trans.c (g95_start_block): Expand comment.
4624 2003-07-12 Paul Brook <paul@nowt.org>
4626 * arith.c (g95_index_integer_kind): Remove unused initializer.
4627 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
4628 index by size of element.
4629 (generate_loop_for_rhs_to_temp): Ditto.
4630 (allocate_temp_for_forall_nest): Use element size, not index size.
4632 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4634 * arith.c (g95_index_integer_kind): Add a TODO.
4635 * simplify.c (g95_simplify_nearest): Add a TODO.
4637 2003-07-09 Chun Huang <compiler@sohu.com>
4639 * trans.h: Add declarations for gfor_fndecl_string_scan and
4640 gfor_fndecl_string_verify.
4641 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4642 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
4643 (g95_conv_intrinsic_verify): New function.
4644 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
4645 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
4646 of parameter 'BACK=.TRUE.'
4648 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
4650 * trans-stmt.c (iter_info, forall_info): Define.
4651 (g95_trans_forall_block): Remove.
4652 (g95_trans_forall_loop): Use forall info blocks.
4653 (g95_trans_nested_forall_loop): New function.
4654 (g95_do_allocate): Handle things other than logical masks.
4655 (generate_loop_for_temp_to_lhs): New function.
4656 (generate_loop_for_rsh_to_temp): New function.
4657 (compute_inner_temp_size): New function.
4658 (compute_overall_iter_number): New function.
4659 (allocate_temp_for_forall_nest): New function.
4660 (g95_trans_forall): Move body ...
4661 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
4663 2003-07-02 Paul Brook <paul@nowt.org>
4665 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
4666 in correct scope. Change callers to match.
4667 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
4668 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
4670 2003-07-02 Paul Brook <paul@nowt.org>
4672 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
4673 expression shape for all expressions.
4674 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
4676 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4678 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
4679 g95_parse_arg), intrinsic.c (g95_convert_type): support of
4681 * intrinsic.c, g95.h: Add g95_convert_type_warn,
4682 * resolve.c (g95_resolve_index): Call it.
4684 2003-07-02 Paul Brook <paul@nowt.org>
4686 * iresolve.c (g95_resolve_reshape): Set expression shape.
4687 (g95_resolve_shape): Ditto.
4688 * simplify.c (g95_simplify_shape): Move common code outside condition.
4689 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
4691 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4693 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
4696 2003-06-29 Paul Brook <paul@nowt.org>
4698 * array.c (g95_simplify_iterator_var): Don't bother with return value.
4699 * expr.c (find_array_element, find_component_ref): New functions.
4700 (remove_subobject_ref): New function.
4701 (simplify_const_ref): Use them. Rename from simplify_component_ref.
4702 (simplify_ref_chain): New function.
4703 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
4704 (g95_specification_expr): Simplify the expression.
4705 * resolve.c (resolve_operator): Check simplifications return code.
4706 (g95_resolve_expr): Ditto.
4708 2003-06-26 Paul Brook <paul@nowt.org>
4710 * expr.c (simplify_component_ref): New function.
4711 (g95_simplify_expr): Use it.
4712 * resolve.c (resolve_structure_cons): Handle references.
4714 2003-06-25 Paul Brook <paul@nowt.org>
4716 * trans-io.c (build_dt): Handle internal units.
4718 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
4720 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
4721 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
4722 Use g95_array_index_type instead of integer_type_node.
4723 (g95_build_common_decl, g95_set_common_master_type): Use
4724 g95_character1_type_node instead of char_type_node.
4725 * trans-equivalence.c (g95_layout_local_equiv): As above.
4727 2003-06-24 Steven G. Kargl <kargls@attbi.com>
4729 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
4730 remove last remains of -fquiet.
4732 2003-06-22 Paul Brook <paul@nowt.org>
4734 * resolve.c (resolve_operator): Don't fail if we can't simplify.
4735 (g95_resolve_expr): Ditto.
4736 (resolce_code): Mark as static.
4737 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
4738 gimplifer doesn't (yet).
4740 2003-06-20 Paul Brook <paul@nowt.org>
4742 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
4743 * match.c (g95_match_if): Add ST_PAUSE.
4744 (g95_match_stopcode): New function.
4745 (g95_match_pause, g95_match_stop): Use it.
4746 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
4747 (decode_stmt, next_statement, parse_executable): Ditto.
4748 * resolve.c (resolve_code): Ditto.
4749 * st.c (g95_free_statement): Ditto.
4750 * trans-stmt.c (g95_trans_pause): New function.
4751 * trans-stmt.h: Declare it.
4752 * trans.c (g95_trans_code): Use it.
4753 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
4755 (g95_build_builtin_function_decls): Initialize them.
4757 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
4759 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4761 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
4762 match_filepos): Fix error handling.
4764 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4766 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
4767 Add assertions on arguments.
4768 * resolve.c (expression_shape): Remove useless &.
4769 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
4770 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
4771 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
4772 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
4773 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
4774 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
4775 (g95_simplify_not, g95_simplify_scale): Add assertions.
4777 2003-06-15 Paul Brook <paul@nowt.org>
4779 Clean up stuff to work with the ssa optimizers.
4780 * convert.c (convert): Handle BOOLEAN_TYPEs.
4781 * f95-lang.c (g95_truthvalue_conversion): Implement.
4782 * trans-array.c (g95_trans_array_constructor_value): Group multiple
4784 * trans.h (g95_truthvalue_conversion): Declare.
4785 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
4786 * trans-stmt.c (g95_trans_character_select): Don't create array
4787 assignments. Mark labels as indirect jump targets.
4788 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
4789 (g95_get_dtype_cst): Handle LOGICAL types.
4791 2003-06-14 Paul Brook <paul@nowt.org>
4793 * f95-lang.c (g95_gimplify_expr): New function.
4794 * trans-array.c (g95_trans_array_constructor_value): Don't create
4796 (g95_conv_expr_descriptor): Rename simple->gimple.
4797 * trans-expr.c (conv_expr_op): Use proper logical operators.
4798 * trans-intrinsic.c (build_fixbound_expr): New function.
4799 (build_fix_expr): Ditto.
4800 (g95_conv_intinsic_aint): Use them. Use builtin functions.
4801 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
4803 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4805 * array.c (g95_compare_array_spec): Remove unreachable code.
4806 * expr.c (g95_copy_expr): Likewise.
4807 * intrinsic.c (g95_convert_type): Likewise.
4808 * misc.c (g95_code2string): Likewise.
4809 * simplify.c (g95_simplify_ishft, g95_simplify_real,
4810 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
4811 * trans-stmt.c (g95_trans_select): Likewise.
4812 * primary.c (extend_ref): Add an assertion.
4813 * simplify.c (g95_convert_constant): Add const.
4814 * intrinsic.h: Remove g95_check_x_ni.
4815 * f95-lang.c (g95_finish): Call g95_release_include_path.
4817 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4819 * resolve.c (resolve_contained_functions): Fix typo introduced on
4822 2003-06-09 Paul Brook <paul@nowt.org>
4824 * g95.h: Include system.h not hwint.h.
4825 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
4826 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
4828 2003-06-09 Paul Brook <paul@nowt.org>
4830 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
4831 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
4832 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
4833 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
4834 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
4836 * trans.h (g95_trans_equivalence, g95_trans_common,
4837 g95_add_decl_to_function): Declare.
4838 * trans-common.c, trans-equivalence.c: New files.
4840 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
4842 * intrinsic.c (g95_intrinsic_extension): Remove.
4843 (add_functions): Substitute g95_check_x for g95_check_x_ni
4845 (g95_init_expr_extensions): New function.
4846 (g95_intrinsic_func_interface): Use it.
4847 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
4848 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
4849 g95_check_precision, g95_check_present, g95_check_radix,
4850 g95_check_range, g95_check_selected_real_kind): Do not set
4851 g95_intrinsic_extension.
4852 (g95_check_x_ni): Remove now duplicate of g95_check_x.
4854 * expr.c (check_inquiry): Add FIXME, fixup some code style.
4856 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4858 * g95.h (ref_type): Name this type explicitly.
4859 * module.c (MIO_NAME): Add specialisations of mio_name.
4860 (mio_symbol_attribute, mio_typespec, mio_array_ref,
4861 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
4862 (ab_attribute): Name this type explicitly.
4863 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
4865 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
4867 * trans-intrinsic.c (g95_conv_allocated): New function.
4868 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
4870 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
4872 * f95-lang.c: Don't include g95-support.h
4873 (g95_mark_addressable): Add prototype.
4874 (g95_init_decl_processing): Remove C front end hack.
4875 * f95-tree.c: Remove file.
4876 * support.c: Remove file.
4877 * g95-support.h: Remove file.
4878 * trans-types.c (g95_init_types): Set up boolean
4879 type related tree nodes.
4880 * Make-lang.in: Remove rules for dead files and
4881 dependencies on them.
4883 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
4885 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
4886 C front end dependency. Also, convert.c does not depend on
4887 g95-support.h anymore.
4888 * convert.c: Don't include c-common.h and g95-support.h
4889 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
4890 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
4891 stmts_are_full_exprs_p, current_stmt_tree,
4892 current_scope_stmt_stack): Remove.
4893 * g95-support.h (unsigned_conversion_warning): Kill proto.
4894 (boolean_type_node, boolean_true_node, boolean_false_node):
4895 Don't define here. Instead, make then true tree nodes in
4897 * support.c (c_global_trees): Die, C front end, die!!!
4898 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
4899 uintmax_type_node, string_type_node and const_string_type_node.
4900 (decl_constant_value, overflow_warning): Make static functions.
4901 They are in death row too, though.
4902 (default_conversion, c_expand_asm_operands): Remove.
4903 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
4904 trans.c: Don't include c-common.h.
4905 * trans-types.c (boolean_type_node, boolean_true_node,
4906 boolean_false_node): Make them real tree nodes.
4907 * trans-types.h (intmax_type_node, string_type_node,
4908 const_string_type_node): Hack to work around C dependencies
4909 in builtin-types.def.
4911 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4913 * decl.c (decl_types): Add some iterators-like sentinels.
4914 * decl.c (match_attr_spec): Use them.
4915 Use "decl_types" instead of "int".
4916 Add cast in call to g95_match_strings.
4917 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
4919 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
4920 (g95_interface_info): Use "g95_intrinsic_op".
4921 * dump-parse-tree.c (g95_show_namespace): Use them.
4922 * interface.c (g95_check_interfaces): Use them.
4923 * module.c (read_module, write_module): Use them.
4924 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
4925 Use "g95_intrinsic_op".
4926 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
4927 Add a default case in switch statement.
4928 * intrinsic.h (g95_generic_isym_id): Moved to...
4929 * g95.h (g95_generic_isym_id): here.
4930 (g95_intrinsic_sym): Use "g95_generic_isym_id".
4931 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
4932 * trans-intrinsic.c (g95_intrinsic_map_t,
4933 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
4934 * match.c (g95_match_intrinsic_op): Add cast in call to
4937 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
4939 * support.c (skip_evaluation, warn_conversion, lvalue_p,
4940 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
4941 constant_fits_type_p, convert_and_check,
4942 unsigned_conversion_warning): Remove these ugly remnants
4943 we inherited from the C front end.
4944 (function_types_compatible): Remove '#if 0'-edcode.
4945 (build_modify_expr): Likewise.
4946 (convert_for_assignment): Don't use the deceased functions.
4947 The parameter fundecl is now unused.
4948 (decl_constant_value): Always just return decl. In fact
4949 this function is not used at present, but it might be in
4950 the future, when we start using the tree inliner.
4951 (overflow_warning, default_conversion, c_expand_asm_operands):
4952 Abort when these are called, they are part of the C type
4953 checking implementation and therefore poison to Fortran.
4955 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
4957 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
4958 c-pretty-print.o and c-dump.o. Add a comment on why we
4959 depend on c-semantics.c.
4960 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
4961 Don't use the C front end tree dumper hook to dump the
4962 language specific tree representation -- we don't have
4963 one. So instead, inherit the default langhook.
4965 2003-06-02 Paul Brook <paul@nowt.org>
4967 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
4969 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4971 * check.c (g95_check_associated): Use proper types. Remove
4972 extraneous argument in call to g95_error().
4974 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4976 * resolve.c (resolve_operator): Make logical operands convert to the
4977 type with higher kind.
4979 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4981 * check.c (g95_check_associated): Make sure both pointer and target has
4982 the same type and rank. Null pointer or array section with vector
4983 subscript as target are not allowed.
4984 * trans.h: Declare gfor_fndecl_associated.
4985 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
4986 gfor_fndecl_associated.
4987 * trans-intrinsic.c (g95_conv_associated): New function.
4988 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
4990 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4992 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
4993 according to POINTER itself rather than TARGET.
4994 (g95_conv_expr_descriptor): Make lbound start at 1.
4995 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
4997 2003-06-01 Paul Brook <paul@nowt.org>
4999 * expr.c (g95_type_convert_binary): Make it match the standard.
5000 * g95.texi: Remove dead link.
5002 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
5004 * g95.texi: Cleanup somewhat in preparation for inclusion
5007 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5008 Canqun Yang <canqun@yahoo.com.cn>
5010 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
5012 (g95_find_forall_index): Return proper value.
5013 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
5014 compare the return value from g95_find_forall_index.
5016 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5017 * g95.h, io.c (g95_st_label): Remove "length".
5018 (g95_symtree): Remove "link".
5019 (g95_case): Remove "code".
5020 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
5021 g95_convert_real): Make an argument pointer to const.
5022 * decl.c (colon_seen): Add a TODO.
5023 * interface.c (g95_compare_types): Fix typo.
5024 * interface.c (compare_interfaces): Preserve value of "p".
5025 * intrinsic.c (sort_actual): Remove "i".
5026 * match.c (g95_match_assign): Proper type in call to g95_match().
5027 * parse.c (next_free): Avoid duplicate call due to macro.
5028 * parse.c (check_statement_label): wrong type in call to g95_error.
5029 * primary.c (match_real_constant): Add a TODO.
5030 * resolve.c (resolve_select): Remove useless conditional.
5031 * simplify.c (g95_simplify_repeat): Proper assignment to
5032 "value.character.string".
5033 * simplify.c (g95_simplify_reshape): Wrong variable in call to
5036 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
5038 * trans-stmt.c: Remove unnecessary include file defaults.h.
5040 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
5042 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
5044 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
5045 actual variables used as FORALL indexes.
5047 2003-05-15 Paul Brook <paul@nowt.org>
5049 * trans-array.c (g95_trans_static_array_pointer): Use
5051 (g95_trans_deferred_array): Initialize static array pointers.
5052 * trans-expr.c (g95_conv_function_call): Use formal arglist to
5053 correctly pass POINTER and absent CHARACTER arguments.
5055 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
5057 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
5058 (g95_resolve_forall_body): Resolve FORALL body.
5059 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
5060 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
5061 (g95_find_forall_index): Check whether the FORALL index appears in
5062 the expression or not.
5063 (resolve_code): Modified.
5065 2003-05-14 Paul Brook <paul@nowt.org>
5067 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
5069 2003-05-13 Paul Brook <paul@nowt.org>
5071 * trans-types.c (g95_max_array_element_size): Now a tree node.
5072 (g95_init_types): Work out max size properly.
5073 (g95_get_dtype_cst): Modify to match.
5075 2003-05-11 Paul Brook <paul@nowt.org>
5077 * trans-io.c (add_case): Create a label decl for case labels.
5079 2003-05-11 Paul Brook <paul@nowt.org>
5081 * arith.c (g95_integer_index_kind): New variable.
5082 * f95-lang.c (g95_init): Move frontend initialization here ...
5083 (g95_post_options): ... from here.
5084 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
5085 * intrinsic.c (add_functions): Use index kinds.
5086 * iresolve.c: Convert to index_kind where needed.
5087 * resolve.c (g95_resolve_index): Make public, use index_kind.
5088 (resolve_array_ref): Adjust to match.
5089 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
5090 * trans-stmt.c: Ditto.
5091 * trans-types.c: Ditto.
5092 * trans-types.h (g95_array_index_kind): Remove declaration.
5093 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
5095 2003-05-07 Paul Brook <paul@nowt.org>
5097 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
5098 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
5101 2003-05-07 Paul Brook <paul@nowt.org>
5103 * trans-array.c (trans_static_array_pointer,
5104 g95_trans_array_constructor_value, g95_conv_array_initializer,
5105 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
5106 (g95_add_loop_ss_code): Convert subscripts to the correct type.
5107 * trans-stmt.c (g95_trans_character_select): Ditto.
5108 * trans-types.c (g95_init_types): Ditto.
5110 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
5112 * f95-lang.c (expand_function_body): Use input_line, not lineno.
5113 * trans-decl.c (g95_generate_function_code,
5114 g95_generate_constructors): Likewise.
5115 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
5116 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
5119 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5120 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
5121 with components point to the DERIVED type itself, and two DERIVED
5122 type with components point to each other.
5123 * trans-expr.c (g95_conv_componet_ref): Modified
5125 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5126 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
5128 (g95_trans_pointer_assign): Implement Nullify.
5130 2003-05-01 Paul Brook <paul@nowt.org>
5132 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
5133 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
5135 2003-05-01 Paul Brook <paul@nowr.org>
5137 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
5138 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
5141 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
5143 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
5146 2003-04-28 Paul Brook <paul@nowt.org>
5148 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
5149 as their kind suggests.
5150 (g95_resolve_reshape): Ditto.
5152 2003-04-28 Chun Huang <compiler@sohu.com>
5154 * trans-expr.c (g95_conv_substring_expr): New function.
5155 (g95_conv_expr): Use it.
5157 2003-04-28 Paul Brook <paul@nowt.org>
5159 * iresolve.c (g95_resolve_transpose): Make it match the
5161 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
5163 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
5165 * trans-types.c (g95_add_field_to_struct): New function to
5166 add a field to a UNION_TYPE or RECORD_TYPE.
5167 * trans-types.h (g95_add_field_to_struct): Prototype.
5168 (g95_get_derived_type): Use g95_add_field_to_struct to add
5170 * trans-io.c (g95_add_field): Remove.
5171 (ADD_FIELD): Use new g95_add_field_to_struct function.
5172 (ADD_STRING): Likewise.
5173 * trans-stmt.c (g95_trans_select): Likewise.
5174 (g95_add_field): Remove duplicated function.
5176 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
5178 Port implementation for CHARACTER SELECT from Andy's tree.
5179 * trans-stmt.c (g95_trans_character_select): Implement character
5180 select. (g95_add_field): New function.
5181 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
5182 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
5183 * g95.h (struct g95_case): Add field 'int n'.
5184 * trans.h: Declare 'gfor_fndecl_select_string'.
5186 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
5188 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
5189 (g95_insert_bbd): Die on duplicates.
5190 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
5192 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
5194 * g95.texi: Require GMP 4.0 -- like we actually
5195 do. Explain the testsuite and what-goes-where.
5196 Don't use undefined texinfo symbol. Break very
5197 long line. Remove finished item from the list
5200 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
5202 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
5205 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
5207 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
5208 (g95_trans_forall_body): New function.
5210 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
5212 * resolve.c (resove_where): New function.
5213 (resolve_where_shape): New function.
5214 (resolve_code): Add call to 'resolve_where'
5215 * trans-stmt.c (g95_trans_where): Modified.
5216 (g95_trans_where_2): New function.
5217 (g95_trans_where_assign): New function.
5218 (g95_evaluate_where_mask): New function.
5219 (g95_add_to_stmt_list): New function.
5220 (g95_get_temp_expr): New function.
5221 * trans.h (where_stmt_list): New structure.
5223 2003-04-10 Paul Brook <paul@nowt.org>
5225 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
5226 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
5228 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
5230 Update after mainline -> tree-ssa-branch merge.
5231 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
5233 (g95_init): Update for new lang_hooks definition.
5234 (g95_post_options): New langhook.
5235 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
5236 * scanner.c (g95_new_file): Comment update.
5238 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5240 * g95.h, lang-options.h: Add -Wimplicit-interface.
5241 * options.c (g95_init_options, g95_parse_arg): Set it.
5242 * interface.c (check_intents): Warn about call with implicit
5244 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
5247 2003-04-05 Paul Brook <paul@nowt.org>
5249 * iresolve.c (g95_resolve_spread): Don't resole based on type.
5250 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
5252 2003-03-29 Paul Brook <paul@nowt.org>
5254 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
5255 (g95_resolve_unpack): Ditto.
5256 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
5257 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
5258 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
5260 2003-03-25 Paul Brook <paul@nowt.org>
5262 * arith.c (g95_unary_user, g95_user): Remove dead functions.
5264 * array.c (g95_free_array_ref): Ditto.
5266 * symbol.c (g95_use_derived_tree): Ditto.
5267 * intrinsic.c (add_functions): Use simplification for SCALE.
5268 * primary.c (g95_match_rvalue): Test sym, not symtree.
5270 2003-03-25 Paul Brook <paul@nowt.org>
5272 * trans-decl.c (build_function_decl): Add parameter before it gets
5273 turned into a constant.
5274 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
5275 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
5276 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
5278 2003-03-22 Paul Brook <paul@nowt.org>
5280 * trans-array.c (g95_conv_array_initializer): Allow scalar
5282 * trans-decl.c (g95_finish_var_decl): Result variables are not
5284 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
5285 (g95_conv_intrinsic_function): Use it.
5286 * trans-types.h (g95_type_spec): Remove dead declaration.
5288 2003-03-21 Paul Brook <paul@nowt.org>
5290 * trans-decl.c (g95_build_function_decl): Mark string parameters.
5292 2003-03-20 Paul Brook <paul@nowt.org>
5294 * trans-decl.c (g95_build_function_decl): Put character length
5295 parameters at the end of the function declaration.
5296 * trans-expr.c (g95_conv_function_call): Ditto.
5297 * trans-types.c (g95_get_function_type): Ditto.
5299 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5301 * resolve.c (resolve_formal_arglist): Don't impose intent for
5302 procedure arguments of pure functions.
5303 (resolve_select): Remove redundant assignment.
5305 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5307 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
5309 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
5310 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
5312 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
5314 * symbol.c (g95_add_type): Fix typo in comment.
5317 2003-03-16 Paul Brook <paul@nowt.org>
5319 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
5320 * expr.c (g95_build_call): Remove.
5321 * f95-lang.c (puchdecl_top_level): New function.
5322 * g95.h (g95_code): Store resolved symbol, not just the name.
5323 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
5324 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
5325 (g95_get_intrinsic_sub_symbol): New function.
5326 * iresolve.c (g95_resolve_cpu_time): Use it.
5327 (g95_resolve_random_number): Ditto.
5328 * resolve.c: Set code->resolved_sym instead of code->sub_name.
5329 * trans-decl.c (g95_get_extern_function_decl): Give external decls
5330 the correct DECL_CONTEXT. Add global symbold to the global scope.
5331 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
5334 2003-03-16 Paul Brook <paul@nowt.org>
5336 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
5337 * options.c (g95_parse_arg): Ditto.
5338 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
5339 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
5340 for the procedure, not the parameter.
5341 * trans-array.c (g95_trans_g77_array): New function.
5342 (g95_trans_assumed_size): Use it.
5343 (g95_trans_dummy_array_bias): Ditto.
5344 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
5345 (g95_conv_expr_descriptor): ... to here. Update callers.
5346 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
5347 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
5348 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
5349 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
5350 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
5351 (g95_sym_type): Ditto.
5353 2003-03-15 Paul Brook <paul@nowt.org>
5355 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
5357 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
5359 2003-03-14 Paul Brook <paul@nowt.org>
5361 * trans-array.c (g95_array_is_packed): Remove.
5362 (g95_conv_array_base): Correctly handle all descriptorless cases.
5363 (g95_conv_array_stride): Use descriptorless strides.
5364 (g95_trans_dummy_array_bias): Don't always repack the array.
5365 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
5367 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
5368 dummy and non-dummy arrays...
5369 (g95_sym_type, g95_get_derived_type): ... like these.
5370 (g95_get_array_type_bounds): Allow discontiguous arrays.
5372 2003-03-12 Paul Brook <paul@nowt.org>
5374 * array.c (g95_resolve_array_spec): Fix comment.
5375 * g95.h (symbol_attributes): New flag always_explicit.
5376 * resolve.c (resolve_formal_arglist): Set it always_explicit.
5377 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
5378 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
5379 (g95_trans_array_bounds): Allow assumed shape arrays.
5380 (g95_trans_repack_array): Remove.
5381 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
5382 * trans-decl.c (g95_build_qualified_array): Only ignore absent
5383 bounds for assumed size arrays.
5384 (g95_build_dummy_array_decl): Use descriptorless arrays.
5385 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
5386 (g95_trans_pointer_assign): Fix typo.
5387 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
5389 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
5390 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
5391 Also modify callers.
5392 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
5394 2003-03-08 Paul Brook <paul@nowt.org>
5396 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
5397 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
5398 * resolve.c (compare_spec_to_ref): Allow full array sections.
5400 2003-03-08 Paul Brook <paul@nowt.org>
5402 * expr.c (g95_simplify_expr): Also simplify array index and
5403 substring expressions.
5404 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
5405 * trans-array.c (g95_trans_array_bounds): New function.
5406 (g95_trans_auto_array_allocation): Use it.
5407 (g95_trans_assumed_size): Rewrite.
5408 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5409 (gfor_fndecl_repack): Remove.
5410 (g95_build_qualified_array): Handle absent upper bounds.
5411 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
5412 (g95_get_symbol_decl): Update.
5413 (g95_build_intrinsic_function_decls): Initialize new decls.
5414 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5415 (gfor_fndecl_repack): Remove.
5416 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
5417 * trans-types.c: (g95_build_array_type): Merge duplicated code..
5418 (g95_get_nodesc_array_type): Handle absent bounds.
5419 * trans-types.h (g95_get_nodesc_array_type): Declare.
5421 2003-03-04 Paul Brook <paul@nowt.org>
5423 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
5426 2003-03-02 Paul Brook <paul@nowt.org>
5428 * options.c (g95_init_options): Drfault to 1.
5429 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
5430 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
5431 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
5432 Handle non-constant size automatic arrays.
5433 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
5434 generic bound functions.
5435 (g95_trans_auto_array_allocation): Don't create a descriptor.
5436 (g95_trans_assumed_size): New function (broken).
5437 (g95_trans_dummy_array_bias): Remove unused var.
5438 * trans-array.h (g95_trans_assumed_size): Declare.
5439 * trans-decl.c (create_index_var): New fuction.
5440 (g95_build_qualified_array): New function.
5441 (g95_get_symbol_decl): Use it.
5442 (g95_trans_deferred_vars): Handle assumed shape seperately.
5443 * trans-types.c (get_element_type): Handle heap allocated arrays.
5444 (g95_is_nodesc_array): Include non-const size arrays.
5445 (g95_get_nodesc_array_type): Ditto.
5447 2003-02-23 Paul Brook <paul@nowt.org>
5449 * trans-array.c (g95_array_init_size): Should use stride, not size of
5452 2003-02-18 Paul Brook <paul@nowt.org>
5454 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
5455 after intrinsic function check.
5457 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5459 * io.c (match_io): Fix missing return value and remove useless
5461 * match.c (g95_match): Remove useless assignment.
5462 * module.c (parse_string): Remove useless post increment.
5463 * simplify.c (g95_simplify_verify): Remove useless assignment.
5465 2003-02-15 Paul Brook <paul@nowt.org>
5467 * expr.c (restricted_intrinsic): Handle bad values gracefully.
5468 * g95.h (symbol_attribute): Add referenced member.
5469 (g95_symbol): Add dummy_order member.
5470 (g95_set_sym_referenced): Declare.
5471 * match.c (g95_match_assignment, g95_match_call): Use it
5472 * primary.c (match_actual_arg, g95_match_rvalue,
5473 g95_match_variable): Ditto.
5474 * symbol.c (next_dummy_order): New variable.
5475 (g95_set_sym_referenced): New function.
5476 (check_done): New function.
5477 (g95_add_*): Use it.
5478 * trans-decl.c: Make formatting conform to GCC standards.
5479 (g95_defer_symbol_init): Add dummy variables in the right order.
5480 (g95_get_symbol_decl): Only accept referenced variables.
5481 (g95_create_module_variable): Module variables are always required.
5482 (generatr_local_decls): New function.
5483 (generate_local_vars): New function.
5484 (g95_generate_function_code): Use it.
5486 2003-02-13 Paul Brook <paul@nowt.org>
5488 * trans-decl.c (g95_conv_struct_cons): Remove.
5489 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
5490 * trans-expr.c (g95_conv_structure): New function.
5491 (g95_conv_expr): Use it.
5493 2003-02-09 Paul Brook <paul@nowt.org>
5495 * trans-array.c (g95_array_init_size): Don't evaluate the linit
5496 expressions multiple times.
5497 (g95_trans_auto_arry_allocation): Use pointer not tmp.
5499 2003-02-08 Paul Brook <paul@nowt.org>
5501 * module.c (mio_symtree_ref): Declare as static.
5502 (mio_expr): Remove dead code.
5503 (read_module): Set the symtree link for fixups.
5504 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
5505 (build_round_expr): ... to this.
5506 (g95_conv_intrinsic_aint): New function.
5507 (g95_conv_intrinsic_function): Use it.
5509 2003-02-08 Paul Brook <paul@nowt.org>
5511 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
5512 offset after modificaton, not the increment expression.
5513 * dependency.c: Kill excess whitespace.
5515 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
5517 * dependency.h: Remove some function declarations.
5518 * dependency.c (get_no_of_elements): Change this function not to
5520 * other: Add comments for all modified functions.
5522 2003-02-06 Paul Brook <paul@nowt.org>
5524 * g95spec.c (lang_specific_functions): Fix initializer warning.
5525 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
5526 for structure type names.
5527 * trans-decl.c (g95_cons_structure_cons): New function.
5528 (g95_get_symbol_decl): Use it.
5529 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
5532 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5534 * resolve.c (compare_cases): Add const to casts.
5536 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5538 * g95.h (g95_check_f): Change a1 to f1m.
5539 * intrinsic.c (add_sym_1m, check_specific,
5540 g95_intrinsic_func_interface): Use it.
5542 * module.c (init_pi_tree): Remove useless cast.
5543 (fp2): Fix argument type.
5545 * parse.c (parse_select_block): Add comment.
5547 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
5549 * lang-options.h: Fix warning involving C90 concatenated
5552 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5553 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5555 * io.c (format_asterisk): Complete initializer to kill warning.
5556 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
5557 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
5558 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
5559 new defines to complete initializers. Kills all warnings.
5561 * Make-lang.in: Comment cleanup.
5563 2003-02-05 Paul Brook <paul@nowt.org>
5565 * array.c (g95_free_constructor): Handle NULL expressions.
5566 * resolve.c (resolve_structure_cons): Ditto.
5567 * decl.c (g95_match_null): New Function.
5568 (variable_decl): Use it.
5569 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
5570 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
5571 * trans-types.c (g95_set_decl_attributes): Remove empty function.
5573 2003-02-05 Paul Brook <paul@nowt.org>
5575 * trans.h (build1_v): New macro.
5576 (build_v): Remove pointless and incorrect prototype.
5577 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
5578 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
5580 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
5582 * Make-lang.in (F95_OBJS): Remove one more dead file.
5584 2003-02-01 Paul Brook <paul@nowt.org>
5586 * lang-specs.h: Don't pass -ffixed-form to the linker.
5587 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
5589 2003-02-01 Paul Brook <paul@nowt.org>
5591 * Make-lang.in (F95_OBJS): Remove dead files.
5592 * trans-array.c (g95_array_init_size): Do the right thing when
5594 * trans-decl.c (g95_generate_function_code): Initialize deffered
5595 symbol list before translating contained subroutines.
5596 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
5597 scalar invariant values here...
5598 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
5599 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
5601 2003-01-29 Paul Brook <paul@nowt.org>
5603 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
5604 (g95_walk_elemental_function_args): Reverse chains before adding.
5605 (g95_reverse_ss): Move about a bit.
5606 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
5609 2003-01-28 Paul Brook <paul@nowt.org>
5611 * intrinsic.c (resolve_intrinsic): Use correct union member.
5612 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
5614 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
5615 use associated variables.
5616 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
5617 * trans-expr.c (g95_conv_expr_present): ... to here.
5618 * trans.h: Declare it.
5619 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
5621 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5623 * array.c (expand_iterator): Suppress useless assignment.
5624 * decl.c (match_char_spec): Ditto.
5625 * io.c (match_io_iterator): Ditto.
5626 * primary.c (match_real_constant): Ditto.
5627 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
5628 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
5629 * matchexp.c (match_add_operand, match_level_5): Likewise.
5630 * module.c (parse_atom, find_enum): Likewise.
5631 * resolve.c: move #include <string.h>
5632 (resolve_select): Fix serious typo.
5634 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
5636 * Make-lang.in: Don't build with broken tree-ssa-pre.
5638 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
5640 * resolve.c (resolve_index): Add a TODO.
5641 * symbol.c: Remove useless "#include <ctype.h>".
5643 2003-01-27 Paul Brook <paul@nowt.org>
5645 * check.c (check_rest): Allow different type kinds as an extension.
5646 * g95.h (g95_resolve_f): Add f1m.
5647 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
5648 * intrinsic.h: Chenge prototypes for MIN and MAX.
5649 * iresolve.c (g95_resolve_minmax): New function.
5650 (g95_resolve_min, g95_resolve_max): Use it.
5651 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
5653 (g95_conv_intrinsic_present): Fix logic.
5655 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
5657 * g95.h (g95_case): Don't be a tree, be a double linked list.
5658 * match.c (match_case_selector): Remove redundant semantics check.
5659 Clean up a few goto's to make it a tiny little bit faster.
5660 * resolve.c (case_tree): Die.
5661 (compare_cases): Accept and compare unbounded cases too.
5662 (check_case_overlap): Don't build a tree. Instead, merge-sort the
5663 whole list of g95_cases passed from resolve_select.
5664 (sane_logical_select): Die.
5665 (check_case_expr): Return FAILURE if a CASE label is of the wrong
5667 (resolve_select): Fixup case expression for computed GOTOs, put it
5668 in expr, not expr2, for easier handing in the parse tree dumper and
5669 the code generator. Rewrite the rest of the function: Kill
5670 unreachable case labels and unreachable case blocks.
5671 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
5672 an EXEC_SELECT, not case2 anymore.
5673 * trans-const.c (g95_conv_constant_to_tree): New function.
5674 (g95_conv_constant): Use it.
5675 * trans-const.h: Declare prototype for the new function.
5676 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
5677 g95_trans_character_select): New static functions.
5678 (g95_trans_select): Rewrite.
5680 2003-01-26 Paul Brook <paul@nowt.org>
5682 * intrinsic.c (add_fnctions): Properly add dreal.
5683 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
5684 (g95_conv_intrinsic_function): Use it.
5685 * trans-io.c (build_dt): Abort on internal files (unimplemented).
5687 2003-01-26 Paul Brook <paul@nowt.org>
5689 Widespread changes to the handling of symbols in expressions. These
5690 are now linked via g95_symtree nodes.
5691 * parse.c (g95_fixup_sibling symbols): New function.
5692 (parse_contained): Use it.
5693 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
5694 contained procedure that has bee correctly fixed up.
5695 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
5697 2003-01-24 Paul Brook <paul@nowt.org>
5699 * trans-array.c (g95_walk_expr): Function result attributes are in
5701 * trans-expr.c (g95_conv_function_call,
5702 g95_trans_arrayfunc_assign): Ditto.
5703 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
5705 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
5707 * expr.c (check_restricted): Fix error message.
5708 * symbol.c (free_st_labels): Plug memleak.
5710 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
5712 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
5713 reduce_binary_aa, reduce_binary, eval_intrinsic,
5714 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
5715 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
5716 for typesafe intrinsics helper functions.
5717 (g95_intrinsic_sym): Use them.
5718 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
5719 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
5720 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
5721 check_specific, g95_intrinsic_func_interface,
5722 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
5724 * trans-decl.c (g95_get_extern_function_decl): Likewise.
5725 * Make-lang.in: Don't disable warnings for strict prototypes
5726 any longer, everything is typesafe now.
5728 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
5730 * bbt.c (duplicate_node): Make static.
5731 * module.c (module_name): Make static.
5732 * scanner.c (include_dirs): Make static.
5734 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5736 Hard coded _gfor_'s should not show up anymore.
5737 * g95.h (PREFIX): New macro.
5738 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
5740 (g95_resolve_random_number): Likewise.
5741 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
5742 * trans-io.c: Remove 'prefix' macro. Replace all uses with
5743 the new PREFIX macro from g95.h.
5745 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5747 The troubles of forking... Andy implemented this just now too.
5748 Let's stick to that and keep the trees close.
5749 * g95.h (g95_st_label): 'format' member is now a g95_expr.
5750 * io.c: Revert previous changes.
5751 (g95_match_format): Match the format string as a character
5753 * match.h (g95_statement_label): Declare external.
5754 * parse.c: Revert previous changes.
5755 * symbol.c (g95_free_st_label): Free a g95_expr instead
5757 * trans-io.c: Revert previous changes.
5758 (build_dt): Use set_string to set the format string.
5760 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5762 * io.c (format_string): Make non-static.
5763 (g95_match_format): Remember the format string.
5764 (terminate_io): Add I/O termination for empty I/O lists.
5765 * match.h: Declare external format_string.
5766 * parse.c (check_statement_label): Attack the format string
5767 to a format label for FORMAT statements.
5768 * trans-io.c (g95_add_field): Define prefix macro. Replace
5769 all uses of PREFIX define with a use of this macro.
5770 (build_dt): Implement formatted I/O for format labels.
5772 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5774 * lang-options.h: Kill "-std=F".
5775 * options.c: Remove unimplemented "-std=F". Modify
5777 * misc.c (g95_terminal_width): New function.
5778 * error.c (g95_error_init_1): Use g95_terminal_width.
5779 * g95.h: Add prototype for g95_terminal_width, remove
5782 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
5784 * Make-lang.in: Fix typo.
5786 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
5788 * g95.h (struct g95_case): Remove unused cruft, new member
5789 'where' to keep track of the locus of the default case.
5790 * match.c (g95_match_case): Add locus to the current case.
5791 (match_case_selector): Likewise.
5792 * parse.c (parse_select_block): Move semantics check for
5793 multiple DEFAULT cases out of here to...
5794 * resolve.c (check_case_overlap): ...here. Return sooner
5796 (check_case_expr): Take two g95_cases now, use to sure the
5797 expression kinds are the same.
5798 (resolve_select): Cleanup.
5800 2003-01-18 Paul Brook <paul@nowt.org>
5802 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
5803 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
5805 (g95_get_extern_function_decl): Put decls in the correct context.
5807 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
5809 * trans-io.c: Port changes from Andy to set ERR flag.
5811 2003-01-17 Paul Brook <paul@nowt.org>
5813 * trans-array.c: Add various comments.
5814 (g95_ss_terminator): Declare as const.
5815 (g95_walk_expr): Remove first parameter and update all callers.
5816 (g95_walk_op_expr): Initialize scalar SS properly.
5817 * trans-array.h (g95_walk_expr): Update prototype.
5818 * trans-expr.c: Update for new g95_walk_expr.
5819 * trans-intrinsic.c: Ditto.
5820 * trans-io.c: Ditto.
5821 * trans.h: Various comments for SS chains.
5823 2003-01-17 Paul Brook <paul@nowt.org>
5825 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
5827 * intrinsic.c (add_functions): Use them.
5828 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
5829 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
5831 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5833 Fallout of a small merge conflict:
5834 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
5836 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5838 * initrinsic.c: New add_sym_* functions for strong typing.
5839 (add_conv): Make prototype strict.
5840 * dump-parse-tree.c, dependency.c: Include config.h
5841 * resolve.c, trans-io.c: Fix typos.
5843 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5845 * dump-parse-tree.c (g95_show_code_node): Show the
5846 condition for a computed GOTO that was transformed
5847 to a SELECT CASE construct.
5848 * resolve.c (check_case_overlap): Revert previous switch
5849 to treaps, it was too slow and didn't catch all trouble.
5850 (resolve_symbol): Be more flexible about module procedures.
5851 * symbol.c (check_conflict): Point to relevant section in
5852 the standard for dubious conflict. Allow procedure
5853 dummy arguments to be optional again.
5854 * trans-io (add_field): Rename to g95_add_field. Change
5856 * trans-stmt (trans_select): Handle unbounded cases for
5857 integer SELECT CASE constructs. Fix/add more comment.
5859 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5861 * g95.h: Uses GCC's function attribute macros.
5862 * error.c, module.c, parse.c, g95.h: More function attributes.
5864 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
5866 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
5867 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
5870 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
5872 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
5874 * trans.c (g95_trans_code): Use annotate_all_with_file_line
5875 instead of nowdead wrap_all_with_wfl.
5877 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5879 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
5880 before generating code, so we can still see it even if the code
5881 generation phase dies.
5883 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5885 * decl.c (build_sym): Split out initialization expression parts...
5886 (add_init_expr_to_sym): ...to here.
5887 (variable_decl): Add the symbol following an attribute list to the
5888 symbol tree before parsing the optional initialization expression
5889 if the symbol is not of a derived type.
5890 * primary.c (g95_match_rvalue): Don't assume a symbol always has
5891 a value if it is a PARAMETER.
5893 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5895 * misc.c: Don't #include <mcheck.h>
5896 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
5897 ever was a glibc bug, then either this was never reported to
5898 glibc people, or it has been fixed for so long that there's
5899 no information you can find about it, anywhere.
5901 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5904 * module.c (attr_bits, bt_types, array_spec_types):
5905 Switch 'const' and 'static'.
5906 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
5908 GNU'ify source code:
5909 * trans-io.c: Numerous fixes, one fixed warning and a few
5910 TODO markers so that we don't forget about them.
5912 2003-01-13 Paul Brook <paul@nowt.org>
5914 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
5915 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
5917 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
5918 * match.c (g95_match_stop): Fix dumb == -> != error.
5920 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
5922 * dump-parse-tree.c (show_indent): Add line breaks. This
5923 whole dumping process needs cleanups.
5924 * f95-lang.c (g95_mark_addressable): Fix prototype to match
5925 the langhook. Fix 'return's accordingly.
5926 * g95-support.h: Adjust prototype.
5927 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
5928 * lang-options.h: Add '-fsyntax-only'.
5929 * options.c (g95_init_options): Init 'no_backend'.
5930 (g95_parse_arg): Deal with '-fsyntax-only'.
5931 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
5934 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
5936 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
5937 arguments. Also make sure that if a symbol is marked INTRINSIC,
5938 an intrinsic with the symbol's name actually exists.
5939 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
5940 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
5941 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
5943 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
5945 * resolve.c (resolve_contained_functions): Fix condition, don't
5946 throw internal_error if a child namespace has no name. Apparently
5947 this can be the case?
5949 2003-01-11 Paul Brook <paul@nowt.org>
5951 Port changes from Andy's tree:
5952 * g95.h (g95_code): Add stop_code.
5953 * match.c (g95_match_stop): Detter syntax checking.
5954 * resolve.c (resolve_generic_f0): Return match type.
5955 (resolve_generic_f): Remove dead/duplicated code.
5956 (resolve_specific_f): Ditto.
5957 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
5958 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
5959 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
5961 2003-01-11 Paul Brook <paul@nowt.org>
5963 * trans-array.c: Various documentation/comment changes.
5964 * trans-stmt.c: Ditto.
5967 2003-01-10 Paul Brook <paul@nowt.org>
5969 * options.c/h: Add -fdump-parse-tree as alias of -v.
5971 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5973 * dump-parse-tree.c (g95_show_namespace): Fixed another
5974 typo. Sorry, it's Friday...
5976 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5979 * trans-array.c, trans-array.h, trans.c, trans-const.c,
5980 trans-const.h, trans-decl.c, trans-expr.c, trans.h
5981 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
5982 trans-types.c: Fix bogus copyright years, add 2003.
5983 * trans-types.h: Give copyright header.
5985 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5987 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
5988 * expr.c, options.c, scanner.c: Add some more 'const' markers.
5989 * intrinsic.c: Some constant strings moved to read-only memory.
5990 * io.c (format_asterisk): Move to...
5993 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5995 * dump-parse-tree.c (g95_show_namespace): Dump implicit
5996 types for ranges instead of per-letter. Indent the
5997 'CONTAINS' just like everything else.
5998 * resolve.c (resolve_contained_functions): Clarify comment.
5999 Explain non-obvious conditional expression. Improve
6000 diagnostics if tyoe cannot be resolved.
6001 Port semi-fix from Andy's tree:
6002 (was_declared): Move up before first use.
6003 (generic_sym, specific_sym): New functions. Code moved
6004 out if procedure_kind.
6005 (procedure_kind): Simplify using new functions.
6006 (resolve_generic_f): Make sure the functions we find in
6007 a parent namespace is generic.
6008 (resolve_specific_f): Ditto for specific functions.
6010 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6012 * trans-stmt.c, trans.c: Fix some code style issues. Add
6013 some more comment (but still not enough!).
6015 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6017 * symbol.c (flavors, procedures, intents, acces_types,
6018 access_types, ifsrc_types): Make const.
6019 * misc.c (g95_string2code): Make 'm' param 'const'.
6020 * module.c (find_enum, write_atom, mio_name): Make
6022 (attr_bits, bt_types, array_spec_types, array_ref_types,
6023 ref_types, expr_types): Make const.
6024 * g95.h: Adjust external decls.
6026 2003-01-09 Paul Brook <paul@nowt.org>
6028 * Testsuite: Add a load of new cases.
6030 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6032 * Make-file.in: Add dependency on back end header files;
6033 a parallel build should work now.
6034 * f95-lang-c (lang_identifier): Remove bogus comment.
6035 (g95_be_parse_file): Fix prototype.
6036 (g95_init): Make static.
6037 (g95_finish): Make static.
6038 * error.c (g95_syntax_error): Kill. Make define in...
6039 * g95.h (g95_syntax_error): Define.
6040 (g95.options): Make 'source' member 'const'.
6041 * interface.c (g95_match_interface): Explain
6042 hard-to-read condition.
6043 (g95_match_end_interface): Ditto.
6044 * trans_const.c (g95_build_string_const): Make 's' parameter
6046 * trans_const.h: Adjust protoype accordingly.
6047 * trans-decl.c: Include tree-dump.h
6048 (g95_generate_function_code): Build fixes for recent changes
6049 in the tree-ssa branch.
6051 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6053 * format.c: Kill, move code from here...
6055 * Make-lang.in: Adjust.
6058 * BUGS: Mention where to submit bugs. Move old content...
6059 * TODO: ...to here. New file.
6061 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6062 Fix most warnings, and suppress the ones we can't fix for now.
6063 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
6064 these warnings just clutter the screen and there's not much
6065 we can do about them for now anyway.
6066 * check.c, iresolve.c: Mark unused function parameters.
6067 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
6068 they should be resolved before they get here.
6069 * error.c: Remove unused FILE *status_out.
6070 * f95-lang.c (g95_init): Remove bogus cast.
6071 * Many files: Make things 'const' where required.
6072 * g95.h: Fix prototypes for all modified functions above.
6073 (g95_options): Remove 'object' member.
6075 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6077 * Make-file.in: Cleanup bogus targets. Add more comment.
6078 * lang-options.h: New option '-w'.
6079 * g95.h: add no_options field to struct g95_options.
6080 * options.c (g95_init_options): Default no_warnings to off.
6081 (g95_parse_arg): Recognise the '-w' switch and its alias,
6083 * error.c (g95_warning, g95_warning_now): Don't emit warning if
6084 no_warning option is set.
6085 * iresolve.c (g95_resolve_shape): Fix warning.
6087 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6089 * primary.c (g95_next_string_char): Rename next_string_char, and
6090 make static. Adjust callers accordingly.
6091 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
6092 callers accordingly.
6093 * g95.h: Split out all g95_match* functions to...
6094 * match.h: ...here. New file.
6095 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
6096 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
6098 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6100 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
6101 g95_merge_new_implicit): New functions.
6102 (g95_match_implicit_none, g95_match_implicit): Move from here...
6103 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
6104 Modify to use the new functions in symbol.c.
6105 * g95.h: Add and move prototypes.
6107 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6109 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
6110 node compare function.
6111 (g95_insert_bbt): Likewise.
6112 (g95_insert_bbt_with_overlap): Likewise.
6113 (g95_delete_bbt): Likewise.
6114 (delete_treap): Likewise. Also fix a potential bug when calling it.
6115 * module.c (compare_pointers): Change proto to compare_fn.
6116 (compare_integers): Likewise.
6117 (compare_true_names): Likewise.
6118 (find_true_name): Adjust call to compare_true_names to match proto.
6119 (require_atom, write_atom, mio_name): Fix 'const' warnings.
6120 (init_pi_tree): Make compare a compare_fn instead of (int *).
6121 * resolve.c (compare_cases): Change proto to compare_fn.
6122 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
6123 it static, and rename to compare_symtree.
6124 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
6126 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
6127 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
6129 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6130 * Make-lang.in: Fix spaces/tabs issues from previous patch.
6131 * patch.options: Blow away Paul's checkin mistake :-)
6132 * io.c (terminate_io): Fix memory leak (Arnaud).
6134 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6136 * Make-lang.in: Teach about building DVI, info manual.
6137 * g95.texi: New file.
6139 2003-01-02 Paul Brook <paul@nowt.org>
6141 * trans-array.c (g95_reverse_ss): Make static and don't use.
6142 (g95_conv_ss_descriptor): Don't use g95_loopinfo
6143 (g95_conv_array_parameters): Modify for pointer assignments.
6144 (g95_walk_subexpr): New function.
6145 (g95_walk_expr*): Use it.
6146 * trans-array.h (g95_reverse_ss): Remove prototype.
6147 * trans-expr.c (g95_trans_pointer_assign): Implement.
6148 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
6149 * trans-intrinsic.c: Sync with scalarizer changes.
6150 * trans-io.c: Ditto.
6152 2002-12-29 Paul Brook <paul@nowt.org>
6154 * trans-array.c: Document calling convention for arrays.
6156 2002-12-19 Paul Brook <paul@nowt.org>
6158 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
6159 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
6160 optional parameters for some intrinsics.
6161 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
6162 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
6163 optional parameters.
6164 * trans.h (g95_se): Add ignore_optional flag.
6166 2002-12-15 Paul Brook <paul@nowt.org>
6168 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
6169 * trans-decl.c (g95_generate_function_code): Use TDI_original.
6171 2002-12-14 Paul Brook <paul@nowt.org>
6173 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
6175 2002-12-12 Paul Brook <paul@nowt.org>
6177 * trans-array.c (g95_trans_array_constructor_subarray): Fully
6178 initialize the scalarizer.
6179 (various): Update to new format of g95_expr->value.constructor.
6181 2002-12-08 Paul Brook <paul@nowt.org>
6183 * trans-array.c (g95_put_offset_into_var): New function.
6184 (g95_trans_array_constructor_subarray): New function.
6185 (g95_trans_array_constructor_value): Use it.
6186 (g95_array_cons_size): Don't abort() on array components.
6188 2002-12-08 Paul Brook <paul@nowt.org>
6190 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
6191 * support.c: Update #includes.
6192 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
6193 * trans-array.c: Update #includes.
6195 * trans-const.c: Ditto.
6196 * trans-io.c: Ditto.
6197 * trans-types.c: Ditto.
6198 (g95_init_types): Set size_type_node.
6199 * trans-decl.c: Update #includes.
6200 (gfor_fndecl_adjust{l,r}): Declare and initialize.
6201 * trans-stmt.c: Update #includes.
6202 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
6203 (g95_trans_select): Fix check for unbounded ranges.
6204 * trans-expr.c: Update #includes.
6205 (g95_conv_string_tmp): New function.
6206 (g95_conv_concat_op): Use it.
6207 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
6208 * Trans-intrisic.c: Update #includes.
6209 (g95_conv_intrinsic_strcmp): New function.
6210 (g95_conv_intrinsic_adjust): Ditto.
6211 (g95_conv_intrinsic_function: Use them.
6213 2002-11-30 Paul Brook <paul@nowt.org>
6215 * trans-array.c (g95_walk_function_expr): Handle non-array return by
6217 * trans-dec.c (g95_build_function_decl): Handle character return
6219 (g95_get_fake_result_decl): Ditto.
6220 (g95_trans_deferred_vars): Ditto.
6221 * trans-expr.c (g95_conv_function_call): Ditto.
6222 (g95_trans_arrayfunc_assign) Limit to array valued functions.
6223 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
6224 (g95_conv_intrinsic_function): Use it.
6225 * trans-types.c (g95_sym_type): Handle functions returning strings.
6226 (g95_return_by_reference): Ditto.
6227 (g95_get_function_type): Ditto.
6229 2002-11-18 Paul Brook <paul@nowt.org>
6231 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
6232 requires a temporary.
6233 (g95_trans_select): Handle computed gotos.
6234 * trans-types.c (g95_build_array_type): Warn about non-functional
6235 assumed shape arrays.
6236 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
6238 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
6239 (g95_conv_intrinsic_int): New function.
6240 (g95_conv_intrinsic_mod): New function.
6241 (g95_conv_intrinsic_ichar): New function.
6242 (g95_conv_intrinsic_function): Use them.
6243 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
6245 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
6247 * trans-types.c (g95_build_array_type): Assumed
6248 sized arrays can have rank > 1.
6249 * trans.c (g95_trans_code): Remove erroneous
6250 warning about CONTINUE.
6251 * trans-expr.c (g95_conv_variable): Remove
6254 2002-11-15 Paul Brook <paul@nowt.org>
6256 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
6258 2002-10-31 Paul Brook <paul@nowt.org>
6260 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
6261 * trans-expr.c (g95_conv_component_ref): Handle character string
6263 (g95_conv_string_parameter): Ditto.
6264 * trans-types.c (g95_get_derived_type): Add length decl to caracter
6267 2002-10-10 Paul Brook <paul@nowt.org>
6269 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
6270 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
6272 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
6273 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
6274 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
6275 * trans-types.c (pvoid_type_node): Declare and initialize.
6276 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
6277 (g95_array_allocate): Fix when base==data.
6278 (g95_conv_array_parameter): Correctly handle reduced rank sections.
6279 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
6281 2002-10-09 Paul Brook <paul@nowt.org>
6283 * (g95_conv_expr_reference): Handle character strings correctly.
6285 2002-10-07 Paul Brook <paul@nowt.org>
6287 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
6289 * trans-array.c (g95_build_array_initializer): Remove.
6290 (g95_conv_array_initializer): New Function.
6291 (g95_trans_auto_arry_allocation): Cleanup.
6292 (g95_trans_init_character_array): Remove.
6293 * g95spec.c: Link in libgforbegin.
6294 * trans.c (g95_generate_code): Rename main function to MAIN__.
6295 (g95_create_var): New function.
6296 (g95_create_var_np): New function.
6297 (g95_evaluate_now): New function.
6298 (g95_start_block): New function.
6299 (g95_finish_block): New function.
6300 (g95_add_expr_to_block): New function.
6301 (g95_add_block_to_block): New function.
6302 * trans-expr.c (g95_conv_componen_ref): New function.
6303 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
6304 (F95_OBJS): Add dependency.o.
6305 * f95-lang.c (g95_is_simple_stmt): Remove.
6306 * f95-tree.c (mark_not_simple): New function.
6307 (unshare_all_trees): New function.
6308 (create_tmp_var, create_tmp_alias_var): Remove.
6309 * support.c (declare_tmp_vars, tree_last_decl): Remove.
6310 * trans*: Convert to new IR using GENERIC trees. Don't bother about
6311 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
6313 2002-10-01 Paul Brook <paul@nowt.org>
6315 * trans-array.c: Add support for descriptorless arrays.
6316 (g95_conv_array_data): New function.
6317 (g95_conv_array_base): New function.
6318 * trans-array.h: Declare these here.
6319 * trans-decl.c(g95_create_mopdule_variable): Perform variable
6320 initialization and creation here.
6321 (g95_create_module_vars): Instead of here.
6322 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
6323 * trans-intrinsic.c: Ditto.
6324 * trans-types.c (g95_is_nodesc_array): New function.
6325 (g95_get_nodesc_array_type): New function.
6326 (g95_sym_type, g95_get_derived_type): Use them.
6327 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
6329 2002-09-28 Paul Brook <paul@nowt.org>
6331 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
6332 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
6335 2002-09-24 Paul Brook <paul@nowt.org>
6337 * f95-lang.c (listify): Remove declaration.
6338 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
6340 * f95-tree.c (get_name): New function.
6341 * trans.c (module_namespace): Remove.
6342 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
6343 * trans-types.c: Ditto.
6345 2002-09-19 Paul Brook <paul@nowt.org>
6347 * trans-array.c (g95_get_array_cons_size): New Function.
6348 (g95_con_ss_startstride): Handle Array constructors.
6349 (g95_conv_loop_setup): Ditto.
6350 (g95_conv_array_parameter): Ditto.
6351 * tras-decl.c (g95_finish_var_decl): Make initializes variables
6354 2002-09-19 Paul Brook <paul@nowt.org>
6356 * trans.c (g95_simple_fold_tmp): Detect variables inside
6358 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
6360 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
6362 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
6364 2002-09-14 Paul Brook <paul@nowt.org>
6366 * trans.c (g95_create_module_variable): Move to trans-decl.c.
6367 * trans-const.c (g95_conv_string_init): New Function.
6368 * trans-const.h: Declare it.
6369 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
6370 variables. Don't bail on intrinsic symbols.
6371 (get_extern_function_decl): Handle specific intrinsic functions.
6372 * trans-types.c (g95_sym_type): Dummy functions don't return
6374 * trans-array.c (g95_build_array_initializer): New Function.
6375 (g95_trans_auto_array_allocation): Build initializer for static decls.
6376 Don't use mpz_addmul, it's GMP4 only.
6378 2002-09-12 Paul Brook <paul@nowt.org>
6380 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
6381 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
6382 assembler names for module procedures.
6384 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
6386 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
6389 2002-09-10 Paul Brook <paul@nowt.org>
6391 * trans-array.c: Change format of G95_SS_TEMP strictures.
6392 (g95_check_fncall_dependancy): New function.
6393 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
6395 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
6397 (g95_build_function_decl): Don't assume result arrays are packed.
6398 (g95_trans-deferred-vars): Handle array result variables.
6399 (g95_generate_fuction_code): Clear saved_function_decls.
6400 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
6402 (g95_trans_arrayfunc_assign): New function.
6403 (g95_trans_assignment): Use it.
6404 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
6405 (g95_se): Add direct_byref.
6406 * trans-types.c: Use sym->result rather than sym where appropriate.
6407 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
6408 Update other functions to use this.
6409 (g95_is_intrinsic_libcall): New function.
6410 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
6411 (g95_walk_intrinsic_function): Ditto.
6413 2002-09-08 Paul Brook <paul@nowt.org>
6415 * trans-types.c: Change rank field to dtype field in array descriptor.
6416 * trans-array.c: Implement filling of dtype array descriptor field.
6417 * trans-intrinsic.c: Fix broken LEN intrinsic.
6419 2002-09-07 Paul Brook <paul@nowt.org>
6421 * trans-intrinsic.c: Remove outdated todo intrinsic list.
6422 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
6423 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
6425 2002-09-06 Paul Brook <paul@nowt.org>
6427 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
6428 (gt-f95-trans-types.h): Add dependancy information.
6429 * config-lang.in (gtfiles): Add trans-types.c
6430 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
6431 back to top-level code.
6432 * trans-array.c, trans-types.c: Change format of array descriptor.
6433 (g95_conv_descriptor_dimension): New function.
6434 * trans-types.h (g95_conv_descriptor_rank): define.
6435 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
6438 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6440 * trans-array.c, trans-types.c: Add rank information to descriptor.
6442 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
6444 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
6446 2002-09-04 Paul Brook <paul@nowt.org>
6448 * f95-lang.c (g95_create_decls): New function.
6449 (g95_init): Move initialization of external decls to above, and call
6450 from g95_be_parse_file.
6451 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
6452 * trans-types.c (g95_init_types): Always name integer and char types.
6453 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
6455 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6457 * Make-lang.in: Add options.c to F95_PARSER_OBJS
6459 2002-09-02 Paul Brook <paul@nowt.org>
6461 * g95_generate_code: Clear the attr for __fortran_main.
6462 * trans-types.c (g95_finish_type): New function.
6463 * g95_init_io_state_type: Use g95_finish_type.
6464 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
6466 2002-09-01 Paul Brook <paul@nowt.org>
6468 * README.backend: Warn about the dangers of extra config.h files.
6469 Remove obsolete libgfor stuff.
6470 * config-lang.in: Add target-libgfor dependancy.
6471 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
6473 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
6475 * g95_conv_mpz_to_tree: Free storage pointed to by q,
6478 2002-08-30 Paul Brook <paul@nowt.org>
6480 * trans-intrinsic.c (g95_conv_intrinsic_function,
6481 g95_walk_intrinsic_function): Added ANY and ALL.
6482 (g95_conv_intrinsic_anyall): New function.
6483 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in