summaryrefslogtreecommitdiffstats
path: root/gcc/fortran/interface.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 2012-01-21 Tobias Burnus <burnus@net-b.de>burnus2012-01-211-3/+3
| | | | | | | | | | | | | | PR fortran/51913 * interface.c (compare_parameter): Fix CLASS comparison. 2012-01-21 Tobias Burnus <burnus@net-b.de> PR fortran/51913 * gfortran.dg/class_47.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183368 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-01-09 Paul Thomas <pault@gcc.gnu.org>pault2012-01-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/51791 * interface.c (matching_typebound_op): Drill down through possible parentheses to obtain base expression. Do not test for 'class_ok' but, instead for the class structure components. * resolve.c (resolve_ordinary_assign): Extend error message for polymorphic assignment to advise checking for specific subroutine. PR fortran/51792 * resolve.c (resolve_typebound_function): Restore 'static' to declaration. 2012-01-09 Paul Thomas <pault@gcc.gnu.org> PR fortran/51791 * gfortran.dg/typebound_operator_7.f03: Insert parentheses around base object in first assignment in main program. * gfortran.dg/typebound_operator_10.f03: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183032 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-01-02 Paul Thomas <pault@gcc.gnu.org>pault2012-01-021-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/51529 * trans-array.c (gfc_array_allocate): Null allocated memory of newly allocted class arrays. PR fortran/46262 PR fortran/46328 PR fortran/51052 * interface.c(build_compcall_for_operator): Add a type to the expression. * trans-expr.c (conv_base_obj_fcn_val): New function. (gfc_conv_procedure_call): Use base_expr to detect non-variable base objects and, ensuring that there is a temporary variable, build up the typebound call using conv_base_obj_fcn_val. (gfc_trans_class_assign): Pick out class procedure pointer assignments and do the assignment with no further prcessing. (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign gfc_trans_class_assign): Move to top of file. * gfortran.h : Add 'base_expr' field to gfc_expr. * resolve.c (get_declared_from_expr): Add 'types' argument to switch checking of derived types on or off. (resolve_typebound_generic_call): Set the new argument. (resolve_typebound_function, resolve_typebound_subroutine): Set 'types' argument for get_declared_from_expr appropriately. Identify base expression, if not a variable, in the argument list of class valued calls. Assign it to the 'base_expr' field of the final expression. Strip away all references after the last class reference. 2012-01-02 Paul Thomas <pault@gcc.gnu.org> PR fortran/46262 PR fortran/46328 PR fortran/51052 * gfortran.dg/typebound_operator_7.f03: New. * gfortran.dg/typebound_operator_8.f03: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182796 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-11 Paul Thomas <pault@gcc.gnu.org>pault2011-12-111-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tobias Burnus <burnus@gcc.gnu.org> PR fortran/41539 PR fortran/43214 PR fortran/43969 PR fortran/44568 PR fortran/46356 PR fortran/46990 PR fortran/49074 * interface.c(symbol_rank): Return the rank of the _data component of class objects. (compare_parameter): Also compare the derived type of the class _data component for type mismatch. Similarly, return 1 if the formal and _data ranks match. (compare_actual_formal): Do not compare storage sizes for class expressions. It is an error if an actual class array, passed to a formal class array is not full. * trans-expr.c (gfc_class_data_get, gfc_class_vptr_get, gfc_vtable_field_get, gfc_vtable_hash_get, gfc_vtable_size_get, gfc_vtable_extends_get, gfc_vtable_def_init_get, gfc_vtable_copy_get): New functions for class API. (gfc_conv_derived_to_class): For an array reference in an elemental procedure call retain the ss to provide the scalarized array reference. Moved in file. (gfc_conv_class_to_class): New function. (gfc_conv_subref_array_arg): Use the type of the class _data component as a basetype. (gfc_conv_procedure_call): Ensure that class array expressions have both the _data reference and an array reference. Use gfc_conv_class_to_class to handle class arrays for elemental functions in scalarized loops, class array elements and full class arrays. Use a call to gfc_conv_subref_array_arg in order that the copy-in/copy-out for passing class arrays to derived type arrays occurs correctly. (gfc_conv_expr): If it is missing, add the _data component between a class object or component and an array reference. (gfc_trans_class_array_init_assign): New function. (gfc_trans_class_init_assign): Call it for array expressions. * trans-array.c (gfc_add_loop_ss_code): Do not use a temp for class scalars since their size will depend on the dynamic type. (build_class_array_ref): New function. (gfc_conv_scalarized_array_ref): Call build_class_array_ref. (gfc_array_init_size): Add extra argument, expr3, that represents the SOURCE argument. If present,use this for the element size. (gfc_array_allocate): Also add argument expr3 and use it when calling gfc_array_init_size. (structure_alloc_comps): Enable class arrays. * class.c (gfc_add_component_ref): Carry over the derived type of the _data component. (gfc_add_class_array_ref): New function. (class_array_ref_detected): New static function. (gfc_is_class_array_ref): New function that calls previous. (gfc_is_class_scalar_expr): New function. (gfc_build_class_symbol): Throw not implemented error for assumed size class arrays. Remove error that prevents CLASS arrays. (gfc_build_class_symbol): Prevent pointer/allocatable conflict. Also unset codimension. (gfc_find_derived_vtab): Make 'copy' elemental and set the intent of the arguments accordingly.: * trans-array.h : Update prototype for gfc_array_allocate. * array.c (gfc_array_dimen_size): Return failure if class expr. (gfc_array_size): Likewise. * gfortran.h : New prototypes for gfc_add_class_array_ref, gfc_is_class_array_ref and gfc_is_class_scalar_expr. * trans-stmt.c (trans_associate_var): Exclude class targets from test. Move the allocation of the _vptr to an earlier time for class objects. (trans_associate_var): Assign the descriptor directly for class arrays. (gfc_trans_allocate): Add expr3 to gfc_array_allocate arguments. Convert array element references into sections. Do not invoke gfc_conv_procedure_call, use gfc_trans_call instead. * expr.c (gfc_get_corank): Fix for BT_CLASS. (gfc_is_simply_contiguous): Exclude class from test. * trans.c (gfc_build_array_ref): Include class array refs. * trans.h : Include prototypes for class API functions that are new in trans-expr. Define GFC_DECL_CLASS(node). * resolve.c (check_typebound_baseobject ): Remove error for non-scalar base object. (resolve_allocate_expr): Ensure that class _data component is present. If array, call gfc_expr_to_intialize. (resolve_select): Remove scalar error for SELECT statement as a temporary measure. (resolve_assoc_var): Update 'target' (aka 'selector') as needed. Ensure that the target expression has the right rank. (resolve_select_type): Ensure that target expressions have a valid locus. (resolve_allocate_expr, resolve_fl_derived0): Fix for BT_CLASS. * trans-decl.c (gfc_get_symbol_decl): Set GFC_DECL_CLASS, where appropriate. (gfc_trans_deferred_vars): Get class arrays right. * match.c(select_type_set_tmp): Add array spec to temporary. (gfc_match_select_type): Allow class arrays. * check.c (array_check): Ensure that class arrays have refs. (dim_corank_check, dim_rank_check): Retrun success if class. * primary.c (gfc_match_varspec): Fix for class arrays and co-arrays. Make sure that class _data is present. (gfc_match_rvalue): Handle class arrays. *trans-intrinsic.c (gfc_conv_intrinsic_size): Add class array reference. (gfc_conv_allocated): Add _data component to class expressions. (gfc_add_intrinsic_ss_code): ditto. * simplify.c (simplify_cobound): Fix for BT_CLASS. (simplify_bound): Return NULL for class arrays. (simplify_cobound): Obtain correct array_spec. Use cotype as appropriate. Use arrayspec for bounds. 2011-12-11 Paul Thomas <pault@gcc.gnu.org> Tobias Burnus <burnus@gcc.gnu.org> PR fortran/41539 PR fortran/43214 PR fortran/43969 PR fortran/44568 PR fortran/46356 PR fortran/46990 PR fortran/49074 * gfortran.dg/class_array_1.f03: New. * gfortran.dg/class_array_2.f03: New. * gfortran.dg/class_array_3.f03: New. * gfortran.dg/class_array_4.f03: New. * gfortran.dg/class_array_5.f03: New. * gfortran.dg/class_array_6.f03: New. * gfortran.dg/class_array_7.f03: New. * gfortran.dg/class_array_8.f03: New. * gfortran.dg/coarray_poly_1.f90: New. * gfortran.dg/coarray_poly_2.f90: New. * gfortran.dg/coarray/poly_run_1.f90: New. * gfortran.dg/coarray/poly_run_2.f90: New. * gfortran.dg/class_to_type_1.f03: New. * gfortran.dg/type_to_class_1.f03: New. * gfortran.dg/typebound_assignment_3.f03: Remove the error. * gfortran.dg/auto_dealloc_2.f90: Occurences of __builtin_free now 2. * gfortran.dg/class_19.f03: Occurences of __builtin_free now 8. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182210 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/fortranburnus2011-11-161-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2011-11-16 Tobias Burnus <burnus@net-b.de> PR fortran/39427 PR fortran/37829 * decl.c (match_data_constant, match_data_constant, * variable_decl, gfc_match_decl_type_spec, access_attr_decl, check_extended_derived_type, gfc_match_derived_decl, gfc_match_derived_decl, gfc_match_derived_decl) Modified to deal with DT constructors. * gfortran.h (gfc_find_dt_in_generic, gfc_convert_to_structure_constructor): New function prototypes. * interface.c (check_interface0, check_interface1, gfc_search_interface): Ignore DT constructors in generic list. * match.h (gfc_match_structure_constructor): Update prototype. * match.c (match_derived_type_spec): Ensure that one uses the DT not the generic function. * module.c (MOD_VERSION): Bump. (dt_lower_string, dt_upper_string): New functions. (find_use_name_n, find_use_operator, compare_true_names, find_true_name, add_true_name, fix_mio_expr, load_needed, read_module, write_dt_extensions, write_symbol): Changes to deal with different symtree vs. sym names. (create_derived_type): Create also generic procedure. * parse.c (gfc_fixup_sibling_symbols): Don't regard DT and * generic function as the same. * primary.c (gfc_convert_to_structure_constructor): New * function. (gfc_match_structure_constructor): Restructured; calls gfc_convert_to_structure_constructor. (build_actual_constructor, gfc_match_rvalue): Update for DT generic functions. * resolve.c (resolve_formal_arglist, resolve_structure_cons, is_illegal_recursion, resolve_generic_f, resolve_variable, resolve_fl_variable_derived, resolve_fl_derived0, resolve_symbol): Handle DT and DT generic constructors. * symbol.c (gfc_use_derived, gfc_undo_symbols, gen_special_c_interop_ptr, gen_cptr_param, generate_isocbinding_symbol, gfc_get_derived_super_type): Handle derived-types, which are hidden in the generic type. (gfc_find_dt_in_generic): New function * trans-array.c (gfc_conv_array_initializer): Replace * FL_PARAMETER expr by actual value. * trans-decl.c (gfc_get_module_backend_decl, * gfc_trans_use_stmts): Ensure that we use the DT and not the generic function. * trans-types.c (gfc_get_derived_type): Ensure that we use the * DT and not the generic procedure. gcc/testsuite/ 2011-11-16 Tobias Burnus <burnus@net-b.de> PR fortran/39427 PR fortran/37829 * gfortran.dg/constructor_1.f90: New. * gfortran.dg/constructor_2.f90: New. * gfortran.dg/constructor_3.f90: New. * gfortran.dg/constructor_4.f90: New. * gfortran.dg/constructor_5.f90: New. * gfortran.dg/constructor_6.f90: New. * gfortran.dg/use_only_5.f90: New. * gfortran.dg/c_ptr_tests_17.f90: New. * gfortran.dg/c_ptr_tests_18.f90: New. * gfortran.dg/used_types_25.f90: New. * gfortran.dg/used_types_26.f90: New * gfortran.dg/type_decl_3.f90: New. * gfortran.dg/function_types_3.f90: Update dg-error. * gfortran.dg/result_1.f90: Ditto. * gfortran.dg/structure_constructor_3.f03: Ditto. * gfortran.dg/structure_constructor_4.f03: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181425 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-11-06 Janus Weil <janus@gcc.gnu.org>janus2011-11-061-14/+9
| | | | | | | | | | * gfortran.h (gfc_extend_expr): Modified prototype. * interface.c (gfc_extend_expr): Return 'match' instead of 'gfc_try'. Remove argument 'real_error'. * resolve.c (resolve_operator): Modified call to 'gfc_extend_expr'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181044 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-11-03 Tobias Burnus <burnus@net-b.de>burnus2011-11-031-2/+3
| | | | | | | | | | | | | | | PR fortran/50933 * interface.c (gfc_compare_derived_types): Fix check for * BIND(C). 2011-11-03 Tobias Burnus <burnus@net-b.de> PR fortran/50933 * gfortran.dg/bind_c_dts_5.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180879 138bc75d-0d04-0410-961f-82ee72b054a4
* * interface.c (check_dummy_characteristics): Count dimensions startingmikael2011-10-091-1/+1
| | | | | | | | from one in diagnostic. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179726 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-10-04 Janus Weil <janus@gcc.gnu.org>janus2011-10-041-1/+42
| | | | | | | | | | | | | | PR fortran/35831 * interface.c (check_dummy_characteristics): Check the array shape. 2011-10-04 Janus Weil <janus@gcc.gnu.org> PR fortran/35831 * gfortran.dg/dummy_procedure_6.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179520 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-10-01 Janus Weil <janus@gcc.gnu.org>janus2011-10-011-1/+1
| | | | | | | | | | | | | | | PR fortran/50585 * interface.c (get_expr_storage_size): Check if 'length' component is associated. 2011-10-01 Janus Weil <janus@gcc.gnu.org> PR fortran/50585 * gfortran.dg/assumed_charlen_arg_2.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179413 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-09-26 Janus Weil <janus@gcc.gnu.org>janus2011-09-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/50515 * resolve.c (resolve_common_blocks): Check for EXTERNAL attribute. PR fortran/50517 * interface.c (gfc_compare_interfaces): Bugfix in check for result type. 2011-09-26 Janus Weil <janus@gcc.gnu.org> PR fortran/50515 * gfortran.dg/common_15.f90: New. PR fortran/50517 * gfortran.dg/dummy_procedure_5.f90: New. * gfortran.dg/interface_26.f90: Modified error message. * gfortran.dg/proc_ptr_11.f90: Ditto. * gfortran.dg/proc_ptr_15.f90: Ditto. * gfortran.dg/proc_ptr_comp_20.f90: Ditto. * gfortran.dg/proc_ptr_result_5.f90: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179213 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-09-22 Janus Weil <janus@gcc.gnu.org>janus2011-09-221-22/+27
| | | | | | | | | | | | | | | | | | | | PR fortran/41733 * expr.c (gfc_check_pointer_assign): Check for nonintrinsic elemental procedures. * interface.c (gfc_compare_interfaces): Rename 'intent_flag'. Check for PURE and ELEMENTAL attributes. (compare_actual_formal): Remove pureness check here. 2011-09-22 Janus Weil <janus@gcc.gnu.org> PR fortran/41733 * gfortran.dg/impure_actual_1.f90: Modified error message. * gfortran.dg/proc_ptr_32.f90: New. * gfortran.dg/proc_ptr_33.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179080 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-09-14 Tobias Burnus <burnus@net-b.de>burnus2011-09-141-0/+37
| | | | | | | | | | | | | | | | | | | | | | PR fortran/34547 PR fortran/50375 * check.c (gfc_check_null): Allow allocatables as MOLD to NULL. * resolve.c (resolve_transfer): Reject NULL without MOLD. * interface.c (gfc_procedure_use): Reject NULL without MOLD if no explicit interface is known. (gfc_search_interface): Reject NULL without MOLD if it would lead to ambiguity. 2011-09-14 Tobias Burnus <burnus@net-b.de> PR fortran/34547 PR fortran/50375 * gfortran.dg/null_5.f90: New. * gfortran.dg/null_6.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178841 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-09-11 Janus Weil <janus@gcc.gnu.org>janus2011-09-111-32/+127
| | | | | | | | | | | | | | | | | | | | | PR fortran/35831 PR fortran/47978 * interface.c (check_dummy_characteristics): New function to check the characteristics of dummy arguments. (gfc_compare_interfaces,gfc_check_typebound_override): Call it here. 2011-09-11 Janus Weil <janus@gcc.gnu.org> PR fortran/35831 PR fortran/47978 * gfortran.dg/dynamic_dispatch_5.f03: Fix invalid test case. * gfortran.dg/proc_decl_26.f90: New. * gfortran.dg/typebound_override_2.f90: New. * gfortran.dg/typebound_proc_6.f03: Changed wording in error message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178767 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-20 Janus Weil <janus@gcc.gnu.org>janus2011-08-201-1/+2
| | | | | | | | | | | | | | | | | | PR fortran/49638 * dependency.c (gfc_dep_compare_expr): Add new result value "-3". (gfc_check_element_vs_section,gfc_check_element_vs_element): Handle result value "-3". * frontend-passes.c (optimize_comparison): Ditto. * interface.c (gfc_check_typebound_override): Ditto. 2011-08-20 Janus Weil <janus@gcc.gnu.org> PR fortran/49638 * gfortran.dg/typebound_override_1.f90: Modified. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177932 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-07 Janus Weil <janus@gcc.gnu.org>janus2011-08-071-4/+32
| | | | | | | | | | | | | | | | | | Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/49638 * dependency.c (are_identical_variables): For dummy arguments only check for equal names, not equal symbols. * interface.c (gfc_check_typebound_override): Add checking for rank and character length. 2011-08-07 Janus Weil <janus@gcc.gnu.org> PR fortran/49638 * gfortran.dg/typebound_override_1.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177550 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-07 Janus Weil <janus@gcc.gnu.org>janus2011-08-071-0/+194
| | | | | | | | | | | | | | | | | | | | PR fortran/49638 * dependency.h (gfc_is_same_range,gfc_are_identical_variables): Remove two prototypes. * dependency.c (gfc_are_identical_variables,are_identical_variables): Renamed the former to the latter and made static. (gfc_dep_compare_expr): Renamed 'gfc_are_identical_variables', handle commutativity of multiplication. (gfc_is_same_range,is_same_range): Renamed the former to the latter, made static and removed argument 'def'. (check_section_vs_section): Renamed 'gfc_is_same_range'. * gfortran.h (gfc_check_typebound_override): New prototype. * interface.c (gfc_check_typebound_override): Moved here from ... * resolve.c (check_typebound_override): ... here (and renamed). (resolve_typebound_procedure): Renamed 'check_typebound_override'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177545 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-07-19 Tobias Burnus <burnus@net-b.de>burnus2011-07-191-35/+17
| | | | | | | | | | | | | | | * expr.c (gfc_is_coarray): New function. * gfortran.h (gfc_is_coarray): New prototype. * interface.c (compare_parameter): Use it. 2011-07-19 Tobias Burnus <burnus@net-b.de> * gfortran.dg/coarray_args_1.f90: New. * gfortran.dg/coarray_args_2.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176467 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-06-20 Tobias Burnus <burnus@net-b.de>burnus2011-06-201-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/18918 * gfortran.h (gfc_check_vardef_context): Update prototype. (iso_fortran_env_symbol): Handle derived types. (symbol_attribute): Add lock_comp. * expr.c (gfc_check_vardef_context): Add LOCK_TYPE check. * interface.c (compare_parameter, gfc_procedure_use): Handle LOCK_TYPE. (compare_actual_formal): Update gfc_check_vardef_context call. * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto. * intrinsic.c (check_arglist): Ditto. * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): * Ditto. * iso-fortran-env.def (ISOFORTRAN_LOCK_TYPE): Add. * intrinsic.texi (ISO_FORTRAN_ENV): Document LOCK_TYPE. * module.c (mio_symbol_attribute): Handle lock_comp. (create_derived_type): New function. (use_iso_fortran_env_module): Call it to handle LOCK_TYPE. * parse.c (parse_derived): Add constraint check for LOCK_TYPE. * resolve.c (resolve_symbol, resolve_lock_unlock): Add * constraint checks for LOCK_TYPE. (gfc_resolve_iterator, resolve_deallocate_expr, resolve_allocate_expr, resolve_code, resolve_transfer): Update gfc_check_vardef_context call. * trans-stmt.h (gfc_trans_lock_unlock): New prototype. * trans-stmt.c (gfc_trans_lock_unlock): New function. * trans.c (trans_code): Handle LOCK and UNLOCK. 2011-06-20 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.dg/coarray_lock_1.f90: Update dg-error. * gfortran.dg/coarray_lock_3.f90: New. * gfortran.dg/coarray/lock_1.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175228 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-06-16 Janus Weil <janus@gcc.gnu.org>janus2011-06-161-0/+1
| | | | | | | | | | | | | | PR fortran/49074 * interface.c (gfc_extend_assign): Propagate the locus from the assignment to the type-bound procedure call. 2011-06-16 Janus Weil <janus@gcc.gnu.org> PR fortran/49074 * gfortran.dg/typebound_assignment_3.f03: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175113 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2011-05-291-65/+57
| | | | | | | | | | | | | | | | | | PR fortran/45786 * interface.c (gfc_equivalent_op): New function. (gfc_check_interface): Use gfc_equivalent_op instead of switch statement. * decl.c (access_attr_decl): Also set access to an equivalent operator. 2011-05-29 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/45786 * gfortran.dg/operator_7.f90: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174412 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-29 Tobias Burnus <burnus@net-b.de>burnus2011-05-291-0/+18
| | | | | | | | | | | | | | | PR fortran/18918 * interface.c (compare_parameter): Add check for passing coarray to allocatable noncoarray dummy. 2011-05-29 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.dg/coarray_24.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174411 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-14 Tobias Burnus <burnus@net-b.de>burnus2011-05-141-0/+1
| | | | | | | | | | | | | | | PR fortran/18918 * interface.c (compare_parameter): Skip diagnostic if actual argument is not an array; rank mismatch is diagnosted later. 2011-05-14 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.de/coarray_20.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173755 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-28 Tobias Burnus <burnus@net-b.de>burnus2011-04-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/48112 * resolve.c (resolve_fl_var_and_proc): Print diagnostic of function results only once. (resolve_symbol): Always resolve function results. PR fortran/48279 * expr.c (gfc_check_vardef_context): Fix handling of generic EXPR_FUNCTION. * interface.c (check_interface0): Reject internal functions in generic interfaces, unless -std=gnu. 2011-04-28 Tobias Burnus <burnus@net-b.de> PR fortran/48112 PR fortran/48279 * gfortran.dg/interface_35.f90: New. * gfortran.dg/erfc_scaled_1.f90: Don't compile with -pedantic. * gfortran.dg/func_result_6.f90: Add dg-warning. * gfortran.dg/bessel_1.f90: Ditto. * gfortran.dg/hypot_1.f90: Ditto. * gfortran.dg/proc_ptr_comp_20.f90: Ditto. * gfortran.dg/proc_ptr_comp_21.f90: Ditto. * gfortran.dg/interface_assignment_4.f90: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173059 138bc75d-0d04-0410-961f-82ee72b054a4
* remove useless if-before-free testsmeyering2011-04-201-2/+1
| | | | | | | | | | | Change "if (E) free (E);" to "free (E);" everywhere except in the libgo/, intl/, zlib/ and classpath/ directories. Also transform equivalent variants like "if (E != NULL) free (E);" and allow an extra cast on the argument to free. Otherwise, the tested and freed "E" expressions must be identical, modulo white space. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172785 138bc75d-0d04-0410-961f-82ee72b054a4
* convert each use of gfc_free (p) to free (p)meyering2011-04-181-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do that by running this command: perl -pi -e 's/\bgfc_free ?\(/free (/' \ $(git grep -El '\bgfc_free ?\(') which also corrects the few uses that lacked a space between the function name and the open parenthesis. Manually undo the change to the function definition itself and its prototype. They'll be removed next. * array.c (gfc_free_array_spec, gfc_set_array_spec): s/gfc_free/free/ * constructor.c (node_free): Likewise. * cpp.c (dump_queued_macros): Likewise. * data.c (gfc_assign_data_value): Likewise. * decl.c (free_variable, free_value, gfc_free_data): Likewise. (gfc_free_data_all, match_old_style_init): Likewise. (gfc_set_constant_character_len, gfc_free_enum_history, NUM_DECL): Likewise. (gfc_match_modproc): Likewise. * dependency.c (check_section_vs_section): Likewise. * error.c (gfc_pop_error, gfc_free_error): Likewise. * expr.c (free_expr0, gfc_free_expr, gfc_free_actual_arglist): Likewise. (gfc_free_ref_list, gfc_replace_expr, gfc_copy_ref): Likewise. (find_substring_ref, gfc_simplify_expr, gfc_check_assign_symbol): Likewise. * frontend-passes.c (gfc_run_passes, cfe_expr_0): Likewise. (strip_function_call, optimize_comparison): Likewise. * interface.c (gfc_free_interface, arginfo, check_interface0): Likewise. (CHECK_OS_COMPARISON, gfc_extend_assign, gfc_free_formal_arglist): Likewise. * intrinsic.c (gfc_intrinsic_done_1, gfc_convert_type_warn): Likewise. (gfc_convert_chartype): Likewise. * io.c (gfc_free_open, compare_to_allowed_values, gfc_free_close): Likewise. (gfc_free_filepos, gfc_free_dt, gfc_free_inquire): Likewise. * match.c (gfc_free_iterator, gfc_match_associate): Likewise. (gfc_free_alloc_list, gfc_free_namelist, gfc_free_equiv_until): Likewise. (free_case, gfc_free_forall_iterator): Likewise. * misc.c: Likewise. * module.c (free_pi_tree, resolve_fixups, free_rename): Likewise. (free_true_name, peek_atom, mio_allocated_wide_string): Likewise. (mio_pool_string, mio_internal_string, mio_gmp_integer): Likewise. (mio_gmp_real, mio_expr, mio_typebound_proc): Likewise. (mio_full_typebound_tree, skip_list, load_equiv): Likewise. (free_written_common, gfc_use_module, gfc_free_use_stmts): Likewise. * openmp.c (gfc_free_omp_clauses): Likewise. * options.c (gfc_post_options): Likewise. * parse.c (select_type_pop, parse_omp_structured_block): Likewise. * primary.c (gfc_free_structure_ctor_component): Likewise. * resolve.c (resolve_structure_cons, check_host_association): Likewise. (gfc_resolve_forall, resolve_equivalence): Likewise. * scanner.c (gfc_scanner_done_1, gfc_release_include_path): Likewise. (gfc_define_undef_line, preprocessor_line, include_line): Likewise. (load_file, gfc_read_orig_filename): Likewise. * simplify.c (simplify_transformation_to_array): Likewise. (gfc_simplify_ibits, simplify_shift, gfc_simplify_ishftc, STRING): Likewise. (gfc_simplify_compiler_options): Likewise. * st.c (gfc_free_statement, gfc_free_statements): Likewise. (gfc_free_association_list): Likewise. * symbol.c (free_components, gfc_free_st_label, free_st_labels): Likewise. (gfc_delete_symtree, gfc_free_symbol, gfc_undo_symbols): Likewise. (free_old_symbol, gfc_commit_symbols, free_tb_tree): Likewise. (free_common_tree, free_uop_tree, free_sym_tree): Likewise. (gfc_free_dt_list, gfc_free_equiv_infos, gfc_free_equiv_lists): Likewise. (gfc_free_finalizer, gfc_free_charlen, free_entry_list): Likewise. (gfc_free_namespace): Likewise. * trans-array.c (gfc_free_ss, gfc_trans_array_bound_check): Likewise. (gfc_conv_array_ref, gfc_conv_ss_startstride): Likewise. (gfc_trans_dummy_array_bias, gfc_conv_array_parameter): Likewise. * trans-common.c (get_init_field, create_common): Likewise. * trans-const.c (gfc_build_wide_string_const): Likewise. (gfc_conv_string_init): Likewise. * trans-decl.c (gfc_generate_function_code): Likewise. * trans-expr.c (gfc_conv_substring, gfc_free_interface_mapping): Likewise. (SCALAR_POINTER, gfc_conv_statement_function): Likewise. (gfc_trans_subarray_assign): Likewise. * trans-intrinsic.c (conv_generic_with_optional_char_arg): Likewise. * trans-io.c (gfc_trans_io_runtime_check, set_string): Likewise. (transfer_namelist_element, transfer_array_component): Likewise. * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise. * trans-stmt.c (cleanup_forall_symtrees, gfc_trans_forall_1): Likewise. * trans.c (trans_runtime_error_vararg, gfc_restore_backend_locus): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172666 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-04 Tobias Burnus <burnus@net-b.de>burnus2011-04-041-17/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mikael Morin <mikael.morin@sfr.fr> PR fortran/18918 * check.c (is_coarray): Update - because of DIMEN_THIS_IMAGE. * expr.c (gfc_is_coindexed): Ditto. * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_THIS_IMAGE. * interface.c (compare_parameter): Use gfc_expr_attr and gfc_is_coindexed. * resolve.c (check_dimension, compare_spec_to_ref, resolve_allocate_expr, check_data_variable): Update for DIMEN_THIS_IMAGE. * simplify.c (gfc_simplify_lcobound, gfc_simplify_this_image, gfc_simplify_ucobound): Allow non-constant bounds. * trans-array.c (gfc_set_loop_bounds_from_array_spec, gfc_trans_create_temp_array, gfc_trans_constant_array_constructor, gfc_set_vector_loop_bounds, gfc_conv_array_index_offset, gfc_start_scalarized_body, gfc_trans_scalarizing_loops, gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride, gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_trans_array_bounds, gfc_conv_expr_descriptor, gfc_walk_variable_expr): Handle codimen. * trans-decl.c (gfc_build_qualified_array): Save cobounds. * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use arg2. (conv_intrinsic_cobound): New function. (gfc_conv_intrinsic_function): Call it. (gfc_walk_intrinsic_function, gfc_add_intrinsic_ss_code): Handle ucobound, lcobound, this_image. * fortran/trans-types.c (gfc_build_array_type): Save cobounds. (gfc_get_dtype): Honour corank. (gfc_get_nodesc_array_type): Save corank and codimensions. (gfc_get_array_type_bounds): Save cobound. * fortran/trans.h (gfc_ss_info,gfc_loopinfo): Add codimen item. (gfc_array_kind): Add corank item. (GFC_TYPE_ARRAY_CORANK): New macro. 2011-04-04 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.dg/coarray_10.f90: Add coarray descriptor diagnostic check. * gfortran.dg/coarray_13.f90: Add checks for run-time cobounds. * gfortran.dg/coarray_15.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171949 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-02-16 Janus Weil <janus@gcc.gnu.org>janus2011-02-161-1/+5
| | | | | | | | | | | | | | | | | | | | PR fortran/47745 * class.c (gfc_build_class_symbol): Set 'class_ok' attribute. * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into 'gfc_build_class_symbol'. (gfc_match_decl_type_spec): Reject unlimited polymorphism. * interface.c (matching_typebound_op): Check for 'class_ok' attribute. * match.c (select_type_set_tmp): Move setting of 'class_ok' into 'gfc_build_class_symbol'. * primary.c (gfc_variable_attr): Check for 'class_ok' attribute. 2011-02-16 Janus Weil <janus@gcc.gnu.org> PR fortran/47745 * gfortran.dg/class_39.f03: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170223 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-02-14 Janus Weil <janus@gcc.gnu.org>janus2011-02-141-6/+4
| | | | | | | | | | | | | | PR fortran/47349 * interface.c (get_expr_storage_size): Handle derived-type components. 2011-02-14 Janus Weil <janus@gcc.gnu.org> PR fortran/47349 * gfortran.dg/argument_checking_18.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170125 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-02-13 Tobias Burnus <burnus@net-b.de>burnus2011-02-131-25/+48
| | | | | | | | | | | | | | | PR fortran/47569 * interface.c (compare_parameter): Avoid ICE with character components. 2011-02-13 Tobias Burnus <burnus@net-b.de> * gfortran.dg/argument_checking_13.f90: Update dg-error. * gfortran.dg/argument_checking_17.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170110 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-01-31 Tobias Burnus <burnus@net-b.de>burnus2011-01-301-0/+24
| | | | | | | | | | | | | | | | PR fortran/47042 * interface.c (gfc_procedure_use): Add explicit interface check * for pointer/allocatable functions. 2011-01-31 Tobias Burnus <burnus@net-b.de> PR fortran/47042 * gfortran.dg/interface_34.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169414 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-01-28 Paul Thomas <pault@gcc.gnu.org>pault2011-01-281-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tobias Burnus <burnus@gcc.gnu.org> PR fortran/45170 PR fortran/35810 PR fortran/47350 * interface.c (compare_actual_formal): An allocatable or pointer deferred length actual is only allowed if the formal argument is also deferred length. Clean up whitespace. * trans-expr.c (gfc_conv_procedure_call): Pass string length for deferred character length formal arguments by reference. Do the same for function results. (gfc_trans_pointer_assignment): Do not do runtime check of lhs and rhs character lengths, if deferred length lhs. In this case set the lhs character length to that of the rhs. (gfc_conv_string_parameter): Remove assert that string length is an integer type. (is_scalar_reallocatable_lhs): New function. (alloc_scalar_allocatable_for_assignment): New function. (gfc_trans_assignment_1): Call above new function. If the rhs is a deferred character length itself, makes ure that the function is called before reallocation, so that the length is available. (gfc_trans_asssignment): Remove error about assignment to deferred length character variables. * gfortran.texi : Update entry about (re)allocation on assignment. * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred length character variables. * module.c (mio_typespec): Transfer deferred characteristic. * trans-types.c (gfc_get_function_type): New code to generate hidden typelist, so that those character lengths that are passed by reference get the right type. * resolve.c (resolve_contained_fntype): Supress error for deferred character length functions. (resolve_function, resolve_fl_procedure) The same. (check_symbols): Remove the error that support for entity with deferred type parameter is not yet implemented. (resolve_fl_derived): The same. match.c (alloc_opt_list): Allow MOLD for deferred length object. * trans-decl.c (gfc_get_symbol_decl): For deferred character length dummies, generate a local variable for string length. (create_function_arglist): Hidden length can be a pointer. (gfc_trans_deferred_vars): For deferred character length results and dummies, assign the string length to the local variable from the hidden argument on entry and the other way round on exit, as appropriate. 2011-01-28 Paul Thomas <pault@gcc.gnu.org> Tobias Burnus <burnus@gcc.gnu.org> PR fortran/45170 PR fortran/35810 PR fortran/47350 * gfortran.dg/realloc_on_assign_3.f03: New test. * gfortran.dg/realloc_on_assign_4.f03: New test. * gfortran.dg/realloc_on_assign_5.f90: New test. * gfortran.dg/allocatable_function_5.f90: New test. * gfortran.dg/allocate_deferred_char_scalar_1.f90: New test. * gfortran.dg/deferred_type_param_2.f90: Remove two "not yet implemented" dg-errors. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169356 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-01-25 Tobias Burnus <burnus@net-b.de>burnus2011-01-251-2/+3
| | | | | | | | | | | | | | | PR fortran/47448 * interface.c (gfc_check_operator_interface): Fix defined-assignment check. 2011-01-25 Tobias Burnus <burnus@net-b.de> PR fortran/47448 * gfortran.dg/redefined_intrinsic_assignment_2.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169228 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/fortran/:dfranke2011-01-061-16/+28
| | | | | | | | | | | | | | | | | | | | | 2011-01-06 Daniel Franke <franke.daniel@gmail.com> PR fortran/33117 PR fortran/46478 * parse.c (parse_interface): Remove check for procedure types. * interface.c (check_interface0): Verify that procedures are either all SUBROUTINEs or all FUNCTIONs. gcc/testsuite/: 2011-01-06 Daniel Franke <franke.daniel@gmail.com> PR fortran/33117 PR fortran/46478 * gfortran.dg/interface_33.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168542 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-30 Janus Weil <janus@gcc.gnu.org>janus2010-10-301-3/+6
| | | | | | | | | | | | | | | | | | PR fortran/44917 PR fortran/44926 PR fortran/46196 * interface.c (count_types_test): Symmetrize type check. (generic_correspondence): Ditto. 2010-10-30 Janus Weil <janus@gcc.gnu.org> PR fortran/44917 PR fortran/44926 PR fortran/46196 * gfortran.dg/typebound_generic_10.f03: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166089 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-27 Janus Weil <janus@gcc.gnu.org>janus2010-10-271-1/+24
| | | | | | | | | | | | | | PR fortran/46161 * interface.c (compare_allocatable): Handle polymorphic allocatables. (compare_parameter): Add two error messages for polymorphic dummies. 2010-10-27 Janus Weil <janus@gcc.gnu.org> PR fortran/46161 * gfortran.dg/class_dummy_3.f03: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166018 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-21 Janus Weil <janus@gcc.gnu.org>janus2010-10-211-1/+1
| | | | | | | | | | | | | | | | PR fortran/46067 * interface.c (gfc_compare_interfaces): Switch arguments of type comparison (important for polymorphic variables). 2010-10-21 Janus Weil <janus@gcc.gnu.org> PR fortran/46067 * gfortran.dg/dummy_procedure_4.f90: New. * gfortran.dg/proc_ptr_30.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165755 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-09-25 Tobias Burnus <burnus@net-b.de>burnus2010-09-251-1/+1
| | | | | | | | | * interface.c (gfc_match_end_interface): Constify char pointer to fix warning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164617 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-09-24 Steven G. Kargl < kargl@gcc.gnu.org>kargl2010-09-251-4/+34
| | | | | | | | | | | | * fortran/interface.c (gfc_match_end_interface): Deal with user defined operators that overload rational operators and C1202. 2010-09-24 Steven G. Kargl < kargl@gcc.gnu.org> * testsuite/gfortran.dg/operator_c1202.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164616 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-09-23 Daniel Kraft <d@domob.eu>domob2010-09-231-49/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/38936 PR fortran/44044 PR fortran/45474 * gfortran.h (gfc_check_vardef_context): New method. (struct symbol_attribute): New flag `select_type_temporary'. * primary.c (gfc_variable_attr): Clarify initialization of ref. (match_variable): Remove PROTECTED check and assignment check for PARAMETERs (this is now done later). * match.c (gfc_match_iterator): Remove INTENT(IN) check. (gfc_match_associate): Defer initialization of newAssoc->variable. (gfc_match_nullify): Remove PURE definability check. (select_type_set_tmp): Set new `select_type_temporary' flag. * expr.c (gfc_check_assign): Remove INTENT(IN) check here. (gfc_check_pointer_assign): Ditto (and other checks removed). (gfc_check_vardef_context): New method. * interface.c (compare_parameter_protected): Removed. (compare_actual_formal): Use `gfc_check_vardef_context' for checks related to INTENT([IN]OUT) arguments. * intrinsic.c (check_arglist): Check INTENT for intrinsics. * resolve.c (gfc_resolve_iterator): Use `gfc_check_vardef_context'. (remove_last_array_ref): New method. (resolve_deallocate_expr), (resolve_allocate_expr): Ditto. (resolve_allocate_deallocate): Ditto (for STAT and ERRMSG). (resolve_assoc_var): Remove checks for definability here. (resolve_select_type): Handle resolving of code->block here. (resolve_ordinary_assign): Remove PURE check. (resolve_code): Do not resolve code->blocks for SELECT TYPE here. Use `gfc_check_vardef_context' for assignments and pointer-assignments. 2010-09-23 Daniel Kraft <d@domob.eu> PR fortran/38936 PR fortran/44044 PR fortran/45474 * gfortran.dg/intrinsic_intent_1.f03: New test. * gfortran.dg/select_type_17.f03: New test. * gfortran.dg/associate_5.f03: More definability tests. * gfortran.dg/enum_2.f90: Check definability. * gfortran.dg/allocatable_dummy_2.f90: Change expected error message. * gfortran.dg/allocate_alloc_opt_2.f90: Ditto. * gfortran.dg/char_expr_2.f90: Ditto. * gfortran.dg/deallocate_alloc_opt_2.f90: Ditto. * gfortran.dg/enum_5.f90: Ditto. * gfortran.dg/equiv_constraint_8.f90: Ditto. * gfortran.dg/impure_assignment_2.f90: Ditto. * gfortran.dg/impure_assignment_3.f90: Ditto. * gfortran.dg/intent_out_1.f90: Ditto. * gfortran.dg/intent_out_3.f90: Ditto. * gfortran.dg/pointer_assign_7.f90: Ditto. * gfortran.dg/pointer_intent_3.f90: Ditto. * gfortran.dg/pr19936_1.f90: Ditto. * gfortran.dg/proc_ptr_comp_3.f90: Ditto. * gfortran.dg/simpleif_2.f90: Ditto. * gfortran.dg/protected_5.f90: Ditto. * gfortran.dg/protected_4.f90: Ditto and remove invalid error check. * gfortran.dg/protected_6.f90: Ditto. * gfortran.dg/protected_7.f90: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164550 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-09-16 Janus Weil <janus@gcc.gnu.org>janus2010-09-161-2/+2
| | | | | | | | | | | | | | | PR fortran/45674 * interface.c (compare_parameter): Create vtab for actual argument, instead of formal (if needed). 2010-09-16 Janus Weil <janus@gcc.gnu.org> PR fortran/45674 * gfortran.dg/class_dummy_2.f03: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164338 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-08-15 Tobias Burnus <burnus@net-b.de>burnus2010-08-151-1/+16
| | | | | | | | | | | | | | | | | | * trans-expr.c (gfc_conv_expr_present): Regard nullified pointer arrays as absent. (gfc_conv_procedure_call): Handle EXPR_NULL for non-pointer dummys as absent argument. * interface.c (compare_actual_formal,compare_parameter): Ditto. 2010-08-15 Tobias Burnus <burnus@net-b.de> * gfortran.dg/optional_absent_1.f90: New. * gfortran.dg/null_actual.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163263 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-08-15 Tobias Burnus <burnus@net-b.de>burnus2010-08-151-0/+16
| | | | | | | | | | | | | | | * interface.c (compare_pointer, ): Allow passing TARGETs to pointers dummies with intent(in). 2010-08-15 Tobias Burnus <burnus@net-b.de> * gfortran.dg/pointer_target_1.f90: New. * gfortran.dg/pointer_target_2.f90: New. * gfortran.dg/pointer_target_3.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163262 138bc75d-0d04-0410-961f-82ee72b054a4
* * interface.c (compare_actual_formal): Use XALLOCAVEC instead offroydnj2010-08-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | alloca. (check_some_aliasing): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Likewise. (gfc_conv_intrinsic_int): Likewise. (gfc_conv_intrinsic_lib_function): Likewise. (gfc_conv_intrinsic_cmplx): Likewise. (gfc_conv_intrinsic_ctime): Likewise. (gfc_conv_intrinsic_fdate): Likewise. (gfc_conv_intrinsic_ttynam): Likewise. (gfc_conv_intrinsic_minmax): Likewise. (gfc_conv_intrinsic_minmax_char): Likewise. (gfc_conv_intrinsic_ishftc): Likewise. (gfc_conv_intrinsic_index_scan_verify): Likewise. (gfc_conv_intrinsic_merge): Likewise. (gfc_conv_intrinsic_trim): Likewise. * trans.c (gfc_trans_runtime_error_vararg): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162984 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-08-04 Janus Weil <janus@gcc.gnu.org>janus2010-08-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | PR fortran/42207 PR fortran/44064 PR fortran/44065 * class.c (gfc_find_derived_vtab): Do not generate vtabs for class container types. Do not artificially increase refs. Commit symbols one by one. * interface.c (compare_parameter): Make sure vtabs are present before generating module variables. * resolve.c (resolve_allocate_expr): Ditto. 2010-08-04 Janus Weil <janus@gcc.gnu.org> PR fortran/42207 PR fortran/44064 PR fortran/44065 * gfortran.dg/class_25.f03: New. * gfortran.dg/class_26.f03: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162879 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/fortran/burnus2010-07-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2010-07-24 Tobias Burnus <burnus@net-b.de> * options.c (gfc_init_options): Enable -fwhole-file by default. * interface.c (compare_parameter): Assume a Hollerith constant is compatible with all other argument types. libgomp/ 2010-07-24 Tobias Burnus <burnus@net-b.de> * testsuite/libgomp.fortran/appendix-a/a.28.5.f90: Add -w to silence -fwhole-file warning. gcc/testsuite/ 2010-07-24 Tobias Burnus <burnus@net-b.de> * gfortran.dg/func_decl_4.f90: Split test into two ... * gfortran.dg/func_decl_5.f90: ... parts. * gfortran.dg/common_resize_1.f: xfail two warnings (cf. PR 45045). * gfortran.dg/bounds_temporaries_1.f90: Add new dg-warning. * gfortran.dg/global_references_1.f90: Add new dg-warning. * gfortran.dg/generic_actual_arg.f90: Add new dg-warning. * gfortran.dg/entry_17.f90: Remove no-longer needed dg-warning. * gfortran.dg/used_before_typed_4.f90: Add new dg-warning. * gfortran.dg/bounds_check_strlen_1.f90: Add new dg-warning. * gfortran.dg/intrinsic_std_1.f90: Split by remove tree dump ... * gfortran.dg/intrinsic_std_6.f90: ... and create a dump test. * gfortran.dg/sizeof.f90: Make test valid. * gfortran.dg/pr20865.f90: Add new dg-error. * gfortran.dg/integer_exponentiation_2.f90: Add new dg-warnings. * gfortran.dg/g77/19990218-0.f: Ditto. * gfortran.dg/g77/19990218-1.f: Ditto. * gfortran.dg/g77/970625-2.f: Ditto. * gfortran.dg/pr37243.f: Fix function declaration. * gfortran.dg/use_only_1.f90: Fix implicit typing. * gfortran.dg/loc_1.f90: Fix pointer datatype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162491 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-07-19 Paul Thomas <pault@gcc.gnu.org>pault2010-07-191-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/42385 * interface.c (matching_typebound_op): Add argument for the return of the generic name for the procedure. (build_compcall_for_operator): Add an argument for the generic name of an operator procedure and supply it to the expression. (gfc_extend_expr, gfc_extend_assign): Use the generic name in calls to the above procedures. * resolve.c (resolve_typebound_function): Catch procedure component calls for CLASS objects, check that the vtable is complete and insert the $vptr and procedure components, to make the call. (resolve_typebound_function): The same. * trans-decl.c (gfc_trans_deferred_vars): Do not deallocate an allocatable scalar if it is a result. 2010-07-19 Paul Thomas <pault@gcc.gnu.org> PR fortran/42385 * gfortran.dg/class_defined_operator_1.f03 : New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162313 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-06-28 Paul Thomas <pault@gcc.gnu.org>pault2010-06-281-6/+28
| | | | | | | | | | | | | | | PR fortran/40158 * interface.c (argument_rank_mismatch): New function. (compare_parameter): Call new function instead of generating the error directly. 2010-06-28 Paul Thomas <pault@gcc.gnu.org> PR fortran/40158 * gfortran.dg/actual_rank_check_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161504 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-06-20 Tobias Burnus <burnus@net-b.de>burnus2010-06-211-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/40632 * interface.c (compare_parameter): Add gfc_is_simply_contiguous checks. * symbol.c (gfc_add_contiguous): New function. (gfc_copy_attr, check_conflict): Handle contiguous attribute. * decl.c (match_attr_spec): Ditto. (gfc_match_contiguous): New function. * resolve.c (resolve_fl_derived, resolve_symbol): Handle contiguous. * gfortran.h (symbol_attribute): Add contiguous. (gfc_is_simply_contiguous): Add prototype. (gfc_add_contiguous): Add prototype. * match.h (gfc_match_contiguous): Add prototype. * parse.c (decode_specification_statement, decode_statement): Handle contiguous attribute. * expr.c (gfc_is_simply_contiguous): New function. * dump-parse-tree.c (show_attr): Handle contiguous. * module.c (ab_attribute, attr_bits, mio_symbol_attribute): Ditto. * trans-expr.c (gfc_add_interface_mapping): Copy attr.contiguous. * trans-array.c (gfc_conv_descriptor_stride_get, gfc_conv_array_parameter): Handle contiguous arrays. * trans-types.c (gfc_build_array_type, gfc_build_array_type, gfc_sym_type, gfc_get_derived_type, gfc_get_array_descr_info): Ditto. * trans.h (gfc_array_kind): Ditto. * trans-decl.c (gfc_get_symbol_decl): Ditto. 2010-06-20 Tobias Burnus <burnus@net-b.de> PR fortran/40632 * gfortran.dg/contiguous_1.f90: New. * gfortran.dg/contiguous_2.f90: New. * gfortran.dg/contiguous_3.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161079 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/fortran/:dfranke2010-06-101-4/+6
| | | | | | | | | | | | | | | | | | 2010-06-10 Daniel Franke <franke.daniel@gmail.com> PR fortran/44457 * interface.c (compare_actual_formal): Reject actual arguments with array subscript passed to ASYNCHRONOUS dummys. gcc/testsuite/: 2010-06-10 Daniel Franke <franke.daniel@gmail.com> PR fortran/44457 * gfortran.dg/asynchronous_3.f03 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160567 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud