- 13 Dec, 2005 1 commit
-
-
rsandifo authored
* Make-lang.in (fortran/trans-resolve.o): Depend on fortran/dependency.h. * gfortran.h (gfc_expr): Add an "inline_noncopying_intrinsic" flag. * dependency.h (gfc_get_noncopying_intrinsic_argument): Declare. (gfc_check_fncall_dependency): Change prototype. * dependency.c (gfc_get_noncopying_intrinsic_argument): New function. (gfc_check_argument_var_dependency): New function, split from gfc_check_fncall_dependency. (gfc_check_argument_dependency): New function. (gfc_check_fncall_dependency): Replace the expression parameter with separate symbol and argument list parameters. Generalize the function to handle dependencies for any type of expression, not just variables. Accept a further argument giving the intent of the expression being tested. Ignore intent(in) arguments if that expression is also intent(in). * resolve.c: Include dependency.h. (find_noncopying_intrinsics): New function. (resolve_function, resolve_call): Call it on success. * trans-array.h (gfc_conv_array_transpose): Declare. (gfc_check_fncall_dependency): Remove prototype. * trans-array.c (gfc_conv_array_transpose): New function. * trans-intrinsic.c (gfc_conv_intrinsic_function): Don't use the libcall handling if the expression is to be evaluated inline. Add a case for handling inline transpose()s. * trans-expr.c (gfc_trans_arrayfunc_assign): Adjust for the new interface provided by gfc_check_fncall_dependency. libgfortran/ * m4/matmul.m4: Use a different order in the special case of a transposed first argument. * generated/matmul_c4.c, generated/matmul_c8.c, generated/matmul_c10.c, * generated/matmul_c16.c, generated/matmul_i4.c, generated/matmul_i8.c, * generated/matmul_i10.c, generated/matmul_r4.c, generated/matmul_r8.c * generated/matmul_r10.c, generated/matmul_r16.c: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108459 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 02 Nov, 2005 1 commit
-
-
pinskia authored
PR fortran/18157 * gfortran.fortran-torture/compile/defined_type_1.f90: New test. * gfortran.fortran-torture/compile/defined_type_2.f90: New test. * gfortran.fortran-torture/compile/defined_type_3.f90: New test. 2005-11-02 Andrew Pinski <pinskia@physics.uc.edu> PR fortran/18157 * trans-array.c (gfc_conv_resolve_dependencies): Use the correct type for the temporary array. * trans-expr.c (gfc_trans_assignment): Pass lss instead of lss_section to gfc_conv_resolve_dependencies to get the correct type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106396 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 30 Oct, 2005 1 commit
-
-
eedelman authored
2005-10-30 Erik Edelmann <eedelman@gcc.gnu.org> PR fortran/18883 * trans-decl.c (gfc_finish_var_decl): Add decl to the current function, rather than the parent. Make assertion accept fake result variables. * trans-expr.c (gfc_conv_variable): If the character length of an ENTRY isn't set, get the length from the master function instead. testsuite 2005-10-30 Erik Edelmann <eedelman@gcc.gnu.org> PR fortran/18883 * gfortran.dg/char_result_9.f90: New. * gfortran.dg/char_result_10.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106254 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 25 Oct, 2005 1 commit
-
-
jakub authored
* trans-expr.c (gfc_conv_variable): Revert 2005-10-24 change. * trans-array.c (gfc_conv_array_parameter): Likewise. * trans-decl.c (gfc_conv_cray_pointee): Remove. (gfc_finish_cray_pointee): New function. (gfc_finish_var_decl): Use it. Don't return early for Cray pointees. (gfc_create_module_variable): Revert 2005-10-24 change. * decl.c (cray_pointer_decl): Update comment. * gfortran.texi: Don't mention Cray pointees aren't visible in the debugger. * symbol.c (check_conflict): Add conflict between cray_pointee and in_common resp. in_equivalence. * resolve.c (resolve_equivalence): Revert 2005-10-24 change. testsuite/ * gfortran.dg/cray_pointers_4.f90: New test. * module.c (ab_attribute): Add AB_CRAY_POINTER and AB_CRAY_POINTEE. (attr_bits): Likewise. (mio_symbol_attribute): Save and restore cray_pointe{r,e} attributes. (mio_symbol): For cray_pointee write/read cp_pointer reference. testsuite/ * gfortran.dg/cray_pointers_5.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105891 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 24 Oct, 2005 1 commit
-
-
steven authored
PR fortran/17031 PR fortran/22282 fortran/ * check.c (gfc_check_loc) : New function * decl.c (variable_decl): New variables cp_as and sym. Added a check for variables that have already been declared as Cray Pointers, so we can get the necessary attributes without adding a new symbol. (attr_decl1): Added code to catch pointee symbols and "fix" their array specs. (cray_pointer_decl): New method. (gfc_match_pointer): Added Cray pointer parsing code. (gfc_mod_pointee_as): New method. * expr.c (gfc_check_assign): added a check to catch vector-type assignments to pointees with an unspecified final dimension. * gfortran.h: (GFC_ISYM_LOC): New. (symbol_attribute): Added cray_pointer and cray_pointee bits. (gfc_array_spec): Added cray_pointee and cp_was_assumed bools. (gfc_symbol): Added gfc_symbol *cp_pointer. (gfc_option): Added flag_cray_pointer. (gfc_add_cray_pointee): Declare. (gfc_add_cray_pointer ): Declare. (gfc_mod_pointee_as): Declare. * intrinsic.c (add_functions): Add code for loc() intrinsic. * intrinsic.h (gfc_check_loc): Declare. (gfc_resolve_loc): Declare. * iresolve.c (gfc_resolve_loc): New. * lang.opt: Added fcray-pointer flag. * options.c (gfc_init_options): Intialized gfc_match_option.flag_cray_pointer. (gfc_handle_option): Deal with -fcray-pointer. * parse.c:(resolve_equivalence): Added code prohibiting Cray pointees in equivalence statements. * resolve.c (resolve_array_ref): Added code to prevent bounds checking for Cray Pointee arrays. (resolve_equivalence): Prohibited pointees in equivalence statements. * symbol.c (check_conflict): Added Cray pointer/pointee attribute checking. (gfc_add_cray_pointer): New (gfc_add_cray_pointee): New (gfc_copy_attr): New code for Cray pointers and pointees * trans-array.c (gfc_trans_auto_array_allocation): Added code to prevent space from being allocated for pointees. (gfc_conv_array_parameter): Added code to catch pointees and correctly set their base address. * trans-decl.c (gfc_finish_var_decl): Added code to prevent pointee declarations from making it to the back end. (gfc_create_module_variable): Same. * trans-expr.c (gfc_conv_variable): added code to detect and translate pointees. (gfc_conv_cray_pointee): New. * trans-intrinsic.c (gfc_conv_intrinsic_loc): New. (gfc_conv_intrinsic_function): added entry point for loc translation. * trans.h (gfc_conv_cray_pointee): Declare. * gfortran.texi: Added section on Cray pointers, removed Cray pointers from list of proposed extensions * intrinsic.texi: Added documentation for loc intrinsic. * invoke.texi: Documented -fcray-pointer flag testsuite/ PR fortran/17031 PR fortran/22282 * gfortran.dg/cray_pointers_1.f90: New test. * gfortran.dg/cray_pointers_2.f90: New test. * gfortran.dg/cray_pointers_3.f90: New test. * gfortran.dg/loc_1.f90: New test. * gfortran.dg/loc_2.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105859 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 23 Oct, 2005 1 commit
-
-
pault authored
PR fortran/18022 * trans-expr.c (gfc_trans_arrayfunc_assign): Return NULL if there is a component ref during an array ref to force use of temporary in assignment. PR fortran/24311 PR fortran/24384 * fortran/iresolve.c (check_charlen_present): New function to add a charlen to the typespec, in the case of constant expressions. (gfc_resolve_merge, gfc_resolve_spread): Call.the above. (gfc_resolve_spread): Make calls to library functions that handle the case of the spread intrinsic with a scalar source. * libgfortran/intrinsics/spread_generic.c (spread_internal _scalar): New function that handles the special case of spread with a scalar source. This has interface functions - (spread_scalar, spread_char_scalar): New functions to interface with the calls specified in gfc_resolve_spread. 2005-10-23 Paul Thomas <pault@gcc.gnu.org> PR fortran/18022 gfortran.dg/assign_func_dtcomp_1.f90: New test. PR fortran/24311 gfortran.dg/merge_char_const.f90: New test. PR fortran/24384 gfortran.dg/spread_scalar_source.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105810 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 03 Oct, 2005 1 commit
-
-
fxcoudert authored
PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104889 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 13 Sep, 2005 1 commit
-
-
tobi authored
2005-09-13 Erik Edelmann <erik.edelmann@iki.fi> fortran/ PR fortran/17740 * trans-expr.c (gfc_trans_arrayfunc_assign): Check value of attr.elemental for specific function instead of generic name. testsuite/ PR fortran/17740 * gfortran.dg/generic_4.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104240 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 09 Sep, 2005 3 commits
-
-
rsandifo authored
* Makefile.in (fortran/trans-expr.o): Depend on dependency.h. * dependency.h (gfc_ref_needs_temporary_p): Declare. * dependency.c (gfc_ref_needs_temporary_p): New function. (gfc_check_fncall_dependency): Use it instead of inlined check. By so doing, take advantage of the fact that character substrings within an array reference also need a temporary. * trans.h (GFC_SS_VECTOR): Adjust comment. * trans-array.c (gfc_free_ss): Remove GFC_SS_VECTOR case. (gfc_set_vector_loop_bounds): New function. (gfc_add_loop_ss_code): Call it after evaluating the subscripts of a GFC_SS_SECTION. Deal with the GFC_SS_VECTOR case by evaluating the vector expression and caching its descriptor for use within the loop. (gfc_conv_array_index_ref, gfc_conv_vector_array_index): Delete. (gfc_conv_array_index_offset): Handle scalar, vector and range dimensions as separate cases of a switch statement. In the vector case, use the loop variable to calculate a vector index and use the referenced element as the dimension's index. Perform bounds checking on this final index. (gfc_conv_section_upper_bound): Return null for vector indexes. (gfc_conv_section_startstride): Give vector indexes a start value of 0 and a stride of 1. (gfc_conv_ss_startstride): Adjust for new GFC_SS_VECTOR representation. (gfc_conv_expr_descriptor): Expand comments. Generalize the handling of the !want_pointer && !direct_byref case. Use gfc_ref_needs_temporary_p to decide whether the variable case needs a temporary. (gfc_walk_variable_expr): Handle DIMEN_VECTOR by creating a GFC_SS_VECTOR index. * trans-expr.c: Include dependency.h. (gfc_trans_arrayfunc_assign): Fail if the target needs a temporary. 2005-09-09 Richard Sandiford <richard@codesourcery.com> PR fortran/21104 * trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved from trans-expr.c. (gfc_init_interface_mapping, gfc_free_interface_mapping) (gfc_add_interface_mapping, gfc_finish_interface_mapping) (gfc_apply_interface_mapping): Declare. * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare. (gfc_trans_allocate_temp_array): Add pre and post block arguments. * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function. (gfc_trans_allocate_array_storage): Replace loop argument with separate pre and post blocks. (gfc_trans_allocate_temp_array): Add pre and post block arguments. Update call to gfc_trans_allocate_array_storage. (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new interface to gfc_trans_allocate_temp_array. * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping): Moved to trans.h. (gfc_init_interface_mapping, gfc_free_interface_mapping) (gfc_add_interface_mapping, gfc_finish_interface_mapping) (gfc_apply_interface_mapping): Make extern. (gfc_conv_function_call): Build an interface mapping for array return values too. Call gfc_set_loop_bounds_from_array_spec. Adjust call to gfc_trans_allocate_temp_array so that code is added to SE rather than LOOP. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104077 138bc75d-0d04-0410-961f-82ee72b054a4
-
rsandifo authored
* trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved from trans-expr.c. (gfc_init_interface_mapping, gfc_free_interface_mapping) (gfc_add_interface_mapping, gfc_finish_interface_mapping) (gfc_apply_interface_mapping): Declare. * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare. (gfc_trans_allocate_temp_array): Add pre and post block arguments. * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function. (gfc_trans_allocate_array_storage): Replace loop argument with separate pre and post blocks. (gfc_trans_allocate_temp_array): Add pre and post block arguments. Update call to gfc_trans_allocate_array_storage. (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new interface to gfc_trans_allocate_temp_array. * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping): Moved to trans.h. (gfc_init_interface_mapping, gfc_free_interface_mapping) (gfc_add_interface_mapping, gfc_finish_interface_mapping) (gfc_apply_interface_mapping): Make extern. (gfc_conv_function_call): Build an interface mapping for array return values too. Call gfc_set_loop_bounds_from_array_spec. Adjust call to gfc_trans_allocate_temp_array so that code is added to SE rather than LOOP. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104075 138bc75d-0d04-0410-961f-82ee72b054a4
-
rsandifo authored
* trans.h (gfor_fndecl_internal_realloc): Declare. (gfor_fndecl_internal_realloc64): Declare. * trans-decl.c (gfor_fndecl_internal_realloc): New variable. (gfor_fndecl_internal_realloc64): New variable. (gfc_build_builtin_function_decls): Initialize them. * trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument. * trans-array.c (gfc_trans_allocate_array_storage): Add an argument to say whether the array can grow later. Don't allocate the array on the stack if so. Don't call malloc for zero-sized arrays. (gfc_trans_allocate_temp_array): Add a similar argument here. Pass it along to gfc_trans_allocate_array_storage. (gfc_get_iteration_count, gfc_grow_array): New functions. (gfc_iterator_has_dynamic_bounds): New function. (gfc_get_array_constructor_element_size): New function. (gfc_get_array_constructor_size): New function. (gfc_trans_array_ctor_element): Replace pointer argument with a descriptor tree. (gfc_trans_array_constructor_subarray): Likewise. Take an extra argument to say whether the variable-sized part of the constructor must be allocated using realloc. Grow the array when this argument is true. (gfc_trans_array_constructor_value): Likewise. (gfc_get_array_cons_size): Delete. (gfc_trans_array_constructor): If the loop bound has not been set, split the allocation into a static part and a dynamic part. Set loop->to to the bounds for static part before allocating the temporary. Adjust call to gfc_trans_array_constructor_value. (gfc_conv_loop_setup): Allow any constructor to determine the loop bounds. Check whether the constructor has a dynamic size and prefer to use something else if so. Expect the loop bound to be set later. Adjust call to gfc_trans_allocate_temp_array. * trans-expr.c (gfc_conv_function_call): Adjust another call here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104073 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 08 Sep, 2005 3 commits
-
-
rsandifo authored
* trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in the GFC_SS_FUNCTION case too. * trans-expr.c (gfc_conv_function_val): Allow symbols to be bound to function pointers as well as function decls. (gfc_interface_sym_mapping, gfc_interface_mapping): New structures. (gfc_init_interface_mapping, gfc_free_interface_mapping) (gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array) (gfc_set_interface_mapping_bounds, gfc_add_interface_mapping) (gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons) (gfc_apply_interface_mapping_to_ref) (gfc_apply_interface_mapping_to_expr) (gfc_apply_interface_mapping): New functions. (gfc_conv_function_call): Evaluate the arguments before working out where the result should go. Make the null pointer case provide the string length in parmse.string_length. Cope with non-constant string lengths, using the above functions to evaluate such lengths. Use a temporary typespec; don't assign to sym->cl->backend_decl. Don't assign to se->string_length when returning a cached array descriptor. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104040 138bc75d-0d04-0410-961f-82ee72b054a4
-
rsandifo authored
* trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain after handling scalarized references. Make "indexse" inherit from "se" when handling AR_ELEMENTs. (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each substring or scalar reference that follows an array section. * trans-expr.c (gfc_conv_variable): When called from within a scalarization loop, start out with "ref" pointing to the scalarized part of the reference. Don't call gfc_advance_se_ss_chain here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104035 138bc75d-0d04-0410-961f-82ee72b054a4
-
rsandifo authored
* trans-expr.c (gfc_trans_pointer_assignment): Assign to a temporary descriptor if the rhs is not a null pointer or variable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104029 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 16 Aug, 2005 1 commit
-
-
fengwang authored
* trans-expr.c (gfc_conv_power_op): Evaluate the expression before expand. 2005-08-16 Feng Wang <fengwang@nudt.edu.cn> * gfortran.dg/power.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103155 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 06 Aug, 2005 1 commit
-
-
kazu authored
invoke.texi, resolve.c, trans-array.c, trans-array.h, trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix comment/doc typos. Follow spelling conventions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102806 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 04 Aug, 2005 1 commit
-
-
pbrook authored
* trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments. (gfc_conv_expr_lhs): Fix assertion. (gfc_conv_expr_val): Merge post block. Set se.expr to new value. * trans.h: Move and update comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102729 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 20 Jul, 2005 1 commit
-
-
giovannibajo authored
* c-common.c (complete_array_type): Update to cope with VEC in CONSTRUCTOR_ELTS. * c-pretty-print.c (pp_c_initializer_list): Use pp_c_constructor_elts. (pp_c_constructor_elts): New function. * c-pretty-print.h (pp_c_constructor_elts): Declare. * c-typeck.c (build_function_call, build_c_cast, digest_init, struct constructor_stack, struct initializer_stack, constructor_elements, push_init_level, pop_init_level, add_pending_init, find_init_member, output_init_element): Update to cope with VEC in CONSTRUCTOR_ELTS. * coverage.c (build_fn_info_value, build_ctr_info_value, build_gcov_info): Likewise. * expr.c (categorize_ctor_elements_1, store_constructor, expand_expr_real_1): Likewise. * fold-const.c (fold_ternary): Likewise. * gimplify.c (gimplify_init_ctor_preeval, zero_sized_field_decl, gimplify_init_constructor, gimplify_expr): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. * tree-inline.c (copy_tree_r): Add code to duplicate a CONSTRUCTOR node. * tree-pretty-print.c (dump_generic_node): Update to cope with VEC in CONSTRUCTOR_ELTS. * tree-sra.c (generate_element_init_1): Likewise. * tree-ssa-ccp.c (fold_const_aggregate_ref): Likewise. * tree-ssa-operands.c (get_expr_operands): Likewise. * tree-vect-generic.c (expand_vector_piecewise): Likewise. * tree-vect-transform.c (vect_get_vec_def_for_operand): (get_initial_def_for_reduction): Likewise. * tree-vn.c (set_value_handle, get_value_handle): CONSTURCTOR uses value handle in annotations. * tree.c (tree_node_kind, tree_code_size, make_node_stat, tree_node_structure): Add support for constr_kind. (build_vector_from_ctor, build_constructor_single, build_constructor_from_list): New functions. (build_constructor): Update to take a VEC instead of a TREE_LIST. (simple_cst_equal, iterative_hash_expr, initializer_zerop, walk_tree): Update to cope with VEC in CONSTRUCTOR_ELTS. * tree.def (CONSTRUCTOR): Make it a tcc_exceptional node. * tree.h (FOR_EACH_CONSTRUCTOR_VALUE, FOR_EACH_CONSTRUCTOR_ELT, CONSTRUCTOR_APPEND_ELT): New macros. (struct constructor_elt, struct tree_constructor): New data types. (union tree_node): Add tree_constructor field. * treestruct.def: Define TS_CONSTRUCTOR. * varasm.c (const_hash_1, compare_constant, copy_constant, compute_reloc_for_constant, output_addressed_constants, initializer_constant_valid_p, output_constant, array_size_for_constructor, output_constructor): Update to cope with VEC in CONSTRUCTOR_ELTS. * vec.h (VEC_empty, VEC_copy): New macros. ada/ Make CONSTRUCTOR use VEC to store initializers. * decl.c (gnat_to_gnu_entity): Update to cope with VEC in CONSTRUCTOR_ELTS. * trans.c (extract_values): Likewise. * utils.c (convert, remove_conversions): Likewise. * utils2.c (contains_save_expr_p, build_binary_op, build_unary_op, gnat_build_constructor): Likewise. cp/ Make CONSTRUCTOR use VEC to store initializers. * call.c (convert_default_arg): Update call to digest_init. * class.c (dump_class_hierarchy, dump_array): Update to cope with VEC in CONSTRUCTOR_ELTS. * cp-tree.h (EMPTY_CONSTRUCTOR_P): Likewise. (finish_compound_literal, digest_init): Update declaration. * decl.c (struct reshape_iter): New data type. (reshape_init_array): Rename to... (reshape_init_array_1): Update to cope with VEC in CONSTRUCTOR_ELTS. (reshape_init): Rewrite from scratch. Split parts into... (reshape_init_array, reshape_init_vector, reshape_init_class, reshape_init_r): New functions. (check_initializer): Update call to reshape_init. Remove obsolete code. (initialize_artificial_var, cp_complete_array_type): Update to cope with VEC in CONSTRUCTOR_ELTS. * decl2.c (grokfield): Update calls to digest_init. (mark_vtable_entries): Update to cope with VEC in CONSTRUCTOR_ELTS. * error.c (dump_expr_init_vec): New function. (dump_expr): Use dump_expr_init_vec. * init.c (build_zero_init, build_vec_init): Update to cope with VEC in CONSTRUCTOR_ELTS. (expand_default_init): Update call to digest_init. * parser.c (cp_parser_postfix_expression): Use a VEC for the initializers. (cp_parser_initializer_list): Build a VEC of initializers. * pt.c (tsubst_copy, tsubst_copy_and_build): Update to cope with VEC in CONSTRUCTOR_ELTS. * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer, ptm_initializer, class_initializer, get_pseudo_ti_init): Use build_constructor_from_list instead of build_constructor. * semantics.c (finish_compound_literal): Update call to digest_init. * tree.c (stabilize_init): Update to cope with VEC in CONSTRUCTOR_ELTS. * typeck.c (build_ptrmemfunc1): Likewise. * typeck2.c: (cxx_incomplete_type_error, split_nonconstant_init_1): Likewise. (store_init_value): Use build_constructor_from_list and update call to digest_init. (digest_init): Rewrite. (process_init_constructor): Rewrite from scratch. Split into... (process_init_constructor_array, picflag_from_initializer, process_init_constructor_record, process_init_constructor_union): New functions. (PICFLAG_ERRONEOUS, PICFLAG_NOT_ALL_CONSTANT, PICFLAG_NOT_ALL_SIMPLE): New macros. (build_functional_cast): Use build_constructor_from_list instead of build_constructor. fortran/ Make CONSTRUCTOR use VEC to store initializers. * trans-array.c (gfc_build_null_descriptor, gfc_trans_array_constructor_value, gfc_conv_array_initializer): Update to cope with VEC in CONSTRUCTOR_ELTS. * trans-common.c (create_common): Likewise. * trans-expr.c (gfc_conv_structure): Likewise. * trans-stmt.c (gfc_trans_character_select): Use build_constructor_from_list instead of build_constructor. java/ Make CONSTRUCTOR use VEC to store initializers. * check-init.c (check_init): Update to cope with VEC in CONSTRUCTOR_ELTS. * class.c (make_field_value, make_method_value, get_dispatch_table, make_class_data, emit_symbol_table, emit_catch_table, emit_assertion_table): Use build_constructor_from_list instead of build_constructor. * constants.c (build_constants_constructor): Likewise. * java-gimplify.c (java_gimplify_new_array_init): Update to cope with VEC in CONSTRUCTOR_ELTS. * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE, PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead of a TREE_LIST. * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in CONSTRUCTOR_ELTS. * parse.y (build_new_array_init): Use build_constructor_from_list instead of build_constructor. (patch_new_array_init): Update to cope with VEC in CONSTRUCTOR_ELTS. (array_constructor_check_entry): Likewise. objc/ Make CONSTRUCTOR use VEC to store initializers. * objc-act.c (objc_build_constructor): Use build_constructor_from_list instead of build_constructor. testsuite/ Make CONSTRUCTOR use VEC to store initializers. * g++.dg/ext/complit3.C: Check for specific error messages. * g++.dg/init/brace2.C: Update error message. * g++.dg/warn/Wbraces2.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102182 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 25 Jun, 2005 1 commit
-
-
kcook authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101310 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 13 Jun, 2005 2 commits
-
-
jakub authored
void. Use a local variable for has_alternate_specifier and return it. Avoid modification of function type's return value in place, since it may be shared. * trans.h (has_alternate_specifier): Remove. (gfc_conv_function_call): Change return type. * trans-stmt.c (has_alternate_specifier): Remove. (gfc_trans_call): Add a local has_alternate_specifier variable, set it from gfc_conv_function_call return value. * gfortran.dg/altreturn_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100878 138bc75d-0d04-0410-961f-82ee72b054a4
-
rth authored
gfc_conv_descriptor_data. Cast the result to the DATAPTR type. (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New. (gfc_trans_allocate_array_storage): Use them. (gfc_array_allocate, gfc_array_deallocate): Likewise. (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise. (gfc_trans_deferred_array): Likewise. * trans-expr.c (gfc_conv_function_call): Likewise. (gfc_trans_subcomponent_assign): Likewise. (gfc_trans_pointer_assignment): Likewise. * trans-intrinsic.c (gfc_conv_allocated): Likewise. * trans-types.c (gfc_array_descriptor_base): New. (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE. (gfc_get_array_descriptor_base): Break out from ... (gfc_get_array_type_bounds): ... here. Create type variants. * trans-array.h (gfc_conv_descriptor_data_get): Declare. (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100872 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 12 Jun, 2005 1 commit
-
-
tobi authored
* trans-expr.c (gfc_conv_variable): POINTER results don't need f2c calling conventions. Look at sym instead of sym->result. * trans-types.c (gfc_sym_type): Remove workaround for frontend bug. Remove condition which is always false with workaround removed. (gfc_return_by_reference): Always look at sym, never at sym->result. testsuite/ * gfortran.dg/f2c_7.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100857 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 01 Jun, 2005 1 commit
-
-
pault authored
* fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting. * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces. Correct comments and replace convert of integer_one_node with build_int_cst. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100433 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 31 May, 2005 1 commit
-
-
pault authored
PR fortran/18109 PR fortran/18283 PR fortran/19107 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the string length from the expression typespec character length value and set temp_ss->stringlength and backend_decl. Obtain the tree expression from gfc_conv_expr rather than gfc_conv_expr_val. Dereference the expression to obtain the character. * fortran/trans-expr.c (gfc_conv_component_ref): Remove the dereference of scalar character pointer structure components. * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the string length for the structure component from the component expression. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100400 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 30 May, 2005 2 commits
-
-
kazu authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100362 138bc75d-0d04-0410-961f-82ee72b054a4
-
kazu authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100359 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 29 May, 2005 1 commit
-
-
pault authored
PR fortran/16939 PR fortran/17192 PR fortran/17193 PR fortran/17202 PR fortran/18689 PR fortran/18890 PR fortran/21297 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string length to temp_ss for character pointer array assignments. * fortran/trans-expr.c (gfc_conv_variable): Correct errors in dereferencing of characters and character pointers. * fortran/trans-expr.c (gfc_conv_function_call): Provide string length as return argument for various kinds of handling of return. Return a char[]* temporary for character pointer functions and dereference the temporary upon return. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100324 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 11 May, 2005 1 commit
-
-
tobi authored
* resolve.c (resolve_symbol): Copy 'pointer' and 'dimension' attribute from result symbol to function symbol. testsuite/ * gfortran.dg/func_result_2.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99580 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 10 May, 2005 1 commit
-
-
tobi authored
PR fortran/20178 * gfortran.h (gfc_option): Add flag_f2c. * invoke.texi: Document '-ff2c' command line option. Adapt documentation for '-fno-second-underscore' and '-fno-underscoring'. * lang.opt (ff2c): New entry. * options.c (gfc-init_options): Set default calling convention to -fno-f2c. Mark -fsecond-underscore unset. (gfc_post_options): Set -fsecond-underscore if not explicitly set by user. (handle_options): Set gfc_option.flag_f2c according to requested calling convention. * trans-decl.c (gfc_get_extern_function_decl): Use special f2c intrinsics where necessary. (gfc_trans_deferred_vars): Change todo error to assertion. * trans-expr.c (gfc_conv_variable): Dereference access to hidden result argument. (gfc_conv_function_call): Add hidden result argument to argument list if f2c calling conventions requested. Slightly restructure tests. Convert result of default REAL function to requested type if f2c calling conventions are used. Dereference COMPLEX result if f2c cc are used. * trans-types.c (gfc_sym_type): Return double for default REAL function if f2c cc are used. (gfc_return_by_reference): Slightly restructure logic. Return COMPLEX by reference depending on calling conventions. (gfc_get_function_type): Correctly make hidden result argument a pass-by-reference argument for COMPLEX. Remove old code which does this for derived types. libgfortran/ PR fortran/20178 * Makefile.am (gfor_specific_src): Add 'intrinsics/f2c_intrinsics.F90' to dependencies. * Makefile.in: Regenerate. * intrinsics/f2c_specific.F90: New file. gcc/testsuite/ PR fortran/20178 * gfortran.dg/f2c_1.f90, gfortran.dg/f2c_2.f90, gfortran.dg/f2c_3.f90: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99544 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 29 Apr, 2005 2 commits
-
-
jakub authored
PR fortran/13082 PR fortran/18824 * trans-expr.c (gfc_conv_variable): Handle return values in functions with alternate entry points. * resolve.c (resolve_entries): Remove unnecessary string termination after snprintf. Set result of entry master. If all entries have the same type, set entry master's type to that common type, otherwise set mixed_entry_master attribute. * trans-types.c (gfc_get_mixed_entry_union): New function. (gfc_get_function_type): Use it for mixed_entry_master functions. * gfortran.h (symbol_attribute): Add mixed_entry_master bit. * decl.c (gfc_match_entry): Set entry->result properly for function ENTRY. * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over __entry argument. (build_entry_thunks): Handle return values in entry thunks. Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not shared between multiple contexts. (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from current_function_decl instead of sym->backend_decl. Skip over entry master's entry id argument. For mixed_entry_master entries or their results, return a COMPONENT_REF of the fake result. (gfc_trans_deferred_vars): Don't warn about missing return value if at least one entry point uses RESULT. (gfc_generate_function_code): For entry master returning CHARACTER, copy ts.cl->backend_decl to all entry result syms. * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return values optional just because they are in entry master. * gfortran.dg/entry_4.f90: New test. * gfortran.fortran-torture/execute/entry_1.f90: New test. * gfortran.fortran-torture/execute/entry_2.f90: New test. * gfortran.fortran-torture/execute/entry_3.f90: New test. * gfortran.fortran-torture/execute/entry_4.f90: New test. * gfortran.fortran-torture/execute/entry_5.f90: New test. * gfortran.fortran-torture/execute/entry_6.f90: New test. * gfortran.fortran-torture/execute/entry_7.f90: New test. 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de> * gfortran.fortran-torture/execute/entry_8.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98993 138bc75d-0d04-0410-961f-82ee72b054a4
-
pbrook authored
* trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98968 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 23 Mar, 2005 1 commit
-
-
steven authored
* trans-array.c (gfc_trans_allocate_array_storage, gfc_trans_allocate_temp_array gfc_trans_array_constructor_value, gfc_conv_array_index_ref, gfc_trans_array_bound_check, gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref, gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds, gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise. * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp, gfc_conv_concat_op, gfc_conv_expr_op): Likewise. * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound, gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign, gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_merge, prepare_arg_info, gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise. * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while, gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp, compute_inner_temp_size, allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign): Likewise. * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise. * trans.c (gfc_add_modify_expr): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96926 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 04 Mar, 2005 1 commit
-
-
tobi authored
PR fortran/19673 * trans-expr.c (gfc_conv_function_call): Correctly dereference argument from a pointer function also if it has a result clause. testsuite/ PR fortran/19673 * gfortran.dg/func_result_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95901 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 23 Feb, 2005 1 commit
-
-
tobi authored
fields into new struct 'op' inside the 'value' union. * arith.c (eval_intrinsic): Adapt all users. * dependency.c (gfc_check_dependency): Likewise. * dump-parse-tree.c (gfc_show_expr): Likewise. * expr.c (gfc_get_expr): Don't clear removed fields. (free_expr0, gfc_copy_expr, gfc_type_convert_binary, gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr, check_intrinsic_op): Adapt to new field names. * interface.c (gfc_extend_expr): Likewise. Also explicitly nullify 'esym' and 'isym' fields of new function call. * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul): Adapt to renamed structure fields. * matchexp.c (build_node, match_level_1, match_expr): Likewise. * module.c (mio_expr): Likewise. * resolve.c (resolve_operator): Likewise. (gfc_find_forall_index): Likewise. Only look through operands if dealing with EXPR_OP * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields. * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op, gfc_conv_concat_op, gfc_conv_expr_op): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95471 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 23 Jan, 2005 1 commit
-
-
kazu authored
trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-types.c, trans.h: Fix comment typos. Follow spelling conventions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94111 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 22 Jan, 2005 1 commit
-
-
pbrook authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94074 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 18 Jan, 2005 1 commit
-
-
kazu authored
gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c, match.c, matchexp.c, misc.c, module.c, options.c, parse.c, scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c, trans-io.c, trans-stmt.c, trans.c: Update copyright. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93830 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 03 Jan, 2005 1 commit
-
-
rth authored
* decl.c: Ditto * matchexp.c: Ditto * parse.c: Ditto * resolve.c: Ditto * st.c: Ditto * check.c: Remove stdlib.h and stdarg.h * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h * f95-lang.c: Add system.h; remove stdio.h * interface.c: Add system.h; remove stdlib.h and string.h * intrinsic.c: Remove stdarg.h, stdio.h, and string.h * io.c: Remove string.h * simplify.c: Ditto * match.c: Remove stdarg.h and string.h * misc.c: Update copyright; add system.h; remove stdlib.h, string.h, and sys/stat.h * module.c: Add system.h; remove string.h, stdio.h, errno.h, unistd.h, and time.h * option.c: Remove string.h and stdlib.h * primary.c: Ditto * scanner.c: Update copyright; add system.h; remove stdlib.h, stdio.h, string.h, and strings.h * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h * trans-array.c: Remove stdio.h and gmp.h * trans-const.c: Ditto * trans-expr.c: Ditto * trans-io.c: Ditto * trans-stmt.c: Ditto * trans.c: Ditto * trans-intrinsic.c: Remove stdio.h and string.h git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92866 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 27 Dec, 2004 1 commit
-
-
pinskia authored
* trans-expr.c (gfc_conv_cst_int_power): Only check for flag_unsafe_math_optimizations if we have a float type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92644 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 10 Nov, 2004 1 commit
-
-
pbrook authored
* trans-expr.c (gfc_trans_subarray_assign): Free shape before ss. * trans-io.c (transfer_array_component): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90449 138bc75d-0d04-0410-961f-82ee72b054a4
-