1 2013-07-08 Tobias Burnus <burnus@net-b.de>
4 * simplify.c (compute_dot_product): Complex conjugate for
6 (gfc_simplify_dot_product, gfc_simplify_matmul): Update call.
8 2013-06-06 Tobias Burnus <burnus@net-b.de>
10 Backport from mainline
11 2012-08-27 Tobias Burnus <burnus@net-b.de>
14 * trans-stmt.c (gfc_trans_do_while): Don't change the logical
15 kind for negation of the condition.
17 2013-06-01 Janus Weil <janus@gcc.gnu.org>
18 Tobias Burnus <burnus@net-b.de>
21 * interface.c (check_dummy_characteristics): Symmetrize type check.
23 2013-05-22 Janne Blomqvist <jb@gcc.gnu.org>
25 * intrinsic.texi (RANDOM_SEED): Improve example.
27 2013-05-07 Tobias Burnus <burnus@net-b.de>
29 Backport from mainline
30 2013-05-02 Tobias Burnus <burnus@net-b.de>
33 * simplify.c (gfc_simplify_size): Renamed from
34 simplify_size; fix kind=8 handling.
35 (gfc_simplify_size): New function.
36 (gfc_simplify_shape): Add range check.
37 * resolve.c (resolve_function): Fix handling
40 2013-04-26 Janus Weil <janus@gcc.gnu.org>
45 * expr.c (gfc_check_pointer_assign): Handle generic functions returning
50 * check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE
52 * target-memory.h (gfc_element_size): New prototype.
53 * target-memory.c (size_array): Remove.
54 (gfc_element_size): New function.
55 (gfc_target_expr_size): Modified to always return the full size of the
58 2013-04-18 Tobias Burnus <burnus@net-b.de>
61 * invoke.texi (NEAREST): S argument is not optional.
63 2013-04-11 Release Manager
67 2013-03-15 Tobias Burnus <burnus@net-b.de>
70 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Pack arrays
71 if they are not simply contiguous.
73 2013-03-13 Paul Thomas <pault@gcc.gnu.org>
76 * expr.c (gfc_default_initializer): Check that a class declared
77 type has any components.
78 * resolve.c (resolve_fl_derived0): On failing the test for C437
79 set the type to BT_UNKNOWN to prevent repeat error messages.
81 2013-03-10 Paul Thomas <pault@gcc.gnu.org>
84 * check.c (array_check): It is an error if a procedure is
87 2013-02-22 Janus Weil <janus@gcc.gnu.org>
90 * trans-array.c (structure_alloc_comps): Handle procedure-pointer
91 components with allocatable result.
93 2013-02-17 Tobias Burnus <burnus@net-b.de>
94 Mikael Morin <mikael@gcc.gnu.org>
97 2013-01-28 Tobias Burnus <burnus@net-b.de>
98 Mikael Morin <mikael@gcc.gnu.org>
101 * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
103 (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
104 * decl.c (gfc_match_data_decl): Ditto.
105 (variable_decl): Remove undeclared type error.
106 (gfc_match_import): Use renamed instead of original name.
108 2013-02-15 Tobias Burnus <burnus@net-b.de>
109 Mikael Morin <mikael@gcc.gnu.org>
112 * simplify.c (gfc_simplify_matmul): Fix result shape
115 2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
120 * decl.c (gfc_match_end): Remove half-ready namespace
121 from parent if the end of a block is missing.
122 * parse.c (parse_module): Do not put namespace into
125 2013-02-01 Jakub Jelinek <jakub@redhat.com>
127 Backported from mainline
128 2013-01-23 Jakub Jelinek <jakub@redhat.com>
131 * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
132 and DECL_IGNORED_P on select_type_temporary and don't set
135 2013-01-24 Janus Weil <janus@gcc.gnu.org>
138 * resolve.c (resolve_select): Add argument 'select_type', reject
139 non-scalar expressions.
140 (resolve_select_type,resolve_code): Pass new argument to
143 2013-01-17 Janus Weil <janus@gcc.gnu.org>
146 * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
149 2013-01-13 Janus Weil <janus@gcc.gnu.org>
152 * trans-array.c (gfc_conv_array_parameter): No packing was done for
153 full arrays of derived type.
155 2013-01-13 Paul Thomas <pault@gcc.gnu.org>
158 * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
159 character function arguments to elemental procedures in
162 2013-01-08 Mikael Morin <mikael@gcc.gnu.org>
167 * module.c (read_module): Don't reuse local symtree if the associated
168 symbol isn't exactly the one wanted. Don't reuse local symtree if it is
170 * resolve.c (resolve_call): Use symtree's name instead of symbol's to
173 2013-01-07 Tobias Burnus <burnus@net-b.de>
174 Thomas Koenig <tkoenig@gcc.gnu.org>
175 Jakub Jelinek <jakub@redhat.com>
178 * expr.c (gfc_build_intrinsic_call): Avoid clashes
179 with user's procedures.
180 * gfortran.h (gfc_build_intrinsic_call): Update prototype.
181 (GFC_PREFIX): Define.
182 * simplify.c (gfc_simplify_size): Update call.
184 2013-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
185 Mikael Morin <mikael@gcc.gnu.org>
188 * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
190 * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
192 2012-12-20 Tobias Burnus <burnus@net-b.de>
195 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ensure that
196 the string length is of type gfc_charlen_type_node.
198 2012-11-24 Thomas Koenig <tkoenig@gcc.gnu.org>
202 * resolve.c (resolve_allocate_deallocate): Compare all
203 subscripts when deciding if to reject a (de)allocate
206 2012-11-23 Janus Weil <janus@gcc.gnu.org>
209 * trans-decl.c (generate_local_decl): Don't warn for explicitly imported
210 but unused module variables which are in a namelist or common block.
212 2012-11-06 Janus Weil <janus@gcc.gnu.org>
215 * target-memory.c (gfc_target_expr_size,gfc_target_interpret_expr):
218 2012-10-14 Janus Weil <janus@gcc.gnu.org>
221 * trans-stmt.c (gfc_trans_allocate): Correctly determine the reference
222 to the _data component for polymorphic allocation with SOURCE.
224 2012-09-20 Release Manager
226 * GCC 4.7.2 released.
228 2012-09-13 Tobias Burnus <burnus@net-b.de>
231 * resolve.c (resolve_formal_arglist): Allow VALUE arguments
233 (gfc_impure_variable): Don't check gfc_pure such that the
234 function also works for gfc_implicit_pure procedures.
236 2012-09-12 Tobias Burnus <burnus@net-b.de>
240 * array.c (match_subscript, gfc_match_array_ref): Fix
241 diagnostic of coarray's '*'.
243 2012-09-10 Janus Weil <janus@gcc.gnu.org>
247 * match.c (gfc_match_select_type): Make sure to only access CLASS_DATA
250 2012-09-08 Mikael Morin <mikael@gcc.gnu.org>
253 * simplify.c (simplify_bound_dim): Resolve array spec before
254 proceeding with simplification.
256 2012-07-06 Mikael Morin <mikael@gcc.gnu.org>
259 * trans-array.c (gfc_add_loop_ss_code): Disable self recursive calls
260 handling nested loop(s) if the subscript flag is true.
262 2012-06-22 Tobias Burnus <burnus@net-b.de>
264 Backport from mainline
265 2012-06-17 Tobias Burnus <burnus@net-b.de>
269 * check.c (gfc_calculate_transfer_sizes): Return if
270 SIZE= is not constant or source-size cannot be determined.
272 2012-06-14 Tobias Burnus <burnus@net-b.de>
274 Backport from mainline
275 2012-06-04 Tobias Burnus <burnus@net-b.de>
278 * resolve.c (build_default_init_expr): Don't initialize
281 2012-06-14 Tobias Burnus <burnus@net-b.de>
284 * decl.c (match_attr_spec): Only mark module variables
285 as SAVE_IMPLICIT for Fortran 2008 and later.
287 2012-06-14 Release Manager
289 * GCC 4.7.1 released.
291 2012-06-01 Tobias Burnus <burnus@net-b.de>
294 * trans.c (gfc_deallocate_scalar_with_status): Properly
295 handle the case size == 0.
297 2012-05-23 Tobias Burnus <burnus@net-b.de>
300 * trans-array.c (gfc_add_loop_ss_code): Don't evaluate expression, if
301 ss->is_alloc_lhs is set.
303 2012-05-07 Tobias Burnus <burnus@net-b.de>
305 Backport from mainline:
306 2012-05-07 Tobias Burnus <burnus@net-b.de>
309 * resolve.c (resolve_typebound_static): Fix handling
310 of overridden specific to generic operator.
312 2012-05-05 Tobias Burnus <burnus@net-b.de>
314 Backport from mainline:
315 2012-05-04 Tobias Burnus <burnus@net-b.de>
318 * resolve.c (resolve_fl_derived): Fix -std=f95
319 diagnostic for generic vs. DT names.
321 2012-05-02 Tobias Burnus <burnus@net-b.de>
323 Backport from mainline
324 2012-04-12 Tobias Burnus <burnus@net-b.de>
327 * expr.c (gfc_check_vardef_context): Fix assignment check for
330 2012-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
334 * frontend-passes.c (create_var): If the statement has a label,
335 put the label around the block.
337 2012-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
341 * frontend-passes.c: Keep track of wether we are in an implicit
342 DO loop; do not do function elimination if we are.
344 2012-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
348 * module.c: Only mark symbols as use_only if they have been
349 imported via an only list.
351 2012-03-22 Tobias Burnus <burnus@net-b.de>
354 * resolve.c (resolve_intrinsic): Don't search for a
355 function if we know that it is a subroutine.
357 2012-03-22 Release Manager
359 * GCC 4.7.0 released.
361 2012-03-10 Tobias Burnus <burnus@net-b.de>
364 * trans-types.c (gfc_get_function_type): Handle backend_decl
365 of a procedure pointer.
367 2012-02-29 Paul Thomas <pault@gcc.gnu.org>
370 * trans-expr.c (fcncall_realloc_result): Dereference the
371 descriptor if needed.
373 2012-02-22 Tobias Burnus <burnus@net-b.de>
376 * io.c (gfc_match_open): Remove bogus F2003 DELIM= check.
378 2012-02-18 Tobias Burnus <burnus@net-b.de>
381 * interface.c (check_interface0): Internal procs in
382 generic interfaces are allowed in Fortran 2008.
384 2012-02-17 Tobias Burnus <burnus@net-b.de>
385 Roland Stigge <stigge@antcom.de>
388 * interface.c (compare_actual_formal): Fix typo "at at".
390 2012-02-17 Tobias Burnus <burnus@net-b.de>
392 * gfortran.texi (Q exponent-letter): Fix grammar.
394 2012-02-17 Tobias Burnus <burnus@net-b.de>
396 * gfortran.texi (Status): Fix typos.
397 * invoke.texi (ffixed-form, fstack-arrays): Spell Fortran with
400 2012-02-17 Tobias Burnus <burnus@net-b.de>
401 Roland Stigge <stigge@antcom.de>
409 * io.c (gfc_match_open): Fix typo.
410 * interface.c (compare_actual_formal): Ditto.
411 * lang.opt (freal-4-real-8, freal-4-real-16, freal-8-real-16): Ditto.
412 * match.c (alloc_opt_list, gfc_match_nullify): Ditto.
413 * check.c (gfc_check_associated, gfc_check_null): Ditto.
415 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
418 * trans-stmt.c (gfc_get_proc_ifc_for_call): New function.
419 (gfc_trans_call): Use gfc_get_proc_ifc_for_call.
421 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
423 * trans-array.c (gfc_walk_elemental_function_args,
424 gfc_walk_function_expr): Move call to gfc_get_proc_ifc_for_expr out
425 of gfc_walk_elemental_function_args.
426 * trans-stmt.c (gfc_trans_call): Ditto.
427 * trans-array.h (gfc_get_proc_ifc_for_expr): New prototype.
428 (gfc_walk_elemental_function_args): Update prototype.
430 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
432 * trans-array.c (gfc_get_proc_ifc_for_expr): New function.
433 (gfc_walk_elemental_function_args): Move code to
434 gfc_get_proc_ifc_for_expr and call it.
436 2012-02-08 Tobias Burnus <burnus@net-b.de>
439 * trans-expr.c (fcncall_realloc_result): Set also the stride.
441 2012-02-07 Tobias Burnus <burnus@net-b.de>
444 * trans-expr.c (gfc_conv_procedure_call): Add _data component
445 for calls of scalar CLASS actuals to TYPE dummies.
447 2012-02-05 Thomas König <tkoenig@gcc.gnu.org>
450 * trans-decl.c: Warn about unused dummy procedure arguments
451 if -Wunused-dummy-argument is specified. Suppress middle-end
452 warnings about procedure arguments.
454 2012-02-05 Paul Thomas <pault@gcc.gnu.org>
456 * trans-array.c (gfc_array_allocate): Zero memory for all class
458 * trans-stmt.c (gfc_trans_allocate): Ditto for class scalars.
461 * trans-stmt.c (gfc_trans_allocate): Before correcting a class
462 array reference, ensure that 'dataref' points to the _data
463 component that is followed by the array reference..
465 2012-02-02 Mikael Morin <mikael@gcc.gnu.org>
471 * class.c (insert_component_ref, class_data_ref_missing,
472 gfc_fix_class_refs): New functions.
473 * gfortran.h (gfc_fix_class_refs): New prototype.
474 * trans-expr.c (gfc_conv_expr): Remove special case handling and call
475 gfc_fix_class_refs instead.
477 2012-02-02 Paul Thomas <pault@gcc.gnu.org>
480 * trans-expr.c (fcncall_realloc_result): If variable shape is
481 correct, retain the bounds, whatever they are.
483 2012-02-02 Tobias Burnus <burnus@net-b.de>
486 * simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES.
488 2012-02-01 Thomas König <tkoenig@gcc.gnu.org>
491 * frontend-passes.c (convert_elseif): New function.
492 (optimize_namespace): Call it.
494 2012-02-01 Tobias Burnus <burnus@net-b.de>
497 * module.c (MOD_VERSION): Bump.
498 (mio_typebound_proc): Read/write is_operator from/to the
501 2012-02-01 Tobias Burnus <burnus@net-b.de>
504 * trans-expr.c (gfc_conv_procedure_call): Add array ref
507 2012-01-31 Tobias Burnus <burnus@net-b.de>
510 * gfortran.h (gfc_tbp_generic): Store whether the
511 generic is an operator.
512 * decl.c (gfc_match_generic): Set that flag.
513 * resolve.c (check_generic_tbp_ambiguity): Use it in the
514 gfc_compare_interfaces check.
516 2012-01-31 Tobias Burnus <burnus@net-b.de>
519 * class.c (gfc_find_derived_vtab): Mark _copy function as pure.
521 2012-01-31 Tobias Burnus <burnus@net-b.de>
524 * class.c (get_unique_hashed_string): Adapt trim length.
525 (gfc_build_class_symbol) Encode also corank in the container name.
527 2012-01-31 Paul Thomas <pault@gcc.gnu.org>
530 * trans-expr.c (fcncall_realloc_result): Correct calculation of
533 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
535 * module.c (pointer_info): Make true_name and module pointers
536 rather than arrays, order pointers before other fields.
537 (free_pi_tree): free true_name and module as well.
538 (mio_read_string): Rename to read_string.
539 (mio_write_string): Remove.
540 (load_commons): Use read_string.
541 (read_module): Use read_string rather than mio_internal_string.
542 (write_blank_common): Call write_atom directly.
543 (write_symbol): Likewise.
545 2012-01-29 Tobias Burnus <burnus@net-b.de>
548 * expr.c (gfc_default_initializer): Convert the values if
549 the type does not match.
551 2012-01-29 Tobias Burnus <burnus@net-b.de>
554 * trans-array.c (structure_alloc_comps): Fix assignment of
555 polymorphic components (polymorphic deep copying).
557 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
560 * decl.c (set_binding_label): Make binding_label argument const.
561 (curr_binding_label): Constify.
562 * gfortran.h (gfc_symbol): Constify binding_label.
563 (gfc_common_head): Likewise.
564 (get_iso_c_sym): Likewise.
565 * match.c (gfc_match_name_C): Constify buffer argument.
566 * match.h (gfc_match_name_C): Likewise.
567 * resolve.c (set_name_and_label): Constify binding_label argument.
568 (gfc_iso_c_sub_interface): Constify binding_label variable.
569 * symbol.c (get_iso_c_sym): Constify binding_label argument.
571 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
574 * decl.c (set_binding_label): Move prototype from match.h to here.
575 (curr_binding_label): Make a pointer rather than static array.
576 (build_sym): Check sym->binding_label pointer rather than array,
577 update set_binding_label call, handle curr_binding_label changes.
578 (set_binding_label): Handle new curr_binding_label, dest_label
579 double ptr, and sym->binding_label.
580 (verify_bind_c_sym): Handle sym->binding_label being a pointer.
581 (set_verify_bind_c_sym): Check sym->binding_label pointer rather
582 than array, update set_binding_label call.
583 (gfc_match_bind_c_stmt): Handle curr_binding_label change.
584 (match_procedure_decl): Update set_binding_label call.
585 (gfc_match_bind_c): Change binding_label to pointer, update
586 gfc_match_name_C call.
587 * gfortran.h (GFC_MAX_BINDING_LABEL_LEN): Remove macro.
588 (gfc_symbol): Make binding_label a pointer.
589 (gfc_common_head): Likewise.
590 * match.c (gfc_match_name_C): Heap allocate bind(C) name.
591 * match.h (gfc_match_name_C): Change prototype argument.
592 (set_binding_label): Move prototype to decl.c.
593 * module.c (struct pointer_info): Make binding_label a pointer.
594 (free_pi_tree): Free unused binding_label.
595 (mio_read_string): New function.
596 (mio_write_string): New function.
597 (load_commons): Redo reading of binding_label.
598 (read_module): Likewise.
599 (write_common_0): Change to write empty string instead of name if
601 (write_blank_common): Write empty string for binding label.
602 (write_symbol): Change to write empty string instead of name if no
604 * resolve.c (gfc_iso_c_func_interface): Don't set binding_label.
605 (set_name_and_label): Make binding_label double pointer, use
607 (gfc_iso_c_sub_interface): Make binding_label a pointer.
608 (resolve_bind_c_comms): Handle cases if
609 gfc_common_head->binding_label is NULL.
610 (gfc_verify_binding_labels): sym->binding_label is a pointer.
611 * symbol.c (gfc_new_symbol): Rely on XCNEW zero init for
613 (gen_special_c_interop_ptr): Don't set binding label.
614 (generate_isocbinding_symbol): Insert binding_label into symbol
616 (get_iso_c_sym): Use pointer assignment instead of strcpy.
617 * trans-common.c (gfc_sym_mangled_common_id): Handle
618 com->binding_label being a pointer.
619 * trans-decl.c (gfc_sym_mangled_identifier): Handle
620 sym->binding_label being a pointer.
621 (gfc_sym_mangled_function_id): Likewise.
623 2012-01-29 Tobias Burnus <burnus@net-b.de>
626 * resolve.c (symbol_as): Remove unused, accidentally
629 2012-01-28 Tobias Burnus <burnus@net-b.de>
632 * trans-stmt.c (gfc_trans_allocate): Properly check whether
633 we have a BT_CLASS which needs to be memset.
635 2012-01-27 Tobias Burnus <burnus@net-b.de>
638 * trans-expr.c (gfc_conv_procedure_call): Fix passing
639 of functions, which return allocatables.
641 2012-01-27 Tobias Burnus <burnus@net-b.de>
644 * resolve.c (resolve_formal_arglist): Fix elemental
645 constraint checks for polymorphic dummies also for
648 2012-01-27 Tobias Burnus <burnus@net-b.de>
652 * primary.c (gfc_match_varspec. gfc_match_rvalue): Set
653 handle array spec for BT_CLASS.
654 * expr.c (gfc_get_variable_expr, gfc_lval_expr_from_sym)
655 * frontend-passes.c (create_var): Ditto.
656 * resolve.c (resolve_actual_arglist, resolve_assoc_var): Ditto.
657 * trans-decl.c (gfc_trans_deferred_vars): Use class_pointer
658 instead of attr.pointer.
659 (gfc_generate_function_code): Use CLASS_DATA (sym) for BT_CLASS.
660 * trans-intrinsic.c (conv_intrinsic_move_alloc): Move assert.
661 * trans-stmt.c (trans_associate_var): Ask for the descriptor.
663 2012-01-27 Tobias Burnus <burnus@net-b.de>
666 * match.c (gfc_match_allocate): Allow more than allocate
669 2012-01-27 Tobias Burnus <burnus@net-b.de>
672 * resolve.c (resolve_formal_arglist): Fix elemental
673 constraint checks for polymorphic dummies.
675 2012-01-27 Paul Thomas <pault@gcc.gnu.org>
676 Tobias Burnus <burnus@gcc.gnu.org>
682 * trans-array.c (gfc_array_init_size): Add two extra arguments
683 to convey the dynamic element size of a calls object and to
684 return the number of elements that have been allocated.
685 (gfc_array_allocate): Add the same arguments and use them to
686 call gfc_array_init_size. Before the allocation dereference
687 the data pointer, if necessary. Set the allocated array to zero
688 if the class element size or expr3 are non-null.
689 * trans-expr.c (gfc_conv_class_to_class): Give this function
691 (get_class_array_ref): New function.
692 (gfc_copy_class_to_class): New function.
693 * trans-array.h : Update prototype for gfc_array_allocate.
694 * trans-stmt.c (gfc_trans_allocate): For non-variable class
695 STATUS expressions extract the class object and the dynamic
696 element size. Use the latter to call gfc_array_allocate and
697 the former for setting the vptr and, via
698 gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
699 * trans.h : Prototypes for gfc_get_class_array_ref,
700 gfc_copy_class_to_class and gfc_conv_class_to_class.
702 2012-01-25 Tobias Burnus <burnus@net-b.de>
704 * resolve.c (symbol_as): Check also for attr.class_ok.
706 2012-01-25 Tobias Burnus <burnus@net-b.de>
709 * class.c (gfc_build_class_symbol): Fix invalid freeing
710 issue with fclass->f2k_derived.
712 2012-01-25 Tobias Burnus <burnus@net-b.de>
715 * class.c (gfc_build_class_symbol): Ensure that
716 fclass->f2k_derived is set.
718 2012-01-25 Tobias Burnus <burnus@net-b.de>
721 * resolve.c (resolve_structure_cons): Only create an
722 array constructors for nonscalars.
724 2012-01-23 Tobias Burnus <burnus@net-b.de>
727 * check.c (variable_check): Fix checking for
728 variables and deeply nested BLOCKs.
730 2012-01-21 Tobias Burnus <burnus@net-b.de>
731 Steven G. Kargl <kargl@gcc.gnu.org>
734 * symbol.c (check_conflict): namelist-group-name cannot have the SAVE
737 2012-01-21 Tobias Burnus <burnus@net-b.de>
740 * interface.c (compare_parameter): Fix CLASS comparison.
742 2012-01-20 Tobias Burnus <burnus@net-b.de>
743 Janus Weil <janus@gcc.gnu.org>
746 * module.c (load_needed, read_module): Don't mark __vtab etc.
749 2012-01-19 Tobias Burnus <burnus@net-b.de>
752 * expr.c (gfc_build_intrinsic_call): Also set the symtree.
754 2012-01-18 Paul Thomas <pault@gcc.gnu.org>
757 * trans-expr.c (gfc_conv_procedure_call): Deallocate allocatable
758 components of temporary class arguments.
760 2012-01-17 Tobias Burnus <burnus@net-b.de>
761 Janne Blomqvist <jb@gcc.gnu.org>
764 * trans-expr.c (alloc_scalar_allocatable_for_assignment): Nullify
765 LHS after allocation, if it has allocatable components.
766 * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_CALLOC.
768 2012-01-16 Mikael Morin <mikael@gcc.gnu.org>
769 Tobias Burnus <burnus@net-b.de>
772 * trans-array.c (gfc_walk_elemental_function_args): Fix
773 passing of deallocated allocatables/pointers as absent argument.
775 2012-01-16 Tobias Burnus <burnus@net-b.de>
778 * class.c (gfc_find_derived_vtab): Mark __vtab and
779 __def_init as FL_VARIABLE not as FL_PARAMETER.
780 * expr.c (gfc_simplify_expr): Remove special
782 * resolve.c (resolve_values): Ditto.
783 * trans-decl.c (gfc_get_symbol_decl): Mark __vtab
784 and __def_init as TREE_READONLY.
786 2012-01-16 Zydrunas Gimbutas <gimbutas@cims.nyu.edu>
787 Andreas Kloeckner <kloeckner@cims.nyu.edu>
788 Steven G. Kargl <kargl@gcc.gnu.org>
791 * gfortran.h (gfc_option_t): Add members flag_*_kind to store kind.
792 * lang.opt: Add options -freal-4-real-8, -freal-4-real-10,
793 -freal-4-real-16, -freal-8-real-4, -freal-8-real-10, -freal-8-real-16
794 and -finteger-4-integer-8. User-desired type conversion information.
795 * decl.c (gfc_match_old_kind_spec,kind_expr): Type conversions
796 in declaration parsing.
797 * trans-types.c (gfc_init_kinds): User-specified type conversion
798 checked for current backend.
799 * primary.c (match_integer_constant,match_real_constant): Implement
800 type conversion in constant parsing.
801 * options.c (gfc_init_options,gfc_handle_option): Translate input
802 options to flags in internal options data structure.
803 * invoke.texi: Document new options. Re-order options in Options
806 2012-01-16 Paul Thomas <pault@gcc.gnu.org>
808 * trans-array.c (gfc_trans_create_temp_array): In the case of a
809 class array temporary, detect a null 'eltype' on entry and use
810 'initial' to provde the class reference and so, through the
811 vtable, the element size for the dynamic type.
812 * trans-stmt.c (gfc_conv_elemental_dependencies): For class
813 expressions, set 'eltype' to null and pass the values via the
814 'initial' expression.
816 2012-01-14 Tobias Burnus <burnus@net-b.de>
819 * resolve.c (build_default_init_expr): Also initialize
820 nonconstant-length strings with -finit-character=<n>.
822 2011-01-14 Tobias Burnus <burnus@net-b.de>
825 * module.c (read_module): Don't make nonexisting
826 intrinsic operators as found.
827 (rename_list_remove_duplicate): New function.
828 (gfc_use_modules): Use it.
830 2012-01-13 Paul Thomas <pault@gcc.gnu.org>
833 * trans-array.c (structure_alloc_comps): Suppress interative
834 call to self, when current component is deallocated using
835 gfc_trans_dealloc_allocated.
836 * class.c (gfc_build_class_symbol): Copy the 'alloc_comp'
837 attribute from the declared type to the class structure.
839 2012-01-13 Tobias Burnus <burnus@net-b.de>
842 * fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE
843 instead of a signed int of size POINTER_SIZE for
844 gfc_index_integer_kind.
846 2012-01-12 Tobias Burnus <burnus@net-b.de>
849 * intrinsic.texi (CHMOD): Extend a bit and remove statement
850 that /bin/chmod is called.
852 2012-01-10 Gerald Pfeifer <gerald@pfeifer.com>
854 * gfortran.texi (Fortran 2003 Status): Fix grammar.
856 2012-01-10 Tobias Burnus <burnus@net-b.de>
859 * resolve.c (resolve_allocate_expr): For non-deferred char lengths,
860 check whether type-spec matches declaration.
862 2012-01-10 Tobias Burnus <burnus@net-b.de>
864 * resolve.c (resolve_ordinary_assign): Improve error wording.
866 2012-01-09 Paul Thomas <pault@gcc.gnu.org>
869 * interface.c (matching_typebound_op): Drill down through
870 possible parentheses to obtain base expression. Do not test for
871 'class_ok' but, instead for the class structure components.
872 * resolve.c (resolve_ordinary_assign): Extend error message for
873 polymorphic assignment to advise checking for specific
877 * resolve.c (resolve_typebound_function): Restore 'static' to
880 2012-01-09 Mikael Morin <mikael@gcc.gnu.org>
883 * trans-array.c (gfc_walk_elemental_function_args):
884 Skip over NULL() actual arguments.
886 2012-01-09 Tobias Burnus <burnus@net-b.de>
888 * gfortran.texi: Bump copyright year.
889 (Fortran 2003 Status): Update polymorphism item, add
890 item for generic interface with DT name.
892 2012-01-09 Tobias Burnus <burnus@net-b.de>
895 * gfortran.h (gfc_use_list):
896 * match.h (gfc_use_module): Rename to ...
897 (gfc_use_modules): ... this.
898 * module.c (use_locus, specified_nonint, specified_int): Remove
900 (module_name): Change type to const char*, used with gfc_get_string.
901 (module_list): New global variable.
902 (free_rename): Free argument not global var.
903 (gfc_match_use): Save match to module_list.
904 (load_generic_interfaces, read_module): Don't free symtree.
905 (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
906 type change of module_name.
907 (write_symbol0, write_generic): Optimize due to the type change.
908 (import_iso_c_binding_module, use_iso_fortran_env_module): Use
909 locus of rename->where.
910 (gfc_use_module): Take module_list as argument.
911 (gfc_use_modules): New function.
912 (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
913 * parse.c (last_was_use_stmt): New global variable.
914 (use_modules): New function.
915 (decode_specification_statement, decode_statement): Move USE match up
916 and call use_modules.
917 (next_free, next_fixed): Call use_modules.
918 (accept_statement): Don't call gfc_module_use.
920 2012-01-06 Tobias Burnus <burnus@net-b.de>
922 * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
923 Update call to gfc_trans_dealloc_allocated.
924 * trans.c (gfc_allocate_using_malloc): Fix spacing.
925 (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
926 label_finish when an error occurs.
927 (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
928 * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
930 (gfor_fndecl_caf_deregister): New tree symbol.
931 * trans-expr.c (gfc_conv_procedure_call): Update
932 gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
933 * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
934 structure_alloc_comps, gfc_trans_deferred_array): Ditto.
935 (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
936 * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
937 gfc_trans_dealloc_allocated): Update prototypes.
938 * trans-stmt.c (gfc_trans_sync): Fix indentation.
939 (gfc_trans_allocate): Fix errmsg padding and label handling.
940 (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
941 * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
942 * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
943 to avoid other stats accidentally matching this one.
944 * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
945 (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
946 and add decl for caf_deregister.
947 (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
948 * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
949 gfc_deallocate_with_status.
951 2012-01-05 Paul Thomas <pault@gcc.gnu.org>
954 * resolve.c (resolve_typebound_static): If the typebound
955 procedure is 'deferred' try to find the correct specific
956 procedure in the derived type operator space itself.
958 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
961 * trans-array.h (gfc_walk_elemental_function_args): New argument.
962 * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
963 * trans-stmt.c (gfc_trans_call): Ditto.
964 * trans-array.c (gfc_walk_function_expr): Ditto.
965 (gfc_walk_elemental_function_args): Get the dummy argument list
966 if possible. Check that the dummy and the actual argument are both
967 optional, and set can_be_null_ref accordingly.
969 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
972 * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
973 * trans-array.c: If the reference can be NULL, save the reference
974 instead of the value.
975 * trans-expr.c (gfc_conv_expr): If we have saved a reference,
978 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
980 * trans-expr.c (gfc_conv_expr): Move address taking...
981 (gfc_conv_expr_reference): ... here.
983 2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
986 * trans-common.c (create_common): Update copyright years. Mark
987 variables as used to avoid warnings about unused variables in
990 2012-01-03 Hans-Peter Nilsson <hp@axis.com>
992 * gfortran.h (struct gfc_expr): Add missing "struct"
993 qualifier for member base_expr.
995 2012-01-02 Paul Thomas <pault@gcc.gnu.org>
998 * trans-array.c (gfc_array_allocate): Null allocated memory of
999 newly allocted class arrays.
1004 * interface.c(build_compcall_for_operator): Add a type to the
1006 * trans-expr.c (conv_base_obj_fcn_val): New function.
1007 (gfc_conv_procedure_call): Use base_expr to detect non-variable
1008 base objects and, ensuring that there is a temporary variable,
1009 build up the typebound call using conv_base_obj_fcn_val.
1010 (gfc_trans_class_assign): Pick out class procedure pointer
1011 assignments and do the assignment with no further prcessing.
1012 (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
1013 gfc_trans_class_assign): Move to top of file.
1014 * gfortran.h : Add 'base_expr' field to gfc_expr.
1015 * resolve.c (get_declared_from_expr): Add 'types' argument to
1016 switch checking of derived types on or off.
1017 (resolve_typebound_generic_call): Set the new argument.
1018 (resolve_typebound_function, resolve_typebound_subroutine):
1019 Set 'types' argument for get_declared_from_expr appropriately.
1020 Identify base expression, if not a variable, in the argument
1021 list of class valued calls. Assign it to the 'base_expr' field
1022 of the final expression. Strip away all references after the
1023 last class reference.
1025 2012-01-02 Tobias Burnus <burnus@net-b.de>
1028 * trans-intrinsic.c (trans_this_image, trans_image_index,
1029 trans_num_images, conv_intrinsic_cobound): Fold_convert the
1030 caf_num_images/caf_this_images variables to the correct int kind.
1032 2012-01-01 Jakub Jelinek <jakub@redhat.com>
1034 * gfortranspec.c (lang_specific_driver): Update copyright notice
1037 Copyright (C) 2012 Free Software Foundation, Inc.
1039 Copying and distribution of this file, with or without modification,
1040 are permitted in any medium without royalty provided the copyright
1041 notice and this notice are preserved.