1. 05 Feb, 2010 1 commit
    • pault's avatar
      2010-02-05 Paul Thomas <pault@gcc.gnu.org> · 3446c28b
      pault authored
      	PR fortran/42309
      	* trans-expr.c (gfc_conv_subref_array_arg): Add new argument
      	'formal_ptr'. If this is true, give returned descriptor unity
      	lbounds, in all dimensions, and the appropriate offset.
      	(gfc_conv_procedure_call); If formal is a pointer, set the last
      	argument of gfc_conv_subref_array_arg to true.
      	* trans.h : Add last argument for gfc_conv_subref_array_arg.
      	* trans-io.c (set_internal_unit, gfc_trans_transfer): Set the
      	new arg of gfc_conv_subref_array_arg to false.
      	* trans-stmt.c (forall_make_variable_temp): The same.
      
      2010-02-05  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/42309
      	* gfortran.dg/subref_array_pointer_4.f90 : New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156512 138bc75d-0d04-0410-961f-82ee72b054a4
      3446c28b
  2. 31 Jan, 2010 2 commits
    • janus's avatar
      gcc/fortran/ · dba1636b
      janus authored
      2010-01-31  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/42888
      	* resolve.c (resolve_allocate_expr): Move default initialization code
      	here from gfc_trans_allocate.
      	* trans.c (gfc_trans_code): Call gfc_trans_class_assign also for
      	EXEC_INIT_ASSIGN.
      	* trans-expr.c (gfc_trans_class_assign): Handle default initialization
      	of CLASS variables via memcpy.
      	* trans-stmt.c (gfc_trans_allocate): Move default initialization code
      	to resolve_allocate_expr.
      
      gcc/testsuite/
      2010-01-31  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/42888
      	* gfortran.dg/allocate_derived_2.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156418 138bc75d-0d04-0410-961f-82ee72b054a4
      dba1636b
    • pault's avatar
      2010-01-31 Paul Thomas <pault@gcc.gnu.org> · ffc91ac1
      pault authored
              PR fortran/38324
      	* expr.c (gfc_get_full_arrayspec_from_expr): New function.
      	* gfortran.h : Add prototype for above.
              * trans-expr.c (gfc_trans_alloc_subarray_assign): New function.
      	(gfc_trans_subcomponent_assign): Call new function to replace
      	the code to deal with allocatable components.
      	* trans-intrinsic.c (gfc_conv_intrinsic_bound): Call
      	gfc_get_full_arrayspec_from_expr to replace existing code.
      
      2010-01-31  Paul Thomas  <pault@gcc.gnu.org>
      
              PR fortran/38324
              * gfortran.dg/alloc_comp_basics_1.f90: Remove option -O2.
              * gfortran.dg/alloc_comp_bounds_1.f90: New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156399 138bc75d-0d04-0410-961f-82ee72b054a4
      ffc91ac1
  3. 14 Jan, 2010 1 commit
    • pault's avatar
      2010-01-14 Paul Thomas <pault@gcc.gnu.org> · 64a8f98f
      pault authored
              PR fortran/41478
              * trans-array.c (duplicate_allocatable):  Static version of
      	gfc_duplicate_allocatable with provision to handle scalar
      	components. New boolean argument to switch off call to malloc
      	if true.
      	(gfc_duplicate_allocatable): New function to call above with
      	new argument false.
      	(gfc_copy_allocatable_data): New function to call above with
      	new argument true.
      	(structure_alloc_comps): Do not apply indirect reference to
      	scalar pointers. Add new section to copy allocatable components
      	of arrays. Extend copying of allocatable components to include
      	scalars.
      	(gfc_copy_only_alloc_comp): New function to copy allocatable
      	component derived types, without allocating the base structure.
      	* trans-array.h : Add primitive for gfc_copy_allocatable_data.
      	Add primitive for gfc_copy_only_alloc_comp.
      	* trans-expr.c (gfc_conv_procedure_call): After calls to
      	transformational functions with results that are derived types
      	with allocatable components, copy the components in the result.
      	(gfc_trans_arrayfunc_assign): Deallocate allocatable components
      	of lhs derived types before allocation.
      	
      
      2010-01-14  Paul Thomas  <pault@gcc.gnu.org>
      
              PR fortran/41478
              * gfortran.dg/alloc_comp_scalar_1.f90: New test.
              * gfortran.dg/alloc_comp_transformational_1.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155877 138bc75d-0d04-0410-961f-82ee72b054a4
      64a8f98f
  4. 09 Jan, 2010 1 commit
    • burnus's avatar
      2010-01-09 Tobias Burnus <burnus@net-b.de> · 650ee6fb
      burnus authored
              PR fortran/41298
              * trans-expr.c (gfc_trans_structure_assign): Handle
              c_null_(fun)ptr.
              * symbol.c (gen_special_c_interop_ptr): Add NULL_EXPR
              to the constructor for c_null_(fun)ptr.
              * resolve.c (resolve_structure_cons): Add special case
              for c_null_(fun)ptr.
      
      2010-01-09  Tobias Burnus  <burnus@net-b.de>
      
              PR fortran/41298
              * gfortran.dg/c_ptr_tests_14.f90: New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155755 138bc75d-0d04-0410-961f-82ee72b054a4
      650ee6fb
  5. 05 Jan, 2010 1 commit
  6. 04 Jan, 2010 1 commit
    • burnus's avatar
      2009-01-04 Tobias Burnus <burnus@net-b.de> · 53169279
      burnus authored
              PR fortran/41872
              * trans-expr.c (gfc_conv_procedure_call): Add indirect ref
              for functions returning allocatable scalars.
              * trans-stmt.c (gfc_trans_allocate): Emmit error when
              reallocating an allocatable scalar.
              * trans.c (gfc_allocate_with_status): Fix pseudocode syntax
              in comment.
              * trans-decl.c (gfc_trans_deferred_vars): Nullify local
              allocatable scalars.
              (gfc_generate_function_code): Nullify result variable for
              allocatable scalars.
              
              PR fortran/40849
              * module.c (gfc_use_module): Fix warning string to allow
              for translation.
      
              PR fortran/42517
              * invoke.texi (-fcheck=recursion): Mention that the checking
              is also disabled for -frecursive.
              * trans-decl.c (gfc_generate_function_code): Disable
              -fcheck=recursion when -frecursive is used.
      
              * intrinsic.texi (iso_c_binding): Improve wording.
      
      2009-01-04  Tobias Burnus  <burnus@net-b.de>
      
              PR fortran/41872
              * gfortran.dg/allocatable_scalar_5.f90: New test.
              * gfortran.dg/allocatable_scalar_6.f90: New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155606 138bc75d-0d04-0410-961f-82ee72b054a4
      53169279
  7. 17 Dec, 2009 1 commit
    • janus's avatar
      gcc/fortran/ · 70f88196
      janus authored
      2009-12-17 Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/42144
      	* trans-expr.c (select_class_proc): Skip abstract base types.
      
      gcc/testsuite/
      2009-12-17  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/42144
      	* gfortran.dg/dynamic_dispatch_6.f03: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155305 138bc75d-0d04-0410-961f-82ee72b054a4
      70f88196
  8. 30 Nov, 2009 1 commit
    • janus's avatar
      merge from fortran-dev branch: · bdfbc762
      janus authored
      gcc/fortran/
      
      2009-11-30  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/42053
      	* resolve.c (resolve_select_type): Check for duplicate CLASS IS blocks.
      
      2009-11-30  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/41631
      	* decl.c (gfc_match_derived_decl): Set extension level.
      	* gfortran.h (symbol_attribute): Expand 'extension' bit field to 8 bit.
      	* iresolve.c (gfc_resolve_extends_type_of): Return value of
      	'is_extension_of' has kind=4.
      	* match.c (select_type_set_tmp,gfc_match_class_is): Create temporary
      	for CLASS IS blocks.
      	* module.c (MOD_VERSION): Bump module version.
      	(ab_attribute,attr_bits): Remove AB_EXTENSION.
      	(mio_symbol_attribute): Handle expanded 'extension' field.
      	* resolve.c (resolve_select_type): Implement CLASS IS blocks.
      	(resolve_fl_variable_derived): Show correct type name.
      	* symbol.c (gfc_build_class_symbol): Set extension level.
      
      2009-11-30  Janus Weil  <janus@gcc.gnu.org>
      
      	* intrinsic.h (gfc_resolve_extends_type_of): Add prototype.
      	* intrinsic.c (add_functions): Use 'gfc_resolve_extends_type_of'.
      	* iresolve.c (gfc_resolve_extends_type_of): New function, which
      	replaces the call to EXTENDS_TYPE_OF by the library function
      	'is_extension_of' and modifies the arguments.
      	* trans-intrinsic.c (gfc_conv_extends_type_of): Removed.
      	(gfc_conv_intrinsic_function): FOR EXTENDS_TYPE_OF, don't call
      	gfc_conv_extends_type_of but gfc_conv_intrinsic_funcall.
      
      2009-11-30  Paul Thomas  <pault@gcc.gnu.org>
      	    Janus Weil  <janus@gcc.gnu.org>
      
      	* decl.c (encapsulate_class_symbol): Replaced by
      	'gfc_build_class_symbol'.
      	(build_sym,build_struct): Call 'gfc_build_class_symbol'.
      	(gfc_match_derived_decl): Replace vindex by hash_value.
      	* dump-parse-tree.c (show_symbol): Replace vindex by hash_value.
      	* gfortran.h (symbol_attribute): Add field 'vtab'.
      	(gfc_symbol): Replace vindex by hash_value.
      	(gfc_class_esym_list): Ditto.
      	(gfc_get_derived_type,gfc_build_class_symbol,gfc_find_derived_vtab):
      	New prototypes.
      	* module.c (mio_symbol): Replace vindex by hash_value.
      	* resolve.c (vindex_expr): Rename to 'hash_value_expr'.
      	(resolve_class_compcall,resolve_class_typebound_call): Renamed
      	'vindex_expr'.
      	(resolve_select_type): Replace $vindex by $vptr->$hash.
      	* symbol.c (gfc_add_save): Handle vtab symbols.
      	(gfc_type_compatible): Rewrite.
      	(gfc_build_class_symbol): New function which replaces
      	'encapsulate_class_symbol'.
      	(gfc_find_derived_vtab): New function to set up a vtab symbol for a
      	derived type.
      	* trans-decl.c (gfc_create_module_variable): Handle vtab symbols.
      	* trans-expr.c (select_class_proc): Replace vindex by hash_value.
      	(gfc_conv_derived_to_class): New function to construct a temporary
      	CLASS variable from a derived type expression.
      	(gfc_conv_procedure_call): Call 'gfc_conv_derived_to_class'.
      	(gfc_conv_structure): Initialize the $extends and $size fields of
      	vtab symbols.
      	(gfc_trans_class_assign): Replace $vindex by $vptr. Remove the $size
      	assignment.
      	* trans-intrinsic.c (gfc_conv_same_type_as): Replace $vindex by
      	$vptr->$hash, and replace vindex by hash_value.
      	* trans-stmt.c (gfc_trans_allocate): Insert $vptr references, replace
      	$vindex by $vptr. Remove the $size assignment.
      	* trans-types.c (gfc_get_derived_type): Make it non-static.
      
      
      gcc/testsuite/
      
      2009-11-30  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/42053
      	* gfortran.dg/select_type_9.f03: New.
      
      2009-11-30  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/41631
      	* gfortran.dg/extends_type_of_1.f03: Fix invalid test case.
      	* gfortran.dg/module_md5_1.f90: Adjusted MD5 sum.
      	* gfortran.dg/select_type_1.f03: Remove FIXMEs.
      	* gfortran.dg/select_type_2.f03: Ditto.
      	* gfortran.dg/select_type_8.f03: New test.
      
      2009-11-30  Janus Weil  <janus@gcc.gnu.org>
      
      	* gfortran.dg/extends_type_of_1.f03: New test.
      	* gfortran.dg/same_type_as_1.f03: Extended.
      
      2009-11-30  Paul Thomas  <pault@gcc.gnu.org>
      
      	* gfortran.dg/class_4c.f03: Add dg-additional-sources.
      	* gfortran.dg/class_4d.f03: Rename module. Cleanup modules.
      
      
      libgfortran/
      
      2009-11-30  Janus Weil  <janus@gcc.gnu.org>
      
      	* gfortran.map: Add _gfortran_is_extension_of.
      	* Makefile.am: Add intrinsics/extends_type_of.c.
      	* Makefile.in: Regenerated.
      	* intrinsics/extends_type_of.c: New file. 
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154840 138bc75d-0d04-0410-961f-82ee72b054a4
      bdfbc762
  9. 28 Nov, 2009 1 commit
    • jakub's avatar
      * trans-common.c (create_common): Remove unused offset variable. · 66a56860
      jakub authored
      	* io.c (gfc_match_wait): Remove unused loc variable.
      	* trans-openmp.c (gfc_trans_omp_clauses): Remove unused old_clauses
      	variable.
      	(gfc_trans_omp_do): Remove unused outermost variable.
      	* iresolve.c (gfc_resolve_alarm_sub, gfc_resolve_fseek_sub): Remove
      	unused status variable.
      	* module.c (number_use_names): Remove unused c variable.
      	(load_derived_extensions): Remove unused nuse variable.
      	* trans-expr.c (gfc_conv_substring): Remove unused var variable.
      	* trans-types.c (gfc_get_array_descr_info): Remove unused offset_off
      	variable.
      	* matchexp.c (match_primary): Remove unused where variable.
      	* trans-intrinsic.c (gfc_conv_intrinsic_bound): Remove unused cond2
      	variable.
      	(gfc_conv_intrinsic_sizeof): Remove unused source variable.
      	(gfc_conv_intrinsic_transfer): Remove unused stride variable.
      	(gfc_conv_intrinsic_function): Remove unused isym variable.
      	* arith.c (gfc_hollerith2real, gfc_hollerith2complex,
      	gfc_hollerith2logical): Remo...
      66a56860
  10. 20 Nov, 2009 1 commit
    • pault's avatar
      2009-11-20 Paul Thomas <pault@gcc.gnu.org> · 7e74cd03
      pault authored
      	    Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/42104
      	* trans-expr.c (gfc_conv_procedure_call): If procedure pointer
      	component call, use the component's 'always_explicit' attr
      	for array arguments.
      
      2009-11-20  Paul Thomas  <pault@gcc.gnu.org>
      	    Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/42104
      	* gfortran.dg/proc_ptr_comp_23.f90 : New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154358 138bc75d-0d04-0410-961f-82ee72b054a4
      7e74cd03
  11. 19 Nov, 2009 1 commit
  12. 18 Nov, 2009 1 commit
  13. 03 Nov, 2009 1 commit
  14. 01 Nov, 2009 2 commits
    • burnus's avatar
      2009-11-01 Tobias Burnus <burnus@net-b.de> · 5176859a
      burnus authored
              PR fortran/41872
              * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
              autodeallocated allocatable scalars at the end of scope.
              (gfc_generate_function_code): Fix indention.
              * trans-expr.c (gfc_conv_procedure_call): For allocatable
              scalars, fix calling by reference and autodeallocating
              of intent out variables.
      
      2009-11-01  Tobias Burnus  <burnus@net-b.de>
      
              PR fortran/41872
              * gfortran.dg/allocatable_scalar_4.f90: New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153795 138bc75d-0d04-0410-961f-82ee72b054a4
      5176859a
    • burnus's avatar
      2009-11-01 Tobias Burnus <burnus@net-b.de> · d99419eb
      burnus authored
              PR fortran/41850
              * trans-expr.c (gfc_conv_procedure_call): Deallocate intent-out
              variables only when present. Remove unneccessary present check.
      
      2009-11-01  Tobias Burnus  <burnus@net-b.de>
      
              PR fortran/41850
              * gfortran.dg/intent_out_6.f90: New testcase.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153793 138bc75d-0d04-0410-961f-82ee72b054a4
      d99419eb
  15. 29 Oct, 2009 1 commit
    • burnus's avatar
      2009-10-29 Tobias Burnus <burnus@net-b.de> · 7035e057
      burnus authored
              PR fortran/41777
              * trans-expr.c
              * (gfc_conv_procedure_call,gfc_conv_expr_reference):
              Use for generic EXPR_FUNCTION the attributes of the specific
              function.
      
      2009-10-29  Tobias Burnus  <burnus@net-b.de>
      
              PR fortran/41777
              gfortran.dg/associated_target_3.f90: New testcase.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153706 138bc75d-0d04-0410-961f-82ee72b054a4
      7035e057
  16. 23 Oct, 2009 1 commit
  17. 19 Oct, 2009 1 commit
  18. 16 Oct, 2009 1 commit
    • pault's avatar
      2009-10-16 Paul Thomas <pault@gcc.gnu.org> · f3f303c6
      pault authored
      	PR fortran/41648
      	PR fortran/41656
      	* trans-expr.c (select_class_proc): Convert the expression for the
      	vindex, carried on the first member of the esym list.
      	* gfortran.h : Add the vindex field to the esym_list structure.
      	and eliminate the class_object field.
      	* resolve.c (check_class_members): Remove the setting of the
      	class_object field.
      	(vindex_expr): New function.
      	(get_class_from_expr): New function.
      	(resolve_class_compcall): Call the above to find the ultimate
      	class or derived component.  If derived, do not generate the
      	esym list.  Add and expression for the vindex to the esym list
      	by calling the above.
      	(resolve_class_typebound_call): The same.
      
      2009-10-16  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/41648
      	* gfortran.dg/dynamic_dispatch_4.f03 : New test.
      
      	PR fortran/41656
      	* gfortran.dg/dynamic_dispatch_5.f03 : New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152890 138bc75d-0d04-0410-961f-82ee72b054a4
      f3f303c6
  19. 13 Oct, 2009 1 commit
    • janus's avatar
      2009-10-13 Janus Weil <janus@gcc.gnu.org> · 39f3dea0
      janus authored
      	PR fortran/41581
      	* decl.c (encapsulate_class_symbol): Add new component '$size'.
      	* resolve.c (resolve_allocate_expr): Move CLASS handling to
      	gfc_trans_allocate.
      	(resolve_class_assign): Replaced by gfc_trans_class_assign.
      	(resolve_code): Remove calls to resolve_class_assign.
      	* trans.c (gfc_trans_code): Use new function gfc_trans_class_assign.
      	* trans-expr.c (get_proc_ptr_comp): Fix a memory leak.
      	(gfc_conv_procedure_call): For CLASS dummies, set the
      	$size component.
      	(gfc_trans_class_assign): New function, replacing resolve_class_assign.
      	* trans-stmt.h (gfc_trans_class_assign): New prototype.
      	* trans-stmt.c (gfc_trans_allocate): Use correct size when allocating
      	CLASS variables. Do proper initialization. Move some code here from
      	resolve_allocate_expr.
      
      
      2009-10-13  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/41581
      	* gfortran.dg/class_allocate_2.f03: Modified.
      	* gfortran.dg/class_allocate_3.f03: New test case.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152715 138bc75d-0d04-0410-961f-82ee72b054a4
      39f3dea0
  20. 05 Oct, 2009 1 commit
    • pault's avatar
      2009-10-05 Paul Thomas <pault@gcc.gnu.org> · d94c1385
      pault authored
      	* trans-expr.c (select_class_proc): New function.
      	(conv_function_val): Deal with class methods and call above.
      	* symbol.c (gfc_type_compatible): Treat case where both ts1 and
      	ts2 are BT_CLASS.
      	gfortran.h : Add structure gfc_class_esym_list and include in
      	the structure gfc_expr.
      	* module.c (load_derived_extensions): New function.
      	(read_module): Call above.
      	(write_dt_extensions): New function.
      	(write_derived_extensions): New function.
      	(write_module): Use the above.
      	* resolve.c (resolve_typebound_call): Add a function expression
      	for class methods.  This carries the chain of symbols for the
      	dynamic dispatch in select_class_proc.
      	(resolve_compcall): Add second, boolean argument to indicate if
      	a function is being handled.
      	(check_members): New function.
      	(check_class_members): New function.
      	(resolve_class_compcall): New function.
      	(resolve_class_typebound_call): New function.
      	(gfc_resolve_expr): Call above for component calls.. 
      
      2009-10-05  Paul Thomas  <pault@gcc.gnu.org>
      
      	* gfortran.dg/dynamic_dispatch_1.f90: New test.
      	* gfortran.dg/dynamic_dispatch_2.f90: New test.
      	* gfortran.dg/dynamic_dispatch_3.f90: New test.
      	* gfortran.dg/module_md5_1.f90: Update md5 sum.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152463 138bc75d-0d04-0410-961f-82ee72b054a4
      d94c1385
  21. 30 Sep, 2009 1 commit
    • burnus's avatar
      fortran/ · 1de1b1a9
      burnus authored
      2009-09-30  Janus Weil  <janus@gcc.gnu.org>
      
      	* check.c (gfc_check_same_type_as): New function for checking
      	SAME_TYPE_AS and EXTENDS_TYPE_OF.
      	* decl.c (encapsulate_class_symbol): Set ABSTRACT attribute for class
      	container, if the contained type has it. Add an initializer for the
      	class container.
      	(add_init_expr_to_sym): Handle BT_CLASS.
      	(vindex_counter): New counter for setting vindices.
      	(gfc_match_derived_decl): Set vindex for all derived types, not only
      	those which are being extended.
      	* expr.c (gfc_check_assign_symbol): Handle NULL initialization of class
      	pointers.
      	* gfortran.h (gfc_isym_id): New values GFC_ISYM_SAME_TYPE_AS and
      	GFC_ISYM_EXTENDS_TYPE_OF.
      	(gfc_type_is_extensible): New prototype.
      	* intrinsic.h (gfc_check_same_type_as): New prototype.
      	* intrinsic.c (add_functions): Add SAME_TYPE_AS and EXTENDS_TYPE_OF.
      	* primary.c (gfc_expr_attr): Handle CLASS-valued functions.
      	* resolve.c (resolve_structure_cons): Handle BT_CLASS.
      	(type_is_extensible): Make non-static and rename to
      	'gfc_type_is_extensible.
      	(resolve_select_type): Renamed type_is_extensible.
      	(resolve_class_assign): Handle NULL pointers.
      	(resolve_fl_variable_derived): Renamed type_is_extensible.
      	(resolve_fl_derived): Ditto.
      	* trans-expr.c (gfc_trans_subcomponent_assign): Handle NULL
      	initialization of class pointer components.
      	(gfc_conv_structure): Handle BT_CLASS.
      	* trans-intrinsic.c (gfc_conv_same_type_as,gfc_conv_extends_type_of):
      	New functions.
      	(gfc_conv_intrinsic_function): Handle SAME_TYPE_AS and EXTENDS_TYPE_OF.
      
      2009-09-30  Janus Weil  <janus@gcc.gnu.org>
      
      	* gfortran.h (type_selector, select_type_tmp): New global variables.
      	* match.c (type_selector, select_type_tmp): New global variables,
      	used for SELECT TYPE statements.
      	(gfc_match_select_type): Better error handling. Remember selector.
      	(gfc_match_type_is): Create temporary variable.
      	* module.c (ab_attribute): New value 'AB_IS_CLASS'.
      	(attr_bits): New string.
      	(mio_symbol_attribute): Handle 'is_class'.
      	* resolve.c (resolve_select_type): Insert pointer assignment statement,
      	to assign temporary to selector.
      	* symbol.c (gfc_get_ha_sym_tree): Replace selector by a temporary
      	in SELECT TYPE statements.
      
      2009-09-30  Janus Weil  <janus@gcc.gnu.org>
      
      	* dump-parse-tree.c (show_code_node): Renamed 'alloc_list'.
      	* gfortran.h (gfc_code): Rename 'alloc_list'. Add member 'ts'.
      	(gfc_expr_to_initialize): New prototype.
      	* match.c (alloc_opt_list): Correctly check type compatibility.
      	Renamed 'alloc_list'.
      	(dealloc_opt_list): Renamed 'alloc_list'.
      	* resolve.c (expr_to_initialize): Rename to 'gfc_expr_to_initialize'
      	and make it non-static.
      	(resolve_allocate_expr): Set vindex for CLASS variables correctly.
      	Move initialization code to gfc_trans_allocate. Renamed 'alloc_list'.
      	(resolve_allocate_deallocate): Renamed 'alloc_list'.
      	(check_class_pointer_assign): Rename to 'resolve_class_assign'. Change
      	argument type. Adjust to work with ordinary assignments.
      	(resolve_code): Call 'resolve_class_assign' for ordinary assignments.
      	Renamed 'check_class_pointer_assign'.
      	* st.c (gfc_free_statement): Renamed 'alloc_list'.
      	* trans-stmt.c (gfc_trans_allocate): Renamed 'alloc_list'. Handle
      	size determination and initialization of CLASS variables. Bugfix for
      	ALLOCATE statements with default initialization and SOURCE block.
      	(gfc_trans_deallocate): Renamed 'alloc_list'.
      
      2009-09-30  Paul Thomas  <pault@gcc.gnu.org>
      
      	* trans-expr.c (gfc_conv_procedure_call): Convert a derived
      	type actual to a class object if the formal argument is a
      	class.
      
      2009-09-30  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/40996
      	* decl.c (build_struct): Handle allocatable scalar components.
      	* expr.c (gfc_add_component_ref): Correctly set typespec of expression,
      	after inserting component reference.
      	* match.c (gfc_match_type_is,gfc_match_class_is): Make sure that no
      	variables are being used uninitialized.
      	* primary.c (gfc_match_varspec): Handle CLASS array components.
      	* resolve.c (resolve_select_type): Transform EXEC_SELECT_TYPE to
      	EXEC_SELECT.
      	* trans-array.c (structure_alloc_comps,gfc_trans_deferred_array):
      	Handle allocatable scalar components.
      	* trans-expr.c (gfc_conv_component_ref): Ditto.
      	* trans-types.c (gfc_get_derived_type): Ditto.
      
      2009-09-30  Janus Weil  <janus@gcc.gnu.org>
      
      	* decl.c (encapsulate_class_symbol): Modify names of class container
      	components by prefixing with '$'.
      	(gfc_match_end): Handle COMP_SELECT_TYPE.
      	* expr.c (gfc_add_component_ref): Modify names of class container
      	components by prefixing with '$'.
      	* gfortran.h (gfc_statement): Add ST_SELECT_TYPE, ST_TYPE_IS and
      	ST_CLASS_IS.
      	(gfc_case): New field 'ts'.
      	(gfc_exec_op): Add EXEC_SELECT_TYPE.
      	(gfc_type_is_extension_of): New prototype.
      	* match.h (gfc_match_select_type,gfc_match_type_is,gfc_match_class_is):
      	New prototypes.
      	* match.c (match_derived_type_spec): New function.
      	(match_type_spec): Use 'match_derived_type_spec'.
      	(match_case_eos): Modify error message.
      	(gfc_match_select_type): New function.
      	(gfc_match_case): Modify error message.
      	(gfc_match_type_is): New function.
      	(gfc_match_class_is): Ditto.
      	* parse.h (gfc_compile_state): Add COMP_SELECT_TYPE.
      	* parse.c (decode_statement): Handle SELECT TYPE, TYPE IS and CLASS IS
      	statements.
      	(next_statement): Handle ST_SELECT_TYPE.
      	(gfc_ascii_statement): Handle ST_SELECT_TYPE, ST_TYPE_IS, ST_CLASS_IS.
      	(parse_select_type_block): New function.
      	(parse_executable): Handle ST_SELECT_TYPE.
      	* resolve.c (resolve_deallocate_expr): Handle BT_CLASS. Modify names of
      	class container components by prefixing with '$'.
      	(resolve_allocate_expr): Ditto.
      	(resolve_select_type): New function.
      	(gfc_resolve_blocks): Handle EXEC_SELECT_TYPE.
      	(check_class_pointer_assign): Modify names of class container
      	components by prefixing with '$'.
      	(resolve_code): Ditto.
      	* st.c (gfc_free_statement): Ditto.
      	* symbol.c (gfc_type_is_extension_of): New function.
      	(gfc_type_compatible): Use 'gfc_type_is_extension_of', plus a bugfix.
      	* trans.c (gfc_trans_code): Handel EXEC_SELECT_TYPE.
      
      2009-09-30  Janus Weil  <janus@gcc.gnu.org>
      	    Paul Thomas <pault@gcc.gnu.org> 
      
      	* check.c (gfc_check_move_alloc): Arguments don't have to be arrays.
      	The second argument needs to be type-compatible with the first (not the
      	other way around, which makes a difference for CLASS entities).
      	* decl.c (encapsulate_class_symbol): New function.
      	(build_sym,build_struct): Handle BT_CLASS, call
      	'encapsulate_class_symbol'.
      	(gfc_match_decl_type_spec): Remove warning, use BT_CLASS.
      	(gfc_match_derived_decl): Set vindex;
      	* expr.c (gfc_add_component_ref): New function.
      	(gfc_copy_expr,gfc_check_pointer_assign,gfc_check_assign_symbol):
      	Handle BT_CLASS.
      	* dump-parse-tree.c (show_symbol): Print vindex.
      	* gfortran.h (bt): New basic type BT_CLASS.
      	(symbol_attribute): New field 'is_class'.
      	(gfc_typespec): Remove field 'is_class'.
      	(gfc_symbol): New field 'vindex'.
      	(gfc_get_ultimate_derived_super_type): New prototype.
      	(gfc_add_component_ref): Ditto.
      	* interface.c (gfc_compare_derived_types): Pointer equality check
      	moved here from gfc_compare_types.
      	(gfc_compare_types): Handle BT_CLASS and use
      	gfc_type_compatible.
      	* match.c (gfc_match_allocate,gfc_match_deallocate,gfc_match_call):
      	Handle BT_CLASS.
      	* misc.c (gfc_clear_ts): Removed is_class.
      	(gfc_basic_typename,gfc_typename): Handle BT_CLASS.
      	* module.c (bt_types,mio_typespec): Handle BT_CLASS.
      	(mio_symbol): Handle vindex.
      	* primary.c (gfc_match_varspec,gfc_variable_attr): Handle BT_CLASS.
      	* resolve.c (find_array_spec,check_typebound_baseobject):
      	Handle BT_CLASS.
      	(resolve_ppc_call,resolve_expr_ppc): Don't call 'gfc_is_proc_ptr_comp'
      	inside 'gcc_assert'.
      	(resolve_deallocate_expr,resolve_allocate_expr): Handle BT_CLASS.
      	(check_class_pointer_assign): New function.
      	(resolve_code): Handle BT_CLASS, call check_class_pointer_assign.
      	(resolve_fl_var_and_proc,type_is_extensible,resolve_fl_variable_derived,
      	resolve_fl_variable): Handle BT_CLASS.
      	(check_generic_tbp_ambiguity): Add special case.
      	(resolve_typebound_procedure,resolve_fl_derived): Handle BT_CLASS.
      	* symbol.c (gfc_get_ultimate_derived_super_type): New function.
      	(gfc_type_compatible): Handle BT_CLASS.
      	* trans-expr.c (conv_parent_component_references): Handle CLASS
      	containers.
      	(gfc_conv_initializer): Handle BT_CLASS.
      	* trans-types.c (gfc_typenode_for_spec,gfc_get_derived_type):
      	Handle BT_CLASS.
      
      testsuite/
      2009-09-30  Janus Weil  <janus@gcc.gnu.org>
      
      	* gfortran.dg/same_type_as_1.f03: New test.
      	* gfortran.dg/same_type_as_2.f03: Ditto.
      
      2009-09-30  Janus Weil  <janus@gcc.gnu.org>
      
      	* gfortran.dg/select_type_1.f03: Extended.
      	* gfortran.dg/select_type_3.f03: New test.
      
      2009-09-30  Janus Weil  <janus@gcc.gnu.org>
      
      	* gfortran.dg/class_allocate_1.f03: New test.
      
      2009-09-30  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/40996
      	* gfortran.dg/allocatable_scalar_3.f90: New test.
      	* gfortran.dg/select_type_2.f03: Ditto.
      	* gfortran.dg/typebound_proc_5.f03: Changed error messages.
      
      2009-09-30  Janus Weil  <janus@gcc.gnu.org>
      
      	* gfortran.dg/block_name_2.f90: Modified error message.
      	* gfortran.dg/select_6.f90: Ditto.
      	* gfortran.dg/select_type_1.f03: New test.
      
      2009-09-30  Janus Weil  <janus@gcc.gnu.org>
      
      	* gfortran.dg/allocate_derived_1.f90: Remove -w option.
      	* gfortran.dg/class_1.f03: Ditto.
      	* gfortran.dg/class_2.f03: Ditto.
      	* gfortran.dg/proc_ptr_comp_pass_1.f90: Ditto.
      	* gfortran.dg/proc_ptr_comp_pass_2.f90: Ditto.
      	* gfortran.dg/proc_ptr_comp_pass_3.f90: Ditto.
      	* gfortran.dg/typebound_call_10.f03: Ditto.
      	* gfortran.dg/typebound_call_2.f03: Ditto.
      	* gfortran.dg/typebound_call_3.f03: Ditto.
      	* gfortran.dg/typebound_call_4.f03: Ditto.
      	* gfortran.dg/typebound_call_9.f03: Ditto.
      	* gfortran.dg/typebound_generic_3.f03: Ditto.
      	* gfortran.dg/typebound_generic_4.f03: Ditto.
      	* gfortran.dg/typebound_operator_1.f03: Ditto.
      	* gfortran.dg/typebound_operator_2.f03: Ditto.
      	* gfortran.dg/typebound_operator_3.f03: Ditto.
      	* gfortran.dg/typebound_operator_4.f03: Ditto.
      	* gfortran.dg/typebound_proc_1.f08: Ditto.
      	* gfortran.dg/typebound_proc_5.f03: Ditto.
      	* gfortran.dg/typebound_proc_6.f03: Ditto.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152345 138bc75d-0d04-0410-961f-82ee72b054a4
      1de1b1a9
  22. 09 Sep, 2009 1 commit
  23. 29 Aug, 2009 1 commit
  24. 25 Aug, 2009 1 commit
    • janus's avatar
      2009-08-25 Janus Weil <janus@gcc.gnu.org> · 0fd53ac9
      janus authored
      	PR fortran/41139
      	* primary.c (gfc_match_varspec): Make sure EXPR_PPC is only used for
      	calls to procedure pointer components, other references to procedure
      	pointer components are EXPR_VARIABLE.
      	* resolve.c (resolve_actual_arglist): Bugfix (there can be calls without
      	actual arglist).
      	* trans-expr.c (gfc_get_proc_ptr_comp): Renamed to 'get_proc_ptr_comp',
      	removed argument 'se' and made static. Avoid inserting a temporary
      	variable for calling the PPC.
      	(conv_function_val): Renamed gfc_get_proc_ptr_comp.
      	(gfc_conv_procedure_call): Distinguish functions returning a procedure
      	pointer from calls to a procedure pointer. Distinguish calls to
      	procedure pointer components from procedure pointer components as
      	actual arguments.
      	* trans-stmt.h (gfc_get_proc_ptr_comp): Make it static.
      
      
      2009-08-25  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/41139
      	* gfortran.dg/proc_ptr_25.f90: New.
      	* gfortran.dg/proc_ptr_comp_18.f90: New.
      	* gfortran.dg/proc_ptr_comp_19.f90: New.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151081 138bc75d-0d04-0410-961f-82ee72b054a4
      0fd53ac9
  25. 21 Aug, 2009 1 commit
    • janus's avatar
      2009-08-21 Janus Weil <janus@gcc.gnu.org> · 1d84f30a
      janus authored
      	PR fortran/41106
      	* primary.c (gfc_variable_attr): Make it work also on EXPR_FUNCTION.
      	(gfc_expr_attr): Use gfc_variable_attr for procedure pointer components.
      	* resolve.c (resolve_fl_derived): Handle CHARACTER-valued procedure
      	pointer components.
      	* trans-expr.c (gfc_conv_component_ref): Ditto.
      	(gfc_conv_variable): Ditto.
      	(gfc_conv_procedure_call): Ditto.
      	(gfc_trans_pointer_assignment): Ditto.
      	* trans-types.c (gfc_get_derived_type): Ditto.
      
      
      2009-08-21  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/41106
      	* gfortran.dg/proc_ptr_23.f90: New.
      	* gfortran.dg/proc_ptr_comp_15.f90: New.
      	* gfortran.dg/proc_ptr_comp_16.f90: New.
      	* gfortran.dg/proc_ptr_comp_17.f90: New.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150987 138bc75d-0d04-0410-961f-82ee72b054a4
      1d84f30a
  26. 20 Aug, 2009 1 commit
    • matz's avatar
      fortran/ · f76d4106
      matz authored
              * trans-expr.c (gfc_conv_string_tmp): Check type compatibility
              instead of equality.
      
      testsuite/
              * gfortran.dg/pr41126.f90: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150964 138bc75d-0d04-0410-961f-82ee72b054a4
      f76d4106
  27. 19 Aug, 2009 1 commit
    • matz's avatar
      * tree-ssa-structalias.c (create_variable_info_for): Also mark · e1b3b79b
      matz authored
              first field in a struct.
              (intra_create_variable_infos): Don't deal with flag_argument_noalias.
      
      fortran/
              * trans-expr.c (gfc_conv_substring): Don't evaluate casted decl early,
              change order of length calculation to (end - start) + 1.
              (gfc_get_interface_mapping_array): Adjust call to
              gfc_get_nodesc_array_type.
              * trans-array.c (gfc_trans_create_temp_array,
              gfc_build_constant_array_constructor, gfc_conv_expr_descriptor): Ditto.
              * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
              * trans.c (gfc_add_modify): Assignment between base type and nontarget
              type are equal enough.
              (gfc_call_malloc): Use prvoid_type_node for return value of
              __builtin_malloc.
              (gfc_allocate_with_status): Ditto.
              * trans-types.c (gfc_array_descriptor_base): Double size of this array.
              (gfc_init_types): Build prvoid_type_node.
              (gfc_build_array_type): New bool parameter "restricted".
              (gfc_get_nodesc_array_type): Ditto, build restrict qualified pointers,
              if it's true.
              (gfc_get_array_descriptor_base): Ditto.
              (gfc_get_array_type_bounds): Ditto.
              (gfc_sym_type): Use symbol attributes to feed calls to above functions.
              (gfc_get_derived_type): Ditto.
              * trans.h (struct lang_type): Add nontarget_type member.
              * trans-types.h (prvoid_type_node): Declare.
              (gfc_get_array_type_bounds, gfc_get_nodesc_array_type): Declare new
              parameter.
              * trans-decl.c (gfc_finish_var_decl): Give scalars that can't be
              aliased a type with a different alias set than the base type.
              (gfc_build_dummy_array_decl): Adjust call to gfc_get_nodesc_array_type.
      
      testsuite/
              * gfortran.dg/vect/vect-gems.f90: New test.
              * gcc.dg/tree-ssa/alias-1.c: Remove, it checks something broken.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150934 138bc75d-0d04-0410-961f-82ee72b054a4
      e1b3b79b
  28. 16 Aug, 2009 1 commit
  29. 13 Aug, 2009 1 commit
    • janus's avatar
      2009-08-13 Janus Weil <janus@gcc.gnu.org> · eeebe20b
      janus authored
      	PR fortran/40941
      	* gfortran.h (gfc_typespec): Put 'derived' and 'cl' into union.
      	* decl.c (build_struct): Make sure 'cl' is only used
      	if type is BT_CHARACTER.
      	* symbol.c (gfc_set_default_type): Ditto.
      	* resolve.c (resolve_symbol, resolve_fl_derived): Ditto.
      	(resolve_equivalence,resolve_equivalence_derived): Make sure 'derived'
      	is only used if type is BT_DERIVED.
      	* trans-io.c (transfer_expr): Make sure 'derived' is only used if type
      	is BT_DERIVED or BT_INTEGER (special case: C_PTR/C_FUNPTR).
      	* array.c: Mechanical replacements to accomodate union in gfc_typespec.
      	* check.c: Ditto.
      	* data.c: Ditto.
      	* decl.c: Ditto.
      	* dump-parse-tree.c: Ditto.
      	* expr.c: Ditto.
      	* interface.c: Ditto.
      	* iresolve.c: Ditto.
      	* match.c: Ditto.
      	* misc.c: Ditto.
      	* module.c: Ditto.
      	* openmp.c: Ditto.
      	* parse.c: Ditto.
      	* primary.c: Ditto.
      	* resolve.c: Ditto.
      	* simplify.c: Ditto.
      	* symbol.c: Ditto.
      	* target-memory.c: Ditto.
      	* trans-array.c: Ditto.
      	* trans-common.c: Ditto.
      	* trans-const.c: Ditto.
      	* trans-decl.c: Ditto.
      	* trans-expr.c: Ditto.
      	* trans-intrinsic.c: Ditto.
      	* trans-io.c: Ditto.
      	* trans-stmt.c: Ditto.
      	* trans-types.c: Ditto.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150725 138bc75d-0d04-0410-961f-82ee72b054a4
      eeebe20b
  30. 11 Aug, 2009 1 commit
  31. 01 Aug, 2009 1 commit
    • pault's avatar
      2009-08-01 Paul Thomas <pault@gcc.gnu.org> · 7ea64434
      pault authored
      	PR fortran/40011
      	* error.c : Add static flag 'warnings_not_errors'.
      	(gfc_error): If 'warnings_not_errors' is set, branch to code
      	from gfc_warning.
      	(gfc_clear_error): Reset 'warnings_not_errors'.
      	(gfc_errors_to_warnings): New function.
      	* options.c (gfc_post_options): If pedantic and flag_whole_file
      	change the latter to a value of 2.
      	* parse.c (parse_module): Add module namespace to gsymbol.
      	(resolve_all_program_units): New function.
      	(clean_up_modules): New function.
      	(translate_all_program_units): New function.
      	(gfc_parse_file): If whole_file, do not clean up module right
      	away and add derived types to namespace derived types. In
      	addition, call the three new functions above.
      	* resolve.c (not_in_recursive): New function.
      	(not_entry_self_reference): New function.
      	(resolve_global_procedure): Symbol must not be IFSRC_UNKNOWN,
      	procedure must not be in the course of being resolved and
      	must return false for the two new functions. Pack away the
      	current derived type list before calling gfc_resolve for the
      	gsymbol namespace.  It is unconditionally an error if the ranks
      	of the reference and ther procedure do not match. Convert
      	errors to warnings during call to gfc_procedure_use if not
      	pedantic or legacy.
      	(gfc_resolve): Set namespace resolved flag to -1 during
      	resolution and store current cs_base.
      	* trans-decl.c (gfc_get_symbol_decl): If whole_file compilation
      	substitute a use associated variable, if it is available in a
      	gsymbolnamespace.
      	(gfc_get_extern_function_decl): If the procedure is use assoc,
      	do not attempt to find it in a gsymbol because it could be an
      	interface. If the symbol exists in a module namespace, return
      	its backend_decl.
      	* trans-expr.c (gfc_trans_scalar_assign): If a derived type
      	assignment, set the rhs TYPE_MAIN_VARIANT to that of the rhs.
      	* trans-types.c (copy_dt_decls_ifequal): Add 'from_gsym' as a
      	boolean argument. Copy component backend_decls directly if the
      	components are derived types and from_gsym is true.
      	(gfc_get_derived_type): If whole_file copy the derived type from
      	the module if it is use associated, otherwise, if can be found
      	in another gsymbol namespace, use the existing derived type as
      	the TYPE_CANONICAL and build normally.
      	* gfortran.h : Add derived_types and resolved fields to
      	gfc_namespace. Include prototype for gfc_errors_to_warnings.
      
      2009-08-01  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/40011
      	* gfortran.dg/whole_file_7.f90: New test.
      	* gfortran.dg/whole_file_8.f90: New test.
      	* gfortran.dg/whole_file_9.f90: New test.
      	* gfortran.dg/whole_file_10.f90: New test.
      	* gfortran.dg/whole_file_11.f90: New test.
      	* gfortran.dg/whole_file_12.f90: New test.
      	* gfortran.dg/whole_file_13.f90: New test.
      	* gfortran.dg/whole_file_14.f90: New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150333 138bc75d-0d04-0410-961f-82ee72b054a4
      7ea64434
  32. 25 Jul, 2009 1 commit
    • rguenth's avatar
      2009-07-25 Richard Guenther <rguenther@suse.de> · bb982f66
      rguenth authored
      	PR fortran/40005
      	* trans-types.c (gfc_get_array_type_bounds): Use
      	build_distinct_type_copy with a proper TYPE_CANONICAL and
      	re-use the type-decl of the original type.
      	* trans-decl.c (build_entry_thunks): Signal cgraph we may not
      	garbage collect.
      	(create_main_function): Likewise.
      	(gfc_generate_function_code): Likewise.
      	* trans-expr.c (gfc_trans_subcomponent_assign): Do not use
      	fold_convert on record types.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150079 138bc75d-0d04-0410-961f-82ee72b054a4
      bb982f66
  33. 16 Jul, 2009 1 commit
    • manu's avatar
      2009-07-17 Aldy Hernandez <aldyh@redhat.com> · 389dd41b
      manu authored
      	    Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	PR 40435 
      	* tree-complex.c, tree-loop-distribution.c,
      	tree.c, tree.h, builtins.c, fold-const.c, omp-low.c,
      	cgraphunit.c, tree-ssa-ccp.c, tree-ssa-dom.c,
      	gimple-low.c, expr.c, tree-ssa-ifcombine.c, c-decl.c,
      	stor-layout.c, tree-if-conv.c, c-typeck.c,
      	gimplify.c, calls.c, tree-sra.c, tree-mudflap.c,
      	tree-ssa-copy.c, tree-ssa-forwprop.c, c-convert.c, c-omp.c,
      	varasm.c, tree-inline.c, c-common.c,
      	c-common.h, gimple.c, tree-switch-conversion.c, gimple.h,
      	tree-cfg.c, c-parser.c, convert.c: Add location
      	argument to fold_{unary,binary,ternary}, fold_build[123],
      	build_call_expr, build_size_arg, build_fold_addr_expr,
      	build_call_array, non_lvalue, size_diffop,
      	fold_build1_initializer, fold_build2_initializer,
      	fold_build3_initializer, fold_build_call_array,
      	fold_build_call_array_initializer, fold_single_bit_test,
      	omit_one_operand, omit_two_operands, invert_truthvalue,
      	fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref,
      	combine_comparisons, fold_builtin_*, fold_call_expr,
      	build_range_check, maybe_fold_offset_to_address, round_up,
      	round_down.
      objc/
      	* objc-act.c: Add location argument to all calls to
      	build_fold_addr_expr.
      testsuite/
      	* gcc.dg/pr36902.c: Add column info.
      	* g++.dg/gcov/gcov-2.C: Change count for definition.
      cp/
      	* typeck.c, init.c, class.c, method.c, rtti.c, except.c, error.c,
      	tree.c, cp-gimplify.c, cxx-pretty-print.c, pt.c, semantics.c,
      	call.c, cvt.c, mangle.c: Add location argument to
      	fold_{unary,binary,ternary}, fold_build[123], build_call_expr,
      	build_size_arg, build_fold_addr_expr, build_call_array,
      	non_lvalue, size_diffop, fold_build1_initializer,
      	fold_build2_initializer, fold_build3_initializer,
      	fold_build_call_array, fold_build_call_array_initializer,
      	fold_single_bit_test, omit_one_operand, omit_two_operands,
      	invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref,
      	fold_indirect_ref, combine_comparisons, fold_builtin_*,
      	fold_call_expr, build_range_check, maybe_fold_offset_to_address,
      	round_up, round_down.
      fortran/
      	* trans-expr.c, trans-array.c, trans-openmp.c, trans-stmt.c,
      	trans.c, trans-io.c, trans-decl.c, trans-intrinsic.c: Add location
      	argument to fold_{unary,binary,ternary}, fold_build[123],
      	build_call_expr, build_size_arg, build_fold_addr_expr,
      	build_call_array, non_lvalue, size_diffop,
      	fold_build1_initializer, fold_build2_initializer,
      	fold_build3_initializer, fold_build_call_array,
      	fold_build_call_array_initializer, fold_single_bit_test,
      	omit_one_operand, omit_two_operands, invert_truthvalue,
      	fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref,
      	combine_comparisons, fold_builtin_*, fold_call_expr,
      	build_range_check, maybe_fold_offset_to_address, round_up,
      	round_down.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149722 138bc75d-0d04-0410-961f-82ee72b054a4
      389dd41b
  34. 13 Jul, 2009 1 commit
    • janus's avatar
      2009-07-13 Janus Weil <janus@gcc.gnu.org> · 452a3743
      janus authored
      	PR fortran/40646
      	* module.c (mio_symbol): If the symbol has formal arguments,
      	the formal namespace will be present.
      	* resolve.c (resolve_actual_arglist): Correctly handle 'called'
      	procedure pointer components as actual arguments.
      	(resolve_fl_derived,resolve_symbol): Make sure the formal namespace
      	is present.
      	* trans-expr.c (gfc_conv_procedure_call): Correctly handle the formal
      	arguments of procedure pointer components.
      
      
      2009-07-13  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/40646
      	* gfortran.dg/proc_ptr_22.f90: Extended.
      	* gfortran.dg/proc_ptr_comp_12.f90: Extended.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149586 138bc75d-0d04-0410-961f-82ee72b054a4
      452a3743
  35. 09 Jul, 2009 2 commits
    • janus's avatar
      2009-07-09 Janus Weil <janus@gcc.gnu.org> · ff70e443
      janus authored
      	PR fortran/40646
      	* dump-parse-tree.c (show_expr): Renamed 'is_proc_ptr_comp'.
      	* expr.c (is_proc_ptr_comp): Renamed to 'gfc_is_proc_ptr_comp'.
      	(gfc_check_pointer_assign): Renamed 'is_proc_ptr_comp'.
      	(replace_comp,gfc_expr_replace_comp): New functions, analogous
      	to 'replace_symbol' and 'gfc_expr_replace_symbol', just with components
      	instead of symbols.
      	* gfortran.h (gfc_expr_replace_comp): New prototype.
      	(is_proc_ptr_comp): Renamed to 'gfc_is_proc_ptr_comp'.
      	* interface.c (compare_actual_formal): Renamed 'is_proc_ptr_comp'.
      	* match.c (gfc_match_pointer_assignment): Ditto.
      	* primary.c (gfc_match_varspec): Handle array-valued procedure pointers
      	and procedure pointer components. Renamed 'is_proc_ptr_comp'.
      	* resolve.c (resolve_fl_derived): Correctly handle interfaces with
      	RESULT statement, and handle array-valued procedure pointer components.
      	(resolve_actual_arglist,resolve_ppc_call,resolve_expr_ppc): Renamed
      	'is_proc_ptr_comp'.
      	* trans-array.c (gfc_walk_function_expr): Ditto.
      	* trans-decl.c (gfc_get_symbol_decl): Security check for presence of
      	ns->proc_name.
      	* trans-expr.c (gfc_conv_procedure_call): Handle array-valued procedure
      	pointer components. Renamed 'is_proc_ptr_comp'.
      	(conv_function_val,gfc_trans_arrayfunc_assign): Renamed
      	'is_proc_ptr_comp'.
      	(gfc_get_proc_ptr_comp): Do not modify the argument 'e', but instead
      	make a copy of it.
      	* trans-io.c (gfc_trans_transfer): Handle array-valued procedure
      	pointer components.
      
      
      2009-07-09  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/40646
      	* gfortran.dg/proc_ptr_22.f90: New.
      	* gfortran.dg/proc_ptr_comp_12.f90: New.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149419 138bc75d-0d04-0410-961f-82ee72b054a4
      ff70e443
    • burnus's avatar
      2009-07-09 Tobias Burnus <burnus@net-b.de> · 40474135
      burnus authored
              PR fortran/40604
              * intrinsic.c (gfc_convert_type_warn): Set sym->result.
              * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
              for optional arguments.
      
      2009-07-09  Tobias Burnus  <burnus@net-b.de>
      
              PR fortran/40604
              * gfortran.dg/pointer_check_6.f90: New test.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149405 138bc75d-0d04-0410-961f-82ee72b054a4
      40474135
  36. 05 Jul, 2009 1 commit
    • pault's avatar
      2009-07-05 Paul Thomas <pault@gcc.gnu.org> · 88a37d69
      pault authored
      	and Tobias Burnus <burnus@gcc.gnu.org>
      
      	PR fortran/40646
      	* gfortran.h : Change the compcall member of the 'value' union
      	in the gfc_expr structure so that its fields overlap with the
      	'function' member.
      	* resolve.c (resolve_compcall): Set the function.esym.
      	* trans-expr.c (gfc_trans_arrayfunc_assign): Use
      	is_proc_ptr_comp in the condition.
      	* dependency.c (gfc_full_array_ref_p): Ensure that 'contiguous'
      	retunrs a value if non-NULL.
      
      2009-07-05  Paul Thomas  <pault@gcc.gnu.org>
      	and Tobias Burnus <burnus@gcc.gnu.org>
      
      	PR fortran/40646
      	* gfortran.dg/func_assign_3.f90 : New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149262 138bc75d-0d04-0410-961f-82ee72b054a4
      88a37d69
  37. 04 Jul, 2009 1 commit
    • janus's avatar
      2009-07-04 Janus Weil <janus@gcc.gnu.org> · eee4a6d8
      janus authored
      	PR fortran/40593
      	* interface.c (compare_actual_formal): Take care of proc-pointer-valued
      	functions as actual arguments.
      	* trans-expr.c (gfc_conv_procedure_call): Ditto.
      	* resolve.c (resolve_specific_f0): Use the correct ts.
      
      
      2009-07-04  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/40593
      	* gfortran.dg/proc_ptr_result_6.f90: New.
      
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149227 138bc75d-0d04-0410-961f-82ee72b054a4
      eee4a6d8