aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
AgeCommit message (Collapse)AuthorFilesLines
2011-07-31re PR fortran/49112 ([OOP] Missing type-bound procedure, "duplicate save" ↵Janus Weil2-25/+62
warnings and internal compiler error) 2011-07-31 Janus Weil <janus@gcc.gnu.org> PR fortran/49112 * resolve.c (resolve_structure_cons): Don't do the full dt resolution, only call 'resolve_fl_derived0'. (resolve_typebound_procedures): Resolve typebound procedures of parent type. (resolve_fl_derived0): New function, which does a part of the work for 'resolve_fl_derived'. (resolve_fl_derived): Call 'resolve_fl_derived0' and do some additional things. 2011-07-31 Janus Weil <janus@gcc.gnu.org> PR fortran/49112 * gfortran.dg/abstract_type_6.f03: Modified. * gfortran.dg/typebound_proc_24.f03: New. From-SVN: r176971
2011-07-30re PR fortran/48876 (ICE when initializing character variable with ↵Thomas Koenig2-0/+9
zero-length string) 2011-07-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/48876 * expr.c (gfc_simplify_expr): If end of a string is less than zero, set it to zero. 2011-07-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/48876 * gfortran.dg/string_5.f90: New test. From-SVN: r176961
2011-07-28re PR fortran/31067 (MINLOC should sometimes be inlined (gas_dyn is sooooo ↵Jakub Jelinek2-1/+62
sloooow)) PR fortran/31067 * frontend-passes.c (optimize_minmaxloc): New function. (optimize_expr): Call it. * gfortran.dg/maxloc_2.f90: New test. * gfortran.dg/maxloc_3.f90: New test. * gfortran.dg/minloc_1.f90: New test. * gfortran.dg/minloc_2.f90: New test. * gfortran.dg/minloc_3.f90: New test. * gfortran.dg/minmaxloc_7.f90: New test. From-SVN: r176897
2011-07-28re PR fortran/45586 (ICE non-trivial conversion at assignment)Tobias Burnus2-0/+9
2011-07-27 Tobias Burnus <burnus@net-b.de> PR fortran/45586 * trans-types.c (gfc_get_derived_type): Ensure that pointer component types are marked as nonrestricted. 2011-07-27 Tobias Burnus <burnus@net-b.de> PR fortran/45586 * gfortran.dg/lto/pr45586-2_0.f90: New. From-SVN: r176852
2011-07-27re PR fortran/49755 (ALLOCATE with STAT= produces invalid code for already ↵Daniel Carrera6-107/+135
allocated vars) 2011-07-26 Daniel Carrera <dcarrera@gmail.com> PR fortran/49755 * trans.c (gfc_allocate_using_malloc): Change function signature. Return nothing. New parameter "pointer". Eliminate temorary variables. (gfc_allocate_using_lib): Ditto. (gfc_allocate_allocatable): Ditto. Update call to gfc_allocate_using_lib and gfc_allocate_using_malloc. Do not free and then reallocate a variable that is already allocated. (gfc_likely): New function. Basedon gfc_unlikely. * trans-array.c (gfc_array_init_size): New parameter "descriptor_block". Instructions to modify the array descriptor are stored in this block while other instructions continue to be stored in "pblock". (gfc_array_allocate): Update call to gfc_array_init_size. Move the descriptor_block so that the array descriptor is only updated if the array was allocated successfully. Update calls to gfc_allocate_allocatable and gfc_allocate_using_malloc. * trans.h (gfc_allocate_allocatable): Change function signature. Function now returns void. (gfc_allocate_using_lib): Ditto, and new function parameter. (gfc_allocate_using_malloc): Ditto. * trans-openmp.c (gfc_omp_clause_default_ctor, gfc_omp_clause_copy_ctor,gfc_trans_omp_array_reduction): Replace a call to gfc_allocate_allocatable with gfc_allocate_using_malloc. * trans-stmt.c (gfc_trans_allocate): Update function calls for gfc_allocate_allocatable and gfc_allocate_using_malloc. 2011-07-26 Daniel Carrera <dcarrera@gmail.com> PR fortran/49755 * gfortran.dg/multiple_allocation_1.f90: Fix test. Allocating an allocated array should *not* change its size. * gfortran.dg/multiple_allocation_3.f90: New test. From-SVN: r176822
2011-07-26trans-array.c (CAF_TOKEN_FIELD): New macro constant.Tobias Burnus5-21/+86
2011-07-26 Tobias Burnus <burnus@net-b.de> * trans-array.c (CAF_TOKEN_FIELD): New macro constant. (gfc_conv_descriptor_token): New function. * trans-array.h (gfc_conv_descriptor_token): New prototype. * trans-types.c (gfc_get_array_descriptor_base): For coarrays with -fcoarray=lib, append "void *token" to the array descriptor. (gfc_array_descriptor_base_caf): New static variable. * trans-expr.c (gfc_conv_procedure_call): Handle token and * offset when passing a descriptor coarray to a nondescriptor dummy. 2011-07-26 Tobias Burnus <burnus@net-b.de> * gfortran.dg/coarray_lib_token_2.f90: New. From-SVN: r176784
2011-07-23resolve.c (resolve_symbol): Fix coarray var decl check.Tobias Burnus2-5/+7
2011-07-23 Tobias Burnus <burnus@net-b.de> * resolve.c (resolve_symbol): Fix coarray var decl check. 2011-07-23 Tobias Burnus <burnus@net-b.de> * gfortran.dg/coarray_25.f90: New. From-SVN: r176660
2011-07-21trans.c (gfc_allocate_with_status): Split into two functions ↵Daniel Carrera7-151/+224
gfc_allocate_using_malloc and gfc_allocate_usig_lib. 2011-07-21 Daniel Carrera <dcarrera@gmail.com> * trans.c (gfc_allocate_with_status): Split into two functions gfc_allocate_using_malloc and gfc_allocate_usig_lib. (gfc_allocate_using_malloc): The status parameter is now the actual status rather than a pointer. Code cleanup. (gfc_allocate_using_lib): Ditto. Add new parametrs errmsg and errlen. Pass these to the coarray lib. * trans-openmp.c (gfc_omp_clause_default_ctor): Update calls to gfc_allocate_allocatable. (gfc_omp_clause_copy_ctor): Ditto. (gfc_trans_omp_array_reduction): Ditto. * trans-stmt.c (gfc_trans_allocate): Ditto. Update call to gfc_allocate_using_malloc. Pass stat rather than pstat to the allocate fuctions. If using coarray lib, pass errmsg and errlen to the allocate functions. Move error checking outside the if (!gfc_array_allocate) block so that it also affects trees produced by gfc_array_allocate. * trans-array.c (gfc_array_allocate): Add new parameters errmsg and errlen. Replace parameter pstat by status. Code cleanup. Update calls to gfc_allocate_allocatable and gfc_allocate_using_malloc. * trans-array.h (gfc_array_allocate): Update signature of gfc_array_allocate. From-SVN: r176606
2011-07-21Steven G. Kargl <kargl@gcc.gnu.org>Steven G. Kargl2-1/+5
* gfortran.texi: Remove a duplicate word. From-SVN: r176587
2011-07-21check.c (gfc_check_present): Allow coarrays.Tobias Burnus6-4/+146
2011-07-21 Tobias Burnus <burnus@net-b.de> * check.c (gfc_check_present): Allow coarrays. * trans-array.c (gfc_conv_array_ref): Avoid casting when a pointer is wanted. * trans-decl.c (create_function_arglist): For -fcoarray=lib, handle hidden token and offset arguments for nondescriptor coarrays. * trans-expr.c (get_tree_for_caf_expr): New function. (gfc_conv_procedure_call): For -fcoarray=lib pass the token and offset for nondescriptor coarray dummies. * trans.h (lang_type): Add caf_offset tree. (GFC_TYPE_ARRAY_CAF_OFFSET): New macro. 2011-07-21 Tobias Burnus <burnus@net-b.de> * gfortran.dg/coarray_lib_token_1.f90: New. From-SVN: r176562
2011-07-19expr.c (gfc_is_coarray): New function.Tobias Burnus4-35/+91
2011-07-19 Tobias Burnus <burnus@net-b.de> * 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. From-SVN: r176467
2011-07-19tree.h (fold_build_pointer_plus_loc): New helper function.Richard Guenther5-17/+24
2011-07-19 Richard Guenther <rguenther@suse.de> * tree.h (fold_build_pointer_plus_loc): New helper function. (fold_build_pointer_plus_hwi_loc): Likewise. (fold_build_pointer_plus): Define. (fold_build_pointer_plus_hwi): Likewise. * builtins.c (std_gimplify_va_arg_expr): Use fold_build_pointer_plus. (fold_builtin_memory_op): Likewise. (fold_builtin_stpcpy): Likewise. (fold_builtin_memchr): Likewise. (fold_builtin_strstr): Likewise. (fold_builtin_strchr): Likewise. (fold_builtin_strrchr): Likewise. (fold_builtin_strpbrk): Likewise. (fold_builtin_strcat): Likewise. (expand_builtin_memory_chk): Likewise. (fold_builtin_memory_chk): Likewise. * c-typeck.c (build_unary_op): Likewise. * cgraphunit.c (thunk_adjust): Likewise. * fold-const.c (build_range_check): Likewise. (fold_binary_loc): Likewise. * omp-low.c (extract_omp_for_data): Likewise. (expand_omp_for_generic): Likewise. (expand_omp_for_static_nochunk): Likewise. (expand_omp_for_static_chunk): Likewise. * tree-affine.c (add_elt_to_tree): Likewise. * tree-data-ref.c (split_constant_offset_1): Likewise. * tree-loop-distribution.c (generate_memset_zero): Likewise. * tree-mudflap.c (mf_xform_derefs_1): Likewise. * tree-predcom.c (ref_at_iteration): Likewise. * tree-ssa-address.c (tree_mem_ref_addr): Likewise. (add_to_parts): Likewise. (create_mem_ref): Likewise. * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise. * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Likewise. (number_of_iterations_le): Likewise. * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Likewise. * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise. (vect_create_addr_base_for_vector_ref): Likewise. * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Likewise. (vect_create_cond_for_alias_checks): Likewise. * tree-vrp.c (extract_range_from_assert): Likewise. * config/alpha/alpha.c (alpha_va_start): Likewise. (alpha_gimplify_va_arg_1): Likewise. * config/i386/i386.c (ix86_va_start): Likewise. (ix86_gimplify_va_arg): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/mep/mep.c (mep_expand_va_start): Likewise. (mep_gimplify_va_arg_expr): Likewise. * config/mips/mips.c (mips_va_start): Likewise. (mips_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_va_start): Likewise. (rs6000_gimplify_va_arg): Likewise. * config/s390/s390.c (s390_va_start): Likewise. (s390_gimplify_va_arg): Likewise. * config/sh/sh.c (sh_va_start): Likewise. (sh_gimplify_va_arg_expr): Likewise. * config/sparc/sparc.c (sparc_gimplify_va_arg): Likewise. * config/spu/spu.c (spu_va_start): Likewise. (spu_gimplify_va_arg_expr): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. (xstormy16_gimplify_va_arg_expr): Likewise. * config/xtensa/xtensa.c (xtensa_va_start): Likewise. (xtensa_gimplify_va_arg_expr): Likewise. c-family/ * c-common.c (pointer_int_sum): Use fold_build_pointer_plus. * c-omp.c (c_finish_omp_for): Likewise. cp/ * call.c (build_special_member_call): Use fold_build_pointer_plus. * class.c (build_base_path): Likewise. (convert_to_base_statically): Likewise. (dfs_accumulate_vtbl_inits): Likewise. * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise. * except.c (expand_start_catch_block): Likewise. * init.c (expand_virtual_init): Likewise. (build_new_1): Likewise. (build_vec_delete_1): Likewise. (build_vec_delete): Likewise. * rtti.c (build_headof): Likewise. (tinfo_base_init): Likewise. * typeck.c (get_member_function_from_ptrfunc): Likewise. (cp_build_addr_expr_1): Likewise. * typeck2.c (build_m_component_ref): Likewise. fortran/ * trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus. (gfc_trans_string_copy): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise. * trans-types.c (gfc_get_array_descr_info): Likewise. * trans.c (gfc_build_array_ref): Likewise. java/ * builtins.c (static): Use fold_build_pointer_plus. * class.c (make_class_data): Likewise. (build_symbol_entry): Likewise. * except.c (build_exception_object_ref): Likewise. * expr.c (build_java_arrayaccess): Likewise. (build_field_ref): Likewise. (build_known_method_ref): Likewise. (build_invokevirtual): Likewise. objc/ * objc-next-runtime-abi-02.c (objc_v2_build_ivar_ref): Use fold_build_pointer_plus. (objc2_build_ehtype_initializer): Likewise. From-SVN: r176461
2011-07-19re PR fortran/49708 (ICE with allocate and no dimensions)Janus Weil2-1/+6
2011-07-19 Janus Weil <janus@gcc.gnu.org> PR fortran/49708 * resolve.c (resolve_allocate_expr): Fix diagnostics for pointers. 2011-07-19 Janus Weil <janus@gcc.gnu.org> PR fortran/49708 * gfortran.dg/allocate_error_3.f90: New. From-SVN: r176447
2011-07-18trans-decl.c (gfc_build_qualified_array): Make coarray's token ↵Tobias Burnus2-3/+10
TYPE_QUAL_RESTRICT. 2011-07-17 Tobias Burnus <burnus@net-b.de> * trans-decl.c (gfc_build_qualified_array): Make coarray's token TYPE_QUAL_RESTRICT. From-SVN: r176404
2011-07-18resolve.c (resolve_transfer): Mention defined I/O in the diagnostic for ↵Tobias Burnus2-5/+12
alloc_comp/pointer_comp. 2011-07-18 Tobias Burnus <burnus@net-b.de> * resolve.c (resolve_transfer): Mention defined I/O in the diagnostic for alloc_comp/pointer_comp. From-SVN: r176386
2011-07-17re PR fortran/34657 (program-unit MY_SUB imports symbol MY_SUB)Tobias Burnus2-0/+13
2011-07-17 Tobias Burnus <burnus@net-b.de> PR fortran/34657 * module.c (check_for_ambiguous): Check whether the name is * matches the current program unit. 2011-07-17 Tobias Burnus <burnus@net-b.de> Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/34657 * gfortran.dg/generic_17.f90: Fix testcase. * gfortran.dg/interface_3.f90: Add dg-error. * gfortran.dg/use_14.f90: New. * gfortran.dg/use_15.f90: New. Co-Authored-By: Thomas Koenig <tkoenig@gcc.gnu.org> From-SVN: r176375
2011-07-17re PR fortran/49624 (ICE with pointer-bound remapping)Tobias Burnus2-1/+8
2011-07-17 Tobias Burnus <burnus@net-b.de> PR fortran/49624 * expr.c (gfc_check_pointer_assign): Fix checking for invalid pointer bounds. 2011-07-17 Tobias Burnus <burnus@net-b.de> PR fortran/49624 * gfortran.dg/pointer_remapping_7.f90: New. From-SVN: r176370
2011-07-16expr.c (gfc_ref_this_image): New function.Tobias Burnus9-53/+117
2011-07-16 Tobias Burnus <burnus@net-b.de> * expr.c (gfc_ref_this_image): New function. (gfc_is_coindexed): Use it. * gfortran.h (gfc_ref_this_image): New prototype. * resolve.c (resolve_deallocate_expr, resolve_allocate_expr): Support alloc scalar coarrays. * trans-array.c (gfc_conv_array_ref, gfc_array_init_size, gfc_conv_descriptor_cosize, gfc_array_allocate, gfc_trans_deferred_array): Ditto. * trans-expr.c (gfc_conv_variable) Ditto.: * trans-stmt.c (gfc_trans_deallocate): Ditto. * trans-types.c (gfc_get_element_type, gfc_get_array_type_bounds gfc_get_array_descr_info): Ditto. * trans-decl.c (gfc_get_symbol_decl): Ditto. 2011-07-16 Tobias Burnus <burnus@net-b.de> * gfortran.dg/coarray_14.f90: Remove dg-error "sorry not * implemented". * gfortran.dg/coarray_7.f90: Ditto. * gfortran.dg/coarray/scalar_alloc_1.f90: New. * gfortran.dg/coarray/scalar_alloc_2.f90: New. From-SVN: r176358
2011-07-11re PR fortran/49698 (Unmanageable compiler error)Jakub Jelinek2-1/+7
PR fortran/49698 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Initialize inner_size to gfc_index_one_node instead of integer_one_node. * gfortran.dg/pr49698.f90: New test. From-SVN: r176164
2011-07-10re PR fortran/49690 (ICE in gfc_typenode_for_spec, at ↵Tobias Burnus2-1/+6
fortran/trans-types.c:1019) 2011-07-10 Tobias Burnus <burnus@net-b.de> PR fortran/49690 * intrinsic.c (add_functions): Use BT_VOID for 2nd argument of * SIGNAL. 2011-07-10 Tobias Burnus <burnus@net-b.de> PR fortran/49690 * gfortran.dg/intrinsic_signal.f90: New. From-SVN: r176121
2011-07-09re PR fortran/48926 (gfortran.dg/coarray/image_index_1.f90 -fcoarray=single ↵Uros Bizjak3-3/+9
-O2 (test for excess errors)) PR fortran/48926 * expr.c (gfc_get_corank): Change return value to int. * gfortran.h (gfc_get_corank): Update function prototype. From-SVN: r176088
2011-07-07re PR fortran/49648 (ICE(segfault) with MATMUL and function-result actual ↵Mikael Morin2-0/+8
argument) 2011-07-07 Mikael Morin <mikael.morin@sfr.fr> PR fortran/49648 * resolve.c (resolve_symbol): Force resolution of function result's array specification. From-SVN: r176011
2011-07-07trans.c (gfc_allocate_with_status): Call _gfortran_caf_register with NULL ↵Tobias Burnus2-2/+10
arguments for (new) stat=/errmsg= arguments. 2011-07-07 Tobias Burnus <burnus@net-b.de> * trans.c (gfc_allocate_with_status): Call _gfortran_caf_register with NULL arguments for (new) stat=/errmsg= arguments. 2011-07-07 Tobias Burnus <burnus@net-b.de> * libcaf.h (__attribute__, unlikely, likely): New macros. (caf_register_t): Update comment. (_gfortran_caf_register): Add stat, errmsg, errmsg_len arguments. * single.c (_gfortran_caf_register): Ditto; add error diagnostics. * mpi.c (_gfortran_caf_register): Ditto. (caf_is_finalized): New global variable. (_gfortran_caf_finalize): Use it. From-SVN: r175966
2011-07-06trans-array.c (gfc_array_allocate): Rename allocatable_arrayDaniel Carrera7-38/+97
2011-07-06 Daniel Carrera <dcarrera@gmail.com> * trans-array.c (gfc_array_allocate): Rename allocatable_array * to allocatable. Rename function gfc_allocate_array_with_status to gfc_allocate_allocatable_with_status. Update function call for gfc_allocate_with_status. * trans-opemp.c (gfc_omp_clause_default_ctor): Rename function gfc_allocate_array_with_status to gfc_allocate_allocatable_with_status. * trans-stmt.c (gfc_trans_allocate): Update function call for gfc_allocate_with_status. Rename function gfc_allocate_array_with_status to gfc_allocate_allocatable_with_status. * trans.c (gfc_call_malloc): Add new parameter * gfc_allocate_with_status so it uses the library for memory allocation when -fcoarray=lib. (gfc_allocate_allocatable_with_status): Renamed from gfc_allocate_array_with_status. (gfc_allocate_allocatable_with_status): Update function call for gfc_allocate_with_status. * trans.h (gfc_coarray_type): New enum. (gfc_allocate_with_status): Update prototype. (gfc_allocate_allocatable_with_status): Renamed from gfc_allocate_array_with_status. * trans-decl.c (generate_coarray_sym_init): Use the new constant GFC_CAF_COARRAY_ALLOC in the call to gfor_fndecl_caf_register. From-SVN: r175937
2011-07-06tree.c (build_common_tree_nodes_2): Merge with build_common_tree_nodes.Richard Guenther2-2/+6
2011-07-06 Richard Guenther <rguenther@suse.de> * tree.c (build_common_tree_nodes_2): Merge with build_common_tree_nodes. * tree.h (build_common_tree_nodes): Adjust prototype. (build_common_tree_nodes_2): Remove. * doc/tm.texi.in (lang_hooks.builtin_function): Adjust. * doc/tm.texi (lang_hooks.builtin_function): Regenerate. c-family/ * c-common.c (c_common_nodes_and_builtins): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. fortran/ * f95-lang.c (gfc_init_decl_processing): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. go/ * go-lang.c (go_langhook_init): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. java/ * decl.c (java_init_decl_processing): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. lto/ * lto-lang.c (lto_init): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. ada/ * gcc-interface/misc.c (gnat_init): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. Re-initialize boolean_false_node. From-SVN: r175906
2011-07-04re PR fortran/49623 (Segfault of "gfortran -L" if no argument follows the "-L")Jakub Jelinek2-0/+9
PR fortran/49623 * gfortranspec.c (lang_specific_driver): Ignore options with CL_ERR_MISSING_ARG errors. From-SVN: r175830
2011-07-02re PR fortran/49562 ([OOP] assigning value to type-bound function)Janus Weil2-3/+7
2011-07-02 Janus Weil <janus@gcc.gnu.org> PR fortran/49562 * expr.c (gfc_check_vardef_context): Handle type-bound procedures. 2011-07-02 Janus Weil <janus@gcc.gnu.org> PR fortran/49562 * gfortran.dg/typebound_proc_23.f90: New. From-SVN: r175779
2011-06-30re PR fortran/49540 (Memory-hog with large DATA stmt)Jakub Jelinek9-49/+243
PR fortran/49540 * gfortran.h (gfc_constructor): Add repeat field. * trans-array.c (gfc_conv_array_initializer): Handle repeat > 1. * array.c (current_expand): Add repeat field. (expand_constructor): Copy repeat. * constructor.c (node_free, node_copy, gfc_constructor_get, gfc_constructor_lookup): Handle repeat field. (gfc_constructor_lookup_next, gfc_constructor_remove): New functions. * data.h (gfc_assign_data_value): Add mpz_t * argument. (gfc_assign_data_value_range): Removed. * constructor.h (gfc_constructor_advance): Removed. (gfc_constructor_lookup_next, gfc_constructor_remove): New prototypes. * data.c (gfc_assign_data_value): Add REPEAT argument, handle it and also handle overwriting a range with a single entry. (gfc_assign_data_value_range): Removed. * resolve.c (check_data_variable): Adjust gfc_assign_data_value call. Use gfc_assign_data_value instead of gfc_assign_data_value_expr. * gfortran.dg/pr49540-1.f90: New test. * gfortran.dg/pr49540-2.f90: New test. From-SVN: r175693
2011-06-27re PR fortran/49466 (Memory leak with assignment of extended derived types)Janus Weil2-8/+18
2011-06-27 Janus Weil <janus@gcc.gnu.org> PR fortran/49466 * trans-array.c (structure_alloc_comps): Make sure sub-components and extended types are correctly deallocated. 2011-06-27 Janus Weil <janus@gcc.gnu.org> PR fortran/49466 * gfortran.dg/allocatable_scalar_9.f90: Modified. * gfortran.dg/extends_14.f03: Modified. From-SVN: r175563
2011-06-21cosmetic. Add sync_ to all the expand_builtin defines which do not match the ↵Andrew MacLeod4-4/+10
actual builtin_sync_ names. 2011-06-21 Andrew MacLeod <amacleod@redhat.com> * builtins.c: Add sync_ or SYNC__ to builtin names. * sync-builtins.def: Add sync_ or SYNC__ to builtin names. * omp-low.c: Add sync_ or SYNC__ to builtin names. * c-family/c-common.c: Add sync_ or SYNC__ to builtin names. * c-family/c-omp.c: Add sync_ or SYNC__ to builtin names. * java/builtins.c: Add sync_ or SYNC__ to builtin names. * java/expr.c: Add sync_ or SYNC__ to builtin names. * cp/semantics.c: Add sync_ or SYNC__ to builtin names. * fortran/trans-openmp.c: Add sync_ or SYNC__ to builtin names. * fortran/trans-stmt.c: Add sync_ or SYNC__ to builtin names. * fortran/trans-decl.c: Add sync_ or SYNC__ to builtin names. From-SVN: r175270
2011-06-21re PR fortran/49112 ([OOP] Missing type-bound procedure, "duplicate save" ↵Janus Weil2-2/+8
warnings and internal compiler error) 2011-06-21 Janus Weil <janus@gcc.gnu.org> PR fortran/49112 * class.c (gfc_find_derived_vtab): Make vtab and default initialization symbols SAVE_IMPLICIT. 2011-06-21 Janus Weil <janus@gcc.gnu.org> PR fortran/49112 * gfortran.dg/class_44.f03: New. From-SVN: r175257
2011-06-21Makefile.in (dg_target_exps): Set.Jakub Jelinek1-3/+6
* Makefile.in (dg_target_exps): Set. (check_gcc_parallelize): Parallelize gcc testing into 10 jobs instead of 7, try to divide it more evenly. * Make-lang.in (check_gfortran_parallelize): Parallelize dg.exp into 6 jobs instead of 3. * testsuite/Makefile.am (check_DEJAGNU_normal_targets): Add check-DEJAGNUnormal[4-9]. (check-DEJAGNU): Split into 10 jobs for parallel testing instead of 4. * testsuite/Makefile.in: Regenerated. From-SVN: r175238
2011-06-20re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])Tobias Burnus15-35/+293
2011-06-20 Tobias Burnus <burnus@net-b.de> 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. From-SVN: r175228
2011-06-18re PR fortran/49400 ([F08] Proc-pointer declaration in BLOCK construct)Janus Weil2-0/+7
2011-06-18 Janus Weil <janus@gcc.gnu.org> PR fortran/49400 * decl.c (gfc_match_procedure): Allow PROCEDURE declarations inside BLOCK constructs. 2011-06-18 Janus Weil <janus@gcc.gnu.org> PR fortran/49400 * gfortran.dg/proc_ptr_31.f90: New. From-SVN: r175177
2011-06-17re PR fortran/48699 ([OOP] MOVE_ALLOC inside SELECT TYPE)Janus Weil2-0/+10
2011-06-17 Janus Weil <janus@gcc.gnu.org> PR fortran/48699 * check.c (gfc_check_move_alloc): If 'TO' argument is polymorphic, make sure the vtab is present. 2011-06-17 Janus Weil <janus@gcc.gnu.org> PR fortran/48699 * gfortran.dg/move_alloc_5.f90: New. From-SVN: r175151
2011-06-16re PR fortran/49074 ([OOP] Defined assignment w/ CLASS arrays: Incomplete ↵Janus Weil2-0/+7
error message) 2011-06-16 Janus Weil <janus@gcc.gnu.org> 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. From-SVN: r175113
2011-06-16re PR fortran/49417 ([OOP] ICE on invalid CLASS component declaration)Janus Weil4-6/+20
2011-06-16 Janus Weil <janus@gcc.gnu.org> PR fortran/49417 * module.c (mio_component): Make sure the 'class_ok' attribute is set for use-associated CLASS components. * parse.c (parse_derived): Check for 'class_ok' attribute. * resolve.c (resolve_fl_derived): Ditto. 2011-06-16 Janus Weil <janus@gcc.gnu.org> PR fortran/49417 * gfortran.dg/class_43.f03: New. From-SVN: r175101
2011-06-13frontend-passes.c (remove_trim): New function.Thomas Koenig2-43/+43
2011-06-13 Thomas Koenig <tkoenig@gcc.gnu.org> * frontend-passes.c (remove_trim): New function. (optimize_assignment): Use it. (optimize_comparison): Likewise. Return correct status for previous change. 2011-06-13 Thomas Koenig <tkoenig@gcc.gnu.org> * gfortran.dg/trim_optimize_8.f90: New test case. From-SVN: r174983
2011-06-122011-06-12 Tobias BurnusTobias Burnus3-3/+12
PR fortran/49324 * trans-expr.c (gfc_trans_assignment_1): Tell gfc_trans_scalar_assign to also deep-copy RHS nonvariables with allocatable components. * trans-array.c (gfc_conv_expr_descriptor): Ditto. 2011-06-12 Tobias Burnus PR fortran/49324 * gfortran.dg/alloc_comp_assign_11.f90: New. From-SVN: r174959
2011-06-11frontend-passes.c (optimize_assignment): Follow chains of concatenation ↵Thomas Koenig2-0/+14
operators to the end for removing trailing TRIMS... 2011-05-11 Thomas Koenig <tkoenig@gcc.gnu.org> * frontend-passes.c (optimize_assignment): Follow chains of concatenation operators to the end for removing trailing TRIMS for assignments. 2011-05-11 Thomas Koenig <tkoenig@gcc.gnu.org> * gfortran.dg/trim_optimize_7.f90: New test. From-SVN: r174944
2011-06-10trans-decl.c (gfc_build_builtin_function_decls): Updated declaration of ↵Daniel Carrera3-17/+68
caf_sync_all and caf_sync_images. gcc/fortran/ 2011-06-10 Daniel Carrera <dcarrera@gmail.com> * trans-decl.c (gfc_build_builtin_function_decls): Updated declaration of caf_sync_all and caf_sync_images. * trans-stmt.c (gfc_trans_sync): Function can now handle a "stat" variable that has an integer type different from integer_type_node. libgfortran/ 2011-06-10 Daniel Carrera <dcarrera@gmail.com> * caf/mpi.c (_gfortran_caf_sync_all, _gfortran_caf_sync_images): Functions have void return type and move status into parameter list. * caf/single.c (_gfortran_caf_sync_all, _gfortran_caf_sync_images): Functions have void return type and move status into parameter list. * caf/libcaf.h (_gfortran_caf_sync_all, _gfortran_caf_sync_images): Functions have void return type and move status into parameter list. gcc/testsuite/ 2011-06-10 Daniel Carrera <dcarrera@gmail.com> * gfortran.dg/coarray/sync_1.f90: New test for "SYNC ALL", "SYNC MEMORY" and "SYNC IMAGES". From-SVN: r174896
2011-06-09trans.c (gfc_allocate_array_with_status): Mark error path as unlikely.Richard Guenther2-3/+9
2011-06-09 Richard Guenther <rguenther@suse.de> * trans.c (gfc_allocate_array_with_status): Mark error path as unlikely. From-SVN: r174842
2011-06-08re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])Tobias Burnus9-9/+301
2011-06-08 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.h (gfc_statement): Add ST_LOCK and ST_UNLOCK. (gfc_exec_op): Add EXEC_LOCK and EXEC_UNLOCK. (gfc_code): Add expr4. * match.h (gfc_match_lock, gfc_match_unlock): New prototypes. * match.c (gfc_match_lock, gfc_match_unlock, lock_unlock_statement): New functions. (sync_statement): Bug fix, avoiding double freeing. (gfc_match_if): Handle LOCK/UNLOCK statement. * parse.c (decode_statement, next_statement, gfc_ascii_statement): Ditto. * st.c (gfc_free_statement): Handle LOCK and UNLOCK. * resolve.c (resolve_lock_unlock): New function. (resolve_code): Call it. * dump-parse-tree.c (show_code_node): Handle LOCK/UNLOCK. * frontend-passes.c (gfc_code_walker): Optimize gfc_code's expr4. 2011-06-08 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.dg/coarray_lock_1.f90: New. * gfortran.dg/coarray_lock_2.f90: New. From-SVN: r174796
2011-06-07tree.c (build_common_tree_nodes): Also initialize size_type_node.Richard Guenther2-3/+5
2011-06-07 Richard Guenther <rguenther@suse.de> * tree.c (build_common_tree_nodes): Also initialize size_type_node. Call set_sizetype from here. c-family/ * c-common.c (c_common_nodes_and_builtins): Do not set size_type_node or call set_sizetype. go/ * go-lang.c (go_langhook_init): Do not set size_type_node or call set_sizetype. fortran/ * f95-lang.c (gfc_init_decl_processing): Do not set size_type_node or call set_sizetype. java/ * decl.c (java_init_decl_processing): Properly initialize size_type_node. lto/ * lto-lang.c (lto_init): Do not set size_type_node or call set_sizetype. ada/ * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call set_sizetype. From-SVN: r174743
2011-06-05re PR fortran/49255 (-fcheck=pointer diagnoses too much: Passing NULL ↵Tobias Burnus2-0/+12
pointer to OPTIONAL argument) 2011-06-05 Tobias Burnus <burnus@net-b.de> PR fortran/49255 * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer for F2008. 2011-06-05 Tobias Burnus <burnus@net-b.de> PR fortran/49255 * gfortran.dg/pointer_check_9.f90: New. * gfortran.dg/pointer_check_10.f90: New. From-SVN: r174663
2011-06-05dump-parse-tree.c (show_symbol): Don't dump namespace for ENTRY to avoid ↵Andreas Schmidt2-2/+9
infinite recursion. 2011-06-05 Andreas Schmidt <andreas.schmidt.42@gmx.net> Thomas Koenig <tkoenig@gcc.gnu.org> * dump-parse-tree.c (show_symbol): Don't dump namespace for ENTRY to avoid infinite recursion. Co-Authored-By: Thomas Koenig <tkoenig@gcc.gnu.org> From-SVN: r174659
2011-06-02re PR fortran/49268 (Invalid code generated for assumed-size Cray pointee)Asher Langton2-1/+11
* trans-decl.c (gfc_trans_deferred_vars): Treat assumed-size Cray pointees as AS_EXPLICIT. * gfortran.dg/PR49268.f90: New test. From-SVN: r174584
2011-06-02re PR fortran/37039 (Cray pointer with pointee DIMENSION statement after ↵Asher Langton2-3/+9
POINTER statement) * decl.c (variable_decl): Merge current_as before copying to cp_as. * gfortran.dg/PR37039.f90: New test. From-SVN: r174582
2011-06-02re PR fortran/49265 (Double colon in procedure-stmt (generic interface))Steven G. Kargl3-2/+25
2011-06-02 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/49265 * decl.c (gfc_match_modproc): Allow for a double colon in a module procedure statement. * parse.c ( decode_statement): Deal with whitespace around :: in gfc_match_modproc. 2011-06-02 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/49265 * gfortran.dg/module_procedure_double_colon_1.f90: New test. * gfortran.dg/module_procedure_double_colon_2.f90: New test. From-SVN: r174569
2011-05-31re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])Tobias Burnus12-14/+316
2011-05-31 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * intrinsic.c (klass): Add CLASS_ATOMIC. (add_subroutines): Add atomic_ref/atomic_define. * intrinsic.texi (ATOMIC_REF, ATOMIC_DEFINE): Document. * intrinsic.h (gfc_check_atomic_def, gfc_check_atomic_ref, gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New prototypes. * gfortran.h (gfc_isym_id): Add GFC_ISYM_ATOMIC_DEF and GFC_ISYM_ATOMIC_REF. (gfc_atomic_int_kind, gfc_atomic_logical_kind): New global vars. * iresolve.c (gfc_resolve_atomic_def, gfc_resolve_atomic_ref): * New functions. * check.c (gfc_check_atomic, gfc_check_atomic_def, gfc_check_atomic_ref): New functions. * iso-fortran-env.def (ISOFORTRANENV_FILE_ATOMIC_INT_KIND, ISOFORTRANENV_FILE_ATOMIC_LOGICAL_KIND): Change kind value. * trans-intrinsic.c (conv_intrinsic_atomic_def, conv_intrinsic_atomic_ref, gfc_conv_intrinsic_subroutine): New functions. (conv_intrinsic_move_alloc) Renamed from gfc_conv_intrinsic_move_alloc - and made static. * trans.h (gfc_conv_intrinsic_move_alloc): Remove. (gfc_conv_intrinsic_subroutine) Add prototype. * trans.c (trans_code): Call gfc_conv_intrinsic_subroutine. From-SVN: r174510