OSDN Git Service

PR 18537
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
index f000725..47e6afd 100644 (file)
@@ -1,3 +1,236 @@
+2006-03-14  Steven G. Kargl  <kargls@comcast.net>
+
+       PR 18537
+       * gfortran.h: Wrap Copyright line.
+       (gfc_option_t): add warn_tabs member.
+       * lang.opt: Update Coyright year.  Add the Wtabs.
+       * invoke.texi: Document -Wtabs.
+       * scanner.c (gfc_gobble_whitespace): Use warn_tabs.  Add linenum to
+       suppress multiple warnings.
+       (load_line): Use warn_tabs.  Add linenum, current_line, seen_comment
+       to suppress multiple warnings.
+       * options.c (gfc_init_options): Initialize warn_tabs.
+       (set_Wall): set warn_tabs for -Wall.
+       (gfc_post_options): Adjust flag_tabs depending on -pedantic.
+       (gfc_handle_option):  Process command-line option -W[no-]tabs
+
+2006-03-13  Paul Thomas  <pault@gcc.gnu.org>
+
+       PR fortran/25378
+       * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Set the initial position to zero and
+       modify the condition for updating it, to implement the F2003 requirement for all(mask)
+       is false.
+
+2006-03-13  Jakub Jelinek  <jakub@redhat.com>
+
+       * trans-openmp.c (gfc_trans_omp_variable): Handle references
+       to parent result.
+       * trans-expr.c (gfc_conv_variable): Remove useless setting
+       of parent_flag, formatting.
+
+       * trans-decl.c (gfc_get_fake_result_decl): Re-add setting of
+       GFC_DECL_RESULT flag.
+
+2003-03-11  Roger Sayle  <roger@eyesopen.com>
+
+       * dependency.c (gfc_dep_compare_expr) <EXPR_OP>: Allow unary and
+       binary operators to compare equal if their operands are equal.
+       <EXPR_FUNCTION>: Allow "constant" intrinsic conversion functions
+       to compare equal, if their operands are equal.
+
+2006-03-11  Erik Edelmann  <eedelman@gcc.gnu.org>
+
+       * symbol.c (check_conflict): Allow allocatable function results,
+       except for elemental functions.
+       * trans-array.c (gfc_trans_allocate_temp_array): Rename to ...
+       (gfc_trans_create_temp_array): ... this, and add new argument
+       callee_alloc.
+       (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call
+       to gfc_trans_allocate_temp_array.
+       * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
+       * trans-expr.c (gfc_conv_function_call): Use new arg of
+       gfc_trans_create_temp_array avoid pre-allocation of temporary
+       result variables of pointer AND allocatable functions.
+       (gfc_trans_arrayfunc_assign): Return NULL for allocatable
+       functions.
+       * resolve.c (resolve_symbol): Copy value of 'allocatable' attribute
+       from sym->result to sym.
+
+2006-03-09  Erik Edelmann  <eedelman@gcc.gnu.org>
+
+       * trans-expr.c (gfc_add_interface_mapping): Copy 'allocatable'
+       attribute from sym to new_sym.  Call build_fold_indirect_ref()
+       for allocatable arguments.
+
+2006-03-09 Paul Thomas <pault@gcc.gnu.org>
+
+       PR fortran/26257
+       * trans-array.c (gfc_conv_expr_descriptor): Exclude calculation of
+       the offset and data when se->data_not_needed is set.
+       * trans.h: Include the data_not_need bit in gfc_se.
+       * trans-intrinsic.c (gfc_conv_intrinsic_size): Set it for SIZE.
+
+2006-03-06  Paul Thomas  <pault@gcc.gnu.org>
+            Erik Edelmann  <eedelman@gcc.gnu.org>
+
+       * trans-array.c (gfc_trans_dealloc_allocated): New function.
+       (gfc_trans_deferred_array): Use it, instead of inline code.
+       * trans-array.h: Prototype for gfc_trans_dealloc_allocated().
+       * trans-expr.c (gfc_conv_function_call): Deallocate allocated
+       ALLOCATABLE, INTENT(OUT) arguments upon procedure entry.
+
+2006-03-06  Paul Thomas  <pault@gcc.gnu.org>
+
+       PR fortran/26107
+       * resolve.c (resolve_function): Add name after test for pureness.
+
+       PR fortran/19546
+       * trans-expr.c (gfc_conv_variable): Detect reference to parent result,
+       store current_function_decl, replace with parent, whilst calls are
+       made to gfc_get_fake_result_decl, and restore afterwards. Signal this
+       to gfc_get_fake_result_decl with a new argument, parent_flag.
+       * trans-stmt.c (gfc_trans_return): gfc_get_fake_result_decl 2nd arg
+       is set to zero.
+       * trans.h: Add parent_flag to gfc_get_fake_result_decl prototype.
+       * trans-decl.c (gfc_get_fake_result_decl): On parent_flag, being set,
+       add decl to parent function. Replace refs to current_fake_result_decl
+       with refs to this_result_decl.
+       (gfc_generate_function_code): Null parent_fake_result_decl before the
+       translation of code for contained procedures. Set parent_flag to zero
+       in call to gfc_get_fake_result_decl.
+       * trans-intrinsic.c (gfc_conv_intrinsic_len): The same.
+
+2006-03-05  Steven G. Kargl  <kargls@comcast.net>
+
+       * simplify.c (gfc_simplify_verify):  Fix return when SET=''.
+
+2006-03-05  Erik Edelmann  <eedelman@gcc.gnu.org>
+
+       PR fortran/16136
+       * symbol.c (conf_std): New macro.
+       (check_conflict): Use it to allow ALLOCATABLE dummy
+       arguments for F2003.
+       * trans-expr.c (gfc_conv_function_call): Pass the
+       address of the array descriptor when dummy argument is
+       ALLOCATABLE.
+       * interface.c (compare_allocatable): New function.
+       (compare_actual_formal): Use it.
+       * resolve.c (resolve_deallocate_expr,
+       resolve_allocate_expr): Check that INTENT(IN) variables
+       aren't (de)allocated.
+       * gfortran.texi (Fortran 2003 status): List ALLOCATABLE
+       dummy arguments as supported.
+
+2006-03-03  Roger Sayle  <roger@eyesopen.com>
+
+       * dependency.c (gfc_check_element_vs_element): Revert last change.
+
+2006-03-03  Roger Sayle  <roger@eyesopen.com>
+
+       * dependency.c (gfc_check_element_vs_element): Consider two
+       unordered scalar subscripts as (potentially) equal.
+
+2006-03-03  Roger Sayle  <roger@eyesopen.com>
+
+       * dependency.c (gfc_check_dependency): Call gfc_dep_resolver to
+       check whether two array references have a dependency.
+       (gfc_check_element_vs_element): Assume lref and rref must be
+       REF_ARRAYs.  If gfc_dep_compare_expr returns -2, assume these
+       references could potentially overlap.
+       (gfc_dep_resolver): Whitespace and comment tweaks.  Assume a
+       dependency if the references have different depths.  Rewrite
+       final term to clarrify we only have a dependency for overlaps.
+
+2006-03-03  Thomas Koenig  <Thomas.Koenig@online.de>
+
+       PR fortran/25031
+       * trans-array.h:  Adjust gfc_array_allocate prototype.
+       * trans-array.c (gfc_array_allocate):  Change type of
+       gfc_array_allocatate to bool.  Function returns true if
+       it operates on an array.  Change second argument to gfc_expr.
+       Find last reference in chain.
+       If the function operates on an allocatable array, emit call to
+       allocate_array() or allocate64_array().
+       * trans-stmt.c (gfc_trans_allocate):  Code to follow to last
+       reference has been moved to gfc_array_allocate.
+       * trans.h:  Add declaration for gfor_fndecl_allocate_array and
+       gfor_fndecl_allocate64_array.
+       (gfc_build_builtin_function_decls):  Add gfor_fndecl_allocate_array
+       and gfor_fndecl_allocate64_array.
+
+2006-03-01  Roger Sayle  <roger@eyesopen.com>
+
+       * trans-stmt.c (generate_loop_for_temp_to_lhs): Add an additional
+       INVERT argument to invert the sense of the WHEREMASK argument.
+       Remove unneeded code to AND together a list of masks.
+       (generate_loop_for_rhs_to_temp): Likewise.
+       (gfc_trans_assign_need_temp): Likewise.
+       (gfc_trans_forall_1): Likewise.
+       (gfc_evaluate_where_mask): Likewise, add a new INVERT argument
+       to specify the sense of the MASK argument.
+       (gfc_trans_where_assign): Likewise.
+       (gfc_trans_where_2): Likewise.  Restructure code that decides
+       whether we need to allocate zero, one or two temporary masks.
+       If this is a top-level WHERE (i.e. the incoming MASK is NULL),
+       we only need to allocate at most one temporary mask, and can
+       invert it's sense to provide the complementary pending execution
+       mask.  Only calculate the size of the required temporary arrays
+       if we need any.
+       (gfc_trans_where): Update call to gfc_trans_where_2.
+
+2006-03-01  Paul Thomas  <pault@gcc.gnu.org>
+
+       * iresolve.c (gfc_resolve_dot_product):  Remove any difference in
+       treatment of logical types.
+       * trans-intrinsic.c (gfc_conv_intrinsic_dot_product):  New function. 
+
+       PR fortran/26393
+       * trans-decl.c (gfc_get_symbol_decl): Extend condition that symbols
+       must be referenced to include unreferenced symbols in an interface
+       body. 
+
+       PR fortran/20938
+       * trans-array.c (gfc_conv_resolve_dependencies): Add call to
+       gfc_are_equivalenced_arrays.
+       * symbol.c (gfc_free_equiv_infos, gfc_free_equiv_lists): New
+       functions. (gfc_free_namespace): Call them.
+       * trans-common.c (copy_equiv_list_to_ns): New function.
+       (add_equivalences): Call it.
+       * gfortran.h: Add equiv_lists to gfc_namespace and define
+       gfc_equiv_list and gfc_equiv_info.
+       * dependency.c (gfc_are_equivalenced_arrays): New function.
+       (gfc_check_dependency): Call it.
+       * dependency.h: Prototype for gfc_are_equivalenced_arrays.
+
+2006-03-01  Roger Sayle  <roger@eyesopen.com>
+
+       * dependency.c (gfc_is_same_range): Compare the stride, lower and
+       upper bounds when testing array reference ranges for equality.
+       (gfc_check_dependency): Fix indentation whitespace.
+       (gfc_check_element_vs_element): Likewise.
+       (gfc_dep_resolver): Likewise.
+
+2006-02-28  Thomas Koenig  <Thomas.Koenig@online.de>
+
+       * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc):
+       If the mask expression exists and has rank 0, enclose the
+       generated loop in an "if (mask)".  Put the default
+       initialization into the else branch.
+
+2006-02-25  Thomas Koenig  <Thomas.Koenig@online.de>
+
+       PR fortran/23092
+       * trans-intrinsic.c (gfc_conv_intrinsic_arith):  If the
+       mask expression exists and has rank 0, enclose the generated
+       loop in an "if (mask)".
+       * (gfc_conv_intrinsic_minmaxloc):  Likewise.
+
+2006-02-24  Paul Thomas  <pault@gcc.gnu.org>
+
+       PR fortran/26409
+       * resolve.c (resolve_contained_functions, resolve_types,
+       gfc_resolve): Revert patch of 2006-02-19.
+
 2006-02-24  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/24519
        * intrinsic.c (gfc_convert_type_warn): Call
        gfc_intrinsic_symbol() on the newly created symbol.
 
