1 2014-03-20 Tobias Burnus <burnus@net-b.de>
5 * gfortran.h (gfc_unset_implicit_pure): New prototype.
6 * resolve.c (gfc_unset_implicit_pure): New.
7 (resolve_structure_cons, resolve_function,
8 pure_subroutine, resolve_ordinary_assign): Use it.
9 * decl.c (match_old_style_init, gfc_match_data,
10 match_pointer_init, variable_decl): Ditto.
11 * expr.c (gfc_check_pointer_assign): Ditto.
12 * intrinsic.c (gfc_intrinsic_sub_interface): Ditto.
13 * io.c (match_vtag, gfc_match_open, gfc_match_close,
14 match_filepos, gfc_match_inquire, gfc_match_print,
15 gfc_match_wait, check_io_constraints): Ditto.
16 * match.c (gfc_match_critical, gfc_match_stopcode,
17 lock_unlock_statement, sync_statement, gfc_match_allocate,
18 gfc_match_deallocate): Ditto.
19 * parse.c (decode_omp_directive): Ditto.
20 * symbol.c (gfc_add_save): Ditto.
22 2014-03-09 Janus Weil <janus@gcc.gnu.org>
25 2014-03-08 Janus Weil <janus@gcc.gnu.org>
28 * simplify.c (gfc_simplify_shape): Only clear shape if it was really
31 2014-03-02 Mikael Morin <mikael@gcc.gnu.org>
34 * frontend-passes.c (optimize_comparison): Guard two union accesses
35 with the corresponding tag checks.
37 2014-02-22 Mikael Morin <mikael@gcc.gnu.org>
40 * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Calculate the
43 2014-02-20 Janus Weil <janus@gcc.gnu.org>
45 Backport from mainline
46 2014-02-17 Janus Weil <janus@gcc.gnu.org>
49 * resolve.c (build_default_init_expr): Don't initialize character
50 variable if -fno-automatic is given.
52 2014-02-08 Mikael Morin <mikael@gcc.gnu.org>
55 * primary.c (gfc_convert_to_structure_constructor): Avoid null pointer
58 2014-02-08 Paul Thomas <pault@gcc.gnu.org>
61 * trans-array.c (gfc_add_loop_ss_code): In the case of character
62 SS_REFERENCE, use gfc_conv_string_parameter to ensure that a
63 pointer to the string is stored.
64 * trans-expr.c (gfc_conv_expr_reference): Likewise, use
65 gfc_conv_string_parameter to ensure that a pointer to is passed
66 to the elemental function.
68 2014-02-03 Janus Weil <janus@gcc.gnu.org>
71 * expr.c (replace_comp): Check for isym to avoid ICE.
73 2014-01-27 Mikael Morin <mikael@gcc.gnu.org>
76 * module.c (skip_list): Don't use default argument value.
77 (load_derived_extensions, read_module): Update callers.
79 2014-01-26 Mikael Morin <mikael@gcc.gnu.org>
82 * module.c (fp2, find_pointer2): Remove.
83 (mio_component_ref): Don't forcedfully set the containing derived type
84 symbol for loading. Remove unused argument.
85 (mio_ref): Update caller
86 (skip_list): New argument nest_level. Initialize level with the new
88 (read_module): Add forced pointer components association for derived
91 2014-01-11 Janus Weil <janus@gcc.gnu.org>
93 Backport from mainline
94 2013-12-29 Janus Weil <janus@gcc.gnu.org>
98 * dump-parse-tree.c (show_typespec): Check for charlen.
99 * invoke.texi: Fix documentation of -fdump-fortran-optimized and
102 2013-11-17 Paul Thomas <pault@gcc.gnu.org>
105 * trans-io.c (transfer_expr): If the backend_decl for a derived
106 type is missing, build it with gfc_typenode_for_spec.
108 2013-11-02 Janus Weil <janus@gcc.gnu.org>
110 Backport from mainline
111 2013-09-23 Janus Weil <janus@gcc.gnu.org>
114 * decl.c (check_extended_derived_type): Prevent segfault, modify error
117 2013-08-11 Janus Weil <janus@gcc.gnu.org>
120 2013-08-09 Janus Weil <janus@gcc.gnu.org>
123 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Free the temporary
124 string, if necessary.
126 2013-07-08 Tobias Burnus <burnus@net-b.de>
129 * simplify.c (compute_dot_product): Complex conjugate for
131 (gfc_simplify_dot_product, gfc_simplify_matmul): Update call.
133 2013-06-06 Tobias Burnus <burnus@net-b.de>
135 Backport from mainline
136 2012-08-27 Tobias Burnus <burnus@net-b.de>
139 * trans-stmt.c (gfc_trans_do_while): Don't change the logical
140 kind for negation of the condition.
142 2013-06-01 Janus Weil <janus@gcc.gnu.org>
143 Tobias Burnus <burnus@net-b.de>
146 * interface.c (check_dummy_characteristics): Symmetrize type check.
148 2013-05-22 Janne Blomqvist <jb@gcc.gnu.org>
150 * intrinsic.texi (RANDOM_SEED): Improve example.
152 2013-05-07 Tobias Burnus <burnus@net-b.de>
154 Backport from mainline
155 2013-05-02 Tobias Burnus <burnus@net-b.de>
158 * simplify.c (gfc_simplify_size): Renamed from
159 simplify_size; fix kind=8 handling.
160 (gfc_simplify_size): New function.
161 (gfc_simplify_shape): Add range check.
162 * resolve.c (resolve_function): Fix handling
165 2013-04-26 Janus Weil <janus@gcc.gnu.org>
167 Backports from trunk:
170 * expr.c (gfc_check_pointer_assign): Handle generic functions returning
175 * check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE
177 * target-memory.h (gfc_element_size): New prototype.
178 * target-memory.c (size_array): Remove.
179 (gfc_element_size): New function.
180 (gfc_target_expr_size): Modified to always return the full size of the
183 2013-04-18 Tobias Burnus <burnus@net-b.de>
186 * invoke.texi (NEAREST): S argument is not optional.
188 2013-04-11 Release Manager
190 * GCC 4.7.3 released.
192 2013-03-15 Tobias Burnus <burnus@net-b.de>
195 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Pack arrays
196 if they are not simply contiguous.
198 2013-03-13 Paul Thomas <pault@gcc.gnu.org>
201 * expr.c (gfc_default_initializer): Check that a class declared
202 type has any components.
203 * resolve.c (resolve_fl_derived0): On failing the test for C437
204 set the type to BT_UNKNOWN to prevent repeat error messages.
206 2013-03-10 Paul Thomas <pault@gcc.gnu.org>
209 * check.c (array_check): It is an error if a procedure is
212 2013-02-22 Janus Weil <janus@gcc.gnu.org>
215 * trans-array.c (structure_alloc_comps): Handle procedure-pointer
216 components with allocatable result.
218 2013-02-17 Tobias Burnus <burnus@net-b.de>
219 Mikael Morin <mikael@gcc.gnu.org>
222 2013-01-28 Tobias Burnus <burnus@net-b.de>
223 Mikael Morin <mikael@gcc.gnu.org>
226 * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
228 (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
229 * decl.c (gfc_match_data_decl): Ditto.
230 (variable_decl): Remove undeclared type error.
231 (gfc_match_import): Use renamed instead of original name.
233 2013-02-15 Tobias Burnus <burnus@net-b.de>
234 Mikael Morin <mikael@gcc.gnu.org>
237 * simplify.c (gfc_simplify_matmul): Fix result shape
240 2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
245 * decl.c (gfc_match_end): Remove half-ready namespace
246 from parent if the end of a block is missing.
247 * parse.c (parse_module): Do not put namespace into
250 2013-02-01 Jakub Jelinek <jakub@redhat.com>
252 Backported from mainline
253 2013-01-23 Jakub Jelinek <jakub@redhat.com>
256 * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
257 and DECL_IGNORED_P on select_type_temporary and don't set
260 2013-01-24 Janus Weil <janus@gcc.gnu.org>
263 * resolve.c (resolve_select): Add argument 'select_type', reject
264 non-scalar expressions.
265 (resolve_select_type,resolve_code): Pass new argument to
268 2013-01-17 Janus Weil <janus@gcc.gnu.org>
271 * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
274 2013-01-13 Janus Weil <janus@gcc.gnu.org>
277 * trans-array.c (gfc_conv_array_parameter): No packing was done for
278 full arrays of derived type.
280 2013-01-13 Paul Thomas <pault@gcc.gnu.org>
283 * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
284 character function arguments to elemental procedures in
287 2013-01-08 Mikael Morin <mikael@gcc.gnu.org>
292 * module.c (read_module): Don't reuse local symtree if the associated
293 symbol isn't exactly the one wanted. Don't reuse local symtree if it is
295 * resolve.c (resolve_call): Use symtree's name instead of symbol's to
298 2013-01-07 Tobias Burnus <burnus@net-b.de>
299 Thomas Koenig <tkoenig@gcc.gnu.org>
300 Jakub Jelinek <jakub@redhat.com>
303 * expr.c (gfc_build_intrinsic_call): Avoid clashes
304 with user's procedures.
305 * gfortran.h (gfc_build_intrinsic_call): Update prototype.
306 (GFC_PREFIX): Define.
307 * simplify.c (gfc_simplify_size): Update call.
309 2013-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
310 Mikael Morin <mikael@gcc.gnu.org>
313 * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
315 * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
317 2012-12-20 Tobias Burnus <burnus@net-b.de>
320 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ensure that
321 the string length is of type gfc_charlen_type_node.
323 2012-11-24 Thomas Koenig <tkoenig@gcc.gnu.org>
327 * resolve.c (resolve_allocate_deallocate): Compare all
328 subscripts when deciding if to reject a (de)allocate
331 2012-11-23 Janus Weil <janus@gcc.gnu.org>
334 * trans-decl.c (generate_local_decl): Don't warn for explicitly imported
335 but unused module variables which are in a namelist or common block.
337 2012-11-06 Janus Weil <janus@gcc.gnu.org>
340 * target-memory.c (gfc_target_expr_size,gfc_target_interpret_expr):
343 2012-10-14 Janus Weil <janus@gcc.gnu.org>
346 * trans-stmt.c (gfc_trans_allocate): Correctly determine the reference
347 to the _data component for polymorphic allocation with SOURCE.
349 2012-09-20 Release Manager
351 * GCC 4.7.2 released.
353 2012-09-13 Tobias Burnus <burnus@net-b.de>
356 * resolve.c (resolve_formal_arglist): Allow VALUE arguments
358 (gfc_impure_variable): Don't check gfc_pure such that the
359 function also works for gfc_implicit_pure procedures.
361 2012-09-12 Tobias Burnus <burnus@net-b.de>
365 * array.c (match_subscript, gfc_match_array_ref): Fix
366 diagnostic of coarray's '*'.
368 2012-09-10 Janus Weil <janus@gcc.gnu.org>
372 * match.c (gfc_match_select_type): Make sure to only access CLASS_DATA
375 2012-09-08 Mikael Morin <mikael@gcc.gnu.org>
378 * simplify.c (simplify_bound_dim): Resolve array spec before
379 proceeding with simplification.
381 2012-07-06 Mikael Morin <mikael@gcc.gnu.org>
384 * trans-array.c (gfc_add_loop_ss_code): Disable self recursive calls
385 handling nested loop(s) if the subscript flag is true.
387 2012-06-22 Tobias Burnus <burnus@net-b.de>
389 Backport from mainline
390 2012-06-17 Tobias Burnus <burnus@net-b.de>
394 * check.c (gfc_calculate_transfer_sizes): Return if
395 SIZE= is not constant or source-size cannot be determined.
397 2012-06-14 Tobias Burnus <burnus@net-b.de>
399 Backport from mainline
400 2012-06-04 Tobias Burnus <burnus@net-b.de>
403 * resolve.c (build_default_init_expr): Don't initialize
406 2012-06-14 Tobias Burnus <burnus@net-b.de>
409 * decl.c (match_attr_spec): Only mark module variables
410 as SAVE_IMPLICIT for Fortran 2008 and later.
412 2012-06-14 Release Manager
414 * GCC 4.7.1 released.
416 2012-06-01 Tobias Burnus <burnus@net-b.de>
419 * trans.c (gfc_deallocate_scalar_with_status): Properly
420 handle the case size == 0.
422 2012-05-23 Tobias Burnus <burnus@net-b.de>
425 * trans-array.c (gfc_add_loop_ss_code): Don't evaluate expression, if
426 ss->is_alloc_lhs is set.
428 2012-05-07 Tobias Burnus <burnus@net-b.de>
430 Backport from mainline:
431 2012-05-07 Tobias Burnus <burnus@net-b.de>
434 * resolve.c (resolve_typebound_static): Fix handling
435 of overridden specific to generic operator.
437 2012-05-05 Tobias Burnus <burnus@net-b.de>
439 Backport from mainline:
440 2012-05-04 Tobias Burnus <burnus@net-b.de>
443 * resolve.c (resolve_fl_derived): Fix -std=f95
444 diagnostic for generic vs. DT names.
446 2012-05-02 Tobias Burnus <burnus@net-b.de>
448 Backport from mainline
449 2012-04-12 Tobias Burnus <burnus@net-b.de>
452 * expr.c (gfc_check_vardef_context): Fix assignment check for
455 2012-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
459 * frontend-passes.c (create_var): If the statement has a label,
460 put the label around the block.
462 2012-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
466 * frontend-passes.c: Keep track of wether we are in an implicit
467 DO loop; do not do function elimination if we are.
469 2012-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
473 * module.c: Only mark symbols as use_only if they have been
474 imported via an only list.
476 2012-03-22 Tobias Burnus <burnus@net-b.de>
479 * resolve.c (resolve_intrinsic): Don't search for a
480 function if we know that it is a subroutine.
482 2012-03-22 Release Manager
484 * GCC 4.7.0 released.
486 2012-03-10 Tobias Burnus <burnus@net-b.de>
489 * trans-types.c (gfc_get_function_type): Handle backend_decl
490 of a procedure pointer.
492 2012-02-29 Paul Thomas <pault@gcc.gnu.org>
495 * trans-expr.c (fcncall_realloc_result): Dereference the
496 descriptor if needed.
498 2012-02-22 Tobias Burnus <burnus@net-b.de>
501 * io.c (gfc_match_open): Remove bogus F2003 DELIM= check.
503 2012-02-18 Tobias Burnus <burnus@net-b.de>
506 * interface.c (check_interface0): Internal procs in
507 generic interfaces are allowed in Fortran 2008.
509 2012-02-17 Tobias Burnus <burnus@net-b.de>
510 Roland Stigge <stigge@antcom.de>
513 * interface.c (compare_actual_formal): Fix typo "at at".
515 2012-02-17 Tobias Burnus <burnus@net-b.de>
517 * gfortran.texi (Q exponent-letter): Fix grammar.
519 2012-02-17 Tobias Burnus <burnus@net-b.de>
521 * gfortran.texi (Status): Fix typos.
522 * invoke.texi (ffixed-form, fstack-arrays): Spell Fortran with
525 2012-02-17 Tobias Burnus <burnus@net-b.de>
526 Roland Stigge <stigge@antcom.de>
534 * io.c (gfc_match_open): Fix typo.
535 * interface.c (compare_actual_formal): Ditto.
536 * lang.opt (freal-4-real-8, freal-4-real-16, freal-8-real-16): Ditto.
537 * match.c (alloc_opt_list, gfc_match_nullify): Ditto.
538 * check.c (gfc_check_associated, gfc_check_null): Ditto.
540 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
543 * trans-stmt.c (gfc_get_proc_ifc_for_call): New function.
544 (gfc_trans_call): Use gfc_get_proc_ifc_for_call.
546 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
548 * trans-array.c (gfc_walk_elemental_function_args,
549 gfc_walk_function_expr): Move call to gfc_get_proc_ifc_for_expr out
550 of gfc_walk_elemental_function_args.
551 * trans-stmt.c (gfc_trans_call): Ditto.
552 * trans-array.h (gfc_get_proc_ifc_for_expr): New prototype.
553 (gfc_walk_elemental_function_args): Update prototype.
555 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
557 * trans-array.c (gfc_get_proc_ifc_for_expr): New function.
558 (gfc_walk_elemental_function_args): Move code to
559 gfc_get_proc_ifc_for_expr and call it.
561 2012-02-08 Tobias Burnus <burnus@net-b.de>
564 * trans-expr.c (fcncall_realloc_result): Set also the stride.
566 2012-02-07 Tobias Burnus <burnus@net-b.de>
569 * trans-expr.c (gfc_conv_procedure_call): Add _data component
570 for calls of scalar CLASS actuals to TYPE dummies.
572 2012-02-05 Thomas König <tkoenig@gcc.gnu.org>
575 * trans-decl.c: Warn about unused dummy procedure arguments
576 if -Wunused-dummy-argument is specified. Suppress middle-end
577 warnings about procedure arguments.
579 2012-02-05 Paul Thomas <pault@gcc.gnu.org>
581 * trans-array.c (gfc_array_allocate): Zero memory for all class
583 * trans-stmt.c (gfc_trans_allocate): Ditto for class scalars.
586 * trans-stmt.c (gfc_trans_allocate): Before correcting a class
587 array reference, ensure that 'dataref' points to the _data
588 component that is followed by the array reference..
590 2012-02-02 Mikael Morin <mikael@gcc.gnu.org>
596 * class.c (insert_component_ref, class_data_ref_missing,
597 gfc_fix_class_refs): New functions.
598 * gfortran.h (gfc_fix_class_refs): New prototype.
599 * trans-expr.c (gfc_conv_expr): Remove special case handling and call
600 gfc_fix_class_refs instead.
602 2012-02-02 Paul Thomas <pault@gcc.gnu.org>
605 * trans-expr.c (fcncall_realloc_result): If variable shape is
606 correct, retain the bounds, whatever they are.
608 2012-02-02 Tobias Burnus <burnus@net-b.de>
611 * simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES.
613 2012-02-01 Thomas König <tkoenig@gcc.gnu.org>
616 * frontend-passes.c (convert_elseif): New function.
617 (optimize_namespace): Call it.
619 2012-02-01 Tobias Burnus <burnus@net-b.de>
622 * module.c (MOD_VERSION): Bump.
623 (mio_typebound_proc): Read/write is_operator from/to the
626 2012-02-01 Tobias Burnus <burnus@net-b.de>
629 * trans-expr.c (gfc_conv_procedure_call): Add array ref
632 2012-01-31 Tobias Burnus <burnus@net-b.de>
635 * gfortran.h (gfc_tbp_generic): Store whether the
636 generic is an operator.
637 * decl.c (gfc_match_generic): Set that flag.
638 * resolve.c (check_generic_tbp_ambiguity): Use it in the
639 gfc_compare_interfaces check.
641 2012-01-31 Tobias Burnus <burnus@net-b.de>
644 * class.c (gfc_find_derived_vtab): Mark _copy function as pure.
646 2012-01-31 Tobias Burnus <burnus@net-b.de>
649 * class.c (get_unique_hashed_string): Adapt trim length.
650 (gfc_build_class_symbol) Encode also corank in the container name.
652 2012-01-31 Paul Thomas <pault@gcc.gnu.org>
655 * trans-expr.c (fcncall_realloc_result): Correct calculation of
658 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
660 * module.c (pointer_info): Make true_name and module pointers
661 rather than arrays, order pointers before other fields.
662 (free_pi_tree): free true_name and module as well.
663 (mio_read_string): Rename to read_string.
664 (mio_write_string): Remove.
665 (load_commons): Use read_string.
666 (read_module): Use read_string rather than mio_internal_string.
667 (write_blank_common): Call write_atom directly.
668 (write_symbol): Likewise.
670 2012-01-29 Tobias Burnus <burnus@net-b.de>
673 * expr.c (gfc_default_initializer): Convert the values if
674 the type does not match.
676 2012-01-29 Tobias Burnus <burnus@net-b.de>
679 * trans-array.c (structure_alloc_comps): Fix assignment of
680 polymorphic components (polymorphic deep copying).
682 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
685 * decl.c (set_binding_label): Make binding_label argument const.
686 (curr_binding_label): Constify.
687 * gfortran.h (gfc_symbol): Constify binding_label.
688 (gfc_common_head): Likewise.
689 (get_iso_c_sym): Likewise.
690 * match.c (gfc_match_name_C): Constify buffer argument.
691 * match.h (gfc_match_name_C): Likewise.
692 * resolve.c (set_name_and_label): Constify binding_label argument.
693 (gfc_iso_c_sub_interface): Constify binding_label variable.
694 * symbol.c (get_iso_c_sym): Constify binding_label argument.
696 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
699 * decl.c (set_binding_label): Move prototype from match.h to here.
700 (curr_binding_label): Make a pointer rather than static array.
701 (build_sym): Check sym->binding_label pointer rather than array,
702 update set_binding_label call, handle curr_binding_label changes.
703 (set_binding_label): Handle new curr_binding_label, dest_label
704 double ptr, and sym->binding_label.
705 (verify_bind_c_sym): Handle sym->binding_label being a pointer.
706 (set_verify_bind_c_sym): Check sym->binding_label pointer rather
707 than array, update set_binding_label call.
708 (gfc_match_bind_c_stmt): Handle curr_binding_label change.
709 (match_procedure_decl): Update set_binding_label call.
710 (gfc_match_bind_c): Change binding_label to pointer, update
711 gfc_match_name_C call.
712 * gfortran.h (GFC_MAX_BINDING_LABEL_LEN): Remove macro.
713 (gfc_symbol): Make binding_label a pointer.
714 (gfc_common_head): Likewise.
715 * match.c (gfc_match_name_C): Heap allocate bind(C) name.
716 * match.h (gfc_match_name_C): Change prototype argument.
717 (set_binding_label): Move prototype to decl.c.
718 * module.c (struct pointer_info): Make binding_label a pointer.
719 (free_pi_tree): Free unused binding_label.
720 (mio_read_string): New function.
721 (mio_write_string): New function.
722 (load_commons): Redo reading of binding_label.
723 (read_module): Likewise.
724 (write_common_0): Change to write empty string instead of name if
726 (write_blank_common): Write empty string for binding label.
727 (write_symbol): Change to write empty string instead of name if no
729 * resolve.c (gfc_iso_c_func_interface): Don't set binding_label.
730 (set_name_and_label): Make binding_label double pointer, use
732 (gfc_iso_c_sub_interface): Make binding_label a pointer.
733 (resolve_bind_c_comms): Handle cases if
734 gfc_common_head->binding_label is NULL.
735 (gfc_verify_binding_labels): sym->binding_label is a pointer.
736 * symbol.c (gfc_new_symbol): Rely on XCNEW zero init for
738 (gen_special_c_interop_ptr): Don't set binding label.
739 (generate_isocbinding_symbol): Insert binding_label into symbol
741 (get_iso_c_sym): Use pointer assignment instead of strcpy.
742 * trans-common.c (gfc_sym_mangled_common_id): Handle
743 com->binding_label being a pointer.
744 * trans-decl.c (gfc_sym_mangled_identifier): Handle
745 sym->binding_label being a pointer.
746 (gfc_sym_mangled_function_id): Likewise.
748 2012-01-29 Tobias Burnus <burnus@net-b.de>
751 * resolve.c (symbol_as): Remove unused, accidentally
754 2012-01-28 Tobias Burnus <burnus@net-b.de>
757 * trans-stmt.c (gfc_trans_allocate): Properly check whether
758 we have a BT_CLASS which needs to be memset.
760 2012-01-27 Tobias Burnus <burnus@net-b.de>
763 * trans-expr.c (gfc_conv_procedure_call): Fix passing
764 of functions, which return allocatables.
766 2012-01-27 Tobias Burnus <burnus@net-b.de>
769 * resolve.c (resolve_formal_arglist): Fix elemental
770 constraint checks for polymorphic dummies also for
773 2012-01-27 Tobias Burnus <burnus@net-b.de>
777 * primary.c (gfc_match_varspec. gfc_match_rvalue): Set
778 handle array spec for BT_CLASS.
779 * expr.c (gfc_get_variable_expr, gfc_lval_expr_from_sym)
780 * frontend-passes.c (create_var): Ditto.
781 * resolve.c (resolve_actual_arglist, resolve_assoc_var): Ditto.
782 * trans-decl.c (gfc_trans_deferred_vars): Use class_pointer
783 instead of attr.pointer.
784 (gfc_generate_function_code): Use CLASS_DATA (sym) for BT_CLASS.
785 * trans-intrinsic.c (conv_intrinsic_move_alloc): Move assert.
786 * trans-stmt.c (trans_associate_var): Ask for the descriptor.
788 2012-01-27 Tobias Burnus <burnus@net-b.de>
791 * match.c (gfc_match_allocate): Allow more than allocate
794 2012-01-27 Tobias Burnus <burnus@net-b.de>
797 * resolve.c (resolve_formal_arglist): Fix elemental
798 constraint checks for polymorphic dummies.
800 2012-01-27 Paul Thomas <pault@gcc.gnu.org>
801 Tobias Burnus <burnus@gcc.gnu.org>
807 * trans-array.c (gfc_array_init_size): Add two extra arguments
808 to convey the dynamic element size of a calls object and to
809 return the number of elements that have been allocated.
810 (gfc_array_allocate): Add the same arguments and use them to
811 call gfc_array_init_size. Before the allocation dereference
812 the data pointer, if necessary. Set the allocated array to zero
813 if the class element size or expr3 are non-null.
814 * trans-expr.c (gfc_conv_class_to_class): Give this function
816 (get_class_array_ref): New function.
817 (gfc_copy_class_to_class): New function.
818 * trans-array.h : Update prototype for gfc_array_allocate.
819 * trans-stmt.c (gfc_trans_allocate): For non-variable class
820 STATUS expressions extract the class object and the dynamic
821 element size. Use the latter to call gfc_array_allocate and
822 the former for setting the vptr and, via
823 gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
824 * trans.h : Prototypes for gfc_get_class_array_ref,
825 gfc_copy_class_to_class and gfc_conv_class_to_class.
827 2012-01-25 Tobias Burnus <burnus@net-b.de>
829 * resolve.c (symbol_as): Check also for attr.class_ok.
831 2012-01-25 Tobias Burnus <burnus@net-b.de>
834 * class.c (gfc_build_class_symbol): Fix invalid freeing
835 issue with fclass->f2k_derived.
837 2012-01-25 Tobias Burnus <burnus@net-b.de>
840 * class.c (gfc_build_class_symbol): Ensure that
841 fclass->f2k_derived is set.
843 2012-01-25 Tobias Burnus <burnus@net-b.de>
846 * resolve.c (resolve_structure_cons): Only create an
847 array constructors for nonscalars.
849 2012-01-23 Tobias Burnus <burnus@net-b.de>
852 * check.c (variable_check): Fix checking for
853 variables and deeply nested BLOCKs.
855 2012-01-21 Tobias Burnus <burnus@net-b.de>
856 Steven G. Kargl <kargl@gcc.gnu.org>
859 * symbol.c (check_conflict): namelist-group-name cannot have the SAVE
862 2012-01-21 Tobias Burnus <burnus@net-b.de>
865 * interface.c (compare_parameter): Fix CLASS comparison.
867 2012-01-20 Tobias Burnus <burnus@net-b.de>
868 Janus Weil <janus@gcc.gnu.org>
871 * module.c (load_needed, read_module): Don't mark __vtab etc.
874 2012-01-19 Tobias Burnus <burnus@net-b.de>
877 * expr.c (gfc_build_intrinsic_call): Also set the symtree.
879 2012-01-18 Paul Thomas <pault@gcc.gnu.org>
882 * trans-expr.c (gfc_conv_procedure_call): Deallocate allocatable
883 components of temporary class arguments.
885 2012-01-17 Tobias Burnus <burnus@net-b.de>
886 Janne Blomqvist <jb@gcc.gnu.org>
889 * trans-expr.c (alloc_scalar_allocatable_for_assignment): Nullify
890 LHS after allocation, if it has allocatable components.
891 * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_CALLOC.
893 2012-01-16 Mikael Morin <mikael@gcc.gnu.org>
894 Tobias Burnus <burnus@net-b.de>
897 * trans-array.c (gfc_walk_elemental_function_args): Fix
898 passing of deallocated allocatables/pointers as absent argument.
900 2012-01-16 Tobias Burnus <burnus@net-b.de>
903 * class.c (gfc_find_derived_vtab): Mark __vtab and
904 __def_init as FL_VARIABLE not as FL_PARAMETER.
905 * expr.c (gfc_simplify_expr): Remove special
907 * resolve.c (resolve_values): Ditto.
908 * trans-decl.c (gfc_get_symbol_decl): Mark __vtab
909 and __def_init as TREE_READONLY.
911 2012-01-16 Zydrunas Gimbutas <gimbutas@cims.nyu.edu>
912 Andreas Kloeckner <kloeckner@cims.nyu.edu>
913 Steven G. Kargl <kargl@gcc.gnu.org>
916 * gfortran.h (gfc_option_t): Add members flag_*_kind to store kind.
917 * lang.opt: Add options -freal-4-real-8, -freal-4-real-10,
918 -freal-4-real-16, -freal-8-real-4, -freal-8-real-10, -freal-8-real-16
919 and -finteger-4-integer-8. User-desired type conversion information.
920 * decl.c (gfc_match_old_kind_spec,kind_expr): Type conversions
921 in declaration parsing.
922 * trans-types.c (gfc_init_kinds): User-specified type conversion
923 checked for current backend.
924 * primary.c (match_integer_constant,match_real_constant): Implement
925 type conversion in constant parsing.
926 * options.c (gfc_init_options,gfc_handle_option): Translate input
927 options to flags in internal options data structure.
928 * invoke.texi: Document new options. Re-order options in Options
931 2012-01-16 Paul Thomas <pault@gcc.gnu.org>
933 * trans-array.c (gfc_trans_create_temp_array): In the case of a
934 class array temporary, detect a null 'eltype' on entry and use
935 'initial' to provde the class reference and so, through the
936 vtable, the element size for the dynamic type.
937 * trans-stmt.c (gfc_conv_elemental_dependencies): For class
938 expressions, set 'eltype' to null and pass the values via the
939 'initial' expression.
941 2012-01-14 Tobias Burnus <burnus@net-b.de>
944 * resolve.c (build_default_init_expr): Also initialize
945 nonconstant-length strings with -finit-character=<n>.
947 2011-01-14 Tobias Burnus <burnus@net-b.de>
950 * module.c (read_module): Don't make nonexisting
951 intrinsic operators as found.
952 (rename_list_remove_duplicate): New function.
953 (gfc_use_modules): Use it.
955 2012-01-13 Paul Thomas <pault@gcc.gnu.org>
958 * trans-array.c (structure_alloc_comps): Suppress interative
959 call to self, when current component is deallocated using
960 gfc_trans_dealloc_allocated.
961 * class.c (gfc_build_class_symbol): Copy the 'alloc_comp'
962 attribute from the declared type to the class structure.
964 2012-01-13 Tobias Burnus <burnus@net-b.de>
967 * fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE
968 instead of a signed int of size POINTER_SIZE for
969 gfc_index_integer_kind.
971 2012-01-12 Tobias Burnus <burnus@net-b.de>
974 * intrinsic.texi (CHMOD): Extend a bit and remove statement
975 that /bin/chmod is called.
977 2012-01-10 Gerald Pfeifer <gerald@pfeifer.com>
979 * gfortran.texi (Fortran 2003 Status): Fix grammar.
981 2012-01-10 Tobias Burnus <burnus@net-b.de>
984 * resolve.c (resolve_allocate_expr): For non-deferred char lengths,
985 check whether type-spec matches declaration.
987 2012-01-10 Tobias Burnus <burnus@net-b.de>
989 * resolve.c (resolve_ordinary_assign): Improve error wording.
991 2012-01-09 Paul Thomas <pault@gcc.gnu.org>
994 * interface.c (matching_typebound_op): Drill down through
995 possible parentheses to obtain base expression. Do not test for
996 'class_ok' but, instead for the class structure components.
997 * resolve.c (resolve_ordinary_assign): Extend error message for
998 polymorphic assignment to advise checking for specific
1002 * resolve.c (resolve_typebound_function): Restore 'static' to
1005 2012-01-09 Mikael Morin <mikael@gcc.gnu.org>
1008 * trans-array.c (gfc_walk_elemental_function_args):
1009 Skip over NULL() actual arguments.
1011 2012-01-09 Tobias Burnus <burnus@net-b.de>
1013 * gfortran.texi: Bump copyright year.
1014 (Fortran 2003 Status): Update polymorphism item, add
1015 item for generic interface with DT name.
1017 2012-01-09 Tobias Burnus <burnus@net-b.de>
1020 * gfortran.h (gfc_use_list):
1021 * match.h (gfc_use_module): Rename to ...
1022 (gfc_use_modules): ... this.
1023 * module.c (use_locus, specified_nonint, specified_int): Remove
1025 (module_name): Change type to const char*, used with gfc_get_string.
1026 (module_list): New global variable.
1027 (free_rename): Free argument not global var.
1028 (gfc_match_use): Save match to module_list.
1029 (load_generic_interfaces, read_module): Don't free symtree.
1030 (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
1031 type change of module_name.
1032 (write_symbol0, write_generic): Optimize due to the type change.
1033 (import_iso_c_binding_module, use_iso_fortran_env_module): Use
1034 locus of rename->where.
1035 (gfc_use_module): Take module_list as argument.
1036 (gfc_use_modules): New function.
1037 (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
1038 * parse.c (last_was_use_stmt): New global variable.
1039 (use_modules): New function.
1040 (decode_specification_statement, decode_statement): Move USE match up
1041 and call use_modules.
1042 (next_free, next_fixed): Call use_modules.
1043 (accept_statement): Don't call gfc_module_use.
1045 2012-01-06 Tobias Burnus <burnus@net-b.de>
1047 * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
1048 Update call to gfc_trans_dealloc_allocated.
1049 * trans.c (gfc_allocate_using_malloc): Fix spacing.
1050 (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
1051 label_finish when an error occurs.
1052 (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
1053 * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
1055 (gfor_fndecl_caf_deregister): New tree symbol.
1056 * trans-expr.c (gfc_conv_procedure_call): Update
1057 gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
1058 * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
1059 structure_alloc_comps, gfc_trans_deferred_array): Ditto.
1060 (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
1061 * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
1062 gfc_trans_dealloc_allocated): Update prototypes.
1063 * trans-stmt.c (gfc_trans_sync): Fix indentation.
1064 (gfc_trans_allocate): Fix errmsg padding and label handling.
1065 (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
1066 * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
1067 * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
1068 to avoid other stats accidentally matching this one.
1069 * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
1070 (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
1071 and add decl for caf_deregister.
1072 (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
1073 * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
1074 gfc_deallocate_with_status.
1076 2012-01-05 Paul Thomas <pault@gcc.gnu.org>
1079 * resolve.c (resolve_typebound_static): If the typebound
1080 procedure is 'deferred' try to find the correct specific
1081 procedure in the derived type operator space itself.
1083 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
1086 * trans-array.h (gfc_walk_elemental_function_args): New argument.
1087 * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
1088 * trans-stmt.c (gfc_trans_call): Ditto.
1089 * trans-array.c (gfc_walk_function_expr): Ditto.
1090 (gfc_walk_elemental_function_args): Get the dummy argument list
1091 if possible. Check that the dummy and the actual argument are both
1092 optional, and set can_be_null_ref accordingly.
1094 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
1097 * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
1098 * trans-array.c: If the reference can be NULL, save the reference
1099 instead of the value.
1100 * trans-expr.c (gfc_conv_expr): If we have saved a reference,
1103 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
1105 * trans-expr.c (gfc_conv_expr): Move address taking...
1106 (gfc_conv_expr_reference): ... here.
1108 2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
1111 * trans-common.c (create_common): Update copyright years. Mark
1112 variables as used to avoid warnings about unused variables in
1115 2012-01-03 Hans-Peter Nilsson <hp@axis.com>
1117 * gfortran.h (struct gfc_expr): Add missing "struct"
1118 qualifier for member base_expr.
1120 2012-01-02 Paul Thomas <pault@gcc.gnu.org>
1123 * trans-array.c (gfc_array_allocate): Null allocated memory of
1124 newly allocted class arrays.
1129 * interface.c(build_compcall_for_operator): Add a type to the
1131 * trans-expr.c (conv_base_obj_fcn_val): New function.
1132 (gfc_conv_procedure_call): Use base_expr to detect non-variable
1133 base objects and, ensuring that there is a temporary variable,
1134 build up the typebound call using conv_base_obj_fcn_val.
1135 (gfc_trans_class_assign): Pick out class procedure pointer
1136 assignments and do the assignment with no further prcessing.
1137 (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
1138 gfc_trans_class_assign): Move to top of file.
1139 * gfortran.h : Add 'base_expr' field to gfc_expr.
1140 * resolve.c (get_declared_from_expr): Add 'types' argument to
1141 switch checking of derived types on or off.
1142 (resolve_typebound_generic_call): Set the new argument.
1143 (resolve_typebound_function, resolve_typebound_subroutine):
1144 Set 'types' argument for get_declared_from_expr appropriately.
1145 Identify base expression, if not a variable, in the argument
1146 list of class valued calls. Assign it to the 'base_expr' field
1147 of the final expression. Strip away all references after the
1148 last class reference.
1150 2012-01-02 Tobias Burnus <burnus@net-b.de>
1153 * trans-intrinsic.c (trans_this_image, trans_image_index,
1154 trans_num_images, conv_intrinsic_cobound): Fold_convert the
1155 caf_num_images/caf_this_images variables to the correct int kind.
1157 2012-01-01 Jakub Jelinek <jakub@redhat.com>
1159 * gfortranspec.c (lang_specific_driver): Update copyright notice
1162 Copyright (C) 2012 Free Software Foundation, Inc.
1164 Copying and distribution of this file, with or without modification,
1165 are permitted in any medium without royalty provided the copyright
1166 notice and this notice are preserved.