1 2012-11-27 Tobias Burnus <burnus@net-b.de>
4 * expr.c (gfc_check_pointer_assign): Fix check
5 pointer-might-outlive-target check for host_assoc.
7 2012-11-26 Eric Botcazou <ebotcazou@adacore.com>
9 * trans-decl.c (gfc_finish_var_decl): Do not set DECL_RESTRICTED_P.
11 2012-11-26 Janus Weil <janus@gcc.gnu.org>
14 * decl.c (match_procedure_decl): Don't set 'referenced' attribute
15 for PROCEDURE declarations.
16 * parse.c (gfc_fixup_sibling_symbols,parse_contained): Don't set
17 'referenced' attribute for all contained procedures.
18 * trans-decl.c (gfc_get_symbol_decl): Allow for unreferenced procedures.
19 (build_function_decl): Set TREE_USED for referenced procedures.
21 2012-11-26 Janus Weil <janus@gcc.gnu.org>
24 * match.c (select_derived_set_tmp,select_class_set_tmp): Removed and
26 (select_type_set_tmp): ... this one. Set POINTER argument according to
28 * trans-intrinsic.c (gfc_conv_associated): Use 'gfc_class_data_get'
29 instead of 'gfc_add_data_component'.
31 2012-11-25 Thomas Koenig <tkoenig@gcc.gnu.org>
34 * frontend-passes.c (doloop_warn): New function.
35 (doloop_list): New static variable.
36 (doloop_size): New static variable.
37 (doloop_level): New static variable.
38 (gfc_run_passes): Call doloop_warn.
39 (doloop_code): New function.
40 (doloop_function): New function.
41 (gfc_code_walker): Keep track of DO level.
43 2012-11-24 Thomas Koenig <tkoenig@gcc.gnu.org>
46 * resolve.c (resolve_allocate_deallocate): Compare all
47 subscripts when deciding if to reject a (de)allocate
50 2012-11-21 Janus Weil <janus@gcc.gnu.org>
53 * trans-decl.c (generate_local_decl): Don't warn for explicitly imported
54 but unused module variables which are in a namelist or common block.
56 2012-11-20 Diego Novillo <dnovillo@google.com>
57 Jakub Jelinek <jakub@redhat.com>
59 * trans-openmp.c: Replace all vec<T, A>() initializers
62 2012-11-17 Diego Novillo <dnovillo@google.com>
64 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
66 * frontend-passes.c: Use new vec API in vec.h.
67 * trans-array.c: Likewise.
68 * trans-common.c: Likewise.
69 * trans-decl.c: Likewise.
70 * trans-expr.c: Likewise.
71 * trans-intrinsic.c: Likewise.
72 * trans-openmp.c: Likewise.
73 * trans-stmt.c: Likewise.
74 * trans-types.c: Likewise.
77 2012-11-17 Jakub Jelinek <jakub@redhat.com>
80 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Convert last
81 argument to memcpy to size_type_node type.
82 * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
83 * trasn-array.c (duplicate_allocatable): Likewise.
85 2012-11-16 Janus Weil <janus@gcc.gnu.org>
88 * resolve.c (resolve_typebound_intrinsic_op): Only add typebound
89 operators to the operator list in the namespace of the derived type.
92 2012-11-12 Jan Hubicka <jh@suse.cz>
94 * f95-lang.c (ATTR_NOTHROW_LEAF_MALLOC_LIST): New macro.
95 (gfc_define_builtin): Use set_call_expr_flags.
96 (gfc_init_builtin_functions): Update.
98 2012-11-12 Tobias Burnus <burnus@net-b.de>
101 * module.c (mio_array_spec): Correctly handle coarray
104 2012-11-07 Tobias Schlüter <tobi@gcc.gnu.org>
107 * module.c (sorted_pointer_info): New.
108 (gfc_get_sorted_pointer_info): New.
109 (free_sorted_pointer_info_tree): New.
110 (compare_sorted_pointer_info): New.
111 (find_symbols_to_write): New.
112 (write_symbol1_recursion): New.
113 (write_symbol1): Collect symbols that need writing, output in order.
114 (write_generic): Traverse tree in order.
116 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
119 * options.c (set_Wall): Do not set warn_switch here.
121 2012-11-06 Janus Weil <janus@gcc.gnu.org>
124 * target-memory.c (gfc_target_expr_size,gfc_target_interpret_expr):
126 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Add support for
127 polymorphic arguments.
129 2012-11-04 Janus Weil <janus@gcc.gnu.org>
132 * primary.c (gfc_match_varspec): Clear typespec if it cannot be
133 determined at this point.
135 2012-10-31 Janus Weil <janus@gcc.gnu.org>
138 * trans.h (GFC_DECL_PUSH_TOPLEVEL): Removed.
139 * trans-decl.c (gfc_get_symbol_decl,gfc_generate_function_code): Remove
140 GFC_DECL_PUSH_TOPLEVEL.
141 (build_function_decl): Do not push __copy procedure to toplevel.
143 2012-10-31 Tobias Burnus <burnus@net-b.de>
146 * trans-array.c (gfc_conv_array_parameter): Regard AS_DEFERRED as
147 array with descriptor.
149 2012-10-28 Tobias Burnus <burnus@net-b.de>
152 * gfortran.h (gfc_resolve_iterator_expr,
153 gfc_check_vardef_context): Update prototype.
154 * expr.c (gfc_check_vardef_context): Add own_scope
155 argument and honour it.
156 * resolve.c (gfc_resolve_iterator_expr): Add own_scope
157 argument and honour it.
158 (resolve_deallocate_expr, resolve_allocate_expr,
159 resolve_data_variables, resolve_transfer
160 resolve_lock_unlock, resolve_code): Update calls.
161 * array.c (resolve_array_list): Ditto.
162 * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
163 * interface.c (compare_actual_formal): Ditto.
164 * intrinsic.c (check_arglist): Ditto.
165 * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): Ditto.
167 2012-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
169 * trans.c (gfc_allocate_allocatable): Revert accidental
172 2012-10-24 Janus Weil <janus@gcc.gnu.org>
175 * trans-expr.c (gfc_conv_procedure_call): Move a piece of code and
178 2012-10-21 Tobias Burnus <burnus@net-b.de>
181 * Make-lang.in (CFLAGS-cpp.o): Use TARGET_SYSTEM_ROOT_DEFINE.
182 * cpp.o (gfc_cpp_init_options): Use it for
183 setting gfc_cpp_option.sysroot.
185 2012-10-21 Thomas König <tkoenig@gcc.gnu.org>
188 * lang.opt (Wextra): Add.
189 * invoke.texi: Document that -Wc-binding-type, -Wconversion
190 and -Wline-truncation are implied by -Wall. Document that
191 -Wcompare-reals is implied by -Wextra. Document -Wextra.
192 * options.c (set_Wextra): New function.
193 (gfc_handle_option): Handle -Wextra.
195 2012-10-19 Janus Weil <janus@gcc.gnu.org>
198 * trans-expr.c (conv_function_val): Set TREE_USED.
200 2012-10-18 Tobias Burnus <burnus@net-b.de>
203 * resolve.c (specification_expr): Change to bool.
204 (resolve_formal_arglist, resolve_symbol): Set
205 specification_expr to true before resolving the array spec.
206 (resolve_variable, resolve_charlen, resolve_fl_variable):
207 Properly reset specification_expr.
208 (resolve_function): Set public_use when used in
209 a specification expr.
211 2012-10-16 Tobias Burnus <burnus@net-b.de>
215 * trans.h (gfc_conv_derived_to_class, gfc_conv_class_to_class):
217 * trans-stmt.c (trans_associate_var,gfc_trans_allocate): Update
218 calls to those functions.
219 * trans-expr.c (gfc_conv_derived_to_class, gfc_conv_class_to_class,
220 gfc_conv_expr_present): Handle absent polymorphic arguments.
221 (class_scalar_coarray_to_class): New function.
222 (gfc_conv_procedure_call): Update calls.
224 2012-10-12 Janus Weil <janus@gcc.gnu.org>
227 * interface.c (check_dummy_characteristics): Recursively check dummy
230 2012-10-11 Janus Weil <janus@gcc.gnu.org>
233 * trans-stmt.c (gfc_trans_allocate): Correctly determine the reference
234 to the _data component for polymorphic allocation with SOURCE.
236 2012-10-06 Janus Weil <janus@gcc.gnu.org>
239 * resolve.c (resolve_fl_derived0): Correctly copy the 'class_ok'
240 attribute for proc-ptr components with RESULT variable.
242 2012-10-06 Janus Weil <janus@gcc.gnu.org>
245 * interface.c (generic_correspondence): Implement additional
246 distinguishability criteria of F08.
247 (compare_actual_formal): Reject data object as actual argument for
248 procedure formal argument.
250 2012-10-04 Tobias Burnus <burnus@net-b.de>
252 * expr.c (scalarize_intrinsic_call): Plug memory leak.
253 * frontend-passes.c (gcc_assert): Extend assert.
254 * interface.c (gfc_compare_derived_types): Fix comparison.
255 (gfc_check_operator_interface): Move up to make this error
257 (get_sym_storage_size): Remove always-true checks.
258 * io.c (format_lex): Add comment.
259 (gfc_free_wait): Free memory.
260 * match.c (gfc_match_select_type): Ditto.
261 * matchexpr.c (match_level_3): Ditto.
262 * primary.c (match_string_constant): Ditto.
263 (match_actual_arg): Check return value.
264 * resolve.c (gfc_resolve_substring_charlen,
265 resolve_typebound_generic_call, resolve_typebound_function,
266 resolve_typebound_subroutine): Free memory.
267 * trans-types.c (gfc_get_derived_type): Remove always-true check.
269 2012-10-02 Janus Weil <janus@gcc.gnu.org>
272 * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
274 2012-09-30 Janus Weil <janus@gcc.gnu.org>
277 * intrinsic.texi (C_F_POINTER): Fix description.
278 * resolve.c (gfc_iso_c_sub_interface): Add a check for FPTR argument
279 of C_F_POINTER. Modify two error messages. Cleanup.
281 2012-09-24 Tobias Burnus <burnus@net-b.de>
285 * trans-expr.c (gfc_conv_procedure_call): Fix INTENT(OUT)
286 handling for allocatable BT_CLASS.
288 2012-09-24 Lawrence Crowl <crowl@google.com>
290 * trans-expr.c (gfc_conv_cst_int_power): Change to new double_int API.
291 * target-memory.c (gfc_interpret_logical): Likewise.
293 2012-09-23 Tobias Burnus <burnus@net-b.de>
295 * parse.c (parse_derived): Don't set attr.alloc_comp
296 for pointer components with allocatable subcomps.
299 * resolve.c (resolve_fl_namelist): Remove superfluous
301 * simplify.c (simplify_min_max): Remove unreachable code.
302 * trans-array.c (gfc_trans_create_temp_array): Change
303 a condition into an assert.
306 * trans-expr.c (gfc_trans_class_init_assign): Guard
307 re-setting of the _data by gfc_conv_expr_present.
308 (gfc_conv_procedure_call): Fix INTENT(OUT) handling
309 for allocatable BT_CLASS.
311 2012-09-22 Thomas König <tkoenig@gcc.gnu.org>
314 * dependency.c (gfc_dep_compare_expr): Clarify logic,
317 2012-09-20 Tobias Burnus <burnus@net-b.de>
320 * cpp.c (print_line): Properly handle extern C.
322 2012-09-20 Martin Jambor <mjambor@suse.cz>
324 * trans-decl.c (gfc_get_extern_function_decl): Push NULL cfun. Do not
325 set and restore current_function_decl.
326 (gfc_init_coarray_decl): Do not set and restore current_function_decl.
328 2012-09-17 Tobias Burnus <burnus@net-b.de>
331 * simplify.c (gfc_simplify_scan, gfc_simplify_verify):
332 Fix handling of BACK=variable.
334 2012-09-17 Janus Weil <janus@gcc.gnu.org>
337 * expr.c (gfc_check_pointer_assign): Correctly handle procedure pointers
339 * primary.c (gfc_match_varspec): Allow to call a PPC with proc-ptr
342 2012-09-17 Tobias Burnus <burnus@net-b.de>
345 * trans-expr.c (gfc_trans_subcomponent_assign): Handle
346 proc-pointer components.
348 2012-09-17 Tobias Burnus <burnus@net-b.de>
351 * error.c (error_print): Move increment out of the assert.
352 * interface.c (gfc_compare_derived_types): Add assert.
353 (get_expr_storage_size): Remove always-true logical condition.
354 * resolve.c (resolve_allocate_expr): Fix looping logic.
355 * target-memory.c (gfc_target_expr_size): Add assert.
357 2012-09-16 Janus Weil <janus@gcc.gnu.org>
360 * resolve.c (get_checked_tb_operator_target): Add a reference to the
361 relevant quote from the F08 standard.
363 2012-09-16 Janus Weil <janus@gcc.gnu.org>
366 * interface.c (compare_type_rank): Handle CLASS arrays.
368 2012-09-16 Janus Weil <janus@gcc.gnu.org>
371 * expr.c (gfc_check_pointer_assign): Check for result of embracing
374 2012-09-16 Tobias Burnus <burnus@net-b.de>
376 * trans-decl.c (gfc_generate_function_code): Fix
377 gfc_option.coarray check.
378 * trans-stmt.c (compute_inner_temp_size): Fix handling
379 of gfc_option.rtcheck.
381 2012-09-16 Mikael Morin <mikael@gcc.gnu.org>
383 * symbol.c (gfc_undo_symbols): Correctly undo namelists.
385 2012-09-15 Tobias Burnus <burnus@net-b.de>
387 * trans-io.c (gfc_trans_transfer): Add an assert.
389 2012-09-15 Tobias Burnus <burnus@net-b.de>
391 * arith.c (arith_power): Call gfc_free_expr in case of error.
392 * array.c (gfc_match_array_constructor): Initialize variable.
393 (gfc_resolve_character_array_constructor): Remove superfluous check.
394 (gfc_array_dimen_size): Add assert.
395 * check.c (numeric_check): Fix implicit typing.
396 * class.c (gfc_build_class_symbol): Add assert.
397 (finalize_component): Free memory.
398 * dump-parse-tree.c (show_namespace): Add assert.
399 * trans-io.c (transfer_namelist_element, transfer_expr): Avoid
401 (gfc_trans_transfer): Add assert.
402 * trans.c (gfc_trans_runtime_check): Call va_end
404 2012-09-15 Tobias Burnus <burnus@net-b.de>
406 * match.c (lock_unlock_statement, sync_statement): Fix potential
408 (sync_statement): Remove unreachable code.
409 * simplify.c (gfc_simplify_bessel_n2): Avoid double freeing.
410 (gfc_simplify_repeat): Remove bogus code.
411 * target-memory.h (gfc_target_encode_expr): Update prototype.
412 * target-memory.c (gfc_target_encode_expr, encode_array,
413 encode_derived): Return unsigned HOST_WIDE_INT.
414 (gfc_target_interpret_expr): Add assert.
415 (gfc_merge_initializers): Fix "== 0" check for mpz_t.
416 * symbol.c (gfc_get_typebound_proc): Add assert.
417 (gfc_merge_initializers): Remove unreachable check.
419 2012-09-13 Tobias Burnus <burnus@net-b.de>
422 * resolve.c (resolve_formal_arglist): Allow VALUE arguments
424 (gfc_impure_variable): Don't check gfc_pure such that the
425 function also works for gfc_implicit_pure procedures.
427 2012-09-12 Tobias Burnus <burnus@net-b.de>
431 * array.c (match_subscript, gfc_match_array_ref): Fix
432 diagnostic of coarray's '*'.
434 2012-09-07 Mikael Morin <mikael@gcc.gnu.org>
437 * simplify.c (simplify_bound_dim): Resolve array spec before
438 proceeding with simplification.
440 2012-09-06 Tobias Burnus <burnus@net-b.de>
443 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Fix matmul
444 call to BLAS if the default-kind has been promoted.
446 2012-09-05 Tobias Burnus <burnus@net-b.de>
449 * symbol.c (gfc_undo_symbols): Avoid NULL pointer dereference.
451 2012-09-04 Janus Weil <janus@gcc.gnu.org>
455 * match.c (gfc_match_select_type): Make sure to only access CLASS_DATA
458 2012-09-03 Tobias Burnus <burnus@net-b.de>
461 * class.c (gfc_find_derived_vtab): Fix disabling of _final
462 by continuing to generate normal type-bound procedures.
464 2012-09-03 Tobias Burnus <burnus@net-b.de>
466 * class.c (gfc_find_derived_vtab): Disable ABI-breaking
467 generation of the "_final" subroutine for now.
469 2012-09-03 Tobias Burnus <burnus@net-b.de>
471 * class.c (finalize_component): Fixes to the comment.
473 2012-09-03 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
474 Tobias Burnus <burnus@net-b.de>
477 * gfortran.h (symbol_attribute): Add artificial.
478 * module.c (mio_symbol_attribute): Handle attr.artificial
479 * class.c (gfc_build_class_symbol): Defer creation of the vtab
480 if the DT has finalizers, mark generated symbols as
482 (has_finalizer_component, finalize_component,
483 finalization_scalarizer, generate_finalization_wrapper):
484 New static functions.
485 (gfc_find_derived_vtab): Add _final component and call
486 generate_finalization_wrapper.
487 * dump-parse-tree.c (show_f2k_derived): Use resolved
488 proc_tree->n.sym rather than unresolved proc_sym.
489 (show_attr): Handle attr.artificial.
490 * resolve.c (gfc_resolve_finalizers): Ensure that the vtab exists.
491 (resolve_fl_derived): Resolve finalizers before
493 (resolve_symbol): Also allow assumed-rank arrays with CONTIGUOUS;
494 skip artificial symbols.
495 (resolve_fl_derived0): Skip artificial symbols.
497 2012-09-02 Tobias Burnus <burnus@net-b.de>
500 * symbol.c (find_common_symtree): New function.
501 (gfc_undo_symbols): Use it; free common_head if needed.
503 2012-08-28 Tobias Burnus <burnus@net-b.de>
506 * trans-decl.c (gfc_get_extern_function_decl,
507 build_function_decl): Don't mark impure elemental
508 functions as DECL_PURE_P and honour implicit_pure.
510 2012-08-28 Tobias Burnus <burnus@net-b.de>
513 * error.c (show_locus): Avoid out of bound access.
515 2012-08-28 Tobias Burnus <burnus@net-b.de>
518 * decl.c (match_data_constant): Add missing gfc_free_expr.
519 (top_val_list): Remove always-true condition.
520 * data.c (get_array_index, create_character_initializer):
521 Free temporary expressions.
522 (gfc_assign_data_value): Free expression when aborting.
524 2012-08-28 Tobias Burnus <burnus@net-b.de>
527 * symbol.c (gfc_copy_formal_args): Set also sym->formal_ns.
529 2012-08-27 Tobias Burnus <burnus@net-b.de>
532 * resolve.c (gfc_resolve_character_operator): Free temporary
534 * trans-expr.c (gfc_conv_statement_function): Ditto.
536 2012-08-27 Tobias Burnus <burnus@net-b.de>
539 * dependency.c (check_section_vs_section): Use gfc_free_expr
541 * trans-intrinsic.c (conv_generic_with_optional_char_arg): Use
542 gfc_free_symbol instead of free.
544 2012-08-27 Tobias Burnus <burnus@net-b.de>
547 * trans-expr.c (gfc_trans_arrayfunc_assign): Free se.ss
550 2012-08-27 Tobias Burnus <burnus@net-b.de>
553 * gfortran.h (gfc_common_head): Add "int refs".
554 * match.c (gfc_match_common): Increment refs.
555 * resolve.c (resolve_symbol): Only increment formal_ns->refs
556 if formal_ns is not sym->ns.
557 * symbol.c (gfc_free_symbol): Only free formal_ns if
558 if formal_ns is not sym->ns. Free common_block if refs is one.
559 (gfc_release_symbol): Release formal_ns only if the
560 symbol is not ENTRY of a module.
561 * decl.c (get_proc_name): Don't increment gfc_current_ns->refs.
562 * parse.c (parse_interface): Incement proc_unit->refs++ for
563 proc-pointer result variables.
564 * module.c (mio_symbol): Don't increase sym->refs for its
565 use in sym->formal_ns->proc_name.
567 2012-08-27 Tobias Burnus <burnus@net-b.de>
570 * trans-stmt.c (gfc_trans_do_while): Don't change the logical
571 kind for negation of the condition.
573 2012-08-27 Tobias Burnus <burnus@net-b.de>
575 * options.c (set_Wall): Don't set for -Wcompare-reals.
576 * invoke.texi (-Wall, -Wcompare-reals): -Wall no longer
577 implies -Wcompare-reals.
579 2012-08-24 Simon Baldwin <simonb@google.com>
581 * lang.opt (-cpp=): Mark flag NoDWARFRecord.
583 2012-08-23 Tobias Burnus <burnus@net-b.de>
586 * trans-array.c (free_ss_info): Free data.array.subscript.
587 (gfc_free_ss): No longer free data.array.subscript.
588 (walk_coarray): New function, moved from trans-intrinsic.c
589 (gfc_conv_expr_descriptor): Walk array descriptor instead
590 of taking passed "ss".
591 (get_array_ctor_all_strlen, gfc_add_loop_ss_code,
592 gfc_conv_array_parameter): Update call and cleanup ss handling.
593 * trans-array.h (gfc_conv_expr_descriptor,
594 gfc_conv_array_parameter): Update prototype.
595 * trans-expr.c (gfc_conv_derived_to_class,
596 conv_isocbinding_procedure, gfc_conv_procedure_call,
597 gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
598 gfc_trans_pointer_assignment, gfc_trans_arrayfunc_assign): Update
599 call to gfc_conv_expr_descriptor and gfc_conv_array_parameter, and
601 * trans-intrinsic.c (walk_coarray): Moved to trans-array.c
602 (trans_this_image, trans_image_index, gfc_conv_intrinsic_rank
603 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_cobound,
604 gfc_conv_intrinsic_len, gfc_conv_intrinsic_size,
605 gfc_conv_intrinsic_sizeof, gfc_conv_intrinsic_storage_size,
606 gfc_conv_intrinsic_transfer, gfc_conv_allocated,
607 gfc_conv_associated, gfc_conv_intrinsic_loc,
608 conv_intrinsic_move_alloc): Update calls.
609 * trans-io.c (gfc_convert_array_to_string, set_internal_unit,
610 gfc_trans_transfer): Ditto.
611 * trans-stmt.c (gfc_conv_elemental_dependencies,
612 gfc_trans_sync, trans_associate_var,
613 gfc_trans_pointer_assign_need_temp): Ditto.
615 2012-08-23 Jakub Jelinek <jakub@redhat.com>
617 * trans-decl.c (trans_function_start, generate_coarray_init,
618 create_main_function, gfc_generate_constructors): Call
619 allocate_struct_function instead of init_function_start.
621 2012-08-22 Tobias Burnus <burnus@net-b.de>
623 * trans-expr.c (gfc_copy_class_to_class,
624 gfc_trans_arrayfunc_assign): Free loop and ss data.
625 * trans-intrinsic.c (gfc_trans_arrayfunc_assign): Free ss data.
627 2012-08-21 Tobias Burnus <burnus@net-b.de>
629 * parse.c (parse_contained): Include EXEC_END_PROCEDURE
630 in ns->code to make sure the gfc_code is freed.
632 2012-08-20 Tobias Burnus <burnus@net-b.de>
635 * expr.c (gfc_check_pointer_assign): Warn when a pointer,
636 which is a function result, might outlive its target.
638 2012-08-20 Tobias Burnus <burnus@net-b.de>
641 * expr.c (gfc_check_pointer_assign): Warn when the pointer
642 might outlive its target.
643 * gfortran.h (struct gfc_option_t): Add warn_target_lifetime.
644 * options.c (gfc_init_options, set_wall, gfc_handle_option):
646 * invoke.texi (-Wtarget-lifetime): Document it.
648 * lang.opt (-Wtarget-lifetime): New flag.
650 2012-08-19 Thomas König <tkoenig@gcc.gnu.org>
653 * gfortran.h (struct gfc_option_t): Add warn_compare_reals.
654 * lang.opt: Add Wcompare-reals.
655 * invoke.texi: Document -Wcompare-reals.
656 * resolve.c (resolve_operator): If -Wcompare-reals is in effect,
657 warn about equality/inequality comparisions for REAL and COMPLEX.
658 * options.c (gfc_init_options): Set warn_compare_reals.
659 (set_Wall): Include warn_compare_reals in Wall.
660 (gfc_handle_option): Handle Wcompare_reals.
662 2012-08-17 Jakub Jelinek <jakub@redhat.com>
664 * array.c (gfc_match_array_ref): Fix up memset arguments.
666 2012-08-16 Diego Novillo <dnovillo@google.com>
671 * gfortran.h: Do not include gmp.h.
673 2012-08-16 Diego Novillo <dnovillo@google.com>
676 * gfortran.h: Do not include gmp.h.
678 2012-08-15 Janus Weil <janus@gcc.gnu.org>
682 * resolve.c (check_typebound_baseobject): Check for class_ok attribute.
683 (resolve_procedure_interface,resolve_fl_derived0): Copy class_ok
686 2012-08-14 Mikael Morin <mikael@gcc.gnu.org>
689 * trans-expr.c (expr_is_variable): Handle regular, procedure pointer,
690 and typebound functions returning a data pointer.
692 2012-08-14 Mikael Morin <mikael@gcc.gnu.org>
694 * decl.c (match_ppc_decl): Copy the procedure interface's symbol
695 as procedure interface's result.
697 2012-08-14 Mikael Morin <mikael@gcc.gnu.org>
699 * trans-expr.c (gfc_trans_scalar_assign): Rename argument,
702 2012-08-14 Mikael Morin <mikael@gcc.gnu.org>
704 * gfortran.h (gfc_get_proc_ptr_comp): New prototype.
705 (gfc_is_proc_ptr_comp): Update prototype.
706 * expr.c (gfc_get_proc_ptr_comp): New function based on the old
707 gfc_is_proc_ptr_comp.
708 (gfc_is_proc_ptr_comp): Call gfc_get_proc_ptr_comp.
709 (gfc_specification_expr, gfc_check_pointer_assign): Use
710 gfc_get_proc_ptr_comp.
711 * trans-array.c (gfc_walk_function_expr): Likewise.
712 * resolve.c (resolve_structure_cons, update_ppc_arglist,
713 resolve_ppc_call, resolve_expr_ppc): Likewise.
714 (resolve_function): Update call to gfc_is_proc_ptr_comp.
715 * dump-parse-tree.c (show_expr): Likewise.
716 * interface.c (compare_actual_formal): Likewise.
717 * match.c (gfc_match_pointer_assignment): Likewise.
718 * primary.c (gfc_match_varspec): Likewise.
719 * trans-io.c (gfc_trans_transfer): Likewise.
720 * trans-expr.c (gfc_conv_variable, conv_function_val,
721 conv_isocbinding_procedure, gfc_conv_procedure_call,
722 gfc_trans_pointer_assignment): Likewise.
723 (gfc_conv_procedure_call, gfc_trans_array_func_assign):
724 Use gfc_get_proc_ptr_comp.
726 2012-08-14 Tobias Burnus <burnus@net-b.de>
729 * error.c (gfc_notify_std): Reset cur_error_buffer->flag flag
730 when the error/warning has been printed.
731 * gfortran.h (gfc_sl_type): Add ST_LABEL_DO_TARGET.
732 * match.c (gfc_match_do): Use ST_LABEL_DO_TARGET.
733 * parse.c (check_statement_label): Use ST_LABEL_DO_TARGET.
734 (parse_executable): Add obsolescence check for DATA.
735 * resolve.c (resolve_branch): Handle ST_LABEL_DO_TARGET.
736 * symbol.c (gfc_define_st_label, gfc_reference_st_label):
737 Add obsolescence diagnostics.
738 * trans-stmt.c (gfc_trans_label_assign): Handle ST_LABEL_DO_TARGET.
740 2012-08-14 Tobias Burnus <burnus@net-b.de>
743 * check.c (gfc_check_cmplx): Add -Wconversion warning
744 when converting higher-precision REAL to default-precision
745 CMPLX without kind= parameter.
747 2012-08-12 Tobias Burnus <burnus@net-b.de>
750 * trans-decl.c (gfc_finish_var_decl, build_function_decl):
751 Fix setting private module vars/procs as TREE_PUBLIC(...) = 0.
753 2012-08-09 Tobias Burnus <burnus@net-b.de>
756 * intrinsic.c (gfc_warn_intrinsic_shadow): Better warning
757 for internal procedures.
759 2012-08-06 Janus Weil <janus@gcc.gnu.org>
762 * interface.c (check_result_characteristics): New function, which checks
763 the characteristics of function results.
764 (gfc_compare_interfaces,gfc_check_typebound_override): Call it.
766 2012-08-02 Thomas König <tkoenig@gcc.gnu.org>
769 * scanner.c (add_path_to_list): New argument warn. Don't
771 (gfc_add_include_path): Warn if directory is missing.
772 (gfc_add_intrinsic_modules_path): Do not warn if directory
774 * optinons.c (gfc_handle_option): Do not add directory
775 for intrinsic modules to normal include path.
777 2012-08-03 Mikael Morin <mikael@gcc.gnu.org>
780 * trans-array.c (set_loop_bounds): Access specinfo using spec_dim.
782 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
785 * trans-array.c (gfc_conv_ss_startstride): Set the intrinsic
786 result's lower and upper bounds according to the rank.
787 (set_loop_bounds): Set the loop upper bound in the intrinsic case.
789 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
791 * trans-array.c (set_loop_bounds): Allow non-array-section to be
792 chosen using the stride and lower bound criteria.
794 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
796 * trans-array.c (set_loop_bounds): Remove useless dimension check.
797 Don't update loopspec if it would loose the wanted stride criterion.
799 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
801 * trans-array.h (gfc_conv_descriptor_rank): New prototype.
802 * trans-array.c (gfc_conv_descriptor_rank): New function moved and
804 * trans-intrinsic.c (get_rank_from_desc): ... from this one.
805 (gfc_conv_intrinsic_rank, gfc_conv_intrinsic_bound,
806 gfc_conv_associated): Also rename function calls.
808 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
810 * iresolve.c (resolve_bound, gfc_resolve_shape):
811 Don't set the shape for assumed rank arrays.
812 * simplify.c (gfc_simplify_shape): Don't try to simplify if the
813 argument is assumed rank.
815 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
817 * array.c (gfc_copy_array_ref): Don't copy the offset field.
818 * expr.c (find_array_section): Ignore the offset field.
819 * trans-expr.c (gfc_find_interface_mapping_to_ref): Don't apply
820 any interface mapping to the offset field.
821 * gfortran.h (struct gfc_array_ref): Remove the offset field.
823 2012-08-02 Janus Weil <janus@gcc.gnu.org>
826 * resolve.c (check_proc_interface): New routine for PROCEDURE interface
828 (resolve_procedure_interface,resolve_typebound_procedure,
829 resolve_fl_derived0): Call it.
831 2012-08-01 Thomas König <tkoenig@gcc.gnu.org>
834 * scanner.c (add_path_to_list): Emit warning if an error occurs
835 for an include path, if it is not present or if it is not a
836 directory. Do not add the path in these cases.
838 2012-07-31 Janus Weil <janus@gcc.gnu.org>
841 * decl.c (match_procedure_interface): Move some checks to
842 'resolve_procedure_interface'. Set flavor if appropriate.
843 * expr.c (gfc_check_pointer_assign): Cleanup of 'gfc_is_intrinsic'.
844 * intrinsic.c (gfc_is_intrinsic): Additional checks for attributes which
845 identify a procedure as being non-intrinsic.
846 * resolve.c (resolve_procedure_interface): Checks moved here from
847 'match_procedure_interface'. Minor cleanup.
848 (resolve_formal_arglist,resolve_symbol): Cleanup of
849 'resolve_procedure_interface'
850 (resolve_actual_arglist,is_external_proc): Cleanup of
853 2012-07-31 Janus Weil <janus@gcc.gnu.org>
856 * dependency.c (gfc_dep_compare_expr): Check if arguments are NULL.
858 2012-07-31 Tobias Burnus <burnus@net-b.de>
860 * interface.c (gfc_procedure_use): Return gfc_try instead of void.
861 * gfortran.h (gfc_procedure_use): Update prototype.
862 * resolve.c (gfc_iso_c_func_interface): Allow noninteroperable
863 procedures for c_funloc for TS29113.
864 * (gfc_iso_c_sub_interface): Ditto for c_f_procpointer. Add
865 diagnostic for c_ptr vs. c_funptr for c_f_(proc)pointer.
867 2012-07-30 Janus Weil <janus@gcc.gnu.org>
870 * gfortran.h (gfc_resolve_intrinsic): Add prototype.
871 * expr.c (gfc_check_pointer_assign): Set INTRINSIC attribute if needed.
872 Check for invalid intrinsics.
873 * primary.c (gfc_match_rvalue): Check for intrinsics came too early.
874 Set procedure flavor if appropriate.
875 * resolve.c (resolve_intrinsic): Renamed to gfc_resolve_intrinsic.
876 (resolve_procedure_interface,resolve_procedure_expression,
877 resolve_function,resolve_fl_derived0,resolve_symbol): Ditto.
879 2012-07-26 Mikael Morin <mikael@gcc.gnu.org>
882 * trans-array.c (gfc_trans_array_constructor_value):
883 Evaluate the iteration bounds before the inner variable shadows
886 2012-07-26 Mikael Morin <mikael@gcc.gnu.org>
889 * array.c (sought_symbol): New variable.
890 (expr_is_sought_symbol_ref, find_symbol_in_expr): New functions.
891 (resolve_array_list): Check for references to the induction
892 variable in the iteration bounds and issue a diagnostic if some
895 2012-07-26 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
896 Tobias Burnus <burnus@net-b.de>
898 * module.c (mio_array_spec): Don't read as->lower for
901 2012-07-25 Tobias Burnus <burnus@net-b.de>
903 * trans-types.c (gfc_real16_is_float128): Fix spelling
905 * trans.h (struct gfc_array_info): Ditto.
906 * gfortran.h (gfc_expr): Ditto.
907 * simplify.c (gfc_count): Ditto.
908 * trans-expr.c (gfc_copy_class_to_class,
909 conv_parent_component_references,
910 gfc_trans_pointer_assignment): Ditto.
911 * expr.c (check_pointer_assign): Fix diagnostic spelling.
912 * interface.c (compare_parameter): Ditto.
913 * parse.c (use_modules, parse_associate): Ditto.
914 * decl.c (match_char_length): Fix spelling of the
915 an function argument.
917 2012-07-21 Tobias Burnus <burnus@net-b.de>
919 * iso-c-binding.def (C_PTRDIFF_T): New TS29113 parameter.
920 * intrinsic.texi (ISO_C_BINDING): Document it.
922 2012-07-21 Tobias Burnus <burnus@net-b.de>
925 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Support
926 lbound/ubound with dim= for assumed-rank arrays.
927 * array.c (gfc_set_array_spec): Reject coarrays with
929 * decl.c (merge_array_spec): Ditto. Return gfc_try.
930 (match_attr_spec, match_attr_spec): Update call.
932 2012-07-21 Tobias Burnus <burnus@net-b.de>
934 * resolve.c (resolve_formal_arglist): Put variable
935 declaration before the first assignment.
937 2012-07-21 Tobias Burnus <burnus@net-b.de>
939 * trans-expr.c (gfc_conv_derived_to_class): Fix argument passed
940 to class_array_data_assign.
942 2012-07-20 Tobias Burnus <burnus@net-b.de>
944 * decl.c (gfc_verify_c_interop_param): Allow assumed-shape
947 2012-07-20 Tobias Burnus <burnus@net-b.de>
950 * array.c (match_array_element_spec, gfc_match_array_spec,
951 spec_size, gfc_array_dimen_size): Add support for
953 * check.c (dim_rank_check): Ditto.
954 * class.c (gfc_add_component_ref): Ditto.
955 (gfc_build_class_symbol): Regard assumed-rank arrays
956 as having GFC_MAX_DIMENSIONS. And build extra class
957 container for a scalar pointer class.
958 * decl.c (merge_array_spec): Add assert.
959 * dump-parse-tree.c (show_array_spec): Add support for
961 * expr.c (gfc_is_simply_contiguous): Ditto.
962 * gfortran.h (array_type): Ditto.
963 (gfc_array_spec, gfc_expr): Add comment to "rank" field.
964 * interface.c (compare_type_rank, argument_rank_mismatch,
965 compare_parameter, gfc_procedure_use): Ditto.
966 (compare_actual_formal): Fix NULL() to optional-dummy
967 handling for polymorphic dummies.
968 * module.c (mio_typespec): Add support for
970 * resolve.c (resolve_formal_arglist, resolve_actual_arglist,
971 resolve_elemental_actual, resolve_global_procedure,
972 expression_shape, resolve_variable, update_ppc_arglist,
973 check_typebound_baseobject, gfc_resolve_expr,
974 resolve_fl_var_and_proc, gfc_resolve_finalizers,
975 resolve_typebound_procedure, resolve_symbol): Ditto.
976 (assumed_type_expr_allowed): Remove static variable.
977 (actual_arg, first_actual_arg): New static variables.
978 * simplify.c (simplify_bound, gfc_simplify_range): Add
979 support for assumed-rank arrays.
980 * trans-array.c (gfc_conv_array_parameter): Ditto.
981 (gfc_get_descriptor_dimension): New function, which returns
983 (gfc_conv_descriptor_dimension): Use it.
984 (gfc_conv_descriptor_stride_get, gfc_conv_array_parameter):
985 Handle GFC_ARRAY_ASSUMED_RANK_CONT and AS_ASSUMED_RANK.
986 * trans-array.h (gfc_get_descriptor_dimension): New prototype.
987 * trans-decl. (gfc_build_dummy_array_decl,
988 gfc_trans_deferred_vars, add_argument_checking): Add
989 support for assumed-rank arrays.
990 * trans-expr.c (gfc_conv_expr_present, gfc_conv_variable,
991 gfc_conv_procedure_call): Ditto.
992 (get_scalar_to_descriptor_type, class_array_data_assign,
993 conv_scalar_to_descriptor): New static functions.
994 (gfc_conv_derived_to_class, gfc_conv_class_to_class): Use
996 * trans-intrinsic.c (get_rank_from_desc): New function.
997 (gfc_conv_intrinsic_rank, gfc_conv_associated): Use it.
998 * trans-types.c (gfc_array_descriptor_base_caf,
999 gfc_array_descriptor_base): Make space for scalar array.
1000 (gfc_is_nodesc_array, gfc_is_nodesc_array,
1001 gfc_build_array_type, gfc_get_array_descriptor_base): Add
1002 support for assumed-rank arrays.
1003 * trans.h (gfc_array_kind): Add GFC_ARRAY_ASSUMED_RANK and
1004 GFC_ARRAY_ASSUMED_RANK_CONT.
1006 2012-07-19 Tobias Burnus <burnus@net-b.de>
1008 * trans-expr.c (gfc_conv_procedure_call): Fix handling
1009 of polymorphic arguments.
1010 * resolve.c (resolve_formal_arglist): Ditto, mark polymorphic
1011 assumed-shape arrays as such.
1013 2012-07-19 Tobias Burnus <burnus@net-b.de>
1015 * interface.c (compare_parameter, compare_actual_formal): Fix
1016 handling of polymorphic arguments.
1018 2012-07-17 Janus Weil <janus@gcc.gnu.org>
1021 * error.c (gfc_notify_std): Automatically print the relevant Fortran
1023 * arith.c (arith_power): Remove explicit standard reference string.
1024 * array.c (gfc_match_array_spec, gfc_match_array_constructor): Ditto.
1025 * check.c (gfc_check_a_p, gfc_check_besn, gfc_check_count,
1026 gfc_check_float, gfc_check_fn_rc2008, gfc_check_iand,
1027 gfc_check_ichar_iachar, gfc_check_ieor, gfc_check_index, gfc_check_ior,
1028 gfc_check_lbound, gfc_check_len_lentrim, check_rest, gfc_check_min_max,
1029 gfc_check_null, gfc_check_scan, gfc_check_selected_real_kind,
1030 gfc_check_shape, gfc_check_size, gfc_check_sngl, gfc_check_ubound,
1031 gfc_check_verify): Ditto.
1032 * data.c (gfc_assign_data_value): Ditto.
1033 * decl.c (var_element, char_len_param_value, match_char_length,
1034 gfc_verify_c_interop_param, match_pointer_init, variable_decl,
1035 gfc_match_decl_type_spec, gfc_match_import, match_attr_spec,
1036 gfc_match_prefix, gfc_match_suffix, match_ppc_decl,
1037 match_procedure_in_interface, gfc_match_procedure,gfc_match_entry,
1038 gfc_match_subroutine, gfc_match_end, gfc_match_codimension,
1039 gfc_match_protected, gfc_match_value, gfc_match_volatile,
1040 gfc_match_asynchronous, gfc_match_modproc, gfc_get_type_attr_spec,
1041 gfc_match_enum, match_procedure_in_type): Ditto.
1042 * expr.c (check_elemental, gfc_check_assign, gfc_check_pointer_assign):
1044 * interface.c (gfc_match_abstract_interface, check_interface0): Ditto.
1045 * intrinsic.c (gfc_intrinsic_func_interface): Ditto.
1046 * io.c (format_lex, resolve_tag_format, resolve_tag,
1047 compare_to_allowed_values, gfc_match_open, gfc_match_rewind,
1048 gfc_resolve_dt, gfc_match_wait): Ditto.
1049 * match.c (match_arithmetic_if, gfc_match_if, gfc_match_critical,
1050 gfc_match_do, match_exit_cycle, gfc_match_pause, gfc_match_stop,
1051 gfc_match_lock, sync_statement, gfc_match_assign, gfc_match_goto,
1052 gfc_match_allocate, gfc_match_return, gfc_match_st_function): Ditto.
1053 * module.c (gfc_match_use, gfc_use_module): Ditto.
1054 * parse.c (parse_derived_contains, parse_block_construct,
1055 parse_associate, parse_contained): Ditto.
1056 * primary.c (match_hollerith_constant, match_boz_constant,
1057 match_real_constant, match_sym_complex_part, match_arg_list_function,
1058 build_actual_constructor, gfc_convert_to_structure_constructor): Ditto.
1059 * resolve.c (resolve_formal_arglist, resolve_entries,
1060 resolve_common_blocks, resolve_actual_arglist, gfc_resolve_index_1,
1061 gfc_resolve_iterator_expr, resolve_ordinary_assign,
1062 resolve_fl_var_and_proc, resolve_fl_variable_derived,
1063 resolve_fl_procedure, resolve_fl_derived0, resolve_fl_derived,
1064 resolve_fl_namelist, resolve_symbol, resolve_fntype): Ditto.
1065 * symbol.c (check_conflict, conflict, gfc_add_is_bind_c,
1066 gfc_add_extension, gfc_check_symbol_typed): Ditto.
1068 2012-07-17 Tobias Burnus <burnus@net-b.de>
1071 * decl.c (gfc_verify_c_interop_param): Make warning conditional
1072 on -Wc-binding-type works and improve the wording.
1074 2012-07-17 Tobias Burnus <burnus@net-b.de>
1077 * decl.c (match_char_length): Extra argument, show obsolenscent
1078 warning only if *length is used after the typename.
1079 (variable_decl, gfc_match_char_spec): Update call
1081 2012-07-17 Tobias Burnus <burnus@net-b.de>
1082 Steven G. Kargl <kargl@gcc.gnu.org>
1085 * decl.c (match_procedure_in_interface): Support "::" for
1086 Fortran 2008 and later.
1088 2012-07-16 Thomas König <tkoenig@gcc.gnu.org>
1091 * resolve.c (resolve_allocate_deallocate): If both
1092 start indices are NULL, skip the test for equality.
1094 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1096 * f95-lang.c: Include dumpfile.h instead of tree-dump.h.
1097 * Make-lang.in: Fix dependencies.
1099 2012-07-16 Janus Weil <janus@gcc.gnu.org>
1102 * gfortran.h (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Modified
1104 * symbol.c (gfc_copy_formal_args): New argument 'if_src'. Copy if_source
1105 of dummy procedures.
1106 (gfc_copy_formal_args_ppc): Ditto.
1107 * resolve.c (resolve_procedure_interface): Pass IFSRC_DECL to
1108 gfc_copy_formal_args.
1109 (resolve_fl_derived0): Pass IFSRC_DECL to gfc_copy_formal_args_ppc.
1111 2012-07-12 Tobias Burnus <burnus@net-b.de>
1113 * trans-expr.c (conv_isocbinding_procedure): Generate c_f_pointer code
1116 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
1118 * trans.c: Do not include defaults.h.
1119 * trans-intrinsic.c: Likewise.
1121 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
1123 * gfortran.h: Do not include coretypes.h here.
1124 Make it an error to include this before coretypes.h
1125 * openmp.c: Include coretypes.h.
1126 * interface.c: Likewise.
1127 * intrinsic.c: Likewise.
1128 * symbol.c: Likewise.
1129 * class.c: Likewise.
1131 * matchexp.c: Likewise.
1132 * dump-parse-tree.c: Likewise.
1133 * array.c: Likewise.
1134 * constructor.c: Likewise.
1135 * error.c: Likewise.
1138 * module.c: Likewise.
1139 * scanner.c: Likewise.
1142 * frontend-passes.c: Likewise.
1143 * resolve.c: Likewise.
1145 * target-memory.c: Likewise.
1146 * match.c: Likewise.
1147 * arith.c: Likewise.
1148 * parse.c: Likewise.
1149 * check.c: Likewise.
1150 * dependency.c: Likewise.
1151 * primary.c: Likewise.
1153 * simplify.c: Likewise.
1155 2012-07-05 Mikael Morin <mikael@gcc.gnu.org>
1158 * trans-array.c (gfc_add_loop_ss_code): Disable self recursive calls
1159 handling nested loop(s) if the subscript flag is true.
1161 2012-07-05 Uros Bizjak <ubizjak@gmail.com>
1164 * parse.c (gfc_parse_file): Initialize errors_before.
1166 2012-06-27 Janus Weil <janus@gcc.gnu.org>
1170 * interface.c (check_new_interface): Rename, add 'loc' argument,
1172 (gfc_add_interface): Rename 'check_new_interface'
1173 * gfortran.h (gfc_check_new_interface): Add prototype.
1174 * resolve.c (resolve_typebound_intrinsic_op): Add typebound operator
1175 targets to non-typebound operator list.
1177 2012-06-22 Janus Weil <janus@gcc.gnu.org>
1181 * interface.c (count_types_test, generic_correspondence,
1182 gfc_compare_interfaces): Ignore PASS arguments.
1183 (check_interface1, compare_parameter): Pass NULL arguments to
1184 gfc_compare_interfaces.
1185 * gfortran.h (gfc_compare_interfaces): Modified prototype.
1186 * expr.c (gfc_check_pointer_assign): Pass NULL arguments to
1187 gfc_compare_interfaces.
1188 * resolve.c (resolve_structure_cons): Ditto.
1189 (check_generic_tbp_ambiguity): Determine PASS arguments and pass them
1190 to gfc_compare_interfaces.
1192 2012-06-21 Janne Blomqvist <jb@gcc.gnu.org>
1195 * iresolve.c (gfc_resolve_ftell): Fix result kind and use new
1198 2012-06-18 Tobias Burnus <burnus@net-b.de>
1200 * intrinsic.h (gfc_resolve_rank): New prototype.
1201 * intrinsic.c (add_functions): Use gfc_resolve_rank.
1202 * iresolve.c (add_functions): New function.
1203 * trans-intrinsic.c (gfc_conv_intrinsic_rank): New function.
1204 (gfc_conv_intrinsic_function): Call it.
1206 2012-06-18 Tobias Burnus <burnus@net-b.de>
1209 * trans-array.c (set_loop_bounds): Don't scalarize via absent
1211 * resolve.c (resolve_elemental_actual): Don't stop resolving after printing
1214 2012-06-18 Tobias Burnus <burnus@net-b.de>
1217 * trans-intrinsic.c (conv_intrinsic_move_alloc): Handle coarrays.
1219 2012-06-18 Tobias Burnus <burnus@net-b.de>
1222 * check.c (gfc_check_move_alloc): Reject coindexed actual arguments
1223 and those with different corank.
1225 2012-06-17 Tobias Burnus <burnus@net-b.de>
1229 * check.c (gfc_calculate_transfer_sizes): Return if
1230 SIZE= is not constant or source-size cannot be determined.
1232 2012-06-16 Tobias Burnus <burnus@net-b.de>
1236 * frontend-passes.c (optimize_assignment): Don't remove RHS's
1237 trim when assigning to a deferred-length string.
1238 * trans-expr.c (gfc_trans_assignment_1): Ensure that the RHS string
1239 length is evaluated before the deferred-length LHS is reallocated.
1241 2012-06-13 Tobias Burnus <burnus@net-b.de>
1244 * trans-decl.c (init_intent_out_dt): Fix for polymorphic arrays.
1245 * trans-array.c (structure_alloc_comps): Don't loop for
1248 2012-06-13 Tobias Burnus <burnus@net-b.de>
1251 * decl.c (match_attr_spec): Only mark module variables
1252 as SAVE_IMPLICIT for Fortran 2008 and later.
1254 2012-06-08 Janus Weil <janus@gcc.gnu.org>
1257 * match.c (gfc_match_allocate): Modify order of checks. Change wording
1258 of error message. Remove FIXME note.
1259 * resolve.c (resolve_allocate_expr): Add a comment.
1261 2012-06-07 Thomas König <tkoenig@gcc.gnu.org>
1264 * frontend-passes.c (optimize_assignment): Don't set the
1265 length of an empty string for deferred-length character
1268 2012-06-07 Thomas König <tkoenig@gcc.gnu.org>
1271 * frontend-passes.c (empty_string): Add prototype.
1272 (optimize_assignment): Set the length of an empty string
1275 2012-06-04 Tobias Burnus <burnus@net-b.de>
1278 * resolve.c (build_default_init_expr): Don't initialize
1281 2012-06-03 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1282 Tobias Burnus <burnus@net-b.de>
1285 * gfortran.h (gfc_check_init_expr): Add prototype declaration
1287 * check.c (kind_check): Change if condition to use
1288 to gfc_check_init_expr.
1289 * expr.c (check_init_expr): Remove forward declaration
1290 and static keyword. Change name in gfc_check_init_expr.
1291 (scalarize_intrinsic_call, check_init_expr_arguments,
1292 check_inquiry, check_conversion, gfc_reduce_init_expr): Update
1293 call to gfc_check_init_expr.
1295 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
1297 * trans-common.c: Do not include output.h.
1298 * trans-decl.c: Likewise.
1300 2012-05-31 Tobias Burnus <burnus@net-b.de>
1303 * trans.c (gfc_deallocate_scalar_with_status): Properly
1304 handle the case size == 0.
1306 2012-05-30 Tobias Burnus <burnus@net-b.de>
1309 * decl.c (match_attr_spec): Remove "typedef".
1311 2012-05-30 Tobias Burnus <burnus@net-b.de>
1313 * decl.c: Fix comment typos.
1315 * frontend-passes.c: Ditto.
1318 * trans-array.c: Ditto.
1319 * trans-common.c: Ditto.
1320 * trans-intrinsic.c: Ditto.
1321 * trans-types.c: Ditto.
1323 2012-05-23 Tobias Burnus <burnus@net-b.de>
1327 * match.c (gfc_match_allocate): Set length_from_typespec
1329 * resolve.c (resolve_charlen): If set, don't check whether
1330 the len is a specification expression.
1332 2012-05-22 Tobias Burnus <burnus@net-b.de>
1335 * trans-array.c (gfc_add_loop_ss_code): Don't evaluate expression, if
1336 ss->is_alloc_lhs is set.
1338 2012-05-22 Dodji Seketeli <dodji@redhat.com>
1341 * f95-lang.c (gfc_init_builtin_functions): Remove the unused
1342 typedef builtin_type.
1344 2012-05-14 Janne Blomqvist <jb@gcc.gnu.org>
1347 * gfortran.texi: Update _gfortran_set_options documentation.
1348 * invoke.texi: Remove runtime behavior description of
1350 * trans-decl.c (create_main_function): Don't pass the range-check
1351 setting to the library.
1353 2012-05-14 Tobias Burnus <burnus@net-b.de>
1358 * trans-expr.c (gfc_trans_assignment_1): Fix allocation
1359 handling for assignment of function results to allocatable
1360 deferred-length strings.
1361 * trans-decl.c (gfc_create_string_length): For deferred-length
1362 module variables, include module name in the assembler name.
1363 (gfc_get_symbol_decl): Don't override the assembler name.
1365 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
1368 * options.c (gfc_handle_option): Call lang-specific generated function.
1370 2012-05-13 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1371 Tobias Burnus <burnus@net-b.de>
1376 * resolve.c (resolve_fl_derived0): Deferred character length
1377 procedure components are supported.
1378 * trans-expr.c (gfc_conv_procedure_call): Handle TBP with
1379 deferred-length results.
1380 (gfc_string_to_single_character): Add a new check to prevent
1382 (gfc_conv_procedure_call): Remove unuseful checks on
1383 symbol's attributes. Add new checks to prevent NULL read on
1386 2012-05-12 Tobias Burnus <burnus@net-b.de>
1390 * resolve.c (resolve_fl_procedure): Don't regard
1391 character(len=:) as character(*) in the diagnostic.
1393 2012-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1396 * frontend-passes.c (optimize_op): Change
1397 old-style comparison operators to new-style, simplify
1399 (empty_string): New function.
1400 (get_len_trim_call): New function.
1401 (optimize_comparison): If comparing to an empty string,
1402 use comparison of len_trim to zero.
1403 Use new-style comparison operators only.
1404 (optimize_trim): Use get_len_trim_call.
1406 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
1409 * options.c: Include diagnostics.h instead of
1411 (set_Wall): Do not see warn_unused here.
1412 (gfc_handle_option): Set it here using handle_generated_option.
1414 2012-05-08 Jan Hubicka <jh@suse.cz>
1416 * trans-common.c (create_common): Do not fake TREE_ASM_WRITTEN.
1417 * trans-decl.c (gfc_finish_cray_pointee): Likewise.
1419 2012-05-07 Tobias Burnus <burnus@net-b.de>
1422 * resolve.c (resolve_typebound_static): Fix handling
1423 of overridden specific to generic operator.
1425 2012-05-06 Tobias Burnus <burnus@net-b.de>
1428 * decl.c (build_struct): Don't ignore FAILED status.
1430 2012-05-05 Paul Thomas <pault@gcc.gnu.org>
1433 * trans-array.c (build_array_ref): New static function.
1434 (gfc_conv_array_ref, gfc_get_dataptr_offset): Call it.
1435 * trans-expr.c (gfc_get_vptr_from_expr): New function.
1436 (gfc_conv_derived_to_class): Add a new argument for a caller
1437 supplied vptr and use it if it is not NULL.
1438 (gfc_conv_procedure_call): Add NULL to call to above.
1439 symbol.c (gfc_is_associate_pointer): Return true if symbol is
1441 * trans-stmt.c (trans_associate_var): Handle class associate-
1443 * expr.c (gfc_get_variable_expr): Supply the array-spec if
1445 * trans-types.c (gfc_typenode_for_spec): Set GFC_CLASS_TYPE_P
1447 * trans.h : Add prototypes for gfc_get_vptr_from_expr and
1448 gfc_conv_derived_to_class. Define GFC_CLASS_TYPE_P.
1449 * resolve.c (resolve_variable): For class arrays, ensure that
1450 the target expression has all the necessary _data references.
1451 (resolve_assoc_var): Throw a "not yet implemented" error for
1452 class array selectors that need a temporary.
1453 * match.c (copy_ts_from_selector_to_associate,
1454 select_derived_set_tmp, select_class_set_tmp): New functions.
1455 (select_type_set_tmp): Call one of last two new functions.
1456 (gfc_match_select_type): Copy_ts_from_selector_to_associate is
1457 called if associate-name is typed.
1460 * resolve.c (resolve_ref): C614 applied to class expressions.
1462 2012-05-05 Janne Blomqvist <jb@gcc.gnu.org>
1466 * intrinsic.texi (MOD, MODULO): Mention sign and magnitude of result.
1467 * simplify.c (gfc_simplify_mod): Use mpfr_fmod.
1468 (gfc_simplify_modulo): Likewise, use copysign to fix the result if
1470 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Remove fallback as
1471 builtin_fmod is always available. For modulo, call copysign to fix
1472 the result when signed zeros are enabled.
1474 2012-05-05 Janne Blomqvist <jb@gcc.gnu.org>
1476 * gfortran.texi (GFORTRAN_TMPDIR): Rename to TMPDIR, explain
1477 algorithm for choosing temp directory.
1479 2012-05-04 Tobias Burnus <burnus@net-b.de>
1482 * resolve.c (resolve_variable): Set public_used
1483 if a private module variable is used in a (public)
1484 specification expression.
1485 * trans-decl.c (gfc_finish_var_decl): Mark those
1488 2012-05-04 Tobias Burnus <burnus@net-b.de>
1491 * resolve.c (resolve_fl_derived): Fix -std=f95
1492 diagnostic for generic vs. DT names.
1494 2012-05-03 Tobias Burnus <burnus@net-b.de>
1497 * interface.c (compare_parameter_intent): Remove.
1498 (check_intents): Remove call, handle CLASS pointer.
1499 (compare_actual_formal): Handle CLASS pointer.
1501 2012-04-30 Jan Hubicka <jh@suse.cz>
1503 * f95-lang.c (gfc_finish): Update comments.
1505 2012-04-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1508 * frontend-passes.c (create_var): If the statement has a label,
1509 put the label around the block.
1511 2012-04-25 Tobias Burnus <burnus@net-b.de>
1514 * lang.opt (Wrealloc-lhs, Wrealloc-lhs-all): New flags.
1515 * gfortran.h (gfc_option_t): Add them.
1516 * options.c (gfc_init_options, gfc_post_options,
1517 gfc_handle_option): Handle them.
1518 * invoke.texi: Document them.
1519 * trans-expr.c (realloc_lhs_warning): New function.
1520 (gfc_trans_arrayfunc_assign,
1521 alloc_scalar_allocatable_for_assignment,
1522 gfc_trans_assignment_1): Use it.
1524 2012-04-18 Steven Bosscher <steven@gcc.gnu.org>
1526 * trans-decl.c (gfc_trans_entry_master_switch): Build SWITCH_EXPR
1527 with NULL_TREE type instead of void_type_node.
1528 * trans-io.c (io_result): Likewise.
1529 * trans-stmt.c (gfc_trans_integer_select,
1530 gfc_trans_character_select): Likewise.
1532 2012-04-16 Tobias Burnus <burnus@net-b.de>
1535 * expr.c (gfc_check_vardef_context): Fix assignment check for
1538 2012-04-16 Janus Weil <janus@gcc.gnu.org>
1541 * class.c (gfc_build_class_symbol): Make sure the 'f2k_derived'
1542 namespace is present.
1544 2012-04-15 Janus Weil <janus@gcc.gnu.org>
1547 * trans-expr.c (gfc_conv_expr_reference): Check if the expression is a
1548 simple function call (or a more involved PPC reference).
1550 2012-04-15 Tobias Burnus <burnus@net-b.de>
1554 * gfortran.h (symbol_attribute): Add public_used.
1555 * interface.c (check_sym_interfaces, check_uop_interfaces,
1556 gfc_check_interfaces): Set it.
1557 * resolve.c (resolve_typebound_procedure): Ditto.
1558 * trans-decl.c (build_function_decl): Use it.
1560 2012-04-11 Tobias Burnus <burnus@net-b.de>
1563 * resolve.c (resolve_symbol): Fix searching for parent NS decl.
1565 2012-04-08 Tobias Burnus <burnus@net-b.de>
1568 * trans-decl.c (gfc_finish_var_decl): Don't set TREE_PUBLIC
1569 for PRIVATE module variables without C-binding label.
1572 * trans-decl.c (build_function_decl): Ditto for procedures.
1574 2012-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1577 * frontend-passes.c: Keep track of wether we are in an implicit
1578 DO loop; do not do function elimination if we are.
1580 2012-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1583 * module.c: Only mark symbols as use_only if they have been
1584 imported via an only list.
1586 2012-03-28 Paul Thomas <pault@gcc.gnu.org>
1587 Tobias Burnus <burnus@gcc.gnu.org>
1590 * match.c (gfc_match_allocate, gfc_match_deallocate): Change
1591 "not.. or" to "neither.. nor".
1592 * parse.c (decode_specification_statement): Correct error in
1593 chpice of matching function for "allocatable".
1595 2012-03-23 Janne Blomqvist <jb@gcc.gnu.org>
1597 * gfortran.h (GFC_MAX_LINE): Remove unused macro.
1599 2012-03-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1602 * error.c (gfc_widechar_display_length): Consider tabs as
1603 one character wide, as they're displayed as spaces.
1604 (show_locus): Move tab handling to...
1605 (print_wide_char_into_buffer): ... here.
1607 2012-03-17 Tobias Burnus <burnus@net-b.de>
1610 * trans-intrinsic.c (gfc_conv_associated): Fix handling of
1611 procpointer dummy arguments.
1613 2012-03-16 Janne Blomqvist <jb@gcc.gnu.org>
1615 * trans-intrinsic.c (build_round_expr): Don't use BUILT_IN_IROUND
1618 2012-03-15 Janne Blomqvist <jb@gcc.gnu.org>
1620 * f95-lang.c (gfc_init_builtin_functions): Initialize
1622 * mathbuiltins.def: Add IROUND.
1623 * trans-intrinsic.c (build_round_expr): Use BUILT_IN_IROUND if
1625 (gfc_build_intrinsic_lib_fndecls): Build iround functions.
1627 2012-03-12 Richard Guenther <rguenther@suse.de>
1629 * f95-lang.c (builtin_type_for_size): Use gfc_type_for_size.
1631 2012-03-12 Tobias Burnus <burnus@net-b.de>
1634 * decl.c (match_procedure_decl): If the interface
1635 is bind(C), the procedure is as well.
1637 2012-03-10 Steven Bosscher <steven@gcc.gnu.org>
1639 * convert.c (convert): Fold BOOLEAN_TYPE types to the proper variant.
1641 2012-03-09 Steven Bosscher <steven@gcc.gnu.org>
1643 * Make-lang.in (convert.o): Depend on convert.h.
1644 * convert.c: Header and comment cleanups.
1645 (gfc_thruthvalue_conversion): Rename static function
1646 to truthvalue_conversion. Do not use 'internal_error' from here,
1647 use 'gcc_unreachable' instead.
1648 (convert): Do not use 'error' for conversions to void, use
1649 'gcc_unreachable' instead. Likewise for conversions to non-scalar
1650 types. Do not hanlde ENUMERAL_TYPE, the front end never creates them.
1651 Clean up #if 0 code.
1653 2012-03-08 Tobias Burnus <burnus@net-b.de>
1656 * trans-types.c (gfc_get_function_type): Handle backend_decl
1657 of a procedure pointer.
1659 2012-03-06 Steven Bosscher <steven@gcc.gnu.org>
1661 * f95-lang.c (yyerror, yylex): Remove.
1662 (clear_binding_stack): Remove, fold into its only user.
1663 (LANG_HOOKS_PRINT_IDENTIFIER): Do not re-define.
1664 (ridpointers): Remove.
1665 (gfc_eh_initialized_p): Make static.
1666 (gfc_truthvalue_conversion): Move to convert.c.
1667 (gfc_be_parse_file): Clear binding level stack when done.
1668 (gfc_print_identifier): Remove.
1669 (pushlevel): Remove ignored 'ignore' argument. Update all callers.
1670 (poplevel): Remove unused 'reverse' argument. Update all callers.
1672 (gfc_builtin_function): Make static. Do not attempt to make RTL for
1674 * convert.c (gfc_truthvalue_conversion): Moved here from f95-lang.c,
1676 * trans.h (pushlevel, poplevel): Adjust prototypes.
1677 (gfc_truthvalue_conversion, gfc_builtin_function): Remove prototypes.
1678 * trans-openmp.c: Update calls to pushlevel and poplevel.
1679 * trans.c: Likewise.
1680 * trans-decl.c: Likewise.
1682 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
1685 * gfortran.h (gfc_is_class_container_ref): New prototype.
1686 * class.c (gfc_is_class_container_ref): New function.
1687 * trans-expr.c (gfc_conv_procedure_call): Add a "_data" component
1688 reference to polymorphic actual arguments.
1690 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
1693 * trans-expr.c (gfc_conv_procedure_call): Save se->ss's value.
1694 Handle the case of unallocated arrays passed to elemental procedures.
1696 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
1698 * trans.h (struct gfc_ss_info): Move can_be_null_ref component from
1699 the data::scalar subcomponent to the toplevel.
1700 * trans-expr.c (gfc_conv_expr): Update component reference.
1701 * trans-array.c (gfc_add_loop_ss_code): Ditto.
1702 (gfc_walk_elemental_function_args): Ditto. Move the conditional setting
1703 the field out of the scalar-only block.
1705 2012-03-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1708 * error.c (gfc_widechar_display_length, gfc_wide_display_length):
1710 (print_wide_char_into_buffer): Return length written.
1711 (show_locus): Fix locus displayed when wide characters are present.
1713 2012-03-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1715 * module.c (gfc_use_module): Improve error message some more.
1717 2012-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1720 * module.c (gfc_use_module): Improve error messages.
1722 2012-03-03 Tobias Burnus <burnus@net-b.de>
1725 * resolve.c (resolve_actual_arglist): Properly reset
1726 assumed_type_expr_allowed.
1728 2012-03-03 Tobias Burnus <burnus@net-b.de>
1730 * lang.opt (Wc-binding-type): New flag.
1731 * options.c (gfc_init_options, gfc_handle_option): Handle it.
1732 * invoke.texi (Wc-binding-type): Document it.
1733 * gfortran.h (gfc_option_t): Add warn_c_binding_type.
1734 * decl.c (verify_bind_c_sym): Handle -Wc-binding-type.
1735 * symbol.c (gfc_set_default_type, verify_bind_c_derived_type):
1738 2012-03-03 Tobias Burnus <burnus@net-b.de>
1741 * decl.c (gfc_match_decl_type_spec): Support type(*).
1742 (gfc_verify_c_interop): Allow type(*).
1743 * dump-parse-tree.c (show_typespec): Handle type(*).
1744 * expr.c (gfc_copy_expr): Ditto.
1745 * interface.c (compare_type_rank, compare_parameter,
1746 compare_actual_formal, gfc_procedure_use): Ditto.
1747 * libgfortran.h (bt): Add BT_ASSUMED.
1748 * misc.c (gfc_basic_typename, gfc_typename): Handle type(*).
1749 * module.c (bt_types): Ditto.
1750 * resolve.c (assumed_type_expr_allowed): New static variable.
1751 (resolve_actual_arglist, resolve_variable, resolve_symbol):
1753 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1754 * trans-types.c (gfc_typenode_for_spec, gfc_get_dtype): Ditto.
1756 2012-03-02 Tobias Burnus <burnus@net-b.de>
1759 * primary.c (gfc_match_varspec): Add missing ;.
1761 2012-03-02 Tobias Burnus <burnus@net-b.de>
1764 * primary.c (gfc_match_varspec): Add diagnostic for % with
1767 2012-03-02 Tobias Burnus <burnus@net-b.de>
1770 * expr.c (gfc_check_vardef_context): Fix check for
1771 intent-in polymorphic pointer .
1772 * interface.c (compare_parameter): Allow passing TYPE to
1773 intent-in polymorphic pointer.
1775 2012-03-02 Tobias Burnus <burnus@net-b.de>
1778 * resolve.c (resolve_intrinsic): Don't search for a
1779 function if we know that it is a subroutine.
1781 2012-02-29 Paul Thomas <pault@gcc.gnu.org>
1784 * trans-expr.c (fcncall_realloc_result): Dereference the
1785 descriptor if needed.
1787 2012-02-22 Tobias Burnus <burnus@net-b.de>
1790 * io.c (gfc_match_open): Remove bogus F2003 DELIM= check.
1792 2012-02-18 Tobias Burnus <burnus@net-b.de>
1795 * interface.c (check_interface0): Internal procs in
1796 generic interfaces are allowed in Fortran 2008.
1798 2012-02-17 Tobias Burnus <burnus@net-b.de>
1799 Roland Stigge <stigge@antcom.de>
1801 PR translation/52273
1802 * interface.c (compare_actual_formal): Fix typo "at at".
1804 2012-02-17 Tobias Burnus <burnus@net-b.de>
1806 * gfortran.texi (Q exponent-letter): Fix grammar.
1808 2012-02-17 Tobias Burnus <burnus@net-b.de>
1810 * gfortran.texi (Status): Fix typos.
1811 * invoke.texi (ffixed-form, fstack-arrays): Spell Fortran with
1814 2012-02-17 Tobias Burnus <burnus@net-b.de>
1815 Roland Stigge <stigge@antcom.de>
1817 PR translation/52232
1818 PR translation/52234
1819 PR translation/52245
1820 PR translation/52246
1821 PR translation/52262
1822 PR translation/52273
1823 * io.c (gfc_match_open): Fix typo.
1824 * interface.c (compare_actual_formal): Ditto.
1825 * lang.opt (freal-4-real-8, freal-4-real-16, freal-8-real-16): Ditto.
1826 * match.c (alloc_opt_list, gfc_match_nullify): Ditto.
1827 * check.c (gfc_check_associated, gfc_check_null): Ditto.
1829 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
1832 * trans-stmt.c (gfc_get_proc_ifc_for_call): New function.
1833 (gfc_trans_call): Use gfc_get_proc_ifc_for_call.
1835 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
1837 * trans-array.c (gfc_walk_elemental_function_args,
1838 gfc_walk_function_expr): Move call to gfc_get_proc_ifc_for_expr out
1839 of gfc_walk_elemental_function_args.
1840 * trans-stmt.c (gfc_trans_call): Ditto.
1841 * trans-array.h (gfc_get_proc_ifc_for_expr): New prototype.
1842 (gfc_walk_elemental_function_args): Update prototype.
1844 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
1846 * trans-array.c (gfc_get_proc_ifc_for_expr): New function.
1847 (gfc_walk_elemental_function_args): Move code to
1848 gfc_get_proc_ifc_for_expr and call it.
1850 2012-02-08 Tobias Burnus <burnus@net-b.de>
1853 * trans-expr.c (fcncall_realloc_result): Set also the stride.
1855 2012-02-07 Tobias Burnus <burnus@net-b.de>
1858 * trans-expr.c (gfc_conv_procedure_call): Add _data component
1859 for calls of scalar CLASS actuals to TYPE dummies.
1861 2012-02-05 Thomas König <tkoenig@gcc.gnu.org>
1864 * trans-decl.c: Warn about unused dummy procedure arguments
1865 if -Wunused-dummy-argument is specified. Suppress middle-end
1866 warnings about procedure arguments.
1868 2012-02-05 Paul Thomas <pault@gcc.gnu.org>
1870 * trans-array.c (gfc_array_allocate): Zero memory for all class
1872 * trans-stmt.c (gfc_trans_allocate): Ditto for class scalars.
1875 * trans-stmt.c (gfc_trans_allocate): Before correcting a class
1876 array reference, ensure that 'dataref' points to the _data
1877 component that is followed by the array reference..
1879 2012-02-02 Mikael Morin <mikael@gcc.gnu.org>
1885 * class.c (insert_component_ref, class_data_ref_missing,
1886 gfc_fix_class_refs): New functions.
1887 * gfortran.h (gfc_fix_class_refs): New prototype.
1888 * trans-expr.c (gfc_conv_expr): Remove special case handling and call
1889 gfc_fix_class_refs instead.
1891 2012-02-02 Paul Thomas <pault@gcc.gnu.org>
1894 * trans-expr.c (fcncall_realloc_result): If variable shape is
1895 correct, retain the bounds, whatever they are.
1897 2012-02-02 Tobias Burnus <burnus@net-b.de>
1900 * simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES.
1902 2012-02-01 Thomas König <tkoenig@gcc.gnu.org>
1905 * frontend-passes.c (convert_elseif): New function.
1906 (optimize_namespace): Call it.
1908 2012-02-01 Tobias Burnus <burnus@net-b.de>
1911 * module.c (MOD_VERSION): Bump.
1912 (mio_typebound_proc): Read/write is_operator from/to the
1915 2012-02-01 Tobias Burnus <burnus@net-b.de>
1918 * trans-expr.c (gfc_conv_procedure_call): Add array ref
1921 2012-01-31 Tobias Burnus <burnus@net-b.de>
1924 * gfortran.h (gfc_tbp_generic): Store whether the
1925 generic is an operator.
1926 * decl.c (gfc_match_generic): Set that flag.
1927 * resolve.c (check_generic_tbp_ambiguity): Use it in the
1928 gfc_compare_interfaces check.
1930 2012-01-31 Tobias Burnus <burnus@net-b.de>
1933 * class.c (gfc_find_derived_vtab): Mark _copy function as pure.
1935 2012-01-31 Tobias Burnus <burnus@net-b.de>
1938 * class.c (get_unique_hashed_string): Adapt trim length.
1939 (gfc_build_class_symbol) Encode also corank in the container name.
1941 2012-01-31 Paul Thomas <pault@gcc.gnu.org>
1944 * trans-expr.c (fcncall_realloc_result): Correct calculation of
1947 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
1949 * module.c (pointer_info): Make true_name and module pointers
1950 rather than arrays, order pointers before other fields.
1951 (free_pi_tree): free true_name and module as well.
1952 (mio_read_string): Rename to read_string.
1953 (mio_write_string): Remove.
1954 (load_commons): Use read_string.
1955 (read_module): Use read_string rather than mio_internal_string.
1956 (write_blank_common): Call write_atom directly.
1957 (write_symbol): Likewise.
1959 2012-01-29 Tobias Burnus <burnus@net-b.de>
1962 * expr.c (gfc_default_initializer): Convert the values if
1963 the type does not match.
1965 2012-01-29 Tobias Burnus <burnus@net-b.de>
1968 * trans-array.c (structure_alloc_comps): Fix assignment of
1969 polymorphic components (polymorphic deep copying).
1971 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
1974 * decl.c (set_binding_label): Make binding_label argument const.
1975 (curr_binding_label): Constify.
1976 * gfortran.h (gfc_symbol): Constify binding_label.
1977 (gfc_common_head): Likewise.
1978 (get_iso_c_sym): Likewise.
1979 * match.c (gfc_match_name_C): Constify buffer argument.
1980 * match.h (gfc_match_name_C): Likewise.
1981 * resolve.c (set_name_and_label): Constify binding_label argument.
1982 (gfc_iso_c_sub_interface): Constify binding_label variable.
1983 * symbol.c (get_iso_c_sym): Constify binding_label argument.
1985 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
1988 * decl.c (set_binding_label): Move prototype from match.h to here.
1989 (curr_binding_label): Make a pointer rather than static array.
1990 (build_sym): Check sym->binding_label pointer rather than array,
1991 update set_binding_label call, handle curr_binding_label changes.
1992 (set_binding_label): Handle new curr_binding_label, dest_label
1993 double ptr, and sym->binding_label.
1994 (verify_bind_c_sym): Handle sym->binding_label being a pointer.
1995 (set_verify_bind_c_sym): Check sym->binding_label pointer rather
1996 than array, update set_binding_label call.
1997 (gfc_match_bind_c_stmt): Handle curr_binding_label change.
1998 (match_procedure_decl): Update set_binding_label call.
1999 (gfc_match_bind_c): Change binding_label to pointer, update
2000 gfc_match_name_C call.
2001 * gfortran.h (GFC_MAX_BINDING_LABEL_LEN): Remove macro.
2002 (gfc_symbol): Make binding_label a pointer.
2003 (gfc_common_head): Likewise.
2004 * match.c (gfc_match_name_C): Heap allocate bind(C) name.
2005 * match.h (gfc_match_name_C): Change prototype argument.
2006 (set_binding_label): Move prototype to decl.c.
2007 * module.c (struct pointer_info): Make binding_label a pointer.
2008 (free_pi_tree): Free unused binding_label.
2009 (mio_read_string): New function.
2010 (mio_write_string): New function.
2011 (load_commons): Redo reading of binding_label.
2012 (read_module): Likewise.
2013 (write_common_0): Change to write empty string instead of name if
2015 (write_blank_common): Write empty string for binding label.
2016 (write_symbol): Change to write empty string instead of name if no
2018 * resolve.c (gfc_iso_c_func_interface): Don't set binding_label.
2019 (set_name_and_label): Make binding_label double pointer, use
2021 (gfc_iso_c_sub_interface): Make binding_label a pointer.
2022 (resolve_bind_c_comms): Handle cases if
2023 gfc_common_head->binding_label is NULL.
2024 (gfc_verify_binding_labels): sym->binding_label is a pointer.
2025 * symbol.c (gfc_new_symbol): Rely on XCNEW zero init for
2027 (gen_special_c_interop_ptr): Don't set binding label.
2028 (generate_isocbinding_symbol): Insert binding_label into symbol
2030 (get_iso_c_sym): Use pointer assignment instead of strcpy.
2031 * trans-common.c (gfc_sym_mangled_common_id): Handle
2032 com->binding_label being a pointer.
2033 * trans-decl.c (gfc_sym_mangled_identifier): Handle
2034 sym->binding_label being a pointer.
2035 (gfc_sym_mangled_function_id): Likewise.
2037 2012-01-29 Tobias Burnus <burnus@net-b.de>
2040 * resolve.c (symbol_as): Remove unused, accidentally
2043 2012-01-28 Tobias Burnus <burnus@net-b.de>
2046 * trans-stmt.c (gfc_trans_allocate): Properly check whether
2047 we have a BT_CLASS which needs to be memset.
2049 2012-01-27 Tobias Burnus <burnus@net-b.de>
2052 * trans-expr.c (gfc_conv_procedure_call): Fix passing
2053 of functions, which return allocatables.
2055 2012-01-27 Tobias Burnus <burnus@net-b.de>
2058 * resolve.c (resolve_formal_arglist): Fix elemental
2059 constraint checks for polymorphic dummies also for
2062 2012-01-27 Tobias Burnus <burnus@net-b.de>
2066 * primary.c (gfc_match_varspec. gfc_match_rvalue): Set
2067 handle array spec for BT_CLASS.
2068 * expr.c (gfc_get_variable_expr, gfc_lval_expr_from_sym)
2069 * frontend-passes.c (create_var): Ditto.
2070 * resolve.c (resolve_actual_arglist, resolve_assoc_var): Ditto.
2071 * trans-decl.c (gfc_trans_deferred_vars): Use class_pointer
2072 instead of attr.pointer.
2073 (gfc_generate_function_code): Use CLASS_DATA (sym) for BT_CLASS.
2074 * trans-intrinsic.c (conv_intrinsic_move_alloc): Move assert.
2075 * trans-stmt.c (trans_associate_var): Ask for the descriptor.
2077 2012-01-27 Tobias Burnus <burnus@net-b.de>
2080 * match.c (gfc_match_allocate): Allow more than allocate
2081 object with SOURCE=.
2083 2012-01-27 Tobias Burnus <burnus@net-b.de>
2086 * resolve.c (resolve_formal_arglist): Fix elemental
2087 constraint checks for polymorphic dummies.
2089 2012-01-27 Paul Thomas <pault@gcc.gnu.org>
2090 Tobias Burnus <burnus@gcc.gnu.org>
2096 * trans-array.c (gfc_array_init_size): Add two extra arguments
2097 to convey the dynamic element size of a calls object and to
2098 return the number of elements that have been allocated.
2099 (gfc_array_allocate): Add the same arguments and use them to
2100 call gfc_array_init_size. Before the allocation dereference
2101 the data pointer, if necessary. Set the allocated array to zero
2102 if the class element size or expr3 are non-null.
2103 * trans-expr.c (gfc_conv_class_to_class): Give this function
2105 (get_class_array_ref): New function.
2106 (gfc_copy_class_to_class): New function.
2107 * trans-array.h : Update prototype for gfc_array_allocate.
2108 * trans-stmt.c (gfc_trans_allocate): For non-variable class
2109 STATUS expressions extract the class object and the dynamic
2110 element size. Use the latter to call gfc_array_allocate and
2111 the former for setting the vptr and, via
2112 gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
2113 * trans.h : Prototypes for gfc_get_class_array_ref,
2114 gfc_copy_class_to_class and gfc_conv_class_to_class.
2116 2012-01-25 Tobias Burnus <burnus@net-b.de>
2118 * resolve.c (symbol_as): Check also for attr.class_ok.
2120 2012-01-25 Tobias Burnus <burnus@net-b.de>
2123 * class.c (gfc_build_class_symbol): Fix invalid freeing
2124 issue with fclass->f2k_derived.
2126 2012-01-25 Tobias Burnus <burnus@net-b.de>
2129 * class.c (gfc_build_class_symbol): Ensure that
2130 fclass->f2k_derived is set.
2132 2012-01-25 Tobias Burnus <burnus@net-b.de>
2135 * resolve.c (resolve_structure_cons): Only create an
2136 array constructors for nonscalars.
2138 2012-01-23 Tobias Burnus <burnus@net-b.de>
2141 * check.c (variable_check): Fix checking for
2142 variables and deeply nested BLOCKs.
2144 2012-01-21 Tobias Burnus <burnus@net-b.de>
2145 Steven G. Kargl <kargl@gcc.gnu.org>
2148 * symbol.c (check_conflict): namelist-group-name cannot have the SAVE
2151 2012-01-21 Tobias Burnus <burnus@net-b.de>
2154 * interface.c (compare_parameter): Fix CLASS comparison.
2156 2012-01-20 Tobias Burnus <burnus@net-b.de>
2157 Janus Weil <janus@gcc.gnu.org>
2160 * module.c (load_needed, read_module): Don't mark __vtab etc.
2163 2012-01-19 Tobias Burnus <burnus@net-b.de>
2166 * expr.c (gfc_build_intrinsic_call): Also set the symtree.
2168 2012-01-18 Paul Thomas <pault@gcc.gnu.org>
2171 * trans-expr.c (gfc_conv_procedure_call): Deallocate allocatable
2172 components of temporary class arguments.
2174 2012-01-17 Tobias Burnus <burnus@net-b.de>
2175 Janne Blomqvist <jb@gcc.gnu.org>
2178 * trans-expr.c (alloc_scalar_allocatable_for_assignment): Nullify
2179 LHS after allocation, if it has allocatable components.
2180 * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_CALLOC.
2182 2012-01-16 Mikael Morin <mikael@gcc.gnu.org>
2183 Tobias Burnus <burnus@net-b.de>
2186 * trans-array.c (gfc_walk_elemental_function_args): Fix
2187 passing of deallocated allocatables/pointers as absent argument.
2189 2012-01-16 Tobias Burnus <burnus@net-b.de>
2192 * class.c (gfc_find_derived_vtab): Mark __vtab and
2193 __def_init as FL_VARIABLE not as FL_PARAMETER.
2194 * expr.c (gfc_simplify_expr): Remove special
2196 * resolve.c (resolve_values): Ditto.
2197 * trans-decl.c (gfc_get_symbol_decl): Mark __vtab
2198 and __def_init as TREE_READONLY.
2200 2012-01-16 Zydrunas Gimbutas <gimbutas@cims.nyu.edu>
2201 Andreas Kloeckner <kloeckner@cims.nyu.edu>
2202 Steven G. Kargl <kargl@gcc.gnu.org>
2205 * gfortran.h (gfc_option_t): Add members flag_*_kind to store kind.
2206 * lang.opt: Add options -freal-4-real-8, -freal-4-real-10,
2207 -freal-4-real-16, -freal-8-real-4, -freal-8-real-10, -freal-8-real-16
2208 and -finteger-4-integer-8. User-desired type conversion information.
2209 * decl.c (gfc_match_old_kind_spec,kind_expr): Type conversions
2210 in declaration parsing.
2211 * trans-types.c (gfc_init_kinds): User-specified type conversion
2212 checked for current backend.
2213 * primary.c (match_integer_constant,match_real_constant): Implement
2214 type conversion in constant parsing.
2215 * options.c (gfc_init_options,gfc_handle_option): Translate input
2216 options to flags in internal options data structure.
2217 * invoke.texi: Document new options. Re-order options in Options
2220 2012-01-16 Paul Thomas <pault@gcc.gnu.org>
2222 * trans-array.c (gfc_trans_create_temp_array): In the case of a
2223 class array temporary, detect a null 'eltype' on entry and use
2224 'initial' to provde the class reference and so, through the
2225 vtable, the element size for the dynamic type.
2226 * trans-stmt.c (gfc_conv_elemental_dependencies): For class
2227 expressions, set 'eltype' to null and pass the values via the
2228 'initial' expression.
2230 2012-01-14 Tobias Burnus <burnus@net-b.de>
2233 * resolve.c (build_default_init_expr): Also initialize
2234 nonconstant-length strings with -finit-character=<n>.
2236 2011-01-14 Tobias Burnus <burnus@net-b.de>
2239 * module.c (read_module): Don't make nonexisting
2240 intrinsic operators as found.
2241 (rename_list_remove_duplicate): New function.
2242 (gfc_use_modules): Use it.
2244 2012-01-13 Paul Thomas <pault@gcc.gnu.org>
2247 * trans-array.c (structure_alloc_comps): Suppress interative
2248 call to self, when current component is deallocated using
2249 gfc_trans_dealloc_allocated.
2250 * class.c (gfc_build_class_symbol): Copy the 'alloc_comp'
2251 attribute from the declared type to the class structure.
2253 2012-01-13 Tobias Burnus <burnus@net-b.de>
2256 * fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE
2257 instead of a signed int of size POINTER_SIZE for
2258 gfc_index_integer_kind.
2260 2012-01-12 Tobias Burnus <burnus@net-b.de>
2263 * intrinsic.texi (CHMOD): Extend a bit and remove statement
2264 that /bin/chmod is called.
2266 2012-01-10 Gerald Pfeifer <gerald@pfeifer.com>
2268 * gfortran.texi (Fortran 2003 Status): Fix grammar.
2270 2012-01-10 Tobias Burnus <burnus@net-b.de>
2273 * resolve.c (resolve_allocate_expr): For non-deferred char lengths,
2274 check whether type-spec matches declaration.
2276 2012-01-10 Tobias Burnus <burnus@net-b.de>
2278 * resolve.c (resolve_ordinary_assign): Improve error wording.
2280 2012-01-09 Paul Thomas <pault@gcc.gnu.org>
2283 * interface.c (matching_typebound_op): Drill down through
2284 possible parentheses to obtain base expression. Do not test for
2285 'class_ok' but, instead for the class structure components.
2286 * resolve.c (resolve_ordinary_assign): Extend error message for
2287 polymorphic assignment to advise checking for specific
2291 * resolve.c (resolve_typebound_function): Restore 'static' to
2294 2012-01-09 Mikael Morin <mikael@gcc.gnu.org>
2297 * trans-array.c (gfc_walk_elemental_function_args):
2298 Skip over NULL() actual arguments.
2300 2012-01-09 Tobias Burnus <burnus@net-b.de>
2302 * gfortran.texi: Bump copyright year.
2303 (Fortran 2003 Status): Update polymorphism item, add
2304 item for generic interface with DT name.
2306 2012-01-09 Tobias Burnus <burnus@net-b.de>
2309 * gfortran.h (gfc_use_list):
2310 * match.h (gfc_use_module): Rename to ...
2311 (gfc_use_modules): ... this.
2312 * module.c (use_locus, specified_nonint, specified_int): Remove
2314 (module_name): Change type to const char*, used with gfc_get_string.
2315 (module_list): New global variable.
2316 (free_rename): Free argument not global var.
2317 (gfc_match_use): Save match to module_list.
2318 (load_generic_interfaces, read_module): Don't free symtree.
2319 (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
2320 type change of module_name.
2321 (write_symbol0, write_generic): Optimize due to the type change.
2322 (import_iso_c_binding_module, use_iso_fortran_env_module): Use
2323 locus of rename->where.
2324 (gfc_use_module): Take module_list as argument.
2325 (gfc_use_modules): New function.
2326 (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
2327 * parse.c (last_was_use_stmt): New global variable.
2328 (use_modules): New function.
2329 (decode_specification_statement, decode_statement): Move USE match up
2330 and call use_modules.
2331 (next_free, next_fixed): Call use_modules.
2332 (accept_statement): Don't call gfc_module_use.
2334 2012-01-06 Tobias Burnus <burnus@net-b.de>
2336 * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
2337 Update call to gfc_trans_dealloc_allocated.
2338 * trans.c (gfc_allocate_using_malloc): Fix spacing.
2339 (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
2340 label_finish when an error occurs.
2341 (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
2342 * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
2344 (gfor_fndecl_caf_deregister): New tree symbol.
2345 * trans-expr.c (gfc_conv_procedure_call): Update
2346 gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
2347 * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
2348 structure_alloc_comps, gfc_trans_deferred_array): Ditto.
2349 (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
2350 * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
2351 gfc_trans_dealloc_allocated): Update prototypes.
2352 * trans-stmt.c (gfc_trans_sync): Fix indentation.
2353 (gfc_trans_allocate): Fix errmsg padding and label handling.
2354 (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
2355 * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
2356 * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
2357 to avoid other stats accidentally matching this one.
2358 * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
2359 (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
2360 and add decl for caf_deregister.
2361 (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
2362 * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
2363 gfc_deallocate_with_status.
2365 2012-01-05 Paul Thomas <pault@gcc.gnu.org>
2368 * resolve.c (resolve_typebound_static): If the typebound
2369 procedure is 'deferred' try to find the correct specific
2370 procedure in the derived type operator space itself.
2372 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
2375 * trans-array.h (gfc_walk_elemental_function_args): New argument.
2376 * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
2377 * trans-stmt.c (gfc_trans_call): Ditto.
2378 * trans-array.c (gfc_walk_function_expr): Ditto.
2379 (gfc_walk_elemental_function_args): Get the dummy argument list
2380 if possible. Check that the dummy and the actual argument are both
2381 optional, and set can_be_null_ref accordingly.
2383 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
2386 * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
2387 * trans-array.c: If the reference can be NULL, save the reference
2388 instead of the value.
2389 * trans-expr.c (gfc_conv_expr): If we have saved a reference,
2392 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
2394 * trans-expr.c (gfc_conv_expr): Move address taking...
2395 (gfc_conv_expr_reference): ... here.
2397 2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
2400 * trans-common.c (create_common): Update copyright years. Mark
2401 variables as used to avoid warnings about unused variables in
2404 2012-01-03 Hans-Peter Nilsson <hp@axis.com>
2406 * gfortran.h (struct gfc_expr): Add missing "struct"
2407 qualifier for member base_expr.
2409 2012-01-02 Paul Thomas <pault@gcc.gnu.org>
2412 * trans-array.c (gfc_array_allocate): Null allocated memory of
2413 newly allocted class arrays.
2418 * interface.c(build_compcall_for_operator): Add a type to the
2420 * trans-expr.c (conv_base_obj_fcn_val): New function.
2421 (gfc_conv_procedure_call): Use base_expr to detect non-variable
2422 base objects and, ensuring that there is a temporary variable,
2423 build up the typebound call using conv_base_obj_fcn_val.
2424 (gfc_trans_class_assign): Pick out class procedure pointer
2425 assignments and do the assignment with no further prcessing.
2426 (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
2427 gfc_trans_class_assign): Move to top of file.
2428 * gfortran.h : Add 'base_expr' field to gfc_expr.
2429 * resolve.c (get_declared_from_expr): Add 'types' argument to
2430 switch checking of derived types on or off.
2431 (resolve_typebound_generic_call): Set the new argument.
2432 (resolve_typebound_function, resolve_typebound_subroutine):
2433 Set 'types' argument for get_declared_from_expr appropriately.
2434 Identify base expression, if not a variable, in the argument
2435 list of class valued calls. Assign it to the 'base_expr' field
2436 of the final expression. Strip away all references after the
2437 last class reference.
2439 2012-01-02 Tobias Burnus <burnus@net-b.de>
2442 * trans-intrinsic.c (trans_this_image, trans_image_index,
2443 trans_num_images, conv_intrinsic_cobound): Fold_convert the
2444 caf_num_images/caf_this_images variables to the correct int kind.
2446 2012-01-01 Jakub Jelinek <jakub@redhat.com>
2448 * gfortranspec.c (lang_specific_driver): Update copyright notice
2451 Copyright (C) 2012 Free Software Foundation, Inc.
2453 Copying and distribution of this file, with or without modification,
2454 are permitted in any medium without royalty provided the copyright
2455 notice and this notice are preserved.