1. 13 Jun, 2005 1 commit
    • rth's avatar
      * trans-array.c (gfc_conv_descriptor_data_get): Rename from · 94be45c9
      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
      94be45c9
  2. 12 Jun, 2005 1 commit
    • tobi's avatar
      fortran/ · ea346118
      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
      ea346118
  3. 01 Jun, 2005 1 commit
  4. 31 May, 2005 1 commit
    • pault's avatar
      2005-05-30 Paul Thomas <pault@gcc.gnu.org> · dc5fe211
      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
      dc5fe211
  5. 30 May, 2005 2 commits
  6. 29 May, 2005 1 commit
    • pault's avatar
      2005-05-29 Paul Thomas <pault@gcc.gnu.org> · bf7e666b
      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
      bf7e666b
  7. 11 May, 2005 1 commit
    • tobi's avatar
      fortran/ · 65cf6ae7
      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
      65cf6ae7
  8. 10 May, 2005 1 commit
    • tobi's avatar
      gcc/fortran/ · bdaed7d2
      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
      bdaed7d2
  9. 29 Apr, 2005 2 commits
    • jakub's avatar
      2005-04-29 Jakub Jelinek <jakub@redhat.com> · c6871095
      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
      c6871095
    • pbrook's avatar
      2005-04-29 Paul Brook <paul@codesourcery.com> · 5cb9d0d8
      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
      5cb9d0d8
  10. 23 Mar, 2005 1 commit
    • steven's avatar
      * convert.c (convert): Replace fold (buildN (...)) with fold_buildN. · 318c9b27
      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
      318c9b27
  11. 04 Mar, 2005 1 commit
    • tobi's avatar
      fortran/ · 7eeec80a
      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
      7eeec80a
  12. 23 Feb, 2005 1 commit
    • tobi's avatar
      * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop' · 9b773341
      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
      9b773341
  13. 23 Jan, 2005 1 commit
  14. 22 Jan, 2005 1 commit
  15. 18 Jan, 2005 1 commit
  16. 03 Jan, 2005 1 commit
    • rth's avatar
      * arith.c: Add system.h; remove string.h · 7436502b
      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
      7436502b
  17. 27 Dec, 2004 1 commit
  18. 10 Nov, 2004 1 commit
  19. 08 Nov, 2004 1 commit
  20. 04 Oct, 2004 1 commit
  21. 24 Sep, 2004 1 commit
    • tobi's avatar
      fortran/ · e2293887
      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
      e2293887
  22. 17 Sep, 2004 1 commit
    • zack's avatar
      2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com> · ce45a448
      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...
      ce45a448
  23. 16 Sep, 2004 1 commit
  24. 14 Sep, 2004 1 commit
  25. 08 Sep, 2004 1 commit
    • pbrook's avatar
      * array.c: Don't include assert.h. · 22d678e8
      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
      22d678e8
  26. 31 Aug, 2004 1 commit
    • tobi's avatar
      fortran/ · 9ad09405
      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
      9ad09405
  27. 30 Aug, 2004 1 commit
    • rth's avatar
      * Make-lang.in (fortran/f95-lang.o): Update dependencies. · 90ba9145
      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
      90ba9145
  28. 25 Aug, 2004 3 commits
    • tobi's avatar
      fortran/ · fa069004
      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
      fa069004
    • pbrook's avatar
      PR fortran/17144 · 7949cb07
      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
      7949cb07
    • tobi's avatar
      * trans.h (build2_v, build3_v): New macros. · ed52ef8b
      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
      ed52ef8b
  29. 22 Aug, 2004 1 commit
  30. 09 Aug, 2004 1 commit
    • pbrook's avatar
      PR fortran/16919 · 9a0aec1d
      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
      9a0aec1d
  31. 06 Aug, 2004 1 commit
    • pbrook's avatar
      * trans-array.c (gfc_trans_allocate_array_storage, · 4396343e
      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
      4396343e
  32. 30 Jul, 2004 1 commit
    • rth's avatar
      * gimplify.c (gimplify_expr) <case CONST_DECL>: Don't replace · e67e5e1f
      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
      e67e5e1f
  33. 12 Jul, 2004 1 commit
    • pbrook's avatar
      * expr.c (gfc_check_assign_symbol): Handle pointer assignments. · bda1f152
      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
      bda1f152
  34. 10 Jul, 2004 2 commits
  35. 29 Jun, 2004 1 commit
    • steven's avatar
      2004-06-29 Steven Bosscher <stevenb@suse.de> · 260abd71
      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
      260abd71