-2005-02-19  Paul Thomas  <pault@gcc.gnu.org>
+2006-02-19  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/25054
        * resolve.c (is_non_constant_shape_array): New function.
        * openmp.c (resolve_omp_clauses): Add a dummy case label to workaround
        PR middle-end/26316.
 
-2005-02-16  Paul Thomas  <pault@gcc.gnu.org>
+2006-02-16  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/24557
        * trans-expr.c (gfc_add_interface_mapping): Use the actual argument
        * trans-decl.c (gfc_generate_function_code): Add new argument,
        pedantic, to set_std call.
 
-2005-02-06  Thomas Koenig  <Thomas.Koenig@online.de>
+2006-02-06  Thomas Koenig  <Thomas.Koenig@online.de>
 
        PR libfortran/23815
        * gfortran.texi: Document the GFORTRAN_CONVERT_UNIT environment
        for checking arguments array and mask.
        (check_reduction):  Likewise.
 
-2005-01-30  Erik Edelmann  <eedelman@gcc.gnu.org>
+2006-01-30  Erik Edelmann  <eedelman@gcc.gnu.org>
 
        PR fortran/24266
        * trans-io.c (set_internal_unit): Check the rank of the
        * gfortran.h: Add prototype for gfc_dep_compare_expr.
        * dependency.h: Remove prototype for gfc_dep_compare_expr.
 
