1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 05 Jun, 2011 1 commit
  8. 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
  9. 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
  10. 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
  11. 19 Apr, 2011 1 commit
  12. 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
  13. 10 Apr, 2011 1 commit
  14. 30 Mar, 2011 1 commit
  15. 12 Mar, 2011 1 commit
  16. 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
  17. 12 Feb, 2011 1 commit
  18. 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
  19. 01 Feb, 2011 1 commit
  20. 31 Jan, 2011 1 commit
  21. 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
  22. 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
  23. 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
  24. 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
  25. 05 Jan, 2011 2 commits
  26. 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
  27. 13 Dec, 2010 2 commits
  28. 07 Dec, 2010 1 commit
    • burnus's avatar
      2010-12-07 Tobias Burnus <burnus@net-b.de> · b8a1b636
      burnus authored
              PR fortran/44352
              * trans-expr.c (gfc_string_to_single_character): Return if not
              POINTER_TYPE_P.
              (gfc_trans_string_copy): gfc_build_addr_expr if src or dest is
              not a pointer.
              (gfc_trans_string_copy): Make sure the argument string type
              has a string length, fix indention, and remove not needed
              gfc_build_addr_expr.
      
      2010-12-07  Tobias Burnus  <burnus@net-b.de>
      
              PR fortran/44352
              * gfortran.dg/string_4.f90: New.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167569 138bc75d-0d04-0410-961f-82ee72b054a4
      b8a1b636
  29. 04 Dec, 2010 1 commit
  30. 28 Nov, 2010 1 commit
    • pault's avatar
      2010-11-28 Paul Thomas <pault@gcc.gnu.org> · 929c6f45
      pault authored
      	 PR fortran/35810
      	* trans-array.c (gfc_trans_array_constructor): If the loop->to
      	is a VAR_DECL, assume this is dynamic. In this case, use the
      	counter to obtain the value and set loop->to appropriately.
      	(gfc_conv_ss_descriptor): Always save the offset of a variable
      	in info.saved_offset.
      	(gfc_conv_ss_startstride): Do not attempt bound checking of the
      	lhs of an assignment, if allocatable and f2003 is allowed.
      	(gfc_conv_loop_setup): If possible, do not use an allocatable
      	lhs variable for the loopspec.
      	(gfc_is_reallocatable_lhs): New function.
      	(get_std_lbound): New function.
      	(gfc_alloc_allocatable_for_assignment): New function.
      	* gfortran.h : Add flag_realloc_lhs to the options structure.
      	* lang.opt : Add option f(no-)realloc-lhs.
      	* invoke.texi : Document option f(no-)realloc-lhs.
      	* options.c (gfc_init_options, gfc_post_options,
      	gfc_handle_option): Incorporate f(no-)realloc-lhs with default
      	to frealloc_lhs for -std > f95.
      	* trans-array.h : Add primitive for previous.
      	* trans-expr.c (gfc_conv_string_length): Return if character
      	length is a variable and the expression is NULL.
      	(gfc_conv_procedure_call): If the call is of the kind x = f(...)
      	and the lhs is allocatable and reallocation on assignment OK,
      	call gfc_alloc_allocatable_for_assignment. Do not generate the
      	function call unless direct by reference.
      	(realloc_lhs_loop_for_fcn_call): New function.
      	(realloc_lhs_bounds_for_intrinsic_call): New function.
      	(gfc_trans_arrayfunc_assign): Reallocation assignments need
      	a loopinfo and for the loop bounds to be set.  With intrinsic
      	functions, free the lhs data and let the library allocate the
      	data array. Done by the new functions above.
      	(gfc_trans_assignment_1): If the lhs is allocatable and
      	reallocation on assignment is allowed, mark the lhs and use
      	gfc_alloc_allocatable_for_assignment to make the reallocation.
      	* trans.h : Add is_alloc_lhs bitfield to gfc_ss structure.
      
      2010-11-28  Paul Thomas  <pault@gcc.gnu.org
      
      	PR fortran/35810
      	* gfortran.dg/realloc_on_assign_1.f03: New test.
      	* gfortran.dg/realloc_on_assign_2.f03: New test.
      	* gfortran.dg/transpose_2.f90: dg-option -fno-realloc-lhs.
      	* gfortran.dg/unpack_bounds_1.f90: The same.
      	* gfortran.dg/cshift_bounds_2.f90: The same.
      	* gfortran.dg/matmul_bounds_2.f90: The same.
      	* gfortran.dg/matmul_bounds_3.f90: The same.
      	* gfortran.dg/matmul_bounds_4.f90: The same.
      	* gfortran.dg/matmul_bounds_5.f90: The same.
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167220 138bc75d-0d04-0410-961f-82ee72b054a4
      929c6f45
  31. 27 Nov, 2010 1 commit
  32. 12 Nov, 2010 1 commit
  33. 09 Nov, 2010 1 commit
    • janus's avatar
      2010-11-09 Janus Weil <janus@gcc.gnu.org> · 607ae689
      janus authored
      	PR fortran/46313
      	* gfortran.h (gfc_add_data_component,gfc_add_vptr_component,
      	gfc_add_hash_component,gfc_add_size_component,
      	gfc_add_def_init_component): New macros.
      	* class.c (gfc_add_component_ref): Renamed data component.
      	(get_unique_type_string): New function.
      	(gfc_build_class_symbol): Use 'get_unique_type_string' to construct
      	uniques names for the class containers. Rename components.
      	(gfc_find_derived_vtab): Use 'get_unique_type_string' to construct
      	uniques names for the vtab symbols. Rename components.
      	* decl.c (attr_decl1): Renamed class container components.
      	* iresolve.c (gfc_resolve_extends_type_of): Ditto.
      	* match.c (select_type_set_tmp): Renamed temporaries.
      	* module.c (read_module): Renamed vtab and vtype symbols.
      	* resolve.c (resolve_structure_cons,resolve_typebound_function,
      	resolve_typebound_subroutine,resolve_deallocate_expr,
      	resolve_select_type,resolve_fl_derived): Renamed class container and
      	vtab components.
      	* trans-array.c (structure_alloc_comps): Ditto.
      	* trans-decl.c (gfc_trans_deferred_vars): Ditto.
      	* trans-expr.c (gfc_conv_derived_to_class,gfc_conv_structure,
      	gfc_trans_class_init_assign,gfc_trans_class_assign): Ditto.
      	* trans-intrinsic.c (gfc_conv_intrinsic_sizeof,
      	gfc_conv_intrinsic_storage_size,gfc_conv_allocated,gfc_conv_associated,
      	gfc_conv_same_type_as): Ditto.
      	* trans-stmt.c (gfc_trans_allocate): Ditto.
      
      2010-11-09  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/46313
      	* gfortran.dg/class_29.f03: New.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166480 138bc75d-0d04-0410-961f-82ee72b054a4
      607ae689
  34. 06 Nov, 2010 1 commit
  35. 03 Nov, 2010 1 commit
    • froydnj's avatar
      gcc/ · 385f3f36
      froydnj authored
      	* builtins.c (fold_builtin_signbit): Use build_zero_cst instead of
      	fold_convert.
      	* c-typeck.c (build_function_call_vec): Likewise.
      	* cfgexpand.c (expand_debug_expr): Likewise.
      	* cgraphunit.c (assemble_thunk): Likewise.
      	* config/sparc/sparc.c (sparc_fold_builtin): Likewise.
      	* fold-const.c (fold_unary_loc, fold_mult_zconjz): Likewise.
      	(fold_binary_loc, fold_ternary_loc): Likewise.
      	* gimple-fold.c (get_symbol_constant_value): Likewise.
      	* gimple-low.c (lower_builtin_setjmp): Likewise.
      	* gimple.c (gimple_cond_get_ops_from_tree): Likewise.
      	* gimplify.c (gimplify_init_constructor): Likewise.
      	* lambda.h (build_linear_expr): Likewise.
      	* omp-low.c (omp_reduction_init): Likewise.
      	* tree-inline.c (remap_ssa_name): Likewise.
      	* tree-object-size.c (compute_object_sizes): Likewise.
      	* tree-sra.c (init_subtree_with_zero): Likewise.
      	(sra_ipa_modify_assign): Likewise.
      	* tree-ssa-copy.c (propagate_tree_value_into_stmt): Likewise.
      	* tree-ssa-reassoc.c (eliminate_duplicate_pair): Likewise.
      	(eliminate_plus_minus_pair, eliminate_not_pairs): Likewise.
      	(undistribute_ops_list): Likewise.
      	* tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
      	* tree-vect-stmts.c (vectorizable_call): Likewise.
      	* tree.c (build_vector_from_ctor, build_one_cst): Likewise.
      	(build_zero_cst): Handle more cases directly.  Update comment.
      
      gcc/cp/
      	* class.c (build_base_path, add_vcall_offset): Use build_zero_cst
      	instead of fold_convert.
      	* init.c (build_zero_init): Likewise.
      	* typeck.c (cp_build_binary_op): Likewise.
      
      gcc/fortran/
      	* trans-decl.c (add_argument_checking): Use build_zero_cst instead of
      	fold_convert.
      	* trans-expr.c (gfc_conv_missing_dummy, fill_with_spaces): Likewise.
      	* trans-stmt.c (gfc_trans_do): Likewise.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166227 138bc75d-0d04-0410-961f-82ee72b054a4
      385f3f36
  36. 06 Oct, 2010 1 commit