OSDN Git Service

Backported from mainline
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
index 7fc66e0..1e66265 100644 (file)
@@ -1,3 +1,479 @@
+2011-07-04  Jakub Jelinek  <jakub@redhat.com>
+
+       Backported from mainline
+       2011-06-30  Jakub Jelinek  <jakub@redhat.com>
+
+       PR fortran/49540
+       * gfortran.h (gfc_constructor): Add repeat field.
+       * trans-array.c (gfc_conv_array_initializer): Handle repeat > 1.
+       * array.c (current_expand): Add repeat field.
+       (expand_constructor): Copy repeat.
+       * constructor.c (node_free, node_copy, gfc_constructor_get,
+       gfc_constructor_lookup): Handle repeat field.
+       (gfc_constructor_lookup_next, gfc_constructor_remove): New functions.
+       * data.h (gfc_assign_data_value): Add mpz_t * argument.
+       (gfc_assign_data_value_range): Removed.
+       * constructor.h (gfc_constructor_advance): Removed.
+       (gfc_constructor_lookup_next, gfc_constructor_remove): New prototypes.
+       * data.c (gfc_assign_data_value): Add REPEAT argument, handle it and
+       also handle overwriting a range with a single entry.
+       (gfc_assign_data_value_range): Removed.
+       * resolve.c (check_data_variable): Adjust gfc_assign_data_value
+       call.  Use gfc_assign_data_value instead of
+       gfc_assign_data_value_expr.
+
+2011-07-02  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/49466
+       * trans-array.c (structure_alloc_comps): Make sure sub-components
+       and extended types are correctly deallocated.
+
+2011-06-27  Release Manager
+
+       * GCC 4.6.1 released.
+
+2011-06-21  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/49112
+       * class.c (gfc_find_derived_vtab): Make vtab and default initialization
+       symbols SAVE_IMPLICIT.
+
+2011-06-19  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/47601
+       * module.c (mio_component_ref): Handle components of extended types.
+       * symbol.c (gfc_find_component): Return if sym is NULL.
+
+       PR fortran/48699
+       * check.c (gfc_check_move_alloc): If 'TO' argument is polymorphic,
+       make sure the vtab is present.
+
+       PR fortran/49074
+       * interface.c (gfc_extend_assign): Propagate the locus from the
+       assignment to the type-bound procedure call.
+
+       PR fortran/49417
+       * module.c (mio_component): Make sure the 'class_ok' attribute is set
+       for use-associated CLASS components.
+       * parse.c (parse_derived): Check for 'class_ok' attribute.
+       * resolve.c (resolve_fl_derived): Ditto.
+
+2011-06-17  Tobias Burnus
+
+       PR fortran/49324
+       * trans-expr.c (gfc_trans_assignment_1): Tell
+       gfc_trans_scalar_assign to also deep-copy RHS nonvariables
+       with allocatable components.
+       * trans-array.c (gfc_conv_expr_descriptor): Ditto.
+
+2011-06-06  Asher Langton  <langton2@llnl.gov>
+
+       PR fortran/49268
+       * trans-decl.c (gfc_trans_deferred_vars): Treat assumed-size Cray
+       pointees as AS_EXPLICIT.
+
+2011-06-02  Steven G. Kargl  <kargl@gcc.gnu.org>
+
+       PR fortran/49265
+       * decl.c (gfc_match_modproc):  Allow for a double colon in a module
+       procedure statement.
+       * parse.c ( decode_statement): Deal with whitespace around :: in
+       gfc_match_modproc.
+
+2011-05-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+       Backport from trunk
+       PR fortran/45786
+       * interface.c (gfc_equivalent_op):  New function.
+       (gfc_check_interface):  Use gfc_equivalent_op instead
+       of switch statement.
+       * decl.c (access_attr_decl):  Also set access to an
+       equivalent operator.
+
+2011-05-26  Paul Thomas  <pault@gcc.gnu.org>
+           Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+       PR fortran/48955
+       * trans-expr.c (gfc_trans_assignment_1): GFC_REVERSE_NOT_SET
+       changed to GFC_ENABLE_REVERSE.
+       * trans-array.c (gfc_init_loopinfo): GFC_CANNOT_REVERSE changed
+       to GFC_INHIBIT_REVERSE.
+       * gfortran.h : Enum gfc_reverse is now GFC_ENABLE_REVERSE,
+       GFC_FORWARD_SET, GFC_REVERSE_SET and GFC_INHIBIT_REVERSE.
+       * dependency.c (gfc_dep_resolver): Change names for elements of
+       gfc_reverse as necessary. Change the logic so that forward
+       dependences are remembered as well as backward ones. When both
+       have appeared, force a temporary.
+
+2011-05-11  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/48889
+       * expr.c (gfc_is_constant_expr): Use e->value.function.esym
+       instead of e->symtree->n.sym, if available.
+
+2011-05-04  Steven G. Kargl  <kargl@gcc.gnu.org>
+
+       PR fortran/48720
+       * gfortran.texi: Document the 'Q' exponent-letter extension.
+       * invoke.texi: Document -Wreal-q-constant.
+       * lang.opt: Add -Wreal-q-constant option.
+       * gfortran.h: Add warn_real_q_constant to option struct.
+       * primary.c (match_real_constant):  Use it.  Accept 'Q' as
+       exponent-letter for REAL(16) real-literal-constant with a
+       fallback to REAL(10) or error if REAL(10) is not available.
+       * options.c (gfc_init_options, set_Wall) Set it.
+       (gfc_handle_option): Handle new option.
+
+2011-04-30  Paul Thomas  <pault@gcc.gnu.org>
+
+       PR fortran/48462
+       PR fortran/48746
+       * trans-expr.c ( arrayfunc_assign_needs_temporary): Need a temp
+       if automatic reallocation on assignement is active, the lhs is a
+       target and the rhs an intrinsic function.
+       (realloc_lhs_bounds_for_intrinsic_call): Rename as next.
+       (fcncall_realloc_result): Renamed version of above function.
+       Free the original descriptor data after the function call.Set the bounds and the
+       offset so that the lbounds are one.
+       (gfc_trans_arrayfunc_assign): Call renamed function.
+
+2011-04-29  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/48810
+       * resolve.c (resolve_typebound_generic_call): Don't check access
+       flags of the specific function.
+
+       PR fortran/48800
+       * resolve.c (resolve_formal_arglist): Don't change AS_DEFERRED
+       to AS_ASSUMED_SHAPE for function results.
+       (resolve_fl_var_and_proc): Print also for function results with
+       AS_DEFERRED an error, if they are not a pointer or allocatable.
+       (resolve_types): Make sure arguments of procedures in interface
+       blocks are resolved.
+
+2011-04-28  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/48112
+       * resolve.c (resolve_fl_var_and_proc): Print diagnostic of
+       function results only once.
+       (resolve_symbol): Always resolve function results.
+
+       PR fortran/48279
+       * expr.c (gfc_check_vardef_context): Fix handling of generic
+       EXPR_FUNCTION.
+       * interface.c (check_interface0): Reject internal functions
+       in generic interfaces, unless -std=gnu.
+
+2011-04-28  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/48788
+       * resolve.c (resolve_global_procedure): Error recovery -
+       avoid segfault for (non)character-returning functions.
+
+2011-04-26  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/48588
+       * parse.c (resolve_all_program_units): Skip modules.
+       (translate_all_program_units): Handle modules.
+       (gfc_parse_file): Defer code generation for modules.
+       * module.c (fix_mio_expr): Commit created symbol.
+
+2011-04-13  Paul Thomas  <pault@gcc.gnu.org>
+
+       PR fortran/48360
+       PR fortran/48456
+       * trans-array.c (get_std_lbound): For derived type variables
+       return array valued component lbound.
+
+2011-04-05  Duncan Sands  <baldrick@free.fr>
+
+       * f95-lang.c (build_builtin_fntypes): Swap frexp parameter types.
+
+2011-04-04  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/48291
+       * class.c (get_unique_hashed_string): Adjust maximum allowable length
+       for unique type string.
+
+2011-03-25  Release Manager
+
+       * GCC 4.6.0 released.
+
+2011-03-12  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/48059
+       * trans-expr.c (gfc_apply_interface_mapping_to_expr): Replace base type
+       for polymorphic arguments.
+
+2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
+
+       PR fortran/48054
+       * intrinsic.texi: Clarify doc of logarithm functions.
+
+2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
+
+       PR fortran/47552
+       * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of
+       the string length variable.
+
+2011-03-11  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/47768
+       * module.c (ab_attribute,attr_bits): Add AB_PROC_POINTER_COMP.
+       (mio_symbol_attribute): Handle attribute 'proc_pointer_comp'.
+
+2011-03-06  Paul Thomas  <pault@gcc.gnu.org>
+           Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR fortran/47850
+       * expr.c (gfc_is_constant_expr): Only use gfc_constant_ac if
+       the expression has an iterator.  Otherwise, iterate through the
+       array, checking for constant expressions for each element.
+
+2011-03-04  Janne Blomqvist  <jb@gcc.gnu.org>
+
+       PR libfortran/47802
+       * intrinsic.texi: Update CTIME and FDATE documentation.
+
+2011-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * invoke.texi (Option Summary, Fortran Dialect Options)
+       (Preprocessing Options, Runtime Options, Code Gen Options):
+       Fix vertical list spacing by using @itemx for additinoal
+       items, empty line before @table.  Fix typos.
+
+2011-02-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
+
+       PR fortran/47894
+       * intrinsic.texi: Fix doc of the VERIFY intrinsic.
+
+2011-02-26  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/47846
+       * trans-stmt.c (gfc_trans_allocate): Fix allocation with
+       type-spec of deferred-length strings.
+
+2011-02-26  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/47886
+       * openmp.c (gfc_resolve_omp_directive): Resolve if()
+       condition of OpenMP's task.
+
+2011-02-26  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
+
+       PR fortran/47894
+       * intrinsic.texi: Fix doc of the VERIFY intrinsic.
+
+2011-02-24  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/47872
+       * intrinsic.texi (ALLOCATED, ATAN, BESSEL_JN, BESSEL_YN): Add
+       multitable for linebreak between different syntax variants.
+
+2011-02-24  Richard Guenther  <rguenther@suse.de>
+
+       PR fortran/47839
+       * f95-lang.c (pushdecl): For externs in non-global scope push
+       a copy of the decl into the BLOCK.
+
+2011-02-23  Mikael Morin  <mikael@gcc.gnu.org>
+
+       PR fortran/40850
+       * trans.c (gfc_prepend_expr_to_block): New function.
+       * trans.h (gfc_prepend_expr_to_block): Declare.
+       * trans-array.c (gfc_conv_array_parameter): Replace
+       gfc_add_expr_to_block with gfc_prepend_expr_to_block.
+
+2011-02-22  Paul Thomas  <pault@gcc.gnu.org>
+
+       PR fortran/45743
+       * trans-decl.c (gfc_get_extern_function_decl): Don't use the
+       gsymbol backend_decl if the procedure has a formal argument
+       that is a procedure.
+
+2011-02-22  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/41359
+       * trans-stmt.c (gfc_trans_if_1): Use correct line for
+       expressions in the if condition.
+
+2011-02-20  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/47797
+       * trans-decl.c (gfc_trans_deferred_vars): Use gfc_set_backend_locus and
+       gfc_restore_backend_locus to have better debug locations.
+       * trans-array.c (gfc_trans_deferred_array): Ditto.
+
+2011-02-20  Paul Thomas  <pault@gcc.gnu.org>
+
+       PR fortran/45077
+       PR fortran/44945
+       * trans-types.c (gfc_get_derived_type): Remove code that looks
+       for decls in gsym and add call to gfc_get_module_backend_decl.
+       * trans.h : Add prototype for gfc_get_module_backend_decl.
+       * trans-decl.c (gfc_get_module_backend_decl): New function.
+       (gfc_get_symbol_decl): Call it.
+
+2011-02-19  Paul Thomas  <pault@gcc.gnu.org>
+
+       PR fortran/47348
+       * trans-array.c (get_array_ctor_all_strlen): Move up in file.
+       (get_array_ctor_var_strlen): Add block dummy and add call to
+       get_array_ctor_all_strlen instead of giving up on substrings.
+       Call gcc_unreachable for default case.
+       (get_array_ctor_strlen): Add extra argument to in call to
+       get_array_ctor_var_strlen.
+
+2011-02-18  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/47789
+       * primary.c (gfc_match_structure_constructor): Handle empty parent
+       types.
+
+2011-02-18  Tobias Burnus
+
+       PR fortran/47775
+       * trans-expr.c (arrayfunc_assign_needs_temporary): Use
+       esym to check whether the specific procedure returns an
+       allocatable or pointer.
+
+2011-02-18  Michael Matz  <matz@suse.de>
+
+       PR fortran/45586
+       * gfortran.h (struct gfc_component): Add norestrict_decl member.
+       * trans.h (struct lang_type): Add nonrestricted_type member.
+       * trans-expr.c (gfc_conv_component_ref): Search fields with correct
+       parent type.
+       * trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
+       (gfc_sym_type): Use it.
+
+2011-02-18  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/47768
+       * resolve.c (resolve_transfer): Reject variables with procedure pointer
+       components.
+
+2011-02-18  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/47767
+       * gfortran.h (gfc_check_access): Removed prototype.
+       (gfc_check_symbol_access): Added prototype.
+       * module.c (gfc_check_access): Renamed to 'check_access', made static.
+       (gfc_check_symbol_access): New function, basically a shortcut for
+       'check_access'.
+       (write_dt_extensions,write_symbol0,write_generic,write_symtree): Use
+       'gfc_check_symbol_access'.
+       (write_operator,write_module): Renamed 'gfc_check_access'.
+       * resolve.c (resolve_fl_procedure,resolve_fl_derived,
+       resolve_fl_namelist,resolve_symbol,resolve_fntype): Use
+       'gfc_check_symbol_access'.
+
+2011-02-16  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/47745
+       * class.c (gfc_build_class_symbol): Set 'class_ok' attribute.
+       * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into
+       'gfc_build_class_symbol'.
+       (gfc_match_decl_type_spec): Reject unlimited polymorphism.
+       * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
+       * match.c (select_type_set_tmp): Move setting of 'class_ok' into
+       'gfc_build_class_symbol'.
+       * primary.c (gfc_variable_attr): Check for 'class_ok' attribute.
+
+2011-02-15  Steven G. Kargl  <kargl@gcc.gnu.org>
+
+       PR fortran/47633
+       . simplify.c (gfc_simplify_compiler_version): Fix off-by-one issue.
+
+2011-02-14  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/47730
+       * parse.c (gfc_build_block_ns): Commit 'block@' symbol.
+
+2011-02-14  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/47728
+       * class.c (gfc_build_class_symbol): Give a fatal error on polymorphic
+       arrays.
+       * primary.c (gfc_match_varspec): Avoid ICE for invalid class
+       declaration.
+
+2011-02-14  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/47349
+       * interface.c (get_expr_storage_size): Handle derived-type components.
+
+2011-02-13  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/47569
+       * interface.c (compare_parameter): Avoid ICE with
+       character components.
+
+2011-02-12  Janus Weil  <janus@gcc.gnu.org>
+
+       * class.c (gfc_build_class_symbol): Reject polymorphic arrays.
+       * decl.c (build_sym,build_struct,attr_decl1): Use return value of
+       'gfc_build_class_symbol'.
+
+2011-02-12  Michael Matz  <matz@suse.de>
+           Janus Weil  <janus@gcc.gnu.org>
+           Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/45586
+       * trans-expr.c (conv_parent_component_references): Avoid unintendent
+       skipping of parent compounds.
+
+2011-02-11  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/47550
+       * resolve.c (resolve_formal_arglist): PURE with VALUE
+       and no INTENT: Add -std= diagnostics.
+
+2011-02-09  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/47352
+       * resolve.c (resolve_procedure_interface): If interface has a result
+       variable, copy the typespec and set result pointer to self.
+
+2011-02-09  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/47463
+       * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
+
+2011-02-09  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/47637
+       * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
+
+2011-02-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       * io.c (match_io_element): Do not set dt if not inquire.
+
+2011-02-08  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/45290
+       * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
+       initialization target.
+
+2011-02-07  Janne Blomqvist  <jb@gcc.gnu.org>
+           Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * gfortran.texi (Thread-safety): texinfo styling fixes.
+       * intrinsic.texi: Likewise.
+
+2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
+
+       * gfortran.texi (Compiler Characteristics): Add reference to
+       thread-safety section.
+
+2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
+
+       * gfortran.texi (Thread-safety): New section.
+       * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
+       (GETENV): Likewise.
+       (GET_ENVIRONMENT_VARIABLE): Likewise.
+       (SYSTEM): Likewise.
+
 2011-02-06  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/47592