-2005-01-27  Paul Thomas  <pault@gcc.gnu.org>
+2006-01-27  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/25964
        * resolve.c (resolve_function): Add GFC_ISYM_LOC to the list of
        * lang-specs.h: Pass -fpreprocessed to f951 if preprocessing
        sources.
 
-2005-01-27  Erik Edelmann  <eedelman@gcc.gnu.org>
+2006-01-27  Erik Edelmann  <eedelman@gcc.gnu.org>
 
        * symbol.c (free_old_symbol): Fix confusing comment, and add code
          to free old_symbol->formal.
 
-2005-01-26  Paul Thomas  <pault@gcc.gnu.org>
+2006-01-26  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/25964
        * resolve.c (resolve_function): Exclude statement functions from
        temporary from "parm" to "ifm" to avoid clash with temp coming from
        trans-array.c.
 
-2005-01-25  Erik Edelmann  <eedelman@gcc.gnu.org>
+2006-01-25  Erik Edelmann  <eedelman@gcc.gnu.org>
 
        PR fortran/25716
        * symbol.c (free_old_symbol): New function.
        * resolve.c (gfc_resolve_index): Make sure typespec is
        properly initialized.
 
-2005-01-23  Paul Thomas  <pault@gcc.gnu.org>
+2006-01-23  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/25901
        * decl.c (get_proc_name): Replace subroutine and function attributes
        * gfortranspec.c (lang_specific_driver): Update copyright notice
        date.
 
-2005-01-21  Paul Thomas  <pault@gcc.gnu.org>
+2006-01-21  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/25124
        PR fortran/25625
        * scanner.c (load_line): use maxlen to determine the line-length used
        for padding lines in fixed form.
 
-2005-01-11  Paul Thomas  <pault@gcc.gnu.org>
+2006-01-11  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/25730
        * trans-types.c (copy_dt_decls_ifequal): Copy backend decl for
        (gfc_simplify_ichar): Get the result from unsinged char and in the
        range 0 to UCHAR_MAX instead of CHAR_MIN to CHAR_MAX.
 
-2005-01-08  Erik Edelmann  <eedelman@gcc.gnu.org>
+2006-01-08  Erik Edelmann  <eedelman@gcc.gnu.org>
 
        PR fortran/25093
        * resolve.c (resolve_fntype): Check that PUBLIC functions
        aren't of PRIVATE type.
 
-2005-01-07  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
+2006-01-07  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
 
        * decl.c (gfc_match_function_decl): Correctly error out in case of
        omitted function argument list.