1 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3 * match.c (gfc_match_return): Only require space after keyword when
4 it is obligatory. Only give stdwarn to after matching is successful.
5 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
7 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
9 * intrinsic.texi: Fix typos.
11 2005-05-07 Steven G. Kargl <kargls@comcast.net>
13 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
14 description to include information about scalar arguments.
16 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
18 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
19 match.h, trans-array.h: Update copyright.
21 2005-04-29 Tom Tromey <tromey@redhat.com>
23 * f95-lang.c (poplevel): Updated for change to build_block.
25 2005-04-29 Jakub Jelinek <jakub@redhat.com>
29 * trans-expr.c (gfc_conv_variable): Handle return values in functions
30 with alternate entry points.
31 * resolve.c (resolve_entries): Remove unnecessary string termination
32 after snprintf. Set result of entry master.
33 If all entries have the same type, set entry master's type
34 to that common type, otherwise set mixed_entry_master attribute.
35 * trans-types.c (gfc_get_mixed_entry_union): New function.
36 (gfc_get_function_type): Use it for mixed_entry_master functions.
37 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
38 * decl.c (gfc_match_entry): Set entry->result properly for
40 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
42 (build_entry_thunks): Handle return values in entry thunks.
43 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
44 shared between multiple contexts.
45 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
46 current_function_decl instead of sym->backend_decl. Skip over
47 entry master's entry id argument. For mixed_entry_master entries or
48 their results, return a COMPONENT_REF of the fake result.
49 (gfc_trans_deferred_vars): Don't warn about missing return value if
50 at least one entry point uses RESULT.
51 (gfc_generate_function_code): For entry master returning
52 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
53 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
54 values optional just because they are in entry master.
56 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
58 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
59 Tobias forgot this in previous commit.
61 2005-04-29 Paul Brook <paul@codesourcery.com>
63 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
66 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
68 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
69 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
70 IMPLICIT NONE, set seen_implicit_none.
71 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
73 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
75 * gfortran.h (gfc_gsymbol): Make name a const char *.
76 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
79 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
82 * resolve.c (resolve_actual_arglist): Issue an error if a statement
83 functions is used as actual argument.
85 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
88 * interface.c (compare_parameter): Ignore type for EXPR_NULL
89 only if type is BT_UNKNOWN.
91 2005-04-25 Paul Brook <paul@codesourcery.com>
92 Steven G. Kargl <kargls@comcast.net>
95 * check.c (gfc_check_ichar_iachar): New function.
96 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
97 * intrinsic.c (add_functions): Use it.
98 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
99 character expression lengths.
101 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
104 * trans-common.c (translate_common): Cast offset and
105 common_segment->offset to type int for warning message.
107 2005-04-23 DJ Delorie <dj@redhat.com>
109 * trans-decl.c: Adjust warning() callers.
111 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
113 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
114 intermediate representation. Fix typo in comment.
116 2005-04-21 Steven G. Kargl <kargls@comcast.net>
118 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
119 simplify logic; Add a gcc_assert.
121 2005-04-19 Steven G. Kargl <kargls@comcast.net>
123 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
125 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
126 Steven G. Kargl <kargls@comcast.net>
128 * invoke.texi: Update -Waliasing description
130 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
133 * resolve.c (resolve_variable): If e->symtree is not set, this
134 ought to be a FAILURE, and not a segfault.
136 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
143 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
144 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
145 declarations of old namelist functions.
146 (build_dt): Simplified call to transfer_namelist_element.
147 (nml_get_addr_expr): Generates address expression for start of
148 object data. New function.
149 (nml_full_name): Qualified name for derived type components. New
151 (transfer_namelist_element): Modified for calls to new functions
152 and improved derived type handling.
154 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
156 * scanner.c (gfc_next_char_literal): Reset truncation flag
157 for lines ending in a comment for both fixed and free form.
158 (load_line): Do not set truncated flag if only truncating
161 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
164 * gfortran.h (gfc_linebuf): Add truncated field.
165 * parse.c (next_statement): Handle warning for truncated
167 * scanner.c (load_line): Return if line was truncated.
168 No longer warn for truncated lines. Remove unused parameters.
169 (load_file): Store load_line return value to linebuf.
170 (gfc_error_recovery): Do not advance line at the end.
172 2005-04-14 Steven G. Kargl <kargls@comcast.net>
174 * gfortran.h (gfc_real_info): Add subnormal struct member.
175 * arith.c (gfc_arith_init_1): Set it.
176 (gfc_check_real_range): Use it.
177 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
179 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
181 * simplify.c: Fix a comment typo.
183 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
185 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
187 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
189 * simplify.c (gfc_simplify_nearest): Overhaul.
191 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
193 * interface.c: Fix a comment typo.
195 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
197 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
200 2005-04-09 Steven G. Kargl <kargls@comcast.net>
202 * simplify.c (gfc_simplify_anint): Use mpfr_round()
203 (gfc_simplify_dnint): ditto.
204 (gfc_simplify_nint): ditto.
206 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
209 * io.c (check_format): Allow an optional comma
212 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
214 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
215 comment according to GNU coding style.
216 (gfc_match_if): Remove gfc_ prefix in call to
219 2005-04-08 Diego Novillo <dnovillo@redhat.com>
221 * match.c (gfc_match_arithmetic_if): Declare static.
223 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
226 * match.c (gfc_match_arithmetic_if): New function to match an
227 arithmetic IF statement.
228 (gfc_match_if): Use gfc_match_arithmetic_if to match an
229 arithmetic IF statement embedded in a simple IF statement.
231 2005-04-07 Steven G. Kargl <kargls@comcast.net>
233 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
235 2005-04-06 Steven G. Kargl <kargls@comcast.net>
237 * invoke.texi: Remove documentation of -std=f90
239 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
241 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
242 non-pointer assignment.
244 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
249 * array.c (resolve_character_array_constructor): New function. Set
250 constant character array's character length.
251 (gfc_resolve_array_constructor): Use it.
252 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
254 (gfc_set_constant_character_len): New function. Set constant character
255 expression according the given length.
256 * match.h (gfc_set_constant_character_len): Add prototype.
258 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
260 * intrinsic.texi: BES?? functions are not in the f95 standard.
262 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
264 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
266 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
268 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
269 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
271 2005-04-02 Steven G. Kargl <kargls@comcast.net>
273 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
275 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
277 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
278 trans.h: Fix comment typos.
280 2005-03-29 Steven G. Kargl <kargls@comcast.net>
282 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
283 flag_default_integer, flag_default_real
284 * invoke.texi: Update documentation
285 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
286 fdefault-integer-8, and fdefault-real-8 definitions.
287 * options.c (gfc_init_options): Set option defaults
288 (gfc_handle_option): Handle command line options.
289 * trans-types.c (gfc_init_kinds): Use options.
291 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
293 * f95-lang.c (builtin_function): Process the attrs parameter
294 and apply the "const" attribute to the builtin if found.
296 2005-03-27 Steven G. Kargl <kargls@comcast.net>
298 * intrinsic.texi: Document AIMAG, AINT, ALL
300 2005-03-26 Steven G. Kargl <kargls@comcast.net>
302 * arith.c (check_result): Fix illogical logic.
304 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
306 * trans-common.c (create_common): Build RECORD_NODE for common blocks
307 contain no equivalence objects.
308 (add_equivalences): New argument saw_equiv.
309 (trans_common): New local variable saw_equiv.
310 (finish_equivalences): Add a local variable dummy, Always pass true
311 for the 3rd parameter to create_common.
313 2005-03-25 Steven G. Kargl <kargls@comcast.net>
315 * intrinsic.texi: Fix "make dvi"
317 2005-03-24 Steven G. Kargl <kargls@comcast.net>
319 * intrinsic.texi: New file.
320 * gfortran.texi: Include it; white space change; fix typo.
322 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
324 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
326 2005-03-23 Steven Bosscher <stevenb@suse.de>
328 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
329 * trans-array.c (gfc_trans_allocate_array_storage,
330 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
331 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
332 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
333 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
334 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
335 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
336 gfc_conv_expr_descriptor): Likewise.
337 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
338 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
339 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
340 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
341 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
342 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
343 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
344 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
345 gfc_conv_intrinsic_merge, prepare_arg_info,
346 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
347 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
348 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
349 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
350 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
351 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
353 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
354 * trans.c (gfc_add_modify_expr): Likewise.
356 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
358 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
359 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
360 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
361 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
362 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
363 gfc_check_perror): new functions to check newly implemented
365 * gfortran.h: adding symbols for new intrinsics.
366 * intrinsic.c (add_functions): adding new intrinsics.
367 (add_subroutines): adding new intrinsics.
368 * intrinsic.h: prototype for all checking and resolving
370 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
371 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
372 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
373 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
374 gfc_resolve_kill_sub, gfc_resolve_link_sub,
375 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
376 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
377 gfc_resolve_perror): new functions to resolve intrinsics.
378 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
381 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
383 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
384 in which the variable is declared.
387 * resolve.c (was_declared): Also check for dummy attribute.
389 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
391 * gfortran.h (arith): Remove ARITH_0TO0.
392 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
393 (gfc_arith_power): Remove special casing of zero to integral
396 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
398 * Make-lang.in (fortran-warn): Remove -Wno-error.
399 (expr.o-warn, resolve.o-warn, simplify.o-warn,
400 trans-common.o-warn): Specify -Wno-error.
402 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
404 * trans-array.c (gfc_trans_static_array_pointer,
405 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
406 comment and formatting typos.
408 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
410 * invoke.texi: Fix typos.
412 2005-03-15 Zack Weinberg <zack@codesourcery.com>
414 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
416 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
418 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
419 to zero on label_tree.
421 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
424 * io.c (resolve_tag): Add checking on assigned label.
425 (match_dt_format): Does not set symbol assign attribute.
426 * match.c (gfc_match_goto):Does not set symbol assign attribute.
427 * resolve.c (resolve_code): Add checking on assigned label.
428 * trans-common.c (build_field): Deals with common variable assigned
430 * trans-stmt.c (gfc_conv_label_variable): New function.
431 (gfc_trans_label_assign): Use it.
432 (gfc_trans_goto): Ditto.
433 * trans-io.c (set_string): Ditto.
434 * trans.h (gfc_conv_label_variable): Add prototype.
436 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
439 * symbol.c (check_conflict): A dummy argument can't be a statement
442 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
444 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
445 the argument of the shift to the unsigned type.
447 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
450 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
452 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
455 * resolve.c (gfc_resolve): Check if character lengths are
456 specification expressions.
458 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
461 * trans-array.c (gfc_stack_space_left): Remove unused variable.
462 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
464 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
465 Remove declaration / prototype.
466 * trans-common.c (build_equiv_decl): Give union a name. Check if
467 it can be put on the stack.
468 * trans-decl.c (gfc_stack_space_left): Move function here.
469 (gfc_build_qualified_array): Fix comment typo.
470 * trans.h (gfc_put_var_on_stack): Add prototype.
472 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
474 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
475 * decl.c, trans.c: Don't use C++ style comments.
476 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
477 ifsrc): Give names to enums and use ENUM_BITFIELD.
478 (gfc_access): Remove trailing comma.
480 2005-03-05 Steven G. Kargl <kargls@comcast.net>
483 * primary.c (match_complex_constant): Mangled complex constant may
484 be an implied do-loop. Give implied do-loop matcher a chance.
486 2005-03-05 Steven G. Kargl <kargls@comcast.net>
489 * resolve.c (compare_shapes): New function.
490 (resolve_operator): Use it.
492 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
494 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
495 type for COMPLEX constants.
497 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
500 * trans-expr.c (gfc_conv_function_call): Correctly dereference
501 argument from a pointer function also if it has a result clause.
503 2005-03-04 Steven G. Kargl <kargls@comcast.net>
505 * expr.c (gfc_copy_shape_excluding): Change && to ||.
507 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
509 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
512 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
516 * simplify.c (gfc_simplify_bound): Rename to ...
517 (simplify_bound): ... this and overhaul.
519 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
521 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
522 (gfc_conv_intrinsic_function): update function calls
524 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
527 * trans-types.c (gfc_max_integer_kind): Declare
528 (gfc_init_kinds): Initialize it.
529 * gfortran.h (gfc_max_integer_kind): extern it.
530 * primary.c (match_boz_constant): Use it; remove gfortran extension
531 of kind suffixes on BOZ literal constants
534 2005-02-27 Steven G. Kargl <kargls@comcast.net>
536 * arith.c (gfc_check_real_range): Remove multiple returns
537 (check_result): New function.
538 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
539 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
542 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
544 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
547 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
549 Unrevert previously reverted patch. Adding this fix:
550 * module.c (find_true_name): Deal with NULL module.
552 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
554 Revert yesterday's patch:
555 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
557 * gfortran.h (gfc_component, gfc_actual_arglist, ...
558 ... argument. Copy string instead of pointing to it.
560 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
562 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
563 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
565 * module.c (mio_namespace_ref, load_needed): Likewise.
566 * parse.c (parse_interface, parse_contained): Likewise. Here the
567 correct second argument matters.
568 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
569 parent's implicit types if this is set.
570 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
571 * trans-common.c (build_common_decl): Likewise.
573 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
575 * symbol.c (gfc_set_default_type): Issue error only once, by setting
576 and checking 'untyped' attribute.
578 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
579 fields into new struct 'op' inside the 'value' union.
580 * arith.c (eval_intrinsic): Adapt all users.
581 * dependency.c (gfc_check_dependency): Likewise.
582 * dump-parse-tree.c (gfc_show_expr): Likewise.
583 * expr.c (gfc_get_expr): Don't clear removed fields.
584 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
585 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
586 check_intrinsic_op): Adapt to new field names.
587 * interface.c (gfc_extend_expr): Likewise. Also explicitly
588 nullify 'esym' and 'isym' fields of new function call.
589 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
590 Adapt to renamed structure fields.
591 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
592 * module.c (mio_expr): Likewise.
593 * resolve.c (resolve_operator): Likewise.
594 (gfc_find_forall_index): Likewise. Only look through operands
595 if dealing with EXPR_OP
596 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
597 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
598 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
601 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
602 'name' a 'const char *'.
603 (gfc_symbol): Likewise, also for 'module'.
604 (gfc_symtree): Make 'name' a 'const char *'.
605 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
606 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
608 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
609 initialize 'SYM->module'.
610 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
611 pointer instead of empty string.
612 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
613 * interface.c (gfc_compare_types): Adapt check to account for possible
615 (compare_actual_formal): Check for NULL pointer instead of empty
617 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
618 Add 'const' qualifier.
619 (conv_name): Return a heap allocated string.
620 (find_conv): Add 'const' qualifier to 'target'.
621 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
622 (make_generic): Check for NULL pointer instead of empty string.
623 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
624 (add_conv): No need to strcpy result from 'conv_name'.
625 (sort_actual): Check for NULL pointer instead of empty string.
626 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
628 * module.c (compare_true_names): Compare pointers instead of strings
630 (find_true_name): Initialize string fields with gfc_get_string.
631 (mio_pool_string): New function.
632 (mio_internal_string): Adapt comment.
633 (mio_component_ref, mio_component, mio_actual_arg): Use
634 'mio_pool_string' instead of 'mio_internal_string'.
635 (mio_symbol_interface): Add 'const' qualifier to string arguments.
636 Add level of indirection. Use 'mio_pool_string' instead of
637 'mio_internal_string'.
638 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
639 (write_common, write_symbol): Use 'mio_pool_string' instead of
640 'mio_internal_string'.
641 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
642 instead of empty string.
643 (write_operator, write_generic): Pass correct type variable to
644 'mio_symbol_interface'.
645 (write_symtree): Use 'mio_pool_string' instead of
646 'mio_internal_string'.
647 * primary.c (match_keyword_arg): Adapt check to possible
648 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
649 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
650 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
652 (ambiguous_symbol): Check for NULL pointer instead of empty string.
653 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
655 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
656 pointer instead of empty string.
657 * trans-decl.c (gfc_sym_mangled_identifier,
658 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
659 gfc_get_symbol_decl): Likewise.
660 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
661 argument. Copy string instead of pointing to it.
663 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
665 * intrinsic.h, st.c: Update copyright.
667 2005-02-20 Steven G. Kargl <kargls@comcast.net>
669 * symbol.c: Typos in comments.
671 2005-02-20 Steven G. Kargl <kargls@comcast.net>
673 * expr.c (gfc_type_convert_binary): Typo in comment.
675 2005-02-19 Steven G. Kargl <kargls@comcast.net>
677 * check.c (gfc_check_selected_int_kind): New function.
678 * intrinsic.h: Prototype it.
679 * intrinsic.c (add_function): Use it.
680 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
681 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
683 2005-02-19 Steven G. Kargl <kargls@comcast.net>
685 * check.c (gfc_check_int): improve checking of optional kind
686 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
688 2005-02-19 Steven G. Kargl <kargls@comcast.net>
690 * check.c (gfc_check_achar): New function
691 * intrinsic.h: Prototype it.
692 * intrinsic.c (add_function): Use it.
694 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
696 * trans-stmt.c (generate_loop_for_temp_to_lhs,
697 generate_loop_for_rhs_to_temp): Remove if whose condition is
700 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
702 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
703 (gfc_use_derived): ... this function.
705 2005-02-09 Richard Henderson <rth@redhat.com>
707 * f95-lang.c (gfc_init_builtin_functions): Call
708 build_common_builtin_nodes; do not define any functions handled
711 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
713 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
715 (gfc_is_constant_expr): Check 'ref' to determine if substring
716 reference is constant.
717 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
718 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
720 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
722 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
724 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
725 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
726 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
727 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
728 gfc_add_procedure): Add argument.
729 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
730 gfc_match_null, match_type_spec, match_attr_spec,
731 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
732 Update callers to match.
733 (gfc_match_entry) : Likewise, fix comment typo.
734 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
735 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
736 gfc_match_derived_decl): Update callers.
737 * interface.c (gfc_match_interface): Likewise.
738 * match.c (gfc_match_label, gfc_add_flavor,
739 gfc_match_call, gfc_match_common, gfc_match_block_data,
740 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
742 * parse.c (parse_derived, parse_interface, parse_contained),
743 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
744 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
745 * symbol.c (check_conflict, check_used): Add new 'name' argument,
746 use when printing error message.
747 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
748 gfc_add_generic, gfc_add_in_common, gfc_add_data,
749 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
750 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
751 gfc_add_procedure): Add new 'name' argument. Pass along to
752 check_conflict and check_used.
753 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
754 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
755 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
756 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
757 argument in calls to any of the modified functions.
759 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
761 * gfortran.texi: Don't give last update date.
763 2006-01-30 Richard Henderson <rth@redhat.com>
765 * options.c (gfc_init_options): Zero flag_errno_math.
767 2005-01-29 Paul Brook <paul@codesourcery.com>
770 * check.c (real_or_complex_check): New function.
771 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
772 * intrinsic.c (add_functions): Use new check functions.
773 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
776 2005-01-29 Steven G. Kargl <kargls@comcast.net>
779 * expr.c (gfc_check_assign): Check for conformance of logical operands
781 2004-01-27 Steven Bosscher <stevenb@suse.de>
783 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
784 TREE_USED for all labels.
785 (gfc_trans_entry_master_switch): Use it instead of building a
787 * trans-io.c (add_case): Likewise.
788 * trans-stmt.c (gfc_trans_integer_select): Likewise.
790 2004-01-23 Paul Brook <paul@codesourcery.com>
791 Steven G. Kargl <kargls@comcast.net>
794 * arith.c (gfc_convert_real): Remove sign handling.
795 * primary.c (match_digits): Allow whitespace after initial sign.
796 (match_real_const): Handle signs here. Allow whitespace after
797 initial sign. Remove dead code.
798 (match_const_complex_part): Remove.
799 (match_complex_part): Use match_{real,integer}_const.
800 (match_complex_constant): Cross-promote integer types.
802 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
805 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
806 transpose_c8 for complex types.
808 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
810 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
811 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
812 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
813 Follow spelling conventions.
815 2005-01-22 Bud Davis <bdavis9659@comcast.net>
818 * trans-io.c (gfc_trans_inquire): Added code to support
821 2005-01-22 Steven G. Kargl <kargls@comcast.net>
823 * intrinsic.c (make_alias): Add standard argument.
824 (add_functions): Update make_alias calls.
826 2005-01-22 Paul Brook <paul@codesourcery.com>
828 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
830 2005-01-22 Paul Brook <paul@codesourcery.com>
832 * gfortran.h (gfc_check_access): Add prototype.
833 * match.c (gfc_match_namelist): Remove TODO.
834 * module.c (check_access): Rename ...
835 (gfc_check_access): ... to this. Boolify. Update callers.
836 * resolve.c (resolve_symbol): Check for private objects in public
839 2005-01-22 Paul Brook <paul@codesourcery.com>
841 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
842 does not have an explicit type.
843 (gfc_match_variable): Resolve implicit derived types in all cases.
844 Resolve contained function types from their own namespace, not the
846 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
847 checking. Resolve from the contained namespace, not the parent.
849 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
852 * trans-const.c (gfc_conv_constant_to_tree): Give logical
853 constants the correct type.
856 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
858 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
861 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
863 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
864 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
865 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
866 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
867 trans-io.c, trans-stmt.c, trans.c: Update copyright.
869 2005-01-17 Ira Rosen <irar@il.ibm.com>
871 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
873 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
876 * error.c (error_char): Line-buffer errors / warnings.
878 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
880 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
881 unsigned issue. Use build_int_cst instead of converting
882 integer_zero_node. Remove unnecessary conversion.
884 * trans-types.c (gfc_get_character_type_len): : Use
885 gfc_charlen_type_node as basic type for the range field.
887 * trans-intrinsic.c (build_fixbound_expr,
888 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
889 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
890 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
891 of converting 'integer_zero_node' or 'integer_one_node'
893 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
895 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
896 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
897 'build_int_cst' instead of converting 'integer_zero_node' or
898 'integer_one_node' respectively.
900 * trans-intrinsic.c (gfc_conv_intrinsic_index,
901 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
902 'gfc'-prefix from local variable, remove dead code, use correct
903 type when inserting argument.
905 * trans-intrinsic.c, trans-types.c: Update copyright years.
907 2005-01-16 Steven G. Kargl <kargls@comcast.net>
910 * resolve.c (check_case_overlap): Typo in comment.
911 (validate_case_label_expr): Fix up kinds of case values
912 (resolve_select): Properly handle kind mismatches.
914 2004-01-16 Paul Brook <paul@codesourcery.com>
917 * trans-common.c (translate_common): Remove duplicate function call.
918 (finish_equivalences): Preserve alignment when biasing offsets.
920 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
922 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
923 ASCII-like character encoding.
925 2005-01-14 Steven G. Kargl <kargls@comcast.net>
927 * resolve.c (compare_case): Cleanup.
929 2005-01-14 Steven G. Kargl <kargls@comcast.net>
931 * resolve.c (compare_case): Give arguments correct type.
933 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
935 * iresolve.c, trans-common.c, trans-types.c: Fix comment
938 2005-01-09 Paul Brook <paul@codesourcery.com>
941 * trans-common.c (current_common, current_offset): Remove.
942 (create_common): Add head argument.
943 (align_segment): New function.
944 (apply_segment_offset): New function.
945 (translate_common): Merge code from new_segment. Handle alignment.
946 (new_segment): Remove.
947 (finish_equivalences): Ensure proper alignment.
949 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
951 * trans-const.c: Don't include unused math.h.
953 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
954 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
955 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
957 (prepare_arg_info): Fix formatting, indenting and remove trailing
959 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
962 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
963 gfc_constant_result, gfc_range_check, gfc_arith_power,
964 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
965 gfc_real2complex, gfc_complex2int, gfc_complex2real,
966 gfc_complex2complex): Fix whitespace issues.
967 * check.c (must_be, type_check, numeric_check, int_or_real_check,
968 logical_array_check, array_check, scalar_check, nonoptional_check,
969 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
970 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
971 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
972 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
973 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
974 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
975 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
976 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
977 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
978 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
979 gfc_check_lbound, gfc_check_logical, min_max_args,
980 gfc_check_min_max_integer, gfc_check_min_max_real,
981 gfc_check_min_max_double, gfc_check_matmul,
982 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
983 gfc_check_pack, gfc_check_precision, gfc_check_radix,
984 gfc_check_range, gfc_check_real, gfc_check_repeat,
985 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
986 gfc_check_set_exponent): Fix formatting issues.
987 (gfc_check_size, gfc_check_sign): Alphabetize function order,
988 remove whitespace-only line.
989 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
990 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
991 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
992 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
993 gfc_check_random_number, gfc_check_random_seed,
994 gfc_check_second_sub, gfc_check_system_clock,
995 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
996 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
997 gfc_check_unlink_sub): Fix formatting issues.
999 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1001 * gfortran.h: Remove outdated comment. Don't include stdio.h
1004 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1006 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
1007 output of 'gfortran --version'.
1009 2005-01-03 Steven G. Kargl <kargls@comcast.net>
1011 * arith.c: Add system.h; remove string.h
1017 * check.c: Remove stdlib.h and stdarg.h
1018 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
1019 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
1020 * f95-lang.c: Add system.h; remove stdio.h
1021 * interface.c: Add system.h; remove stdlib.h and string.h
1022 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
1023 * io.c: Remove string.h
1025 * match.c: Remove stdarg.h and string.h
1026 * misc.c: Update copyright; add system.h; remove stdlib.h,
1027 string.h, and sys/stat.h
1028 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
1029 unistd.h, and time.h
1030 * option.c: Remove string.h and stdlib.h
1032 * scanner.c: Update copyright; add system.h; remove stdlib.h,
1033 stdio.h, string.h, and strings.h
1034 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
1035 * trans-array.c: Remove stdio.h and gmp.h
1036 * trans-const.c: Ditto
1037 * trans-expr.c: Ditto
1039 * trans-stmt.c: Ditto
1041 * trans-intrinsic.c: Remove stdio.h and string.h
1043 2004-12-29 Steven G. Kargl <kargls@comcast.net>
1045 * gfortran.h (gfc_case): fix typo in comment.
1047 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1049 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
1050 logical shift. Call fold. Remove 0-bit shift shortcut.
1051 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
1052 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
1053 result if width(arg 1) < 4 bytes. Call fold.
1056 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
1057 in front of function to match the standard. Correct handling
1060 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
1062 * trans-expr.c (gfc_conv_cst_int_power): Only check for
1063 flag_unsafe_math_optimizations if we have a float type.
1065 2004-12-23 Steven G. Kargl <kargls@comcast.net>
1067 * gfortran.texi: Fix typo.
1069 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1071 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
1074 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1077 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
1078 (gfc_match_nullify): Make sure that ')' is in front of the end of
1081 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
1084 2004-12-14 Richard Henderson <rth@redhat.com>
1086 * gfortran.h (gfc_expr.function.name): Make const.
1087 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1088 (gfc_get_string): Update prototype.
1089 * iresolve.c: Include tree.h.
1090 (string_node, HASH_SIZE, string_head, hash): Remove.
1091 (gfc_get_string): Use vsnprintf, get_identifier.
1092 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1093 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
1094 (gfc_done_1): Don't call gfc_iresolve_done_1.
1095 * module.c (mio_allocated_string): Take and return const char *,
1096 instead of modifying char**.
1097 (mio_expr): Update to match.
1098 * resolve.c (pure_function): Constify name argument.
1099 (resolve_function): Constify name.
1100 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
1102 2004-12-12 Richard Henderson <rth@redhat.com>
1104 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
1105 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
1106 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
1107 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
1108 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
1109 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
1110 gfc_resolve_unpack: Use PREFIX.
1112 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1115 * match.c (gfc_match_common): Skip whitespace.
1117 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1120 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
1121 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
1122 integer kind check; Issue error for -std=f95 when needed.
1123 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
1125 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
1126 Promote arguments to same kind.
1128 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1129 Paul Brook <paul@codesourcery.com>
1132 * resolve.c (gfc_resolve_iterator_expr): New function.
1133 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
1134 start, end and stride to correct type.
1135 (resolve_code): Pass extra argument.
1136 * array.c (resolve_array_list): Pass extra argument.
1137 * gfortran.h (gfc_resolve): Add prototype.
1138 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
1139 Handle real type iterators.
1141 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1144 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
1145 same kind as C's 'int'.
1146 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
1148 2004-12-08 Richard Henderson <rth@redhat.com>
1150 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
1151 to the output expression.
1152 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
1154 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
1157 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1160 * resolve.c (resolve_code): Impose correct restrictions on
1163 * decl.c (gfc_match_end): Use locus of END when eos is an error.
1165 2004-12-02 Steven G. Kargl <kargls@comcast.net>
1166 Paul Brook <paul@codesourcery.com>
1168 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
1169 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
1170 (gfc_check_stat, gfc_check_stat_sub): New functions.
1171 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
1172 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
1173 fstat, and stat to intrinsics symbol tables.
1174 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
1175 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
1176 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
1177 (gfc_resolve_stat, gfc_resolve_flush): New functions.
1178 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
1179 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
1181 2004-12-02 Steven G. Kargl <kargls@comcast.net>
1183 * intrinsic.c: Fix and add comments, fix function declarations
1184 (OPTIONAL,REQUIRED): New symbols
1185 (add_functions,add_subroutines): Use symbols
1186 (gmp.h): Remove unused include
1188 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
1190 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
1193 2004-11-24 Steven Bosscher <stevenb@suse.de>
1195 * options.c (gfc_post_options): Don't clear flag_inline_functions.
1197 2004-11-20 Steven G. Kargl <kargls@comcast.net>
1199 * check.c (gfc_check_getcwd_sub): Fix seg fault.
1201 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
1202 gfc_check_unlink,gfc_check_unlink_sub): New functions
1203 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
1204 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
1205 exit to intrinsics symbol tables.
1206 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
1207 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
1208 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
1209 gfc_resolve_unlink_sub): Add and sort prototypes.
1210 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
1211 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
1212 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
1214 2004-11-16 Paul Brook <paul@codesourcery.com>
1217 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
1218 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
1219 * trans-types.c (gfc_get_dtype): Accept array type rather than element
1221 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
1222 (gfc_get_array_type_bounds): Ditto.
1223 (gfc_get_derived_type): Recurse into derived type pointers.
1224 * trans-types.h (gfc_get_dtype): Add prototype.
1225 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
1227 2004-11-15 Paul Brook <paul@codesourcery.com>
1229 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
1231 2004-11-10 Paul Brook <paul@codesourcery.com>
1234 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
1235 * trans-io.c (transfer_array_component): Ditto.
1237 2004-11-10 Paul Brook <paul@codesourcery.com>
1239 * invoke.texi: Fix typo.
1241 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
1243 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
1244 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
1245 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
1246 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
1247 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
1249 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1252 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
1254 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
1256 * gfortranspec.c: Replace GNU CC with GCC.
1258 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1260 * gfortranspec.c (lang_specific_driver): Change year to 2004.
1262 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1265 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
1268 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1271 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
1272 module procedures as if they were module variables.
1274 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1279 * module.c (write_symbol1): Set module_name for dummy arguments.
1281 2004-11-02 Paul Brook <paul@codesourcery.com>
1283 * intrinsic.c (check_intrinsic_standard): Include error locus.
1285 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
1286 locus to check_intrinsic_standard.
1288 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
1291 * gfortran.h: Change GFC_STD_* flags to more appropriate
1292 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
1293 gfc_option_t): Add field for warning about use of nonstandard
1295 * intrinsic.c (add_sym): Add parameter for standard version, check
1296 this against current standard.
1297 (add_sym_0): Pass standard parameter to add_sym.
1298 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
1299 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
1300 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
1301 (make_generic): Add parameter for standard, check this
1302 against currently selected standard.
1303 (add_functions, add_subroutines): Add parameter to tell which
1304 standard an intrinsic belongs to.
1305 (check_intrinsic_standard): New function.
1306 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
1307 (gfc_intrinsic_sub_interface): Ditto.
1308 * lang.opt: Add Wnonstd-intrinsics option.
1309 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
1311 (set_Wall): Add warning about nonstd intrinsics.
1312 (gfc_handle_option): Change to use new GFC_STD_* flags,
1314 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
1316 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
1318 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
1320 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1322 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
1324 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1326 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
1329 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
1331 * check.c (gfc_check_rand): Allow missing optional argument.
1332 (gfc_check_irand): Ditto.
1333 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
1335 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
1337 PR fortran/13490, PR fortran/17912
1338 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
1339 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
1340 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
1341 warning when compiling with pedantic.
1342 * gcc/fortran/arith.c: Set minimum integer values to reflect
1343 realities of two's complement signed integers. Added
1346 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
1348 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
1349 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
1352 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1354 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
1356 (gfc_generate_function_code): Fix formatting issue.
1358 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1360 * module.c: Fix formatting issues.
1362 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1364 * module.c (mio_interface_rest): Set where member of interface
1367 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
1370 * options.c (gfc_handle_option): Add break after handing the
1373 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
1375 * arith.c: Fix formatting issues.
1377 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1380 * resolve.c (resolve_operator): Use correct operator name in message.
1382 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1384 * primary.c (match_boz_constant): Allow kind parameter suffixes.
1385 Move standard warning further to the front.
1387 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
1389 * trans-stmt.c: Fix a comment typo.
1391 2004-10-07 Paul Brook <paul@codesourcery.com>
1394 * trans-array.c (gfc_trans_deferred_array): Leave use associated
1397 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1400 * simplify.c (twos_complement): New function.
1401 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
1403 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
1405 2004-10-06 Paul Brook <paul@codesourcery.com>
1407 * trans-stmt.c (gfc_trans_simple_do): New function.
1408 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
1409 loop. Update comments.
1411 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1414 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
1418 * intrinsic.c (add_sym_5): Remove.
1419 (add_subroutines): Add resolution function for MVBITS.
1420 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
1422 * iresolve.c (gfc_resolve_mvbits): New function.
1423 (gfc_resolve_random_number): Remove empty line at end of function.
1425 * trans-const.c (gfc_build_cstring_const): New function.
1426 (gfc_init_cst): Use new function.
1427 * trans-const.h (gfc_build_cstring_const): Add prototype.
1428 * trans-io.c (set_string, set_error_locus): Use new function.
1429 * trans-stmt.c (gfc_trans_goto): Use new function.
1432 * parse.c (accept_statement): Don't treat END DO like END IF and
1434 (parse_do_block): Generate possible END DO label inside END DO
1438 * check.c (gfc_check_system_sub): New function.
1439 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
1440 * intrinsic.c (add_functions): Add 'system'.
1441 (add_subroutines): Add 'system'.
1442 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
1443 Move prototypes to other suborutines.
1444 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
1446 (gfc_resolve_system_clock): Fix formatting of prototype.
1447 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
1449 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
1452 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
1454 * scanner.c (preprocessor_line): Accept preprocessor lines without
1455 file names. Check file names for closing quotes. Handle escaped
1456 quotes in file names.
1458 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1459 Paul Brook <paul@codesourcery.com>
1461 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
1462 Use gfc_get_expr_charlen.
1463 * trans-expr.c (gfc_get_expr_charlen): New function.
1464 * trans.h (gfc_get_expr_charlen): Add prototype.
1466 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
1468 * trans-intrinsic.c: Fix a comment typo.
1470 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1472 * simplify.c (range_check): Remove blank line at beginning of function.
1473 (gfc_simplify_dint): Same at end of function.
1474 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
1475 (gfc_simplify_bound): Fix indentation.
1476 (gfc_simplify_log10): Simplify calculation.
1477 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
1479 (gfc_simplify_nearest): Same at end of function.
1480 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
1482 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
1483 gfc_simplify_spacing): Simplify calulations.
1485 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
1487 * trans-intrinsic.c: Fix comments on spacing and rrspacing
1488 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
1490 2004-10-01 Jan Hubicka <jh@suse.cz>
1492 * f95-lang.c (gfc_expand_function): Update call of
1493 tree_rest_of_compilation.
1494 * trans-decl.c (gfc_generate_constructors): Likewise.
1496 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1498 * trans-intrinsic.c: Comment fixes.
1500 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1502 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
1504 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1506 * trans-types.c (gfc_return_by_reference): Remove superfluous
1509 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
1510 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
1513 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
1514 function to determine return type.
1516 2004-09-20 Jan Hubicka <jh@suse.cz>
1518 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
1520 (gfc_generate_function_code): Likewise.
1522 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1525 * simplify.c (gfc_simplify_reshape): Set shape of return value
1528 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1529 Zack Weinberg <zack@codesourcery.com>
1531 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
1532 enumeration constants.
1534 2004-09-17 Paul Brook <paul@codesourcery.com>
1536 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
1537 (gfc_linebuf_header_size): Define.
1538 * scanner.c (load_file): Use it.
1540 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1542 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
1543 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
1544 resolve.c, scanner.c, trans-array.c, trans-array.h,
1545 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
1546 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1547 trans.h: Fix comment typos. Follow spelling conventions.
1549 2004-09-16 Victor Leikehman <lei@il.ibm.com>
1552 * trans-io.c (transfer_array_component): New function.
1553 (transfer_expr): For array fields, call transfer_array_component.
1555 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1557 * gfortran.texi: Fix a typo.
1559 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1561 * parse.c (eof_buf): Rename eof to eof_buf.
1562 (unexpected_eof): Same.
1563 (gfc_parse_file): Same.
1565 2004-09-15 Steven G. Kargl <kargls@comcast.net>
1567 * check.c (gfc_check_getcwd_sub): New function.
1568 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
1569 * intrinsic.c (add_functions): Add function definition;
1571 * intrinsic.c (add_subroutines): Add subroutine definitions.
1572 * intrinsic.h: Add prototypes.
1573 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
1575 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
1577 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1580 * module.c (write_symbol): Don't fill in module name here.
1581 (write_symbol0): Fill in here instead.
1583 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
1585 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
1586 trans-array.c, trans-common.c, trans-expr.c,
1587 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
1588 comment typos. Follow spelling conventions.
1590 2004-09-09 Paul Brook <paul@codesourcery.com>
1592 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
1594 2004-09-08 Paul Brook <paul@codesourcery.com>
1596 * array.c: Don't include assert.h.
1597 * data.c: Don't include assert.h. Replace assert and abort with
1598 gcc_assert and gcc_unreachable.
1599 * dependency.c: Ditto.
1600 * f95-lang.c: Ditto.
1601 * iresolve.c: Ditto.
1603 * simplify.c: Ditto.
1605 * trans-array.c: Ditto.
1606 * trans-common.c: Ditto.
1607 * trans-const.c: Ditto.
1608 * trans-decl.c: Ditto.
1609 * trans-expr.c: Ditto.
1610 * trans-intrinsic.c: Ditto.
1611 * trans-io.c: Ditto.
1612 * trans-stmt.c: Ditto.
1613 * trans-types.c: Ditto.
1616 2004-09-07 Per Bothner <per@bothner.com>
1617 Paul Brook <paul@codesourcery.com>
1619 * error.c (show_locus): Handle mapped locations.
1620 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
1621 * gfortran.h: Include input.h.
1622 (struct gfc_linebuf): Use source_location.
1623 * scanner.c (get_file): Initialize linemap.
1624 (preprocessor_line): Pass extra argument to get_file.
1625 (load_file): Ditto. Setup linemap.
1626 (gfc_new_file): Handle mapped locations.
1627 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
1628 Set decl source locations.
1629 (gfc_trans_common): Set blank common block location.
1630 * trans-decl.c (gfc_set_decl_location): New function.
1631 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
1632 (trans_function_start): Move call to gfc_set_backend_locus..
1633 (build_function_decl): ... to here.
1634 (build_entry_thunks): Set and restore the backend locus.
1635 (gfc_generate_constructors): Remove excess arguments to
1636 init_function_start.
1637 (gfc_generate_block_data): Add comments. Set the decl locus.
1638 * trans-io.c (set_error_locus): Handle mapped locations.
1639 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
1640 (gfc_trans_code): Use SET_EXPR_LOCATION.
1641 (gfc_generate_code): Override the location of the new symbol.
1642 * trans.h (gfc_set_decl_location): Add prototype.
1644 2004-08-31 Paul Brook <paul@codesourcery.com>
1646 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
1648 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1651 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
1654 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1659 * resolve.c (resolve_transfer): New function.
1660 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
1662 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1665 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
1668 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1670 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
1672 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1675 * trans-types.c (gfc_return_by_reference): Remove TODO error,
1676 add comment pointing out possible issue WRT compatibility with g77.
1678 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1680 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
1681 all occurences of 'gfc_strlen_type_node' by
1682 'gfc_charlen_type_node'.
1683 * trans-types.h: Same. Also update comment accordingly.
1685 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1687 * primary.c: Update copyright boilerplate to say GCC.
1688 * f95-lang.c: Change initial comment to say gfortran.
1690 2004-08-31 Paul Brook <paul@codesourcery.com>
1692 * trans-types.h: Add comments.
1693 (intmax_type_node, string_type_node, const_string_type_node): Remove.
1695 2004-08-30 Richard Henderson <rth@redhat.com>
1697 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
1698 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
1699 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
1700 c_long, c_long_long.
1701 (gfc_logical_info): Add c_bool.
1702 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
1703 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
1704 rather than gfc_int[48]_type_node for allocate choice.
1705 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
1706 local copies of some kind type nodes.
1707 (gfc_build_builtin_function_decls): Likewise.
1708 * trans-expr.c (gfc_conv_power_op): Likewise.
1709 * trans-intrinsic.c (gfc_conv_intrinsic_index,
1710 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
1711 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
1712 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
1713 gfc_trans_character_select, gfc_trans_allocate): Likewise.
1714 * trans-io.c (gfc_pint4_type_node): Move into ...
1715 (gfc_build_io_library_fndecls): ... here. Cache local copies of
1716 some kind type nodes.
1717 * trans-types.c (gfc_type_nodes): Remove.
1718 (gfc_character1_type_node, gfc_strlen_type_node): New.
1719 (gfc_integer_types, gfc_logical_types): New.
1720 (gfc_real_types, gfc_complex_types): New.
1721 (gfc_init_kinds): Fill in real mode_precision.
1722 (gfc_build_int_type, gfc_build_real_type): New.
1723 (gfc_build_complex_type, gfc_build_logical_type): New.
1724 (c_size_t_size): New.
1725 (gfc_init_types): Loop over kinds.
1726 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
1727 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
1728 (gfc_get_character_type_len): Likewise.
1729 (gfc_type_for_size): Loop over kinds; use a reduced set of
1730 unsigned type nodes.
1731 (gfc_type_for_mode): Loop over kinds.
1732 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
1733 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
1734 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
1735 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
1736 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
1737 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
1738 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
1739 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
1740 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
1741 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
1742 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
1743 gfc_complex8_type_node, gfc_complex16_type_node,
1744 gfc_logical1_type_node, gfc_logical2_type_node,
1745 gfc_logical4_type_node, gfc_logical8_type_node,
1746 gfc_logical16_type_node, gfc_strlen_kind): Remove.
1747 (gfc_character1_type_node): Turn in to a variable.
1748 (gfc_strlen_type_node): Likewise.
1750 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1752 * gfortran.h (gfc_namespace): Add new field is_block_data.
1753 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
1754 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
1755 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
1756 * trans.h (gfc_generate_block_data): Add prototype.
1757 * trans-decl.c (gfc_generate_block_data): New function.
1759 2004-08-29 Richard Henderson <rth@redhat.com>
1761 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
1762 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
1763 than two HOST_WIDE_INT.
1765 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1768 * decl.c (free_variable, free_value, gfc_free_data, var_list,
1769 var_element, top_var_list, match_data_constant, top_val_list,
1770 gfc_match_data): Move here from match.c.
1771 (match_old_style_init): New function.
1772 (variable_decl): Match old-style initialization.
1773 * expr.c (gfc_get_variable_expr): New function.
1774 * gfortran.h (gfc_get_variable_expr): Add prototype.
1775 * gfortran.texi: Start documentation for supported extensions.
1776 * match.c: Remove the functions moved to decl.c.
1777 * match.h (gfc_match_data): Move prototype to under decl.c.
1778 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
1781 2004-08-29 Steven G. Kargl <kargls@comcast.net>
1782 Paul Brook <paul@codesourcery.com>
1784 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
1785 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
1786 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1787 (build_builtin_fntypes): New function.
1788 (gfc_init_builtin_functions): Use it.
1789 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
1790 and GFC_ISYM_ERF{,C}.
1791 (gfc_c_int_kind): Declare.
1792 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
1793 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
1794 gfc_resolve_g77_math1): Add prototypes.
1795 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
1796 * mathbuiltins.def: Add comment. Change third argument. Use
1797 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
1798 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
1799 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1800 * trans-types.c (gfc_c_int_kind): Declare.
1801 (gfc_init_kinds): Set it.
1803 2004-08-29 Steven G. Kargl <kargls@comcast.net>
1804 Paul Brook <paul@codesourcery.com>
1806 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
1807 (gfc_check_f, gfc_simplify_f): Add f0.
1808 * intrinsic.c (do_check): Call f0. Flatten.
1809 (add_sym_0): Fix prototype. Set f0.
1810 (add_functions): Add getgid, getgid and getuid.
1811 (resolve_intrinsic): Remove obsolete comment.
1812 (do_simplify): Call f0.
1813 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
1814 gfc_resolve_getuid): Add prototypes.
1815 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
1816 gfc_resolve_getuid): New functions.
1817 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
1820 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1822 * error.c (gfc_error_init_1): Remove blank line in front of
1823 function body. Add missing blank.
1824 (gfc_buffer_error, error_char, error_string): Remove blank line in
1825 front of function body.
1826 (show_locus): Add comma in comment.
1827 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
1828 gfc_push_error, gfc_pop_error): Remove blank line in front of
1830 (gfc_get_errors): Typo fix in comment in front of function. Remove
1831 blank line in front of function body.
1833 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1835 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
1836 variable declaration of same name.
1837 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
1838 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
1839 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
1840 Replace all calls to gfc_default_*_kind with variable accesses.
1841 * trans-types.c: Same as above.
1842 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
1843 static qualifier. Replace all occurences.
1844 (gfc_default_*_kind): Remove functions.
1846 2004-08-26 Richard Henderson <rth@redhat.com>
1848 * arith.c: Include system.h, not real system headers.
1849 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
1850 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
1851 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
1852 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
1853 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
1854 gfc_index_integer_kind, gfc_default_integer_kind,
1855 gfc_default_real_kind,gfc_default_double_kind,
1856 gfc_default_character_kind, gfc_default_logical_kind,
1857 gfc_default_complex_kind, validate_integer, validate_real,
1858 validate_logical, validate_character,
1859 gfc_validate_kind): Move to trans-types.c.
1860 (gfc_set_model_kind): Use gfc_validate_kind.
1861 (gfc_set_model): Just copy the current precision to default.
1862 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
1863 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
1864 * gfortran.h: Update file commentary.
1865 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
1866 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
1867 gfc_default_double_kind_1, gfc_default_character_kind_1,
1868 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
1869 (gfc_init_kinds): New.
1870 (gfc_init_types): Don't set gfc_index_integer_kind here.
1871 * trans-types.h (gfc_init_kinds): Declare.
1872 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
1874 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1876 * check.c (gfc_check_atan2): New function.
1877 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
1878 * intrinsic.h (gfc_check_atan2): Add prototype.
1880 2004-08-25 Richard Henderson <rth@redhat.com>
1882 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
1883 false and we don't validate the kind.
1884 (gfc_check_integer_range, gfc_check_real_range): Update to match.
1885 * check.c (kind_check): Likewise.
1886 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
1887 (match_char_spec, match_logical_spec): Likewise.
1888 * gfortran.h (gfc_validate_kind): Likewise.
1889 * options.c (gfc_handle_option): Likewise.
1890 * primary.c (match_integer_constant, match_real_constant,
1891 match_string_constant, match_logical_constant,
1892 match_const_complex_part): Likewise.
1893 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
1894 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
1895 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
1896 gfc_simplify_maxexponent, gfc_simplify_minexponent,
1897 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
1898 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
1899 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
1900 gfc_simplify_tiny): Likewise.
1901 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
1902 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1903 prepare_arg_info): Likewise.
1905 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1907 * expr.c (gfc_check_assign): Add comment. Add new warning.
1908 * trans-expr.c (gfc_conv_function_call): Correctly dereference
1909 result of pointer valued function when not in pointer assignment.
1911 2004-08-25 Paul Brook <paul@codesourcery.com>
1913 * config-lang.in: Remove dead commented line.
1914 * module.c: Replace g95 with gfortran in comment.
1916 2004-08-25 Paul Brook <paul@codesourcery.com>
1919 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
1921 2004-08-25 Paul Brook <paul@codesourcery.com>
1924 * trans-array.c (gfc_trans_allocate_temp_array): Remove
1925 string_length argument.
1926 (gfc_trans_array_ctor_element): New function.
1927 (gfc_trans_array_constructor_subarray): Use it.
1928 (gfc_trans_array_constructor_value): Ditto. Handle constant
1930 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
1931 (gfc_trans_array_constructor): Use them.
1932 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
1933 (gfc_conv_ss_descriptor): Remember section string length.
1934 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
1935 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
1936 (gfc_conv_expr_descriptor): Ditto.
1937 (gfc_conv_loop_setup): Ditto. Spelling fixes.
1938 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
1939 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
1940 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
1941 (gfc_conv_variable): Set string_length from section.
1942 (gfc_conv_function_call): Remove extra argument.
1943 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
1944 * trans-types.c (gfc_get_character_type_len): New function.
1945 (gfc_get_character_type): Use it.
1946 (gfc_get_dtype): Return zero for internal types.
1947 * trans-types.h (gfc_get_character_type_len): Add prototype.
1948 * trans.h (struct gfc_ss): Move string_length out of union.
1950 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1952 * trans.h (build2_v, build3_v): New macros.
1954 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
1956 * trans-array.c (gfc_conv_descriptor_data,
1957 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
1958 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
1959 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
1960 gfc_trans_allocate_temp_array,
1961 gfc_trans_array_constructor_subarray,
1962 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
1963 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
1964 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
1965 gfc_conv_array_ref, gfc_trans_preloop_setup,
1966 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
1967 gfc_conv_loop_setup, gfc_array_init_size,
1968 gfc_conv_array_initializer, gfc_trans_array_bounds,
1969 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1970 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
1971 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
1972 of build and build_v as appropriate.
1973 * trans-common.c (create_common): Same.
1974 * trans-decl.c (gfc_trans_auto_character_variable,
1975 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
1976 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
1977 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
1978 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
1979 gfc_conv_expr_op, gfc_conv_function_call,
1980 gfc_trans_structure_assign): Same.
1981 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
1982 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
1983 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1984 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
1985 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
1986 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
1987 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
1988 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
1989 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
1990 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
1991 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
1992 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
1993 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
1994 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
1995 gfc_conv_intrinsic_iargc): Same.
1996 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
1997 set_flag, add_case, io_result, transfer_namelist_element,
1998 transfer_expr): Same.
1999 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
2000 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
2001 gfc_trans_integer_select, gfc_trans_logical_select,
2002 gfc_trans_character_select, gfc_trans_forall_loop,
2003 gfc_trans_nested_forall_loop, gfc_do_allocate,
2004 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
2005 compute_inner_temp_size, compute_overall_iter_number,
2006 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
2007 gfc_trans_forall_1, gfc_evaluate_where_mask,
2008 gfc_trans_where_assign, gfc_trans_allocate): Same.
2009 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
2010 * trans.c (gfc_add_modify_expr, gfc_finish_block,
2011 gfc_build_array_ref, gfc_build_function_call,
2012 gfc_trans_runtime_check): Same.
2014 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2016 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
2017 build_int_cst to build_int_cst_wide in accordance to Nathan's
2020 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
2022 * trans-array.c (gfc_trans_array_constructor_value): Adjust
2023 build_int_cst calls.
2024 * trans-const.c (gfc_build_string_const, gfc_init_constants,
2025 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
2026 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
2027 gfc_trans_entry_master_switch): Likewise.
2028 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2029 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2030 * trans-io.c (add_case, set_error_locus,
2031 transfer_namelist_element, transfer_expr): Likewise.
2032 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2033 gfc_trans_stop, gfc_trans_character_select): Likewise.
2034 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2035 * trans.c (gfc_trans_runtime_check): Likewise.
2037 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2039 * trans-decl.c, trans-types.c: Add and remove blank lines as
2042 2004-08-24 Richard Henderson <rth@redhat.com>
2044 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
2046 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2048 * resolve.c (merge_argument_lists): Revert unintentionally
2051 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2053 * trans-decl.c (build_function_decl): Fix spelling in comment.
2054 (build_entry_thunks): Remove code with no function.
2055 (gfc_build_intrinsic_function_decls): Remove empty line.
2057 * resolve.c (resolve_entries): Fix a bunch of comment typos.
2059 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2061 * f95-lang.c (gfc_init_decl_processing): Adjust
2062 build_common_tree_nodes call.
2064 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2066 * trans-types.c: Spelling and formatting fixes.
2068 2004-08-23 Richard Henderson <rth@redhat.com>
2070 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
2071 of going through an intermediate string. Fix 32/64 int/long bug.
2073 2004-08-23 Eric Christopher <echristo@redhat.com>
2075 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
2076 usage. Use build_vector_type_for_mode for vector types.
2078 2004-08-22 Richard Henderson <rth@redhat.com>
2081 * data.c (find_con_by_offset): Search ordered list; handle
2082 elements with repeat counts.
2083 (gfc_assign_data_value_range): New.
2084 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
2085 (gfc_assign_data_value_range): Declare.
2086 * match.c (top_val_list): Extract repeat count into a temporary.
2087 * resolve.c (values): Make left unsigned.
2088 (next_data_value): Don't decrement left.
2089 (check_data_variable): Use gfc_assign_data_value_range.
2091 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2093 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
2095 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2097 * check.c (gfc_check_reduction): Rename to ...
2098 (check_reduction): ... this. Make static. Don't check type of
2100 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
2101 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
2102 SUM to use new check functions.
2103 (check_specific): Change logic to call new functions.
2104 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
2106 (gfc_check_reduction): Remove prototype.
2108 2004-08-20 Paul Brook <paul@codesourcery.com>
2109 Canqun Yang <canqun@nudt.edu.cn>
2112 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
2113 for automatic arrays.
2114 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
2116 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2120 * match.c (match_simple_forall, match_simple_where): Forward-declare.
2121 (gfc_match_if): Order statement list alphabetically, add WHERE and
2122 FORALL, remove double PAUSE.
2123 (gfc_match_simple_where, match_forall_header,
2124 gfc_match_simple_forall): New functions.
2125 (gfc_match_forall): Use match_forall_header.
2127 2004-08-19 Paul Brook <paul@codesourcery.com>
2130 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
2131 * symbol.c (gfc_clear_attr): Use memset.
2133 2004-08-19 Paul Brook <paul@codesourcery.com>
2137 * data.c (assign_substring_data_value): Remove.
2138 (create_character_intializer): New function.
2139 (gfc_assign_data_value): Track the typespec for the current
2140 subobject. Use create_character_intializer.
2142 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
2145 * check.c (gfc_check_reduction): New function.
2146 (gfc_check_minval_maxval): Removed.
2147 (gfc_check_product): Removed.
2148 (gfc_check_sum): Removed.
2149 * intrinsic.h: Add/remove declarations for these.
2150 * gfortran.h: Add field f3red to union gfc_check_f.
2151 * intrinsic.c (add_sym_3red): New function.
2152 (add_functions): Register maxval, minval, product, and sum intrinsics
2153 through add_sym_3red.
2154 (check_specific): Handle f3red union field.
2155 * iresolve.c: Whitespace change.
2157 2004-08-18 Paul Brook <paul@codesourcery.com>
2159 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
2161 2004-08-18 Victor Leikehman <lei@il.ibm.com>
2164 * trans-io.c (transfer_namelist_element): New. Recursively handle
2165 derived-type variables. Pass string lengths.
2166 (build_dt): Code moved to build_namelist, with some
2167 changes and additions.
2168 (gfc_build_io_library_fndecls): Declare the fifth
2169 argument in st_set_nml_var_char -- string_length.
2171 2004-08-17 Paul Brook <paul@codesourcery.com>
2172 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2175 * decl.c (get_proc_name): Update mystery comment.
2176 (gfc_match_entry): Check for errors earlier. Add entry point to list.
2177 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
2178 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
2179 (struct gfc_entry_list): Define.
2180 (gfc_get_entry_list): Define.
2181 (struct gfc_namespace): Add refs and entries.
2182 (enum gfc_exec_op): Add EXEC_ENTRY.
2183 (struct gfc_code): Add ext.entry.
2184 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
2185 (mio_symbol_attribute): Don't save/reture addr->entry.
2186 (mio_namespace_ref): Refcount namespaces.
2187 * parse.c (accept_statement): Handle ST_ENTRY.
2188 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
2189 (parse_contained): Fixup sibling references to entry points
2190 after parsing the procedure body.
2191 * resolve.c (resolve_contained_fntype): New function.
2192 (merge_argument_lists, resolve_entries): New functions.
2193 (resolve_contained_functions): Use them.
2194 (resolve_code): Handle EXEC_ENTRY.
2195 (gfc_resolve): Call resolve_entries.
2196 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
2197 * symbol.c (gfc_get_namespace): Refcount namespaces.
2198 (gfc_free_namespace): Ditto.
2199 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
2200 optional when multiple entry points are present.
2201 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
2202 (gfc_get_extern_function_decl): Add assertion. Fix coment.
2203 (create_function_arglist, trans_function_start, build_entry_thunks):
2205 (gfc_build_function_decl): Rename ...
2206 (build_function_decl): ... to this.
2207 (gfc_create_function_decl): New function.
2208 (gfc_generate_contained_functions): Use it.
2209 (gfc_trans_entry_master_switch): New function.
2210 (gfc_generate_function_code): Use new functions.
2211 * trans-stmt.c (gfc_trans_entry): New function.
2212 * trans-stmt.h (gfc_trans_entry): Add prototype.
2213 * trans-types.c (gfc_get_function_type): Add entry point argument.
2214 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
2215 (gfc_generate_module_code): Call gfc_create_function_decl.
2216 * trans.h (gfc_build_function_decl): Remove.
2217 (gfc_create_function_decl): Add prototype.
2219 2004-08-15 Andrew Pinski <apinski@apple.com>
2222 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
2223 for cabs{,f} and copysign{,f}.
2224 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
2225 (gfor_fndecl_math_cabs): Delete.
2226 (gfor_fndecl_math_sign4): Delete.
2227 (gfor_fndecl_math_sign8): Delete.
2228 (gfc_build_intrinsic_function_decls): Remove the
2229 initializing of cabs{,f} and copysign{,f} functions.
2230 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
2231 instead of the functions definitions.
2232 (gfc_conv_intrinsic_sign): Likewise.
2233 * trans.h (gfor_fndecl_math_cabsf): Delete.
2234 (gfor_fndecl_math_cabs): Delete.
2235 (gfor_fndecl_math_sign4): Delete.
2236 (gfor_fndecl_math_sign8): Delete.
2238 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
2240 * trans-array.c (gfc_trans_array_constructor_value): Use
2242 * trans-const.c (gfc_build_string_const,
2243 gfc_init_constants, gfc_conv_mpz_to_tree,
2244 gfc_conv_constant_to_tree): Likewise.
2245 * trans-decl.c (gfc_get_symbol_decl): Likewise.
2246 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2247 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2248 * trans-io.c (add_case, set_error_locus, build_dt,
2249 transfer_expr): Likewise.
2250 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2251 gfc_trans_stop, gfc_trans_character_select): Likewise.
2252 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2253 * trans.c (gfc_trans_runtime_check): Likewise.
2255 2004-08-14 Paul Brook <paul@codesourcery.com>
2257 * trans-decl.c (gfc_build_function_decl): Remove dead code.
2259 2004-08-14 Paul Brook <paul@codesourcery.com>
2261 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
2263 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2265 * gfortran.h: Add comments.
2266 * parse.c (parse_contained): Fix comment typo.
2267 * resolve.c (was_declared): Ditto.
2270 2004-08-11 Paul Brook <paul@codeourcery.com>
2273 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
2275 2004-08-10 Richard Henderson <rth@redhat.com>
2277 * f95-lang.c (gfc_init_builtin_functions): Remove
2278 __builtin_stack_alloc, add __builtin_alloca.
2279 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
2280 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
2282 2004-08-10 Paul Brook <paul@codesourcery.com>
2284 * trans-io.c (transfer_expr): Handle pointters.
2286 2004-08-10 Paul Brook <paul@codesourcery.com>
2289 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
2290 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
2291 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
2292 Handle GFC_SS_COMPONENT.
2293 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
2294 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
2296 (gfc_conv_array_initializer): Call specific initializer routines.
2297 * trans-expr.c (gfc_trans_structure_assign): New function.
2298 (gfc_trans_subarray_assign): New function.
2299 (gfc_trans_subcomponent_assign): New fucntion
2300 (gfc_conv_structure): Use them.
2301 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
2302 (gfc_ss): Add shape.
2304 2004-08-08 Victor Leikehman <lei@il.ibm.com>
2306 * simplify.c (gfc_simplify_shape): Bugfix.
2307 * expr.c (gfc_copy_shape_excluding): New function.
2308 * gfortran.h (gfc_get_shape): Bugfix.
2309 (gfc_copy_shape_excluding): Added declaration.
2310 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2311 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
2312 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
2313 time resolution of shape.
2315 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
2317 * intrinsic.c (add_subroutines): Add getenv and
2318 get_environment_variable. (add_sym_5s): New function.
2319 * intrinsic.h (gfc_resolve_get_environment_variable): Add
2321 * iresolve.c (gfc_resolve_get_environment_variable): New
2324 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
2326 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
2327 __builtin_pow[f] arguments.
2329 2004-08-06 Steven G. Kargl <kargls@comcast.net>
2331 * arith.c: Add #define for model numbers. Remove global GMP variables.
2332 (natural_logarithm,common_logarithm,exponential,sine,
2333 cosine,arctangent,hypercos,hypersine ): Remove.
2334 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
2335 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
2336 gfc_check_real_range, gfc_constant_result, gfc_range_check,
2337 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
2338 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
2339 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
2340 gfc_convert_complex,gfc_int2real,gfc_int2complex,
2341 gfc_real2int,gfc_real2real,gfc_real2complex,
2342 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
2343 to MPFR, use new functions.
2344 * arith.h: Remove extern global variables.
2345 (natural_logarithm,common_logarithm,exponential, sine, cosine,
2346 arctangent,hypercos,hypersine): Remove prototypes.
2347 (arctangent2): Update prototype from GMP to MPFR.
2348 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
2349 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
2350 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
2351 * gfortran.h (GFC_REAL_BITS): Remove.
2352 (arith): Add ARITH_NAN.
2353 Include mpfr.h. Define GFC_RND_MODE.
2354 Rename GCC_GFORTRAN_H GFC_GFC_H.
2355 (gfc_expr): Convert GMP to MPFR.
2356 * module.c: Add arith.h, correct type in comment.
2357 (mio_gmp_real): Convert GMP to MPFR.
2358 (mio_expr): Use gfc_set_model_kind().
2359 * primary.c: Update copyright date with 2004.
2360 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
2361 * simplify.c: Remove global GMP variables
2362 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
2363 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
2364 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
2365 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
2366 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
2367 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
2368 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
2369 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
2370 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
2371 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
2372 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
2373 gfc_simplify_rrspacing,gfc_simplify_scale,
2374 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
2375 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
2376 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
2377 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
2379 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
2380 gfc_conv_mpf_to_tree. Convert it to use MPFR
2381 (gfc_conv_constant_to_tree): Use it.
2382 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
2383 * trans-intrinsic.c: Add arith.h, remove gmp.h
2384 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
2386 2004-08-06 Victor Leikehman <lei@il.ibm.com>
2387 Paul Brook <paul@codesourcery.com>
2389 * trans-array.c (gfc_trans_allocate_array_storage,
2390 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
2391 gfc_conv_loop_setup): For functions, if the shape of the result
2392 is not known in compile-time, generate an empty array descriptor for
2393 the result and let the callee to allocate the memory.
2394 (gfc_trans_dummy_array_bias): Do nothing for pointers.
2395 (gfc_conv_expr_descriptor): Use function return values directly.
2396 * trans-expr.c (gfc_conv_function_call): Always add byref call
2398 (gfc_trans_pointer_assignment): Add comments.
2399 (gfc_trans_arrayfunc_assign): Don't chain on expression.
2401 2004-08-01 Roger Sayle <roger@eyesopen.com>
2403 * options.c (gfc_init_options): Don't warn about the use GNU
2404 extensions by default.
2405 (gfc_post_options): Warn about GNU extensions with -pedantic.
2406 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
2408 2004-07-30 Richard Henderson <rth@redhat.com>
2410 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
2413 2004-07-25 Richard Henderson <rth@redhat.com>
2415 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
2416 and DECL_IGNORED_P on RESULT_DECL.
2417 (gfc_generate_constructors): Likewise.
2419 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2422 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
2424 (ffixed-line-length-80, ffixed-line-length-132): Remove.
2425 * options.c (gfc_handle_options): Deal with changed options.
2426 * scanner.c (load_line): Change second arg to 'char **',
2427 allocate if pointing to NULL. Keep track of buffer's length.
2428 Adapt buffer size to overlong lines. Pad lines to full length
2430 (load_file): Adapt to new interface of load_line.
2432 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2434 * trans.h (builtin_function): Declare.
2436 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2439 (parts ported from g95)
2440 * parse.h (gfc_state_data): New field do_variable.
2441 (gfc_check_do_variable): Add prototype.
2442 * parse.c (push_state): Initialize field 'do_variable'.
2443 (gfc_check_do_variable): New function.
2444 (parse_do_block): Remember do iterator variable.
2445 (parse_file): Initialize field 'do_variable'.
2446 * match.c (gfc_match_assignment, gfc_match_do,
2447 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
2448 Add previously missing checks.
2449 (gfc_match_return): Reformat error message.
2450 * io.c (match_out_tag): New function.
2451 (match_open_element, match_close_element,
2452 match_file_element, match_dt_element): Call match_out_tag
2453 instead of match_vtag where appropriate.
2454 (match_io_iterator, match_io_element): Add missing check.
2455 (match_io): Reformat error message.
2456 (match_inquire_element): Call match_out_tag where appropriate.
2458 * parse.c (gfc_check_do_variable): Fix error locus.
2460 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2463 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
2464 for every assumed length character dummy argument.
2467 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
2470 * simplify.c (gfc_simplify_bound): Copy the bound expression.
2472 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2475 * trans-array.c gfc_trans_g77_array,
2476 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
2477 for assumed length characters.
2478 (gfc_conv_expr_descriptor): Set se->string_length if dealing
2479 with a character expression.
2480 (gfc_cvonv_array_parameter): Pass string length when passing
2481 character array according to g77 conventions.
2483 2004-07-12 Paul Brook <paul@codesourcery.com>
2485 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
2486 * trans-array.c (gfc_trans_auto_array_allocation): Remove
2487 initialization code.
2488 * trans-common.c (create_common): Use gfc_conv_initializer.
2489 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
2490 * trans-expr.c (gfc_conv_initializer): New function.
2491 (gfc_conv_structure): Use it.
2492 * trans.h (gfc_conv_initializer): Add prototype.
2494 2004-07-11 Paul Brook <paul@codesourcery.com>
2497 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
2499 (parse_contained): Mark contained symbols as referenced.
2501 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2504 * module.c (gfc_dump_module, gfc_use_module): Print locus
2505 when opening of module file fails.
2508 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
2511 * match.c (gfc_match_program): A program name is obligatory.
2512 (gfc_match_return): RETURN in main program is an extension.
2513 (gfc_match_block_data): A space is required before a block data
2517 * primary.c (match_boz_constant): Call gfc_notify_std only if
2518 we actually have a non-standard boz-literal-constant.
2521 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
2522 warning if assigning NULL().
2524 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
2526 * f95-lang.c (set_block): Remove.
2527 (gfc_clear_binding_stack): New.
2528 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
2529 (struct binding_level): Remove block_created_by_back_end.
2530 (clear_binding_level): Likewise.
2531 (poplevel): Don't handle block_created_by_back_end.
2533 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2535 * trans-decl.c (gfc_create_module_variable): Nothing to do if
2536 symbol is in common, because we ...
2537 (gfc_generate_module_vars): Call gfc_trans_common.
2539 2004-07-10 Paul Brook <paul@codesourcery.com>
2541 * trans-array.c (gfc_build_null_descriptor): New function.
2542 (gfc_trans_static_array_pointer): Use it.
2543 * trans-array.h (gfc_build_null_descriptor): Add prototype.
2544 * trans-expr.c (gfc_conv_structure): Handle array pointers.
2546 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2549 * decl.c (gfc_match_save): Use-associated common block
2551 * gfortran.h (gfc_common_head): Add new field 'name'.
2552 Fix typo in comment after #endif.
2553 * match.c (gfc_get_common): Add new argument from_common,
2554 mangle name if flag is set, fill in new field in structure
2556 (match_common): Set new arg in call to gfc_get_common,
2557 use-associated common block doesn't collide.
2558 * match.h (gfc_get_common): Adapt prototype.
2559 * module.c (load_commons): Set new arg in call to
2561 * symbol.c (free_common_tree): New function.
2562 (gfc_free_namespace): Call new function.
2563 * trans-common.c (several functions): Remove argument
2564 'name', use name from gfc_common_head instead.
2566 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2568 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
2569 and RHS match. Return early if the RHS is NULL().
2572 * match.c (match_common): Fix error reporting for used common.
2575 * trans-expr.c (gfc_conv_structure): Handle initialization
2576 of scalar pointer components.
2578 * parse.c (decode_statement): Fix matching of BLOCK DATA.
2580 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
2581 by fix for PR 15481.
2583 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2585 * trans-common.c: Fix whitespace issues, make variable names
2587 (create_common): Additionally, make loop logic more obvious.
2589 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2590 Paul Brook <paul@codesourcery.com>
2593 * trans-common.c (calculate_length): Remove ...
2594 (get_segment_info): Merge into here. Save field type.
2595 (build_field): Use saved type.
2596 (create_common, new_condition, new_segment, finish_equivalences):
2597 Use new get_segment_info.
2598 * trans-types.c: Update comment.
2600 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2603 * moduele.c (mio_symbol): Don't I/O initial values unless
2604 symbol is a parameter.
2606 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2609 * resolve.c (resolve_symbol): Verify that the shape of a
2610 parameter array is not only explicit, but also constant.
2611 * array.c (gfc_is_compile_time_shape): New function.
2612 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
2614 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2620 * module.c (write_symbol, write_symtree): Remove workaround.
2621 * primary.c (match_actual_arglist): Enhance comment.
2622 (gfc_match_rvalue): Handle function call with first argument
2623 a keyword argument correctly.
2624 * resolve.c (resolve_symbol): Change call to
2625 gfc_set_default_type to issue error if no implicit type
2627 * trans-decl.c (gfc_create_module_variable): Remove workaround.
2629 2004-07-08 Paul Brook <paul@codesourcery.com>
2631 * intrinsic.c (add_sym_4s): New function.
2632 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
2634 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
2635 Paul Brook <paul@codesourcery.com>
2639 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
2640 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
2641 * intrinsic.c (add_functions): Identify iargc. Add
2642 command_argument_count.
2643 (add_subroutines): Resolve getarg. Add get_command and
2644 get_command_argument.
2645 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
2646 gfc_resolve_get_command_argument): Add prototypes.
2647 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
2648 gfc_resolve_get_command_argument): New functions.
2649 * trans-decl.c (gfor_fndecl_iargc): New variable.
2650 (gfc_build_intrinsic_function_decls): Set it.
2651 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
2652 (gfc_conv_intrinsic_function): Use it.
2653 * trans.h (gfor_fndecl_iargc): Declare.
2655 2004-07-04 Matthias Klose <doko@debian.org>
2657 * Make-lang.in: Generate and install gfortran man page.
2658 * invoke.texi: Remove extra '@c man end'.
2660 2004-07-04 Richard Henderson <rth@redhat.com>
2662 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
2664 2004-07-04 Paul Brook <paul@codesourcery.com>
2666 * decl.c (gfc_match_implicit_range): Don't use typespec.
2667 (gfc_match_implicit): Handle character selectors.
2668 * gfortran.h (gfc_set_implicit): Remove prototype.
2669 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
2670 * parse.c (accept_statement): Don't call gfc_set_implicit.
2671 * symbol.c (new_ts): Remove.
2672 (gfc_set_implicit_none): Use same loop bounds as other functions.
2673 (gfc_set_implicit): Remove.
2674 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
2675 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
2677 2004-06-30 Richard Henderson <rth@redhat.com>
2679 * match.c (var_element): Remove unused variable.
2681 * trans-decl.c (gfc_generate_function_code): Don't set
2682 x_whole_function_mode_p.
2683 (gfc_generate_constructors): Likewise.
2685 2004-06-30 Richard Henderson <rth@redhat.com>
2687 * trans-decl.c (gfc_generate_function_code): Don't set
2688 immediate_size_expand.
2689 (gfc_generate_constructors): Likewise.
2691 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2694 * decl.c (gfc_match_type_spec): Rename second argument to
2695 'implicit_flag', reverse meaning. Don't match_char_spec if
2696 'implicit_flag' is set. Rename to ...
2697 (match_type_spec): ... this.
2698 (gfc_match_implicit_none, match_implicit_range): Move here
2700 (gfc_match_implicit): Move here from match.c, try to
2701 match_char_len if match_implicit_range doesn't succeed for
2702 CHARACTER implicits. Call renamed fucntion match_type_spec.
2703 (gfc_match_data_decl, match_prefix): Call renamed function
2705 * match.c (gfc_match_implicit_none, match_implicit_range,
2706 gfc_match_implicit): Move to decl.c.
2707 * match.h (gfc_match_implicit_none, gfc_match_implicit):
2708 Move protoypes to section 'decl.c'.
2709 (gfc_match_type_spec): Remove prototype.
2711 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2713 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
2716 2004-06-29 Steven Bosscher <stevenb@suse.de>
2718 Make sure types in assignments are compatible. Mostly mechanical.
2719 * trans-const.h (gfc_index_one_node): New define.
2720 * trans-array.c (gfc_trans_allocate_array_storage,
2721 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
2722 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
2723 gfc_conv_array_ubound, gfc_conv_array_ref,
2724 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
2725 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
2726 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
2727 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
2728 types in assignments, conversions and conditionals for expressions.
2729 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
2730 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
2731 gfc_conv_function_call, gfc_trans_pointer_assignment,
2732 gfc_trans_scalar_assign): Likewise.
2733 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
2734 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
2735 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
2736 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
2737 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
2738 gfc_conv_allocated, gfc_conv_associated,
2739 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
2740 * trans-io.c (set_string): Likewise.
2741 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
2742 gfc_do_allocate, generate_loop_for_temp_to_lhs,
2743 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
2744 compute_overall_iter_number, gfc_trans_assign_need_temp,
2745 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
2746 gfc_evaluate_where_mask, gfc_trans_where_assign,
2747 gfc_trans_where_2): Likewise.
2748 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
2749 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
2751 * trans.c (gfc_add_modify_expr): Add sanity check that types
2752 for the lhs and rhs are the same for scalar assignments.
2754 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2756 * dump-parse-tree.c (show_common): New function.
2757 (gfc_show_namespace): Show commons.
2759 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2760 Andrew Vaught <andyv@firstinter.net>
2764 * decl.c (gfc_match_save): Adapt to new common structures,
2765 don't allow saving USE-associated common.
2766 * dump-parse-tree (gfc_show_attr): (saved_)common are not
2767 symbol attributes any longer.
2768 (gfc_show_symbol): Don't show old-style commons any longer.
2769 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
2771 * gfortran.h (symbol_attribute): Remove common and saved_common
2773 (gfc_symbol): Remove common_head element.
2774 (gfc_common_head): New struct.
2775 (gfc_get_common_head): New macro.
2776 (gfc_symtree): Add field 'common' to union.
2777 (gfc_namespace): Add field 'common_root'; change type of field
2778 'blank_common' to blank_common.
2779 (gfc_add_data): New prototype.
2780 (gfc_traverse_symtree): Expect a symtree as first argument
2781 instead of namespace.
2782 * match.c (gfc_get_common): New function.
2783 (match_common_name): Change to take char * as argument, adapt,
2784 fix bug with empty name.
2785 (gfc_match_common): Adapt to new data structures. Disallow
2786 redeclaration of USE-associated COMMON-block. Fix bug with
2788 (var_element): Adapt to new common structures.
2789 * match.h (gfc_get_common): Declare.
2790 * module.c: Add 2004 to copyright years, add commons to module
2791 file layout description.
2792 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
2793 for removed attributes.
2794 (mio_symbol): Adapt to new way of storing common relations.
2795 (load_commons): New function.
2796 (read_module): Skip common list on first pass, load_commons at
2798 (write_commons): New function.
2799 (write_module): Call write_commons().
2800 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
2801 functions related to removed attributes.
2802 (gfc_add_data): New function.
2803 (gfc_clear_attr): Don't set removed attributes.
2804 (gfc_copy_attr): Don't copy removed attributes.
2805 (traverse_symtree): Remove.
2806 (gfc_traverse_symtree): Don't traverse symbol
2807 tree of the passed namespace, but require a symtree to be passed
2808 instead. Unify with traverse_symtree.
2809 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
2811 (save_symbol): Remove setting of removed attribute.
2812 * trans-common.c (gfc_sym_mangled_common_id): Change to
2813 take 'char *' argument instead of 'gfc_symbol'.
2814 (build_common_decl, new_segment, translate_common): Adapt to new
2815 data structures, add new
2817 (create_common): Adapt to new data structures, add new
2818 argument name. Fix typo in intialization of derived types.
2819 (finish_equivalences): Add second argument in call to
2821 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
2822 (gfc_trans_common): Adapt to new data structures.
2823 * trans-decl.c (gfc_create_module_variables): Remove test for
2826 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2828 * io.c: Add 2004 to copyright years.
2830 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2831 Andrew Vaught <andyv@firstinter.net>
2833 * gfortran.h (gfc_gsymbol): New typedef.
2834 (gfc_gsym_root): New variable.
2835 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
2836 * parse.c (global_used): New function.
2837 (parse_block_data): Check for double empty BLOCK DATA,
2838 use global symbol table.
2839 (parse_module): Use global symbol table.
2840 (add_global_procedure, add_global_program): New functions.
2841 (gfc_parse_file): Use global symbol table.
2842 * symbol.c (gfc_gsym_root): New variable.
2843 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
2846 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2848 * module.c (mio_gmp_real): Correct writing of negative numbers.
2850 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2853 * expr.c (check_intrinsic_op): Allow comparison of characters.
2856 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2857 Andrew Vaught <andyv@firstinter.net>
2859 * decl.c (contained_procedure): New function.
2860 (match_end): Verify correctness of END STATEMENT in
2863 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2864 Andrew Vaught <andyv@firstinter.net>
2867 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
2868 (decode_statement): Enforce required space in free-form.
2870 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2872 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
2873 * trans-array.c (gfc_conv_descriptor_data): Add operand
2875 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
2876 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
2877 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
2878 * trans-common.c (create_common): Likewise.
2879 * trans-expr.c (gfc_conv_component_ref): Likewise.
2880 * trans-io.c (set_parameter_value): Likewise.
2881 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
2882 (transfer_expr): Likewise.
2883 * trans-decl.c (gfc_trans_auto_character_variable):
2884 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
2885 (gfc_gimplify_function): New function.
2886 (gfc_generate_function-code): Properly handle nested functions.
2887 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
2889 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
2892 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
2893 (gfc_resolve_inquire): Resolve the iolength tag. Return
2894 SUCCESS at end of function if no failure has occured.
2895 * resolve.c (resolve_code): Resolve if iolength is encountered.
2896 * trans-io.c: (ioparm_iolength, iocall_iolength,
2897 iocall_iolength_done): New variables.
2898 (last_dt): Add IOLENGTH.
2899 (gfc_build_io_library_fndecls ): Set iolength related variables.
2900 (gfc_trans_iolength): Implement.
2901 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
2903 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
2906 * scanner.c (load_line): Don't truncate preprocessor lines.
2907 Reformat error message.
2908 (preprocessor_line): Issue warning in case of malformed
2911 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2913 * resolve.c (resolve_symbol): Add comment in function body.
2914 (check_data_variable): Change type of mark to ar_type, adapt code
2917 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2919 * array.c (gfc_insert_constructor): Avoid redundant call to
2920 mpz_comp. Add 2004 to copyright years.
2922 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
2924 * trans.h (stmtblock_t): Change has_scope to unsigned int.
2926 2004-06-20 Steven G. Kargl <kargls@comcast.net>
2928 * arith.c (gfc_range_check): correct complex underflow.
2930 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2933 * match.c (match_case_selector): Call gfc_match_init_expr
2934 instead of gfc_match_expr.
2935 * resolve.c (validate_case_label_expr): No need to check for
2936 constant, since it wouldn't have been matched with the fix to
2939 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2942 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
2945 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2948 * trans-deecl.c (generate_local_decl): Do not issue warning for
2949 unused variables if they're use associated.
2951 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2952 Andrew Vaught <andyv@firstinter.net>
2955 * gfortran.h (gfc_check_f): Add new field f3ml.
2956 * check.c (gfc_check_minloc_maxloc): Take argument list instead
2957 of individual arguments, reorder if necessary.
2958 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
2959 * intrinsic.c (add_sym_3ml): New function.
2960 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
2961 (check_specific): Catch special case MINLOC, MAXLOC.
2963 2004-06-14 Paul Brook <paul@codesourcery.com>
2965 * intrinsic.c (add_sym_2s): Use correct function types.
2967 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2969 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
2970 * data.c (gfc_get_section_index): Remove dependency on trans.h.
2972 2004-06-12 Steven G. Kargl <kargls@comcast.net>
2974 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
2975 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
2976 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
2977 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
2978 * trans-intrinsic.c: Use symbols.
2979 * intrinsic.c (add_sym_2s): New function.
2980 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
2981 * intrinsic.h: Function prototypes.
2982 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
2983 gfc_resolve_srand): New functions.
2985 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2988 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
2989 contained procedure.
2991 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2994 * interface.c (compare_parameter, compare_actual_formal): Don't
2995 check types and array shapes for NULL()
2996 * trans-expr.c (conv_function_call): No double indirection for
2999 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
3001 * trans-expr.c (gfc_conv_cst_int_power): Compute
3002 x**(-n) by converting it to (1/x)**n instead of
3005 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3008 * module.c (write_symbol, write_symtree): Don't write symbols
3009 wrongly added to namespace.
3010 * trans-decl.c (gfc_create_module_variable): Don't create a
3011 backend decl for a symbol incorrectly added to namespace.
3013 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3016 * resolve.c (resolve_symbol): Verify that parameter array has an
3017 explicit shape. Fix typos and coding style issues in surrounding
3020 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3023 * gfortran.texi: The documentation doesn't contain infomration on
3024 how to report bugs, and shouldn't, so remove the line which
3027 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3029 * intrinsic.c (sort_actual): Keep track of type of missing
3030 arguments. (Missing from previous commit.)
3032 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3034 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
3035 * interface.c (compare_actual_formal): Keep type of omitted
3037 * trans-expr.c (gfc_conv_function_call): Add string length
3038 argument for omitted string argument.
3040 2004-06-03 Paul Brook <paul@codesourcery.com>
3042 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
3043 lists instead of compound expr chains.
3044 (gfc_trans_code): Annotate statement lists.
3046 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3048 * trans-array.c: Fix spelling in comments.
3050 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3053 * data.c (assign_substring_data_value): New function.
3054 (gfc_assign_data_value): Call the new function if we're dealing
3055 with a substring LHS.
3057 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3060 * gfortran.h (GFC_VERSION): Remove.
3061 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
3064 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3066 * trans-types.c: Fix spelling & layout in comments.
3068 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3071 * trans-const.c (gfc_conv_string_init): Allow variable string
3072 length lower than initialization string length.
3074 2004-05-30 Paul Brook <paul@codesourcery.com>
3077 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
3078 * trans-expr.c (gfc_trans_string_copy): New function.
3079 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
3081 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
3082 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
3083 * trans.h (struct gfc_saved_var): Define.
3084 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
3086 2004-05-30 Steven G. Kargl <kargls@comcast.net>
3088 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
3090 2004-05-29 Steven G. Kargl <kargls@comcast.net>
3092 * simplify.c (gfc_simplify_log): Remove useless line of code.
3094 2004-05-29 Paul Brook <paul@codesourcery.com>
3096 * trans-common.c (find_equivalence): Find multiple rules.
3098 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3100 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
3101 (gfc_current_locus): Declare new global variable.
3102 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
3103 (gfc_current_locus1): Rename ...
3104 (gfc_current_locus): ... to this.
3105 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
3106 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
3107 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
3108 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
3109 and gfc_current_locus(), respectively.
3110 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
3111 match_array_cons_element, gfc_match_array_constructor):
3112 Read/modify gfc_current_locus instead of calling gfc_set_locus()
3113 and gfc_current_locus().
3114 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
3115 match_attr_spec, gfc_match_function_decl, gfc_match_end,
3116 attr_decl1, gfc_match_save): Likewise.
3117 * error.c (error_print, gfc_internal_error): Likewise.
3118 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
3119 * interface.c (gfc_add_interface): Likewise.
3120 * io.c (gfc_match_format, match_dt_format, match_dt_element,
3121 match_io_iterator, match_io): Likewise.
3122 * match.c (gfc_match_space, gfc_match_eos,
3123 gfc_match_small_literal_int, gfc_match_st_label,
3124 gfc_match_strings, gfc_match_name, gfc_match_iterator,
3125 gfc_match_char, gfc_match, gfc_match_assignment,
3126 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
3127 gfc_match_nullify, gfc_match_call, match_implicit_range,
3128 gfc_match_implicit, gfc_match_data, match_case_selector,
3129 gfc_match_case, match_forall_iterator): Likewise.
3130 * matchexp.c (gfc_match_defined_op_name, next_operator,
3131 match_level_1, match_mult_operand, match_ext_mult_operand,
3132 match_add_operand, match_ext_add_operand, match_level_2,
3133 match_level_3, match_level_4, match_and_operand, match_or_operand,
3134 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
3135 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
3136 * parse.c (match_word, decode_statement, next_free, next_fixed,
3137 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
3139 * primary.c (match_digits, match_integer_constant,
3140 match_boz_constant, match_real_constant, match_substring,
3141 next_string_char, match_charkind_name, match_string_constant,
3142 match_logical_constant, match_const_complex_part,
3143 match_complex_constant, match_actual_arg, match_keyword_arg,
3144 gfc_match_actual_arglist, gfc_match_structure_constructor,
3145 gfc_match_rvalue, gfc_match_variable): Likewise.
3146 * st.c (gfc_get_code): Likewise.
3147 * symbol.c (check_conflict, check_used, check_done,
3148 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
3149 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
3150 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
3152 2004-05-26 Roger Sayle <roger@eyesopen.com>
3154 * io.c (format_asterisk): Silence compiler warnings by correcting
3155 the number of elements of a "locus" initializer.
3157 2004-05-25 Roger Sayle <roger@eyesopen.com>
3160 * matchexp.c: Allow unary operators after arithmetic operators
3162 (match_ext_mult_operand, match_ext_add_operand): New functions.
3163 (match_mult_operand): Tweak to call match_ext_mult_operand.
3164 (match_add_operand): Tweak to call match_ext_mult_operand.
3165 (match_level_2): Rearrange to call match_ext_add_operand.
3167 2004-05-25 Paul Brook <paul@codesourcery.com>
3169 * expr.c (check_inquiry): Remove bogus tests.
3171 2004-05-23 Paul Brook <paul@codesourcery.com>
3174 * expr.c (restricted_args): Remove redundant checks/argument.
3175 (external_spec_function): Update to match.
3176 (restricted_intrinsic): Rewrite.
3178 2004-05-23 Paul Brook <paul@codesourcery.com>
3179 Victor Leikehman <lei@haifasphere.co.il>
3181 * gfortran.h (struct gfc_symbol): Add equiv_built.
3182 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
3184 (current_length): Remove.
3185 (add_segments): New function.
3186 (build_equiv_decl): Create initialized common blocks.
3187 (build_common_decl): Always add decl to bindings.
3188 (create_common): Create initializers.
3189 (find_segment_info): Reformat to match coding conventions.
3190 (new_condition): Use add_segments.
3191 (add_condition, find_equivalence, add_equivalences): Move iteration
3192 inside functions. Only process each segment once.
3193 (new_segment, finish_equivalences, translate_common): Simplify.
3195 2004-05-23 Steven G. Kargl <kargls@comcast.net>
3197 * check.c (gfc_check_random_seed): Issue for too many arguments.
3199 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3201 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
3203 2004-05-22 Paul Brook <paul@codesourcery.com>
3205 * dump-parse-tree.c (gfc_show_equiv): New function.
3206 (gfc_show_namespace): Use it.
3208 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
3211 * symbol.c (gfc_add_common): Disable checks to work around other more
3212 fundamental inadequacies.
3214 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3216 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
3218 (gfc_build_function_decl): Likewise.
3220 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3222 * check.c (gfc_check_system_clock): New function.
3223 * intrinsic.c (add_sym_3s): New function.
3224 (add_subroutines): Use it.
3225 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
3227 * iresolve.c (gfc_resolve_system_clock): New function.
3229 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3231 * invoke.texi: Document -Wunderflow and spell check.
3232 * lang.opt: Add Wunderflow.
3233 * gfortran.h (gfc_option_t): Add warn_underflow option.
3234 * options.c (gfc_init_options, set_Wall): Use it.
3235 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
3236 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
3237 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
3238 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
3239 * arith.c (common_logarithm): Fix typo in comment.
3241 2004-05-21 Roger Sayle <roger@eyesopen.com>
3243 * io.c (check_format): As a GNU extension, allow the comma after a
3244 string literal to be optional in a format. Use gfc_notify_std to
3245 issue an error/warning as appropriate.
3247 2004-05-21 Roger Sayle <roger@eyesopen.com>
3249 * io.c (check_format): Use gfc_notify_std to determine whether to
3250 issue an error/warning for omitting the digits from the X format.
3252 2004-05-20 Roger Sayle <roger@eyesopen.com>
3254 * io.c (check_format): Allow the number before the X format to
3255 be optional when not -pedantic.
3257 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
3258 Paul Brook <paul@codesourcery.com>
3260 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
3261 Create decls for __builtin_pow{,f}.
3262 * gfortran.h (PREFIX_LEN): Define.
3263 * trans-decl.c (gfor_fndecl_math_powi): Add.
3264 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3265 (gfc_build_intrinsic_function_decls): Create decls for powi.
3266 * trans-expr.c (powi_table): Add.
3267 (gfc_conv_integer_power): Remove.
3268 (gfc_conv_powi): New function.
3269 (gfc_conv_cst_int_power): New function.
3270 (gfc_conv_power_op): Use new powi routines.
3271 * trans.h (struct gfc_powdecl_list): Add.
3272 (gfor_fndecl_math_powi): Add.
3273 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3275 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3277 * trans.c, trans-decl.c: Fix comment typos.
3279 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3281 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
3283 2004-05-18 Steve Kargl <kargls@comcast.net>
3285 * arith.c (gfc_int2complex): Fix incorrect range checking.
3287 2004-05-18 Paul Brook <paul@codesourcery.com>
3290 * decl.c (add_init_expr_to_sym): Remove incorrect check.
3291 (default_initializer): Move to expr.c.
3292 (variable_decl): Don't assign default initializer to variables.
3293 * expr.c (gfc_default_initializer): Move to here.
3294 * gfortran.h (gfc_default_initializer): Add prototype.
3295 * resolve.c (resolve_symbol): Check for illegal initializers.
3296 Assign default initializer.
3298 2004-05-17 Steve Kargl <kargls@comcast.net>
3300 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
3302 2004-05-17 Steve Kargl <kargls@comcast.net>
3304 * arith.c (gfc_real2complex): Range checking wrong part of complex
3307 2004-05-16 Paul Brook <paul@codesourcery.com>
3309 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
3311 2004-05-16 Paul Brook <paul@codesourcery.com>
3313 * arith.c (gfc_range_check): Fix logic error.
3315 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
3317 * arith.c: Fix comment typos.
3319 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3322 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
3323 not initialized in a disallowed fashion.
3324 * match.c (gfc_match_common): Likewise.
3325 (var_element): Verify that variable is not in the blank COMMON,
3326 if it is in a common.
3328 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
3330 * Make-lang.in (f95.generated-manpages): Remove.
3331 (f95.srcextra): New.
3332 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
3333 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
3336 (f95.install-info): Remove.
3337 (install-info): New.
3339 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
3341 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
3343 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3345 * primary.c (match_boz_constant): Use gfc_notify_std() for
3346 issuing a warning or an error.
3348 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3351 * primary.c (match_structure_constructor): Rename ...
3352 (gfc_match_structure_constructor): ... to this. Make non-static.
3353 (gfc_match_rvalue): Call renamed function.
3354 * match.h (gfc_match_structure_constructor): Declare.
3355 * match.c (gfc_match_data_constant): Handle structure
3358 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3362 * gfortran.h (gfc_linebuf): New typedef.
3364 (gfc_file): Revamped, use new gfc_linebuf.
3365 (locus): Revamped, use new types.
3366 (gfc_current_file): Remove.
3367 (gfc_current_form, gfc_source_file): New global variables.
3368 * match.c (gfc_match_space, gfc_match_strings): Use
3369 gfc_current_form to find source form.
3370 * module.c (gfc_dump_module): Use gfc_source_file when printing
3372 * error.c (show_locus, show_loci) Use new data structures to print
3374 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
3376 (file_head, current_file, gfc_current_form, line_head, line_tail,
3377 gfc_current_locus1, gfc_source_file): New global variables.
3378 (gfc_scanner_init1): Set new global variables.
3379 (gfc_scanner_done1): Free new data structures.
3380 (gfc_current_locus): Return pointer to gfc_current_locus1.
3381 (gfc_set_locus): Set gfc_current_locus1.
3382 (gfc_at_eof): Set new variables.
3383 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
3384 to new locus structure.
3385 (gfc_check_include): Remove.
3386 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
3387 (gfc_skip_comments): Use gfc_current_form, find locus with
3389 (gfc_next_char): Use gfc_current_form.
3390 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
3391 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
3393 (get_file): New function.
3394 (preprocessor_line, include_line): New functions.
3395 (load_file): Move down, rewrite to match new data structures.
3396 (gfc_new_file): Rewrite to match new data structures.
3397 * parse.c (next_statement): Remove code which is now useless. Use
3398 gfc_source_form and gfc_source_file where appropriate.
3399 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
3400 when determining locus of frontend code.
3401 * trans-io.c (set_error_locus): Same.
3402 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
3403 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
3405 (all): Add missing initializers.
3407 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3409 * Make-lang.in (trans-common.o): Remove redundant dependency.
3410 (data.c): Replace object file name ...
3411 (data.o): ... by the correct one.
3413 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3415 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
3416 for ranges when dumping array references.
3418 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
3420 * decl.c (variable_decl): Always apply default initializer.
3422 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3425 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
3426 handle zero correctly.
3428 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3430 * match.c (gfc_match): Eliminate dead code.
3432 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3434 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
3435 Detect bad continuation line in fixed form sources.
3437 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3440 * iresolve.c (gfc_resolve_nearest): Add new function.
3441 * intrinsic.h: ... declare it here.
3442 * intrinsic.c (add_functions): ... add it as resolving function
3445 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3448 * match.c (gfc_match_do): Allow infinite loops with
3449 label-do-stmt. Do not enforce space after comma.
3451 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3454 * parse.c (parse_interface): Allow empty INTERFACE, remove
3457 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3459 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
3460 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
3461 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
3462 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
3463 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
3464 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
3465 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
3466 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
3467 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
3468 trans-types.h, trans.c, trans.h: Update copyright years and
3470 * data.c: Likewise, also removed two whitespace-only lines.
3471 * gfortranspec.c, lang.opt: Update copyright years.
3473 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3476 * trans-decl.c (generate_local_decl): Don't warn for unused
3477 variables which are in common blocks.
3479 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3481 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
3482 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
3483 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
3485 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
3488 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
3490 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
3492 * gfortran.texi: Use @table @emph instead of @itemize @emph.
3493 Remove "set DEVELOPMENT".
3494 (Compiling GFORTRAN): Remove.
3496 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3498 * array.c (match_subscript, match_array_ref): Add comments
3499 explaining argument 'init'.
3500 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
3501 trans-expr.c, trans.c: Fix some typos in comments.
3502 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
3503 * primary.c (match_digits, match_integer_constant): Add comment
3504 explaining signflag.
3506 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3509 * primary.c: Include system.h and flags.h, needed for pedantic.
3510 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
3513 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3516 * match.c (match_data_constant): Handle case where
3517 gfc_find_symbol sets sym to NULL
3519 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3521 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
3522 dependency on mathbuiltins.def
3524 2004-04-24 Victor Leikehman <lei@il.ibm.com>
3526 * trans-io.c (transfer_expr): Implemented recursive printing
3529 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
3531 * gfortranspec.c: Do not include multilib.h.
3533 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3535 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
3536 2004 to copyright years.
3537 * trans-expr.c, trans-decl.c: Comment update, we now generate
3538 GENERIC, not SIMPLE. Add 2004 to copyright years.
3540 2004-04-24 Paul Brook <paul@codesourcery.com>
3542 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
3544 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
3547 * arith.c (gfc_arith_divide): Fix complex divide.
3549 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
3551 * gfortranspec.c: Include the target headers.
3553 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
3557 * arith.c (arctangent2): New function.
3558 * arith.h (arctangent2): Add function prototype.
3559 * simplify.c (gfc_simplify_atan2): Use it.
3560 (gfc_simplify_log): Use it.
3562 2004-04-12 Diego Novillo <dnovillo@redhat.com>
3564 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
3565 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
3567 2004-04-11 Bud Davis <bdavis9659@comcast.net>
3570 * trans-io.c (build_dt): Change REC to value.
3572 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3575 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
3576 the real value when converting mpf to string.
3578 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3581 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
3584 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3587 * simplify.c (simplify_min_max): Convert the type of the result.
3589 2004-04-11 Paul Brook <paul@codesourcery.com>
3591 * gfortran.texi: Use full target triplet.
3593 2004-04-11 Paul Brook <paul@codesourcery.com>
3595 * Make-lang.in (GFORTRAN_TEXI): Set it.
3596 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
3597 (fortran/gfortran.info): Ditto.
3598 * gfortran.texi: Major update.
3599 * invoke.texi: New file.
3601 2004-04-10 Paul Brook <paul@codesourcery.com>
3603 * trans-array.c (gfc_trans_allocate_temp_array,
3604 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
3605 * trans-decl.c (gfc_build_dummy_array_decl,
3606 gfc_get_symbol_decl, gfc_build_function_decl,
3607 gfc_create_module_variable): Ditto.
3608 * trans-expr.c (gfc_conv_variable): Ditto.
3609 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
3610 * trans.h (GFC_DECL_STRING): Remove.
3611 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
3612 GFC_DECL_ASSIGN): Renumber flags.
3614 2004-04-05 Paul Brook <paul@codesourcery.com>
3618 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
3620 * gfortran.h (struct gfc_charlen): Add backend_decl.
3621 * trans-array.c (gfc_trans_allocate_temp_array,
3622 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
3623 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
3624 Remove old, broken string handling.
3625 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
3626 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
3627 gfc_trans_deferred_array): Handle character arrays.
3628 * trans-const.c (gfc_conv_const_charlen): New function.
3629 * trans-const.h (gfc_conv_const_charlen): Add prototype.
3630 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
3632 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
3633 (gfc_create_string_length): New function.
3634 (gfc_get_symbol_decl): Create lengths for character variables.
3635 (gfc_get_fake_result_decl): Ditto.
3636 (gfc_build_function_decl): Only set length for assumed length
3637 character arguments.
3638 (gfc_trans_dummy_character): New function.
3639 (gfc_trans_auto_character_variable): Rewrite.
3640 (gfc_trans_deferred_vars): Handle more types of character variable.
3641 (gfc_create_module_variable): String lengths have moved.
3642 (gfc_generate_function_code): Initialize deferred var chain earlier.
3643 * trans-expr.c (gfc_conv_init_string_length): Rename ...
3644 (gfc_trans_init_string_length): ... to this.
3645 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
3646 gfc_conv_function_call): Update to new format for character variables.
3647 (gfc_conv_string_length): Remove.
3648 (gfc_conv_string_parameter): Update assertion.
3649 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
3650 * trans-io.c (set_string): Use new macro names.
3651 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
3652 * trans-types.c (gfc_get_character_type): Use existing length expr.
3653 (gfc_is_nodesc_array): Make public.
3654 (gfc_get_dtype_cst): Rename ...
3655 (gfc_get_dtype): ... to this. Handle unknown size arrays.
3656 (gfc_get_nodesc_array_type): Use new name.
3657 (gfc_sym_type): New character variable code.
3658 (gfc_get_derived_type): Ditto.
3659 (gfc_get_function_type): Evaluate character variable lengths.
3660 * trans-types.h (gfc_strlen_kind): Define.
3661 (gfc_is_nodesc_array): Add prototype.
3662 * trans.h: Update prototypes.
3663 (struct lang_type): Update comments.
3664 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
3665 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
3667 2004-04-04 Paul Brook <paul@codesourcery.com>
3669 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
3670 * options.c (gfc_init.options, gfc_handle_option): Ditto.
3671 * trans-expr.c (gfc_conv_function_call): Ditto.
3672 * trans-types.c (gfc_is_nodesc_array): Ditto
3673 * lang.opt (fg77-calls): Remove.
3675 2004-04-04 Paul Brook <paul@codesourcery.com>
3677 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
3678 (gfc_conv_descriptor_base): Rename ...
3679 (gfc_conv_descriptor_offset): ... to this.
3680 (gfc_trans_allocate_array_storage): Set offset to zero.
3681 (gfc_conv_array_base): Rename ...
3682 (gfc_conv_array_offset): ... to this.
3683 (gfc_conv_array_index_ref): Add offset parameter.
3684 (gfc_conv_array_ref): Include offset.
3685 (gfc_trans_preloop_setup): Use existing offset.
3686 (gfc_trans_allocate_temp_array, gfc_array_allocate,
3687 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
3688 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
3689 gfc_conf_ss_descriptor): Set offset.
3690 * trans-array.h: Rename prototypes.
3691 * trans-const.h (gfc_index_zero_node): Define.
3692 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
3693 * trans-types.c (gfc_get_array_type_bounds): Ditto.
3694 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
3696 2004-03-25 Diego Novillo <dnovillo@redhat.com>
3698 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
3700 2004-03-24 Bud Davis <bdavis9659@comcast.net>
3703 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
3704 before conversion by gmp library call.
3706 2004-03-24 Bud Davis <bdavis9659@comcast.net>
3709 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
3711 2004-02-24 Richard Henderson <rth@redhat.com>
3713 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
3715 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
3717 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
3718 (fortran/gfortran.info): ... to here.
3721 2004-02-16 Richard Henderson <rth@redhat.com>
3723 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
3724 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
3725 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
3726 (gfc_expand_function): Rename from expand_function_body, make static,
3727 don't do anything except invoke tree_rest_of_compilation.
3728 (gfc_be_parse_file): Invoke cgraph.
3729 (gfc_expand_decl): Remove.
3730 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
3731 __builtin_adjust_trampoline.
3732 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
3733 (gfc_finalize): New.
3734 (gfc_generate_function_code): Use it. Lower nested functions.
3735 * trans-expr.c (gfc_conv_function_call): Add static chain operand
3737 * trans.c (gfc_build_function_call): Likewise.
3738 * trans.h (expand_function_body): Remove.
3740 2004-02-15 Victor Leikehman <lei@il.ibm.com>
3743 * trans-decl.c (gfc_build_function_decl) For functions
3744 returning CHARACTER pass an extra length argument,
3745 following g77 calling conventions.
3746 * trans-types.c (gfc_get_function_type) Ditto.
3747 * trans-expr.c (gfc_conv_function_call) Ditto.
3749 2004-02-14 Paul Brook <paul@codesourcery.com>
3751 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
3753 2004-02-12 Paul Brook <paul@nowt.org>
3757 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
3759 * gfortran.texi: Fix typos.
3761 2004-02-07 Bud Davis <bdavis9659@comcast.net>
3764 * intrinsic.c (add_conversions) Use logical conversion instead
3766 * trans-types.c (gfc_get_logical_type) implemented logical*1
3769 2004-01-17 Paul Brook <paul@codesourcery.com>
3771 * lang-specs.h: Remove %<fixed-form.
3773 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
3775 * lang-specs.h: Enable preprocessing of source files
3776 ending in .F, .fpp, .FPP, .F90 and .F95.
3778 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
3781 * lang-specs.h: Enable compilation of files ending
3782 in .f, .for and .FOR.
3784 2004-01-11 Paul Brook <paul@codesourcery.com>
3786 * trans-stmt.c (gfc_trans_if_1): New function.
3787 (gfc_trans_if): Use it.
3789 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
3791 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
3792 (gfc_option_t): Add max_identifier_length.
3793 * lang.opt: Add fmax-identifier-length.
3794 * match.c (parse_name): Use limit.
3795 * options.c (gfc_init_options): Set max_identifier_length.
3796 (gfc_handle_option): Ditto.
3798 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
3800 * intrinsic.c (add_functions): Add resolve function to dcmplx.
3801 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
3802 * iresolve.c (gfc_resolve_dcmplx): New function.
3804 2004-01-10 Paul Brook <paul@codesourcery.com>
3806 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
3807 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
3808 (gfc_return_by_reference): Correct condition.
3809 (gfc_get_function_type): Ditto.
3811 2004-01-10 Paul Brook <paul@codesourcery.com>
3813 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
3816 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
3818 * iresolve.c: Use correct kind.
3820 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
3823 * trans-decl.c (gfc_create_module_variable): Output array valued
3826 2004-01-10 Paul Brook <paul@codesourcery.com>
3828 * resolve.c (resolve_branch): Get error message right way round.
3830 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
3832 * trans-array (gfc_conv_loop_setup): Adjust comment to track
3834 (gfc_array_allocate): Don't count size of element twice.
3836 2004-01-04 Paul Brook <paul@codesourcery.com>
3838 * lang.opt (i8, r8, std=*): Remove RejectNegative.
3840 2004-01-04 Paul Brook <paul@codesourcery.com>
3842 * error.c (gfc_notify_std): New function.
3843 * gfortran.h (gfc_notify_std): Declare.
3844 (GFC_STD_*): Define.
3845 (gfc_option_t): Add warn_std and allow_std.
3846 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
3847 (gfc_intrinsic_func_interface): Use gfc_notify_std.
3848 * check.c (check_rest): Use gfc_notify_std.
3849 * match.c (gfc_match_pause): Ditto.
3850 (gfc_match_assign): Ditto.
3851 (gfc_match_goto): Ditto.
3852 * resolve.c (resolve_branch): Ditto.
3853 * lang.opt: Add std=<foo> and w.
3854 * options.c (gfc_init_options): Set allow_std and warn_std.
3855 (gfc_handle_option): Handle OPT_std_* and OPT_w.
3857 2004-01-01 Paul Brook <paul@codesourcery.com>
3859 * array.c (gfc_append_constructor): Take constructor, not expression.
3860 * data.c (struct gfc_expr_stack): Remove.
3861 (expr_stack): Remove.
3862 (find_con_by_offset): Rename from find_expr_in_con.
3863 (find_con_by_component): Rename from find_component_in_con.
3864 (gfc_get_expr_stack): Remove.
3865 (gfc_assign_data_value): Rewrite.
3866 (gfc_expr_push): Remove.
3867 (gfc_expr_pop): Remove.
3868 (gfc_advance_section): Rename from
3869 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
3870 (gfc_get_section_index): Handle unbounded sections.
3871 * gfortran.h: Update prototypes.
3872 * resolve.c (check_data_variable): Array section maight not be the
3875 2004-01-01 Paul Brook <paul@codesourcery.com>
3878 * resolve.c (resolve_symbol): Allow assumed length function results.
3880 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
3882 * match.c (gfc_match_pause): Fix spelling.
3884 2004-01-01 Steven Bosscher <stevenb@suse.de>
3887 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
3888 reference from the expression.
3890 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
3892 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
3894 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
3895 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
3896 (symbol_attribute):New variable attribute: assign.
3897 * io.c (resolve_tag):Integer variable is allowed.
3898 (match_dt_format): Add ASSIGN statement. Set assign flag.
3899 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
3900 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
3901 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
3902 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
3903 (next_statement): Add ST_LABEL_ASSIGNMENT.
3904 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
3905 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
3906 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
3907 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
3908 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
3909 assign. Put them into the stuct lang_decl.
3910 * trans-io.c (set_string): Add the assign statement.
3911 * trans-stmt.c (gfc_trans_label_assign): New function.
3912 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
3913 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
3914 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
3915 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
3916 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
3917 (GFC_DECL_ASSIGN(node)): New macro to access flag.
3919 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
3922 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
3925 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
3927 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
3928 that arguments to subroutines/functions can't alias themselves, nor global
3931 2003-12-20 Steven Bosscher <stevenb@suse.de>
3933 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
3934 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
3936 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
3938 * primary.c (match_substring): Fix substring bug for start point
3939 or end point is NULL.
3940 * trans-expr.c (gfc_conv_substring): Ditto
3941 * trans-types.c (gfc_sym_type): Get correct type of scalar
3942 character variables.
3943 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
3946 2003-12-10 Richard Henderson <rth@redhat.com>
3948 * options.c (gfc_post_options): Don't ever use rtl inlining.
3950 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
3952 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
3953 * trans-equivalence.c: Remove.
3954 * trans-decl.c (gfc_get_symbol_decl): Update to match.
3955 (gfc_generate_function_code): Ditto.
3956 * trans-array.c (gfc_conv_array_parameter): Ditto.
3957 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
3958 (F95_ADDITIONAL_OBJS): Add stor-layout.o
3959 * trans.h (gfc_trans_equivalence): Remove.
3960 * gfortran.h (struct gfc_equiv): Add used field.
3961 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
3962 equiv_offset fields.
3964 2003-12-05 Richard Henderson <rth@redhat.com>
3966 * trans.c (gfc_build_addr_expr): New.
3967 (gfc_build_indirect_ref, gfc_build_array_ref): New.
3968 * trans.h: Declare them.
3969 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
3970 trans-stmt.c, trans.c (*): Use them.
3972 * f95-lang.c (gfc_post_options): Remove dead prototype.
3973 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
3974 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
3977 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
3979 * io.c (gfc_match_format): Check for missing format label.
3981 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
3984 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
3985 from interfaces in modules.
3987 2003-11-30 Paul Brook <paul@nowt.org>
3989 * trans-array.c (gfc_trans_g77_array): Make non-static.
3990 (gfc_trans_assumed_size): Remove.
3991 (gfc_trans_dummy_array_bias): Explicitly free temporary.
3992 * trans-array.h (gfc_trans_g77_array): Add prototype.
3993 (gfc_trans_assumed_size): Remove.
3994 * trans-decls.c (gfor_fndecl_push_context): Remove.
3995 (gfor_fndecl_pop_context): Remove.
3996 (gfc_build_function)decls): Don't create them.
3997 (gfc_trans_deferred_vars): Update to match. Remove dead code.
3998 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
4000 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
4002 * trans-array.c (gfc_conv_array_parameter): Simplify
4003 array argument passing for array name actual argument.
4004 * trans-expr.c (gfc_conv_function_call): Ditto
4005 * trans-types.c (gfc_is_nodesc_array):Ditto.
4007 2003-11-30 Paul Brook <paul@nowt.org>
4009 * f95-lang.c (gfc_post_options): Move ...
4010 * options.c (gfc_post_options): .. to here. Handle inlining options.
4011 * gfortran.h (gfc_post_options): Add prototype.
4013 2003-11-28 Richard Henderson <rth@redhat.com>
4015 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
4017 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
4019 * trans.h (has_alternate_specifier): New global variable.
4020 * match.c (gfc_match_call): Handle actual arguments associated with
4021 alternate return indicators.
4022 * trans-expr.c (gfc_conv_function_call): Ditto
4023 * trans-stmt.c (gfc_trans_call): Ditto
4024 (gfc_trans_return): Handle return statement with value.
4025 * trans-decl.c (gfc_generate_function_code): Handle functions with
4027 (gfc_get_fake_result_decl): Ditto
4028 * trans-types.c (gfc_get_function_type): Ditto
4029 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
4030 (resolve_formal_arglist): Check asterisk dummy.
4032 2003-11-27 Paul Brook <paul@nowt.org>
4034 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
4035 allocation interface.
4036 (gfc_conv_ array_parameter): Ditto.
4037 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
4038 * trans-array.c: Update prototype.
4039 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
4040 (gfc_trans_auto_character_variable): Use new memory alloc interface.
4041 * trans-expr.c (gfc_conv_string_tmp): Ditto.
4042 (gfc_conv_function_call): Use gfc_conv_string_tmp.
4043 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
4044 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
4045 * trans.h (gfc_ss_info): Remove unused pdata field.
4046 * trans.c (gfc_create_var_np): Change T to V.
4048 2003-11-26 Richard Henderson <rth@redhat.com>
4050 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
4051 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
4052 FRACTION, NEAREST, SET_EXPONENT.
4053 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
4054 Fix GTY marking. Remove unnecessary const's.
4055 (LIBM_FUNCTION): Rename from I_LIB.
4056 (LIBF_FUNCTION): New.
4057 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
4058 conventions. Assume the expr signature is correct. Mark const.
4059 (gfc_conv_intrinsic_exponent): Use library functions.
4060 (gfc_conv_intrinsic_set_exponent): Remove.
4061 (gfc_conv_intrinsic_scale): Remove.
4062 (gfc_conv_intrinsic_nearest): Remove.
4063 (gfc_conv_intrinsic_fraction): Remove.
4064 (gfc_conv_intrinsic_function): Update.
4065 * trans-decl.c (gfor_fndecl_math_exponent4): New.
4066 (gfor_fndecl_math_exponent8): New.
4067 (gfc_build_intrinsic_function_decls): Set them.
4068 * trans.h: Declare them.
4070 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
4072 * trans-common.c (gfc_layout_global_equiv): Locate the error for
4073 underflow COMMON block.
4074 (gfc_trans_one_common): Fix bug for size of COMMON block containing
4075 EQUIVALENCE object. Also fix typo in an error message.
4077 2003-11-25 Diego Novillo <dnovillo@redhat.com>
4079 * Make-lang.in: Add check-gfortran to lang_checks.
4080 (check-f95): Alias for check-gfortran.
4082 2003-11-25 Jason Merrill <jason@redhat.com>
4084 * Make-lang.in (f95.tags): Create TAGS.sub files in each
4085 directory and TAGS files that include them for each front end.
4087 2003-11-24 Paul Brook <paul@nowt.org>
4090 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
4092 2003-11-24 Paul Brook <paul@nowt.org>
4094 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
4096 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
4098 2003-11-24 Paul Brook <paul@nowt.org>
4101 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
4102 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
4104 2003-11-20 Richard Henderson <rth@redhat.com>
4106 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
4107 (gfc_conv_array_base): Likewise.
4108 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4109 * trans-expr.c (gfc_conv_string_tmp): Likewise.
4110 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
4111 * trans-stmt.c (gfc_trans_character_select): Likewise.
4113 2003-11-13 Paul Brook <paul@nowt.org>
4115 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
4117 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
4119 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
4120 (resolve_equivalence): New function.
4121 (resolve_equivalence_derived): New function.
4123 2003-11-12 Richard Henderson <rth@redhat.com>
4125 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
4126 annotate_all_with_locus.
4128 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
4130 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
4131 * trans-decl.c (gfc_finish_var_decl): Modified.
4133 2003-11-08 Paul Brook <paul@nowt.org>
4136 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
4139 2003-11-06 Paul Brook <paul@nowt.org>
4141 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
4143 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
4145 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
4147 2003-10-27 Anthony Green <green@redhat.com>
4149 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
4150 (f95.stagefeedback): Ditto.
4152 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
4155 * Make-lang.in (f95.stageprofile): Add.
4156 (f95.stagefeedback): Add.
4158 2003-10-23 Richard Henderson <rth@redhat.com>
4160 * f96-lang.c (gfc_gimplify_expr): Remove.
4161 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
4162 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
4164 2003-10-23 Richard Henderson <rth@redhat.com>
4166 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
4168 2003-10-20 Paul Brook <paul@nowt.org>
4170 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
4171 * trans-stmt.c (gfc_trans_do_while): Ditto.
4173 2003-10-17 Paul Brook <paul@nowt.org>
4175 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
4177 2003-10-17 Paul Brook <paul@nowt.org>
4179 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
4181 2003-10-17 Feng Wang <wf_cs@yahoo.com>
4183 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
4184 (gfc_resolve_minloc): Ditto.
4185 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
4186 Return the value after subtracting the lower bound.
4188 2003-10-16 Richard Henderson <rth@redhat.com>
4190 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
4192 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
4194 * lang.c: Remove -M option for now, it's in the way for C.
4196 2003-10-14 Jason Merrill <jason@redhat.com>
4198 * Make-lang.in (f95.tags): New rule.
4200 2003-10-13 Richard Henderson <rth@redhat.com>
4202 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
4204 2003-10-13 Paul Brook <paul@nowt.org>
4206 * trans-decl.c (generate_local_decl): Don't create junk variables.
4208 2003-10-13 Paul Brook <paul@nowt.org>
4210 * resolve.c (resolve_formal_arglist): Use function result decl in
4211 preference to function decl.
4213 2003-10-12 Richard Henderson <rth@redhat.com>
4215 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
4216 TREE_READONLY. Update all callers.
4218 2003-10-12 Feng Wang <wf_cs@yahoo.com>
4220 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
4221 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
4222 (gfc_is_intrinsic_libcall): Add CSHIFT.
4224 2003-10-12 Richard Henderson <rth@redhat.com>
4226 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
4227 (gfc_trans_array_constructor_value): Likewise.
4228 (gfc_conv_array_initializer): Likewise.
4229 * trans-stmt.c (gfc_trans_character_select): Likewise.
4231 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
4233 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
4235 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4237 * check.c (gfc_check_repeat): Check arguments are scalar.
4238 (gfc_check_trim): New function.
4239 * intrinsic.h (gfc_check_trim): Add prototype.
4240 * intrinsic.c (add_functions): Use it.
4241 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
4243 * trans-decl.c: Ditto.
4244 (gfc_build_intrinsic_fucntion_decls): Set them.
4245 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
4246 (gfc_conv_intrinsic_trim): New function.
4247 (gfc_conv_intrinsic_repeat): New function.
4248 (gfc_conv_intrinsic_function): Use them.
4250 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4252 * trans-types.c (gfc_sym_type): Handle result variables.
4254 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4256 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
4257 gfc_get_character_type.
4259 2003-10-11 Feng Wang <wf_cs@yahoo.com>
4261 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
4263 2003-10-11 Paul Brook <paul@nowt.org>
4265 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
4266 (gfc_resolve_dprod): New function.
4267 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
4268 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
4269 (gfc_resolve_dprod): Declare.
4270 * intrinsic.c (add_functions): Use them.
4271 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
4273 2003-10-06 Richard Henderson <rth@redhat.com>
4275 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
4276 * trans-intrinsic.c (call_builtin_clz): Use it.
4278 2003-10-05 Paul Brook <paul@nowt.org>
4280 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
4281 * trans-decl.c (gfc_generate_function_code): Set
4282 cfun->function_end_locus.
4284 2003-09-24 Jason Merrill <jason@redhat.com>
4286 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
4289 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
4290 Paul Brook <paul@nowt.org>
4292 * Make-lang.in (F95_OBJS): Add fortran/data.o.
4293 * array.c (gfc_inser_constructor): New function.
4294 (gfc_get_constructor): New function.
4295 (gfc_free_constructor): Initialize offset and repeat.
4296 (iterator_stack): Remove.
4297 (expand_info): Add offset, component and repeat fields.
4298 (expand_constructor): Set them.
4299 (expand): Set new fields.
4300 (gfc_copy_constructor): Ditto. Avoid recursion.
4301 * gfortran.h: Add prototypes for new functions.
4302 (gfc_constructor): Add offset, component and repeat.
4303 (iteratio_stack): Move to here.
4304 * resolve.c (check_data_variable): Convert data values into variable
4306 (traverse_data_list): Build implicit loop chain.
4307 (gfc_resolve): Ditto.
4308 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
4309 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
4310 * trans-expr.c (gfc_conv_structure): Handle array initializers.
4311 (gfc_conv_expr): Update to match.
4312 * trans.h (gfc_conv_structure): Declare.
4315 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
4317 * trans.h: Add declarations for gfor_fndecl_si_kind and
4318 gfor_fndecl_sr_kind.
4319 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4320 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
4321 (g95_conv_intrinsic_sr_kind): New function.
4322 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
4325 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
4327 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
4328 instead of _4 and _8 as postfix for libgfortran calls.
4330 2003-09-16 Paul Brook <paul@nowt.org>
4332 * array.c (compare_bounds): New function.
4333 (gfc_compare_array_spec): Use it.
4335 2003-09-14 Paul Brook <paul@nowt.org>
4337 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
4338 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
4340 2003-09-14 Paul Brook <paul@nowt.org>
4342 * check.c (dim_rank_check): Allow assumed bounds if requested.
4343 (gfc_check_lbound): Call it.
4344 (gfc_check_ubound): Ditto.
4345 (gfc_check_size): Change to match.
4346 * simplify.c (gfc_simplify_bound): New function.
4347 (gfc_simplify_lbound): New function.
4348 (gfc_simplify_ubound): New function.
4349 * intrinsic.h: Declare them.
4350 * intrinsic.c (add_functions): Use them.
4352 2003-09-14 Paul Brook <paul@nowt.org>
4354 * io.c (format_lex): Initialize negative_flag.
4355 (check_format): Intialize repeat.
4356 * trans-io.c (gfc_new_nml_name_expr): Declare static.
4357 (gfc_new_var_expr): Ditto.
4359 2003-09-14 Paul Brook <paul@nowt.org>
4361 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
4362 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
4364 2003-09-12 Paul Brook <paul@nowt.org>
4366 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
4368 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
4370 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
4371 for a correct expression.
4373 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
4375 * trans-intrinsic.c (real_compnt_info): New struct.
4376 (prepare_arg_info): New function.
4377 (gfc_conv_intrinsic_set_exponent): New function.
4378 (gfc_conv_intrinsic_scale): New function.
4379 (gfc_conv_intrinsic_nearest): New function.
4380 (gfc_conv_intrinsic_fraction): New function.
4381 (gfc_conv_intrinsic_exponent): New function.
4382 (gfc_conv_intrinsic_spacing): New function.
4383 (gfc_conv_intrinsic_rrspacing): New function.
4384 (gfc_conv_intrinsic_function): Use them.
4386 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
4388 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
4389 build_int_2 changed from (high, low) to (low, high).
4390 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
4391 ioparm_namelist_read_mode, iocall_set_nml_val_int,
4392 iocall_set_nml_val_float, iocall_set_nml_val_char,
4393 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
4394 (gfc_build_io_library_fndecls): Add variable initialization.
4395 (gfc_new_nml_name_expr, get_new_var_expr): New function.
4396 (build_dt): Add namelist support.
4397 * io.c (value): New variable.
4398 (check_format): Support FMT_H now.
4400 2003-09-07 Paul Brook <paul@nowt.org>
4402 * io.c (gfc_resolve_dt): Error if format label is not defined.
4404 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
4406 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
4407 about case_switch's break. The other is about building the condition
4408 statement tree, which judges the argument in the range of the
4409 corresponding integer type.
4410 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
4411 for the large values.
4413 2003-09-05 Paul Brook <paul@nowt.org>
4415 * f95-lang.c (expand_function_body): Gimplify the function.
4417 2003-09-04 Jeff Law <law@redhat.com>
4419 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
4422 2003-09-04 Paul Brook <paul@nowt.org>
4424 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
4425 (gfc_expand_stmt): New function.
4426 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
4427 (expand_function_body): Use tree_rest_of_compilation.
4428 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
4430 2003-09-03 Jeff Law <law@redhat.com>
4432 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
4435 2003-08-30 Paul Brook <paul@nowt.org>
4437 * f95-lang.c (builtin_function): Remove #if 0 code.
4438 (gfc_define_builtin): New function.
4439 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
4440 * mathbuiltins.def: New file.
4441 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
4442 (gfc_intrinsic_map): Use mathbuiltins.def.
4443 (gfc_intrinsic_builtin_t): Remove.
4444 (gfc_build_intrinsic_lib_fndecls): Update.
4445 * trans-types.c (gfc_init_types): Remove redundant initilaization of
4446 signed_size_type_node.
4448 2003-08-29 Paul Brook <paul@nowt.org>
4450 * arith.c (gfc_real_kinds): Use correct minimum exponents.
4452 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
4454 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
4455 (gfc_conv_intrinsic_function): Add MODULO.
4457 2003-08-22 Jason Merrill <jason@redhat.com>
4459 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
4461 2003-08-22 Andreas Jaeger <aj@suse.de>
4463 * Make-lang.in (f95.install-common): Add DESTDIR support.
4464 * (f95.install-info): Likewise.
4465 (f95.uninstall): Likewise.
4467 2003-08-19 Diego Novillo <dnovillo@redhat.com>
4469 * trans-types.c (gfc_init_types): Initialize
4470 signed_size_type_node with size_type_node.
4472 2003-08-18 Paul Brook <paul@nowt.org>
4474 * dependency.c (gfc_dependency): New enum.
4475 (check_another_array_ref): Remove.
4476 (gfc_get_array_from_component): Remove.
4478 (get_range): Remove.
4479 (get_no_of_elements): Use mpz_t, not mpf_t.
4480 (transform_sections): New function.
4481 (gfc_check_range_range): Rename ...
4482 (gfc_check_section_vs_section): ... to this. Use new function.
4483 (gfc_is_inside_range): Rewrite to match.
4484 (gfc_check_element_vs_section): Ditto.
4485 (gfc_check_element_vs_element): Ditto.
4487 (gfc_dep_resolver): Ditto. Remove unused parameter.
4488 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
4489 gfc_check_element_vs_element, gfc_is_inside_range,
4490 gfc_get_array_from_component): Remove prototypes for static functions.
4491 (gfc_dep_resolver): Update prototype.
4492 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
4494 2003-08-15 Paul Brook <paul@nowt.org>
4496 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
4497 return values to parent scope.
4498 (gfc_build_dummy_array_decl): Ditto.
4500 2003-08-14 Paul Brook <paul@nowt.org>
4502 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
4503 size of the type, not the pointer.
4504 * resolve.c (resolve_symbol): Give more accurate error message.
4506 2003-08-10 Paul Brook <paul@nowt.org>
4508 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
4510 2003-08-10 Paul Brook <paul@nowt.org>
4512 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
4515 2003-08-10 Chun Huang <compiler@sohu.com>
4517 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
4518 (resolve_symbol): Ditto.
4519 * trans-expr.c (gfc_conv_statement_function): New function.
4520 (gfc_conv_function_expr): Use it.
4522 2003-08-10 Paul Brook <paul@nowt.org>
4524 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
4525 (walk_function_expr): Set section rank.
4526 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
4528 2003-08-10 Paul Brook <paul@nowt.org>
4530 * intrinsic.c (add_sym): Prefix names with correct string.
4531 (add_sym_0s): New function.
4532 (add_subroutines): Register abort.
4534 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
4536 * gfortran.h: Introduce options to control the mangling.
4537 * lang.opt: Likewise.
4538 * options.c (gfc_init_options): Handle the options.
4539 * trans-common.c (gfc_sym_mangled_common_id): New function.
4540 (gfc_build_common_decl): Call it.
4541 * trans-decl.c (gfc_sym_mangled_function_id): New function.
4542 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
4544 2003-08-09 Paul Brook <paul@nowt.org>
4546 * module.c (mio_symbol): Always ouput a namespace for formal args.
4547 (load_needed): Namespace now belong to their proper symbol.
4548 (gfc_dump_module): Change G95=>GFORTRAN.
4550 2003-08-05 Paul Brook <paul@nowt.org>
4552 * options.c: Force -fg77-calls.
4554 2003-08-02 Paul Brook <paul@nowt.org>
4556 * Makelang.in: Rename G95_* to GFORTRAN_*.
4557 * All sources: Rename G95_* to GFC_*.
4559 2003-08-01 Paul Brook <paul@nowt.org>
4561 * fortran/Make-lang.in: Use GMPLIBS.
4562 * fortran/config-lang.in: Set need_gmp.
4563 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
4565 2003-07-27 Andreas Jaeger <aj@suse.de>
4567 * trans-decl.c (gfc_generate_constructors): Convert prototype to
4569 * trans-const.c (gfc_init_constants): Likewise.
4570 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
4572 * gfortranspec.c: Convert to ISO C90.
4573 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
4575 2003-07-26 Paul Brook <paul@nowt.org>
4577 * lang.opt: Add -fdump-parse-tree.
4578 * options.c (gfc_handle_option): Ditto.
4579 * resolve.c (resolve_forall_iterators): Convert to proper type.
4580 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
4582 2003-07-26 Paul Brook <paul@nowt.org>
4584 * Makefile.in: Add build dependencies on files common with rest of gcc.
4586 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
4588 * trans.h: Declare g95_trans_pointer_assignment.
4589 * trans-expr.c (g95_trans_pointer_assignment): New function.
4590 (g95_trans_pointer_assign): Use it.
4591 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
4592 (g95_trans_pointer_assign_need_temp): New function.
4594 2003-07-26 Paul Brook <paul@nowt.org>
4596 * gfortran.texi: Replace references to g95.
4598 2003-07-26 Paul Brook <paul@nowt.org>
4600 Rename g95_* to gfc_*.
4602 2003-07-25 Paul Brook <paul@nowt.org>
4604 * gfortran.h: Rename from g95.h.
4605 * trans-types.c (boolean_type_node, booelan_true_node,
4606 boolean_false_node): Remove.
4607 * trans-types.h: Ditto.
4609 2003-07-25 Chun Huang <compiler@sohu.com>
4611 * parse.c (accept_statement): Implement BLOCK DATA statement.
4612 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
4615 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
4617 * trans-stmt.c (temporary_list): Define.
4618 (g95_trans_assign_need_temp): New function.
4619 (g95_trans_forall_1): Modified for WHERE.
4620 (g95_trans_where_assign): Modified.
4621 (g95_trans_where_2): Modified.
4622 (g95_evaluate_where_mask): Modified.
4623 (g95_trans_where): Modified.
4624 (g95_get_temp_expr): Removed.
4625 (g95_add_to_where_stmt_list): Removed.
4626 (compute_overall_iter_number): Modified for WHERE.
4627 * trans.h: Remove where_stmt_list.
4629 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4631 * lang.opt: Correct description of options -J and -M.
4633 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
4635 * lang.opt: Move help text to here.
4636 * lang-options.h: Remove.
4638 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4639 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
4640 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
4643 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
4644 Paul Brook <paul@nowt.org>
4646 * check.c (check_rest): Use global pedantic flag.
4647 * io.c (data_desc): Ditto.
4648 * error.c (g95_warning, g95_warning_now): Use global flag.
4649 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
4650 (expand_function_body): Update to new prototypes.
4651 (g95_init): Use new option names.
4652 * g95.h (g95_option_t): Standardize names.
4653 (g95_init_options, g95_handle_option): Update prototypes.
4654 * interface.c: Use new option names.
4661 * simplify.c: Ditto.
4663 * trans-array.c: Ditto.
4664 * trans-expr.c: Ditto.
4665 * trans-types.c: Ditto.
4666 * trans-decl.c: Ditto.
4667 (g95_build_library_function_decl): Remove obsolete VPARAMS.
4669 * options.c (g95_display_help): Remove.
4670 (g95_init_options): Convert to new scheme.
4672 (g95module_option): Ditto, rename from g95_parse_arg.
4673 (g95_handle_module_path_options): New function.
4674 * trans-equivalence.c: Fix error message.
4675 * lang.opt: Corrections.
4677 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
4679 * lang.opt: New file.
4681 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4683 * decl.c (match_attr_spec): Set colon_seen.
4685 2003-07-14 Paul Brook <paul@nowt.org>
4687 * trans-array.c: Update comment.
4688 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
4689 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
4690 minmaxloc,minmaxval): Ditto.
4691 * trans-io.c (g95_trans_transfer): Ditto.
4692 * trans-stmt.c: Remove unneeded prototypes.
4693 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
4694 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
4695 (compute_inner_temp_size): Remove bits of dead code. Add comments.
4696 Don't share loopinfo.
4697 (compute_overall_iter_number): Declare as static.
4698 (allocate_temp_for_forall_nest): Ditto.
4699 (g95_trans_forall_1): Don't pass shared loopinfo.
4700 * trans.c (g95_start_block): Expand comment.
4702 2003-07-12 Paul Brook <paul@nowt.org>
4704 * arith.c (g95_index_integer_kind): Remove unused initializer.
4705 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
4706 index by size of element.
4707 (generate_loop_for_rhs_to_temp): Ditto.
4708 (allocate_temp_for_forall_nest): Use element size, not index size.
4710 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4712 * arith.c (g95_index_integer_kind): Add a TODO.
4713 * simplify.c (g95_simplify_nearest): Add a TODO.
4715 2003-07-09 Chun Huang <compiler@sohu.com>
4717 * trans.h: Add declarations for gfor_fndecl_string_scan and
4718 gfor_fndecl_string_verify.
4719 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4720 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
4721 (g95_conv_intrinsic_verify): New function.
4722 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
4723 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
4724 of parameter 'BACK=.TRUE.'
4726 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
4728 * trans-stmt.c (iter_info, forall_info): Define.
4729 (g95_trans_forall_block): Remove.
4730 (g95_trans_forall_loop): Use forall info blocks.
4731 (g95_trans_nested_forall_loop): New function.
4732 (g95_do_allocate): Handle things other than logical masks.
4733 (generate_loop_for_temp_to_lhs): New function.
4734 (generate_loop_for_rsh_to_temp): New function.
4735 (compute_inner_temp_size): New function.
4736 (compute_overall_iter_number): New function.
4737 (allocate_temp_for_forall_nest): New function.
4738 (g95_trans_forall): Move body ...
4739 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
4741 2003-07-02 Paul Brook <paul@nowt.org>
4743 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
4744 in correct scope. Change callers to match.
4745 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
4746 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
4748 2003-07-02 Paul Brook <paul@nowt.org>
4750 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
4751 expression shape for all expressions.
4752 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
4754 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4756 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
4757 g95_parse_arg), intrinsic.c (g95_convert_type): support of
4759 * intrinsic.c, g95.h: Add g95_convert_type_warn,
4760 * resolve.c (g95_resolve_index): Call it.
4762 2003-07-02 Paul Brook <paul@nowt.org>
4764 * iresolve.c (g95_resolve_reshape): Set expression shape.
4765 (g95_resolve_shape): Ditto.
4766 * simplify.c (g95_simplify_shape): Move common code outside condition.
4767 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
4769 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4771 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
4774 2003-06-29 Paul Brook <paul@nowt.org>
4776 * array.c (g95_simplify_iterator_var): Don't bother with return value.
4777 * expr.c (find_array_element, find_component_ref): New functions.
4778 (remove_subobject_ref): New function.
4779 (simplify_const_ref): Use them. Rename from simplify_component_ref.
4780 (simplify_ref_chain): New function.
4781 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
4782 (g95_specification_expr): Simplify the expression.
4783 * resolve.c (resolve_operator): Check simplifications return code.
4784 (g95_resolve_expr): Ditto.
4786 2003-06-26 Paul Brook <paul@nowt.org>
4788 * expr.c (simplify_component_ref): New function.
4789 (g95_simplify_expr): Use it.
4790 * resolve.c (resolve_structure_cons): Handle references.
4792 2003-06-25 Paul Brook <paul@nowt.org>
4794 * trans-io.c (build_dt): Handle internal units.
4796 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
4798 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
4799 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
4800 Use g95_array_index_type instead of integer_type_node.
4801 (g95_build_common_decl, g95_set_common_master_type): Use
4802 g95_character1_type_node instead of char_type_node.
4803 * trans-equivalence.c (g95_layout_local_equiv): As above.
4805 2003-06-24 Steven G. Kargl <kargls@attbi.com>
4807 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
4808 remove last remains of -fquiet.
4810 2003-06-22 Paul Brook <paul@nowt.org>
4812 * resolve.c (resolve_operator): Don't fail if we can't simplify.
4813 (g95_resolve_expr): Ditto.
4814 (resolce_code): Mark as static.
4815 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
4816 gimplifer doesn't (yet).
4818 2003-06-20 Paul Brook <paul@nowt.org>
4820 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
4821 * match.c (g95_match_if): Add ST_PAUSE.
4822 (g95_match_stopcode): New function.
4823 (g95_match_pause, g95_match_stop): Use it.
4824 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
4825 (decode_stmt, next_statement, parse_executable): Ditto.
4826 * resolve.c (resolve_code): Ditto.
4827 * st.c (g95_free_statement): Ditto.
4828 * trans-stmt.c (g95_trans_pause): New function.
4829 * trans-stmt.h: Declare it.
4830 * trans.c (g95_trans_code): Use it.
4831 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
4833 (g95_build_builtin_function_decls): Initialize them.
4835 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
4837 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4839 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
4840 match_filepos): Fix error handling.
4842 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4844 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
4845 Add assertions on arguments.
4846 * resolve.c (expression_shape): Remove useless &.
4847 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
4848 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
4849 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
4850 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
4851 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
4852 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
4853 (g95_simplify_not, g95_simplify_scale): Add assertions.
4855 2003-06-15 Paul Brook <paul@nowt.org>
4857 Clean up stuff to work with the ssa optimizers.
4858 * convert.c (convert): Handle BOOLEAN_TYPEs.
4859 * f95-lang.c (g95_truthvalue_conversion): Implement.
4860 * trans-array.c (g95_trans_array_constructor_value): Group multiple
4862 * trans.h (g95_truthvalue_conversion): Declare.
4863 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
4864 * trans-stmt.c (g95_trans_character_select): Don't create array
4865 assignments. Mark labels as indirect jump targets.
4866 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
4867 (g95_get_dtype_cst): Handle LOGICAL types.
4869 2003-06-14 Paul Brook <paul@nowt.org>
4871 * f95-lang.c (g95_gimplify_expr): New function.
4872 * trans-array.c (g95_trans_array_constructor_value): Don't create
4874 (g95_conv_expr_descriptor): Rename simple->gimple.
4875 * trans-expr.c (conv_expr_op): Use proper logical operators.
4876 * trans-intrinsic.c (build_fixbound_expr): New function.
4877 (build_fix_expr): Ditto.
4878 (g95_conv_intinsic_aint): Use them. Use builtin functions.
4879 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
4881 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4883 * array.c (g95_compare_array_spec): Remove unreachable code.
4884 * expr.c (g95_copy_expr): Likewise.
4885 * intrinsic.c (g95_convert_type): Likewise.
4886 * misc.c (g95_code2string): Likewise.
4887 * simplify.c (g95_simplify_ishft, g95_simplify_real,
4888 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
4889 * trans-stmt.c (g95_trans_select): Likewise.
4890 * primary.c (extend_ref): Add an assertion.
4891 * simplify.c (g95_convert_constant): Add const.
4892 * intrinsic.h: Remove g95_check_x_ni.
4893 * f95-lang.c (g95_finish): Call g95_release_include_path.
4895 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4897 * resolve.c (resolve_contained_functions): Fix typo introduced on
4900 2003-06-09 Paul Brook <paul@nowt.org>
4902 * g95.h: Include system.h not hwint.h.
4903 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
4904 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
4906 2003-06-09 Paul Brook <paul@nowt.org>
4908 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
4909 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
4910 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
4911 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
4912 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
4914 * trans.h (g95_trans_equivalence, g95_trans_common,
4915 g95_add_decl_to_function): Declare.
4916 * trans-common.c, trans-equivalence.c: New files.
4918 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
4920 * intrinsic.c (g95_intrinsic_extension): Remove.
4921 (add_functions): Substitute g95_check_x for g95_check_x_ni
4923 (g95_init_expr_extensions): New function.
4924 (g95_intrinsic_func_interface): Use it.
4925 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
4926 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
4927 g95_check_precision, g95_check_present, g95_check_radix,
4928 g95_check_range, g95_check_selected_real_kind): Do not set
4929 g95_intrinsic_extension.
4930 (g95_check_x_ni): Remove now duplicate of g95_check_x.
4932 * expr.c (check_inquiry): Add FIXME, fixup some code style.
4934 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4936 * g95.h (ref_type): Name this type explicitly.
4937 * module.c (MIO_NAME): Add specialisations of mio_name.
4938 (mio_symbol_attribute, mio_typespec, mio_array_ref,
4939 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
4940 (ab_attribute): Name this type explicitly.
4941 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
4943 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
4945 * trans-intrinsic.c (g95_conv_allocated): New function.
4946 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
4948 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
4950 * f95-lang.c: Don't include g95-support.h
4951 (g95_mark_addressable): Add prototype.
4952 (g95_init_decl_processing): Remove C front end hack.
4953 * f95-tree.c: Remove file.
4954 * support.c: Remove file.
4955 * g95-support.h: Remove file.
4956 * trans-types.c (g95_init_types): Set up boolean
4957 type related tree nodes.
4958 * Make-lang.in: Remove rules for dead files and
4959 dependencies on them.
4961 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
4963 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
4964 C front end dependency. Also, convert.c does not depend on
4965 g95-support.h anymore.
4966 * convert.c: Don't include c-common.h and g95-support.h
4967 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
4968 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
4969 stmts_are_full_exprs_p, current_stmt_tree,
4970 current_scope_stmt_stack): Remove.
4971 * g95-support.h (unsigned_conversion_warning): Kill proto.
4972 (boolean_type_node, boolean_true_node, boolean_false_node):
4973 Don't define here. Instead, make then true tree nodes in
4975 * support.c (c_global_trees): Die, C front end, die!!!
4976 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
4977 uintmax_type_node, string_type_node and const_string_type_node.
4978 (decl_constant_value, overflow_warning): Make static functions.
4979 They are in death row too, though.
4980 (default_conversion, c_expand_asm_operands): Remove.
4981 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
4982 trans.c: Don't include c-common.h.
4983 * trans-types.c (boolean_type_node, boolean_true_node,
4984 boolean_false_node): Make them real tree nodes.
4985 * trans-types.h (intmax_type_node, string_type_node,
4986 const_string_type_node): Hack to work around C dependencies
4987 in builtin-types.def.
4989 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4991 * decl.c (decl_types): Add some iterators-like sentinels.
4992 * decl.c (match_attr_spec): Use them.
4993 Use "decl_types" instead of "int".
4994 Add cast in call to g95_match_strings.
4995 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
4997 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
4998 (g95_interface_info): Use "g95_intrinsic_op".
4999 * dump-parse-tree.c (g95_show_namespace): Use them.
5000 * interface.c (g95_check_interfaces): Use them.
5001 * module.c (read_module, write_module): Use them.
5002 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
5003 Use "g95_intrinsic_op".
5004 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
5005 Add a default case in switch statement.
5006 * intrinsic.h (g95_generic_isym_id): Moved to...
5007 * g95.h (g95_generic_isym_id): here.
5008 (g95_intrinsic_sym): Use "g95_generic_isym_id".
5009 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
5010 * trans-intrinsic.c (g95_intrinsic_map_t,
5011 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
5012 * match.c (g95_match_intrinsic_op): Add cast in call to
5015 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
5017 * support.c (skip_evaluation, warn_conversion, lvalue_p,
5018 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
5019 constant_fits_type_p, convert_and_check,
5020 unsigned_conversion_warning): Remove these ugly remnants
5021 we inherited from the C front end.
5022 (function_types_compatible): Remove '#if 0'-edcode.
5023 (build_modify_expr): Likewise.
5024 (convert_for_assignment): Don't use the deceased functions.
5025 The parameter fundecl is now unused.
5026 (decl_constant_value): Always just return decl. In fact
5027 this function is not used at present, but it might be in
5028 the future, when we start using the tree inliner.
5029 (overflow_warning, default_conversion, c_expand_asm_operands):
5030 Abort when these are called, they are part of the C type
5031 checking implementation and therefore poison to Fortran.
5033 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
5035 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
5036 c-pretty-print.o and c-dump.o. Add a comment on why we
5037 depend on c-semantics.c.
5038 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
5039 Don't use the C front end tree dumper hook to dump the
5040 language specific tree representation -- we don't have
5041 one. So instead, inherit the default langhook.
5043 2003-06-02 Paul Brook <paul@nowt.org>
5045 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
5047 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5049 * check.c (g95_check_associated): Use proper types. Remove
5050 extraneous argument in call to g95_error().
5052 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5054 * resolve.c (resolve_operator): Make logical operands convert to the
5055 type with higher kind.
5057 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5059 * check.c (g95_check_associated): Make sure both pointer and target has
5060 the same type and rank. Null pointer or array section with vector
5061 subscript as target are not allowed.
5062 * trans.h: Declare gfor_fndecl_associated.
5063 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
5064 gfor_fndecl_associated.
5065 * trans-intrinsic.c (g95_conv_associated): New function.
5066 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
5068 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5070 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
5071 according to POINTER itself rather than TARGET.
5072 (g95_conv_expr_descriptor): Make lbound start at 1.
5073 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
5075 2003-06-01 Paul Brook <paul@nowt.org>
5077 * expr.c (g95_type_convert_binary): Make it match the standard.
5078 * g95.texi: Remove dead link.
5080 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
5082 * g95.texi: Cleanup somewhat in preparation for inclusion
5085 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5086 Canqun Yang <canqun@yahoo.com.cn>
5088 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
5090 (g95_find_forall_index): Return proper value.
5091 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
5092 compare the return value from g95_find_forall_index.
5094 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5095 * g95.h, io.c (g95_st_label): Remove "length".
5096 (g95_symtree): Remove "link".
5097 (g95_case): Remove "code".
5098 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
5099 g95_convert_real): Make an argument pointer to const.
5100 * decl.c (colon_seen): Add a TODO.
5101 * interface.c (g95_compare_types): Fix typo.
5102 * interface.c (compare_interfaces): Preserve value of "p".
5103 * intrinsic.c (sort_actual): Remove "i".
5104 * match.c (g95_match_assign): Proper type in call to g95_match().
5105 * parse.c (next_free): Avoid duplicate call due to macro.
5106 * parse.c (check_statement_label): wrong type in call to g95_error.
5107 * primary.c (match_real_constant): Add a TODO.
5108 * resolve.c (resolve_select): Remove useless conditional.
5109 * simplify.c (g95_simplify_repeat): Proper assignment to
5110 "value.character.string".
5111 * simplify.c (g95_simplify_reshape): Wrong variable in call to
5114 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
5116 * trans-stmt.c: Remove unnecessary include file defaults.h.
5118 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
5120 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
5122 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
5123 actual variables used as FORALL indexes.
5125 2003-05-15 Paul Brook <paul@nowt.org>
5127 * trans-array.c (g95_trans_static_array_pointer): Use
5129 (g95_trans_deferred_array): Initialize static array pointers.
5130 * trans-expr.c (g95_conv_function_call): Use formal arglist to
5131 correctly pass POINTER and absent CHARACTER arguments.
5133 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
5135 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
5136 (g95_resolve_forall_body): Resolve FORALL body.
5137 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
5138 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
5139 (g95_find_forall_index): Check whether the FORALL index appears in
5140 the expression or not.
5141 (resolve_code): Modified.
5143 2003-05-14 Paul Brook <paul@nowt.org>
5145 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
5147 2003-05-13 Paul Brook <paul@nowt.org>
5149 * trans-types.c (g95_max_array_element_size): Now a tree node.
5150 (g95_init_types): Work out max size properly.
5151 (g95_get_dtype_cst): Modify to match.
5153 2003-05-11 Paul Brook <paul@nowt.org>
5155 * trans-io.c (add_case): Create a label decl for case labels.
5157 2003-05-11 Paul Brook <paul@nowt.org>
5159 * arith.c (g95_integer_index_kind): New variable.
5160 * f95-lang.c (g95_init): Move frontend initialization here ...
5161 (g95_post_options): ... from here.
5162 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
5163 * intrinsic.c (add_functions): Use index kinds.
5164 * iresolve.c: Convert to index_kind where needed.
5165 * resolve.c (g95_resolve_index): Make public, use index_kind.
5166 (resolve_array_ref): Adjust to match.
5167 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
5168 * trans-stmt.c: Ditto.
5169 * trans-types.c: Ditto.
5170 * trans-types.h (g95_array_index_kind): Remove declaration.
5171 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
5173 2003-05-07 Paul Brook <paul@nowt.org>
5175 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
5176 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
5179 2003-05-07 Paul Brook <paul@nowt.org>
5181 * trans-array.c (trans_static_array_pointer,
5182 g95_trans_array_constructor_value, g95_conv_array_initializer,
5183 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
5184 (g95_add_loop_ss_code): Convert subscripts to the correct type.
5185 * trans-stmt.c (g95_trans_character_select): Ditto.
5186 * trans-types.c (g95_init_types): Ditto.
5188 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
5190 * f95-lang.c (expand_function_body): Use input_line, not lineno.
5191 * trans-decl.c (g95_generate_function_code,
5192 g95_generate_constructors): Likewise.
5193 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
5194 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
5197 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5198 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
5199 with components point to the DERIVED type itself, and two DERIVED
5200 type with components point to each other.
5201 * trans-expr.c (g95_conv_componet_ref): Modified
5203 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5204 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
5206 (g95_trans_pointer_assign): Implement Nullify.
5208 2003-05-01 Paul Brook <paul@nowt.org>
5210 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
5211 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
5213 2003-05-01 Paul Brook <paul@nowr.org>
5215 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
5216 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
5219 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
5221 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
5224 2003-04-28 Paul Brook <paul@nowt.org>
5226 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
5227 as their kind suggests.
5228 (g95_resolve_reshape): Ditto.
5230 2003-04-28 Chun Huang <compiler@sohu.com>
5232 * trans-expr.c (g95_conv_substring_expr): New function.
5233 (g95_conv_expr): Use it.
5235 2003-04-28 Paul Brook <paul@nowt.org>
5237 * iresolve.c (g95_resolve_transpose): Make it match the
5239 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
5241 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
5243 * trans-types.c (g95_add_field_to_struct): New function to
5244 add a field to a UNION_TYPE or RECORD_TYPE.
5245 * trans-types.h (g95_add_field_to_struct): Prototype.
5246 (g95_get_derived_type): Use g95_add_field_to_struct to add
5248 * trans-io.c (g95_add_field): Remove.
5249 (ADD_FIELD): Use new g95_add_field_to_struct function.
5250 (ADD_STRING): Likewise.
5251 * trans-stmt.c (g95_trans_select): Likewise.
5252 (g95_add_field): Remove duplicated function.
5254 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
5256 Port implementation for CHARACTER SELECT from Andy's tree.
5257 * trans-stmt.c (g95_trans_character_select): Implement character
5258 select. (g95_add_field): New function.
5259 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
5260 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
5261 * g95.h (struct g95_case): Add field 'int n'.
5262 * trans.h: Declare 'gfor_fndecl_select_string'.
5264 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
5266 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
5267 (g95_insert_bbd): Die on duplicates.
5268 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
5270 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
5272 * g95.texi: Require GMP 4.0 -- like we actually
5273 do. Explain the testsuite and what-goes-where.
5274 Don't use undefined texinfo symbol. Break very
5275 long line. Remove finished item from the list
5278 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
5280 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
5283 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
5285 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
5286 (g95_trans_forall_body): New function.
5288 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
5290 * resolve.c (resove_where): New function.
5291 (resolve_where_shape): New function.
5292 (resolve_code): Add call to 'resolve_where'
5293 * trans-stmt.c (g95_trans_where): Modified.
5294 (g95_trans_where_2): New function.
5295 (g95_trans_where_assign): New function.
5296 (g95_evaluate_where_mask): New function.
5297 (g95_add_to_stmt_list): New function.
5298 (g95_get_temp_expr): New function.
5299 * trans.h (where_stmt_list): New structure.
5301 2003-04-10 Paul Brook <paul@nowt.org>
5303 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
5304 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
5306 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
5308 Update after mainline -> tree-ssa-branch merge.
5309 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
5311 (g95_init): Update for new lang_hooks definition.
5312 (g95_post_options): New langhook.
5313 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
5314 * scanner.c (g95_new_file): Comment update.
5316 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5318 * g95.h, lang-options.h: Add -Wimplicit-interface.
5319 * options.c (g95_init_options, g95_parse_arg): Set it.
5320 * interface.c (check_intents): Warn about call with implicit
5322 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
5325 2003-04-05 Paul Brook <paul@nowt.org>
5327 * iresolve.c (g95_resolve_spread): Don't resole based on type.
5328 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
5330 2003-03-29 Paul Brook <paul@nowt.org>
5332 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
5333 (g95_resolve_unpack): Ditto.
5334 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
5335 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
5336 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
5338 2003-03-25 Paul Brook <paul@nowt.org>
5340 * arith.c (g95_unary_user, g95_user): Remove dead functions.
5342 * array.c (g95_free_array_ref): Ditto.
5344 * symbol.c (g95_use_derived_tree): Ditto.
5345 * intrinsic.c (add_functions): Use simplification for SCALE.
5346 * primary.c (g95_match_rvalue): Test sym, not symtree.
5348 2003-03-25 Paul Brook <paul@nowt.org>
5350 * trans-decl.c (build_function_decl): Add parameter before it gets
5351 turned into a constant.
5352 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
5353 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
5354 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
5356 2003-03-22 Paul Brook <paul@nowt.org>
5358 * trans-array.c (g95_conv_array_initializer): Allow scalar
5360 * trans-decl.c (g95_finish_var_decl): Result variables are not
5362 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
5363 (g95_conv_intrinsic_function): Use it.
5364 * trans-types.h (g95_type_spec): Remove dead declaration.
5366 2003-03-21 Paul Brook <paul@nowt.org>
5368 * trans-decl.c (g95_build_function_decl): Mark string parameters.
5370 2003-03-20 Paul Brook <paul@nowt.org>
5372 * trans-decl.c (g95_build_function_decl): Put character length
5373 parameters at the end of the function declaration.
5374 * trans-expr.c (g95_conv_function_call): Ditto.
5375 * trans-types.c (g95_get_function_type): Ditto.
5377 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5379 * resolve.c (resolve_formal_arglist): Don't impose intent for
5380 procedure arguments of pure functions.
5381 (resolve_select): Remove redundant assignment.
5383 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5385 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
5387 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
5388 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
5390 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
5392 * symbol.c (g95_add_type): Fix typo in comment.
5395 2003-03-16 Paul Brook <paul@nowt.org>
5397 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
5398 * expr.c (g95_build_call): Remove.
5399 * f95-lang.c (puchdecl_top_level): New function.
5400 * g95.h (g95_code): Store resolved symbol, not just the name.
5401 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
5402 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
5403 (g95_get_intrinsic_sub_symbol): New function.
5404 * iresolve.c (g95_resolve_cpu_time): Use it.
5405 (g95_resolve_random_number): Ditto.
5406 * resolve.c: Set code->resolved_sym instead of code->sub_name.
5407 * trans-decl.c (g95_get_extern_function_decl): Give external decls
5408 the correct DECL_CONTEXT. Add global symbold to the global scope.
5409 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
5412 2003-03-16 Paul Brook <paul@nowt.org>
5414 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
5415 * options.c (g95_parse_arg): Ditto.
5416 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
5417 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
5418 for the procedure, not the parameter.
5419 * trans-array.c (g95_trans_g77_array): New function.
5420 (g95_trans_assumed_size): Use it.
5421 (g95_trans_dummy_array_bias): Ditto.
5422 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
5423 (g95_conv_expr_descriptor): ... to here. Update callers.
5424 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
5425 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
5426 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
5427 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
5428 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
5429 (g95_sym_type): Ditto.
5431 2003-03-15 Paul Brook <paul@nowt.org>
5433 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
5435 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
5437 2003-03-14 Paul Brook <paul@nowt.org>
5439 * trans-array.c (g95_array_is_packed): Remove.
5440 (g95_conv_array_base): Correctly handle all descriptorless cases.
5441 (g95_conv_array_stride): Use descriptorless strides.
5442 (g95_trans_dummy_array_bias): Don't always repack the array.
5443 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
5445 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
5446 dummy and non-dummy arrays...
5447 (g95_sym_type, g95_get_derived_type): ... like these.
5448 (g95_get_array_type_bounds): Allow discontiguous arrays.
5450 2003-03-12 Paul Brook <paul@nowt.org>
5452 * array.c (g95_resolve_array_spec): Fix comment.
5453 * g95.h (symbol_attributes): New flag always_explicit.
5454 * resolve.c (resolve_formal_arglist): Set it always_explicit.
5455 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
5456 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
5457 (g95_trans_array_bounds): Allow assumed shape arrays.
5458 (g95_trans_repack_array): Remove.
5459 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
5460 * trans-decl.c (g95_build_qualified_array): Only ignore absent
5461 bounds for assumed size arrays.
5462 (g95_build_dummy_array_decl): Use descriptorless arrays.
5463 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
5464 (g95_trans_pointer_assign): Fix typo.
5465 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
5467 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
5468 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
5469 Also modify callers.
5470 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
5472 2003-03-08 Paul Brook <paul@nowt.org>
5474 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
5475 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
5476 * resolve.c (compare_spec_to_ref): Allow full array sections.
5478 2003-03-08 Paul Brook <paul@nowt.org>
5480 * expr.c (g95_simplify_expr): Also simplify array index and
5481 substring expressions.
5482 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
5483 * trans-array.c (g95_trans_array_bounds): New function.
5484 (g95_trans_auto_array_allocation): Use it.
5485 (g95_trans_assumed_size): Rewrite.
5486 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5487 (gfor_fndecl_repack): Remove.
5488 (g95_build_qualified_array): Handle absent upper bounds.
5489 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
5490 (g95_get_symbol_decl): Update.
5491 (g95_build_intrinsic_function_decls): Initialize new decls.
5492 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5493 (gfor_fndecl_repack): Remove.
5494 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
5495 * trans-types.c: (g95_build_array_type): Merge duplicated code..
5496 (g95_get_nodesc_array_type): Handle absent bounds.
5497 * trans-types.h (g95_get_nodesc_array_type): Declare.
5499 2003-03-04 Paul Brook <paul@nowt.org>
5501 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
5504 2003-03-02 Paul Brook <paul@nowt.org>
5506 * options.c (g95_init_options): Drfault to 1.
5507 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
5508 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
5509 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
5510 Handle non-constant size automatic arrays.
5511 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
5512 generic bound functions.
5513 (g95_trans_auto_array_allocation): Don't create a descriptor.
5514 (g95_trans_assumed_size): New function (broken).
5515 (g95_trans_dummy_array_bias): Remove unused var.
5516 * trans-array.h (g95_trans_assumed_size): Declare.
5517 * trans-decl.c (create_index_var): New fuction.
5518 (g95_build_qualified_array): New function.
5519 (g95_get_symbol_decl): Use it.
5520 (g95_trans_deferred_vars): Handle assumed shape seperately.
5521 * trans-types.c (get_element_type): Handle heap allocated arrays.
5522 (g95_is_nodesc_array): Include non-const size arrays.
5523 (g95_get_nodesc_array_type): Ditto.
5525 2003-02-23 Paul Brook <paul@nowt.org>
5527 * trans-array.c (g95_array_init_size): Should use stride, not size of
5530 2003-02-18 Paul Brook <paul@nowt.org>
5532 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
5533 after intrinsic function check.
5535 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5537 * io.c (match_io): Fix missing return value and remove useless
5539 * match.c (g95_match): Remove useless assignment.
5540 * module.c (parse_string): Remove useless post increment.
5541 * simplify.c (g95_simplify_verify): Remove useless assignment.
5543 2003-02-15 Paul Brook <paul@nowt.org>
5545 * expr.c (restricted_intrinsic): Handle bad values gracefully.
5546 * g95.h (symbol_attribute): Add referenced member.
5547 (g95_symbol): Add dummy_order member.
5548 (g95_set_sym_referenced): Declare.
5549 * match.c (g95_match_assignment, g95_match_call): Use it
5550 * primary.c (match_actual_arg, g95_match_rvalue,
5551 g95_match_variable): Ditto.
5552 * symbol.c (next_dummy_order): New variable.
5553 (g95_set_sym_referenced): New function.
5554 (check_done): New function.
5555 (g95_add_*): Use it.
5556 * trans-decl.c: Make formatting conform to GCC standards.
5557 (g95_defer_symbol_init): Add dummy variables in the right order.
5558 (g95_get_symbol_decl): Only accept referenced variables.
5559 (g95_create_module_variable): Module variables are always required.
5560 (generatr_local_decls): New function.
5561 (generate_local_vars): New function.
5562 (g95_generate_function_code): Use it.
5564 2003-02-13 Paul Brook <paul@nowt.org>
5566 * trans-decl.c (g95_conv_struct_cons): Remove.
5567 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
5568 * trans-expr.c (g95_conv_structure): New function.
5569 (g95_conv_expr): Use it.
5571 2003-02-09 Paul Brook <paul@nowt.org>
5573 * trans-array.c (g95_array_init_size): Don't evaluate the linit
5574 expressions multiple times.
5575 (g95_trans_auto_arry_allocation): Use pointer not tmp.
5577 2003-02-08 Paul Brook <paul@nowt.org>
5579 * module.c (mio_symtree_ref): Declare as static.
5580 (mio_expr): Remove dead code.
5581 (read_module): Set the symtree link for fixups.
5582 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
5583 (build_round_expr): ... to this.
5584 (g95_conv_intrinsic_aint): New function.
5585 (g95_conv_intrinsic_function): Use it.
5587 2003-02-08 Paul Brook <paul@nowt.org>
5589 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
5590 offset after modificaton, not the increment expression.
5591 * dependency.c: Kill excess whitespace.
5593 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
5595 * dependency.h: Remove some function declarations.
5596 * dependency.c (get_no_of_elements): Change this function not to
5598 * other: Add comments for all modified functions.
5600 2003-02-06 Paul Brook <paul@nowt.org>
5602 * g95spec.c (lang_specific_functions): Fix initializer warning.
5603 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
5604 for structure type names.
5605 * trans-decl.c (g95_cons_structure_cons): New function.
5606 (g95_get_symbol_decl): Use it.
5607 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
5610 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5612 * resolve.c (compare_cases): Add const to casts.
5614 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5616 * g95.h (g95_check_f): Change a1 to f1m.
5617 * intrinsic.c (add_sym_1m, check_specific,
5618 g95_intrinsic_func_interface): Use it.
5620 * module.c (init_pi_tree): Remove useless cast.
5621 (fp2): Fix argument type.
5623 * parse.c (parse_select_block): Add comment.
5625 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
5627 * lang-options.h: Fix warning involving C90 concatenated
5630 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5631 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5633 * io.c (format_asterisk): Complete initializer to kill warning.
5634 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
5635 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
5636 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
5637 new defines to complete initializers. Kills all warnings.
5639 * Make-lang.in: Comment cleanup.
5641 2003-02-05 Paul Brook <paul@nowt.org>
5643 * array.c (g95_free_constructor): Handle NULL expressions.
5644 * resolve.c (resolve_structure_cons): Ditto.
5645 * decl.c (g95_match_null): New Function.
5646 (variable_decl): Use it.
5647 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
5648 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
5649 * trans-types.c (g95_set_decl_attributes): Remove empty function.
5651 2003-02-05 Paul Brook <paul@nowt.org>
5653 * trans.h (build1_v): New macro.
5654 (build_v): Remove pointless and incorrect prototype.
5655 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
5656 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
5658 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
5660 * Make-lang.in (F95_OBJS): Remove one more dead file.
5662 2003-02-01 Paul Brook <paul@nowt.org>
5664 * lang-specs.h: Don't pass -ffixed-form to the linker.
5665 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
5667 2003-02-01 Paul Brook <paul@nowt.org>
5669 * Make-lang.in (F95_OBJS): Remove dead files.
5670 * trans-array.c (g95_array_init_size): Do the right thing when
5672 * trans-decl.c (g95_generate_function_code): Initialize deffered
5673 symbol list before translating contained subroutines.
5674 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
5675 scalar invariant values here...
5676 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
5677 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
5679 2003-01-29 Paul Brook <paul@nowt.org>
5681 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
5682 (g95_walk_elemental_function_args): Reverse chains before adding.
5683 (g95_reverse_ss): Move about a bit.
5684 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
5687 2003-01-28 Paul Brook <paul@nowt.org>
5689 * intrinsic.c (resolve_intrinsic): Use correct union member.
5690 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
5692 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
5693 use associated variables.
5694 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
5695 * trans-expr.c (g95_conv_expr_present): ... to here.
5696 * trans.h: Declare it.
5697 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
5699 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5701 * array.c (expand_iterator): Suppress useless assignment.
5702 * decl.c (match_char_spec): Ditto.
5703 * io.c (match_io_iterator): Ditto.
5704 * primary.c (match_real_constant): Ditto.
5705 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
5706 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
5707 * matchexp.c (match_add_operand, match_level_5): Likewise.
5708 * module.c (parse_atom, find_enum): Likewise.
5709 * resolve.c: move #include <string.h>
5710 (resolve_select): Fix serious typo.
5712 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
5714 * Make-lang.in: Don't build with broken tree-ssa-pre.
5716 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
5718 * resolve.c (resolve_index): Add a TODO.
5719 * symbol.c: Remove useless "#include <ctype.h>".
5721 2003-01-27 Paul Brook <paul@nowt.org>
5723 * check.c (check_rest): Allow different type kinds as an extension.
5724 * g95.h (g95_resolve_f): Add f1m.
5725 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
5726 * intrinsic.h: Chenge prototypes for MIN and MAX.
5727 * iresolve.c (g95_resolve_minmax): New function.
5728 (g95_resolve_min, g95_resolve_max): Use it.
5729 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
5731 (g95_conv_intrinsic_present): Fix logic.
5733 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
5735 * g95.h (g95_case): Don't be a tree, be a double linked list.
5736 * match.c (match_case_selector): Remove redundant semantics check.
5737 Clean up a few goto's to make it a tiny little bit faster.
5738 * resolve.c (case_tree): Die.
5739 (compare_cases): Accept and compare unbounded cases too.
5740 (check_case_overlap): Don't build a tree. Instead, merge-sort the
5741 whole list of g95_cases passed from resolve_select.
5742 (sane_logical_select): Die.
5743 (check_case_expr): Return FAILURE if a CASE label is of the wrong
5745 (resolve_select): Fixup case expression for computed GOTOs, put it
5746 in expr, not expr2, for easier handing in the parse tree dumper and
5747 the code generator. Rewrite the rest of the function: Kill
5748 unreachable case labels and unreachable case blocks.
5749 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
5750 an EXEC_SELECT, not case2 anymore.
5751 * trans-const.c (g95_conv_constant_to_tree): New function.
5752 (g95_conv_constant): Use it.
5753 * trans-const.h: Declare prototype for the new function.
5754 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
5755 g95_trans_character_select): New static functions.
5756 (g95_trans_select): Rewrite.
5758 2003-01-26 Paul Brook <paul@nowt.org>
5760 * intrinsic.c (add_fnctions): Properly add dreal.
5761 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
5762 (g95_conv_intrinsic_function): Use it.
5763 * trans-io.c (build_dt): Abort on internal files (unimplemented).
5765 2003-01-26 Paul Brook <paul@nowt.org>
5767 Widespread changes to the handling of symbols in expressions. These
5768 are now linked via g95_symtree nodes.
5769 * parse.c (g95_fixup_sibling symbols): New function.
5770 (parse_contained): Use it.
5771 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
5772 contained procedure that has bee correctly fixed up.
5773 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
5775 2003-01-24 Paul Brook <paul@nowt.org>
5777 * trans-array.c (g95_walk_expr): Function result attributes are in
5779 * trans-expr.c (g95_conv_function_call,
5780 g95_trans_arrayfunc_assign): Ditto.
5781 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
5783 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
5785 * expr.c (check_restricted): Fix error message.
5786 * symbol.c (free_st_labels): Plug memleak.
5788 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
5790 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
5791 reduce_binary_aa, reduce_binary, eval_intrinsic,
5792 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
5793 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
5794 for typesafe intrinsics helper functions.
5795 (g95_intrinsic_sym): Use them.
5796 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
5797 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
5798 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
5799 check_specific, g95_intrinsic_func_interface,
5800 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
5802 * trans-decl.c (g95_get_extern_function_decl): Likewise.
5803 * Make-lang.in: Don't disable warnings for strict prototypes
5804 any longer, everything is typesafe now.
5806 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
5808 * bbt.c (duplicate_node): Make static.
5809 * module.c (module_name): Make static.
5810 * scanner.c (include_dirs): Make static.
5812 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5814 Hard coded _gfor_'s should not show up anymore.
5815 * g95.h (PREFIX): New macro.
5816 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
5818 (g95_resolve_random_number): Likewise.
5819 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
5820 * trans-io.c: Remove 'prefix' macro. Replace all uses with
5821 the new PREFIX macro from g95.h.
5823 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5825 The troubles of forking... Andy implemented this just now too.
5826 Let's stick to that and keep the trees close.
5827 * g95.h (g95_st_label): 'format' member is now a g95_expr.
5828 * io.c: Revert previous changes.
5829 (g95_match_format): Match the format string as a character
5831 * match.h (g95_statement_label): Declare external.
5832 * parse.c: Revert previous changes.
5833 * symbol.c (g95_free_st_label): Free a g95_expr instead
5835 * trans-io.c: Revert previous changes.
5836 (build_dt): Use set_string to set the format string.
5838 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5840 * io.c (format_string): Make non-static.
5841 (g95_match_format): Remember the format string.
5842 (terminate_io): Add I/O termination for empty I/O lists.
5843 * match.h: Declare external format_string.
5844 * parse.c (check_statement_label): Attack the format string
5845 to a format label for FORMAT statements.
5846 * trans-io.c (g95_add_field): Define prefix macro. Replace
5847 all uses of PREFIX define with a use of this macro.
5848 (build_dt): Implement formatted I/O for format labels.
5850 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5852 * lang-options.h: Kill "-std=F".
5853 * options.c: Remove unimplemented "-std=F". Modify
5855 * misc.c (g95_terminal_width): New function.
5856 * error.c (g95_error_init_1): Use g95_terminal_width.
5857 * g95.h: Add prototype for g95_terminal_width, remove
5860 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
5862 * Make-lang.in: Fix typo.
5864 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
5866 * g95.h (struct g95_case): Remove unused cruft, new member
5867 'where' to keep track of the locus of the default case.
5868 * match.c (g95_match_case): Add locus to the current case.
5869 (match_case_selector): Likewise.
5870 * parse.c (parse_select_block): Move semantics check for
5871 multiple DEFAULT cases out of here to...
5872 * resolve.c (check_case_overlap): ...here. Return sooner
5874 (check_case_expr): Take two g95_cases now, use to sure the
5875 expression kinds are the same.
5876 (resolve_select): Cleanup.
5878 2003-01-18 Paul Brook <paul@nowt.org>
5880 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
5881 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
5883 (g95_get_extern_function_decl): Put decls in the correct context.
5885 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
5887 * trans-io.c: Port changes from Andy to set ERR flag.
5889 2003-01-17 Paul Brook <paul@nowt.org>
5891 * trans-array.c: Add various comments.
5892 (g95_ss_terminator): Declare as const.
5893 (g95_walk_expr): Remove first parameter and update all callers.
5894 (g95_walk_op_expr): Initialize scalar SS properly.
5895 * trans-array.h (g95_walk_expr): Update prototype.
5896 * trans-expr.c: Update for new g95_walk_expr.
5897 * trans-intrinsic.c: Ditto.
5898 * trans-io.c: Ditto.
5899 * trans.h: Various comments for SS chains.
5901 2003-01-17 Paul Brook <paul@nowt.org>
5903 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
5905 * intrinsic.c (add_functions): Use them.
5906 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
5907 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
5909 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5911 Fallout of a small merge conflict:
5912 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
5914 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5916 * initrinsic.c: New add_sym_* functions for strong typing.
5917 (add_conv): Make prototype strict.
5918 * dump-parse-tree.c, dependency.c: Include config.h
5919 * resolve.c, trans-io.c: Fix typos.
5921 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5923 * dump-parse-tree.c (g95_show_code_node): Show the
5924 condition for a computed GOTO that was transformed
5925 to a SELECT CASE construct.
5926 * resolve.c (check_case_overlap): Revert previous switch
5927 to treaps, it was too slow and didn't catch all trouble.
5928 (resolve_symbol): Be more flexible about module procedures.
5929 * symbol.c (check_conflict): Point to relevant section in
5930 the standard for dubious conflict. Allow procedure
5931 dummy arguments to be optional again.
5932 * trans-io (add_field): Rename to g95_add_field. Change
5934 * trans-stmt (trans_select): Handle unbounded cases for
5935 integer SELECT CASE constructs. Fix/add more comment.
5937 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5939 * g95.h: Uses GCC's function attribute macros.
5940 * error.c, module.c, parse.c, g95.h: More function attributes.
5942 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
5944 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
5945 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
5948 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
5950 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
5952 * trans.c (g95_trans_code): Use annotate_all_with_file_line
5953 instead of nowdead wrap_all_with_wfl.
5955 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5957 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
5958 before generating code, so we can still see it even if the code
5959 generation phase dies.
5961 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5963 * decl.c (build_sym): Split out initialization expression parts...
5964 (add_init_expr_to_sym): ...to here.
5965 (variable_decl): Add the symbol following an attribute list to the
5966 symbol tree before parsing the optional initialization expression
5967 if the symbol is not of a derived type.
5968 * primary.c (g95_match_rvalue): Don't assume a symbol always has
5969 a value if it is a PARAMETER.
5971 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5973 * misc.c: Don't #include <mcheck.h>
5974 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
5975 ever was a glibc bug, then either this was never reported to
5976 glibc people, or it has been fixed for so long that there's
5977 no information you can find about it, anywhere.
5979 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5982 * module.c (attr_bits, bt_types, array_spec_types):
5983 Switch 'const' and 'static'.
5984 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
5986 GNU'ify source code:
5987 * trans-io.c: Numerous fixes, one fixed warning and a few
5988 TODO markers so that we don't forget about them.
5990 2003-01-13 Paul Brook <paul@nowt.org>
5992 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
5993 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
5995 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
5996 * match.c (g95_match_stop): Fix dumb == -> != error.
5998 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6000 * dump-parse-tree.c (show_indent): Add line breaks. This
6001 whole dumping process needs cleanups.
6002 * f95-lang.c (g95_mark_addressable): Fix prototype to match
6003 the langhook. Fix 'return's accordingly.
6004 * g95-support.h: Adjust prototype.
6005 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
6006 * lang-options.h: Add '-fsyntax-only'.
6007 * options.c (g95_init_options): Init 'no_backend'.
6008 (g95_parse_arg): Deal with '-fsyntax-only'.
6009 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
6012 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6014 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
6015 arguments. Also make sure that if a symbol is marked INTRINSIC,
6016 an intrinsic with the symbol's name actually exists.
6017 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
6018 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
6019 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
6021 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6023 * resolve.c (resolve_contained_functions): Fix condition, don't
6024 throw internal_error if a child namespace has no name. Apparently
6025 this can be the case?
6027 2003-01-11 Paul Brook <paul@nowt.org>
6029 Port changes from Andy's tree:
6030 * g95.h (g95_code): Add stop_code.
6031 * match.c (g95_match_stop): Detter syntax checking.
6032 * resolve.c (resolve_generic_f0): Return match type.
6033 (resolve_generic_f): Remove dead/duplicated code.
6034 (resolve_specific_f): Ditto.
6035 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
6036 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
6037 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
6039 2003-01-11 Paul Brook <paul@nowt.org>
6041 * trans-array.c: Various documentation/comment changes.
6042 * trans-stmt.c: Ditto.
6045 2003-01-10 Paul Brook <paul@nowt.org>
6047 * options.c/h: Add -fdump-parse-tree as alias of -v.
6049 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6051 * dump-parse-tree.c (g95_show_namespace): Fixed another
6052 typo. Sorry, it's Friday...
6054 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6057 * trans-array.c, trans-array.h, trans.c, trans-const.c,
6058 trans-const.h, trans-decl.c, trans-expr.c, trans.h
6059 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
6060 trans-types.c: Fix bogus copyright years, add 2003.
6061 * trans-types.h: Give copyright header.
6063 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6065 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
6066 * expr.c, options.c, scanner.c: Add some more 'const' markers.
6067 * intrinsic.c: Some constant strings moved to read-only memory.
6068 * io.c (format_asterisk): Move to...
6071 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6073 * dump-parse-tree.c (g95_show_namespace): Dump implicit
6074 types for ranges instead of per-letter. Indent the
6075 'CONTAINS' just like everything else.
6076 * resolve.c (resolve_contained_functions): Clarify comment.
6077 Explain non-obvious conditional expression. Improve
6078 diagnostics if tyoe cannot be resolved.
6079 Port semi-fix from Andy's tree:
6080 (was_declared): Move up before first use.
6081 (generic_sym, specific_sym): New functions. Code moved
6082 out if procedure_kind.
6083 (procedure_kind): Simplify using new functions.
6084 (resolve_generic_f): Make sure the functions we find in
6085 a parent namespace is generic.
6086 (resolve_specific_f): Ditto for specific functions.
6088 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6090 * trans-stmt.c, trans.c: Fix some code style issues. Add
6091 some more comment (but still not enough!).
6093 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6095 * symbol.c (flavors, procedures, intents, acces_types,
6096 access_types, ifsrc_types): Make const.
6097 * misc.c (g95_string2code): Make 'm' param 'const'.
6098 * module.c (find_enum, write_atom, mio_name): Make
6100 (attr_bits, bt_types, array_spec_types, array_ref_types,
6101 ref_types, expr_types): Make const.
6102 * g95.h: Adjust external decls.
6104 2003-01-09 Paul Brook <paul@nowt.org>
6106 * Testsuite: Add a load of new cases.
6108 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6110 * Make-file.in: Add dependency on back end header files;
6111 a parallel build should work now.
6112 * f95-lang-c (lang_identifier): Remove bogus comment.
6113 (g95_be_parse_file): Fix prototype.
6114 (g95_init): Make static.
6115 (g95_finish): Make static.
6116 * error.c (g95_syntax_error): Kill. Make define in...
6117 * g95.h (g95_syntax_error): Define.
6118 (g95.options): Make 'source' member 'const'.
6119 * interface.c (g95_match_interface): Explain
6120 hard-to-read condition.
6121 (g95_match_end_interface): Ditto.
6122 * trans_const.c (g95_build_string_const): Make 's' parameter
6124 * trans_const.h: Adjust protoype accordingly.
6125 * trans-decl.c: Include tree-dump.h
6126 (g95_generate_function_code): Build fixes for recent changes
6127 in the tree-ssa branch.
6129 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6131 * format.c: Kill, move code from here...
6133 * Make-lang.in: Adjust.
6136 * BUGS: Mention where to submit bugs. Move old content...
6137 * TODO: ...to here. New file.
6139 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6140 Fix most warnings, and suppress the ones we can't fix for now.
6141 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
6142 these warnings just clutter the screen and there's not much
6143 we can do about them for now anyway.
6144 * check.c, iresolve.c: Mark unused function parameters.
6145 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
6146 they should be resolved before they get here.
6147 * error.c: Remove unused FILE *status_out.
6148 * f95-lang.c (g95_init): Remove bogus cast.
6149 * Many files: Make things 'const' where required.
6150 * g95.h: Fix prototypes for all modified functions above.
6151 (g95_options): Remove 'object' member.
6153 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6155 * Make-file.in: Cleanup bogus targets. Add more comment.
6156 * lang-options.h: New option '-w'.
6157 * g95.h: add no_options field to struct g95_options.
6158 * options.c (g95_init_options): Default no_warnings to off.
6159 (g95_parse_arg): Recognise the '-w' switch and its alias,
6161 * error.c (g95_warning, g95_warning_now): Don't emit warning if
6162 no_warning option is set.
6163 * iresolve.c (g95_resolve_shape): Fix warning.
6165 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6167 * primary.c (g95_next_string_char): Rename next_string_char, and
6168 make static. Adjust callers accordingly.
6169 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
6170 callers accordingly.
6171 * g95.h: Split out all g95_match* functions to...
6172 * match.h: ...here. New file.
6173 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
6174 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
6176 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6178 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
6179 g95_merge_new_implicit): New functions.
6180 (g95_match_implicit_none, g95_match_implicit): Move from here...
6181 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
6182 Modify to use the new functions in symbol.c.
6183 * g95.h: Add and move prototypes.
6185 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6187 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
6188 node compare function.
6189 (g95_insert_bbt): Likewise.
6190 (g95_insert_bbt_with_overlap): Likewise.
6191 (g95_delete_bbt): Likewise.
6192 (delete_treap): Likewise. Also fix a potential bug when calling it.
6193 * module.c (compare_pointers): Change proto to compare_fn.
6194 (compare_integers): Likewise.
6195 (compare_true_names): Likewise.
6196 (find_true_name): Adjust call to compare_true_names to match proto.
6197 (require_atom, write_atom, mio_name): Fix 'const' warnings.
6198 (init_pi_tree): Make compare a compare_fn instead of (int *).
6199 * resolve.c (compare_cases): Change proto to compare_fn.
6200 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
6201 it static, and rename to compare_symtree.
6202 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
6204 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
6205 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
6207 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6208 * Make-lang.in: Fix spaces/tabs issues from previous patch.
6209 * patch.options: Blow away Paul's checkin mistake :-)
6210 * io.c (terminate_io): Fix memory leak (Arnaud).
6212 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6214 * Make-lang.in: Teach about building DVI, info manual.
6215 * g95.texi: New file.
6217 2003-01-02 Paul Brook <paul@nowt.org>
6219 * trans-array.c (g95_reverse_ss): Make static and don't use.
6220 (g95_conv_ss_descriptor): Don't use g95_loopinfo
6221 (g95_conv_array_parameters): Modify for pointer assignments.
6222 (g95_walk_subexpr): New function.
6223 (g95_walk_expr*): Use it.
6224 * trans-array.h (g95_reverse_ss): Remove prototype.
6225 * trans-expr.c (g95_trans_pointer_assign): Implement.
6226 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
6227 * trans-intrinsic.c: Sync with scalarizer changes.
6228 * trans-io.c: Ditto.
6230 2002-12-29 Paul Brook <paul@nowt.org>
6232 * trans-array.c: Document calling convention for arrays.
6234 2002-12-19 Paul Brook <paul@nowt.org>
6236 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
6237 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
6238 optional parameters for some intrinsics.
6239 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
6240 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
6241 optional parameters.
6242 * trans.h (g95_se): Add ignore_optional flag.
6244 2002-12-15 Paul Brook <paul@nowt.org>
6246 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
6247 * trans-decl.c (g95_generate_function_code): Use TDI_original.
6249 2002-12-14 Paul Brook <paul@nowt.org>
6251 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
6253 2002-12-12 Paul Brook <paul@nowt.org>
6255 * trans-array.c (g95_trans_array_constructor_subarray): Fully
6256 initialize the scalarizer.
6257 (various): Update to new format of g95_expr->value.constructor.
6259 2002-12-08 Paul Brook <paul@nowt.org>
6261 * trans-array.c (g95_put_offset_into_var): New function.
6262 (g95_trans_array_constructor_subarray): New function.
6263 (g95_trans_array_constructor_value): Use it.
6264 (g95_array_cons_size): Don't abort() on array components.
6266 2002-12-08 Paul Brook <paul@nowt.org>
6268 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
6269 * support.c: Update #includes.
6270 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
6271 * trans-array.c: Update #includes.
6273 * trans-const.c: Ditto.
6274 * trans-io.c: Ditto.
6275 * trans-types.c: Ditto.
6276 (g95_init_types): Set size_type_node.
6277 * trans-decl.c: Update #includes.
6278 (gfor_fndecl_adjust{l,r}): Declare and initialize.
6279 * trans-stmt.c: Update #includes.
6280 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
6281 (g95_trans_select): Fix check for unbounded ranges.
6282 * trans-expr.c: Update #includes.
6283 (g95_conv_string_tmp): New function.
6284 (g95_conv_concat_op): Use it.
6285 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
6286 * Trans-intrisic.c: Update #includes.
6287 (g95_conv_intrinsic_strcmp): New function.
6288 (g95_conv_intrinsic_adjust): Ditto.
6289 (g95_conv_intrinsic_function: Use them.
6291 2002-11-30 Paul Brook <paul@nowt.org>
6293 * trans-array.c (g95_walk_function_expr): Handle non-array return by
6295 * trans-dec.c (g95_build_function_decl): Handle character return
6297 (g95_get_fake_result_decl): Ditto.
6298 (g95_trans_deferred_vars): Ditto.
6299 * trans-expr.c (g95_conv_function_call): Ditto.
6300 (g95_trans_arrayfunc_assign) Limit to array valued functions.
6301 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
6302 (g95_conv_intrinsic_function): Use it.
6303 * trans-types.c (g95_sym_type): Handle functions returning strings.
6304 (g95_return_by_reference): Ditto.
6305 (g95_get_function_type): Ditto.
6307 2002-11-18 Paul Brook <paul@nowt.org>
6309 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
6310 requires a temporary.
6311 (g95_trans_select): Handle computed gotos.
6312 * trans-types.c (g95_build_array_type): Warn about non-functional
6313 assumed shape arrays.
6314 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
6316 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
6317 (g95_conv_intrinsic_int): New function.
6318 (g95_conv_intrinsic_mod): New function.
6319 (g95_conv_intrinsic_ichar): New function.
6320 (g95_conv_intrinsic_function): Use them.
6321 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
6323 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
6325 * trans-types.c (g95_build_array_type): Assumed
6326 sized arrays can have rank > 1.
6327 * trans.c (g95_trans_code): Remove erroneous
6328 warning about CONTINUE.
6329 * trans-expr.c (g95_conv_variable): Remove
6332 2002-11-15 Paul Brook <paul@nowt.org>
6334 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
6336 2002-10-31 Paul Brook <paul@nowt.org>
6338 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
6339 * trans-expr.c (g95_conv_component_ref): Handle character string
6341 (g95_conv_string_parameter): Ditto.
6342 * trans-types.c (g95_get_derived_type): Add length decl to caracter
6345 2002-10-10 Paul Brook <paul@nowt.org>
6347 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
6348 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
6350 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
6351 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
6352 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
6353 * trans-types.c (pvoid_type_node): Declare and initialize.
6354 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
6355 (g95_array_allocate): Fix when base==data.
6356 (g95_conv_array_parameter): Correctly handle reduced rank sections.
6357 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
6359 2002-10-09 Paul Brook <paul@nowt.org>
6361 * (g95_conv_expr_reference): Handle character strings correctly.
6363 2002-10-07 Paul Brook <paul@nowt.org>
6365 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
6367 * trans-array.c (g95_build_array_initializer): Remove.
6368 (g95_conv_array_initializer): New Function.
6369 (g95_trans_auto_arry_allocation): Cleanup.
6370 (g95_trans_init_character_array): Remove.
6371 * g95spec.c: Link in libgforbegin.
6372 * trans.c (g95_generate_code): Rename main function to MAIN__.
6373 (g95_create_var): New function.
6374 (g95_create_var_np): New function.
6375 (g95_evaluate_now): New function.
6376 (g95_start_block): New function.
6377 (g95_finish_block): New function.
6378 (g95_add_expr_to_block): New function.
6379 (g95_add_block_to_block): New function.
6380 * trans-expr.c (g95_conv_componen_ref): New function.
6381 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
6382 (F95_OBJS): Add dependency.o.
6383 * f95-lang.c (g95_is_simple_stmt): Remove.
6384 * f95-tree.c (mark_not_simple): New function.
6385 (unshare_all_trees): New function.
6386 (create_tmp_var, create_tmp_alias_var): Remove.
6387 * support.c (declare_tmp_vars, tree_last_decl): Remove.
6388 * trans*: Convert to new IR using GENERIC trees. Don't bother about
6389 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
6391 2002-10-01 Paul Brook <paul@nowt.org>
6393 * trans-array.c: Add support for descriptorless arrays.
6394 (g95_conv_array_data): New function.
6395 (g95_conv_array_base): New function.
6396 * trans-array.h: Declare these here.
6397 * trans-decl.c(g95_create_mopdule_variable): Perform variable
6398 initialization and creation here.
6399 (g95_create_module_vars): Instead of here.
6400 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
6401 * trans-intrinsic.c: Ditto.
6402 * trans-types.c (g95_is_nodesc_array): New function.
6403 (g95_get_nodesc_array_type): New function.
6404 (g95_sym_type, g95_get_derived_type): Use them.
6405 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
6407 2002-09-28 Paul Brook <paul@nowt.org>
6409 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
6410 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
6413 2002-09-24 Paul Brook <paul@nowt.org>
6415 * f95-lang.c (listify): Remove declaration.
6416 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
6418 * f95-tree.c (get_name): New function.
6419 * trans.c (module_namespace): Remove.
6420 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
6421 * trans-types.c: Ditto.
6423 2002-09-19 Paul Brook <paul@nowt.org>
6425 * trans-array.c (g95_get_array_cons_size): New Function.
6426 (g95_con_ss_startstride): Handle Array constructors.
6427 (g95_conv_loop_setup): Ditto.
6428 (g95_conv_array_parameter): Ditto.
6429 * tras-decl.c (g95_finish_var_decl): Make initializes variables
6432 2002-09-19 Paul Brook <paul@nowt.org>
6434 * trans.c (g95_simple_fold_tmp): Detect variables inside
6436 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
6438 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
6440 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
6442 2002-09-14 Paul Brook <paul@nowt.org>
6444 * trans.c (g95_create_module_variable): Move to trans-decl.c.
6445 * trans-const.c (g95_conv_string_init): New Function.
6446 * trans-const.h: Declare it.
6447 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
6448 variables. Don't bail on intrinsic symbols.
6449 (get_extern_function_decl): Handle specific intrinsic functions.
6450 * trans-types.c (g95_sym_type): Dummy functions don't return
6452 * trans-array.c (g95_build_array_initializer): New Function.
6453 (g95_trans_auto_array_allocation): Build initializer for static decls.
6454 Don't use mpz_addmul, it's GMP4 only.
6456 2002-09-12 Paul Brook <paul@nowt.org>
6458 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
6459 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
6460 assembler names for module procedures.
6462 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
6464 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
6467 2002-09-10 Paul Brook <paul@nowt.org>
6469 * trans-array.c: Change format of G95_SS_TEMP strictures.
6470 (g95_check_fncall_dependancy): New function.
6471 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
6473 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
6475 (g95_build_function_decl): Don't assume result arrays are packed.
6476 (g95_trans-deferred-vars): Handle array result variables.
6477 (g95_generate_fuction_code): Clear saved_function_decls.
6478 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
6480 (g95_trans_arrayfunc_assign): New function.
6481 (g95_trans_assignment): Use it.
6482 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
6483 (g95_se): Add direct_byref.
6484 * trans-types.c: Use sym->result rather than sym where appropriate.
6485 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
6486 Update other functions to use this.
6487 (g95_is_intrinsic_libcall): New function.
6488 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
6489 (g95_walk_intrinsic_function): Ditto.
6491 2002-09-08 Paul Brook <paul@nowt.org>
6493 * trans-types.c: Change rank field to dtype field in array descriptor.
6494 * trans-array.c: Implement filling of dtype array descriptor field.
6495 * trans-intrinsic.c: Fix broken LEN intrinsic.
6497 2002-09-07 Paul Brook <paul@nowt.org>
6499 * trans-intrinsic.c: Remove outdated todo intrinsic list.
6500 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
6501 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
6503 2002-09-06 Paul Brook <paul@nowt.org>
6505 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
6506 (gt-f95-trans-types.h): Add dependancy information.
6507 * config-lang.in (gtfiles): Add trans-types.c
6508 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
6509 back to top-level code.
6510 * trans-array.c, trans-types.c: Change format of array descriptor.
6511 (g95_conv_descriptor_dimension): New function.
6512 * trans-types.h (g95_conv_descriptor_rank): define.
6513 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
6516 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6518 * trans-array.c, trans-types.c: Add rank information to descriptor.
6520 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
6522 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
6524 2002-09-04 Paul Brook <paul@nowt.org>
6526 * f95-lang.c (g95_create_decls): New function.
6527 (g95_init): Move initialization of external decls to above, and call
6528 from g95_be_parse_file.
6529 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
6530 * trans-types.c (g95_init_types): Always name integer and char types.
6531 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
6533 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6535 * Make-lang.in: Add options.c to F95_PARSER_OBJS
6537 2002-09-02 Paul Brook <paul@nowt.org>
6539 * g95_generate_code: Clear the attr for __fortran_main.
6540 * trans-types.c (g95_finish_type): New function.
6541 * g95_init_io_state_type: Use g95_finish_type.
6542 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
6544 2002-09-01 Paul Brook <paul@nowt.org>
6546 * README.backend: Warn about the dangers of extra config.h files.
6547 Remove obsolete libgfor stuff.
6548 * config-lang.in: Add target-libgfor dependancy.
6549 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
6551 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
6553 * g95_conv_mpz_to_tree: Free storage pointed to by q,
6556 2002-08-30 Paul Brook <paul@nowt.org>
6558 * trans-intrinsic.c (g95_conv_intrinsic_function,
6559 g95_walk_intrinsic_function): Added ANY and ALL.
6560 (g95_conv_intrinsic_anyall): New function.
6561 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in