1. 21 Jun, 2006 1 commit
  2. 15 Jun, 2006 1 commit
    • tkoenig's avatar
      2006-06-15 Thomas Koenig <Thomas.Koenig@online.de> · 97944d89
      tkoenig authored
      	* trans-array.h (gfc_trans_create_temp_array):  Add bool
      	argument.
      	* trans-arrray.c (gfc_trans_create_temp_array): Add extra
      	argument "function" to show if we are translating a function.
      	If we are translating a function, perform checks whether
      	the size along any argument is negative.  In that case,
      	allocate size 0.
      	(gfc_trans_allocate_storage):  Add function argument (as
      	false) to gfc_trans_create_temp_array call.
      	* trans-expr.c (gfc_conv_function_call):  Add function
      	argument (as true) to gfc_trans_create_temp_array call.
      	* trans-stmt.c (gfc_conv_elemental_dependencies): Add
      	function argument (as false) to gfc_trans_create_temp_array
      	call.
      	* trans-intrinsic.c:  Likewise.
      
      2006-06-15  Thomas Koenig <Thomas.Koenig@online.de>
      
      	* gfortran.dg/allocate_zerosize_2.f90:  New test case.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114677 138bc75d-0d04-0410-961f-82ee72b054a4
      97944d89
  3. 03 Jun, 2006 1 commit
    • fxcoudert's avatar
      * trans.c (gfc_msg_bounds, gfc_msg_fault, gfc_msg_wrong_return): · 97c2a00c
      fxcoudert authored
      	Add strings for common runtime error messages.
      	(gfc_trans_runtime_check): Add a locus argument, use a string
      	and not a string tree for the message.
      	* trans.h (gfc_trans_runtime_check): Change prototype accordingly.
      	(gfc_msg_bounds, gfc_msg_fault, gfc_msg_wrong_return): Add proto.
      	* trans-const.c (gfc_strconst_bounds, gfc_strconst_fault,
      	gfc_strconst_wrong_return, gfc_strconst_current_filename): Remove.
      	(gfc_init_constants): Likewise.
      	* trans-const.h: Likewise.
      	* trans-decl.c (gfc_build_builtin_function_decls): Call to
      	_gfortran_runtime_error has only one argument, the message string.
      	* trans-array.h (gfc_conv_array_ref): Add a symbol argument and a
      	locus.
      	* trans-array.c (gfc_trans_array_bound_check): Build precise
      	error messages.
      	(gfc_conv_array_ref): Use the new symbol argument and the locus
      	to build more precise error messages.
      	(gfc_conv_ss_startstride): More precise error messages.
      	* trans-expr.c (gfc_conv_variable): Give symbol reference and
      	locus to gfc_conv_array_ref.
      	(gfc_conv_function_call): Use the new prototype for
      	gfc_trans_runtime_check.
      	* trans-stmt.c (gfc_trans_goto): Build more precise error message.
      	* trans-io.c (set_string): Likewise.
      	* trans-intrinsic.c (gfc_conv_intrinsic_bound): Use new prototype
      	for gfc_trans_runtime_check.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114346 138bc75d-0d04-0410-961f-82ee72b054a4
      97c2a00c
  4. 28 May, 2006 1 commit
  5. 21 May, 2006 1 commit
    • pault's avatar
      2006-05-21 Paul Thomas <pault@gcc.gnu.org> · 9960dc89
      pault authored
      	PR fortran/25746
      	* interface.c (gfc_extend_assign): Use new code EXEC_ASSIGN_CALL.
      	* gfortran.h : Put EXEC_ASSIGN_CALL in enum.
      	* trans-stmt.c (gfc_conv_elemental_dependencies): New function.
      	(gfc_trans_call): Call it.  Add new boolian argument to flag
      	need for dependency checking. Assert intent OUT and IN for arg1
      	and arg2.
      	(gfc_trans_forall_1): Use new code EXEC_ASSIGN_CALL.
      	trans-stmt.h : Modify prototype of gfc_trans_call.
      	trans.c (gfc_trans_code): Add call for EXEC_ASSIGN_CALL.
      	st.c (gfc_free_statement): Free actual for EXEC_ASSIGN_CALL.
      	* dependency.c (gfc_check_fncall_dependency): Don't check other
      	against itself.
      
      	PR fortran/25090
      	* resolve.c : Remove resolving_index_expr.
      	(entry_parameter): Remove.
      	(gfc_resolve_expr, resolve_charlen, resolve_fl_variable): Remove
      	calls to entry_parameter and references to resolving_index_expr.
      
      	PR fortran/27584
      	* check.c (gfc_check_associated): Replace NULL assert with an
      	error message, since it is possible to generate bad code that
      	has us fall through to here..
      
      	PR fortran/19015
      	* iresolve.c (maxloc, minloc): If DIM is not present, pass the
      	rank of ARRAY as the shape of the result.  Otherwise, pass the
      	shape of ARRAY, less the dimension DIM.
      	(maxval, minval): The same, when DIM is present, otherwise no
      	change.
      
      2006-05-21  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/25746
      	* gfortran.dg/elemental_subroutine_3.f90: New test.
      
      	PR fortran/25090
      	* gfortran.dg/entry_dummy_ref_1.f90: Remove.
      
      	PR fortran/27584
      	* gfortran.dg/associated_target_1.f90: New test.
      
      	PR fortran/19015
      	* gfortran.dg/maxloc_shape_1.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113949 138bc75d-0d04-0410-961f-82ee72b054a4
      9960dc89
  6. 08 Apr, 2006 1 commit
  7. 06 Mar, 2006 1 commit
    • pault's avatar
      2006-03-06 Paul Thomas <pault@gcc.gnu.org> · c750cc52
      pault authored
      	PR fortran/26107
      	* resolve.c (resolve_function): Add name after test for pureness.
      
      	PR fortran/19546
      	* trans-expr.c (gfc_conv_variable): Detect reference to parent result,
      	store current_function_decl, replace with parent, whilst calls are
      	made to gfc_get_fake_result_decl, and restore afterwards. Signal this
      	to gfc_get_fake_result_decl with a new argument, parent_flag.
      	* trans-stmt.c (gfc_trans_return): gfc_get_fake_result_decl 2nd arg
      	is set to zero.
      	* trans.h: Add parent_flag to gfc_get_fake_result_decl prototype.
      	* trans-decl.c (gfc_get_fake_result_decl): On parent_flag, being set,
      	add decl to parent function. Replace refs to current_fake_result_decl
      	with refs to this_result_decl.
      	(gfc_generate_function_code): Null parent_fake_result_decl before the
      	translation of code for contained procedures. Set parent_flag to zero
      	in call to gfc_get_fake_result_decl.
      	* trans-intrinsic.c (gfc_conv_intrinsic_len): The same.
      
      2006-03-06  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/26107
      	* pure_dummy_length_1.f90: New test.
      
      	PR fortran/19546
      	* gfortran.dg/parent_result_ref_1.f90: New test.
      	* gfortran.dg/parent_result_ref_2.f90: New test.
      	* gfortran.dg/parent_result_ref_3.f90: New test.
      	* gfortran.dg/parent_result_ref_4.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111793 138bc75d-0d04-0410-961f-82ee72b054a4
      c750cc52
  8. 03 Mar, 2006 1 commit
    • tkoenig's avatar
      2006-03-03 Thomas Koenig <Thomas.Koenig@online.de> · 8a92488f
      tkoenig authored
      	PR fortran/25031
      	* trans-array.h:  Adjust gfc_array_allocate prototype.
      	* trans-array.c (gfc_array_allocate):  Change type of
      	gfc_array_allocatate to bool.  Function returns true if
      	it operates on an array.  Change second argument to gfc_expr.
      	Find last reference in chain.
      	If the function operates on an allocatable array, emit call to
      	allocate_array() or allocate64_array().
      	* trans-stmt.c (gfc_trans_allocate):  Code to follow to last
      	reference has been moved to gfc_array_allocate.
      	* trans.h:  Add declaration for gfor_fndecl_allocate_array and
      	gfor_fndecl_allocate64_array.
      	(gfc_build_builtin_function_decls):  Add gfor_fndecl_allocate_array
      	and gfor_fndecl_allocate64_array.
      
      2006-03-03  Thomas Koenig  <Thomas.Koenig@online.de>
      
      	PR fortran/25031
      	* runtime/memory.c:  Adjust copyright years.
      	(allocate_array):  New function.
      	(allocate64_array):  New function.
      	* libgfortran.h (error_codes):  Add ERROR_ALLOCATION.
      
      2006-03-03  Thomas Koenig  <Thomas.Koenig@online.de>
      
      	PR fortran/25031
      	* multiple_allocation_1.f90:  New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111677 138bc75d-0d04-0410-961f-82ee72b054a4
      8a92488f
  9. 02 Mar, 2006 1 commit
    • sayle's avatar
      · 6b9dde1b
      sayle authored
      	* trans-stmt.c (generate_loop_for_temp_to_lhs): Add an additional
      	INVERT argument to invert the sense of the WHEREMASK argument.
      	Remove unneeded code to AND together a list of masks.
      	(generate_loop_for_rhs_to_temp): Likewise.
      	(gfc_trans_assign_need_temp): Likewise.
      	(gfc_trans_forall_1): Likewise.
      	(gfc_evaluate_where_mask): Likewise, add a new INVERT argument
      	to specify the sense of the MASK argument.
      	(gfc_trans_where_assign): Likewise.
      	(gfc_trans_where_2): Likewise.  Restructure code that decides
      	whether we need to allocate zero, one or two temporary masks.
      	If this is a top-level WHERE (i.e. the incoming MAKS is NULL),
      	we only need to allocate at most one temporary mask, and can
      	invert it's sense to provide the complementary pending execution
      	mask.  Only calculate the size of the required temporary arrays
      	if we need any.
      	(gfc_trans_where): Update call to gfc_trans_where_2.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111630 138bc75d-0d04-0410-961f-82ee72b054a4
      6b9dde1b
  10. 20 Feb, 2006 2 commits
    • sayle's avatar
      · c5cf6b68
      sayle authored
      	* trans-stmt.c (gfc_trans_where_2): Avoid updating unused current
      	execution mask for empty WHERE/ELSEWHERE clauses.  Don't allocate
      	temporary mask arrays if they won't be used.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111303 138bc75d-0d04-0410-961f-82ee72b054a4
      c5cf6b68
    • sayle's avatar
      · 598efdf1
      sayle authored
      	* trans-stmt.c (gfc_trans_where_assign): Remove code to handle
      	traversing a linked list of MASKs.  The MASK is now always a
      	single element requiring no ANDing during the assignment.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111301 138bc75d-0d04-0410-961f-82ee72b054a4
      598efdf1
  11. 18 Feb, 2006 1 commit
    • sayle's avatar
      · b8b82f32
      sayle authored
      	* trans-stmt.c (struct temporary_list): Delete.
      	(gfc_trans_where_2): Major reorganization.  Remove no longer needed
      	TEMP argument.  Allocate and deallocate the control mask and
      	pending control mask locally.
      	(gfc_trans_forall_1): Delete TEMP local variable, and update
      	call to gfc_trans_where_2.  No need to deallocate arrays after.
      	(gfc_evaluate_where_mask): Major reorganization.  Change return
      	type to void.  Pass in parent execution mask, MASK, and two
      	already allocated mask arrays CMASK and PMASK.  On return
      	CMASK := MASK & COND, PMASK := MASK & !COND.  MASK, CMASK and
      	CMASK may all be NULL, or refer to the same temporary arrays.
      	(gfc_trans_where): Update call to gfc_trans_where_2.  We no
      	longer need a TEMP variable or to deallocate temporary arrays
      	allocated by gfc_trans_where_2.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111245 138bc75d-0d04-0410-961f-82ee72b054a4
      b8b82f32
  12. 09 Feb, 2006 1 commit
    • pault's avatar
      2006-02-09 Paul Thomas <pault@gcc.gnu.org> · 2dbb5023
      pault authored
      	PR fortran/26038
      	* trans-stmt.c (gfc_trans_allocate): Provide assumed character length
      	scalar with missing backend_decl for the hidden dummy charlen.
      
      	PR fortran/25059
      	* interface.c (gfc_extend_assign): Remove detection of non-PURE
      	subroutine in assignment interface, with gfc_error, and put it in
      	* resolve.c (resolve_code).
      
      	PR fortran/25070
      	* interface.c (gfc_procedure_use): Flag rank checking for non-
      	elemental, contained or interface procedures in call to
      	(compare_actual_formal), where ranks are checked for assumed
      	shape arrays..
      
      2006-02-09  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/26038
      	* gfortran.dg/allocate_char_star_scalar_1.f90: New test.
      
      	PR fortran/25059
      	* gfortran.dg/impure_assignment_1.f90: New test.
      
      	PR fortran/25070
      	* gfortran.dg/assumed_shape_ranks_1.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110816 138bc75d-0d04-0410-961f-82ee72b054a4
      2dbb5023
  13. 06 Feb, 2006 2 commits
    • sayle's avatar
      · 3ea6cb48
      sayle authored
      	* trans-stmt.c (gfc_evaluate_where_mask): Allow the NMASK argument
      	to be NULL to indicate that the not mask isn't required.
      	(gfc_trans_where_2): Remove PMASK argument.  Avoid calculating the
      	pending mask for the last clause of a WHERE chain.  Update recursive
      	call.
      	(gfc_trans_forall_1): Update call to gfc_trans_where_2.
      	(gfc_trans_where): Likewise.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110659 138bc75d-0d04-0410-961f-82ee72b054a4
      3ea6cb48
    • jakub's avatar
      Backport from gomp-20050608-branch · d4163395
      jakub authored
      	* trans-decl.c (create_function_arglist): Handle dummy functions.
      
      	* trans-decl.c (gfc_get_symbol_decl): Revert explicit setting of
      	TYPE_SIZE_UNIT.
      	(gfc_trans_vla_type_sizes): Also "gimplify"
      	GFC_TYPE_ARRAY_DATAPTR_TYPE for GFC_DESCRIPTOR_TYPE_P types.
      	* trans-array.c (gfc_trans_deferred_array): Call
      	gfc_trans_vla_type_sizes.
      
      	* trans-decl.c (saved_function_decls, saved_parent_function_decls):
      	Remove unnecessary initialization.
      	(create_function_arglist): Make sure __result has complete type.
      	(gfc_get_fake_result_decl): Change current_fake_result_decl into
      	a tree chain.  For entry master, create a separate variable
      	for each result name.  For BT_CHARACTER results, call
      	gfc_finish_var_decl on length even if it has been already created,
      	but not pushdecl'ed.
      	(gfc_trans_vla_type_sizes): For function/entry result, adjust
      	result value type, not the FUNCTION_TYPE.
      	(gfc_generate_function_code): Adjust for current_fake_result_decl
      	changes.
      	(gfc_trans_deferred_vars): Likewise.  Call gfc_trans_vla_type_sizes
      	even on result if it is assumed-length character.
      
      	* trans-decl.c (gfc_trans_dummy_character): Add SYM argument.
      	Call gfc_trans_vla_type_sizes.
      	(gfc_trans_auto_character_variable): Call gfc_trans_vla_type_sizes.
      	(gfc_trans_vla_one_sizepos, gfc_trans_vla_type_sizes_1,
      	gfc_trans_vla_type_sizes): New functions.
      	(gfc_trans_deferred_vars): Adjust gfc_trans_dummy_character
      	callers.  Call gfc_trans_vla_type_sizes on assumed-length
      	character parameters.
      	* trans-array.c (gfc_trans_array_bounds,
      	gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias): Call
      	gfc_trans_vla_type_sizes.
      	* trans.h (gfc_trans_vla_type_sizes): New prototype.
      
      	* trans-decl.c (gfc_build_qualified_array): For non-assumed-size
      	arrays without constant size, create also an index var for
      	GFC_TYPE_ARRAY_SIZE (type).  If the type is incomplete, complete
      	it as 0..size-1.
      	(gfc_create_string_length): Don't call gfc_defer_symbol_init
      	if just creating DECL_ARGUMENTS.
      	(gfc_get_symbol_decl): Call gfc_finish_var_decl and
      	gfc_defer_symbol_init even if ts.cl->backend_decl is already
      	set to a VAR_DECL that doesn't have DECL_CONTEXT yet.
      	(create_function_arglist): Rework, so that hidden length
      	arguments for CHARACTER parameters are created together with
      	the parameters.  Resolve ts.cl->backend_decl for CHARACTER
      	parameters.  If the argument is a non-constant length array
      	or CHARACTER, ensure PARM_DECL has different type than
      	its DECL_ARG_TYPE.
      	(generate_local_decl): Call gfc_get_symbol_decl even
      	for non-referenced non-constant length CHARACTER parameters
      	after optionally issuing warnings.
      	* trans-array.c (gfc_trans_array_bounds): Set last stride
      	to GFC_TYPE_ARRAY_SIZE (type) to initialize it as well.
      	(gfc_trans_dummy_array_bias): Initialize GFC_TYPE_ARRAY_SIZE (type)
      	variable as well.
      
      	* trans-expr.c (gfc_conv_expr_val): Fix comment typo.
      
      	* trans-stmt.c (gfc_trans_simple_do): Fix comment.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110653 138bc75d-0d04-0410-961f-82ee72b054a4
      d4163395
  14. 05 Feb, 2006 2 commits
    • sayle's avatar
      · dded0b23
      sayle authored
      	* dependency.c (gfc_check_dependency): Remove unused vars and nvars
      	arguments.  Replace with an "identical" argument.  A full array
      	reference to the same symbol is a dependency if identical is true.
      	* dependency.h (gfc_check_dependency): Update prototype.
      	* trans-array.h (gfc_check_dependency): Delete duplicate prototype.
      	* trans-stmt.c: #include dependency.h for gfc_check_dependency.
      	(gfc_trans_forall_1): Update calls to gfc_check_dependency.
      	(gfc_trans_where_2): Likewise.  Remove unneeded variables.
      	(gfc_trans_where_3): New function for simple non-dependent WHEREs.
      	(gfc_trans_where): Call gfc_trans_where_3 to translate simple
      	F90-style WHERE statements without internal dependencies.
      	* Make-lang.in (trans-stmt.o): Depend upon dependency.h.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110625 138bc75d-0d04-0410-961f-82ee72b054a4
      dded0b23
    • sayle's avatar
      · 8aea4f86
      sayle authored
      	* trans-stmt.c (gfc_evaluate_where_mask): Use LOGICAL*1 for WHERE
      	masks instead of LOGICAL*4.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110617 138bc75d-0d04-0410-961f-82ee72b054a4
      8aea4f86
  15. 19 Jan, 2006 1 commit
  16. 16 Jan, 2006 2 commits
    • rguenth's avatar
      2006-01-16 Richard Guenther <rguenther@suse.de> · 5c8bd824
      rguenth authored
      	* trans-stmt.c (gfc_trans_if_1): Use fold_buildN and build_int_cst.
      	(gfc_trans_arithmetic_if): Likewise.
      	(gfc_trans_simple_do): Likewise.
      	(gfc_trans_do): Likewise.
      	(gfc_trans_do_while): Likewise.
      	(gfc_trans_logical_select): Likewise.
      	(gfc_trans_forall_loop): Likewise.
      	(generate_loop_for_temp_to_lhs): Likewise.
      	(generate_loop_for_rhs_to_temp): Likewise.
      	(gfc_trans_allocate): Likewise.
      	* trans.c (gfc_add_expr_to_block): Do not fold expr again.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109756 138bc75d-0d04-0410-961f-82ee72b054a4
      5c8bd824
    • rguenth's avatar
      2006-01-16 Richard Guenther <rguenther@suse.de> · 0eed5ee7
      rguenth authored
      	* trans-expr.c (gfc_conv_function_call): Use fold_build2.
      	* trans-stmt.c (gfc_trans_goto): Likewise.  Use build_int_cst.
      	* trans.c (gfc_trans_runtime_check): Don't fold the condition
      	again.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109745 138bc75d-0d04-0410-961f-82ee72b054a4
      0eed5ee7
  17. 09 Jan, 2006 1 commit
  18. 07 Jan, 2006 1 commit
    • pault's avatar
      2006-01-07 Paul Thomas <pault@gcc.gnu.org> · 6bfab0c0
      pault authored
      	PR fortran/22146
      	* trans-array.c (gfc_reverse_ss): Remove static attribute.
      	(gfc_walk_elemental_function_args): Replace gfc_expr * argument for
      	the function call with the corresponding gfc_actual_arglist*.  Change
      	code accordingly.
      	(gfc_walk_function_expr): Call to gfc_walk_elemental_function_args
      	now requires the actual argument list instead of the expression for
      	the function call.
      	* trans-array.h: Modify the prototype for gfc_walk_elemental_function_args
      	and provide a prototype for gfc_reverse_ss.
      	* trans-stmt.h (gfc_trans_call): Add the scalarization code for the case
      	where an elemental subroutine has array valued actual arguments.
      
      	PR fortran/25029
      	PR fortran/21256
      	PR fortran/20868
      	PR fortran/20870
      	* resolve.c (check_assumed_size_reference): New function to check for upper
      	bound in assumed size array references.
      	(resolve_assumed_size_actual): New function to do a very restricted scan
      	of actual argument expressions of those procedures for which incomplete
      	assumed size array references are not allowed.
      	(resolve_function, resolve_call): Switch off assumed size checking of
      	actual arguments, except for elemental procedures and intrinsic
      	inquiry functions, in some circumstances.
      	(resolve_variable): Call check_assumed_size_reference.
      
      2006-01-07  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/22146
      	* gfortran.dg/elemental_subroutine_1.f90: New test.
      	* gfortran.dg/elemental_subroutine_2.f90: New test.
      
      	PR fortran/25029
      	PR fortran/21256
      	* gfortran.dg/assumed_size_refs_1.f90: New test.
      
      	PR fortran/20868
      	PR fortran/20870
      	* gfortran.dg/assumed_size_refs_2.f90: New test.
      	* gfortran.dg/initialization_1.f90: Change warning message.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109449 138bc75d-0d04-0410-961f-82ee72b054a4
      6bfab0c0
  19. 16 Dec, 2005 3 commits
    • rguenth's avatar
      2005-12-16 Richard Guenther <rguenther@suse.de> · ac47d547
      rguenth authored
      	* trans.h (tree): Remove declaration of gfc_build_function_call.
      	* trans.c (gfc_build_function_call): Remove.
      	(gfc_build_array_ref): Use build_function_call_expr.
      	(gfc_trans_runtime_check): Likewise.
      	* trans-array.c (gfc_trans_allocate_array_storage): Likewise.
      	(gfc_grow_array): Likewise.
      	(gfc_trans_array_ctor_element): Likewise.
      	(gfc_trans_array_constructor_value): Likewise.
      	(gfc_array_allocate): Likewise.
      	(gfc_array_deallocate): Likewise.
      	(gfc_trans_auto_array_allocation): Likewise.
      	(gfc_trans_dummy_array_bias): Likewise.
      	(gfc_conv_array_parameter): Likewise.
      	* trans-expr.c (gfc_conv_power_op): Likewise.
      	(gfc_conv_string_tmp): Likewise.
      	(gfc_conv_concat_op): Likewise.
      	(gfc_conv_expr_op): Likewise.
      	(gfc_trans_string_copy): Likewise.
      	* trans-decl.c (build_entry_thunks): Likewise.
      	(gfc_generate_function_code): Likewise.
      	(gfc_generate_constructors): Likewise.
      	* trans-io.c (gfc_trans_open): Likewise.
      	(gfc_trans_close): Likewise.
      	(build_filepos): Likewise.
      	(gfc_trans_inquire): Likewise.
      	(transfer_namelist_element): Likewise.
      	(build_dt): Likewise.
      	(gfc_trans_dt_end): Likewise.
      	(transfer_expr): Likewise.
      	(transfer_array_desc): Likewise.
      	* trans-stmt.c (gfc_trans_pause): Likewise.
      	(gfc_trans_stop): Likewise.
      	(gfc_trans_character_select): Likewise.
      	(gfc_do_allocate): Likewise.
      	(gfc_trans_assign_need_temp): Likewise.
      	(gfc_trans_pointer_assign_need_temp): Likewise.
      	(gfc_trans_forall_1): Likewise.
      	(gfc_trans_where): Likewise.
      	(gfc_trans_allocate): Likewise.
      	(gfc_trans_deallocate): Likewise.
      	* trans-intrinsic.c (gfc_conv_intrinsic_aint): Likewise.
      	(gfc_conv_intrinsic_lib_function): Likewise.
      	(gfc_conv_intrinsic_exponent): Likewise.
      	(gfc_conv_intrinsic_abs): Likewise.
      	(gfc_conv_intrinsic_sign): Likewise.
      	(gfc_conv_intrinsic_ctime): Likewise.
      	(gfc_conv_intrinsic_fdate): Likewise.
      	(gfc_conv_intrinsic_ttynam): Likewise.
      	(gfc_conv_intrinsic_ishftc): Likewise.
      	(gfc_conv_intrinsic_len_trim): Likewise.
      	(gfc_conv_intrinsic_index): Likewise.
      	(gfc_conv_intrinsic_size): Likewise.
      	(gfc_conv_intrinsic_strcmp): Likewise.
      	(gfc_conv_intrinsic_adjust): Likewise.
      	(gfc_conv_associated): Likewise.
      	(gfc_conv_intrinsic_scan): Likewise.
      	(gfc_conv_intrinsic_verify): Likewise.
      	(call_builtin_clz): Likewise.
      	(gfc_conv_intrinsic_si_kind): Likewise.
      	(gfc_conv_intrinsic_sr_kind): Likewise.
      	(gfc_conv_intrinsic_trim): Likewise.
      	(gfc_conv_intrinsic_repeat): Likewise.
      	(gfc_conv_intrinsic_iargc): Likewise.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108687 138bc75d-0d04-0410-961f-82ee72b054a4
      ac47d547
    • rguenth's avatar
      2005-12-16 Richard Guenther <rguenther@suse.de> · 4fa2c167
      rguenth authored
      	* trans.h (gfc_build_indirect_ref): Remove declaration.
      	* trans.c (gfc_build_indirect_ref): Remove.
      	* trans-array.c (gfc_trans_array_ctor_element): Use
      	build_fold_indirect_ref instead of gfc_build_indirect_ref.
      	(gfc_trans_array_constructor_value): Likewise.
      	(gfc_conv_array_index_offset): Likewise.
      	(gfc_conv_scalarized_array_ref): Likewise.
      	(gfc_conv_array_ref): Likewise.
      	(gfc_trans_dummy_array_bias): Likewise.
      	(gfc_conv_expr_descriptor): Likewise.
      	(gfc_conv_array_parameter): Likewise.
      	* trans-decl.c (gfc_finish_cray_pointee): Likewise.
      	(gfc_get_symbol_decl): Likewise.
      	* trans-expr.c (gfc_conv_substring): Likewise.
      	(gfc_conv_component_ref): Likewise.
      	(gfc_conv_variable): Likewise.
      	(gfc_add_interface_mapping): Likewise.
      	(gfc_conv_function_call): Likewise.
      	* trans-intrinsic.c (gfc_conv_intrinsic_ichar): Likewise.
      	(gfc_conv_intrinsic_transfer): Likewise.
      	* trans-io.c (nml_get_addr_expr): Likewise.
      	(transfer_namelist_element): Likewise.
      	(transfer_expr): Likewise.
      	* trans-stmt.c (gfc_trans_nested_forall_loop): Likewise.
      	(allocate_temp_for_forall_nest_1): Likewise.
      	(gfc_trans_forall_1): Likewise.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108678 138bc75d-0d04-0410-961f-82ee72b054a4
      4fa2c167
    • rguenth's avatar
      2005-12-16 Richard Guenther <rguenther@suse.de> · 9596685a
      rguenth authored
      	(gfc_conv_descriptor_data_addr): Use build_fold_addr_expr where
      	appropriate.
      	(gfc_trans_allocate_array_storage): Likewise.
      	(gfc_trans_array_constructor_value): Likewise.
      	(gfc_conv_array_data): Likewise.
      	(gfc_conv_expr_descriptor): Likewise.
      	(gfc_conv_array_parameter): Likewise.
      	(gfc_conv_variable): Likewise.
      	(gfc_conv_function_val): Likewise.
      	(gfc_conv_function_call): Likewise.
      	(gfc_conv_expr_reference): Likewise.
      	(gfc_conv_intrinsic_ctime): Likewise.
      	(gfc_conv_intrinsic_fdate): Likewise.
      	(gfc_conv_intrinsic_ttynam): Likewise.
      	(gfc_conv_intrinsic_si_kind): Likewise.
      	(gfc_conv_intrinsic_trim): Likewise.
      	(set_parameter_ref): Likewise.
      	(gfc_convert_array_to_string): Likewise.
      	(gfc_trans_open): Likewise.
      	(gfc_trans_close): Likewise.
      	(build_filepos): Likewise.
      	(gfc_trans_inquire): Likewise.
      	(nml_get_addr_expr): Likewise.
      	(transfer_namelist_element): Likewise.
      	(build_dt): Likewise.
      	(gfc_trans_dt_end): Likewise.
      	(transfer_array_component): Likewise.
      	(transfer_expr): Likewise.
      	(transfer_array_desc): Likewise.
      	(gfc_trans_transfer): Likewise.
      	(gfc_trans_allocate): Likewise.
      	(gfc_trans_deallocate): Likewise.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108633 138bc75d-0d04-0410-961f-82ee72b054a4
      9596685a
  20. 25 Oct, 2005 1 commit
    • fengwang's avatar
      · c8f1568f
      fengwang authored
      2005-10-25  Feng Wang  <fengwang@nudt.edu.cn>
      
      	PR fortran/22290
      	* trans-decl.c (gfc_add_assign_aux_vars): New function. Add two
      	auxiliary variables.
      	(gfc_get_symbol_decl): Use it when a variable, including dummy
      	argument, is assigned a label.
      	(gfc_trans_assign_aux_var): New function. Set initial value of
      	the auxiliary variable explicitly.
      	(gfc_trans_deferred_vars): Use it.
      	* trans-stmt.c (gfc_conv_label_variable): Handle dummy argument.
      
      2005-10-25  Feng Wang  <fengwang@nudt.edu.cn>
      
      	PR fortran/22290
      	* gfortran.dg/assign_5.f90: New test.
      	* gfortran.dg/assign_6.f: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105887 138bc75d-0d04-0410-961f-82ee72b054a4
      c8f1568f
  21. 21 Sep, 2005 1 commit
    • pault's avatar
      2005-09-21 Erik Edelmann <erik.edelmann@iki.fi> · ddc2803e
      pault authored
      	PR fortran/19929
      	* trans-stmt.c (gfc_trans_deallocate): Check if the
      	object to be deallocated is an array by looking at
      	expr->rank instead of expr->symtree->n.sym->attr.dimension.
      
      2005-09-21  Erik Edelmann  <erik.edelmann@iki.fi>
      
      	PR fortran/19929
      	* gfortran.dg/der_ptr_component_1.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104495 138bc75d-0d04-0410-961f-82ee72b054a4
      ddc2803e
  22. 14 Aug, 2005 1 commit
  23. 31 Jul, 2005 1 commit
  24. 20 Jul, 2005 1 commit
    • giovannibajo's avatar
      Make CONSTRUCTOR use VEC to store initializers. · c75b4594
      giovannibajo authored
      	* c-common.c (complete_array_type): Update to cope with VEC in
      	CONSTRUCTOR_ELTS.
      	* c-pretty-print.c (pp_c_initializer_list): Use pp_c_constructor_elts.
      	(pp_c_constructor_elts): New function.
      	* c-pretty-print.h (pp_c_constructor_elts): Declare.
      	* c-typeck.c (build_function_call, build_c_cast, digest_init,
      	struct constructor_stack, struct initializer_stack,
      	constructor_elements, push_init_level, pop_init_level,
      	add_pending_init, find_init_member, output_init_element): Update to
      	cope with VEC in CONSTRUCTOR_ELTS.
      	* coverage.c (build_fn_info_value, build_ctr_info_value,
      	build_gcov_info): Likewise.
      	* expr.c (categorize_ctor_elements_1, store_constructor,
      	expand_expr_real_1): Likewise.
      	* fold-const.c (fold_ternary): Likewise.
      	* gimplify.c (gimplify_init_ctor_preeval, zero_sized_field_decl,
      	gimplify_init_constructor, gimplify_expr): Likewise.
      	* tree-dump.c (dequeue_and_dump): Likewise.
      	* tree-inline.c (copy_tree_r): Add code to duplicate a CONSTRUCTOR
      	node.
      	* tree-pretty-print.c (dump_generic_node): Update to cope with VEC in
      	CONSTRUCTOR_ELTS.
      	* tree-sra.c (generate_element_init_1): Likewise.
      	* tree-ssa-ccp.c (fold_const_aggregate_ref): Likewise.
      	* tree-ssa-operands.c (get_expr_operands): Likewise.
      	* tree-vect-generic.c (expand_vector_piecewise): Likewise.
      	* tree-vect-transform.c (vect_get_vec_def_for_operand):
      	(get_initial_def_for_reduction): Likewise.
      	* tree-vn.c (set_value_handle, get_value_handle): CONSTURCTOR uses
      	value handle in annotations.
      	* tree.c (tree_node_kind, tree_code_size, make_node_stat,
      	tree_node_structure): Add support for constr_kind.
      	(build_vector_from_ctor, build_constructor_single,
      	build_constructor_from_list): New functions.
      	(build_constructor): Update to take a VEC instead of a TREE_LIST.
      	(simple_cst_equal, iterative_hash_expr, initializer_zerop, walk_tree):
      	Update to cope with VEC in CONSTRUCTOR_ELTS.
      	* tree.def (CONSTRUCTOR): Make it a tcc_exceptional node.
      	* tree.h (FOR_EACH_CONSTRUCTOR_VALUE, FOR_EACH_CONSTRUCTOR_ELT,
      	CONSTRUCTOR_APPEND_ELT): New macros.
      	(struct constructor_elt, struct	tree_constructor): New data types.
      	(union tree_node): Add tree_constructor field.
      	* treestruct.def: Define TS_CONSTRUCTOR.
      	* varasm.c (const_hash_1, compare_constant, copy_constant,
      	compute_reloc_for_constant, output_addressed_constants,
      	initializer_constant_valid_p, output_constant,
      	array_size_for_constructor, output_constructor): Update to cope with
      	VEC in CONSTRUCTOR_ELTS.
      	* vec.h (VEC_empty, VEC_copy): New macros.
      
      ada/
      	Make CONSTRUCTOR use VEC to store initializers.
      	* decl.c (gnat_to_gnu_entity): Update to cope with VEC in
      	CONSTRUCTOR_ELTS.
      	* trans.c (extract_values): Likewise.
      	* utils.c (convert, remove_conversions): Likewise.
      	* utils2.c (contains_save_expr_p, build_binary_op, build_unary_op,
      	gnat_build_constructor): Likewise.
      
      cp/
      	Make CONSTRUCTOR use VEC to store initializers.
      	* call.c (convert_default_arg): Update call to digest_init.
      	* class.c (dump_class_hierarchy, dump_array): Update to cope with
      	VEC in CONSTRUCTOR_ELTS.
      	* cp-tree.h (EMPTY_CONSTRUCTOR_P): Likewise.
      	(finish_compound_literal, digest_init): Update declaration.
      	* decl.c (struct reshape_iter): New data type.
      	(reshape_init_array): Rename to...
      	(reshape_init_array_1): Update to cope with VEC in CONSTRUCTOR_ELTS.
      	(reshape_init): Rewrite from scratch. Split parts into...
      	(reshape_init_array, reshape_init_vector, reshape_init_class,
      	reshape_init_r): New functions.
      	(check_initializer): Update call to reshape_init. Remove obsolete
      	code.
      	(initialize_artificial_var, cp_complete_array_type): Update to cope
      	with VEC in CONSTRUCTOR_ELTS.
      	* decl2.c (grokfield): Update calls to digest_init.
      	(mark_vtable_entries): Update to cope with VEC in CONSTRUCTOR_ELTS.
      	* error.c (dump_expr_init_vec): New function.
      	(dump_expr): Use dump_expr_init_vec.
      	* init.c (build_zero_init, build_vec_init): Update to cope with VEC
      	in CONSTRUCTOR_ELTS.
      	(expand_default_init): Update call to digest_init.
      	* parser.c  (cp_parser_postfix_expression): Use a VEC for the
      	initializers.
      	(cp_parser_initializer_list): Build a VEC of initializers.
      	* pt.c (tsubst_copy, tsubst_copy_and_build): Update to cope with VEC
      	in CONSTRUCTOR_ELTS.
      	* rtti.c (tinfo_base_init, generic_initializer, ptr_initializer,
      	ptm_initializer, class_initializer, get_pseudo_ti_init): Use
      	build_constructor_from_list instead of build_constructor.
      	* semantics.c (finish_compound_literal): Update call to digest_init.
      	* tree.c (stabilize_init): Update to cope with VEC in
      	CONSTRUCTOR_ELTS.
      	* typeck.c (build_ptrmemfunc1): Likewise.
      	* typeck2.c: (cxx_incomplete_type_error, split_nonconstant_init_1):
      	Likewise.
      	(store_init_value): Use build_constructor_from_list and update call
      	to digest_init.
      	(digest_init): Rewrite.
      	(process_init_constructor): Rewrite from scratch. Split into...
      	(process_init_constructor_array, picflag_from_initializer,
      	process_init_constructor_record, process_init_constructor_union):
      	New functions.
      	(PICFLAG_ERRONEOUS, PICFLAG_NOT_ALL_CONSTANT, PICFLAG_NOT_ALL_SIMPLE):
      	New macros.
      	(build_functional_cast): Use build_constructor_from_list instead of
      	build_constructor.
      
      fortran/
      	Make CONSTRUCTOR use VEC to store initializers.
      	* trans-array.c (gfc_build_null_descriptor,
      	gfc_trans_array_constructor_value, gfc_conv_array_initializer):
      	Update to cope with VEC in CONSTRUCTOR_ELTS.
      	* trans-common.c (create_common): Likewise.
      	* trans-expr.c (gfc_conv_structure): Likewise.
      	* trans-stmt.c (gfc_trans_character_select): Use
      	build_constructor_from_list instead of build_constructor.
      
      java/
      	Make CONSTRUCTOR use VEC to store initializers.
      	* check-init.c (check_init): Update to cope with VEC in
      	CONSTRUCTOR_ELTS.
      	* class.c (make_field_value, make_method_value, get_dispatch_table,
      	make_class_data, emit_symbol_table, emit_catch_table,
      	emit_assertion_table): Use build_constructor_from_list instead of
      	build_constructor.
      	* constants.c (build_constants_constructor): Likewise.
      	* java-gimplify.c (java_gimplify_new_array_init): Update to cope with
      	VEC in CONSTRUCTOR_ELTS.
      	* java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
      	PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
      	of a TREE_LIST.
      	* jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
      	CONSTRUCTOR_ELTS.
      	* parse.y (build_new_array_init): Use build_constructor_from_list
      	instead of build_constructor.
      	(patch_new_array_init): Update to cope with VEC in
      	CONSTRUCTOR_ELTS.
      	(array_constructor_check_entry): Likewise.
      
      objc/
      	Make CONSTRUCTOR use VEC to store initializers.
      	* objc-act.c (objc_build_constructor): Use build_constructor_from_list
      	instead of build_constructor.
      
      testsuite/
      	Make CONSTRUCTOR use VEC to store initializers.
      	* g++.dg/ext/complit3.C: Check for specific error messages.
      	* g++.dg/init/brace2.C: Update error message.
      	* g++.dg/warn/Wbraces2.C: Likewise.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102182 138bc75d-0d04-0410-961f-82ee72b054a4
      c75b4594
  25. 11 Jul, 2005 1 commit
  26. 26 Jun, 2005 1 commit
  27. 25 Jun, 2005 1 commit
  28. 13 Jun, 2005 2 commits
    • tobi's avatar
      fortran/ · 40b59b69
      tobi authored
      2005-06-13  Jakub Jelinek  <jakub@redhat.com>
      
      	PR fortran/22038
      	* trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
      	in the innermost loop.
      
      testsuite/
      2005-06-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
      
      	PR fortran/22038
      	* gfortran.dg/forall_1.f90: Un-XFAIL.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100887 138bc75d-0d04-0410-961f-82ee72b054a4
      40b59b69
    • jakub's avatar
      * trans-expr.c (gfc_conv_function_call): Return int instead of · 079d21d5
      jakub authored
      	void.  Use a local variable for has_alternate_specifier and
      	return it.  Avoid modification of function type's return value
      	in place, since it may be shared.
      	* trans.h (has_alternate_specifier): Remove.
      	(gfc_conv_function_call): Change return type.
      	* trans-stmt.c (has_alternate_specifier): Remove.
      	(gfc_trans_call): Add a local has_alternate_specifier variable,
      	set it from gfc_conv_function_call return value.
      
      	* gfortran.dg/altreturn_1.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100878 138bc75d-0d04-0410-961f-82ee72b054a4
      079d21d5
  29. 11 Jun, 2005 1 commit
    • kargl's avatar
      PR fortran/17792 · 8302a4a2
      kargl authored
      PR fortran/21375
      * trans-array.c (gfc_array_deallocate): pstat is new argument
        (gfc_array_allocate): update gfc_array_deallocate() call.
        (gfc_trans_deferred_array): ditto.
      * trans-array.h: update gfc_array_deallocate() prototype.
      * trans-decl.c (gfc_build_builtin_function_decls): update declaration
      * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100845 138bc75d-0d04-0410-961f-82ee72b054a4
      8302a4a2
  30. 26 May, 2005 1 commit
  31. 17 May, 2005 1 commit
    • jakub's avatar
      PR fortran/15080 · 87367eac
      jakub authored
      	* trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
      	arguments.  If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
      	of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
      	just that as index.
      	(generate_loop_for_rhs_to_temp): Likewise.
      	(compute_overall_iter_number): Add INNER_SIZE_BODY argument.
      	It non-NULL, add it to body.
      	(allocate_temp_for_forall_nest_1): New function, split from
      	allocate_temp_for_forall_nest.
      	(allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
      	propagate it down to compute_overall_iter_number.  Use
      	allocate_temp_for_forall_nest_1.
      	(gfc_trans_assign_need_temp): Remove COUNT2.  Call
      	compute_inner_temp_size into a new stmtblock_t.  Adjust calls to
      	allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
      	and generate_loop_for_temp_to_lhs.
      	(gfc_trans_pointer_assign_need_temp): Adjust calls to
      	allocate_temp_for_forall_nest.
      	(gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
      	stmtblock_t.  Call compute_overall_iter_number just once, then
      	allocate_temp_for_forall_nest_1 twice with the same size.
      	Initialize mask indexes if nested_forall_info != NULL.
      	(gfc_trans_where_2): Initialize mask indexes before calling
      	gfc_trans_nested_forall_loop.
      
      	* gfortran.fortran-torture/execute/forall_3.f90: Remove comment
      	about the test failing.
      	* gfortran.fortran-torture/execute/where_7.f90: New test.
      	* gfortran.fortran-torture/execute/where_8.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99812 138bc75d-0d04-0410-961f-82ee72b054a4
      87367eac
  32. 15 May, 2005 1 commit
    • fengwang's avatar
      2005-05-15 Feng Wang <fengwang@nudt.edu.cn> · 6957b927
      fengwang authored
              Jerry DeLisle <jvdelisle@verizon.net>
      
              PR fortran/17432
              * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
              resolve ICE on assign of format label.
              * trans-io.c (set_string): add fold-convert to properly
              handle assigned format label in write.
      
      2005-05-15  Jerry DeLisle <jvdelisle@verizon.net>
      
              PR fortran/17432
              * gfortran.dg/assign_4.f: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99711 138bc75d-0d04-0410-961f-82ee72b054a4
      6957b927
  33. 13 May, 2005 1 commit