1 2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4 * invoke.texi: Document that -fdollar-ok does not allow $ to be
5 used in IMPLICIT statement.
7 2009-05-06 Janus Weil <janus@gcc.gnu.org>
8 Paul Thomas <pault@gcc.gnu.org>
11 * decl.c (match_procedure_interface): New function to match the
12 interface for a PROCEDURE statement.
13 (match_procedure_decl): Call match_procedure_interface.
14 (match_ppc_decl): New function to match the declaration of a
15 procedure pointer component.
16 (gfc_match_procedure): Call match_ppc_decl.
17 (match_binding_attributes): Add new argument 'ppc' and handle the
18 POINTER attribute for procedure pointer components.
19 (match_procedure_in_type,gfc_match_generic): Added new argument to
20 match_binding_attributes.
21 * dump-parse-tree.c (show_expr,show_components,show_code_node): Handle
22 procedure pointer components.
23 * expr.c (free_expr0,gfc_copy_expr,gfc_simplify_expr): Handle EXPR_PPC.
24 (gfc_check_pointer_assign): Handle procedure pointer components, but no
26 (is_proc_ptr_comp): New function to determine if an expression is a
27 procedure pointer component.
28 * gfortran.h (expr_t): Add EXPR_PPC.
29 (symbol_attribute): Add new member 'proc_pointer_comp'.
30 (gfc_component): Add new member 'formal'.
31 (gfc_exec_op): Add EXEC_CALL_PPC.
32 (gfc_get_default_type): Changed first argument.
33 (is_proc_ptr_comp): Add prototype.
34 (gfc_match_varspec): Add new argument.
35 * interface.c (compare_actual_formal): Handle procedure pointer
37 * match.c (gfc_match_pointer_assignment,match_typebound_call): Handle
38 procedure pointer components.
39 * module.c (mio_expr): Handle EXPR_PPC.
40 * parse.c (parse_derived): Handle procedure pointer components.
41 * primary.c (gfc_match_varspec): Add new argument 'ppc_arg' and handle
42 procedure pointer components.
43 (gfc_variable_attr): Handle procedure pointer components.
44 (gfc_match_rvalue): Added new argument to gfc_match_varspec and changed
45 first argument of gfc_get_default_type.
46 (match_variable): Added new argument to gfc_match_varspec.
47 * resolve.c (resolve_entries,set_type,resolve_fl_parameter): Changed
48 first argument of gfc_get_default_type.
49 (resolve_structure_cons,resolve_actual_arglist): Handle procedure
51 (resolve_ppc_call): New function to resolve a call to a procedure
52 pointer component (subroutine).
53 (resolve_expr_ppc): New function to resolve a call to a procedure
54 pointer component (function).
55 (gfc_resolve_expr): Handle EXPR_PPC.
56 (resolve_code): Handle EXEC_CALL_PPC.
57 (resolve_fl_derived): Copy the interface for a procedure pointer
59 (resolve_symbol): Fix overlong line.
60 * st.c (gfc_free_statement): Handle EXEC_CALL_PPC.
61 * symbol.c (gfc_get_default_type): Changed first argument.
62 (gfc_set_default_type): Changed first argument of gfc_get_default_type.
63 (gfc_add_component): Initialize ts.type to BT_UNKNOWN.
64 * trans.h (gfc_conv_function_call): Renamed.
65 * trans.c (gfc_trans_code): Handle EXEC_CALL_PPC.
66 * trans-expr.c (gfc_conv_component_ref): Ditto.
67 (gfc_conv_function_val): Rename to 'conv_function_val', add new
68 argument 'expr' and handle procedure pointer components.
69 (gfc_conv_operator_assign): Renamed gfc_conv_function_val.
70 (gfc_apply_interface_mapping_to_expr): Handle EXPR_PPC.
71 (gfc_conv_function_call): Rename to 'gfc_conv_procedure_call', add new
72 argument 'expr' and handle procedure pointer components.
73 (gfc_get_proc_ptr_comp): New function to get the backend decl for a
74 procedure pointer component.
75 (gfc_conv_function_expr): Renamed gfc_conv_function_call.
76 (gfc_conv_structure): Handle procedure pointer components.
77 * trans-intrinsic.c (gfc_conv_intrinsic_funcall,
78 conv_generic_with_optional_char_arg): Renamed gfc_conv_function_call.
79 * trans-stmt.h (gfc_get_proc_ptr_comp): Add prototype.
80 * trans-stmt.c (gfc_trans_call): Renamed gfc_conv_function_call.
81 * trans-types.h (gfc_get_ppc_type): Add prototype.
82 * trans-types.c (gfc_get_ppc_type): New function to build a tree node
83 for a procedure pointer component.
84 (gfc_get_derived_type): Handle procedure pointer components.
86 2009-05-06 Tobias Burnus <burnus@net-b.de>
89 * resolve.c (resolve_symbol): Print no warning for implicitly
90 typed intrinsic functions.
92 2009-05-05 Janus Weil <janus@gcc.gnu.org>
95 * expr.c (gfc_check_pointer_assign): Check for statement functions and
96 internal procedures in procedure pointer assignments.
98 2009-04-28 Janus Weil <janus@gcc.gnu.org>
101 * resolve.c (resolve_symbol): Correctly copy the interface of a
102 PROCEDURE statement if the interface involves a RESULT variable.
104 2009-04-28 Janus Weil <janus@gcc.gnu.org>
108 * expr.c (gfc_check_pointer_assign): Correctly detect if the left hand
110 * parse.c (gfc_fixup_sibling_symbols): Don't check for ambiguity.
112 2009-04-28 Paul Thomas <pault@gcc.gnu.org>
115 * trans_expr.c (gfc_conv_procedure_call): Deep copy a derived
116 type parentheses argument if it is a variable with allocatable
119 2009-04-27 Ian Lance Taylor <iant@google.com>
121 * trans-intrinsic.c (DEFINE_MATH_BUILTIN): Add casts to enum
123 * trans-io.c (st_parameter_field): Add casts to enum type.
125 2009-04-26 Steven G. Kargl <kargl@gcc.gnu.org>
128 fortran/data.c (gfc_assign_data_value): If the lvalue is an
129 assumed character length entity in a data statement, then
130 return FAILURE to prevent segmentation fault.
132 2009-04-26 Jakub Jelinek <jakub@redhat.com>
134 * trans-decl.c: Include pointer-set.h.
135 (nonlocal_dummy_decl_pset, tree nonlocal_dummy_decls): New variables.
136 (gfc_nonlocal_dummy_array_decl): New function.
137 (gfc_get_symbol_decl): Call it for non-local dummy args with saved
139 (gfc_get_symbol_decl): Set DECL_BY_REFERENCE when needed.
140 (gfc_generate_function_code): Initialize nonlocal_dummy_decl{s,_pset},
141 chain it to outermost block's vars, destroy it afterwards.
142 * Make-lang.in (trans-decl.o): Depend on pointer-set.h.
144 2009-04-25 Janus Weil <janus@gcc.gnu.org>
147 * decl.c (gfc_match_import): Use 'sym->name' instead of 'name'.
148 They differ if the symbol has been use-renamed.
150 2009-04-24 Ian Lance Taylor <iant@google.com>
152 * gfortran.h (enum gfc_symbol_type): New named enum type, broken
153 out of struct gfc_symbol.
154 (struct gfc_symbol): Use enum gfc_symbol_type.
155 (enum gfc_array_ref_dimen_type): New named enum type, broken out
156 of struct gfc_array_ref).
157 (struct gfc_array_ref): Use enum gfc_array_ref_dimen_type.
158 (mod_pointee_as): Update declaration.
159 * decl.c (add_global_entry): Change type to enum gfc_symbol_type.
160 (gfc_mod_pointee_as): Change return type to "match".
161 * module.c (mio_array_ref): Add cast to enum type.
162 (mio_symbol): Likewise.
163 * resolve.c (resolve_global_procedure): Change type to enum
165 * trans-io.c (gfc_build_st_parameter): Change type to unsigned
168 2009-04-24 Daniel Kraft <d@domob.eu>
170 * gfortran.h (gfc_get_typebound_proc): Removed as macro, now a function.
171 (struct gfc_symtree): Moved `typebound' member inside union.
172 (struct gfc_namespace): Add `tb_sym_root' as new symtree to sort out
173 type-bound procedures there.
174 (gfc_get_tbp_symtree): New procedure.
175 * symbol.c (tentative_tbp_list): New global.
176 (gfc_get_namespace): NULL new `tb_sym_root' member.
177 (gfc_new_symtree): Removed initialization of `typebound' member.
178 (gfc_undo_symbols): Process list of tentative tbp's.
179 (gfc_commit_symbols): Ditto.
180 (free_tb_tree): New method.
181 (gfc_free_namespace): Call it.
182 (gfc_get_typebound_proc): New method.
183 (gfc_get_tbp_symtree): New method.
184 (gfc_find_typebound_proc): Adapt to structural changes of gfc_symtree
185 and gfc_namespace with regards to tbp's.
186 * dump-parse-tree.c (show_typebound): Ditto.
187 * primary.c (gfc_match_varspec): Ditto. Don't reference tbp-symbol
188 as it isn't a symbol any longer.
189 * module.c (mio_typebound_symtree): Adapt to changes.
190 (mio_typebound_proc): Ditto, create symtrees using `gfc_get_tbp_symtree'
191 rather than `gfc_get_sym_tree'.
192 (mio_f2k_derived): Ditto.
193 * decl.c (match_procedure_in_type): Ditto.
194 (gfc_match_generic): Ditto. Don't reference tbp-symbol.
195 * resolve.c (check_typebound_override): Adapt to changes.
196 (resolve_typebound_generic): Ditto.
197 (resolve_typebound_procedures): Ditto.
198 (ensure_not_abstract_walker): Ditto.
199 (ensure_not_abstract): Ditto.
200 (resolve_typebound_procedure): Ditto, ignore erraneous symbols (for
201 instance, through removed tentative ones).
202 * gfc-internals.texi (Type-bound procedures): Document changes.
204 2009-04-24 Janus Weil <janus@gcc.gnu.org>
208 * symbol.c (gfc_copy_formal_args_intr): Set attr.flavor and attr.dummy
209 for the formal arguments.
211 2009-04-21 Taras Glek <tglek@mozilla.com>
213 * f95-lang.c: Update GTY annotations to new syntax.
214 * trans-intrinsic.c: Likewise.
215 * trans-io.c: Likewise.
218 2009-04-22 Janus Weil <janus@gcc.gnu.org>
221 * decl.c (add_hidden_procptr_result): Bugfix for procptr results.
222 (match_procedure_decl): Set if_source.
223 * expr.c (gfc_check_pointer_assign): Bugfix: Return after error.
224 And: Check interface also for IFSRC_UNKNOWN (return type may be known).
225 * gfortran.h (typedef enum ifsrc): Remove IFSRC_USAGE,
226 add documentation. Rename copy_formal_args and copy_formal_args_intr.
227 * interface.c (gfc_compare_interfaces): Check for return types,
228 handle IFSRC_UNKNOWN.
229 (compare_intr_interfaces,compare_actual_formal_intr): Obsolete, removed.
230 (gfc_procedure_use): Modified handling of intrinsics.
231 * intrinsic.c (add_functions): Bugfix for "dim".
232 * resolve.c (resolve_intrinsic): New function to resolve intrinsics,
233 which copies the interface from isym to sym.
234 (resolve_procedure_expression,resolve_function): Use new function
236 (resolve_symbol): Add function attribute for externals with return type
237 and use new function 'resolve_intrinsic'.
238 * symbol.c (ifsrc_types): Remove string for IFSRC_USAGE.
239 (copy_formal_args): Renamed to gfc_copy_formal_args.
240 (copy_formal_args_intr): Renamed to gfc_copy_formal_args_intr.
241 * trans-const.c (gfc_conv_const_charlen): Handle cl==NULL.
243 2009-04-21 Joseph Myers <joseph@codesourcery.com>
245 * ChangeLog, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004,
246 ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008,
247 ChangeLog.ptr, config-lang.in, ioparm.def, mathbuiltins.def: Add
248 copyright and license notices.
249 * ChangeLog, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
250 ChangeLog-2008: Correct dates.
252 2009-04-20 Tobias Burnus <burnus@net-b.de>
255 * scanner.c (load_line): Fix bogus "&" compile-time diagnostic.
257 2009-04-20 Paul Thomas <pault@gcc.gnu.org>
260 * resolve.c (is_sym_host_assoc): New function.
261 (resolve_fl_derived): Call it when checking PRIVATE components
262 of PUBLIC derived types. Change gfc_error to a gfc_notify_std
264 (resolve_fl_namelist): Call it twice to check for host
267 2009-04-20 Ian Lance Taylor <iant@google.com>
269 * module.c (import_iso_c_binding_module): Add casts to enum type.
270 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Change op to enum
272 (gfc_conv_intrinsic_anyall): Likewise.
273 (gfc_conv_intrinsic_arith): Likewise.
274 (gfc_conv_intrinsic_minmaxloc): Likewise.
275 (gfc_conv_intrinsic_minmaxval): Likewise.
276 (gfc_conv_intrinsic_bitop): Likewise.
277 (gfc_conv_intrinsic_singlebitop): Likewise.
278 (gfc_conv_intrinsic_strcmp): Likewise.
280 2009-04-20 Vasilis Liaskovitis <vliaskov@gmail.com>
281 Jakub Jelinek <jakub@redhat.com>
284 * trans.h (OMPWS_WORKSHARE_FLAG, OMPWS_CURR_SINGLEUNIT,
285 OMPWS_SCALARIZER_WS, OMPWS_NOWAIT): Define.
286 (ompws_flags): New extern decl.
287 * trans-array.c (gfc_trans_scalarized_loop_end): Build OMP_FOR
288 for the outer dimension if ompws_flags allow it.
289 * trans.c (gfc_generate_code): Clear ompws_flags.
290 * trans-expr.c (gfc_trans_assignment_1): Allow worksharing
291 array assignments inside of !$omp workshare.
292 * trans-stmt.c (gfc_trans_where_3): Similarly for where statements
294 * trans-openmp.c (ompws_flags): New variable.
295 (gfc_trans_omp_workshare): Rewritten.
297 2009-04-11 Daniel Kraft <d@domob.eu>
300 * gfortran.h (struct gfc_charlen): New field `passed_length' to store
301 the actual passed string length for dummy arguments.
302 * trans-decl.c (gfc_create_string_length): Formatting fixes and added
303 assertion, moved a local variable into the innermost block it is needed.
304 (create_function_arglist): Removed TODO about the check being
305 implemented and initialize cl->passed_length here.
306 (add_argument_checking): New method.
307 (gfc_generate_function_code): Call the argument checking method.
309 2009-04-11 Janus Weil <janus@gcc.gnu.org>
312 * symbol.c (check_conflict): Reject procedure pointers for -std=f95.
314 2009-04-11 Daniel Franke <franke.daniel@gmail.com>
316 * resolve.c (resolve_global_procedure): Enable whole-file checking for
317 procedures that are declared later in the file.
319 2009-04-10 Paolo Bonzini <bonzini@gnu.org>
322 * trans.c (gfc_allocate_with_status): Fix type mismatches
325 2009-04-10 Daniel Franke <franke.daniel@gmail.com>
328 * expr.c (find_array_section): Leave early on zero-sized arrays.
330 2009-04-09 Janus Weil <janus@gcc.gnu.org>
333 * decl.c (add_hidden_procptr_result): New function for handling
334 procedure pointer return values by adding a hidden result variable.
335 (variable_decl,match_procedure_decl,gfc_match_function_decl,
336 gfc_match_subroutine,gfc_match_end,attr_decl1): Handle procedure pointer
338 * parse.c (parse_interface): Add EXTERNAL attribute only after
339 FUNCTION/SUBROUTINE declaration is complete.
340 * primary.c (replace_hidden_procptr_result): New function for replacing
341 function symbol by hidden result variable.
342 (gfc_match_rvalue,match_variable): Replace symbol by hidden result
344 * resolve.c (resolve_contained_fntype,resolve_function,resolve_variable,
345 resolve_symbol): Allow for procedure pointer function results.
346 (resolve_fl_procedure): Conflict detection moved here from
348 * symbol.c (gfc_check_function_type): Allow for procedure pointer
350 (check_conflict): Move some conflict detection to resolution stage.
351 * trans-types.c (gfc_sym_type,gfc_get_function_type): Handle hidden
354 2009-04-08 Jakub Jelinek <jakub@redhat.com>
356 * trans-types.c (gfc_init_types): Ensure gfc_integer_types doesn't
357 contain TYPE_STRING_FLAG types.
359 2009-04-08 Janne Blomqvist <jb@gcc.gnu.org>
362 * invoke.texi (fdollar-ok): Fix typo.
364 2009-04-08 Daniel Franke <franke.daniel@gmail.com>
367 * invoke.texi (fdollar-ok): Clarify limitations.
369 2009-04-08 Paul Thomas <pault@gcc.gnu.org>
372 * trans-array.c (gfc_trans_deferred_array): Return if this
373 is a result variable.
375 2009-04-07 Janus Weil <janus@gcc.gnu.org>
378 * trans-decl.c (gfc_get_symbol_decl): Correctly set decl location for
379 procedure pointer decls.
381 2009-04-07 Janus Weil <janus@gcc.gnu.org>
384 * expr.c (gfc_check_pointer_assign): Enable interface check for
386 * gfortran.h: Add copy_formal_args_intr.
387 * interface.c (gfc_compare_interfaces): Call gfc_compare_intr_interfaces
388 if second argument is an intrinsic.
389 (compare_intr_interfaces): Correctly set attr.function, attr.subroutine
391 (compare_parameter): Call gfc_compare_interfaces also for intrinsics.
392 * resolve.c (resolve_specific_f0,resolve_specific_s0): Don't resolve
393 intrinsic interfaces here. Must happen earlier.
394 (resolve_symbol): Resolution of intrinsic interfaces moved here from
395 resolve_specific_..., and formal args are now copied from intrinsic
397 * symbol.c (copy_formal_args_intr): New function to copy the formal
398 arguments from an intinsic procedure.
400 2009-04-06 Paul Thomas <pault@gcc.gnu.org>
403 * dependency.c (ref_same_as_full_array): New function.
404 (gfc_dep_resolver): Call it.
406 2009-04-06 Janus Weil <janus@gcc.gnu.org>
409 * decl.c (match_procedure_decl): Fix double declaration problems with
410 PROCEDURE statements.
411 * symbol.c (gfc_add_type): Ditto.
413 2009-04-06 Paul Thomas <pault@gcc.gnu.org>
416 * trans-array.c (gfc_conv_array_ref): If the symbol has the
417 temporary attribute use the array_spec for the bounds.
418 * gfortran.h : Add the temporary field to the structure
420 * trans-stmt.c (forall_make_variable_temp): Set the symbol's
423 2009-04-05 Daniel Franke <franke.daniel@gmail.com>
426 * trans-array.c (gfc_trans_array_constructor_value): Shadow
427 implied do-loop variable to avoid spurious middle-end warnings.
429 2009-04-04 Tobias Burnus <burnus@net-b.de>
432 * trans-decl.c (gfc_generate_function_code): Move recursive
433 check to the right position.
435 2009-04-04 Paul Thomas <pault@gcc.gnu.org>
438 * trans-common.c (translate_common): Do not offset the whole
441 2009-04-03 Tobias Burnus <burnus@net-b.de>
444 * resolve.c (resolve_common_vars): Add FL_VARIABLE to symbol
445 if it is not a procedure pointer.
446 * primary.c (match_actual_arg): Ditto.
448 2009-03-31 Joseph Myers <joseph@codesourcery.com>
450 PR preprocessor/15638
451 * cpp.c (cb_cpp_error): Handle CPP_DL_FATAL.
453 2009-03-30 Steven G. Kargl <kargls@comcast.net>
456 * trans-stmt.c(gfc_trans_allocate): Add translation of ERRMSG.
457 (gfc_trans_deallocate): Add translation of ERRMSG. Remove stale
458 comments. Minor whitespace cleanup.
459 * resolve.c(is_scalar_expr_ptr): Whitespace cleanup.
460 (resolve_deallocate_expr (gfc_expr *e): Update error message.
461 (resolve_allocate_expr): Remove dead code. Update error message.
462 Move error checking to ...
463 (resolve_allocate_deallocate): ... here. Add additional error
464 checking for STAT, ERRMSG, and allocate-objects.
465 * match.c(gfc_match_allocate,gfc_match_deallocate): Parse ERRMSG.
466 Check for redundant uses of STAT and ERRMSG. Reword error message
467 and add checking for pointer, allocatable, and proc_pointer attributes.
469 2009-03-30 Paul Thomas <pault@gcc.gnu.org>
474 * symbol.c : Add gfc_global_ns_list.
475 * decl.c (add_global_entry): Set the namespace ('ns') field.
476 * gfortran.h : Add the resolved field to gfc_namespace. Add the
477 namespace ('ns') field to gfc_gsymbol. Add flag_whole_file to
478 gfc_option_t. Add the prototype for gfc_free_dt_list.
479 * lang.opt : Add the whole-file option.
480 * invoke.texi : Document the whole-file option.
481 * resolve.c (resolve_global_procedure): If the fwhole-file
482 option is set, reorder gsymbols to ensure that translation is
483 in the right order. Resolve the gsymbol's namespace if that
484 has not occurred and then check interfaces.
485 (resolve_function): Move call to resolve_global_procedure.
486 (resolve_call): The same.
487 (resolve_codes): Store the current labels_obstack.
488 (gfc_resolve) : Return if the namespace is already resolved.
489 trans-decl.c (gfc_get_extern_function_decl): If the whole_file
490 option is selected, use the backend_decl of a gsymbol, if it is
492 parse.c (add_global_procedure, add_global_program): If the flag
493 whole-file is set, add the namespace to the gsymbol.
494 (gfc_parse_file): On -fwhole-file, put procedure namespaces on
495 the global namespace list. Rearrange to do resolution of all
496 the procedures in a file, followed by their translation.
497 * options.c (gfc_init_options): Add -fwhole-file.
498 (gfc_handle_option): The same.
500 2009-03-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
502 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_HUGE_VAL
503 family of intrinsics instead of BUILT_IN_INF family.
504 * trans-intrinsics.c (gfc_conv_intrinsic_nearest): Use
505 BUILT_IN_HUGE_VAL instead of BUILT_IN_INF.
507 2009-03-30 Jakub Jelinek <jakub@redhat.com>
509 * trans-types.c (gfc_sym_type, gfc_return_by_reference): For
510 sym->attr.result check sym->ns->proc_name->attr.is_bind_c.
512 2009-03-30 Joseph Myers <joseph@codesourcery.com>
514 PR rtl-optimization/323
515 * options.c (gfc_post_options): Set
516 flag_excess_precision_cmdline. Give an error for
517 -fexcess-precision=standard for processors where the option is
520 2009-03-29 Joseph Myers <joseph@codesourcery.com>
522 PR preprocessor/34695
523 * cpp.c (cb_cpp_error): New.
524 (gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings.
525 Don't check cpp_errors (cpp_in).
526 (gfc_cpp_init_0): Set cb->error.
528 2009-03-29 Steven G. Kargl <kargl@gcc.gnu.org>
531 * gfortran.h: Add ARITH_PROHIBIT to arith enum.
532 expr.c (gfc_match_init_expr): Add global variable init_flag to
533 flag matching an initialization expression.
534 (check_intrinsic_op): Move no longer reachable error message to ...
535 * arith.c (arith_power): ... here. Remove gfc_ prefix in
536 gfc_arith_power. Use init_flag. Allow constant folding of x**y
537 when y is REAL or COMPLEX.
538 (eval_intrinsic): Remove restriction that y in x**y must be INTEGER
539 for constant folding.
540 * gfc_power: Update gfc_arith_power to arith_power
542 2009-03-29 Daniel Kraft <d@domob.eu>
545 * gfortran.h (struct gfc_typebound_proc): Added new flag `deferred' and
546 added a comment explaining DEFERRED binding handling.
547 * decl.c (match_binding_attributes): Really match DEFERRED attribute.
548 (match_procedure_in_type): Really match PROCEDURE(interface) syntax
549 and do some validity checks for DEFERRED and this construct.
550 * module.c (binding_overriding): New string constant for DEFERRED.
551 (mio_typebound_proc): Module-IO DEFERRED flag.
552 * resolve.c (check_typebound_override): Ensure that a non-DEFERRED
553 binding is not overridden by a DEFERRED one.
554 (resolve_typebound_procedure): Allow abstract interfaces as targets
555 for DEFERRED bindings.
556 (ensure_not_abstract_walker), (ensure_not_abstract): New methods.
557 (resolve_fl_derived): Use new `ensure_not_abstract' method for
558 non-ABSTRACT types extending ABSTRACT ones to ensure each DEFERRED
559 binding is overridden.
560 (check_typebound_baseobject): New method.
561 (resolve_compcall), (resolve_typebound_call): Check base-object of
562 the type-bound procedure call.
563 * gfc-internals.texi (Type-bound procedures): Document a little bit
564 about internal handling of DEFERRED bindings.
566 2009-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
569 * gfortran.h (gfc_st_label): Fix comment.
570 (gfc_exec_op): Add statement code EXEC_END_BLOCK for end of block.
571 * parse.c (accept_statement): Use EXEC_END_BLOCK for END IF and
572 END SELECT with labels.
573 (check_do_closure): Fix formatting.
574 (parse_do_block): Fix typo in error message.
575 * resolve.c (code_stack): Remove tail member. Update comment to
576 new use of reachable_labels.
577 (reachable_labels): Rename to ...
578 (find_reachable_labels): ... this. Overhaul. Update preceding
580 (resolve_branch): Fix comment preceding function. Rewrite.
581 (resolve_code): Update call to find_reachable_labels. Add code to
582 deal with EXEC_END_BLOCK.
583 * st.c (gfc_free_statement): Add code to deal with EXEC_END_BLOCK.
584 Add 2009 to copyright years.
585 * trans.c (gfc_trans_code): Likewise on both counts.
587 2009-03-31 Paul Thomas <pault@gcc.gnu.org>
590 * expr.c (gfc_check_assign): Allow pointer components when
594 * resolve.c (check_data_variable): Treat pointer arrays with
597 2009-03-31 Paul Thomas <pault@gcc.gnu.org>
600 * trans-expr.c (gfc_trans_assignment_1): Ensure temporaries
601 have a string_length.
603 2009-03-28 Tobias Burnus <burnus@net-b.de>
606 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do):
607 Add GFC_RTCHECK_DO support.
608 * option.c (gfc_handle_runtime_check_option): Enable GFC_RTCHECK_DO.
609 * invoke.texi (-fcheck): Document "do" option.
611 2009-03-28 Paul Thomas <pault@gcc.gnu.org>
614 * trans-array.c (get_elemental_fcn_charlen): Remove.
615 (get_array_charlen): New function to replace previous.
617 2009-03-28 Paul Thomas <pault@gcc.gnu.org>
620 * parse.c (parse_derived): Do not break on finding pointer,
621 allocatable or private components.
623 2009-03-28 Tobias Burnus <burnus@net-b.de>
626 * option.c (gfc_handle_runtime_check_option): Enable recursion check.
627 * trans-decl.c (gfc_generate_function_code): Add recursion check.
628 * invoke.texi (-fcheck): Add recursive option.
630 2009-03-28 Tobias Burnus <burnus@net-b.de>
633 * resolve.c (gfc_resolve_iterator): Add zero-loop warning.
635 2009-03-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
636 Paul Thomas <pault@gcc.gnu.org>
637 Tobias Burnus <burnus@net-b.de>
639 * gfortran.h (gfc_option_t): Add rtcheck.
640 * lang.opt: New option -fcheck.
641 * libgfortran.h: Add GFC_RTCHECK_* constants.
642 * invoke.texi: Document -fcheck.
643 * options.c (gfc_handle_runtime_check_option): New function.
644 (gfc_init_options,gfc_post_options,gfc_handle_option):
647 2009-03-27 Richard Guenther <rguenther@suse.de>
649 * trans-array.c (gfc_conv_descriptor_data_addr): Use
650 gfc_build_addr_expr instead of build_fold_addr_expr.
651 (gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
652 gfc_trans_constant_array_constructor, gfc_conv_array_data,
653 gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
654 * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
655 gfc_conv_function_val, gfc_conv_operator_assign,
656 gfc_conv_subref_array_arg, gfc_conv_function_call,
657 gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
658 * trans-intrinsic.c (gfc_conv_intrinsic_exponent,
659 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
660 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
661 gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
662 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
663 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
664 gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
665 * trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
666 gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
667 build_filepos, gfc_trans_inquire, gfc_trans_wait,
668 nml_get_addr_expr, transfer_namelist_element, build_dt,
669 gfc_trans_dt_end, transfer_array_component, transfer_expr,
670 transfer_array_desc, gfc_trans_transfer): Likewise.
671 * trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
672 * trans.c (gfc_build_addr_expr): Mark the base of the address
675 2009-03-27 Tobias Burnus <burnus@net-b.de>
677 * gfortran.h (enum init_local_real.): Add GFC_INIT_REAL_SNAN.
678 (gfc_expr): Add is_snan.
679 * trans-const.c (gfc_conv_mpfr_to_tree): Support SNaN.
680 (gfc_conv_constant_to_tree): Update call to gfc_conv_mpfr_to_tree.
681 * trans-const.h (gfc_conv_mpfr_to_tree): Update prototype.
682 * resolve.c (build_default_init_expr): Update call.
683 * target-memory.c (encode_float): Ditto.
684 * trans-intrinsic.c (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod,
686 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
688 * lang.opt: Unify help texts for -I, -Wconversion, -d, -fopenmp,
691 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
693 * simplify.c (gfc_simplify_transfer): Zero-initialize the
696 2009-02-27 Tobias Burnus <burnus@net-b.de>
699 * module.c (read_md5_from_module_file): Add missing quote.
701 2009-02-27 Tobias Burnus <burnus@net-b.de>
704 * module.c (read_md5_from_module_file): Include mod version
707 2009-02-26 Paul Thomas <pault@gcc.gnu.org>
710 * interface.c (compare_type_rank_if): Return 1 if the symbols
711 are the same and deal with external procedures where one is
712 identified to be a function or subroutine by usage but the
715 2009-02-26 Paul Thomas <pault@gcc.gnu.org>
718 * trans-array.c (gfc_conv_array_initializer): Convert all
719 expressions rather than ICEing.
721 2009-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
724 * array.c (ref_dimen_size): Rename to gfc_ref_dimen_size,
725 make global. Change function name in error messages.
726 (ref_size): Change ref_dimen_size to gfc_ref_dimen_size.
727 (gfc_array_ref_shape): Likewise.
728 * gfortran.h: Add prototype for gfc_ref_dimen_size.
729 * simplify.c (simplify_bound_dim): Add ref argument.
730 If the reference isn't a full array, return one for
731 the lower bound and the extent for the upper bound.
732 (simplify_bound): For array sections, take as from the
733 argument. Add reference to all to simplify_bound_dim.
735 2009-02-19 Daniel Franke <franke.daniel@gmail.com>
737 * scanner.c (load_line): At end of line, skip '\r' without setting
740 2009-02-18 Daniel Kraft <d@domob.eu>
742 * gfortran.texi: New chapter about compiler characteristics.
743 (Compiler Characteristics): Document KIND type parameters here.
745 2009-02-18 Tobias Burnus <burnus@net-b.de>
747 * intrinsic.texi (MALLOC): Make example more portable.
749 2009-02-13 Mikael Morin <mikael.morin@tele2.fr>
752 * module.c (gfc_dump_module,gfc_use_module): Add module
755 2009-02-13 Paul Thomas <pault@gcc.gnu.org>
759 * trans-expr.c (gfc_conv_function_val): Stabilize Cray-pointer
760 function references to ensure that a valid expression is used.
761 (gfc_conv_function_call): Pass Cray pointers to procedures.
763 2009-02-03 Jakub Jelinek <jakub@redhat.com>
765 * gfortranspec.c (lang_specific_driver): Update copyright notice
768 2009-01-28 Paul Thomas <pault@gcc.gnu.org>
772 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use the array
773 descriptor ubound for UBOUND, when the array lbound == 1.
775 2009-01-27 Daniel Kraft <d@domob.eu>
778 * trans-stmt.c (gfc_conv_elemental_dependencies): Create temporary
779 for the real type needed to make it work for subcomponent-references.
781 2009-01-21 Daniel Kraft <d@domob.eu>
783 * trans-stmt.c (gfc_conv_elemental_dependencies): Cleaned up comment.
785 2009-01-20 Paul Thomas <pault@gcc.gnu.org>
788 * resolve.c (check_host_association): Remove the matching to
789 correct an incorrect host association and use manipulation of
790 the expression instead.
792 2009-01-20 Tobias Burnus <burnus@net-b.de>
794 * invoke.texi (RANGE): RANGE also takes INTEGER arguments.
796 2009-01-19 Mikael Morin <mikael.morin@tele2.fr>
799 * simplify.c (simplify_bound): Don't use array specification
800 if variable or component has subsequent references.
802 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
805 * module.c (write_common_0): Add argument 'this_module' and
806 check that non-use associated common blocks are written first.
807 (write_common): Call write_common_0 twice, once with true and
810 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
813 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Has
814 been absorbed into gfc_conv_intrinsic_transfer. All
815 references to it in trans-intrinsic.c have been changed
816 accordingly. PR fixed by using a temporary for scalar
817 character transfer, when the source is shorter than the
820 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
823 * module.c (write_common_0): Revert patch of 2009-01-05.
825 2009-01-16 Janus Weil <janus@gcc.gnu.org>
828 * expr.c (gfc_check_pointer_assign): Allow use-associated procedure
830 * trans-decl.c (get_proc_pointer_decl,gfc_create_module_variable):
831 Enable procedure pointers as module variables.
833 2009-01-14 Steven G. Kargl <kargl@gcc.gnu.org>
835 * ChangeLog-2007: Clean out svn merge droppings.
837 2009-01-10 Paul Thomas <pault@gcc.gnu.org>
840 * target-memory.c (encode_derived): Encode NULL.
842 2009-01-10 Paul Thomas <pault@gcc.gnu.org>
845 * resolve.c (check_host_association): Use the symtree name to
846 search for a potential contained procedure, since this is the
847 name by which it would be referenced.
849 2009-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
852 * interface.c (gfc_procedure_use): Don't warn about functions
854 * symbol.c (generate_isocbinding_symbol): Mark c_loc and
857 2009-01-05 Paul Thomas <pault@gcc.gnu.org>
860 * module.c (write_common_0): Use the name of the symtree rather
861 than the common block, to determine if the common has been
864 2009-01-05 Daniel Franke <franke.daniel@gmail.com>
867 * check.c (gfc_check_random_seed): Added size check for GET
868 dummy argument, reworded error messages to follow common pattern.
870 2009-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
873 * trans-types.c (gfc_get_derived_type): Check for the
874 presence of derived->ns->proc_name before
875 accessing derived->ns->proc_name->attr.flavor .
876 * resolve.c (resolve_symbol): Likewise.
878 2009-01-05 Paul Thomas <pault@gcc.gnu.org>
881 * gfortran.h : Add bit to gfc_expr 'user_operator'
882 * interface.c (gfc_extend_expr): Set the above if the operator
883 is substituted by a function.
884 * resolve.c (check_host_association): Return if above is set.
886 2009-01-04 Mikael Morin <mikael.morin@tele2.fr>
889 * ChangeLog-2008: Fix function name.
892 * dependency.c (gfc_check_argument_var_dependency):
893 Move the check for pointerness inside the if block
894 so that it doesn't affect the return value.
897 * trans-stmt.c (gfc_trans_call):
898 Add the dependency code after the loop bounds calculation one.
900 2009-01-04 Daniel Franke <franke.daniel@gmail.com>
902 * intrinsic.c (do_simplify): Removed already implemented TODO.
904 2009-01-04 Daniel Franke <franke.daniel@gmail.com>
907 * simplify.c (gfc_simplify_merge): New.
908 * intrinsic.h (gfc_simplify_merge): New prototype.
909 * intrinsic.c (add_functions): Added simplification for MERGE.
911 2009-01-04 Mikael Morin <mikael.morin@tele2.fr>
914 * gfortran.h (gfc_is_data_pointer): Added prototype
915 * resolve.c (gfc_iso_c_func_interface):
916 Use gfc_is_data_pointer to test for pointer attribute.
917 * dependency.c (gfc_is_data_pointer):
918 Support pointer-returning functions.
920 2009-01-03 Daniel Franke <franke.daniel@gmail.com>
922 * symbol.c (save_symbol): Don't SAVE function results.
924 2009-01-03 Paul Thomas <pault@gcc.gnu.org>
927 * resolve.c (resolve_call): When searching for proper host
928 association, use symtree rather than symbol. For everything
929 except generic subroutines, substitute the symtree in the call
930 rather than the symbol.
933 Copyright (C) 2009 Free Software Foundation, Inc.
935 Copying and distribution of this file, with or without modification,
936 are permitted in any medium without royalty provided the copyright
937 notice and this notice are preserved.