1 2013-11-02 Janus Weil <janus@gcc.gnu.org>
4 2013-09-23 Janus Weil <janus@gcc.gnu.org>
7 * decl.c (check_extended_derived_type): Prevent segfault, modify error
10 2013-08-11 Janus Weil <janus@gcc.gnu.org>
13 2013-08-09 Janus Weil <janus@gcc.gnu.org>
16 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Free the temporary
19 2013-07-08 Tobias Burnus <burnus@net-b.de>
22 * simplify.c (compute_dot_product): Complex conjugate for
24 (gfc_simplify_dot_product, gfc_simplify_matmul): Update call.
26 2013-06-06 Tobias Burnus <burnus@net-b.de>
28 Backport from mainline
29 2012-08-27 Tobias Burnus <burnus@net-b.de>
32 * trans-stmt.c (gfc_trans_do_while): Don't change the logical
33 kind for negation of the condition.
35 2013-06-01 Janus Weil <janus@gcc.gnu.org>
36 Tobias Burnus <burnus@net-b.de>
39 * interface.c (check_dummy_characteristics): Symmetrize type check.
41 2013-05-22 Janne Blomqvist <jb@gcc.gnu.org>
43 * intrinsic.texi (RANDOM_SEED): Improve example.
45 2013-05-07 Tobias Burnus <burnus@net-b.de>
47 Backport from mainline
48 2013-05-02 Tobias Burnus <burnus@net-b.de>
51 * simplify.c (gfc_simplify_size): Renamed from
52 simplify_size; fix kind=8 handling.
53 (gfc_simplify_size): New function.
54 (gfc_simplify_shape): Add range check.
55 * resolve.c (resolve_function): Fix handling
58 2013-04-26 Janus Weil <janus@gcc.gnu.org>
63 * expr.c (gfc_check_pointer_assign): Handle generic functions returning
68 * check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE
70 * target-memory.h (gfc_element_size): New prototype.
71 * target-memory.c (size_array): Remove.
72 (gfc_element_size): New function.
73 (gfc_target_expr_size): Modified to always return the full size of the
76 2013-04-18 Tobias Burnus <burnus@net-b.de>
79 * invoke.texi (NEAREST): S argument is not optional.
81 2013-04-11 Release Manager
85 2013-03-15 Tobias Burnus <burnus@net-b.de>
88 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Pack arrays
89 if they are not simply contiguous.
91 2013-03-13 Paul Thomas <pault@gcc.gnu.org>
94 * expr.c (gfc_default_initializer): Check that a class declared
95 type has any components.
96 * resolve.c (resolve_fl_derived0): On failing the test for C437
97 set the type to BT_UNKNOWN to prevent repeat error messages.
99 2013-03-10 Paul Thomas <pault@gcc.gnu.org>
102 * check.c (array_check): It is an error if a procedure is
105 2013-02-22 Janus Weil <janus@gcc.gnu.org>
108 * trans-array.c (structure_alloc_comps): Handle procedure-pointer
109 components with allocatable result.
111 2013-02-17 Tobias Burnus <burnus@net-b.de>
112 Mikael Morin <mikael@gcc.gnu.org>
115 2013-01-28 Tobias Burnus <burnus@net-b.de>
116 Mikael Morin <mikael@gcc.gnu.org>
119 * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
121 (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
122 * decl.c (gfc_match_data_decl): Ditto.
123 (variable_decl): Remove undeclared type error.
124 (gfc_match_import): Use renamed instead of original name.
126 2013-02-15 Tobias Burnus <burnus@net-b.de>
127 Mikael Morin <mikael@gcc.gnu.org>
130 * simplify.c (gfc_simplify_matmul): Fix result shape
133 2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
138 * decl.c (gfc_match_end): Remove half-ready namespace
139 from parent if the end of a block is missing.
140 * parse.c (parse_module): Do not put namespace into
143 2013-02-01 Jakub Jelinek <jakub@redhat.com>
145 Backported from mainline
146 2013-01-23 Jakub Jelinek <jakub@redhat.com>
149 * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
150 and DECL_IGNORED_P on select_type_temporary and don't set
153 2013-01-24 Janus Weil <janus@gcc.gnu.org>
156 * resolve.c (resolve_select): Add argument 'select_type', reject
157 non-scalar expressions.
158 (resolve_select_type,resolve_code): Pass new argument to
161 2013-01-17 Janus Weil <janus@gcc.gnu.org>
164 * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
167 2013-01-13 Janus Weil <janus@gcc.gnu.org>
170 * trans-array.c (gfc_conv_array_parameter): No packing was done for
171 full arrays of derived type.
173 2013-01-13 Paul Thomas <pault@gcc.gnu.org>
176 * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
177 character function arguments to elemental procedures in
180 2013-01-08 Mikael Morin <mikael@gcc.gnu.org>
185 * module.c (read_module): Don't reuse local symtree if the associated
186 symbol isn't exactly the one wanted. Don't reuse local symtree if it is
188 * resolve.c (resolve_call): Use symtree's name instead of symbol's to
191 2013-01-07 Tobias Burnus <burnus@net-b.de>
192 Thomas Koenig <tkoenig@gcc.gnu.org>
193 Jakub Jelinek <jakub@redhat.com>
196 * expr.c (gfc_build_intrinsic_call): Avoid clashes
197 with user's procedures.
198 * gfortran.h (gfc_build_intrinsic_call): Update prototype.
199 (GFC_PREFIX): Define.
200 * simplify.c (gfc_simplify_size): Update call.
202 2013-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
203 Mikael Morin <mikael@gcc.gnu.org>
206 * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
208 * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
210 2012-12-20 Tobias Burnus <burnus@net-b.de>
213 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ensure that
214 the string length is of type gfc_charlen_type_node.
216 2012-11-24 Thomas Koenig <tkoenig@gcc.gnu.org>
220 * resolve.c (resolve_allocate_deallocate): Compare all
221 subscripts when deciding if to reject a (de)allocate
224 2012-11-23 Janus Weil <janus@gcc.gnu.org>
227 * trans-decl.c (generate_local_decl): Don't warn for explicitly imported
228 but unused module variables which are in a namelist or common block.
230 2012-11-06 Janus Weil <janus@gcc.gnu.org>
233 * target-memory.c (gfc_target_expr_size,gfc_target_interpret_expr):
236 2012-10-14 Janus Weil <janus@gcc.gnu.org>
239 * trans-stmt.c (gfc_trans_allocate): Correctly determine the reference
240 to the _data component for polymorphic allocation with SOURCE.
242 2012-09-20 Release Manager
244 * GCC 4.7.2 released.
246 2012-09-13 Tobias Burnus <burnus@net-b.de>
249 * resolve.c (resolve_formal_arglist): Allow VALUE arguments
251 (gfc_impure_variable): Don't check gfc_pure such that the
252 function also works for gfc_implicit_pure procedures.
254 2012-09-12 Tobias Burnus <burnus@net-b.de>
258 * array.c (match_subscript, gfc_match_array_ref): Fix
259 diagnostic of coarray's '*'.
261 2012-09-10 Janus Weil <janus@gcc.gnu.org>
265 * match.c (gfc_match_select_type): Make sure to only access CLASS_DATA
268 2012-09-08 Mikael Morin <mikael@gcc.gnu.org>
271 * simplify.c (simplify_bound_dim): Resolve array spec before
272 proceeding with simplification.
274 2012-07-06 Mikael Morin <mikael@gcc.gnu.org>
277 * trans-array.c (gfc_add_loop_ss_code): Disable self recursive calls
278 handling nested loop(s) if the subscript flag is true.
280 2012-06-22 Tobias Burnus <burnus@net-b.de>
282 Backport from mainline
283 2012-06-17 Tobias Burnus <burnus@net-b.de>
287 * check.c (gfc_calculate_transfer_sizes): Return if
288 SIZE= is not constant or source-size cannot be determined.
290 2012-06-14 Tobias Burnus <burnus@net-b.de>
292 Backport from mainline
293 2012-06-04 Tobias Burnus <burnus@net-b.de>
296 * resolve.c (build_default_init_expr): Don't initialize
299 2012-06-14 Tobias Burnus <burnus@net-b.de>
302 * decl.c (match_attr_spec): Only mark module variables
303 as SAVE_IMPLICIT for Fortran 2008 and later.
305 2012-06-14 Release Manager
307 * GCC 4.7.1 released.
309 2012-06-01 Tobias Burnus <burnus@net-b.de>
312 * trans.c (gfc_deallocate_scalar_with_status): Properly
313 handle the case size == 0.
315 2012-05-23 Tobias Burnus <burnus@net-b.de>
318 * trans-array.c (gfc_add_loop_ss_code): Don't evaluate expression, if
319 ss->is_alloc_lhs is set.
321 2012-05-07 Tobias Burnus <burnus@net-b.de>
323 Backport from mainline:
324 2012-05-07 Tobias Burnus <burnus@net-b.de>
327 * resolve.c (resolve_typebound_static): Fix handling
328 of overridden specific to generic operator.
330 2012-05-05 Tobias Burnus <burnus@net-b.de>
332 Backport from mainline:
333 2012-05-04 Tobias Burnus <burnus@net-b.de>
336 * resolve.c (resolve_fl_derived): Fix -std=f95
337 diagnostic for generic vs. DT names.
339 2012-05-02 Tobias Burnus <burnus@net-b.de>
341 Backport from mainline
342 2012-04-12 Tobias Burnus <burnus@net-b.de>
345 * expr.c (gfc_check_vardef_context): Fix assignment check for
348 2012-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
352 * frontend-passes.c (create_var): If the statement has a label,
353 put the label around the block.
355 2012-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
359 * frontend-passes.c: Keep track of wether we are in an implicit
360 DO loop; do not do function elimination if we are.
362 2012-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
366 * module.c: Only mark symbols as use_only if they have been
367 imported via an only list.
369 2012-03-22 Tobias Burnus <burnus@net-b.de>
372 * resolve.c (resolve_intrinsic): Don't search for a
373 function if we know that it is a subroutine.
375 2012-03-22 Release Manager
377 * GCC 4.7.0 released.
379 2012-03-10 Tobias Burnus <burnus@net-b.de>
382 * trans-types.c (gfc_get_function_type): Handle backend_decl
383 of a procedure pointer.
385 2012-02-29 Paul Thomas <pault@gcc.gnu.org>
388 * trans-expr.c (fcncall_realloc_result): Dereference the
389 descriptor if needed.
391 2012-02-22 Tobias Burnus <burnus@net-b.de>
394 * io.c (gfc_match_open): Remove bogus F2003 DELIM= check.
396 2012-02-18 Tobias Burnus <burnus@net-b.de>
399 * interface.c (check_interface0): Internal procs in
400 generic interfaces are allowed in Fortran 2008.
402 2012-02-17 Tobias Burnus <burnus@net-b.de>
403 Roland Stigge <stigge@antcom.de>
406 * interface.c (compare_actual_formal): Fix typo "at at".
408 2012-02-17 Tobias Burnus <burnus@net-b.de>
410 * gfortran.texi (Q exponent-letter): Fix grammar.
412 2012-02-17 Tobias Burnus <burnus@net-b.de>
414 * gfortran.texi (Status): Fix typos.
415 * invoke.texi (ffixed-form, fstack-arrays): Spell Fortran with
418 2012-02-17 Tobias Burnus <burnus@net-b.de>
419 Roland Stigge <stigge@antcom.de>
427 * io.c (gfc_match_open): Fix typo.
428 * interface.c (compare_actual_formal): Ditto.
429 * lang.opt (freal-4-real-8, freal-4-real-16, freal-8-real-16): Ditto.
430 * match.c (alloc_opt_list, gfc_match_nullify): Ditto.
431 * check.c (gfc_check_associated, gfc_check_null): Ditto.
433 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
436 * trans-stmt.c (gfc_get_proc_ifc_for_call): New function.
437 (gfc_trans_call): Use gfc_get_proc_ifc_for_call.
439 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
441 * trans-array.c (gfc_walk_elemental_function_args,
442 gfc_walk_function_expr): Move call to gfc_get_proc_ifc_for_expr out
443 of gfc_walk_elemental_function_args.
444 * trans-stmt.c (gfc_trans_call): Ditto.
445 * trans-array.h (gfc_get_proc_ifc_for_expr): New prototype.
446 (gfc_walk_elemental_function_args): Update prototype.
448 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
450 * trans-array.c (gfc_get_proc_ifc_for_expr): New function.
451 (gfc_walk_elemental_function_args): Move code to
452 gfc_get_proc_ifc_for_expr and call it.
454 2012-02-08 Tobias Burnus <burnus@net-b.de>
457 * trans-expr.c (fcncall_realloc_result): Set also the stride.
459 2012-02-07 Tobias Burnus <burnus@net-b.de>
462 * trans-expr.c (gfc_conv_procedure_call): Add _data component
463 for calls of scalar CLASS actuals to TYPE dummies.
465 2012-02-05 Thomas König <tkoenig@gcc.gnu.org>
468 * trans-decl.c: Warn about unused dummy procedure arguments
469 if -Wunused-dummy-argument is specified. Suppress middle-end
470 warnings about procedure arguments.
472 2012-02-05 Paul Thomas <pault@gcc.gnu.org>
474 * trans-array.c (gfc_array_allocate): Zero memory for all class
476 * trans-stmt.c (gfc_trans_allocate): Ditto for class scalars.
479 * trans-stmt.c (gfc_trans_allocate): Before correcting a class
480 array reference, ensure that 'dataref' points to the _data
481 component that is followed by the array reference..
483 2012-02-02 Mikael Morin <mikael@gcc.gnu.org>
489 * class.c (insert_component_ref, class_data_ref_missing,
490 gfc_fix_class_refs): New functions.
491 * gfortran.h (gfc_fix_class_refs): New prototype.
492 * trans-expr.c (gfc_conv_expr): Remove special case handling and call
493 gfc_fix_class_refs instead.
495 2012-02-02 Paul Thomas <pault@gcc.gnu.org>
498 * trans-expr.c (fcncall_realloc_result): If variable shape is
499 correct, retain the bounds, whatever they are.
501 2012-02-02 Tobias Burnus <burnus@net-b.de>
504 * simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES.
506 2012-02-01 Thomas König <tkoenig@gcc.gnu.org>
509 * frontend-passes.c (convert_elseif): New function.
510 (optimize_namespace): Call it.
512 2012-02-01 Tobias Burnus <burnus@net-b.de>
515 * module.c (MOD_VERSION): Bump.
516 (mio_typebound_proc): Read/write is_operator from/to the
519 2012-02-01 Tobias Burnus <burnus@net-b.de>
522 * trans-expr.c (gfc_conv_procedure_call): Add array ref
525 2012-01-31 Tobias Burnus <burnus@net-b.de>
528 * gfortran.h (gfc_tbp_generic): Store whether the
529 generic is an operator.
530 * decl.c (gfc_match_generic): Set that flag.
531 * resolve.c (check_generic_tbp_ambiguity): Use it in the
532 gfc_compare_interfaces check.
534 2012-01-31 Tobias Burnus <burnus@net-b.de>
537 * class.c (gfc_find_derived_vtab): Mark _copy function as pure.
539 2012-01-31 Tobias Burnus <burnus@net-b.de>
542 * class.c (get_unique_hashed_string): Adapt trim length.
543 (gfc_build_class_symbol) Encode also corank in the container name.
545 2012-01-31 Paul Thomas <pault@gcc.gnu.org>
548 * trans-expr.c (fcncall_realloc_result): Correct calculation of
551 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
553 * module.c (pointer_info): Make true_name and module pointers
554 rather than arrays, order pointers before other fields.
555 (free_pi_tree): free true_name and module as well.
556 (mio_read_string): Rename to read_string.
557 (mio_write_string): Remove.
558 (load_commons): Use read_string.
559 (read_module): Use read_string rather than mio_internal_string.
560 (write_blank_common): Call write_atom directly.
561 (write_symbol): Likewise.
563 2012-01-29 Tobias Burnus <burnus@net-b.de>
566 * expr.c (gfc_default_initializer): Convert the values if
567 the type does not match.
569 2012-01-29 Tobias Burnus <burnus@net-b.de>
572 * trans-array.c (structure_alloc_comps): Fix assignment of
573 polymorphic components (polymorphic deep copying).
575 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
578 * decl.c (set_binding_label): Make binding_label argument const.
579 (curr_binding_label): Constify.
580 * gfortran.h (gfc_symbol): Constify binding_label.
581 (gfc_common_head): Likewise.
582 (get_iso_c_sym): Likewise.
583 * match.c (gfc_match_name_C): Constify buffer argument.
584 * match.h (gfc_match_name_C): Likewise.
585 * resolve.c (set_name_and_label): Constify binding_label argument.
586 (gfc_iso_c_sub_interface): Constify binding_label variable.
587 * symbol.c (get_iso_c_sym): Constify binding_label argument.
589 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
592 * decl.c (set_binding_label): Move prototype from match.h to here.
593 (curr_binding_label): Make a pointer rather than static array.
594 (build_sym): Check sym->binding_label pointer rather than array,
595 update set_binding_label call, handle curr_binding_label changes.
596 (set_binding_label): Handle new curr_binding_label, dest_label
597 double ptr, and sym->binding_label.
598 (verify_bind_c_sym): Handle sym->binding_label being a pointer.
599 (set_verify_bind_c_sym): Check sym->binding_label pointer rather
600 than array, update set_binding_label call.
601 (gfc_match_bind_c_stmt): Handle curr_binding_label change.
602 (match_procedure_decl): Update set_binding_label call.
603 (gfc_match_bind_c): Change binding_label to pointer, update
604 gfc_match_name_C call.
605 * gfortran.h (GFC_MAX_BINDING_LABEL_LEN): Remove macro.
606 (gfc_symbol): Make binding_label a pointer.
607 (gfc_common_head): Likewise.
608 * match.c (gfc_match_name_C): Heap allocate bind(C) name.
609 * match.h (gfc_match_name_C): Change prototype argument.
610 (set_binding_label): Move prototype to decl.c.
611 * module.c (struct pointer_info): Make binding_label a pointer.
612 (free_pi_tree): Free unused binding_label.
613 (mio_read_string): New function.
614 (mio_write_string): New function.
615 (load_commons): Redo reading of binding_label.
616 (read_module): Likewise.
617 (write_common_0): Change to write empty string instead of name if
619 (write_blank_common): Write empty string for binding label.
620 (write_symbol): Change to write empty string instead of name if no
622 * resolve.c (gfc_iso_c_func_interface): Don't set binding_label.
623 (set_name_and_label): Make binding_label double pointer, use
625 (gfc_iso_c_sub_interface): Make binding_label a pointer.
626 (resolve_bind_c_comms): Handle cases if
627 gfc_common_head->binding_label is NULL.
628 (gfc_verify_binding_labels): sym->binding_label is a pointer.
629 * symbol.c (gfc_new_symbol): Rely on XCNEW zero init for
631 (gen_special_c_interop_ptr): Don't set binding label.
632 (generate_isocbinding_symbol): Insert binding_label into symbol
634 (get_iso_c_sym): Use pointer assignment instead of strcpy.
635 * trans-common.c (gfc_sym_mangled_common_id): Handle
636 com->binding_label being a pointer.
637 * trans-decl.c (gfc_sym_mangled_identifier): Handle
638 sym->binding_label being a pointer.
639 (gfc_sym_mangled_function_id): Likewise.
641 2012-01-29 Tobias Burnus <burnus@net-b.de>
644 * resolve.c (symbol_as): Remove unused, accidentally
647 2012-01-28 Tobias Burnus <burnus@net-b.de>
650 * trans-stmt.c (gfc_trans_allocate): Properly check whether
651 we have a BT_CLASS which needs to be memset.
653 2012-01-27 Tobias Burnus <burnus@net-b.de>
656 * trans-expr.c (gfc_conv_procedure_call): Fix passing
657 of functions, which return allocatables.
659 2012-01-27 Tobias Burnus <burnus@net-b.de>
662 * resolve.c (resolve_formal_arglist): Fix elemental
663 constraint checks for polymorphic dummies also for
666 2012-01-27 Tobias Burnus <burnus@net-b.de>
670 * primary.c (gfc_match_varspec. gfc_match_rvalue): Set
671 handle array spec for BT_CLASS.
672 * expr.c (gfc_get_variable_expr, gfc_lval_expr_from_sym)
673 * frontend-passes.c (create_var): Ditto.
674 * resolve.c (resolve_actual_arglist, resolve_assoc_var): Ditto.
675 * trans-decl.c (gfc_trans_deferred_vars): Use class_pointer
676 instead of attr.pointer.
677 (gfc_generate_function_code): Use CLASS_DATA (sym) for BT_CLASS.
678 * trans-intrinsic.c (conv_intrinsic_move_alloc): Move assert.
679 * trans-stmt.c (trans_associate_var): Ask for the descriptor.
681 2012-01-27 Tobias Burnus <burnus@net-b.de>
684 * match.c (gfc_match_allocate): Allow more than allocate
687 2012-01-27 Tobias Burnus <burnus@net-b.de>
690 * resolve.c (resolve_formal_arglist): Fix elemental
691 constraint checks for polymorphic dummies.
693 2012-01-27 Paul Thomas <pault@gcc.gnu.org>
694 Tobias Burnus <burnus@gcc.gnu.org>
700 * trans-array.c (gfc_array_init_size): Add two extra arguments
701 to convey the dynamic element size of a calls object and to
702 return the number of elements that have been allocated.
703 (gfc_array_allocate): Add the same arguments and use them to
704 call gfc_array_init_size. Before the allocation dereference
705 the data pointer, if necessary. Set the allocated array to zero
706 if the class element size or expr3 are non-null.
707 * trans-expr.c (gfc_conv_class_to_class): Give this function
709 (get_class_array_ref): New function.
710 (gfc_copy_class_to_class): New function.
711 * trans-array.h : Update prototype for gfc_array_allocate.
712 * trans-stmt.c (gfc_trans_allocate): For non-variable class
713 STATUS expressions extract the class object and the dynamic
714 element size. Use the latter to call gfc_array_allocate and
715 the former for setting the vptr and, via
716 gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
717 * trans.h : Prototypes for gfc_get_class_array_ref,
718 gfc_copy_class_to_class and gfc_conv_class_to_class.
720 2012-01-25 Tobias Burnus <burnus@net-b.de>
722 * resolve.c (symbol_as): Check also for attr.class_ok.
724 2012-01-25 Tobias Burnus <burnus@net-b.de>
727 * class.c (gfc_build_class_symbol): Fix invalid freeing
728 issue with fclass->f2k_derived.
730 2012-01-25 Tobias Burnus <burnus@net-b.de>
733 * class.c (gfc_build_class_symbol): Ensure that
734 fclass->f2k_derived is set.
736 2012-01-25 Tobias Burnus <burnus@net-b.de>
739 * resolve.c (resolve_structure_cons): Only create an
740 array constructors for nonscalars.
742 2012-01-23 Tobias Burnus <burnus@net-b.de>
745 * check.c (variable_check): Fix checking for
746 variables and deeply nested BLOCKs.
748 2012-01-21 Tobias Burnus <burnus@net-b.de>
749 Steven G. Kargl <kargl@gcc.gnu.org>
752 * symbol.c (check_conflict): namelist-group-name cannot have the SAVE
755 2012-01-21 Tobias Burnus <burnus@net-b.de>
758 * interface.c (compare_parameter): Fix CLASS comparison.
760 2012-01-20 Tobias Burnus <burnus@net-b.de>
761 Janus Weil <janus@gcc.gnu.org>
764 * module.c (load_needed, read_module): Don't mark __vtab etc.
767 2012-01-19 Tobias Burnus <burnus@net-b.de>
770 * expr.c (gfc_build_intrinsic_call): Also set the symtree.
772 2012-01-18 Paul Thomas <pault@gcc.gnu.org>
775 * trans-expr.c (gfc_conv_procedure_call): Deallocate allocatable
776 components of temporary class arguments.
778 2012-01-17 Tobias Burnus <burnus@net-b.de>
779 Janne Blomqvist <jb@gcc.gnu.org>
782 * trans-expr.c (alloc_scalar_allocatable_for_assignment): Nullify
783 LHS after allocation, if it has allocatable components.
784 * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_CALLOC.
786 2012-01-16 Mikael Morin <mikael@gcc.gnu.org>
787 Tobias Burnus <burnus@net-b.de>
790 * trans-array.c (gfc_walk_elemental_function_args): Fix
791 passing of deallocated allocatables/pointers as absent argument.
793 2012-01-16 Tobias Burnus <burnus@net-b.de>
796 * class.c (gfc_find_derived_vtab): Mark __vtab and
797 __def_init as FL_VARIABLE not as FL_PARAMETER.
798 * expr.c (gfc_simplify_expr): Remove special
800 * resolve.c (resolve_values): Ditto.
801 * trans-decl.c (gfc_get_symbol_decl): Mark __vtab
802 and __def_init as TREE_READONLY.
804 2012-01-16 Zydrunas Gimbutas <gimbutas@cims.nyu.edu>
805 Andreas Kloeckner <kloeckner@cims.nyu.edu>
806 Steven G. Kargl <kargl@gcc.gnu.org>
809 * gfortran.h (gfc_option_t): Add members flag_*_kind to store kind.
810 * lang.opt: Add options -freal-4-real-8, -freal-4-real-10,
811 -freal-4-real-16, -freal-8-real-4, -freal-8-real-10, -freal-8-real-16
812 and -finteger-4-integer-8. User-desired type conversion information.
813 * decl.c (gfc_match_old_kind_spec,kind_expr): Type conversions
814 in declaration parsing.
815 * trans-types.c (gfc_init_kinds): User-specified type conversion
816 checked for current backend.
817 * primary.c (match_integer_constant,match_real_constant): Implement
818 type conversion in constant parsing.
819 * options.c (gfc_init_options,gfc_handle_option): Translate input
820 options to flags in internal options data structure.
821 * invoke.texi: Document new options. Re-order options in Options
824 2012-01-16 Paul Thomas <pault@gcc.gnu.org>
826 * trans-array.c (gfc_trans_create_temp_array): In the case of a
827 class array temporary, detect a null 'eltype' on entry and use
828 'initial' to provde the class reference and so, through the
829 vtable, the element size for the dynamic type.
830 * trans-stmt.c (gfc_conv_elemental_dependencies): For class
831 expressions, set 'eltype' to null and pass the values via the
832 'initial' expression.
834 2012-01-14 Tobias Burnus <burnus@net-b.de>
837 * resolve.c (build_default_init_expr): Also initialize
838 nonconstant-length strings with -finit-character=<n>.
840 2011-01-14 Tobias Burnus <burnus@net-b.de>
843 * module.c (read_module): Don't make nonexisting
844 intrinsic operators as found.
845 (rename_list_remove_duplicate): New function.
846 (gfc_use_modules): Use it.
848 2012-01-13 Paul Thomas <pault@gcc.gnu.org>
851 * trans-array.c (structure_alloc_comps): Suppress interative
852 call to self, when current component is deallocated using
853 gfc_trans_dealloc_allocated.
854 * class.c (gfc_build_class_symbol): Copy the 'alloc_comp'
855 attribute from the declared type to the class structure.
857 2012-01-13 Tobias Burnus <burnus@net-b.de>
860 * fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE
861 instead of a signed int of size POINTER_SIZE for
862 gfc_index_integer_kind.
864 2012-01-12 Tobias Burnus <burnus@net-b.de>
867 * intrinsic.texi (CHMOD): Extend a bit and remove statement
868 that /bin/chmod is called.
870 2012-01-10 Gerald Pfeifer <gerald@pfeifer.com>
872 * gfortran.texi (Fortran 2003 Status): Fix grammar.
874 2012-01-10 Tobias Burnus <burnus@net-b.de>
877 * resolve.c (resolve_allocate_expr): For non-deferred char lengths,
878 check whether type-spec matches declaration.
880 2012-01-10 Tobias Burnus <burnus@net-b.de>
882 * resolve.c (resolve_ordinary_assign): Improve error wording.
884 2012-01-09 Paul Thomas <pault@gcc.gnu.org>
887 * interface.c (matching_typebound_op): Drill down through
888 possible parentheses to obtain base expression. Do not test for
889 'class_ok' but, instead for the class structure components.
890 * resolve.c (resolve_ordinary_assign): Extend error message for
891 polymorphic assignment to advise checking for specific
895 * resolve.c (resolve_typebound_function): Restore 'static' to
898 2012-01-09 Mikael Morin <mikael@gcc.gnu.org>
901 * trans-array.c (gfc_walk_elemental_function_args):
902 Skip over NULL() actual arguments.
904 2012-01-09 Tobias Burnus <burnus@net-b.de>
906 * gfortran.texi: Bump copyright year.
907 (Fortran 2003 Status): Update polymorphism item, add
908 item for generic interface with DT name.
910 2012-01-09 Tobias Burnus <burnus@net-b.de>
913 * gfortran.h (gfc_use_list):
914 * match.h (gfc_use_module): Rename to ...
915 (gfc_use_modules): ... this.
916 * module.c (use_locus, specified_nonint, specified_int): Remove
918 (module_name): Change type to const char*, used with gfc_get_string.
919 (module_list): New global variable.
920 (free_rename): Free argument not global var.
921 (gfc_match_use): Save match to module_list.
922 (load_generic_interfaces, read_module): Don't free symtree.
923 (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
924 type change of module_name.
925 (write_symbol0, write_generic): Optimize due to the type change.
926 (import_iso_c_binding_module, use_iso_fortran_env_module): Use
927 locus of rename->where.
928 (gfc_use_module): Take module_list as argument.
929 (gfc_use_modules): New function.
930 (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
931 * parse.c (last_was_use_stmt): New global variable.
932 (use_modules): New function.
933 (decode_specification_statement, decode_statement): Move USE match up
934 and call use_modules.
935 (next_free, next_fixed): Call use_modules.
936 (accept_statement): Don't call gfc_module_use.
938 2012-01-06 Tobias Burnus <burnus@net-b.de>
940 * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
941 Update call to gfc_trans_dealloc_allocated.
942 * trans.c (gfc_allocate_using_malloc): Fix spacing.
943 (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
944 label_finish when an error occurs.
945 (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
946 * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
948 (gfor_fndecl_caf_deregister): New tree symbol.
949 * trans-expr.c (gfc_conv_procedure_call): Update
950 gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
951 * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
952 structure_alloc_comps, gfc_trans_deferred_array): Ditto.
953 (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
954 * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
955 gfc_trans_dealloc_allocated): Update prototypes.
956 * trans-stmt.c (gfc_trans_sync): Fix indentation.
957 (gfc_trans_allocate): Fix errmsg padding and label handling.
958 (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
959 * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
960 * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
961 to avoid other stats accidentally matching this one.
962 * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
963 (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
964 and add decl for caf_deregister.
965 (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
966 * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
967 gfc_deallocate_with_status.
969 2012-01-05 Paul Thomas <pault@gcc.gnu.org>
972 * resolve.c (resolve_typebound_static): If the typebound
973 procedure is 'deferred' try to find the correct specific
974 procedure in the derived type operator space itself.
976 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
979 * trans-array.h (gfc_walk_elemental_function_args): New argument.
980 * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
981 * trans-stmt.c (gfc_trans_call): Ditto.
982 * trans-array.c (gfc_walk_function_expr): Ditto.
983 (gfc_walk_elemental_function_args): Get the dummy argument list
984 if possible. Check that the dummy and the actual argument are both
985 optional, and set can_be_null_ref accordingly.
987 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
990 * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
991 * trans-array.c: If the reference can be NULL, save the reference
992 instead of the value.
993 * trans-expr.c (gfc_conv_expr): If we have saved a reference,
996 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
998 * trans-expr.c (gfc_conv_expr): Move address taking...
999 (gfc_conv_expr_reference): ... here.
1001 2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
1004 * trans-common.c (create_common): Update copyright years. Mark
1005 variables as used to avoid warnings about unused variables in
1008 2012-01-03 Hans-Peter Nilsson <hp@axis.com>
1010 * gfortran.h (struct gfc_expr): Add missing "struct"
1011 qualifier for member base_expr.
1013 2012-01-02 Paul Thomas <pault@gcc.gnu.org>
1016 * trans-array.c (gfc_array_allocate): Null allocated memory of
1017 newly allocted class arrays.
1022 * interface.c(build_compcall_for_operator): Add a type to the
1024 * trans-expr.c (conv_base_obj_fcn_val): New function.
1025 (gfc_conv_procedure_call): Use base_expr to detect non-variable
1026 base objects and, ensuring that there is a temporary variable,
1027 build up the typebound call using conv_base_obj_fcn_val.
1028 (gfc_trans_class_assign): Pick out class procedure pointer
1029 assignments and do the assignment with no further prcessing.
1030 (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
1031 gfc_trans_class_assign): Move to top of file.
1032 * gfortran.h : Add 'base_expr' field to gfc_expr.
1033 * resolve.c (get_declared_from_expr): Add 'types' argument to
1034 switch checking of derived types on or off.
1035 (resolve_typebound_generic_call): Set the new argument.
1036 (resolve_typebound_function, resolve_typebound_subroutine):
1037 Set 'types' argument for get_declared_from_expr appropriately.
1038 Identify base expression, if not a variable, in the argument
1039 list of class valued calls. Assign it to the 'base_expr' field
1040 of the final expression. Strip away all references after the
1041 last class reference.
1043 2012-01-02 Tobias Burnus <burnus@net-b.de>
1046 * trans-intrinsic.c (trans_this_image, trans_image_index,
1047 trans_num_images, conv_intrinsic_cobound): Fold_convert the
1048 caf_num_images/caf_this_images variables to the correct int kind.
1050 2012-01-01 Jakub Jelinek <jakub@redhat.com>
1052 * gfortranspec.c (lang_specific_driver): Update copyright notice
1055 Copyright (C) 2012 Free Software Foundation, Inc.
1057 Copying and distribution of this file, with or without modification,
1058 are permitted in any medium without royalty provided the copyright
1059 notice and this notice are preserved.