1 2012-11-16 Janus Weil <janus@gcc.gnu.org>
4 * resolve.c (resolve_typebound_intrinsic_op): Only add typebound
5 operators to the operator list in the namespace of the derived type.
7 2012-11-12 Jan Hubicka <jh@suse.cz>
9 * f95-lang.c (ATTR_NOTHROW_LEAF_MALLOC_LIST): New macro.
10 (gfc_define_builtin): Use set_call_expr_flags.
11 (gfc_init_builtin_functions): Update.
13 2012-11-12 Tobias Burnus <burnus@net-b.de>
16 * module.c (mio_array_spec): Correctly handle coarray
19 2012-11-07 Tobias Schlüter <tobi@gcc.gnu.org>
22 * module.c (sorted_pointer_info): New.
23 (gfc_get_sorted_pointer_info): New.
24 (free_sorted_pointer_info_tree): New.
25 (compare_sorted_pointer_info): New.
26 (find_symbols_to_write): New.
27 (write_symbol1_recursion): New.
28 (write_symbol1): Collect symbols that need writing, output in order.
29 (write_generic): Traverse tree in order.
31 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
34 * options.c (set_Wall): Do not set warn_switch here.
36 2012-11-06 Janus Weil <janus@gcc.gnu.org>
39 * target-memory.c (gfc_target_expr_size,gfc_target_interpret_expr):
41 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Add support for
42 polymorphic arguments.
44 2012-11-04 Janus Weil <janus@gcc.gnu.org>
47 * primary.c (gfc_match_varspec): Clear typespec if it cannot be
48 determined at this point.
50 2012-10-31 Janus Weil <janus@gcc.gnu.org>
53 * trans.h (GFC_DECL_PUSH_TOPLEVEL): Removed.
54 * trans-decl.c (gfc_get_symbol_decl,gfc_generate_function_code): Remove
55 GFC_DECL_PUSH_TOPLEVEL.
56 (build_function_decl): Do not push __copy procedure to toplevel.
58 2012-10-31 Tobias Burnus <burnus@net-b.de>
61 * trans-array.c (gfc_conv_array_parameter): Regard AS_DEFERRED as
62 array with descriptor.
64 2012-10-28 Tobias Burnus <burnus@net-b.de>
67 * gfortran.h (gfc_resolve_iterator_expr,
68 gfc_check_vardef_context): Update prototype.
69 * expr.c (gfc_check_vardef_context): Add own_scope
70 argument and honour it.
71 * resolve.c (gfc_resolve_iterator_expr): Add own_scope
72 argument and honour it.
73 (resolve_deallocate_expr, resolve_allocate_expr,
74 resolve_data_variables, resolve_transfer
75 resolve_lock_unlock, resolve_code): Update calls.
76 * array.c (resolve_array_list): Ditto.
77 * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
78 * interface.c (compare_actual_formal): Ditto.
79 * intrinsic.c (check_arglist): Ditto.
80 * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): Ditto.
82 2012-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
84 * trans.c (gfc_allocate_allocatable): Revert accidental
87 2012-10-24 Janus Weil <janus@gcc.gnu.org>
90 * trans-expr.c (gfc_conv_procedure_call): Move a piece of code and
93 2012-10-21 Tobias Burnus <burnus@net-b.de>
96 * Make-lang.in (CFLAGS-cpp.o): Use TARGET_SYSTEM_ROOT_DEFINE.
97 * cpp.o (gfc_cpp_init_options): Use it for
98 setting gfc_cpp_option.sysroot.
100 2012-10-21 Thomas König <tkoenig@gcc.gnu.org>
103 * lang.opt (Wextra): Add.
104 * invoke.texi: Document that -Wc-binding-type, -Wconversion
105 and -Wline-truncation are implied by -Wall. Document that
106 -Wcompare-reals is implied by -Wextra. Document -Wextra.
107 * options.c (set_Wextra): New function.
108 (gfc_handle_option): Handle -Wextra.
110 2012-10-19 Janus Weil <janus@gcc.gnu.org>
113 * trans-expr.c (conv_function_val): Set TREE_USED.
115 2012-10-18 Tobias Burnus <burnus@net-b.de>
118 * resolve.c (specification_expr): Change to bool.
119 (resolve_formal_arglist, resolve_symbol): Set
120 specification_expr to true before resolving the array spec.
121 (resolve_variable, resolve_charlen, resolve_fl_variable):
122 Properly reset specification_expr.
123 (resolve_function): Set public_use when used in
124 a specification expr.
126 2012-10-16 Tobias Burnus <burnus@net-b.de>
130 * trans.h (gfc_conv_derived_to_class, gfc_conv_class_to_class):
132 * trans-stmt.c (trans_associate_var,gfc_trans_allocate): Update
133 calls to those functions.
134 * trans-expr.c (gfc_conv_derived_to_class, gfc_conv_class_to_class,
135 gfc_conv_expr_present): Handle absent polymorphic arguments.
136 (class_scalar_coarray_to_class): New function.
137 (gfc_conv_procedure_call): Update calls.
139 2012-10-12 Janus Weil <janus@gcc.gnu.org>
142 * interface.c (check_dummy_characteristics): Recursively check dummy
145 2012-10-11 Janus Weil <janus@gcc.gnu.org>
148 * trans-stmt.c (gfc_trans_allocate): Correctly determine the reference
149 to the _data component for polymorphic allocation with SOURCE.
151 2012-10-06 Janus Weil <janus@gcc.gnu.org>
154 * resolve.c (resolve_fl_derived0): Correctly copy the 'class_ok'
155 attribute for proc-ptr components with RESULT variable.
157 2012-10-06 Janus Weil <janus@gcc.gnu.org>
160 * interface.c (generic_correspondence): Implement additional
161 distinguishability criteria of F08.
162 (compare_actual_formal): Reject data object as actual argument for
163 procedure formal argument.
165 2012-10-04 Tobias Burnus <burnus@net-b.de>
167 * expr.c (scalarize_intrinsic_call): Plug memory leak.
168 * frontend-passes.c (gcc_assert): Extend assert.
169 * interface.c (gfc_compare_derived_types): Fix comparison.
170 (gfc_check_operator_interface): Move up to make this error
172 (get_sym_storage_size): Remove always-true checks.
173 * io.c (format_lex): Add comment.
174 (gfc_free_wait): Free memory.
175 * match.c (gfc_match_select_type): Ditto.
176 * matchexpr.c (match_level_3): Ditto.
177 * primary.c (match_string_constant): Ditto.
178 (match_actual_arg): Check return value.
179 * resolve.c (gfc_resolve_substring_charlen,
180 resolve_typebound_generic_call, resolve_typebound_function,
181 resolve_typebound_subroutine): Free memory.
182 * trans-types.c (gfc_get_derived_type): Remove always-true check.
184 2012-10-02 Janus Weil <janus@gcc.gnu.org>
187 * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
189 2012-09-30 Janus Weil <janus@gcc.gnu.org>
192 * intrinsic.texi (C_F_POINTER): Fix description.
193 * resolve.c (gfc_iso_c_sub_interface): Add a check for FPTR argument
194 of C_F_POINTER. Modify two error messages. Cleanup.
196 2012-09-24 Tobias Burnus <burnus@net-b.de>
200 * trans-expr.c (gfc_conv_procedure_call): Fix INTENT(OUT)
201 handling for allocatable BT_CLASS.
203 2012-09-24 Lawrence Crowl <crowl@google.com>
205 * trans-expr.c (gfc_conv_cst_int_power): Change to new double_int API.
206 * target-memory.c (gfc_interpret_logical): Likewise.
208 2012-09-23 Tobias Burnus <burnus@net-b.de>
210 * parse.c (parse_derived): Don't set attr.alloc_comp
211 for pointer components with allocatable subcomps.
214 * resolve.c (resolve_fl_namelist): Remove superfluous
216 * simplify.c (simplify_min_max): Remove unreachable code.
217 * trans-array.c (gfc_trans_create_temp_array): Change
218 a condition into an assert.
221 * trans-expr.c (gfc_trans_class_init_assign): Guard
222 re-setting of the _data by gfc_conv_expr_present.
223 (gfc_conv_procedure_call): Fix INTENT(OUT) handling
224 for allocatable BT_CLASS.
226 2012-09-22 Thomas König <tkoenig@gcc.gnu.org>
229 * dependency.c (gfc_dep_compare_expr): Clarify logic,
232 2012-09-20 Tobias Burnus <burnus@net-b.de>
235 * cpp.c (print_line): Properly handle extern C.
237 2012-09-20 Martin Jambor <mjambor@suse.cz>
239 * trans-decl.c (gfc_get_extern_function_decl): Push NULL cfun. Do not
240 set and restore current_function_decl.
241 (gfc_init_coarray_decl): Do not set and restore current_function_decl.
243 2012-09-17 Tobias Burnus <burnus@net-b.de>
246 * simplify.c (gfc_simplify_scan, gfc_simplify_verify):
247 Fix handling of BACK=variable.
249 2012-09-17 Janus Weil <janus@gcc.gnu.org>
252 * expr.c (gfc_check_pointer_assign): Correctly handle procedure pointers
254 * primary.c (gfc_match_varspec): Allow to call a PPC with proc-ptr
257 2012-09-17 Tobias Burnus <burnus@net-b.de>
260 * trans-expr.c (gfc_trans_subcomponent_assign): Handle
261 proc-pointer components.
263 2012-09-17 Tobias Burnus <burnus@net-b.de>
266 * error.c (error_print): Move increment out of the assert.
267 * interface.c (gfc_compare_derived_types): Add assert.
268 (get_expr_storage_size): Remove always-true logical condition.
269 * resolve.c (resolve_allocate_expr): Fix looping logic.
270 * target-memory.c (gfc_target_expr_size): Add assert.
272 2012-09-16 Janus Weil <janus@gcc.gnu.org>
275 * resolve.c (get_checked_tb_operator_target): Add a reference to the
276 relevant quote from the F08 standard.
278 2012-09-16 Janus Weil <janus@gcc.gnu.org>
281 * interface.c (compare_type_rank): Handle CLASS arrays.
283 2012-09-16 Janus Weil <janus@gcc.gnu.org>
286 * expr.c (gfc_check_pointer_assign): Check for result of embracing
289 2012-09-16 Tobias Burnus <burnus@net-b.de>
291 * trans-decl.c (gfc_generate_function_code): Fix
292 gfc_option.coarray check.
293 * trans-stmt.c (compute_inner_temp_size): Fix handling
294 of gfc_option.rtcheck.
296 2012-09-16 Mikael Morin <mikael@gcc.gnu.org>
298 * symbol.c (gfc_undo_symbols): Correctly undo namelists.
300 2012-09-15 Tobias Burnus <burnus@net-b.de>
302 * trans-io.c (gfc_trans_transfer): Add an assert.
304 2012-09-15 Tobias Burnus <burnus@net-b.de>
306 * arith.c (arith_power): Call gfc_free_expr in case of error.
307 * array.c (gfc_match_array_constructor): Initialize variable.
308 (gfc_resolve_character_array_constructor): Remove superfluous check.
309 (gfc_array_dimen_size): Add assert.
310 * check.c (numeric_check): Fix implicit typing.
311 * class.c (gfc_build_class_symbol): Add assert.
312 (finalize_component): Free memory.
313 * dump-parse-tree.c (show_namespace): Add assert.
314 * trans-io.c (transfer_namelist_element, transfer_expr): Avoid
316 (gfc_trans_transfer): Add assert.
317 * trans.c (gfc_trans_runtime_check): Call va_end
319 2012-09-15 Tobias Burnus <burnus@net-b.de>
321 * match.c (lock_unlock_statement, sync_statement): Fix potential
323 (sync_statement): Remove unreachable code.
324 * simplify.c (gfc_simplify_bessel_n2): Avoid double freeing.
325 (gfc_simplify_repeat): Remove bogus code.
326 * target-memory.h (gfc_target_encode_expr): Update prototype.
327 * target-memory.c (gfc_target_encode_expr, encode_array,
328 encode_derived): Return unsigned HOST_WIDE_INT.
329 (gfc_target_interpret_expr): Add assert.
330 (gfc_merge_initializers): Fix "== 0" check for mpz_t.
331 * symbol.c (gfc_get_typebound_proc): Add assert.
332 (gfc_merge_initializers): Remove unreachable check.
334 2012-09-13 Tobias Burnus <burnus@net-b.de>
337 * resolve.c (resolve_formal_arglist): Allow VALUE arguments
339 (gfc_impure_variable): Don't check gfc_pure such that the
340 function also works for gfc_implicit_pure procedures.
342 2012-09-12 Tobias Burnus <burnus@net-b.de>
346 * array.c (match_subscript, gfc_match_array_ref): Fix
347 diagnostic of coarray's '*'.
349 2012-09-07 Mikael Morin <mikael@gcc.gnu.org>
352 * simplify.c (simplify_bound_dim): Resolve array spec before
353 proceeding with simplification.
355 2012-09-06 Tobias Burnus <burnus@net-b.de>
358 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Fix matmul
359 call to BLAS if the default-kind has been promoted.
361 2012-09-05 Tobias Burnus <burnus@net-b.de>
364 * symbol.c (gfc_undo_symbols): Avoid NULL pointer dereference.
366 2012-09-04 Janus Weil <janus@gcc.gnu.org>
370 * match.c (gfc_match_select_type): Make sure to only access CLASS_DATA
373 2012-09-03 Tobias Burnus <burnus@net-b.de>
376 * class.c (gfc_find_derived_vtab): Fix disabling of _final
377 by continuing to generate normal type-bound procedures.
379 2012-09-03 Tobias Burnus <burnus@net-b.de>
381 * class.c (gfc_find_derived_vtab): Disable ABI-breaking
382 generation of the "_final" subroutine for now.
384 2012-09-03 Tobias Burnus <burnus@net-b.de>
386 * class.c (finalize_component): Fixes to the comment.
388 2012-09-03 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
389 Tobias Burnus <burnus@net-b.de>
392 * gfortran.h (symbol_attribute): Add artificial.
393 * module.c (mio_symbol_attribute): Handle attr.artificial
394 * class.c (gfc_build_class_symbol): Defer creation of the vtab
395 if the DT has finalizers, mark generated symbols as
397 (has_finalizer_component, finalize_component,
398 finalization_scalarizer, generate_finalization_wrapper):
399 New static functions.
400 (gfc_find_derived_vtab): Add _final component and call
401 generate_finalization_wrapper.
402 * dump-parse-tree.c (show_f2k_derived): Use resolved
403 proc_tree->n.sym rather than unresolved proc_sym.
404 (show_attr): Handle attr.artificial.
405 * resolve.c (gfc_resolve_finalizers): Ensure that the vtab exists.
406 (resolve_fl_derived): Resolve finalizers before
408 (resolve_symbol): Also allow assumed-rank arrays with CONTIGUOUS;
409 skip artificial symbols.
410 (resolve_fl_derived0): Skip artificial symbols.
412 2012-09-02 Tobias Burnus <burnus@net-b.de>
415 * symbol.c (find_common_symtree): New function.
416 (gfc_undo_symbols): Use it; free common_head if needed.
418 2012-08-28 Tobias Burnus <burnus@net-b.de>
421 * trans-decl.c (gfc_get_extern_function_decl,
422 build_function_decl): Don't mark impure elemental
423 functions as DECL_PURE_P and honour implicit_pure.
425 2012-08-28 Tobias Burnus <burnus@net-b.de>
428 * error.c (show_locus): Avoid out of bound access.
430 2012-08-28 Tobias Burnus <burnus@net-b.de>
433 * decl.c (match_data_constant): Add missing gfc_free_expr.
434 (top_val_list): Remove always-true condition.
435 * data.c (get_array_index, create_character_initializer):
436 Free temporary expressions.
437 (gfc_assign_data_value): Free expression when aborting.
439 2012-08-28 Tobias Burnus <burnus@net-b.de>
442 * symbol.c (gfc_copy_formal_args): Set also sym->formal_ns.
444 2012-08-27 Tobias Burnus <burnus@net-b.de>
447 * resolve.c (gfc_resolve_character_operator): Free temporary
449 * trans-expr.c (gfc_conv_statement_function): Ditto.
451 2012-08-27 Tobias Burnus <burnus@net-b.de>
454 * dependency.c (check_section_vs_section): Use gfc_free_expr
456 * trans-intrinsic.c (conv_generic_with_optional_char_arg): Use
457 gfc_free_symbol instead of free.
459 2012-08-27 Tobias Burnus <burnus@net-b.de>
462 * trans-expr.c (gfc_trans_arrayfunc_assign): Free se.ss
465 2012-08-27 Tobias Burnus <burnus@net-b.de>
468 * gfortran.h (gfc_common_head): Add "int refs".
469 * match.c (gfc_match_common): Increment refs.
470 * resolve.c (resolve_symbol): Only increment formal_ns->refs
471 if formal_ns is not sym->ns.
472 * symbol.c (gfc_free_symbol): Only free formal_ns if
473 if formal_ns is not sym->ns. Free common_block if refs is one.
474 (gfc_release_symbol): Release formal_ns only if the
475 symbol is not ENTRY of a module.
476 * decl.c (get_proc_name): Don't increment gfc_current_ns->refs.
477 * parse.c (parse_interface): Incement proc_unit->refs++ for
478 proc-pointer result variables.
479 * module.c (mio_symbol): Don't increase sym->refs for its
480 use in sym->formal_ns->proc_name.
482 2012-08-27 Tobias Burnus <burnus@net-b.de>
485 * trans-stmt.c (gfc_trans_do_while): Don't change the logical
486 kind for negation of the condition.
488 2012-08-27 Tobias Burnus <burnus@net-b.de>
490 * options.c (set_Wall): Don't set for -Wcompare-reals.
491 * invoke.texi (-Wall, -Wcompare-reals): -Wall no longer
492 implies -Wcompare-reals.
494 2012-08-24 Simon Baldwin <simonb@google.com>
496 * lang.opt (-cpp=): Mark flag NoDWARFRecord.
498 2012-08-23 Tobias Burnus <burnus@net-b.de>
501 * trans-array.c (free_ss_info): Free data.array.subscript.
502 (gfc_free_ss): No longer free data.array.subscript.
503 (walk_coarray): New function, moved from trans-intrinsic.c
504 (gfc_conv_expr_descriptor): Walk array descriptor instead
505 of taking passed "ss".
506 (get_array_ctor_all_strlen, gfc_add_loop_ss_code,
507 gfc_conv_array_parameter): Update call and cleanup ss handling.
508 * trans-array.h (gfc_conv_expr_descriptor,
509 gfc_conv_array_parameter): Update prototype.
510 * trans-expr.c (gfc_conv_derived_to_class,
511 conv_isocbinding_procedure, gfc_conv_procedure_call,
512 gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
513 gfc_trans_pointer_assignment, gfc_trans_arrayfunc_assign): Update
514 call to gfc_conv_expr_descriptor and gfc_conv_array_parameter, and
516 * trans-intrinsic.c (walk_coarray): Moved to trans-array.c
517 (trans_this_image, trans_image_index, gfc_conv_intrinsic_rank
518 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_cobound,
519 gfc_conv_intrinsic_len, gfc_conv_intrinsic_size,
520 gfc_conv_intrinsic_sizeof, gfc_conv_intrinsic_storage_size,
521 gfc_conv_intrinsic_transfer, gfc_conv_allocated,
522 gfc_conv_associated, gfc_conv_intrinsic_loc,
523 conv_intrinsic_move_alloc): Update calls.
524 * trans-io.c (gfc_convert_array_to_string, set_internal_unit,
525 gfc_trans_transfer): Ditto.
526 * trans-stmt.c (gfc_conv_elemental_dependencies,
527 gfc_trans_sync, trans_associate_var,
528 gfc_trans_pointer_assign_need_temp): Ditto.
530 2012-08-23 Jakub Jelinek <jakub@redhat.com>
532 * trans-decl.c (trans_function_start, generate_coarray_init,
533 create_main_function, gfc_generate_constructors): Call
534 allocate_struct_function instead of init_function_start.
536 2012-08-22 Tobias Burnus <burnus@net-b.de>
538 * trans-expr.c (gfc_copy_class_to_class,
539 gfc_trans_arrayfunc_assign): Free loop and ss data.
540 * trans-intrinsic.c (gfc_trans_arrayfunc_assign): Free ss data.
542 2012-08-21 Tobias Burnus <burnus@net-b.de>
544 * parse.c (parse_contained): Include EXEC_END_PROCEDURE
545 in ns->code to make sure the gfc_code is freed.
547 2012-08-20 Tobias Burnus <burnus@net-b.de>
550 * expr.c (gfc_check_pointer_assign): Warn when a pointer,
551 which is a function result, might outlive its target.
553 2012-08-20 Tobias Burnus <burnus@net-b.de>
556 * expr.c (gfc_check_pointer_assign): Warn when the pointer
557 might outlive its target.
558 * gfortran.h (struct gfc_option_t): Add warn_target_lifetime.
559 * options.c (gfc_init_options, set_wall, gfc_handle_option):
561 * invoke.texi (-Wtarget-lifetime): Document it.
563 * lang.opt (-Wtarget-lifetime): New flag.
565 2012-08-19 Thomas König <tkoenig@gcc.gnu.org>
568 * gfortran.h (struct gfc_option_t): Add warn_compare_reals.
569 * lang.opt: Add Wcompare-reals.
570 * invoke.texi: Document -Wcompare-reals.
571 * resolve.c (resolve_operator): If -Wcompare-reals is in effect,
572 warn about equality/inequality comparisions for REAL and COMPLEX.
573 * options.c (gfc_init_options): Set warn_compare_reals.
574 (set_Wall): Include warn_compare_reals in Wall.
575 (gfc_handle_option): Handle Wcompare_reals.
577 2012-08-17 Jakub Jelinek <jakub@redhat.com>
579 * array.c (gfc_match_array_ref): Fix up memset arguments.
581 2012-08-16 Diego Novillo <dnovillo@google.com>
586 * gfortran.h: Do not include gmp.h.
588 2012-08-16 Diego Novillo <dnovillo@google.com>
591 * gfortran.h: Do not include gmp.h.
593 2012-08-15 Janus Weil <janus@gcc.gnu.org>
597 * resolve.c (check_typebound_baseobject): Check for class_ok attribute.
598 (resolve_procedure_interface,resolve_fl_derived0): Copy class_ok
601 2012-08-14 Mikael Morin <mikael@gcc.gnu.org>
604 * trans-expr.c (expr_is_variable): Handle regular, procedure pointer,
605 and typebound functions returning a data pointer.
607 2012-08-14 Mikael Morin <mikael@gcc.gnu.org>
609 * decl.c (match_ppc_decl): Copy the procedure interface's symbol
610 as procedure interface's result.
612 2012-08-14 Mikael Morin <mikael@gcc.gnu.org>
614 * trans-expr.c (gfc_trans_scalar_assign): Rename argument,
617 2012-08-14 Mikael Morin <mikael@gcc.gnu.org>
619 * gfortran.h (gfc_get_proc_ptr_comp): New prototype.
620 (gfc_is_proc_ptr_comp): Update prototype.
621 * expr.c (gfc_get_proc_ptr_comp): New function based on the old
622 gfc_is_proc_ptr_comp.
623 (gfc_is_proc_ptr_comp): Call gfc_get_proc_ptr_comp.
624 (gfc_specification_expr, gfc_check_pointer_assign): Use
625 gfc_get_proc_ptr_comp.
626 * trans-array.c (gfc_walk_function_expr): Likewise.
627 * resolve.c (resolve_structure_cons, update_ppc_arglist,
628 resolve_ppc_call, resolve_expr_ppc): Likewise.
629 (resolve_function): Update call to gfc_is_proc_ptr_comp.
630 * dump-parse-tree.c (show_expr): Likewise.
631 * interface.c (compare_actual_formal): Likewise.
632 * match.c (gfc_match_pointer_assignment): Likewise.
633 * primary.c (gfc_match_varspec): Likewise.
634 * trans-io.c (gfc_trans_transfer): Likewise.
635 * trans-expr.c (gfc_conv_variable, conv_function_val,
636 conv_isocbinding_procedure, gfc_conv_procedure_call,
637 gfc_trans_pointer_assignment): Likewise.
638 (gfc_conv_procedure_call, gfc_trans_array_func_assign):
639 Use gfc_get_proc_ptr_comp.
641 2012-08-14 Tobias Burnus <burnus@net-b.de>
644 * error.c (gfc_notify_std): Reset cur_error_buffer->flag flag
645 when the error/warning has been printed.
646 * gfortran.h (gfc_sl_type): Add ST_LABEL_DO_TARGET.
647 * match.c (gfc_match_do): Use ST_LABEL_DO_TARGET.
648 * parse.c (check_statement_label): Use ST_LABEL_DO_TARGET.
649 (parse_executable): Add obsolescence check for DATA.
650 * resolve.c (resolve_branch): Handle ST_LABEL_DO_TARGET.
651 * symbol.c (gfc_define_st_label, gfc_reference_st_label):
652 Add obsolescence diagnostics.
653 * trans-stmt.c (gfc_trans_label_assign): Handle ST_LABEL_DO_TARGET.
655 2012-08-14 Tobias Burnus <burnus@net-b.de>
658 * check.c (gfc_check_cmplx): Add -Wconversion warning
659 when converting higher-precision REAL to default-precision
660 CMPLX without kind= parameter.
662 2012-08-12 Tobias Burnus <burnus@net-b.de>
665 * trans-decl.c (gfc_finish_var_decl, build_function_decl):
666 Fix setting private module vars/procs as TREE_PUBLIC(...) = 0.
668 2012-08-09 Tobias Burnus <burnus@net-b.de>
671 * intrinsic.c (gfc_warn_intrinsic_shadow): Better warning
672 for internal procedures.
674 2012-08-06 Janus Weil <janus@gcc.gnu.org>
677 * interface.c (check_result_characteristics): New function, which checks
678 the characteristics of function results.
679 (gfc_compare_interfaces,gfc_check_typebound_override): Call it.
681 2012-08-02 Thomas König <tkoenig@gcc.gnu.org>
684 * scanner.c (add_path_to_list): New argument warn. Don't
686 (gfc_add_include_path): Warn if directory is missing.
687 (gfc_add_intrinsic_modules_path): Do not warn if directory
689 * optinons.c (gfc_handle_option): Do not add directory
690 for intrinsic modules to normal include path.
692 2012-08-03 Mikael Morin <mikael@gcc.gnu.org>
695 * trans-array.c (set_loop_bounds): Access specinfo using spec_dim.
697 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
700 * trans-array.c (gfc_conv_ss_startstride): Set the intrinsic
701 result's lower and upper bounds according to the rank.
702 (set_loop_bounds): Set the loop upper bound in the intrinsic case.
704 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
706 * trans-array.c (set_loop_bounds): Allow non-array-section to be
707 chosen using the stride and lower bound criteria.
709 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
711 * trans-array.c (set_loop_bounds): Remove useless dimension check.
712 Don't update loopspec if it would loose the wanted stride criterion.
714 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
716 * trans-array.h (gfc_conv_descriptor_rank): New prototype.
717 * trans-array.c (gfc_conv_descriptor_rank): New function moved and
719 * trans-intrinsic.c (get_rank_from_desc): ... from this one.
720 (gfc_conv_intrinsic_rank, gfc_conv_intrinsic_bound,
721 gfc_conv_associated): Also rename function calls.
723 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
725 * iresolve.c (resolve_bound, gfc_resolve_shape):
726 Don't set the shape for assumed rank arrays.
727 * simplify.c (gfc_simplify_shape): Don't try to simplify if the
728 argument is assumed rank.
730 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
732 * array.c (gfc_copy_array_ref): Don't copy the offset field.
733 * expr.c (find_array_section): Ignore the offset field.
734 * trans-expr.c (gfc_find_interface_mapping_to_ref): Don't apply
735 any interface mapping to the offset field.
736 * gfortran.h (struct gfc_array_ref): Remove the offset field.
738 2012-08-02 Janus Weil <janus@gcc.gnu.org>
741 * resolve.c (check_proc_interface): New routine for PROCEDURE interface
743 (resolve_procedure_interface,resolve_typebound_procedure,
744 resolve_fl_derived0): Call it.
746 2012-08-01 Thomas König <tkoenig@gcc.gnu.org>
749 * scanner.c (add_path_to_list): Emit warning if an error occurs
750 for an include path, if it is not present or if it is not a
751 directory. Do not add the path in these cases.
753 2012-07-31 Janus Weil <janus@gcc.gnu.org>
756 * decl.c (match_procedure_interface): Move some checks to
757 'resolve_procedure_interface'. Set flavor if appropriate.
758 * expr.c (gfc_check_pointer_assign): Cleanup of 'gfc_is_intrinsic'.
759 * intrinsic.c (gfc_is_intrinsic): Additional checks for attributes which
760 identify a procedure as being non-intrinsic.
761 * resolve.c (resolve_procedure_interface): Checks moved here from
762 'match_procedure_interface'. Minor cleanup.
763 (resolve_formal_arglist,resolve_symbol): Cleanup of
764 'resolve_procedure_interface'
765 (resolve_actual_arglist,is_external_proc): Cleanup of
768 2012-07-31 Janus Weil <janus@gcc.gnu.org>
771 * dependency.c (gfc_dep_compare_expr): Check if arguments are NULL.
773 2012-07-31 Tobias Burnus <burnus@net-b.de>
775 * interface.c (gfc_procedure_use): Return gfc_try instead of void.
776 * gfortran.h (gfc_procedure_use): Update prototype.
777 * resolve.c (gfc_iso_c_func_interface): Allow noninteroperable
778 procedures for c_funloc for TS29113.
779 * (gfc_iso_c_sub_interface): Ditto for c_f_procpointer. Add
780 diagnostic for c_ptr vs. c_funptr for c_f_(proc)pointer.
782 2012-07-30 Janus Weil <janus@gcc.gnu.org>
785 * gfortran.h (gfc_resolve_intrinsic): Add prototype.
786 * expr.c (gfc_check_pointer_assign): Set INTRINSIC attribute if needed.
787 Check for invalid intrinsics.
788 * primary.c (gfc_match_rvalue): Check for intrinsics came too early.
789 Set procedure flavor if appropriate.
790 * resolve.c (resolve_intrinsic): Renamed to gfc_resolve_intrinsic.
791 (resolve_procedure_interface,resolve_procedure_expression,
792 resolve_function,resolve_fl_derived0,resolve_symbol): Ditto.
794 2012-07-26 Mikael Morin <mikael@gcc.gnu.org>
797 * trans-array.c (gfc_trans_array_constructor_value):
798 Evaluate the iteration bounds before the inner variable shadows
801 2012-07-26 Mikael Morin <mikael@gcc.gnu.org>
804 * array.c (sought_symbol): New variable.
805 (expr_is_sought_symbol_ref, find_symbol_in_expr): New functions.
806 (resolve_array_list): Check for references to the induction
807 variable in the iteration bounds and issue a diagnostic if some
810 2012-07-26 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
811 Tobias Burnus <burnus@net-b.de>
813 * module.c (mio_array_spec): Don't read as->lower for
816 2012-07-25 Tobias Burnus <burnus@net-b.de>
818 * trans-types.c (gfc_real16_is_float128): Fix spelling
820 * trans.h (struct gfc_array_info): Ditto.
821 * gfortran.h (gfc_expr): Ditto.
822 * simplify.c (gfc_count): Ditto.
823 * trans-expr.c (gfc_copy_class_to_class,
824 conv_parent_component_references,
825 gfc_trans_pointer_assignment): Ditto.
826 * expr.c (check_pointer_assign): Fix diagnostic spelling.
827 * interface.c (compare_parameter): Ditto.
828 * parse.c (use_modules, parse_associate): Ditto.
829 * decl.c (match_char_length): Fix spelling of the
830 an function argument.
832 2012-07-21 Tobias Burnus <burnus@net-b.de>
834 * iso-c-binding.def (C_PTRDIFF_T): New TS29113 parameter.
835 * intrinsic.texi (ISO_C_BINDING): Document it.
837 2012-07-21 Tobias Burnus <burnus@net-b.de>
840 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Support
841 lbound/ubound with dim= for assumed-rank arrays.
842 * array.c (gfc_set_array_spec): Reject coarrays with
844 * decl.c (merge_array_spec): Ditto. Return gfc_try.
845 (match_attr_spec, match_attr_spec): Update call.
847 2012-07-21 Tobias Burnus <burnus@net-b.de>
849 * resolve.c (resolve_formal_arglist): Put variable
850 declaration before the first assignment.
852 2012-07-21 Tobias Burnus <burnus@net-b.de>
854 * trans-expr.c (gfc_conv_derived_to_class): Fix argument passed
855 to class_array_data_assign.
857 2012-07-20 Tobias Burnus <burnus@net-b.de>
859 * decl.c (gfc_verify_c_interop_param): Allow assumed-shape
862 2012-07-20 Tobias Burnus <burnus@net-b.de>
865 * array.c (match_array_element_spec, gfc_match_array_spec,
866 spec_size, gfc_array_dimen_size): Add support for
868 * check.c (dim_rank_check): Ditto.
869 * class.c (gfc_add_component_ref): Ditto.
870 (gfc_build_class_symbol): Regard assumed-rank arrays
871 as having GFC_MAX_DIMENSIONS. And build extra class
872 container for a scalar pointer class.
873 * decl.c (merge_array_spec): Add assert.
874 * dump-parse-tree.c (show_array_spec): Add support for
876 * expr.c (gfc_is_simply_contiguous): Ditto.
877 * gfortran.h (array_type): Ditto.
878 (gfc_array_spec, gfc_expr): Add comment to "rank" field.
879 * interface.c (compare_type_rank, argument_rank_mismatch,
880 compare_parameter, gfc_procedure_use): Ditto.
881 (compare_actual_formal): Fix NULL() to optional-dummy
882 handling for polymorphic dummies.
883 * module.c (mio_typespec): Add support for
885 * resolve.c (resolve_formal_arglist, resolve_actual_arglist,
886 resolve_elemental_actual, resolve_global_procedure,
887 expression_shape, resolve_variable, update_ppc_arglist,
888 check_typebound_baseobject, gfc_resolve_expr,
889 resolve_fl_var_and_proc, gfc_resolve_finalizers,
890 resolve_typebound_procedure, resolve_symbol): Ditto.
891 (assumed_type_expr_allowed): Remove static variable.
892 (actual_arg, first_actual_arg): New static variables.
893 * simplify.c (simplify_bound, gfc_simplify_range): Add
894 support for assumed-rank arrays.
895 * trans-array.c (gfc_conv_array_parameter): Ditto.
896 (gfc_get_descriptor_dimension): New function, which returns
898 (gfc_conv_descriptor_dimension): Use it.
899 (gfc_conv_descriptor_stride_get, gfc_conv_array_parameter):
900 Handle GFC_ARRAY_ASSUMED_RANK_CONT and AS_ASSUMED_RANK.
901 * trans-array.h (gfc_get_descriptor_dimension): New prototype.
902 * trans-decl. (gfc_build_dummy_array_decl,
903 gfc_trans_deferred_vars, add_argument_checking): Add
904 support for assumed-rank arrays.
905 * trans-expr.c (gfc_conv_expr_present, gfc_conv_variable,
906 gfc_conv_procedure_call): Ditto.
907 (get_scalar_to_descriptor_type, class_array_data_assign,
908 conv_scalar_to_descriptor): New static functions.
909 (gfc_conv_derived_to_class, gfc_conv_class_to_class): Use
911 * trans-intrinsic.c (get_rank_from_desc): New function.
912 (gfc_conv_intrinsic_rank, gfc_conv_associated): Use it.
913 * trans-types.c (gfc_array_descriptor_base_caf,
914 gfc_array_descriptor_base): Make space for scalar array.
915 (gfc_is_nodesc_array, gfc_is_nodesc_array,
916 gfc_build_array_type, gfc_get_array_descriptor_base): Add
917 support for assumed-rank arrays.
918 * trans.h (gfc_array_kind): Add GFC_ARRAY_ASSUMED_RANK and
919 GFC_ARRAY_ASSUMED_RANK_CONT.
921 2012-07-19 Tobias Burnus <burnus@net-b.de>
923 * trans-expr.c (gfc_conv_procedure_call): Fix handling
924 of polymorphic arguments.
925 * resolve.c (resolve_formal_arglist): Ditto, mark polymorphic
926 assumed-shape arrays as such.
928 2012-07-19 Tobias Burnus <burnus@net-b.de>
930 * interface.c (compare_parameter, compare_actual_formal): Fix
931 handling of polymorphic arguments.
933 2012-07-17 Janus Weil <janus@gcc.gnu.org>
936 * error.c (gfc_notify_std): Automatically print the relevant Fortran
938 * arith.c (arith_power): Remove explicit standard reference string.
939 * array.c (gfc_match_array_spec, gfc_match_array_constructor): Ditto.
940 * check.c (gfc_check_a_p, gfc_check_besn, gfc_check_count,
941 gfc_check_float, gfc_check_fn_rc2008, gfc_check_iand,
942 gfc_check_ichar_iachar, gfc_check_ieor, gfc_check_index, gfc_check_ior,
943 gfc_check_lbound, gfc_check_len_lentrim, check_rest, gfc_check_min_max,
944 gfc_check_null, gfc_check_scan, gfc_check_selected_real_kind,
945 gfc_check_shape, gfc_check_size, gfc_check_sngl, gfc_check_ubound,
946 gfc_check_verify): Ditto.
947 * data.c (gfc_assign_data_value): Ditto.
948 * decl.c (var_element, char_len_param_value, match_char_length,
949 gfc_verify_c_interop_param, match_pointer_init, variable_decl,
950 gfc_match_decl_type_spec, gfc_match_import, match_attr_spec,
951 gfc_match_prefix, gfc_match_suffix, match_ppc_decl,
952 match_procedure_in_interface, gfc_match_procedure,gfc_match_entry,
953 gfc_match_subroutine, gfc_match_end, gfc_match_codimension,
954 gfc_match_protected, gfc_match_value, gfc_match_volatile,
955 gfc_match_asynchronous, gfc_match_modproc, gfc_get_type_attr_spec,
956 gfc_match_enum, match_procedure_in_type): Ditto.
957 * expr.c (check_elemental, gfc_check_assign, gfc_check_pointer_assign):
959 * interface.c (gfc_match_abstract_interface, check_interface0): Ditto.
960 * intrinsic.c (gfc_intrinsic_func_interface): Ditto.
961 * io.c (format_lex, resolve_tag_format, resolve_tag,
962 compare_to_allowed_values, gfc_match_open, gfc_match_rewind,
963 gfc_resolve_dt, gfc_match_wait): Ditto.
964 * match.c (match_arithmetic_if, gfc_match_if, gfc_match_critical,
965 gfc_match_do, match_exit_cycle, gfc_match_pause, gfc_match_stop,
966 gfc_match_lock, sync_statement, gfc_match_assign, gfc_match_goto,
967 gfc_match_allocate, gfc_match_return, gfc_match_st_function): Ditto.
968 * module.c (gfc_match_use, gfc_use_module): Ditto.
969 * parse.c (parse_derived_contains, parse_block_construct,
970 parse_associate, parse_contained): Ditto.
971 * primary.c (match_hollerith_constant, match_boz_constant,
972 match_real_constant, match_sym_complex_part, match_arg_list_function,
973 build_actual_constructor, gfc_convert_to_structure_constructor): Ditto.
974 * resolve.c (resolve_formal_arglist, resolve_entries,
975 resolve_common_blocks, resolve_actual_arglist, gfc_resolve_index_1,
976 gfc_resolve_iterator_expr, resolve_ordinary_assign,
977 resolve_fl_var_and_proc, resolve_fl_variable_derived,
978 resolve_fl_procedure, resolve_fl_derived0, resolve_fl_derived,
979 resolve_fl_namelist, resolve_symbol, resolve_fntype): Ditto.
980 * symbol.c (check_conflict, conflict, gfc_add_is_bind_c,
981 gfc_add_extension, gfc_check_symbol_typed): Ditto.
983 2012-07-17 Tobias Burnus <burnus@net-b.de>
986 * decl.c (gfc_verify_c_interop_param): Make warning conditional
987 on -Wc-binding-type works and improve the wording.
989 2012-07-17 Tobias Burnus <burnus@net-b.de>
992 * decl.c (match_char_length): Extra argument, show obsolenscent
993 warning only if *length is used after the typename.
994 (variable_decl, gfc_match_char_spec): Update call
996 2012-07-17 Tobias Burnus <burnus@net-b.de>
997 Steven G. Kargl <kargl@gcc.gnu.org>
1000 * decl.c (match_procedure_in_interface): Support "::" for
1001 Fortran 2008 and later.
1003 2012-07-16 Thomas König <tkoenig@gcc.gnu.org>
1006 * resolve.c (resolve_allocate_deallocate): If both
1007 start indices are NULL, skip the test for equality.
1009 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1011 * f95-lang.c: Include dumpfile.h instead of tree-dump.h.
1012 * Make-lang.in: Fix dependencies.
1014 2012-07-16 Janus Weil <janus@gcc.gnu.org>
1017 * gfortran.h (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Modified
1019 * symbol.c (gfc_copy_formal_args): New argument 'if_src'. Copy if_source
1020 of dummy procedures.
1021 (gfc_copy_formal_args_ppc): Ditto.
1022 * resolve.c (resolve_procedure_interface): Pass IFSRC_DECL to
1023 gfc_copy_formal_args.
1024 (resolve_fl_derived0): Pass IFSRC_DECL to gfc_copy_formal_args_ppc.
1026 2012-07-12 Tobias Burnus <burnus@net-b.de>
1028 * trans-expr.c (conv_isocbinding_procedure): Generate c_f_pointer code
1031 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
1033 * trans.c: Do not include defaults.h.
1034 * trans-intrinsic.c: Likewise.
1036 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
1038 * gfortran.h: Do not include coretypes.h here.
1039 Make it an error to include this before coretypes.h
1040 * openmp.c: Include coretypes.h.
1041 * interface.c: Likewise.
1042 * intrinsic.c: Likewise.
1043 * symbol.c: Likewise.
1044 * class.c: Likewise.
1046 * matchexp.c: Likewise.
1047 * dump-parse-tree.c: Likewise.
1048 * array.c: Likewise.
1049 * constructor.c: Likewise.
1050 * error.c: Likewise.
1053 * module.c: Likewise.
1054 * scanner.c: Likewise.
1057 * frontend-passes.c: Likewise.
1058 * resolve.c: Likewise.
1060 * target-memory.c: Likewise.
1061 * match.c: Likewise.
1062 * arith.c: Likewise.
1063 * parse.c: Likewise.
1064 * check.c: Likewise.
1065 * dependency.c: Likewise.
1066 * primary.c: Likewise.
1068 * simplify.c: Likewise.
1070 2012-07-05 Mikael Morin <mikael@gcc.gnu.org>
1073 * trans-array.c (gfc_add_loop_ss_code): Disable self recursive calls
1074 handling nested loop(s) if the subscript flag is true.
1076 2012-07-05 Uros Bizjak <ubizjak@gmail.com>
1079 * parse.c (gfc_parse_file): Initialize errors_before.
1081 2012-06-27 Janus Weil <janus@gcc.gnu.org>
1085 * interface.c (check_new_interface): Rename, add 'loc' argument,
1087 (gfc_add_interface): Rename 'check_new_interface'
1088 * gfortran.h (gfc_check_new_interface): Add prototype.
1089 * resolve.c (resolve_typebound_intrinsic_op): Add typebound operator
1090 targets to non-typebound operator list.
1092 2012-06-22 Janus Weil <janus@gcc.gnu.org>
1096 * interface.c (count_types_test, generic_correspondence,
1097 gfc_compare_interfaces): Ignore PASS arguments.
1098 (check_interface1, compare_parameter): Pass NULL arguments to
1099 gfc_compare_interfaces.
1100 * gfortran.h (gfc_compare_interfaces): Modified prototype.
1101 * expr.c (gfc_check_pointer_assign): Pass NULL arguments to
1102 gfc_compare_interfaces.
1103 * resolve.c (resolve_structure_cons): Ditto.
1104 (check_generic_tbp_ambiguity): Determine PASS arguments and pass them
1105 to gfc_compare_interfaces.
1107 2012-06-21 Janne Blomqvist <jb@gcc.gnu.org>
1110 * iresolve.c (gfc_resolve_ftell): Fix result kind and use new
1113 2012-06-18 Tobias Burnus <burnus@net-b.de>
1115 * intrinsic.h (gfc_resolve_rank): New prototype.
1116 * intrinsic.c (add_functions): Use gfc_resolve_rank.
1117 * iresolve.c (add_functions): New function.
1118 * trans-intrinsic.c (gfc_conv_intrinsic_rank): New function.
1119 (gfc_conv_intrinsic_function): Call it.
1121 2012-06-18 Tobias Burnus <burnus@net-b.de>
1124 * trans-array.c (set_loop_bounds): Don't scalarize via absent
1126 * resolve.c (resolve_elemental_actual): Don't stop resolving after printing
1129 2012-06-18 Tobias Burnus <burnus@net-b.de>
1132 * trans-intrinsic.c (conv_intrinsic_move_alloc): Handle coarrays.
1134 2012-06-18 Tobias Burnus <burnus@net-b.de>
1137 * check.c (gfc_check_move_alloc): Reject coindexed actual arguments
1138 and those with different corank.
1140 2012-06-17 Tobias Burnus <burnus@net-b.de>
1144 * check.c (gfc_calculate_transfer_sizes): Return if
1145 SIZE= is not constant or source-size cannot be determined.
1147 2012-06-16 Tobias Burnus <burnus@net-b.de>
1151 * frontend-passes.c (optimize_assignment): Don't remove RHS's
1152 trim when assigning to a deferred-length string.
1153 * trans-expr.c (gfc_trans_assignment_1): Ensure that the RHS string
1154 length is evaluated before the deferred-length LHS is reallocated.
1156 2012-06-13 Tobias Burnus <burnus@net-b.de>
1159 * trans-decl.c (init_intent_out_dt): Fix for polymorphic arrays.
1160 * trans-array.c (structure_alloc_comps): Don't loop for
1163 2012-06-13 Tobias Burnus <burnus@net-b.de>
1166 * decl.c (match_attr_spec): Only mark module variables
1167 as SAVE_IMPLICIT for Fortran 2008 and later.
1169 2012-06-08 Janus Weil <janus@gcc.gnu.org>
1172 * match.c (gfc_match_allocate): Modify order of checks. Change wording
1173 of error message. Remove FIXME note.
1174 * resolve.c (resolve_allocate_expr): Add a comment.
1176 2012-06-07 Thomas König <tkoenig@gcc.gnu.org>
1179 * frontend-passes.c (optimize_assignment): Don't set the
1180 length of an empty string for deferred-length character
1183 2012-06-07 Thomas König <tkoenig@gcc.gnu.org>
1186 * frontend-passes.c (empty_string): Add prototype.
1187 (optimize_assignment): Set the length of an empty string
1190 2012-06-04 Tobias Burnus <burnus@net-b.de>
1193 * resolve.c (build_default_init_expr): Don't initialize
1196 2012-06-03 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1197 Tobias Burnus <burnus@net-b.de>
1200 * gfortran.h (gfc_check_init_expr): Add prototype declaration
1202 * check.c (kind_check): Change if condition to use
1203 to gfc_check_init_expr.
1204 * expr.c (check_init_expr): Remove forward declaration
1205 and static keyword. Change name in gfc_check_init_expr.
1206 (scalarize_intrinsic_call, check_init_expr_arguments,
1207 check_inquiry, check_conversion, gfc_reduce_init_expr): Update
1208 call to gfc_check_init_expr.
1210 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
1212 * trans-common.c: Do not include output.h.
1213 * trans-decl.c: Likewise.
1215 2012-05-31 Tobias Burnus <burnus@net-b.de>
1218 * trans.c (gfc_deallocate_scalar_with_status): Properly
1219 handle the case size == 0.
1221 2012-05-30 Tobias Burnus <burnus@net-b.de>
1224 * decl.c (match_attr_spec): Remove "typedef".
1226 2012-05-30 Tobias Burnus <burnus@net-b.de>
1228 * decl.c: Fix comment typos.
1230 * frontend-passes.c: Ditto.
1233 * trans-array.c: Ditto.
1234 * trans-common.c: Ditto.
1235 * trans-intrinsic.c: Ditto.
1236 * trans-types.c: Ditto.
1238 2012-05-23 Tobias Burnus <burnus@net-b.de>
1242 * match.c (gfc_match_allocate): Set length_from_typespec
1244 * resolve.c (resolve_charlen): If set, don't check whether
1245 the len is a specification expression.
1247 2012-05-22 Tobias Burnus <burnus@net-b.de>
1250 * trans-array.c (gfc_add_loop_ss_code): Don't evaluate expression, if
1251 ss->is_alloc_lhs is set.
1253 2012-05-22 Dodji Seketeli <dodji@redhat.com>
1256 * f95-lang.c (gfc_init_builtin_functions): Remove the unused
1257 typedef builtin_type.
1259 2012-05-14 Janne Blomqvist <jb@gcc.gnu.org>
1262 * gfortran.texi: Update _gfortran_set_options documentation.
1263 * invoke.texi: Remove runtime behavior description of
1265 * trans-decl.c (create_main_function): Don't pass the range-check
1266 setting to the library.
1268 2012-05-14 Tobias Burnus <burnus@net-b.de>
1273 * trans-expr.c (gfc_trans_assignment_1): Fix allocation
1274 handling for assignment of function results to allocatable
1275 deferred-length strings.
1276 * trans-decl.c (gfc_create_string_length): For deferred-length
1277 module variables, include module name in the assembler name.
1278 (gfc_get_symbol_decl): Don't override the assembler name.
1280 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
1283 * options.c (gfc_handle_option): Call lang-specific generated function.
1285 2012-05-13 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1286 Tobias Burnus <burnus@net-b.de>
1291 * resolve.c (resolve_fl_derived0): Deferred character length
1292 procedure components are supported.
1293 * trans-expr.c (gfc_conv_procedure_call): Handle TBP with
1294 deferred-length results.
1295 (gfc_string_to_single_character): Add a new check to prevent
1297 (gfc_conv_procedure_call): Remove unuseful checks on
1298 symbol's attributes. Add new checks to prevent NULL read on
1301 2012-05-12 Tobias Burnus <burnus@net-b.de>
1305 * resolve.c (resolve_fl_procedure): Don't regard
1306 character(len=:) as character(*) in the diagnostic.
1308 2012-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1311 * frontend-passes.c (optimize_op): Change
1312 old-style comparison operators to new-style, simplify
1314 (empty_string): New function.
1315 (get_len_trim_call): New function.
1316 (optimize_comparison): If comparing to an empty string,
1317 use comparison of len_trim to zero.
1318 Use new-style comparison operators only.
1319 (optimize_trim): Use get_len_trim_call.
1321 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
1324 * options.c: Include diagnostics.h instead of
1326 (set_Wall): Do not see warn_unused here.
1327 (gfc_handle_option): Set it here using handle_generated_option.
1329 2012-05-08 Jan Hubicka <jh@suse.cz>
1331 * trans-common.c (create_common): Do not fake TREE_ASM_WRITTEN.
1332 * trans-decl.c (gfc_finish_cray_pointee): Likewise.
1334 2012-05-07 Tobias Burnus <burnus@net-b.de>
1337 * resolve.c (resolve_typebound_static): Fix handling
1338 of overridden specific to generic operator.
1340 2012-05-06 Tobias Burnus <burnus@net-b.de>
1343 * decl.c (build_struct): Don't ignore FAILED status.
1345 2012-05-05 Paul Thomas <pault@gcc.gnu.org>
1348 * trans-array.c (build_array_ref): New static function.
1349 (gfc_conv_array_ref, gfc_get_dataptr_offset): Call it.
1350 * trans-expr.c (gfc_get_vptr_from_expr): New function.
1351 (gfc_conv_derived_to_class): Add a new argument for a caller
1352 supplied vptr and use it if it is not NULL.
1353 (gfc_conv_procedure_call): Add NULL to call to above.
1354 symbol.c (gfc_is_associate_pointer): Return true if symbol is
1356 * trans-stmt.c (trans_associate_var): Handle class associate-
1358 * expr.c (gfc_get_variable_expr): Supply the array-spec if
1360 * trans-types.c (gfc_typenode_for_spec): Set GFC_CLASS_TYPE_P
1362 * trans.h : Add prototypes for gfc_get_vptr_from_expr and
1363 gfc_conv_derived_to_class. Define GFC_CLASS_TYPE_P.
1364 * resolve.c (resolve_variable): For class arrays, ensure that
1365 the target expression has all the necessary _data references.
1366 (resolve_assoc_var): Throw a "not yet implemented" error for
1367 class array selectors that need a temporary.
1368 * match.c (copy_ts_from_selector_to_associate,
1369 select_derived_set_tmp, select_class_set_tmp): New functions.
1370 (select_type_set_tmp): Call one of last two new functions.
1371 (gfc_match_select_type): Copy_ts_from_selector_to_associate is
1372 called if associate-name is typed.
1375 * resolve.c (resolve_ref): C614 applied to class expressions.
1377 2012-05-05 Janne Blomqvist <jb@gcc.gnu.org>
1381 * intrinsic.texi (MOD, MODULO): Mention sign and magnitude of result.
1382 * simplify.c (gfc_simplify_mod): Use mpfr_fmod.
1383 (gfc_simplify_modulo): Likewise, use copysign to fix the result if
1385 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Remove fallback as
1386 builtin_fmod is always available. For modulo, call copysign to fix
1387 the result when signed zeros are enabled.
1389 2012-05-05 Janne Blomqvist <jb@gcc.gnu.org>
1391 * gfortran.texi (GFORTRAN_TMPDIR): Rename to TMPDIR, explain
1392 algorithm for choosing temp directory.
1394 2012-05-04 Tobias Burnus <burnus@net-b.de>
1397 * resolve.c (resolve_variable): Set public_used
1398 if a private module variable is used in a (public)
1399 specification expression.
1400 * trans-decl.c (gfc_finish_var_decl): Mark those
1403 2012-05-04 Tobias Burnus <burnus@net-b.de>
1406 * resolve.c (resolve_fl_derived): Fix -std=f95
1407 diagnostic for generic vs. DT names.
1409 2012-05-03 Tobias Burnus <burnus@net-b.de>
1412 * interface.c (compare_parameter_intent): Remove.
1413 (check_intents): Remove call, handle CLASS pointer.
1414 (compare_actual_formal): Handle CLASS pointer.
1416 2012-04-30 Jan Hubicka <jh@suse.cz>
1418 * f95-lang.c (gfc_finish): Update comments.
1420 2012-04-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1423 * frontend-passes.c (create_var): If the statement has a label,
1424 put the label around the block.
1426 2012-04-25 Tobias Burnus <burnus@net-b.de>
1429 * lang.opt (Wrealloc-lhs, Wrealloc-lhs-all): New flags.
1430 * gfortran.h (gfc_option_t): Add them.
1431 * options.c (gfc_init_options, gfc_post_options,
1432 gfc_handle_option): Handle them.
1433 * invoke.texi: Document them.
1434 * trans-expr.c (realloc_lhs_warning): New function.
1435 (gfc_trans_arrayfunc_assign,
1436 alloc_scalar_allocatable_for_assignment,
1437 gfc_trans_assignment_1): Use it.
1439 2012-04-18 Steven Bosscher <steven@gcc.gnu.org>
1441 * trans-decl.c (gfc_trans_entry_master_switch): Build SWITCH_EXPR
1442 with NULL_TREE type instead of void_type_node.
1443 * trans-io.c (io_result): Likewise.
1444 * trans-stmt.c (gfc_trans_integer_select,
1445 gfc_trans_character_select): Likewise.
1447 2012-04-16 Tobias Burnus <burnus@net-b.de>
1450 * expr.c (gfc_check_vardef_context): Fix assignment check for
1453 2012-04-16 Janus Weil <janus@gcc.gnu.org>
1456 * class.c (gfc_build_class_symbol): Make sure the 'f2k_derived'
1457 namespace is present.
1459 2012-04-15 Janus Weil <janus@gcc.gnu.org>
1462 * trans-expr.c (gfc_conv_expr_reference): Check if the expression is a
1463 simple function call (or a more involved PPC reference).
1465 2012-04-15 Tobias Burnus <burnus@net-b.de>
1469 * gfortran.h (symbol_attribute): Add public_used.
1470 * interface.c (check_sym_interfaces, check_uop_interfaces,
1471 gfc_check_interfaces): Set it.
1472 * resolve.c (resolve_typebound_procedure): Ditto.
1473 * trans-decl.c (build_function_decl): Use it.
1475 2012-04-11 Tobias Burnus <burnus@net-b.de>
1478 * resolve.c (resolve_symbol): Fix searching for parent NS decl.
1480 2012-04-08 Tobias Burnus <burnus@net-b.de>
1483 * trans-decl.c (gfc_finish_var_decl): Don't set TREE_PUBLIC
1484 for PRIVATE module variables without C-binding label.
1487 * trans-decl.c (build_function_decl): Ditto for procedures.
1489 2012-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1492 * frontend-passes.c: Keep track of wether we are in an implicit
1493 DO loop; do not do function elimination if we are.
1495 2012-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1498 * module.c: Only mark symbols as use_only if they have been
1499 imported via an only list.
1501 2012-03-28 Paul Thomas <pault@gcc.gnu.org>
1502 Tobias Burnus <burnus@gcc.gnu.org>
1505 * match.c (gfc_match_allocate, gfc_match_deallocate): Change
1506 "not.. or" to "neither.. nor".
1507 * parse.c (decode_specification_statement): Correct error in
1508 chpice of matching function for "allocatable".
1510 2012-03-23 Janne Blomqvist <jb@gcc.gnu.org>
1512 * gfortran.h (GFC_MAX_LINE): Remove unused macro.
1514 2012-03-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1517 * error.c (gfc_widechar_display_length): Consider tabs as
1518 one character wide, as they're displayed as spaces.
1519 (show_locus): Move tab handling to...
1520 (print_wide_char_into_buffer): ... here.
1522 2012-03-17 Tobias Burnus <burnus@net-b.de>
1525 * trans-intrinsic.c (gfc_conv_associated): Fix handling of
1526 procpointer dummy arguments.
1528 2012-03-16 Janne Blomqvist <jb@gcc.gnu.org>
1530 * trans-intrinsic.c (build_round_expr): Don't use BUILT_IN_IROUND
1533 2012-03-15 Janne Blomqvist <jb@gcc.gnu.org>
1535 * f95-lang.c (gfc_init_builtin_functions): Initialize
1537 * mathbuiltins.def: Add IROUND.
1538 * trans-intrinsic.c (build_round_expr): Use BUILT_IN_IROUND if
1540 (gfc_build_intrinsic_lib_fndecls): Build iround functions.
1542 2012-03-12 Richard Guenther <rguenther@suse.de>
1544 * f95-lang.c (builtin_type_for_size): Use gfc_type_for_size.
1546 2012-03-12 Tobias Burnus <burnus@net-b.de>
1549 * decl.c (match_procedure_decl): If the interface
1550 is bind(C), the procedure is as well.
1552 2012-03-10 Steven Bosscher <steven@gcc.gnu.org>
1554 * convert.c (convert): Fold BOOLEAN_TYPE types to the proper variant.
1556 2012-03-09 Steven Bosscher <steven@gcc.gnu.org>
1558 * Make-lang.in (convert.o): Depend on convert.h.
1559 * convert.c: Header and comment cleanups.
1560 (gfc_thruthvalue_conversion): Rename static function
1561 to truthvalue_conversion. Do not use 'internal_error' from here,
1562 use 'gcc_unreachable' instead.
1563 (convert): Do not use 'error' for conversions to void, use
1564 'gcc_unreachable' instead. Likewise for conversions to non-scalar
1565 types. Do not hanlde ENUMERAL_TYPE, the front end never creates them.
1566 Clean up #if 0 code.
1568 2012-03-08 Tobias Burnus <burnus@net-b.de>
1571 * trans-types.c (gfc_get_function_type): Handle backend_decl
1572 of a procedure pointer.
1574 2012-03-06 Steven Bosscher <steven@gcc.gnu.org>
1576 * f95-lang.c (yyerror, yylex): Remove.
1577 (clear_binding_stack): Remove, fold into its only user.
1578 (LANG_HOOKS_PRINT_IDENTIFIER): Do not re-define.
1579 (ridpointers): Remove.
1580 (gfc_eh_initialized_p): Make static.
1581 (gfc_truthvalue_conversion): Move to convert.c.
1582 (gfc_be_parse_file): Clear binding level stack when done.
1583 (gfc_print_identifier): Remove.
1584 (pushlevel): Remove ignored 'ignore' argument. Update all callers.
1585 (poplevel): Remove unused 'reverse' argument. Update all callers.
1587 (gfc_builtin_function): Make static. Do not attempt to make RTL for
1589 * convert.c (gfc_truthvalue_conversion): Moved here from f95-lang.c,
1591 * trans.h (pushlevel, poplevel): Adjust prototypes.
1592 (gfc_truthvalue_conversion, gfc_builtin_function): Remove prototypes.
1593 * trans-openmp.c: Update calls to pushlevel and poplevel.
1594 * trans.c: Likewise.
1595 * trans-decl.c: Likewise.
1597 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
1600 * gfortran.h (gfc_is_class_container_ref): New prototype.
1601 * class.c (gfc_is_class_container_ref): New function.
1602 * trans-expr.c (gfc_conv_procedure_call): Add a "_data" component
1603 reference to polymorphic actual arguments.
1605 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
1608 * trans-expr.c (gfc_conv_procedure_call): Save se->ss's value.
1609 Handle the case of unallocated arrays passed to elemental procedures.
1611 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
1613 * trans.h (struct gfc_ss_info): Move can_be_null_ref component from
1614 the data::scalar subcomponent to the toplevel.
1615 * trans-expr.c (gfc_conv_expr): Update component reference.
1616 * trans-array.c (gfc_add_loop_ss_code): Ditto.
1617 (gfc_walk_elemental_function_args): Ditto. Move the conditional setting
1618 the field out of the scalar-only block.
1620 2012-03-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1623 * error.c (gfc_widechar_display_length, gfc_wide_display_length):
1625 (print_wide_char_into_buffer): Return length written.
1626 (show_locus): Fix locus displayed when wide characters are present.
1628 2012-03-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1630 * module.c (gfc_use_module): Improve error message some more.
1632 2012-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1635 * module.c (gfc_use_module): Improve error messages.
1637 2012-03-03 Tobias Burnus <burnus@net-b.de>
1640 * resolve.c (resolve_actual_arglist): Properly reset
1641 assumed_type_expr_allowed.
1643 2012-03-03 Tobias Burnus <burnus@net-b.de>
1645 * lang.opt (Wc-binding-type): New flag.
1646 * options.c (gfc_init_options, gfc_handle_option): Handle it.
1647 * invoke.texi (Wc-binding-type): Document it.
1648 * gfortran.h (gfc_option_t): Add warn_c_binding_type.
1649 * decl.c (verify_bind_c_sym): Handle -Wc-binding-type.
1650 * symbol.c (gfc_set_default_type, verify_bind_c_derived_type):
1653 2012-03-03 Tobias Burnus <burnus@net-b.de>
1656 * decl.c (gfc_match_decl_type_spec): Support type(*).
1657 (gfc_verify_c_interop): Allow type(*).
1658 * dump-parse-tree.c (show_typespec): Handle type(*).
1659 * expr.c (gfc_copy_expr): Ditto.
1660 * interface.c (compare_type_rank, compare_parameter,
1661 compare_actual_formal, gfc_procedure_use): Ditto.
1662 * libgfortran.h (bt): Add BT_ASSUMED.
1663 * misc.c (gfc_basic_typename, gfc_typename): Handle type(*).
1664 * module.c (bt_types): Ditto.
1665 * resolve.c (assumed_type_expr_allowed): New static variable.
1666 (resolve_actual_arglist, resolve_variable, resolve_symbol):
1668 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1669 * trans-types.c (gfc_typenode_for_spec, gfc_get_dtype): Ditto.
1671 2012-03-02 Tobias Burnus <burnus@net-b.de>
1674 * primary.c (gfc_match_varspec): Add missing ;.
1676 2012-03-02 Tobias Burnus <burnus@net-b.de>
1679 * primary.c (gfc_match_varspec): Add diagnostic for % with
1682 2012-03-02 Tobias Burnus <burnus@net-b.de>
1685 * expr.c (gfc_check_vardef_context): Fix check for
1686 intent-in polymorphic pointer .
1687 * interface.c (compare_parameter): Allow passing TYPE to
1688 intent-in polymorphic pointer.
1690 2012-03-02 Tobias Burnus <burnus@net-b.de>
1693 * resolve.c (resolve_intrinsic): Don't search for a
1694 function if we know that it is a subroutine.
1696 2012-02-29 Paul Thomas <pault@gcc.gnu.org>
1699 * trans-expr.c (fcncall_realloc_result): Dereference the
1700 descriptor if needed.
1702 2012-02-22 Tobias Burnus <burnus@net-b.de>
1705 * io.c (gfc_match_open): Remove bogus F2003 DELIM= check.
1707 2012-02-18 Tobias Burnus <burnus@net-b.de>
1710 * interface.c (check_interface0): Internal procs in
1711 generic interfaces are allowed in Fortran 2008.
1713 2012-02-17 Tobias Burnus <burnus@net-b.de>
1714 Roland Stigge <stigge@antcom.de>
1716 PR translation/52273
1717 * interface.c (compare_actual_formal): Fix typo "at at".
1719 2012-02-17 Tobias Burnus <burnus@net-b.de>
1721 * gfortran.texi (Q exponent-letter): Fix grammar.
1723 2012-02-17 Tobias Burnus <burnus@net-b.de>
1725 * gfortran.texi (Status): Fix typos.
1726 * invoke.texi (ffixed-form, fstack-arrays): Spell Fortran with
1729 2012-02-17 Tobias Burnus <burnus@net-b.de>
1730 Roland Stigge <stigge@antcom.de>
1732 PR translation/52232
1733 PR translation/52234
1734 PR translation/52245
1735 PR translation/52246
1736 PR translation/52262
1737 PR translation/52273
1738 * io.c (gfc_match_open): Fix typo.
1739 * interface.c (compare_actual_formal): Ditto.
1740 * lang.opt (freal-4-real-8, freal-4-real-16, freal-8-real-16): Ditto.
1741 * match.c (alloc_opt_list, gfc_match_nullify): Ditto.
1742 * check.c (gfc_check_associated, gfc_check_null): Ditto.
1744 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
1747 * trans-stmt.c (gfc_get_proc_ifc_for_call): New function.
1748 (gfc_trans_call): Use gfc_get_proc_ifc_for_call.
1750 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
1752 * trans-array.c (gfc_walk_elemental_function_args,
1753 gfc_walk_function_expr): Move call to gfc_get_proc_ifc_for_expr out
1754 of gfc_walk_elemental_function_args.
1755 * trans-stmt.c (gfc_trans_call): Ditto.
1756 * trans-array.h (gfc_get_proc_ifc_for_expr): New prototype.
1757 (gfc_walk_elemental_function_args): Update prototype.
1759 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
1761 * trans-array.c (gfc_get_proc_ifc_for_expr): New function.
1762 (gfc_walk_elemental_function_args): Move code to
1763 gfc_get_proc_ifc_for_expr and call it.
1765 2012-02-08 Tobias Burnus <burnus@net-b.de>
1768 * trans-expr.c (fcncall_realloc_result): Set also the stride.
1770 2012-02-07 Tobias Burnus <burnus@net-b.de>
1773 * trans-expr.c (gfc_conv_procedure_call): Add _data component
1774 for calls of scalar CLASS actuals to TYPE dummies.
1776 2012-02-05 Thomas König <tkoenig@gcc.gnu.org>
1779 * trans-decl.c: Warn about unused dummy procedure arguments
1780 if -Wunused-dummy-argument is specified. Suppress middle-end
1781 warnings about procedure arguments.
1783 2012-02-05 Paul Thomas <pault@gcc.gnu.org>
1785 * trans-array.c (gfc_array_allocate): Zero memory for all class
1787 * trans-stmt.c (gfc_trans_allocate): Ditto for class scalars.
1790 * trans-stmt.c (gfc_trans_allocate): Before correcting a class
1791 array reference, ensure that 'dataref' points to the _data
1792 component that is followed by the array reference..
1794 2012-02-02 Mikael Morin <mikael@gcc.gnu.org>
1800 * class.c (insert_component_ref, class_data_ref_missing,
1801 gfc_fix_class_refs): New functions.
1802 * gfortran.h (gfc_fix_class_refs): New prototype.
1803 * trans-expr.c (gfc_conv_expr): Remove special case handling and call
1804 gfc_fix_class_refs instead.
1806 2012-02-02 Paul Thomas <pault@gcc.gnu.org>
1809 * trans-expr.c (fcncall_realloc_result): If variable shape is
1810 correct, retain the bounds, whatever they are.
1812 2012-02-02 Tobias Burnus <burnus@net-b.de>
1815 * simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES.
1817 2012-02-01 Thomas König <tkoenig@gcc.gnu.org>
1820 * frontend-passes.c (convert_elseif): New function.
1821 (optimize_namespace): Call it.
1823 2012-02-01 Tobias Burnus <burnus@net-b.de>
1826 * module.c (MOD_VERSION): Bump.
1827 (mio_typebound_proc): Read/write is_operator from/to the
1830 2012-02-01 Tobias Burnus <burnus@net-b.de>
1833 * trans-expr.c (gfc_conv_procedure_call): Add array ref
1836 2012-01-31 Tobias Burnus <burnus@net-b.de>
1839 * gfortran.h (gfc_tbp_generic): Store whether the
1840 generic is an operator.
1841 * decl.c (gfc_match_generic): Set that flag.
1842 * resolve.c (check_generic_tbp_ambiguity): Use it in the
1843 gfc_compare_interfaces check.
1845 2012-01-31 Tobias Burnus <burnus@net-b.de>
1848 * class.c (gfc_find_derived_vtab): Mark _copy function as pure.
1850 2012-01-31 Tobias Burnus <burnus@net-b.de>
1853 * class.c (get_unique_hashed_string): Adapt trim length.
1854 (gfc_build_class_symbol) Encode also corank in the container name.
1856 2012-01-31 Paul Thomas <pault@gcc.gnu.org>
1859 * trans-expr.c (fcncall_realloc_result): Correct calculation of
1862 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
1864 * module.c (pointer_info): Make true_name and module pointers
1865 rather than arrays, order pointers before other fields.
1866 (free_pi_tree): free true_name and module as well.
1867 (mio_read_string): Rename to read_string.
1868 (mio_write_string): Remove.
1869 (load_commons): Use read_string.
1870 (read_module): Use read_string rather than mio_internal_string.
1871 (write_blank_common): Call write_atom directly.
1872 (write_symbol): Likewise.
1874 2012-01-29 Tobias Burnus <burnus@net-b.de>
1877 * expr.c (gfc_default_initializer): Convert the values if
1878 the type does not match.
1880 2012-01-29 Tobias Burnus <burnus@net-b.de>
1883 * trans-array.c (structure_alloc_comps): Fix assignment of
1884 polymorphic components (polymorphic deep copying).
1886 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
1889 * decl.c (set_binding_label): Make binding_label argument const.
1890 (curr_binding_label): Constify.
1891 * gfortran.h (gfc_symbol): Constify binding_label.
1892 (gfc_common_head): Likewise.
1893 (get_iso_c_sym): Likewise.
1894 * match.c (gfc_match_name_C): Constify buffer argument.
1895 * match.h (gfc_match_name_C): Likewise.
1896 * resolve.c (set_name_and_label): Constify binding_label argument.
1897 (gfc_iso_c_sub_interface): Constify binding_label variable.
1898 * symbol.c (get_iso_c_sym): Constify binding_label argument.
1900 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
1903 * decl.c (set_binding_label): Move prototype from match.h to here.
1904 (curr_binding_label): Make a pointer rather than static array.
1905 (build_sym): Check sym->binding_label pointer rather than array,
1906 update set_binding_label call, handle curr_binding_label changes.
1907 (set_binding_label): Handle new curr_binding_label, dest_label
1908 double ptr, and sym->binding_label.
1909 (verify_bind_c_sym): Handle sym->binding_label being a pointer.
1910 (set_verify_bind_c_sym): Check sym->binding_label pointer rather
1911 than array, update set_binding_label call.
1912 (gfc_match_bind_c_stmt): Handle curr_binding_label change.
1913 (match_procedure_decl): Update set_binding_label call.
1914 (gfc_match_bind_c): Change binding_label to pointer, update
1915 gfc_match_name_C call.
1916 * gfortran.h (GFC_MAX_BINDING_LABEL_LEN): Remove macro.
1917 (gfc_symbol): Make binding_label a pointer.
1918 (gfc_common_head): Likewise.
1919 * match.c (gfc_match_name_C): Heap allocate bind(C) name.
1920 * match.h (gfc_match_name_C): Change prototype argument.
1921 (set_binding_label): Move prototype to decl.c.
1922 * module.c (struct pointer_info): Make binding_label a pointer.
1923 (free_pi_tree): Free unused binding_label.
1924 (mio_read_string): New function.
1925 (mio_write_string): New function.
1926 (load_commons): Redo reading of binding_label.
1927 (read_module): Likewise.
1928 (write_common_0): Change to write empty string instead of name if
1930 (write_blank_common): Write empty string for binding label.
1931 (write_symbol): Change to write empty string instead of name if no
1933 * resolve.c (gfc_iso_c_func_interface): Don't set binding_label.
1934 (set_name_and_label): Make binding_label double pointer, use
1936 (gfc_iso_c_sub_interface): Make binding_label a pointer.
1937 (resolve_bind_c_comms): Handle cases if
1938 gfc_common_head->binding_label is NULL.
1939 (gfc_verify_binding_labels): sym->binding_label is a pointer.
1940 * symbol.c (gfc_new_symbol): Rely on XCNEW zero init for
1942 (gen_special_c_interop_ptr): Don't set binding label.
1943 (generate_isocbinding_symbol): Insert binding_label into symbol
1945 (get_iso_c_sym): Use pointer assignment instead of strcpy.
1946 * trans-common.c (gfc_sym_mangled_common_id): Handle
1947 com->binding_label being a pointer.
1948 * trans-decl.c (gfc_sym_mangled_identifier): Handle
1949 sym->binding_label being a pointer.
1950 (gfc_sym_mangled_function_id): Likewise.
1952 2012-01-29 Tobias Burnus <burnus@net-b.de>
1955 * resolve.c (symbol_as): Remove unused, accidentally
1958 2012-01-28 Tobias Burnus <burnus@net-b.de>
1961 * trans-stmt.c (gfc_trans_allocate): Properly check whether
1962 we have a BT_CLASS which needs to be memset.
1964 2012-01-27 Tobias Burnus <burnus@net-b.de>
1967 * trans-expr.c (gfc_conv_procedure_call): Fix passing
1968 of functions, which return allocatables.
1970 2012-01-27 Tobias Burnus <burnus@net-b.de>
1973 * resolve.c (resolve_formal_arglist): Fix elemental
1974 constraint checks for polymorphic dummies also for
1977 2012-01-27 Tobias Burnus <burnus@net-b.de>
1981 * primary.c (gfc_match_varspec. gfc_match_rvalue): Set
1982 handle array spec for BT_CLASS.
1983 * expr.c (gfc_get_variable_expr, gfc_lval_expr_from_sym)
1984 * frontend-passes.c (create_var): Ditto.
1985 * resolve.c (resolve_actual_arglist, resolve_assoc_var): Ditto.
1986 * trans-decl.c (gfc_trans_deferred_vars): Use class_pointer
1987 instead of attr.pointer.
1988 (gfc_generate_function_code): Use CLASS_DATA (sym) for BT_CLASS.
1989 * trans-intrinsic.c (conv_intrinsic_move_alloc): Move assert.
1990 * trans-stmt.c (trans_associate_var): Ask for the descriptor.
1992 2012-01-27 Tobias Burnus <burnus@net-b.de>
1995 * match.c (gfc_match_allocate): Allow more than allocate
1996 object with SOURCE=.
1998 2012-01-27 Tobias Burnus <burnus@net-b.de>
2001 * resolve.c (resolve_formal_arglist): Fix elemental
2002 constraint checks for polymorphic dummies.
2004 2012-01-27 Paul Thomas <pault@gcc.gnu.org>
2005 Tobias Burnus <burnus@gcc.gnu.org>
2011 * trans-array.c (gfc_array_init_size): Add two extra arguments
2012 to convey the dynamic element size of a calls object and to
2013 return the number of elements that have been allocated.
2014 (gfc_array_allocate): Add the same arguments and use them to
2015 call gfc_array_init_size. Before the allocation dereference
2016 the data pointer, if necessary. Set the allocated array to zero
2017 if the class element size or expr3 are non-null.
2018 * trans-expr.c (gfc_conv_class_to_class): Give this function
2020 (get_class_array_ref): New function.
2021 (gfc_copy_class_to_class): New function.
2022 * trans-array.h : Update prototype for gfc_array_allocate.
2023 * trans-stmt.c (gfc_trans_allocate): For non-variable class
2024 STATUS expressions extract the class object and the dynamic
2025 element size. Use the latter to call gfc_array_allocate and
2026 the former for setting the vptr and, via
2027 gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
2028 * trans.h : Prototypes for gfc_get_class_array_ref,
2029 gfc_copy_class_to_class and gfc_conv_class_to_class.
2031 2012-01-25 Tobias Burnus <burnus@net-b.de>
2033 * resolve.c (symbol_as): Check also for attr.class_ok.
2035 2012-01-25 Tobias Burnus <burnus@net-b.de>
2038 * class.c (gfc_build_class_symbol): Fix invalid freeing
2039 issue with fclass->f2k_derived.
2041 2012-01-25 Tobias Burnus <burnus@net-b.de>
2044 * class.c (gfc_build_class_symbol): Ensure that
2045 fclass->f2k_derived is set.
2047 2012-01-25 Tobias Burnus <burnus@net-b.de>
2050 * resolve.c (resolve_structure_cons): Only create an
2051 array constructors for nonscalars.
2053 2012-01-23 Tobias Burnus <burnus@net-b.de>
2056 * check.c (variable_check): Fix checking for
2057 variables and deeply nested BLOCKs.
2059 2012-01-21 Tobias Burnus <burnus@net-b.de>
2060 Steven G. Kargl <kargl@gcc.gnu.org>
2063 * symbol.c (check_conflict): namelist-group-name cannot have the SAVE
2066 2012-01-21 Tobias Burnus <burnus@net-b.de>
2069 * interface.c (compare_parameter): Fix CLASS comparison.
2071 2012-01-20 Tobias Burnus <burnus@net-b.de>
2072 Janus Weil <janus@gcc.gnu.org>
2075 * module.c (load_needed, read_module): Don't mark __vtab etc.
2078 2012-01-19 Tobias Burnus <burnus@net-b.de>
2081 * expr.c (gfc_build_intrinsic_call): Also set the symtree.
2083 2012-01-18 Paul Thomas <pault@gcc.gnu.org>
2086 * trans-expr.c (gfc_conv_procedure_call): Deallocate allocatable
2087 components of temporary class arguments.
2089 2012-01-17 Tobias Burnus <burnus@net-b.de>
2090 Janne Blomqvist <jb@gcc.gnu.org>
2093 * trans-expr.c (alloc_scalar_allocatable_for_assignment): Nullify
2094 LHS after allocation, if it has allocatable components.
2095 * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_CALLOC.
2097 2012-01-16 Mikael Morin <mikael@gcc.gnu.org>
2098 Tobias Burnus <burnus@net-b.de>
2101 * trans-array.c (gfc_walk_elemental_function_args): Fix
2102 passing of deallocated allocatables/pointers as absent argument.
2104 2012-01-16 Tobias Burnus <burnus@net-b.de>
2107 * class.c (gfc_find_derived_vtab): Mark __vtab and
2108 __def_init as FL_VARIABLE not as FL_PARAMETER.
2109 * expr.c (gfc_simplify_expr): Remove special
2111 * resolve.c (resolve_values): Ditto.
2112 * trans-decl.c (gfc_get_symbol_decl): Mark __vtab
2113 and __def_init as TREE_READONLY.
2115 2012-01-16 Zydrunas Gimbutas <gimbutas@cims.nyu.edu>
2116 Andreas Kloeckner <kloeckner@cims.nyu.edu>
2117 Steven G. Kargl <kargl@gcc.gnu.org>
2120 * gfortran.h (gfc_option_t): Add members flag_*_kind to store kind.
2121 * lang.opt: Add options -freal-4-real-8, -freal-4-real-10,
2122 -freal-4-real-16, -freal-8-real-4, -freal-8-real-10, -freal-8-real-16
2123 and -finteger-4-integer-8. User-desired type conversion information.
2124 * decl.c (gfc_match_old_kind_spec,kind_expr): Type conversions
2125 in declaration parsing.
2126 * trans-types.c (gfc_init_kinds): User-specified type conversion
2127 checked for current backend.
2128 * primary.c (match_integer_constant,match_real_constant): Implement
2129 type conversion in constant parsing.
2130 * options.c (gfc_init_options,gfc_handle_option): Translate input
2131 options to flags in internal options data structure.
2132 * invoke.texi: Document new options. Re-order options in Options
2135 2012-01-16 Paul Thomas <pault@gcc.gnu.org>
2137 * trans-array.c (gfc_trans_create_temp_array): In the case of a
2138 class array temporary, detect a null 'eltype' on entry and use
2139 'initial' to provde the class reference and so, through the
2140 vtable, the element size for the dynamic type.
2141 * trans-stmt.c (gfc_conv_elemental_dependencies): For class
2142 expressions, set 'eltype' to null and pass the values via the
2143 'initial' expression.
2145 2012-01-14 Tobias Burnus <burnus@net-b.de>
2148 * resolve.c (build_default_init_expr): Also initialize
2149 nonconstant-length strings with -finit-character=<n>.
2151 2011-01-14 Tobias Burnus <burnus@net-b.de>
2154 * module.c (read_module): Don't make nonexisting
2155 intrinsic operators as found.
2156 (rename_list_remove_duplicate): New function.
2157 (gfc_use_modules): Use it.
2159 2012-01-13 Paul Thomas <pault@gcc.gnu.org>
2162 * trans-array.c (structure_alloc_comps): Suppress interative
2163 call to self, when current component is deallocated using
2164 gfc_trans_dealloc_allocated.
2165 * class.c (gfc_build_class_symbol): Copy the 'alloc_comp'
2166 attribute from the declared type to the class structure.
2168 2012-01-13 Tobias Burnus <burnus@net-b.de>
2171 * fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE
2172 instead of a signed int of size POINTER_SIZE for
2173 gfc_index_integer_kind.
2175 2012-01-12 Tobias Burnus <burnus@net-b.de>
2178 * intrinsic.texi (CHMOD): Extend a bit and remove statement
2179 that /bin/chmod is called.
2181 2012-01-10 Gerald Pfeifer <gerald@pfeifer.com>
2183 * gfortran.texi (Fortran 2003 Status): Fix grammar.
2185 2012-01-10 Tobias Burnus <burnus@net-b.de>
2188 * resolve.c (resolve_allocate_expr): For non-deferred char lengths,
2189 check whether type-spec matches declaration.
2191 2012-01-10 Tobias Burnus <burnus@net-b.de>
2193 * resolve.c (resolve_ordinary_assign): Improve error wording.
2195 2012-01-09 Paul Thomas <pault@gcc.gnu.org>
2198 * interface.c (matching_typebound_op): Drill down through
2199 possible parentheses to obtain base expression. Do not test for
2200 'class_ok' but, instead for the class structure components.
2201 * resolve.c (resolve_ordinary_assign): Extend error message for
2202 polymorphic assignment to advise checking for specific
2206 * resolve.c (resolve_typebound_function): Restore 'static' to
2209 2012-01-09 Mikael Morin <mikael@gcc.gnu.org>
2212 * trans-array.c (gfc_walk_elemental_function_args):
2213 Skip over NULL() actual arguments.
2215 2012-01-09 Tobias Burnus <burnus@net-b.de>
2217 * gfortran.texi: Bump copyright year.
2218 (Fortran 2003 Status): Update polymorphism item, add
2219 item for generic interface with DT name.
2221 2012-01-09 Tobias Burnus <burnus@net-b.de>
2224 * gfortran.h (gfc_use_list):
2225 * match.h (gfc_use_module): Rename to ...
2226 (gfc_use_modules): ... this.
2227 * module.c (use_locus, specified_nonint, specified_int): Remove
2229 (module_name): Change type to const char*, used with gfc_get_string.
2230 (module_list): New global variable.
2231 (free_rename): Free argument not global var.
2232 (gfc_match_use): Save match to module_list.
2233 (load_generic_interfaces, read_module): Don't free symtree.
2234 (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
2235 type change of module_name.
2236 (write_symbol0, write_generic): Optimize due to the type change.
2237 (import_iso_c_binding_module, use_iso_fortran_env_module): Use
2238 locus of rename->where.
2239 (gfc_use_module): Take module_list as argument.
2240 (gfc_use_modules): New function.
2241 (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
2242 * parse.c (last_was_use_stmt): New global variable.
2243 (use_modules): New function.
2244 (decode_specification_statement, decode_statement): Move USE match up
2245 and call use_modules.
2246 (next_free, next_fixed): Call use_modules.
2247 (accept_statement): Don't call gfc_module_use.
2249 2012-01-06 Tobias Burnus <burnus@net-b.de>
2251 * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
2252 Update call to gfc_trans_dealloc_allocated.
2253 * trans.c (gfc_allocate_using_malloc): Fix spacing.
2254 (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
2255 label_finish when an error occurs.
2256 (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
2257 * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
2259 (gfor_fndecl_caf_deregister): New tree symbol.
2260 * trans-expr.c (gfc_conv_procedure_call): Update
2261 gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
2262 * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
2263 structure_alloc_comps, gfc_trans_deferred_array): Ditto.
2264 (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
2265 * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
2266 gfc_trans_dealloc_allocated): Update prototypes.
2267 * trans-stmt.c (gfc_trans_sync): Fix indentation.
2268 (gfc_trans_allocate): Fix errmsg padding and label handling.
2269 (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
2270 * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
2271 * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
2272 to avoid other stats accidentally matching this one.
2273 * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
2274 (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
2275 and add decl for caf_deregister.
2276 (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
2277 * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
2278 gfc_deallocate_with_status.
2280 2012-01-05 Paul Thomas <pault@gcc.gnu.org>
2283 * resolve.c (resolve_typebound_static): If the typebound
2284 procedure is 'deferred' try to find the correct specific
2285 procedure in the derived type operator space itself.
2287 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
2290 * trans-array.h (gfc_walk_elemental_function_args): New argument.
2291 * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
2292 * trans-stmt.c (gfc_trans_call): Ditto.
2293 * trans-array.c (gfc_walk_function_expr): Ditto.
2294 (gfc_walk_elemental_function_args): Get the dummy argument list
2295 if possible. Check that the dummy and the actual argument are both
2296 optional, and set can_be_null_ref accordingly.
2298 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
2301 * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
2302 * trans-array.c: If the reference can be NULL, save the reference
2303 instead of the value.
2304 * trans-expr.c (gfc_conv_expr): If we have saved a reference,
2307 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
2309 * trans-expr.c (gfc_conv_expr): Move address taking...
2310 (gfc_conv_expr_reference): ... here.
2312 2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
2315 * trans-common.c (create_common): Update copyright years. Mark
2316 variables as used to avoid warnings about unused variables in
2319 2012-01-03 Hans-Peter Nilsson <hp@axis.com>
2321 * gfortran.h (struct gfc_expr): Add missing "struct"
2322 qualifier for member base_expr.
2324 2012-01-02 Paul Thomas <pault@gcc.gnu.org>
2327 * trans-array.c (gfc_array_allocate): Null allocated memory of
2328 newly allocted class arrays.
2333 * interface.c(build_compcall_for_operator): Add a type to the
2335 * trans-expr.c (conv_base_obj_fcn_val): New function.
2336 (gfc_conv_procedure_call): Use base_expr to detect non-variable
2337 base objects and, ensuring that there is a temporary variable,
2338 build up the typebound call using conv_base_obj_fcn_val.
2339 (gfc_trans_class_assign): Pick out class procedure pointer
2340 assignments and do the assignment with no further prcessing.
2341 (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
2342 gfc_trans_class_assign): Move to top of file.
2343 * gfortran.h : Add 'base_expr' field to gfc_expr.
2344 * resolve.c (get_declared_from_expr): Add 'types' argument to
2345 switch checking of derived types on or off.
2346 (resolve_typebound_generic_call): Set the new argument.
2347 (resolve_typebound_function, resolve_typebound_subroutine):
2348 Set 'types' argument for get_declared_from_expr appropriately.
2349 Identify base expression, if not a variable, in the argument
2350 list of class valued calls. Assign it to the 'base_expr' field
2351 of the final expression. Strip away all references after the
2352 last class reference.
2354 2012-01-02 Tobias Burnus <burnus@net-b.de>
2357 * trans-intrinsic.c (trans_this_image, trans_image_index,
2358 trans_num_images, conv_intrinsic_cobound): Fold_convert the
2359 caf_num_images/caf_this_images variables to the correct int kind.
2361 2012-01-01 Jakub Jelinek <jakub@redhat.com>
2363 * gfortranspec.c (lang_specific_driver): Update copyright notice
2366 Copyright (C) 2012 Free Software Foundation, Inc.
2368 Copying and distribution of this file, with or without modification,
2369 are permitted in any medium without royalty provided the copyright
2370 notice and this notice are preserved.