1. 11 Oct, 2011 1 commit
  2. 08 Sep, 2011 4 commits
    • mikael's avatar
      2011-09-08 Mikael Morin <mikael.morin@sfr.fr> · d2b14775
      mikael authored
      	* trans-array.c (gfc_trans_constant_array_constructor): Remove
      	superfluous initialisation of DIM field.
      	(gfc_trans_array_constructor): Assert that DIMEN field is properly set.
      	(gfc_conv_expr_descriptor): Ditto.
      	* trans-expr.c (gfc_conv_procedure_call): Ditto.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178698 138bc75d-0d04-0410-961f-82ee72b054a4
      d2b14775
    • mikael's avatar
      2011-09-08 Mikael Morin <mikael.morin@sfr.fr> · e052a7fa
      mikael authored
      	* trans-array.h (gfc_get_scalar_ss): New prototype.
      	* trans-array.c (gfc_get_scalar_ss): New function.
      	(gfc_walk_variable_expr, gfc_walk_op_expr,
      	gfc_walk_elemental_function_args): Re-use gfc_get_scalar_ss.
      	* trans-expr.c (gfc_trans_subarray_assign): Ditto.
      	(gfc_trans_assignment_1): Ditto.
      	* trans-stmt.c (compute_inner_temp_size, gfc_trans_where_assign,
      	gfc_trans_where_3): Ditto.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178697 138bc75d-0d04-0410-961f-82ee72b054a4
      e052a7fa
    • mikael's avatar
      2011-09-08 Mikael Morin <mikael.morin@sfr.fr> · 20c53083
      mikael authored
      	* trans-array.h (gfc_get_temp_ss): New prototype.
      	* trans-array.c (gfc_get_temp_ss): New function.
      	(gfc_conv_resolve_dependencies): Re-use gfc_get_temp_ss.
      	(gfc_conv_expr_descriptor): Ditto.
      	* trans-expr.c (gfc_conv_subref_array_arg): Ditto.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178696 138bc75d-0d04-0410-961f-82ee72b054a4
      20c53083
    • mikael's avatar
      2011-09-08 Mikael Morin <mikael.morin@sfr.fr> · f912e858
      mikael authored
      	* trans-array.h (gfc_get_array_ss): New prototype.
      	* trans-array.c (gfc_get_array_ss): New function.
      	(gfc_walk_variable_expr, gfc_walk_function_expr,
      	gfc_walk_array_constructor): Re-use gfc_get_array_ss.
      	* trans-expr.c (gfc_trans_subarray_assign): Ditto.
      	* trans-intrinsic.c (gfc_walk_intrinsic_bound,
      	gfc_walk_intrinsic_libfunc): Ditto.
      	* trans-io.c (transfer_array_component): Ditto.
      
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178695 138bc75d-0d04-0410-961f-82ee72b054a4
      f912e858
  3. 25 Aug, 2011 3 commits
    • mikael's avatar
      2011-08-25 Mikael Morin <mikael.morin@gcc.gnu.org> · 642aa6bf
      mikael authored
      	PR fortran/50050
      	* expr.c (gfc_free_shape): Do nothing if shape is NULL.
      	(free_expr0): Remove redundant NULL shape check.
      	* resolve.c (check_host_association): Ditto.
      	* trans-expr.c (gfc_trans_subarray_assign): Assert that shape is
      	non-NULL.
      	* trans-io.c (transfer_array_component): Ditto.
      
      2011-08-25  Mikael Morin  <mikael.morin@gcc.gnu.org>
      
      	PR fortran/50050
      	* gfortran.dg/pointer_comp_init_1.f90: New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178086 138bc75d-0d04-0410-961f-82ee72b054a4
      642aa6bf
    • burnus's avatar
      2011-08-25 Tobias Burnus <burnus@net-b.de> · 7dce33fe
      burnus authored
              * trans-array.c (gfc_conv_descriptor_token): Add assert.
              * trans-decl.c (gfc_build_qualified_array,
              create_function_arglist): Handle assumed-shape arrays.
              * trans-expr.c (gfc_conv_procedure_call): Ditto.
              * trans-types.c (gfc_get_array_descriptor_base): Ditto, don't
              add "caf_token" to assumed-shape descriptors, new akind argument.
              (gfc_get_array_type_bounds): Pass akind.
              * trans.h (lang_decl): New elements caf_offset and token.
              (GFC_DECL_TOKEN, GFC_DECL_CAF_OFFSET): New macros.
      
      2011-08-25  Tobias Burnus  <burnus@net-b.de>
      
              * gfortran.dg/coarray_lib_token_4.f90: New.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178069 138bc75d-0d04-0410-961f-82ee72b054a4
      7dce33fe
    • burnus's avatar
      2011-08-25 Tobias Burnus <burnus@net-b.de> · 72fe124e
      burnus authored
              * trans-array.c (structure_alloc_comps): Fix for allocatable
              scalar coarray components.
              * trans-expr.c (gfc_conv_component_ref): Ditto.
              * trans-type.c (gfc_get_derived_type): Ditto.
      
      2011-08-25  Tobias Burnus  <burnus@net-b.de>
      
              * gfortran.dg/coarray/alloc_comp_1.f90: New.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178068 138bc75d-0d04-0410-961f-82ee72b054a4
      72fe124e
  4. 22 Aug, 2011 1 commit
    • mikael's avatar
      2011-08-22 Mikael Morin <mikael.morin@gcc.gnu.org> · a9031a3e
      mikael authored
      	PR fortran/50050
      	* gfortran.h (gfc_clear_shape, gfc_free_shape): New prototypes.
      	* expr.c (gfc_clear_shape, gfc_free_shape): New functions.
      	(free_expr0): Re-use gfc_free_shape.
      	* trans-expr.c (gfc_trans_subarray_assign): Ditto.
      	* trans-io.c (transfer_array_component): Ditto.
      	* resolve.c (check_host_association): Ditto.
      	(gfc_expr_to_initialize): Don't force the rank value and free the shape
      	after updating the expression. Recalculate shape and rank.
      	(resolve_where_shape): Re-use gfc_clear_shape.
      	* array.c (gfc_array_ref_shape): Ditto.
      
      2011-08-22  Mikael Morin  <mikael.morin@gcc.gnu.org>
      
      	PR fortran/50050
      	* gfortran.dg/alloc_comp_initializer_3.f90: New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177956 138bc75d-0d04-0410-961f-82ee72b054a4
      a9031a3e
  5. 19 Aug, 2011 1 commit
    • jakub's avatar
      PR fortran/49792 · b538a1ef
      jakub authored
      	* trans-expr.c (gfc_trans_assignment_1): Set OMPWS_SCALARIZER_WS
      	bit in ompws_flags only if loop.temp_ss is NULL, and clear it if
      	lhs needs reallocation.
      	* trans-openmp.c (gfc_trans_omp_workshare): Don't return early if
      	code is NULL, emit a barrier if workshare emitted no code at all
      	and NOWAIT clause isn't present.
      
      	* testsuite/libgomp.fortran/pr49792-1.f90: New test.
      	* testsuite/libgomp.fortran/pr49792-2.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177898 138bc75d-0d04-0410-961f-82ee72b054a4
      b538a1ef
  6. 26 Jul, 2011 1 commit
    • burnus's avatar
      2011-07-26 Tobias Burnus <burnus@net-b.de> · 8f252d56
      burnus authored
              * trans-array.c (CAF_TOKEN_FIELD): New macro constant.
              (gfc_conv_descriptor_token): New function.
              * trans-array.h (gfc_conv_descriptor_token): New prototype.
              * trans-types.c (gfc_get_array_descriptor_base): For coarrays
              with -fcoarray=lib, append "void *token" to the array descriptor.
              (gfc_array_descriptor_base_caf): New static variable.
              * trans-expr.c (gfc_conv_procedure_call): Handle token and
              * offset
              when passing a descriptor coarray to a nondescriptor dummy.
      
      2011-07-26  Tobias Burnus  <burnus@net-b.de>
      
              * gfortran.dg/coarray_lib_token_2.f90: New.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176784 138bc75d-0d04-0410-961f-82ee72b054a4
      8f252d56
  7. 21 Jul, 2011 1 commit
    • burnus's avatar
      2011-07-21 Tobias Burnus <burnus@net-b.de> · 85c94a64
      burnus authored
              * check.c (gfc_check_present): Allow coarrays.
              * trans-array.c (gfc_conv_array_ref): Avoid casting
              when a pointer is wanted.
              * trans-decl.c (create_function_arglist): For -fcoarray=lib,
              handle hidden token and offset arguments for nondescriptor
              coarrays.
              * trans-expr.c (get_tree_for_caf_expr): New function.
              (gfc_conv_procedure_call): For -fcoarray=lib pass the
              token and offset for nondescriptor coarray dummies.
              * trans.h (lang_type): Add caf_offset tree.
              (GFC_TYPE_ARRAY_CAF_OFFSET): New macro.
      
      2011-07-21  Tobias Burnus  <burnus@net-b.de>
      
              * gfortran.dg/coarray_lib_token_1.f90: New.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176562 138bc75d-0d04-0410-961f-82ee72b054a4
      85c94a64
  8. 19 Jul, 2011 1 commit
    • rguenth's avatar
      2011-07-19 Richard Guenther <rguenther@suse.de> · 2cc66f2a
      rguenth authored
      	* tree.h (fold_build_pointer_plus_loc): New helper function.
      	(fold_build_pointer_plus_hwi_loc): Likewise.
      	(fold_build_pointer_plus): Define.
      	(fold_build_pointer_plus_hwi): Likewise.
      
      	* builtins.c (std_gimplify_va_arg_expr): Use fold_build_pointer_plus.
      	(fold_builtin_memory_op): Likewise.
      	(fold_builtin_stpcpy): Likewise.
      	(fold_builtin_memchr): Likewise.
      	(fold_builtin_strstr): Likewise.
      	(fold_builtin_strchr): Likewise.
      	(fold_builtin_strrchr): Likewise.
      	(fold_builtin_strpbrk): Likewise.
      	(fold_builtin_strcat): Likewise.
      	(expand_builtin_memory_chk): Likewise.
      	(fold_builtin_memory_chk): Likewise.
      	* c-typeck.c (build_unary_op): Likewise.
      	* cgraphunit.c (thunk_adjust): Likewise.
      	* fold-const.c (build_range_check): Likewise.
      	(fold_binary_loc): Likewise.
      	* omp-low.c (extract_omp_for_data): Likewise.
      	(expand_omp_for_generic): Likewise.
      	(expand_omp_for_static_nochunk): Likewise.
      	(expand_omp_for_static_chunk): Likewise.
      	* tree-affine.c (add_elt_...
      2cc66f2a
  9. 16 Jul, 2011 1 commit
    • burnus's avatar
      2011-07-16 Tobias Burnus <burnus@net-b.de> · 0d3bb1de
      burnus authored
              * expr.c (gfc_ref_this_image): New function.
              (gfc_is_coindexed): Use it.
              * gfortran.h (gfc_ref_this_image): New prototype.
              * resolve.c (resolve_deallocate_expr,
              resolve_allocate_expr): Support alloc scalar coarrays.
              * trans-array.c (gfc_conv_array_ref, gfc_array_init_size,
              gfc_conv_descriptor_cosize, gfc_array_allocate,
              gfc_trans_deferred_array): Ditto.
              * trans-expr.c (gfc_conv_variable) Ditto.:
              * trans-stmt.c (gfc_trans_deallocate): Ditto.
              * trans-types.c (gfc_get_element_type, gfc_get_array_type_bounds
              gfc_get_array_descr_info): Ditto.
              * trans-decl.c (gfc_get_symbol_decl): Ditto.
      
      2011-07-16  Tobias Burnus  <burnus@net-b.de>
      
              * gfortran.dg/coarray_14.f90: Remove dg-error "sorry not
              * implemented".
              * gfortran.dg/coarray_7.f90: Ditto.
              * gfortran.dg/coarray/scalar_alloc_1.f90: New.
              * gfortran.dg/coarray/scalar_alloc_2.f90: New.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176358 138bc75d-0d04-0410-961f-82ee72b054a4
      0d3bb1de
  10. 11 Jun, 2011 1 commit
    • burnus's avatar
      2011-06-12 Tobias Burnus · 121c8504
      burnus authored
              PR fortran/49324
              * trans-expr.c (gfc_trans_assignment_1): Tell
              gfc_trans_scalar_assign to also deep-copy RHS nonvariables
              with allocatable components.
              * trans-array.c (gfc_conv_expr_descriptor): Ditto.
      
      2011-06-12  Tobias Burnus
      
              PR fortran/49324
              * gfortran.dg/alloc_comp_assign_11.f90: New.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174959 138bc75d-0d04-0410-961f-82ee72b054a4
      121c8504
  11. 05 Jun, 2011 1 commit
  12. 26 May, 2011 1 commit
    • pault's avatar
      2011-05-26 Paul Thomas <pault@gcc.gnu.org> · 66c674b6
      pault authored
      	    Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/48955
      	* trans-expr.c (gfc_trans_assignment_1): GFC_REVERSE_NOT_SET
      	changed to GFC_ENABLE_REVERSE.
      	* trans-array.c (gfc_init_loopinfo): GFC_CANNOT_REVERSE changed
      	to GFC_INHIBIT_REVERSE.
      	* gfortran.h : Enum gfc_reverse is now GFC_ENABLE_REVERSE,
      	GFC_FORWARD_SET, GFC_REVERSE_SET and GFC_INHIBIT_REVERSE.
      	* dependency.c (gfc_dep_resolver): Change names for elements of
      	gfc_reverse as necessary. Change the logic so that forward
      	dependences are remembered as well as backward ones. When both
      	have appeared, force a temporary.
      
      2011-05-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/48955
      	* gfortran.dg/dependency_40.f90 : New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174302 138bc75d-0d04-0410-961f-82ee72b054a4
      66c674b6
  13. 30 Apr, 2011 1 commit
    • pault's avatar
      2011-04-30 Paul Thomas <pault@gcc.gnu.org> · e656e9d8
      pault authored
      	PR fortran/48746
      	* trans-expr.c (fcncall_realloc_result): Set the bounds and the
      	offset so that the lbounds are one.
      	(gfc_trans_arrayfunc_assign): Add rank to arguments of above.
      
      2011-04-30  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/48746
      	* gfortran.dg/realloc_on_assign_7.f03: Test bounds.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173213 138bc75d-0d04-0410-961f-82ee72b054a4
      e656e9d8
  14. 29 Apr, 2011 1 commit
    • pault's avatar
      2011-04-29 Paul Thomas <pault@gcc.gnu.org> · 556c5c0c
      pault authored
      	PR fortran/48462
      	* trans-expr.c (arrayfunc_assign_needs_temporary): Deal with
      	automatic reallocation when the lhs is a target.
      
      	PR fortran/48746
      	* trans-expr.c (fcncall_realloc_result): Make sure that the
      	result dtype field is set before the function call.
      
      2011-04-29  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/48462
      	* gfortran.dg/realloc_on_assign_7.f03: Modify to test for lhs
      	being a target.
      
      	PR fortran/48746
      	* gfortran.dg/realloc_on_assign_7.f03: Add subroutine pr48746.
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173185 138bc75d-0d04-0410-961f-82ee72b054a4
      556c5c0c
  15. 19 Apr, 2011 1 commit
  16. 18 Apr, 2011 2 commits
    • meyering's avatar
      convert each use of gfc_free (p) to free (p) · 434f0922
      meyering authored
      Do that by running this command:
        perl -pi -e    's/\bgfc_free ?\(/free (/' \
          $(git grep -El '\bgfc_free ?\(')
      which also corrects the few uses that lacked a space between
      the function name and the open parenthesis.
      Manually undo the change to the function definition itself
      and its prototype.  They'll be removed next.
      * array.c (gfc_free_array_spec, gfc_set_array_spec): s/gfc_free/free/
      * constructor.c (node_free): Likewise.
      * cpp.c (dump_queued_macros): Likewise.
      * data.c (gfc_assign_data_value): Likewise.
      * decl.c (free_variable, free_value, gfc_free_data): Likewise.
      (gfc_free_data_all, match_old_style_init): Likewise.
      (gfc_set_constant_character_len, gfc_free_enum_history, NUM_DECL):
      Likewise.
      (gfc_match_modproc): Likewise.
      * dependency.c (check_section_vs_section): Likewise.
      * error.c (gfc_pop_error, gfc_free_error): Likewise.
      * expr.c (free_expr0, gfc_free_expr, gfc_free_actual_arglist): Likewise.
      (gfc_free_ref_list, gfc_replace_expr, gfc_copy_ref): Likewise.
      (find_substring_ref, gfc_simplify_expr, gfc_check_assign_symbol):
      Likewise.
      * frontend-passes.c (gfc_run_passes, cfe_expr_0): Likewise.
      (strip_function_call, optimize_comparison): Likewise.
      * interface.c (gfc_free_interface, arginfo, check_interface0): Likewise.
      (CHECK_OS_COMPARISON, gfc_extend_assign, gfc_free_formal_arglist):
      Likewise.
      * intrinsic.c (gfc_intrinsic_done_1, gfc_convert_type_warn): Likewise.
      (gfc_convert_chartype): Likewise.
      * io.c (gfc_free_open, compare_to_allowed_values, gfc_free_close):
      Likewise.
      (gfc_free_filepos, gfc_free_dt, gfc_free_inquire): Likewise.
      * match.c (gfc_free_iterator, gfc_match_associate): Likewise.
      (gfc_free_alloc_list, gfc_free_namelist, gfc_free_equiv_until):
      Likewise.
      (free_case, gfc_free_forall_iterator): Likewise.
      * misc.c: Likewise.
      * module.c (free_pi_tree, resolve_fixups, free_rename): Likewise.
      (free_true_name, peek_atom, mio_allocated_wide_string): Likewise.
      (mio_pool_string, mio_internal_string, mio_gmp_integer): Likewise.
      (mio_gmp_real, mio_expr, mio_typebound_proc): Likewise.
      (mio_full_typebound_tree, skip_list, load_equiv): Likewise.
      (free_written_common, gfc_use_module, gfc_free_use_stmts): Likewise.
      * openmp.c (gfc_free_omp_clauses): Likewise.
      * options.c (gfc_post_options): Likewise.
      * parse.c (select_type_pop, parse_omp_structured_block): Likewise.
      * primary.c (gfc_free_structure_ctor_component): Likewise.
      * resolve.c (resolve_structure_cons, check_host_association): Likewise.
      (gfc_resolve_forall, resolve_equivalence): Likewise.
      * scanner.c (gfc_scanner_done_1, gfc_release_include_path): Likewise.
      (gfc_define_undef_line, preprocessor_line, include_line): Likewise.
      (load_file, gfc_read_orig_filename): Likewise.
      * simplify.c (simplify_transformation_to_array): Likewise.
      (gfc_simplify_ibits, simplify_shift, gfc_simplify_ishftc, STRING):
      Likewise.
      (gfc_simplify_compiler_options): Likewise.
      * st.c (gfc_free_statement, gfc_free_statements): Likewise.
      (gfc_free_association_list): Likewise.
      * symbol.c (free_components, gfc_free_st_label, free_st_labels):
      Likewise.
      (gfc_delete_symtree, gfc_free_symbol, gfc_undo_symbols): Likewise.
      (free_old_symbol, gfc_commit_symbols, free_tb_tree): Likewise.
      (free_common_tree, free_uop_tree, free_sym_tree): Likewise.
      (gfc_free_dt_list, gfc_free_equiv_infos, gfc_free_equiv_lists):
      Likewise.
      (gfc_free_finalizer, gfc_free_charlen, free_entry_list): Likewise.
      (gfc_free_namespace): Likewise.
      * trans-array.c (gfc_free_ss, gfc_trans_array_bound_check): Likewise.
      (gfc_conv_array_ref, gfc_conv_ss_startstride): Likewise.
      (gfc_trans_dummy_array_bias, gfc_conv_array_parameter): Likewise.
      * trans-common.c (get_init_field, create_common): Likewise.
      * trans-const.c (gfc_build_wide_string_const): Likewise.
      (gfc_conv_string_init): Likewise.
      * trans-decl.c (gfc_generate_function_code): Likewise.
      * trans-expr.c (gfc_conv_substring, gfc_free_interface_mapping):
      Likewise.
      (SCALAR_POINTER, gfc_conv_statement_function): Likewise.
      (gfc_trans_subarray_assign): Likewise.
      * trans-intrinsic.c (conv_generic_with_optional_char_arg): Likewise.
      * trans-io.c (gfc_trans_io_runtime_check, set_string): Likewise.
      (transfer_namelist_element, transfer_array_component): Likewise.
      * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
      * trans-stmt.c (cleanup_forall_symtrees, gfc_trans_forall_1): Likewise.
      * trans.c (trans_runtime_error_vararg, gfc_restore_backend_locus):
      Likewise.
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172666 138bc75d-0d04-0410-961f-82ee72b054a4
      434f0922
    • pault's avatar
      2011-04-18 Paul Thomas <pault@gcc.gnu.org> · 2254719c
      pault authored
      	PR fortran/48462
      	* trans-expr.c (fcncall_realloc_result): Renamed version of
      	realloc_lhs_bounds_for_intrinsic_call that does not touch the
      	descriptor bounds anymore but makes a temporary descriptor to
      	hold the result.
      	(gfc_trans_arrayfunc_assign): Modify the reference to above
      	renamed function.
      
      2011-04-18  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/48462
      	* gfortran.dg/realloc_on_assign_7.f03: New test.
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172636 138bc75d-0d04-0410-961f-82ee72b054a4
      2254719c
  17. 10 Apr, 2011 1 commit
  18. 30 Mar, 2011 1 commit
  19. 12 Mar, 2011 1 commit
  20. 18 Feb, 2011 2 commits
    • burnus's avatar
      2011-02-18 Tobias Burnus · cf028aa9
      burnus authored
              PR fortran/47775
              * trans-expr.c (arrayfunc_assign_needs_temporary): Use
              esym to check whether the specific procedure returns an
              allocatable or pointer.
      
      2011-02-18  Tobias Burnus
      
              PR fortran/47775
              * gfortran.dg/func_result_6.f90: New.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170289 138bc75d-0d04-0410-961f-82ee72b054a4
      cf028aa9
    • matz's avatar
      PR fortran/45586 · 479b0428
      matz authored
      	* gfortran.h (struct gfc_component): Add norestrict_decl member.
      	* trans.h (struct lang_type): Add nonrestricted_type member.
      	* trans-expr.c (gfc_conv_component_ref): Search fields with correct
      	parent type.
      	* trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
      	(gfc_sym_type): Use it.
      
      testsuite/
      	PR fortran/45586
      	* gfortran.dg/lto/pr45586_0.f90: New test.
      	* gfortran.dg/typebound_proc_20.f90: Ditto.
      	* gfortran.dg/typebound_proc_21.f90: Ditto.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170284 138bc75d-0d04-0410-961f-82ee72b054a4
      479b0428
  21. 12 Feb, 2011 1 commit
  22. 02 Feb, 2011 1 commit
    • pault's avatar
      2011-02-02 Janus Weil <janus@gcc.gnu.org> · d89b98b5
      pault authored
      	    Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/47082
      	* trans-expr.c (gfc_trans_class_init_assign): Add call to
      	gfc_get_derived_type.
      	* module.c (read_cleanup): Do not use unique_symtrees for vtabs
      	or vtypes.
      
      2011-02-02  Janus Weil  <janus@gcc.gnu.org>
      	    Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/47082
      	* gfortran.dg/class_37.f03 : New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169767 138bc75d-0d04-0410-961f-82ee72b054a4
      d89b98b5
  23. 01 Feb, 2011 1 commit
  24. 31 Jan, 2011 1 commit
  25. 30 Jan, 2011 1 commit
    • pault's avatar
      2011-01-30 Paul Thomas <pault@gcc.gnu.org> · 2de379fb
      pault authored
      	PR fortran/47523
      	* trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
      	expr and is assigned to a deferred character length scalar,
      	make sure that the function is called before reallocation,
      	so that the length is available. Include procedure pointer
      	and procedure pointer component rhs as well.
      
      2011-01-30  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/47523
      	* trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
      	expr and is assigned to a deferred character length scalar,
      	make sure that the function is called before reallocation,
      	so that the length is available. Include procedure pointer
      	and procedure pointer component rhs as well.
      
      	PR fortran/45170
      	PR fortran/35810
      	PR fortran/47350
      	* gfortran.dg/allocatable_function_5.f90: New test not added by
      	mistake on 2011-01-28.
      
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169413 138bc75d-0d04-0410-961f-82ee72b054a4
      2de379fb
  26. 28 Jan, 2011 1 commit
    • pault's avatar
      2011-01-28 Paul Thomas <pault@gcc.gnu.org> · 617125a6
      pault authored
      	    Tobias Burnus  <burnus@gcc.gnu.org>
      
      	PR fortran/45170
      	PR fortran/35810
      	PR fortran/47350
      	* interface.c (compare_actual_formal): An allocatable or pointer
      	deferred length actual is only allowed if the formal argument
      	is also deferred length. Clean up whitespace.
      	* trans-expr.c (gfc_conv_procedure_call): Pass string length for
      	deferred character length formal arguments by reference. Do the
      	same for function results.
      	(gfc_trans_pointer_assignment): Do not do runtime check of lhs
      	and rhs character lengths, if deferred length lhs.  In this case
      	set the lhs character length to that of the rhs.
      	(gfc_conv_string_parameter): Remove assert that string length is
      	an integer type.
      	(is_scalar_reallocatable_lhs): New function.
      	(alloc_scalar_allocatable_for_assignment): New function.
      	(gfc_trans_assignment_1): Call above new function. If the rhs is
      	a deferred character length itself, makes ure that the function
      	is called before reallocation, so that the length is available.
      	(gfc_trans_asssignment): Remove error about assignment to
      	deferred length character variables.
      	* gfortran.texi : Update entry about (re)allocation on
      	assignment.
      	* trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
      	length character variables.
      	* module.c (mio_typespec): Transfer deferred characteristic.
      	* trans-types.c (gfc_get_function_type): New code to generate
      	hidden typelist, so that those character lengths that are
      	passed by reference get the right type.
      	* resolve.c (resolve_contained_fntype): Supress error for
      	deferred character length functions.
      	(resolve_function, resolve_fl_procedure) The same.
      	(check_symbols): Remove the error that support for
      	entity with deferred type parameter is not yet implemented.
      	(resolve_fl_derived): The same.
      	match.c (alloc_opt_list): Allow MOLD for deferred length object.
      	* trans-decl.c (gfc_get_symbol_decl): For deferred character
      	length dummies, generate a local variable for string length.
      	(create_function_arglist): Hidden length can be a pointer.
      	(gfc_trans_deferred_vars): For deferred character length
      	results and dummies, assign the string length to the local
      	variable from the hidden argument on entry and the other way
      	round on exit, as appropriate.
      
      2011-01-28  Paul Thomas  <pault@gcc.gnu.org>
      	    Tobias Burnus  <burnus@gcc.gnu.org>
      
      	PR fortran/45170
      	PR fortran/35810
      	PR fortran/47350
      	* gfortran.dg/realloc_on_assign_3.f03: New test.
      	* gfortran.dg/realloc_on_assign_4.f03: New test.
      	* gfortran.dg/realloc_on_assign_5.f90: New test.
      	* gfortran.dg/allocatable_function_5.f90: New test.
      	* gfortran.dg/allocate_deferred_char_scalar_1.f90: New test.
      	* gfortran.dg/deferred_type_param_2.f90: Remove two "not yet
      	implemented" dg-errors.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169356 138bc75d-0d04-0410-961f-82ee72b054a4
      617125a6
  27. 18 Jan, 2011 1 commit
    • janus's avatar
      2011-01-18 Janus Weil <janus@gcc.gnu.org> · 45ade45a
      janus authored
      	PR fortran/47240
      	* resolve.c (expression_rank): Fix rank of procedure poiner components.
      	* trans-expr.c (gfc_conv_procedure_call): Take care of procedure
      	pointer components as actual arguments.
      
      
      2011-01-18  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/47240
      	* gfortran.dg/proc_ptr_comp_29.f90: New.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168973 138bc75d-0d04-0410-961f-82ee72b054a4
      45ade45a
  28. 08 Jan, 2011 1 commit
    • pault's avatar
      2011-01-08 Paul Thomas <pault@gcc.gnu.org> · 8b0a2e85
      pault authored
      	PR fortran/46896
      	* trans-expr.c (gfc_conv_procedure_call): With a non-copying
      	procedure argument (eg TRANSPOSE) use a temporary if there is
      	any chance of aliasing due to host or use association.
      	(arrayfunc_assign_needs_temporary): Correct logic for function
      	results and do not use a temporary for implicitly PURE
      	variables.  Use a temporary for Cray pointees.
      	* symbol.c (gfc_add_save): Explicit SAVE not compatible with
      	implicit pureness of containing procedure.
      	* decl.c (match_old_style_init, gfc_match_data): Where decl
      	would fail in PURE procedure, set implicit_pure to zero.
      	* gfortran.h : Add implicit_pure to structure symbol_attr and
      	add prototype for function gfc_implicit_pure.
      	* expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
      	Where decl would fail in PURE procedure, reset implicit_pure.
      	* io.c (match_vtag, gfc_match_open, gfc_match_close,
      	gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
      	* match.c (gfc_match_critical, gfc_match_stopcode,
      	sync_statement, gfc_match_allocate, gfc_match_deallocate): The
      	same.
      	* parse.c (decode_omp_directive): The same.
      	(parse_contained): If not PURE, set implicit pure attribute.
      	* resolve.c (resolve_formal_arglist, resolve_structure_cons,
      	resolve_function, resolve_ordinary_assign) : The same.
      	(gfc_implicit_pure): New function.
      	* module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
      	to ab_attribute enum and use it in this function.
      
      2011-01-08  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/46896
      	* gfortran.dg/transpose_optimization_2.f90 : New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168600 138bc75d-0d04-0410-961f-82ee72b054a4
      8b0a2e85
  29. 05 Jan, 2011 2 commits
  30. 18 Dec, 2010 1 commit
    • burnus's avatar
      2010-12-18 Tobias Burnus <burnus@net-b.de> · 8839e372
      burnus authored
              PR fortran/46974
              * target-memory.c (gfc_interpret_derived): Handle
              * C_PTR/C_FUNPTR.
              * trans-expr.c (gfc_trans_structure_assign): Ditto.
              (gfc_conv_expr): Avoid crashes using non-C_NULL_(FUN)PTR const expr.
      
      2010-12-18  Tobias Burnus  <burnus@net-b.de>
      
              PR fortran/46974
              * gfortran.dg/c_ptr_tests_16.f90: New.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168031 138bc75d-0d04-0410-961f-82ee72b054a4
      8839e372
  31. 13 Dec, 2010 2 commits