1. 31 Dec, 2006 1 commit
    • pault's avatar
      2006-12-31 Paul Thomas <pault@gcc.gnu.org> · 8d7cdc4d
      pault authored
      	PR fortran/23060
      	* intrinsic.c (compare_actual_formal ): Distinguish argument
      	list functions from keywords.
      	* intrinsic.c (sort_actual): If formal is NULL, the presence of
      	an argument list function actual is an error.
      	* trans-expr.c (conv_arglist_function) : New function to
      	implement argument list functions %VAL, %REF and %LOC.
      	(gfc_conv_function_call): Call it.
      	* resolve.c (resolve_actual_arglist): Add arg ptype and check
      	argument list functions.
      	(resolve_function, resolve_call): Set value of ptype before
      	calls to resolve_actual_arglist.
      	* primary.c (match_arg_list_function): New function.
      	(gfc_match_actual_arglist): Call it before trying for a
      	keyword argument.
      
      2006-12-31  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/23060
      	* gfortran.dg/c_by_val.c: Called by c_by_val_1.f.
      	* gfortran.dg/c_by_val_1.f: New test.
      	* gfortran.dg/c_by_val_2.f: New test.
      	* gfortran.dg/c_by_val_3.f: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120295 138bc75d-0d04-0410-961f-82ee72b054a4
      8d7cdc4d
  2. 21 Dec, 2006 1 commit
    • pault's avatar
      2006-12-21 Paul Thomas <pault@gcc.gnu.org> · 76b504f5
      pault authored
      	PR fortran/30202
      	* trans-array.c (gfc_conv_function_call): Use parmse.expr for
      	the nullifying of intent(out) arguments rather than the backend
      	declaration.
      
      2006-12-21  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/30202
      	* gfortran.dg/alloc_comp_basics_3.f90: New test.
      
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120109 138bc75d-0d04-0410-961f-82ee72b054a4
      76b504f5
  3. 20 Dec, 2006 1 commit
    • sayle's avatar
      · 67313c34
      sayle authored
      	* trans-expr.c (is_zero_initializer_p): Determine whether a given
      	constant expression is a zero initializer.
      	(gfc_trans_zero_assign): New function to attempt to optimize
      	"a(:) = 0.0" as a call to __builtin_memset (a, 0, sizeof(a));
      	(gfc_trans_assignment): Special case array assignments to a
      	zero initializer constant, using gfc_trans_zero_assign.
      
      	* gfortran.dg/array_memset_1.f90: New test case.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120078 138bc75d-0d04-0410-961f-82ee72b054a4
      67313c34
  4. 12 Dec, 2006 1 commit
    • tobi's avatar
      fortran/ · 53e60566
      tobi authored
      * trans-expr.c (gfc_conv_substring): Check for empty substring.
      testsuite/
      * lib/fortran-torture.exp: Update copyright years.  Remove
      obsolete comment.  Test -ftree-vectorize where it makes sense.
      * lib/gfortran-dg.exp: Update copyright years.  Use settings
      from fortran-torture.exp.
      * gfortran.dg/char_transpose_1.f90,
      gfortran.dg/char_spread_1.f90, gfortran.dg/g77/dnrm2.f,
      gfortran.dg/dependent_decls_1.f90: Fixout-of-bound errors.
      * gfortran.dg/enum_10.f90, gfortran.dg/mixed_io_1.f90:  Add
      '-w' to dg-options.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119797 138bc75d-0d04-0410-961f-82ee72b054a4
      53e60566
  5. 05 Dec, 2006 1 commit
    • pault's avatar
      2006-12-05 Paul Thomas <pault@gcc.gnu.org> · 5065911e
      pault authored
      	PR fortran/29912
      	* trans-expr.c (gfc_trans_arrayfunc_assign): Return NULL if the
      	lhs and rhs character lengths are not constant and equal for
      	character array valued functions.
      
      2006-12-05  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/29912
      	* gfortran.dg/char_result_12.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119554 138bc75d-0d04-0410-961f-82ee72b054a4
      5065911e
  6. 03 Dec, 2006 1 commit
    • pault's avatar
      2006-12-03 Paul Thomas <pault@gcc.gnu.org> · 8f6339b6
      pault authored
      	PR fortran/29642
      	* trans-expr.c (gfc_conv_variable): A character expression with
      	the VALUE attribute needs an address expression; otherwise all
      	other expressions with this attribute must not be dereferenced.
      	(gfc_conv_function_call): Pass expressions with the VALUE
      	attribute by value, using gfc_conv_expr.
      	* symbol.c (check_conflict): Add strings for INTENT OUT, INOUT
      	and VALUE.  Apply all the constraints associated with the VALUE
      	attribute.
      	(gfc_add_value): New function.
      	(gfc_copy_attr): Call it for VALUE attribute.
      	* decl.c (match_attr_spec): Include the VALUE attribute.
      	(gfc_match_value): New function.
      	* dump-parse-tree.c (gfc_show_attr): Include VALUE.
      	* gfortran.h : Add value to the symbol_attribute structure and
      	add a prototype for gfc_add_value
      	* module.c (mio_internal_string): Include AB_VALUE in enum.
      	(attr_bits): Provide the VALUE string for it.
      	(mio_symbol_attribute): Read or apply the VLUE attribute.
      	* trans-types.c (gfc_sym_type): Variables with the VLAUE
      	attribute are not passed by reference!
      	* resolve.c (was_declared): Add value to those that return 1.
      	(resolve_symbol): Value attribute requires dummy attribute.
      	* match.h : Add prototype for gfc_match_public.
      	* parse.c (decode_statement): Try to match a VALUE statement.
      
      
      2006-12-03  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/29642
      	* gfortran.dg/value_1.f90 : New test.
      	* gfortran.dg/value_2.f90 : New test.
      	* gfortran.dg/value_3.f90 : New test.
      	* gfortran.dg/value_4.f90 : New test.
      	* gfortran.dg/value_4.c : Called from value_4.f90.
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119461 138bc75d-0d04-0410-961f-82ee72b054a4
      8f6339b6
  7. 28 Nov, 2006 1 commit
  8. 26 Nov, 2006 1 commit
  9. 15 Nov, 2006 1 commit
    • burnus's avatar
      fortran/ · ee3729de
      burnus authored
      2006-11-15  Tobias Burnus  <burnus@net-b.de>
                  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
      
             PR fortran/27588
             * trans-expr.c (gfc_conv_substring): Add bounds checking.
               (gfc_conv_variable, gfc_conv_substring_expr): Pass more
               arguments to gfc_conv_substring.
      
      testsuite/
      2006-11-15  Tobias Burnus  <burnus@net-b.de>
      
             PR fortran/27588
             * gfortran.dg/char_bounds_check_fail_1.f90: New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118852 138bc75d-0d04-0410-961f-82ee72b054a4
      ee3729de
  10. 13 Nov, 2006 1 commit
  11. 10 Nov, 2006 1 commit
  12. 05 Nov, 2006 1 commit
    • pault's avatar
      2006-11-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu,org> · 54ad1b4d
      pault authored
      	    Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/24518
      	* trans-intrinsic.c (gfc_conv_intrinsic_mod): Use built_in fmod
      	for both MOD and MODULO, if it is available.
      
      	PR fortran/29565
      	* trans-expr.c (gfc_conv_aliased_arg): For an INTENT(OUT), save
      	the declarations from the unused loops by merging the block
      	scope for each; this ensures that the temporary is declared.
      
      2006-11-05  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/29565
      	* gfortran.dg/gfortran.dg/aliasing_dummy_3.f90: New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118492 138bc75d-0d04-0410-961f-82ee72b054a4
      54ad1b4d
  13. 31 Oct, 2006 1 commit
    • pault's avatar
      2006-10-31 Paul Thomas <pault@gcc.gnu.org> · 926b9532
      pault authored
      	PR fortran/29387
      	* trans-intrinsic.c (gfc_conv_intrinsic_len): Rearrange to have
      	a specific case for EXPR_VARIABLE and, in default, build an ss
      	to call gfc_conv_expr_descriptor for array expressions..
      
      	PR fortran/29490
      	* trans-expr.c (gfc_set_interface_mapping_bounds): In the case
      	that GFC_TYPE_ARRAY_LBOUND is not available, use descriptor
      	values for it and GFC_TYPE_ARRAY_UBOUND.
      
      	PR fortran/29641
      	* trans-types.c (gfc_get_derived_type): If the derived type
      	namespace has neither a parent nor a proc_name, set NULL for
      	the search namespace.
      
      
      2006-10-31  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/29387
      	* gfortran.dg/intrinsic_actual_2.f90: New test.
      
      	PR fortran/29490
      	* gfortran.dg/actual_array_interface_1.f90: New test.
      
      	PR fortran/29641
      	* gfortran.dg/used_types_11.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118220 138bc75d-0d04-0410-961f-82ee72b054a4
      926b9532
  14. 22 Oct, 2006 1 commit
    • fxcoudert's avatar
      PR fortran/26025 · 4e8e57b0
      fxcoudert authored
      	* lang.opt: Add -fexternal-blas and -fblas-matmul-limit options.
      	* options.c (gfc_init_options): Initialize new flags.
      	(gfc_handle_option): Handle new flags.
      	* gfortran.h (gfc_option): Add flag_external_blas and
      	blas_matmul_limit flags.
      	* trans-expr.c (gfc_conv_function_call): Use new argument
      	append_args, appending it at the end of the argument list
      	built for a function call.
      	* trans-stmt.c (gfc_trans_call): Use NULL_TREE for the new
      	append_args argument to gfc_trans_call.
      	* trans.h (gfc_conv_function_call): Update prototype.
      	* trans-decl.c (gfc_build_intrinsic_function_decls): Add
      	prototypes for BLAS ?gemm routines.
      	* trans-intrinsic.c (gfc_conv_intrinsic_funcall): Generate the
      	extra arguments given to the library matmul function, and give
      	them to gfc_conv_function_call.
      	* invoke.texi: Add documentation for -fexternal-blas and
      	-fblas-matmul-limit.
      
      	* m4/matmul.m4: Add possible call to gemm routine.
      	* generated/matmul_r8.c: Regenerate.
      	* generated/matmul_r16.c: Regenerate.
      	* generated/matmul_c8.c: Regenerate.
      	* generated/matmul_i8.c: Regenerate.
      	* generated/matmul_c16.c: Regenerate.
      	* generated/matmul_r10.c: Regenerate.
      	* generated/matmul_r4.c: Regenerate.
      	* generated/matmul_c10.c: Regenerate.
      	* generated/matmul_c4.c: Regenerate.
      	* generated/matmul_i4.c: Regenerate.
      	* generated/matmul_i16.c: Regenerate.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117948 138bc75d-0d04-0410-961f-82ee72b054a4
      4e8e57b0
  15. 19 Oct, 2006 1 commit
    • pault's avatar
      2006-10-19 Paul Thomas <pault@gcc.gnu.org> · b9cd8c56
      pault authored
      	PR fortran/29216
      	PR fortran/29314
      	* gfortran.h : Add EXEC_INIT_ASSIGN.
      	* dump-parse-tree.c (gfc_show_code_node): The same.
      	* trans-openmp.c (gfc_trans_omp_array_reduction): Set new
      	argument for gfc_trans_assignment to false.
      	* trans-stmt.c (gfc_trans_forall_1): The same.
      	* trans-expr.c (gfc_conv_function_call, gfc_trans_assign,
      	gfc_trans_arrayfunc_assign, gfc_trans_assignment): The
      	same. In the latter function, use the new flag to stop
      	the checking of the lhs for deallocation.
      	(gfc_trans_init_assign): New function.
      	* trans-stmt.h : Add prototype for gfc_trans_init_assign.
      	* trans.c (gfc_trans_code): Implement EXEC_INIT_ASSIGN.
      	* trans.h : Add new boolean argument to the prototype of
      	gfc_trans_assignment.
      	* resolve.c (resolve_allocate_exp): Replace EXEC_ASSIGN by
      	EXEC_INIT_ASSIGN.
      	(resolve_code): EXEC_INIT_ASSIGN does not need resolution.
      	(apply_default_init): New function.
      	(resolve_symbol): Call it for derived types that become
      	defined but ...
      b9cd8c56
  16. 14 Oct, 2006 1 commit
  17. 13 Oct, 2006 1 commit
    • pault's avatar
      2006-10-13 Paul Thomas <pault@gcc.gnu.org> · 540338c6
      pault authored
      	PR fortran/29373
      	* decl.c (get_proc_name, gfc_match_function_decl): Add
      	attr.implicit_type to conditions that throw error for
      	existing explicit interface and that allow new type-
      	spec to be applied.
      
      	PR fortran/29407
      	* resolve.c (resolve_fl_namelist): Do not check for
      	namelist/procedure conflict, if the symbol corresponds
      	to a good local variable declaration.
      
      	PR fortran/27701
      	* decl.c (get_proc_name): Replace the detection of a declared
      	procedure by the presence of a formal argument list by the
      	attributes of the symbol and the presence of an explicit
      	interface.
      
      	PR fortran/29232
      	* resolve.c (resolve_fl_variable): See if the host association
      	of a derived type is blocked by the presence of another type I
      	object in the current namespace.
      
      	PR fortran/29364
      	* resolve.c (resolve_fl_derived): Check for the presence of
      	the derived type for a derived type component.
      
      	PR fortran/24398
      	* module.c (gfc_use_module): Check that the first words in a
      	module file are 'GFORTRAN module'.
      
      	PR fortran/29422
      	* resolve.c (resolve_transfer): Test functions for suitability
      	for IO, as well as variables.
      
      	PR fortran/29428
      	* trans-expr.c (gfc_trans_scalar_assign): Remove nullify of
      	rhs expression.
      
      
      2006-10-13 Paul Thomas <pault@gcc.gnu.org>
      
      	PR fortran/29373
      	* gfortran.dg/implicit_9.f90: New test.
      
      	PR fortran/29407
      	* gfortran.dg/namelist_25.f90: New test.
      
      	PR fortran/27701
      	* gfortran.dg/same_name_2.f90: New test.
      
      	PR fortran/29232
      	* gfortran.dg/host_assoc_types_1.f90: New test.
      
      	PR fortran/29364
      	* gfortran.dg/missing_derived_type_1.f90: New test.
      	* gfortran.dg/implicit_actual.f90: Comment out USE GLOBAL.
      
      	PR fortran/29422
      	* gfortran.dg/alloc_comp_constraint_4.f90: New test.
      
      	PR fortran/29428
      	* gfortran.dg/alloc_comp_assign_5.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117692 138bc75d-0d04-0410-961f-82ee72b054a4
      540338c6
  18. 08 Oct, 2006 1 commit
    • pault's avatar
      2006-10-05 Erik Edelmann <edelmann@gcc.gnu.org> · 2294b616
      pault authored
      	    Paul Thomas <pault@gcc.gnu.org>
      
      	PR fortran/20541
      	* interface.c (gfc_compare_derived_types): Add comparison of
      	the allocatable field.
      	* intrinsic.c (add_subroutines): Add MOVE_ALLOC.
      	* trans-expr.c (gfc_conv_aliased_arg, gfc_trans_subarray_assign,
      	gfc_trans_subcomponent_assign, gfc_conv_string_parameter,
      	gfc_trans_scalar_assign): Add extra arguments l_is_temp
      	and r_is_var to references to latter function.
      	(gfc_conv_function_call): Add enum for types of argument and
      	an associated variable parm_kind. Deallocate components of
      	INTENT(OUT) and non-variable arrays.
      	(gfc_trans_subcomponent_assign): Add block to assign arrays
      	to allocatable components.
      	(gfc_trans_scalar_assign): Add block to handle assignments of
      	derived types with allocatable components, using the above new
      	arguments to control allocation/deallocation of memory and the
      	copying of allocated arrays.
      	* trans-array.c (gfc_array_allocate): Remove old identification 
      	of pointer and replace with that of an allocatable array. Add
      	nullify of structures with allocatable components. 
      	(gfc_conv_array_initializer): Treat EXPR_NULL.
      	(gfc_conv_array_parameter): Deallocate allocatable components
      	of non-variable structures.
      	(gfc_trans_dealloc_allocated): Use second argument of library
      	deallocate to inhibit, without error, freeing NULL pointers.
      	(get_full_array_size): New function to return the size of a
      	full array.
      	(gfc_duplicate_allocatable): New function to allocate and copy
      	allocated data.
      	(structure_alloc_comps): New recursive function to deallocate,
      	nullify or copy allocatable components.
      	(gfc_nullify_alloc_comp, gfc_deallocate_alloc_comp,
      	gfc_copy_alloc_comp): New interface functions to call previous.
      	(gfc_trans_deferred_array): Add the code to nullify allocatable
      	components, when entering scope, and to deallocate them on
      	leaving. Do not call gfc_trans_static_array_pointer and return
      	for structures with allocatable components and default
      	initializers.
      	* symbol.c (gfc_set_component_attr): Set allocatable field.
      	(gfc_get_component_attr): Set the allocatable attribute.
      	* intrinsic.h : Prototype for gfc_check_move_alloc.
      	* decl.c (build_struct): Apply TR15581 constraints for
      	allocatable components.
      	(variable_decl): Default initializer is always NULL for
      	allocatable components.
      	(match_attr_spec): Allow, or not, allocatable components,
      	according to the standard in force.
      	* trans-array.h : Prototypes for gfc_nullify_alloc_comp,
      	gfc_deallocate_alloc_comp, gfc_copy_alloc_comp and
      	gfc_duplicate_allocatable.
      	* gfortran.texi : Add mention of TR15581 extensions.
      	* gfortran.h : Add attribute alloc_comp, add
      	gfc_components field allocatable and add the prototype
      	for gfc_expr_to_initialize.
      	* trans-stmt.c (generate_loop_for_temp_to_lhs,
      	generate_loop_for_rhs_to_temp, gfc_trans_where_assign,
      	gfc_trans_where_3): Add extra arguments to calls to
      	gfc_trans_scalar_assign and set appropriately.
      	(gfc_trans_allocate): Nullify allocatable components.
      	(gfc_trans_deallocate): Deallocate to ultimate allocatable
      	components but stop at ultimate pointer components.
      	* module.c (mio_symbol_attribute, mio_symbol_attribute,
      	mio_component): Add module support for allocatable
      	components.
      	* trans-types.c (gfc_get_derived_type): Treat allocatable
      	components.
      	* trans.h : Add two boolean arguments to
      	gfc_trans_scalar_assign.
      	* resolve.c (resolve_structure_cons): Check conformance of
      	constructor element and the component.
      	(resolve_allocate_expr): Add expression to nullify the
      	constructor expression for allocatable components.
      	(resolve_transfer): Inhibit I/O of derived types with
      	allocatable components.
      	(resolve_fl_derived): Skip check of bounds of allocatable
      	components.
      	* trans-decl.c (gfc_get_symbol_decl): Add derived types
      	with allocatable components to deferred variable.
      	(gfc_trans_deferred_vars): Make calls for derived types
      	with allocatable components to gfc_trans_deferred_array.
      	(gfc_generate_function_code): Nullify allocatable
      	component function result on entry.
      	* parse.c (parse_derived): Set symbol attr.allocatable if
      	allocatable components are present.
      	* check.c (gfc_check_allocated): Enforce attr.allocatable
      	for intrinsic arguments.
      	(gfc_check_move_alloc): Check arguments of move_alloc.
      	* primary.c (gfc_variable_attr): Set allocatable attribute.
      	* intrinsic.texi : Add index entry and section for
      	for move_alloc.
      
      	PR fortran/29115
      	* resolve.c (resolve_structure_cons): It is an error if the
      	pointer component elements of a derived type constructor are
      	not pointer or target.
      
      
      	PR fortran/29211
      	* trans-stmt.c (generate_loop_for_temp_to_lhs,
      	generate_loop_for_rhs_to_temp): Provide a string length for
      	the temporary by copying that of the other side of the scalar
      	assignment.
      
      
      2006-10-05  Paul Thomas  <pault@gcc.gnu.org>
      	    Erik Edelmann  <edelmann@gcc.gnu.org>
      
      	PR libgfortran/20541
      	* Makefile.in : Add move_alloc.
      	* intrinsics/move_alloc.c: New function.
      	* Makefile.am : Add move_alloc.
      
      
      
      2006-10-05  Erik Edelmann  <edelmann@gcc.gnu.org>
      	    Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/20541
      	* gfortran.dg/alloc_comp_basics_1.f90: New test.
      	* gfortran.dg/alloc_comp_basics_2.f90: New test.
      	* gfortran.dg/alloc_comp_assign_1.f90: New test.
      	* gfortran.dg/alloc_comp_assign_2.f90: New test.
      	* gfortran.dg/alloc_comp_assign_3.f90: New test.
      	* gfortran.dg/alloc_comp_assign_4.f90: New test.
      	* gfortran.dg/alloc_comp_constraint_1.f90: New test.
      	* gfortran.dg/alloc_comp_constraint_2.f90: New test.
      	* gfortran.dg/alloc_comp_constraint_3.f90: New test.
      	* gfortran.dg/alloc_comp_constructor_1.f90: New test.
      	* gfortran.dg/alloc_comp_constructor_2.f90: New test.
      	* gfortran.dg/alloc_comp_initializer_1.f90: New test.
      	* gfortran.dg/alloc_comp_std.f90: New test.
      	* gfortran.dg/move_alloc.f90: New test.
      
      	PR fortran/29115
      	* gfortran.dg/derived_constructor_comps_2.f90: New test.
      
      	PR fortran/29211
      	* gfortran.dg/forall_char_dependencies_1.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117558 138bc75d-0d04-0410-961f-82ee72b054a4
      2294b616
  19. 03 Oct, 2006 1 commit
    • pault's avatar
      2006-10-03 Paul Thomas <pault@gcc.gnu.org> · d45fced7
      pault authored
      	PR fortran/29284
      	PR fortran/29321
      	PR fortran/29322
      	* trans-expr.c (gfc_conv_function_call): Check the expression
      	and the formal symbol are present when testing the actual
      	argument.
      
      	PR fortran/25091
      	PR fortran/25092
      	* resolve.c (resolve_entries): It is an error if the entries
      	of an array-valued function do not have the same shape.
      
      2006-10-03  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/29284
      	* gfortran.dg/optional_assumed_charlen_1.f90: New test.
      
      	PR fortran/29321
      	PR fortran/29322
      	* gfortran.dg/missing_optional_dummy_2.f90: New test.
      
      	PR fortran/25091
      	PR fortran/25092
      	* gfortran.dg/entry_array_specs_1.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117413 138bc75d-0d04-0410-961f-82ee72b054a4
      d45fced7
  20. 13 Sep, 2006 1 commit
  21. 11 Sep, 2006 1 commit
    • pault's avatar
      2006-09-11 Paul Thomas <pault@gcc.gnu.org> · cce7ac71
      pault authored
      	PR fortran/28890
      	trans-expr.c (gfc_conv_function_call): Obtain the string length
      	of a dummy character(*) function from the symbol if it is not
      	already translated.  For a call to a character(*) function, use
      	the passed, hidden string length argument, which is available
      	from the backend_decl of the formal argument.
      	resolve.c (resolve_function): It is an error if a function call
      	to a character(*) function is other than a dummy procedure or
      	an intrinsic.
      
      2006-09-11  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR libfortran/28890
      	gfortran.dg/assumed_charlen_function_5.f90: New test.
      
      
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116839 138bc75d-0d04-0410-961f-82ee72b054a4
      cce7ac71
  22. 30 Aug, 2006 1 commit
    • pault's avatar
      2006-08-30 Paul Thomas <pault@gcc.gnu.org> · e8325fb3
      pault authored
      	PR fortran/28885
      	REGRESSION FIX
      	* trans-expr.c (gfc_conv_aliased_arg): Ensure that the temp
      	declaration is retained for INTENT(OUT) arguments.
      
      	PR fortran/28873
      	REGRESSION FIX
      	PR fortran/20067
      	* resolve.c (resolve_generic_f): Make error message more
      	comprehensible.
      	(resolve_generic_s): Restructure search for specific procedures
      	to be similar to resolve_generic_f and change to similar error
      	message.  Ensure that symbol reference is refreshed, in case
      	the search produces a NULL.
      	(resolve_specific_s): Restructure search, as above and as
      	resolve_specific_f. Ensure that symbol reference is refreshed,
      	in case the search produces a NULL.
      
      	PR fortran/25077
      	PR fortran/25102
      	* interface.c (check_operator_interface): Throw error if the
      	interface assignment tries to change intrinsic type assigments
      	or has less than two arguments.  Also, it is an error if an
      	interface operator contains an alternate return.
      
      	PR fortran/24866
      	* parse.c (gfc_fixup_sibling_symbols): Do not modify the symbol
      	if it is a dummy in the contained namespace.
      
      
      2006-08-30  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/28885
      	* gfortran.dg/aliasing_dummy_2.f90: New test.
      
      	PR fortran/20067
      	* gfortran.dg/generic_5.f90: Change error message.
      
      	PR fortran/28873
      	* gfortran.dg/generic_6.f90: New test.
      
      	PR fortran/25077
      	* gfortran.dg/redefined_intrinsic_assignment.f90: New test.
      
      	PR fortran/25102
      	* gfortran.dg/invalid_interface_assignment.f90: New test.
      
      	PR fortran/24866
      	* gfortran.dg/module_proc_external_dummy.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116578 138bc75d-0d04-0410-961f-82ee72b054a4
      e8325fb3
  23. 20 Aug, 2006 1 commit
    • pault's avatar
      2006-08-20 Paul Thomas <pault@gcc.gnu.org> · d95efb59
      pault authored
      	PR fortran/28601
      	PR fortran/28630
      	* gfortran.h : Eliminate gfc_dt_list structure and reference
      	to it in gfc_namespace.
      	* resolve.c (resolve_fl_derived): Remove the building of the
      	list of derived types for the current namespace.
      	* symbol.c (find_renamed_type): New function to find renamed
      	derived types by symbol name rather than symtree name.
      	(gfc_use_derived): Search parent namespace for identical
      	derived type and use it, even if local version is complete,
      	except in interface bodies. Ensure that renamed derived types
      	are found by call to find_renamed_type. Recurse for derived
      	type components.
      	(gfc_free_dt_list): Remove.
      	(gfc_free_namespace): Remove call to previous.
      	* trans-types.c (copy_dt_decls_ifequal): Remove.
      	(gfc_get_derived_type): Remove all the paraphenalia for
      	association of derived types, including calls to previous.
      	* match.c (gfc_match_allocate): Call gfc_use_derived to
      	associate any derived types that are being allocated.
      
      	PR fortran/20886
      	* resolve.c (resolve_actual_arglist): The passing of
      	a generic procedure name as an actual argument is an
      	error.
      
      	PR fortran/28735
      	* resolve.c (resolve_variable): Check for a symtree before
      	resolving references.
      
      	PR fortran/28762
      	* primary.c (match_variable): Return MATCH_NO if the symbol
      	is that of the program.
      
      	PR fortran/28425
      	* trans-expr.c (gfc_trans_subcomponent_assign): Translate
      	derived type component expressions other than another derived
      	type constructor.
      
      	PR fortran/28496
      	* expr.c (find_array_section): Correct errors in
      	the handling of a missing start value for the
      	index triplet in an array reference.
      
      	PR fortran/18111
      	* trans-decl.c (gfc_build_dummy_array_decl): Before resetting
      	reference to backend_decl, set it DECL_ARTIFICIAL.
      	(gfc_get_symbol_decl): Likewise for original dummy decl, when
      	a copy is made of an array.
      	(create_function_arglist): Likewise for the _entry paramter
      	in entry_masters.
      	(build_entry_thunks): Likewise for dummies in entry thunks.
      
      	PR fortran/28600
      	* trans-decl.c (gfc_get_symbol_decl): Ensure that the
      	DECL_CONTEXT of the length of a character dummy is the
      	same as that of the symbol declaration.
      
      	PR fortran/28771
      	* decl.c (add_init_expr_to_sym): Remove setting of charlen for
      	an initializer of an assumed charlen variable.
      
      	PR fortran/28660
      	* trans-decl.c (generate_expr_decls): New function.
      	(generate_dependency_declarations): New function.
      	(generate_local_decl): Call previous if not either a dummy or
      	a declaration in an entry master.
      
      2006-08-20 Paul Thomas <pault@gcc.gnu.org>
      
      	PR fortran/28630
      	* gfortran.dg/used_types_2.f90: New test.
      
      	PR fortran/28601
      	* gfortran.dg/used_types_3.f90: New test.
      
      	PR fortran/20886
      	* gfortran.dg/generic_actual_arg.f90: New test.
      
      	PR fortran/28735
      	* gfortran.dg/module_private_array_refs_1.f90: New test.
      
      	PR fortran/28762
      	* gfortran.dg/program_name_1.f90: New test.
      
      	PR fortran/28425
      	* gfortran.dg/derived_constructor_comps_1.f90: New test.
      
      	PR fortran/28496
      	* gfortran.dg/array_initializer_2.f90: New test.
      
      	PR fortran/18111
      	* gfortran.dg/unused_artificial_dummies_1.f90: New test. 
      
      	PR fortran/28600
      	* gfortran.dg/assumed_charlen_function_4.f90: New test.
      
      	PR fortran/28771
      	* gfortran.dg/assumed_charlen_in_main.f90: New test.
      
      	PR fortran/28660
      	* gfortran.dg/dependent_decls_1.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116268 138bc75d-0d04-0410-961f-82ee72b054a4
      d95efb59
  24. 19 Aug, 2006 1 commit
    • eedelman's avatar
      fortran/ · 46643105
      eedelman authored
      2006-08-19  Erik Edelmann  <eedelman@gcc.gnu.org>
      
              PR fortran/25217
              * resolve.c (resolve_fl_variable): Set a default initializer for
              derived types with INTENT(OUT) even if 'flag' is true.
              * trans-expr.c (gfc_conv_function_call): Insert code to
              reinitialize INTENT(OUT) arguments of derived type with default
              initializers.
      
      
      testsuite/
      2006-08-19  Erik Edelmann  <eedelman@gcc.gnu.org>
      
              PR fortran/25217
              * gfortran.dg/derived_init_2.f90: New.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116261 138bc75d-0d04-0410-961f-82ee72b054a4
      46643105
  25. 15 Jul, 2006 1 commit
  26. 13 Jul, 2006 1 commit
    • pault's avatar
      2006-07-13 Paul Thomas <pault@gcc.gnu.org> · b8a51d79
      pault authored
      	PR fortran/28174
      	* trans-expr.c (gfc_conv_aliased_arg): Missing formal arg means
      	that intent is INOUT (fixes regression).
      
      	PR fortran/25097
      	* check.c (check_present): The only permitted reference is a
      	full array reference.
      
      	PR fortran/20903
      	* decl.c (variable_decl): Add error if a derived type is not
      	from the current namespace if the namespace is an interface
      	body.
      
      2006-07-13  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/25097
      	* gfortran.dg/present_1.f90: New test.
      
      	PR fortran/20903
      	* gfortran.dg/interface_derived_type_1.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115410 138bc75d-0d04-0410-961f-82ee72b054a4
      b8a51d79
  27. 12 Jul, 2006 1 commit
    • fxcoudert's avatar
      PR fortran/28163 · 59b9dcbd
      fxcoudert authored
      	* trans-expr.c (gfc_trans_string_copy): Generate inline code
      	to perform string copying instead of calling a library function.
      	* trans-decl.c (gfc_build_intrinsic_function_decls): Don't build
      	decl for copy_string.
      	* trans.h (gfor_fndecl_copy_string): Remove prototype.
      
      	* intrinsics/string_intrinsics.c (copy_string): Remove function.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115372 138bc75d-0d04-0410-961f-82ee72b054a4
      59b9dcbd
  28. 04 Jul, 2006 1 commit
    • pault's avatar
      2006-07-04 Paul Thomas <pault@gcc.gnu.org> · 35d9c496
      pault authored
      	PR fortran/28174
      	* trans-array.c (gfc_conv_expr_descriptor): When building temp,
      	ensure that the substring reference uses a new charlen.
      	* trans-expr.c (gfc_conv_aliased_arg): Add the formal intent to
      	the argument list, lift the treatment of missing string lengths
      	from the above and implement the use of the intent.
      	(gfc_conv_function_call): Add the extra argument to the call to
      	the above.
      
      	PR fortran/28167
      	* trans-array.c (get_array_ctor_var_strlen): Treat a constant
      	substring reference.
      	* array.c (gfc_resolve_character_array_constructor): Remove 
      	static attribute and add the gfc_ prefix, make use of element
      	charlens for the expression and pick up constant string lengths
      	for expressions that are not themselves constant.
      	* gfortran.h : resolve_character_array_constructor prototype
      	added.
      	* resolve.c (gfc_resolve_expr): Call resolve_character_array_
      	constructor again after expanding the constructor, to ensure
      	that the character length is passed to the expression.
      
      2006-07-04  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/28174
      	* gfortran.dg/actual_array_substr_2.f90: New test.
      
      	PR fortran/28167
      	* gfortran.dg/actual_array_constructor_2.f90: New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115182 138bc75d-0d04-0410-961f-82ee72b054a4
      35d9c496
  29. 21 Jun, 2006 1 commit
  30. 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
  31. 09 Jun, 2006 1 commit
    • pault's avatar
      2006-06-10 Paul Thomas <pault@gcc.gnu.org> · d77f260f
      pault authored
      	PR fortran/24558
      	PR fortran/20877
      	PR fortran/25047
      	* decl.c (get_proc_name): Add new argument to flag that a
      	module function entry is being treated. If true, correct
      	error condition, add symtree to module namespace and add
      	a module procedure.
      	(gfc_match_function_decl, gfc_match_entry,
      	gfc_match_subroutine): Use the new argument in calls to
      	get_proc_name.
      	* resolve.c (resolve_entries): ENTRY symbol reference to
      	to master entry namespace if a module function.
      	* trans-decl.c (gfc_create_module_variable): Return if
      	the symbol is an entry.
      	* trans-exp.c (gfc_conv_variable): Check that parent_decl
      	is not NULL.
      
      2006-06-10  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/24558
      	* gfortran.dg/entry_6.f90: New test.
      
      	PR fortran/20877
      	PR fortran/25047
      	* gfortran.dg/entry_7.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114526 138bc75d-0d04-0410-961f-82ee72b054a4
      d77f260f
  32. 08 Jun, 2006 1 commit
    • fxcoudert's avatar
      PR fortran/27958 · 2810b378
      fxcoudert authored
      	* trans-expr.c (gfc_conv_substring): If the substring start is
      	greater than its end, the length of the substring is zero, and
      	not negative.
      	(gfc_trans_string_copy): Don't generate a call to
      	_gfortran_copy_string when destination length is zero.
      
      	* gcc/testsuite/gfortran.dg/substr_2.f: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114496 138bc75d-0d04-0410-961f-82ee72b054a4
      2810b378
  33. 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
  34. 30 May, 2006 1 commit
    • kargl's avatar
      2006-05-30 Asher Langton <langton2@llnl.gov> · a7c1e504
      kargl authored
      	* symbol.c (check_conflict): Allow external, function, and
      	subroutine attributes with Cray pointees.
      	* trans-expr.c (gfc_conv_function_val): Translate Cray pointees
      	that point to procedures.
      	* gfortran.texi: Document new feature.
      
      	* gfortran.dg/cray_pointers_7.f90: New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114252 138bc75d-0d04-0410-961f-82ee72b054a4
      a7c1e504
  35. 20 May, 2006 1 commit
    • hjl's avatar
      gcc/fortran/ · 97f99a6c
      hjl authored
      2006-05-19  H.J. Lu  <hongjiu.lu@intel.com>
      
      	PR fortran/27662
      	* trans-array.c (gfc_conv_expr_descriptor): Don't zere the
      	first stride to indicate a temporary.
      	* trans-expr.c (gfc_conv_function_call): Likewise.
      
      gcc/testsuite/
      
      2006-05-19  H.J. Lu  <hongjiu.lu@intel.com>
      
      	PR fortran/27662
      	* gfortran.dg/temporary_1.f90: New file.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113922 138bc75d-0d04-0410-961f-82ee72b054a4
      97f99a6c
  36. 16 Apr, 2006 1 commit
    • pault's avatar
      2006-04-16 Paul Thomas <pault@gcc.gnu.org> · 10b07432
      pault authored
      	PR fortran/26822
      	* intrinsic.c (add_functions): Mark LOGICAL as elemental.
      
      	PR fortran/26787
      	* expr.c (gfc_check_assign): Extend scope of error to include
      	assignments to a procedure in the main program or, from a
      	module or internal procedure that is not that represented by
      	the lhs symbol. Use VARIABLE rather than l-value in message.
      
      	PR fortran/27096
      	* trans-array.c (gfc_trans_deferred_array): If the backend_decl
      	is not a descriptor, dereference and then test and use the type.
      
      	PR fortran/25597
      	* trans-decl.c (gfc_trans_deferred_vars): Check if an array
      	result, is also automatic character length.  If so, process
      	the character length.
      
      	PR fortran/18803
      	PR fortran/25669
      	PR fortran/26834
      	* trans_intrinsic.c (gfc_walk_intrinsic_bound): Set
      	data.info.dimen for bound intrinsics.
      	* trans_array.c (gfc_conv_ss_startstride): Pick out LBOUND and
      	UBOUND intrinsics and supply their shape information to the ss
      	and the loop.
      
      	PR fortran/27124
      	* trans_expr.c (gfc_trans_function_call):  Add a new block, post,
      	in to which all the argument post blocks are put.  Add this block
      	to se->pre after a byref call or to se->post, otherwise.
      
      2006-04-16  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/26787
      	* gfortran.dg/proc_assign_1.f90: New test.
      	* gfortran.dg/procedure_lvalue.f90: Change message.
      	* gfortran.dg/namelist_4.f90: Add new error.
      
      	PR fortran/27096
      	* gfortran.dg/auto_pointer_array_result_1.f90
      
      	PR fortran/27089
      	* gfortran.dg/specification_type_resolution_1.f90
      
      	PR fortran/18803
      	PR fortran/25669
      	PR fortran/26834
      	* gfortran.dg/bounds_temporaries_1.f90: New test.
      
      	PR fortran/27124
      	* gfortran.dg/array_return_value_1.f90: New test.
      
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112981 138bc75d-0d04-0410-961f-82ee72b054a4
      10b07432
  37. 08 Apr, 2006 1 commit
  38. 03 Apr, 2006 1 commit
    • pault's avatar
      2006-04-03 Paul Thomas <pault@gcc.gnu.org> · bd24f178
      pault authored
      	PR fortran/26981
      	* trans.h : Prototype for gfc_conv_missing_dummy.
      	* trans-expr (gfc_conv_missing_dummy): New function
      	(gfc_conv_function_call): Call it and tidy up some of the code.
      	* trans-intrinsic (gfc_conv_intrinsic_function_args): The same.
      
      	PR fortran/26976
      	* array.c (gfc_array_dimen_size): If available, return shape[dimen].
      	* resolve.c (resolve_function): If available, use the argument shape for the
      	function expression.
      	* iresolve.c (gfc_resolve_transfer): Set shape[0] = size.
      
      2006-04-03  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/26981
      	* gfortran.dg/missing_optional_dummy_1.f90: New test.
      
      	PR fortran/26976
      	* gfortran.dg/compliant_elemental_intrinsics_1.f90: New test.
      	* gfortran.dg/initialization_1.f90: Make assignment compliant.
      	* gfortran.dg/transfer_array_intrinsic_1.f90: Simplify.
      	* gfortran.dg/transfer_array_intrinsic_2.f90: Make assignments compliant and detect
      	bigendian-ness.
      
      
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112634 138bc75d-0d04-0410-961f-82ee72b054a4
      bd24f178
  39. 02 Apr, 2006 1 commit
    • eedelman's avatar
      2006-04-02 Erik Edelmann <eedelman@gcc.gnu.org> · f135d1ce
      eedelman authored
              * trans-array.c (gfc_trans_dealloc_allocated): Take a
              tree representation of the array to be deallocated as argument
              instead of its gfc_symbol.
              (gfc_trans_deferred_array): Update call to
              gfc_trans_dealloc_allocated.
              * trans-array.h (gfc_trans_dealloc_allocated): Update prototype.
              * trans-expr.c (gfc_conv_function_call): Update call to
              gfc_trans_dealloc_allocated, get indirect reference to dummy
              arguments.
      
      
      2006-04-02  Erik Edelmann  <eedelman@gcc.gnu.org>
      
              * gfortran.dg/allocatable_dummy_1.f90: Also check that allocatable
              dummy arguments work when the actual argument is itself a dummy
              argument of the caller.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112625 138bc75d-0d04-0410-961f-82ee72b054a4
      f135d1ce
  40. 13 Mar, 2006 1 commit