- 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
-
- 08 Nov, 2004 1 commit
-
-
kazu authored
gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c, module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c, trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c, trans.h: Fix comment formatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90266 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 04 Oct, 2004 1 commit
-
-
pbrook authored
Paul Brook <paul@codesourcery.com> * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs. Use gfc_get_expr_charlen. * trans-expr.c (gfc_get_expr_charlen): New function. * trans.h (gfc_get_expr_charlen): Add prototype. testsuite/ * gfortran.dg/pr17612.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88483 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 24 Sep, 2004 1 commit
-
-
tobi authored
PR fortran/17615 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved function to determine return type. testsuite/ PR fortran/17615 * gfortran.dg/pr17615.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88061 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 17 Sep, 2004 1 commit
-
-
zack authored
Zack Weinberg <zack@codesourcery.com> * alias.c (find_base_decl): Remove unreachable case '3' block. * expr.c (safe_from_p): Abort if passed a type. * tree-gimple.c (recalculate_side_effects): Abort if passed anything other than an expression. * tree-ssa-pre.c (phi_translate): Return expr immediately if is_gimple_min_invariant is true for it. Reorder cases for clarity. Abort on un-handled tree classes. (valid_in_set): Likewise. * tree.c (tree_code_class_strings): New static data. * tree.h (enum tree_code_class): New. (tree_code_class_strings): Declare. (TREE_CODE_CLASS_STRING, EXCEPTIONAL_CLASS_P, CONSTANT_CLASS_P) (REFERENCE_CLASS_P, COMPARISON_CLASS_P, UNARY_CLASS_P, BINARY_CLASS_P) (STATEMENT_CLASS_P, EXPRESSION_CLASS_P, IS_TYPE_OR_DECL_P): New macros. (TYPE_P, DECL_P, IS_NON_TYPE_CODE_CLASS, IS_EXPR_CODE_CLASS) (checking macros, EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_LOCUS): Update. * tree.def, c-common.def, objc/objc-t...
-
- 16 Sep, 2004 1 commit
-
-
kazu authored
interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h, resolve.c, scanner.c, trans-array.c, trans-array.h, trans-common.c, trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c, trans.h: Fix comment typos. Follow spelling conventions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87605 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 14 Sep, 2004 1 commit
-
-
kazu authored
trans-array.c, trans-common.c, trans-expr.c, trans-intrinsic.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@87492 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 08 Sep, 2004 1 commit
-
-
pbrook authored
* data.c: Don't include assert.h. Replace assert and abort with gcc_assert and gcc_unreachable. * dependency.c: Ditto. * f95-lang.c: Ditto. * iresolve.c: Ditto. * resolve.c: Ditto. * simplify.c: Ditto. * symbol.c: Ditto. * trans-array.c: Ditto. * trans-common.c: Ditto. * trans-const.c: Ditto. * trans-decl.c: Ditto. * trans-expr.c: Ditto. * trans-intrinsic.c: Ditto. * trans-io.c: Ditto. * trans-stmt.c: Ditto. * trans-types.c: Ditto. * trans.c: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87187 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 31 Aug, 2004 1 commit
-
-
tobi authored
* trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace all occurences of 'gfc_strlen_type_node' by 'gfc_charlen_type_node'. * trans-types.h: Same. Also update comment accordingly. libgfortran/ * libgfortran.h: Replace 'gfc_strlen_type' by 'gfc_charlen_type'. Update comment accordingly. * intrinsics/args.c, intrinsics/env.c, io/io.h, io/transfer.c: Replace all occurences of 'gfc_strlen_type' by 'gfc_charlen_type'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86828 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 30 Aug, 2004 1 commit
-
-
rth authored
(fortran/trans-decl.o, fortran/trans-types.o): Likewise. * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int, c_long, c_long_long. (gfc_logical_info): Add c_bool. (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double. * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION rather than gfc_int[48]_type_node for allocate choice. * trans-decl.c (gfc_build_intrinsic_function_decls): Cache local copies of some kind type nodes. (gfc_build_builtin_function_decls): Likewise. * trans-expr.c (gfc_conv_power_op): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_index, gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify, gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise. * trans-stmt.c (gfc_trans_pause, gfc_trans_stop, gfc_trans_character_select, gfc_trans_allocate): Likewise. * trans-io.c (gfc_pint4_type_node): Move into ... (gfc_build_io_library_fndecls): ... here. Cache local copies of some kind type nodes. * trans-types.c (gfc_type_nodes): Remove. (gfc_character1_type_node, gfc_strlen_type_node): New. (gfc_integer_types, gfc_logical_types): New. (gfc_real_types, gfc_complex_types): New. (gfc_init_kinds): Fill in real mode_precision. (gfc_build_int_type, gfc_build_real_type): New. (gfc_build_complex_type, gfc_build_logical_type): New. (c_size_t_size): New. (gfc_init_types): Loop over kinds. (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind. (gfc_get_complex_type, gfc_get_logical_type): Likewise. (gfc_get_character_type_len): Likewise. (gfc_type_for_size): Loop over kinds; use a reduced set of unsigned type nodes. (gfc_type_for_mode): Loop over kinds. (gfc_signed_or_unsigned_type): Use gfc_type_for_size. (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type. * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE, F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE, F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE, F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE, F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE, F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes, gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node, gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node, gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node, gfc_complex8_type_node, gfc_complex16_type_node, gfc_logical1_type_node, gfc_logical2_type_node, gfc_logical4_type_node, gfc_logical8_type_node, gfc_logical16_type_node, gfc_strlen_kind): Remove. (gfc_character1_type_node): Turn in to a variable. (gfc_strlen_type_node): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86806 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 25 Aug, 2004 3 commits
-
-
tobi authored
* expr.c (gfc_check_assign): Add comment. Add new warning. * trans-expr.c (gfc_conv_function_call): Correctly dereference result of pointer valued function when not in pointer assignment. testsuite/ * gfortran.dg/assignment_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86585 138bc75d-0d04-0410-961f-82ee72b054a4
-
pbrook authored
* trans-array.c (gfc_trans_allocate_temp_array): Remove string_length argument. (gfc_trans_array_ctor_element): New function. (gfc_trans_array_constructor_subarray): Use it. (gfc_trans_array_constructor_value): Ditto. Handle constant character arrays. (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions. (gfc_trans_array_constructor): Use them. (gfc_add_loop_ss_code): Update to new gfc_ss layout. (gfc_conv_ss_descriptor): Remember section string length. (gfc_conv_scalarized_array_ref): Ditto. Remove dead code. (gfc_conv_resolve_dependencies): Update to new gfc_ss layout. (gfc_conv_expr_descriptor): Ditto. (gfc_conv_loop_setup): Ditto. Spelling fixes. * trans-array.h (gfc_trans_allocate_temp_array): Update prototype. * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout. * trans-expr.c (gfc_conv_component_ref): Turn error into ICE. (gfc_conv_variable): Set string_length from section. (gfc_conv_function_call): Remove extra argument. (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout. * trans-types.c (gfc_get_character_type_len): New function. (gfc_get_character_type): Use it. (gfc_get_dtype): Return zero for internal types. * trans-types.h (gfc_get_character_type_len): Add prototype. * trans.h (struct gfc_ss): Move string_length out of union. testsuite/ * gfortran.dg/string_ctor_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86558 138bc75d-0d04-0410-961f-82ee72b054a4
-
tobi authored
(build_v): Remove. * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of build. * trans-array.c (gfc_conv_descriptor_data, gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage, gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray, 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_conv_array_ref, gfc_trans_preloop_setup, gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size, gfc_conv_array_initializer, gfc_trans_array_bounds, gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor, gfc_conv_array_parameter, gfc_trans_deferred_array): Use buildN and buildN_v macros instead of build and build_v as appropriate. * trans-common.c (create_common): Same. * trans-decl.c (gfc_trans_auto_character_variable, gfc_trans_entry_master_switch, gfc_generate_function_code): Same. * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring, gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi, gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op, gfc_conv_expr_op, gfc_conv_function_call, gfc_trans_structure_assign): Same. * trans-intrinsic.c (build_fixbound_expr, build_round_expr, gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound, gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod, gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign, gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count, gfc_conv_intrinsic_arith, 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_merge, gfc_conv_intrinsic_strcmp, gfc_conv_allocated, gfc_conv_associated, prepare_arg_info, gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat, gfc_conv_intrinsic_iargc): Same. * trans-io.c (set_parameter_value, set_parameter_ref, set_string, set_flag, add_case, io_result, transfer_namelist_element, transfer_expr): Same. * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1, gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while, gfc_trans_integer_select, gfc_trans_logical_select, gfc_trans_character_select, gfc_trans_forall_loop, gfc_trans_nested_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp, compute_inner_temp_size, compute_overall_iter_number, allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign, gfc_trans_allocate): Same. * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same. * trans.c (gfc_add_modify_expr, gfc_finish_block, gfc_build_array_ref, gfc_build_function_call, gfc_trans_runtime_check): Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86554 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 22 Aug, 2004 1 commit
-
-
tobi authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86385 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 09 Aug, 2004 1 commit
-
-
pbrook authored
* trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT. (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta. (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary): Handle GFC_SS_COMPONENT. (gfc_conv_ss_startstride): Ditto. Set ss->shape. (gfc_conv_loop_setup): Tweak commends. Remove dead code. Use ss->shape. (gfc_conv_array_initializer): Call specific initializer routines. * trans-expr.c (gfc_trans_structure_assign): New function. (gfc_trans_subarray_assign): New function. (gfc_trans_subcomponent_assign): New fucntion (gfc_conv_structure): Use them. * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT. (gfc_ss): Add shape. testsuite/ * gfortran.dg/der_array_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85730 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 06 Aug, 2004 1 commit
-
-
pbrook authored
gfc_trans_allocate_temp_array, gfc_add_loop_ss_code, gfc_conv_loop_setup): For functions, if the shape of the result is not known in compile-time, generate an empty array descriptor for the result and let the callee to allocate the memory. (gfc_trans_dummy_array_bias): Do nothing for pointers. (gfc_conv_expr_descriptor): Use function return values directly. * trans-expr.c (gfc_conv_function_call): Always add byref call insn to pre chain. (gfc_trans_pointer_assignment): Add comments. (gfc_trans_arrayfunc_assign): Don't chain on expression. testsuite/ * gfortran.dg/ret_array_1.f90: New test. * gfortran.dg/ret_pointer_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85642 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 30 Jul, 2004 1 commit
-
-
rth authored
with DECL_INITIAL if fb_lvalue. * tree-gimple.c (is_gimple_id): Add CONST_DECL. * tree-pretty-print.c (dump_decl_name): Dump unnamed CONST_DECL with <Cxxx>. * tree-ssa-ccp.c (maybe_fold_stmt_indirect): Fold CONST_DECL. fortran/ * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL for TREE_CONSTANTs. testsuite/ * gfortran.fortran-torture/execute/intrinsic_rrspacing.f90: Fix write to constant argument. * gfortran.fortran-torture/execute/intrinsic_scale.f90: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85365 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 12 Jul, 2004 1 commit
-
-
pbrook authored
* trans-array.c (gfc_trans_auto_array_allocation): Remove initialization code. * trans-common.c (create_common): Use gfc_conv_initializer. * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer. * trans-expr.c (gfc_conv_initializer): New function. (gfc_conv_structure): Use it. * trans.h (gfc_conv_initializer): Add prototype. testsuite/ * gfortran.dg/pointer_init_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84542 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 10 Jul, 2004 2 commits
-
-
pbrook authored
(gfc_trans_static_array_pointer): Use it. * trans-array.h (gfc_build_null_descriptor): Add prototype. * trans-expr.c (gfc_conv_structure): Handle array pointers. testsuite/ * gfortran.fortran-torture/execute/der_init_5.f90: Enable more tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84477 138bc75d-0d04-0410-961f-82ee72b054a4
-
tobi authored
* trans-expr.c (gfc_conv_structure): Handle initialization of scalar pointer components. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84464 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 29 Jun, 2004 1 commit
-
-
steven authored
Make sure types in assignments are compatible. Mostly mechanical. * trans-const.h (gfc_index_one_node): New define. * trans-array.c (gfc_trans_allocate_array_storage, gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray, gfc_trans_array_constructor_value, gfc_trans_array_constructor, gfc_conv_array_ubound, gfc_conv_array_ref, gfc_trans_scalarized_loop_end, gfc_conv_section_startstride, gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds, gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct types in assignments, conversions and conditionals for expressions. * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring, gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_function_call, gfc_trans_pointer_assignment, gfc_trans_scalar_assign): Likewise. * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count, gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest, gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp, gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise. * trans-io.c (set_string): Likewise. * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp, compute_inner_temp_size, compute_overall_iter_number, gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign, gfc_trans_where_2): Likewise. * trans-types.c (gfc_get_character_type, gfc_build_array_type, gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise. * trans.c (gfc_add_modify_expr): Add sanity check that types for the lhs and rhs are the same for scalar assignments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83877 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 22 Jun, 2004 1 commit
-
-
kenner authored
component_ref_field_offset. * c-decl.c (build_array_declarator): Add news args for ARRAY_REF. * c-gimplify.c (gimplify_expr_stmt): Use alloc_stmt_list. (gimplify_decl_stmt): Call gimplify_type_sizes for type. For decl, call gimplify_one_sizepos and use statement list. (gimplify_compound_literal_expr): New arg PRE_P. Add statement to PRE_P list and return DECL. (c_gimplify_expr, case COMPOUND_LITERAL_EXPR): Add arg to gimplify_compound_literal_expr. * c-tree.h (getdecls): Deleted. * c-typeck.c (build_component_ref): Add operand for COMPONENT_REF. (build_array_ref): Add two operands for ARRAY_REF. (build_unary_op): Set TREE_INVARIANT and TREE_CONSTANT for COMPOUND_LITERAL_EXPR. * coverage.c (tree_coverage_counter_ref): Add new operands for ARRAY_REF. * emit-rtl.c (component_ref_for_mem_expr): Add new operand for COMPONENT_REF. (set_mem_attributes_minus_bitpos): Use array_ref_low_bound and array_ref_element_size. (widen_memory_access):Use component_ref_field_offset. * explow.c (update_nonlocal_goto_save_area): Add two operands for ARRAY_REF. * expr.c (array_ref_element_size, array_ref_low_bound): New functions. (component_ref_field_offset): Likewise. (get_inner_reference): Use them. (expand_expr_real_1, case ARRAY_REF): Use array_ref_low_bound. * fold-const.c (fold, case EQ_EXPR): Properly handle DECL_SIZE. (fold_read_from_constant_string): Use array_ref_low_bound. Verify that result is a character type. (build_fold_indirect_ref): Add two operands for ARRAY_REF. * function.c (expand_function_start): Likewise. * gimple-low.c (expand_var_p): Delete duplicated line. * gimplify.c: Add static decls for local functions. (cgraph.h): Now included. (create_tmp_var): Remove check for ARRAY_TYPE. (copy_if_shared_r): Look at bounds and sizes of types. (build_and_jump): Return alloc_stmt_list instead of build_empty_stmt. (gimplify_exit_expr, shortcut_cond_expr): Likewise. (gimplify_save_expr, gimple_push_cleanup): Likewise. (gimplify_init_constructor): Likewise. WANT_VALUE now bool. If empty list with no result wanted, return GS_UNHANDLED. Add additional operands for ARRAY_REF and COMPONENT_REF. (canonicalize_component_ref): Convert to &array[L]. (gimplify_array_ref_to_plus): Use array_ref_element_size and array_ref_lower_bound. (build_addr_expr_with_type, build_addr_expr): New functions. (gimplify_compound_lval): WANT_LVALUE now bool. Major rework to allow handle_component_p and initialize and gimplify new operands for ARRAY_REF, ARRAY_RANGE_REF, and COMPONENT_REF. (gimplify_array_ref): Deleted. (gimplify_self_mod_expr): WANT_VALUE now bool. (gimplify_modify_expr): Gimplify to_p and from_p later. Factor out code into gimplify_modify_expr_rhs and call twice. Move variable-size code earlier and handle PLACEHOLDER_EXPR. (gimplify_modify_expr_rhs, gimplify_variable_sized_compare): New fns. (gimplify_addr_expr, case VIEW_CONVERT_EXPR): New case. (gimplify_expr, case ARRAY_REF): Delete special case. Instead handle like COMPONENT_REF; also do ARRAY_RANGE_REF, IMAGPART, and REALPART the same way. (gimplify_expr, case VIEW_CONVERT_EXPR): New case. (gimplify_expr): Call gimplify_variable_sized_compare if applicable. Call alloc_stmt_list instead of build_empty_stmt. Deal with _REF that's volatile. (gimplify_type_sizes, gimplify_one_sizepos): New functions. (unshare_body, unvisit_body): New functions. (gimplify_body): Call them. * stmt.c (expand_stack_alloc): Don't expand TYPE_MAX_VALUE. * stor-layout.c (get_pending_sizes): Don't change SAVE_EXPR_CONTEXT. * tree-alias-common.c (get_alias_var): Also skip ARRAY_RANGE_REF. * tree-cfg.c (tree_node_can_be_shared): Treat ARRAY_RANGE_REF like ARRAY_REF. (verify_expr, case ADDR_EXPR): Use handled_component_p. * tree-dfa.c (get_virtual_var): Likewise. * tree-dump.c (dequeue_and_dump, case COMPONENT_REF, ARRAY_REF): New cases to dump new operands; likewise for ARRAY_RANGE_REF. * tree-eh.c (tree_could_trap, case ARRAY_RANGE_REF): Like ARRAY_REF. * tree-gimple.c (is_gimple_addr_expr_arg): Add ARRAY_RANGE_REF and INDIRECT_REF. (get_base_address): Use handled_component_p. * tree-gimple.h (gimplify_type_sizes, gimplify_one_sizepos): New. * tree-line.c (walk_tree): Walk more things for types and decls. * tree-mudflap.c (mf_build_check_statement_for): Add new operands for ARRAY_REF and COMPONENT_REF. (mx_xform_derefs_1): Clean up usage of decl sizes. * tree-nested.c (build_addr): Use handled_component_p. (walk_stmts, case CATCH_EXPR): Add missing "break". (get_static_chain, get_frame_field): Add new operand for COMPONENT_REF. (finalize_nesting_tree_1): Likewise. (convert_nonlocal_reference, case ARRAY_RANGE_REF): Like ARRAY_REF and process additional operands. (convert_local_reference): Likewise. * tree-outof-ssa.c (discover_nonconstant_array_refs_r): Treat ARRAY_RANGE_REF similarly to ARRAY_REF. * tree-pretty-print.c (dump_generic_node, case QUAL_UNION_TYPE): Handle like RECORD_TYPE. (dump_generic_node, case COMPONENT_REF): Print offset operand. (dump_generic_node, case ARRAY_RANGE_REF): Treat like ARRAY_REF and print lower bound and element size for both. (op_prio, case ARRAY_RANGE_REF): Like ARRAY_REF. * tree-sra.c (csc_build_component_ref): Add new operand. (scalarize_call_expr): Use get_base_address. * tree-ssa-ccp.c (widen_bitfield): Clean up size handling. (maybe_fold_offset_to_array_ref): Rework to handle input having an ARRAY_REF, refine handling of lower bound, and add new operands for ARRAY_REF. (maybe_fold_to_component_ref): Add new operand for COMPONENT_REF. (maybe_fold_stmt_indirect): Only fold *&B to B if types match. (maybe_fold_stmt_addition): Only handle constant lower bound. * tree-ssa-operands.c (get_expr_operands): Minor rearrangements. Treat ARRAY_REF and ARRAY_RANGE_REF the same; look at extra operands. Look at new offset operand of COMPONENT_REF. * tree-ssa.c (set_is_used): Use handled_component_p. * tree.c (substitute_in_expr, case COMPONENT_REF): Add new operand. (stabilize_reference, case COMPONENT_REF): Likewise. (stabilize_reference, case ARRAY_RANGE_REF, ARRAY_REF): Similarly. (recompute_tree_invariant_for_addr_expr): Completely rework to be more precise. Also set TREE_SIDE_EFFECTS. (build1_stat, case ARRAY_EXPR): Don't handle TREE_SIDE_EFFECTS here. (build2_stat, build3_stat, build4_stat): For references, propagate TREE_THIS_VOLATILE. (get_unwidened): Add new operand for COMPONENT_REF. (get_narrower): Likewise; use host_integerp for DECL_SIZE. * tree.def (COMPONENT_REF): Add new operand. (ARRAY_REF, ARRAY_RANGE_REF): Add two new operands. * tree.h (array_ref_element_size, array_ref_low_bound): New decls. (component_ref_field_offset): Likewise. * config/alpha/alpha.c (alpha_va_start): Add new op for COMPONENT_REF. (alpha_gimplify_va_arg): Likewise. * config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise. * config/i860/i860.c (i860_va_start, i860_va_arg): Likewise. * config/iq2000/iq2000.c (iq2000_va_arg): Likewise. * config/mips/mips.c (mips_va_start, mips_va_arg): Likewise. * config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg): Likewise. * config/s390/s390.c (s390_va_start, s390_gimplify_va_arg): Likewise. * config/sh/sh.c (sh_va_start, sh_va_arg): Likewise. * config/stormy16/stormy16.c (xstormy1_expand_builin_va_start): Likewise. (xstormy16_expand_builtin_va_arg): Likewise. * config/xtensa/xtensa.c (xtensa_va_start, xtensa_va_arg): Likewise. * cp/call.c (build_vfield_ref): Add new operand for COMPONENT_REF. (build_new_method_call): Likewise. * cp/decl.c (local_variable_p_walkfn): Don't walk into types. * cp/decl2.c (grok_array_decl): Add new operands for ARRAY_REF. (build_anon_union_vars): Add new operand for COMPONENT_REF. * cp/init.c (buld_new): Add new operand for ARRAY_REF. * cp/method.c (do_build_copy_constructor): New op for COMPONENT_REF. (do_build_assign_ref): Likewise. * cp/parser.c (cp_parser_direct_new_declarator): Add new operands for ARRAY_REF. (cp_parser_direct_declarator): Likewise. * cp/pt.c (tsubst): Likewise. (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand for COMPONENT_REF. * cp/semantics.c (finish_non_static_data_member): Add new operand for COMPONENT_REF. * cp/typeck.c (build_class_member_access_expr): Likewise. (build_class_member_access_expr, finish_class_member_access_expr): Likewise. (build_ptrmemfunc_access_expr): Likewise. (build_array_ref): Add new operands for ARRAY_REF. * cp/typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too. * cp/tree.c (count_trees_r, no_linkage_helper): Don't walk in types. * fortran/f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted. * fortran/trans-array.c (gfc_conv_descriptor_data): Add operand for COMPONENT_REF. (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise. (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise. (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise. * fortran/trans-common.c (create_common): Likewise. * fortran/trans-expr.c (gfc_conv_component_ref): Likewise. * fortran/trans-io.c (set_parameter_value): Likewise. (set_parameter_ref, set_string, set_flag, io_result): Likewise. (transfer_expr): Likewise. * fortran/trans-decl.c (gfc_trans_auto_character_variable): Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified. (gfc_simplify_function): New function. (gfc_generate_function-code): Properly handle nested functions. * fortran/trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF. * java/class.c (build_class_ref): Add new operand for COMPONENT_REF. (build_static_field_ref): Likewise and add new operands for ARRAY_REF. * java/constants.c (build_ref_from_constant_pool): Likewise. * java/expr.c (build_java_array_length_access): Likewise. (build_get_class, build_field_ref, build_known_method_ref): Likewise. (invoke_build_dtable, build_invokevirtual): Likewise. (build_invokeinterface, java_expand_expr): Likewise. (emit_init_test_initialization): Likewise. * java/java-gimplify.c (java_gimplify_new_array_init): Likewise. * java/parse.y (make_qualifed_name, build_array_ref): Likewise. * objc/ojbc-act.c (generate_static_references): Add additional operands to ARRAY_REF. (generate_strings, build_method_prototype_list_template): Likewise. (generate_protocol_list): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83474 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 12 Jun, 2004 1 commit
-
-
tobi authored
PR fortran/12841 * interface.c (compare_parameter, compare_actual_formal): Don't check types and array shapes for NULL() * trans-expr.c (conv_function_call): No double indirection for NULL() ( I had accidentally committed the interface.c part before) testuite/ PR fortran/12841 * gfortran.fortran-torture/execute/null_arg.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83028 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 09 Jun, 2004 1 commit
-
-
toon authored
* trans-expr.c (gfc_conv_cst_int_power): Compute x**(-n) by converting it to (1/x)**n instead of 1/x**n. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82850 138bc75d-0d04-0410-961f-82ee72b054a4
-