invoke.texi (-Ofast): Also enables -fstack-arrays.
[gcc.git] / gcc / fortran / ChangeLog
index f6e7d4780ef03ef2d98ad66f7214f483a899147e..b4168316436bf7b06a0c42006ef313527a00cc2d 100644 (file)
@@ -1,3 +1,336 @@
+2011-05-14  Tobias Burnus  <burnus@net-b.de>
+
+       * options.c (gfc_init_options, gfc_post_options): Enable
+       -fstack-arrays by default if -Ofast is used.
+       * invoke.texi (-fstack-arrays): Document this.
+
+2011-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
+
+       PR libfortran/48915
+       * gfortran.h (gfc_option_t): Remove flag_dump_core.
+       * gfortran.texi (GFORTRAN_ERROR_DUMPCORE): Remove section.
+       (GFORTRAN_ERROR_BACKTRACE): Document that it's enabled by default.
+       * intrinsic.texi (ABORT): Remove explanation of -fdump-core.
+       * invoke.texi: Remove -fdump-core, document that -fbacktrace is
+       enabled by default.
+       * lang.opt: Remove -fdump-core.
+       * options.c (gfc_init_options): Make backtrace default to enabled,
+       remove dump_core.
+       (gfc_handle_option): Remove OPT_fdump-core.
+       * trans-decl.c: Pass a 0 to preserve ABI.
+
+2011-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
+
+       * gfortran.texi: Remove GFORTRAN_USE_STDERR documentation.
+
+2011-05-13  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/48972
+       * io.c (resolve_tag_format, resolve_tag): Make sure
+       that the string is of default kind.
+       (gfc_resolve_inquire): Also resolve decimal tag.
+
+2011-05-12  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/48972
+       * resolve.c (resolve_intrinsic): Don't resolve module
+       intrinsics multiple times.
+
+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-07  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * f95-lang.c (global_bindings_p): Return bool and simplify.
+
+2011-05-07  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/18918
+       PR fortran/48919
+       * trans.h: Move gfc_init_coarray_decl prototype ...
+       * gfortran.h: ... to here.
+       * parse.c (translate_all_program_units): Call gfc_init_coarray_decl.
+       (gfc_parse_file): Update translate_all_program_units call.
+       * trans-decl.c (gfc_init_coarray_decl): Fix variable declaration,
+       new argument whether DECL_EXTERNAL should be used.
+       (create_main_function): Update gfc_init_coarray_decl call.
+       * trans-intrinsic.c (trans_this_image, trans_image_index,
+       conv_intrinsic_cobound): Ditto.
+
+2011-05-06  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/18918
+       * trans-array.c (gfc_walk_variable_expr): Continue walking
+       for scalar coarrays.
+       * trans-intrinsic.c (convert_element_to_coarray_ref): New function.
+       (trans_this_image, trans_image_index, conv_intrinsic_cobound): Use it.
+       (trans_this_image): Fix algorithm.
+       * trans-types.c (gfc_get_element_type, gfc_get_array_descriptor_base,
+       gfc_sym_type): Handle scalar coarrays.
+
+2011-05-06  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/48858
+       PR fortran/48820
+       * lang.opt (std=f2008tr): New.
+       * libgfortran.h (GFC_STD_F2008_TR): New macro constant.
+       * decl.c (verify_c_interop_param): Allow OPTIONAL in BIND(C)
+       procedures for -std=f2008tr/gnu/legacy.
+       (gfc_match_import): Set sym to NULL.
+       * options.c (set_default_std_flags,gfc_handle_option): Handle
+       -std=f2008tr.
+       * invoke.texi (-std=): Document -std=f2008tr.
+
+2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
+
+       * trans-decl.c (gfc_trans_entry_master_switch): Call build_case_label.
+       * trans-io.c (add_case): Likewise.
+       * trans-stmt.c (gfc_trans_integer_select): Likewise.
+       (gfc_trans_character_select): Likewise.
+
+2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * trans-decl.c (trans_function_start): Do not set
+       dont_save_pending_sizes_p.
+
+2011-05-04  Nathan Froyd  <froydnj@codesourcery.com>
+
+       * trans.h (gfc_chainon_list): Delete.
+       * trans.c (gfc_chainon_list): Delete.
+
+2011-05-04  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/48864
+       * invoke.texi (fno-protect-parens): Document
+       that -Ofast implies -fno-protect-parens.
+       * options.c (gfc_init_options, gfc_post_options):
+       Make -Ofast imply -fno-protect-parens.
+
+2011-05-04  Nathan Froyd  <froydnj@codesourcery.com>
+
+       * trans-decl.c (build_library_function_decl_1): Call
+       build_function_type_vec.  Adjust argument list building accordingly.
+       * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
+       * trans-types.c (gfc_get_function_type): Likewise.
+
+2011-05-04  Richard Guenther  <rguenther@suse.de>
+
+       * trans-array.c (gfc_trans_array_constructor_value): Use
+       size_int for bounds of range types.
+       (gfc_trans_array_constructor_value): Use size_type_node
+       for memcpy argument.
+       * trans-common.c (build_field): Use gfc_charlen_type_node
+       for lengths.
+       * trans-openmp.c (gfc_trans_omp_clauses): Do not pass NULL
+       as type to build_int_cst.
+       * trans-const.c (gfc_build_string_const): Use size_int
+       for bounds of range types.
+       (gfc_build_wide_string_const): Likewise.
+       * trans-stmt.c (gfc_trans_label_assign): Use gfc_charlen_type_node
+       for lengths.
+       (gfc_trans_character_select): Likewise.
+       (gfc_trans_character_select): Do not pass NULL
+       as type to build_int_cst.
+       (gfc_trans_character_select): Use size_int for bounds of range types.
+       * trans-io.c (gfc_build_io_library_fndecls): Likewise.
+       (add_case): Do not pass NULL as type to build_int_cst.
+       (transfer_expr): Likewise.
+       (transfer_array_desc): Likewise.
+       * trans-decl.c (gfc_add_assign_aux_vars): Use gfc_charlen_type_node
+       for lengths.
+       (gfc_trans_assign_aux_var): Likewise.
+       (create_main_function): Use size_int for bounds of range types.
+       * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): Do not pass
+       NULL as type to build_int_cst.
+       (gfc_conv_intrinsic_spacing): Likewise.
+       (gfc_conv_intrinsic_rrspacing): Likewise.
+       (gfc_conv_intrinsic_len): Use gfc_charlen_type_node for lengths.
+
+2011-05-04  Richard Guenther  <rguenther@suse.de>
+
+       * trans-types.c (gfc_get_array_type_bounds): Remove zero notrunc
+       argument to int_const_binop.
+
+2011-05-03  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/18918
+       * trans-intrinsic.c (trans_this_image): Implement version with
+       coarray argument.
+       (conv_intrinsic_cobound): Simplify code.
+       (gfc_conv_intrinsic_function): Call trans_this_image for
+       this_image(coarray) except for -fcoarray=single.
+
+2011-05-02  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  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+       * dump-prase-tree.c (show_code_node):  Set the current
+       namespace to the BLOCK before displaying it; restore
+       afterwards.
+
+2011-04-30  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/48821
+       * decl.c (gfc_match_import): Don't try to find the
+       symbol if already found.
+
+2011-04-30  Paul Thomas  <pault@gcc.gnu.org>
+
+       PR fortran/48746
+       * trans-expr.c (fcncall_realloc_result): Set the bounds and the
+       offset so that the lbounds are one.
+       (gfc_trans_arrayfunc_assign): Add rank to arguments of above.
+
+2011-04-29  Paul Thomas  <pault@gcc.gnu.org>
+
+       PR fortran/48462
+       * trans-expr.c (arrayfunc_assign_needs_temporary): Deal with
+       automatic reallocation when the lhs is a target.
+
+       PR fortran/48746
+       * trans-expr.c (fcncall_realloc_result): Make sure that the
+       result dtype field is set before the function call.
+
+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-29  Michael Matz  <matz@suse.de>
+
+       * options.c (options.c): Set warn_maybe_uninitialized.
+
+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-27  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  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+       * decl.c (gfc_match_end):  Check that the block name starts
+       with "block@".
+       * parse.c (gfc_build_block_ns):  Make block names unique by
+       numbering them.
+
+2011-04-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+       * frontend-passes.c (inserted_block):  New variable.
+       (changed_statement):  Likewise.
+       (create_var):  Encase statement to be operated on in a BLOCK.
+       Adjust code insertion for BLOCK.
+       (cfe_code):  Set inserted_block and changed_statement to NULL.
+
+2011-04-23  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/18918
+       * module.c (mio_array_spec): Set as->cotype on reading.
+       * resolve.c (resolve_allocate_expr): Fix allocating coarray
+       components.
+
+2011-04-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+       PR fortran/48405
+       * frontend_passes (cfe_register_funcs): Remove workaround for DO
+       loops.
+       (gfc_code_walker):  Make sure the pointer to the current
+       statement doen't change when other statements are inserted.
+
+2011-04-21  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/18918
+       * array.c (gfc_match_array_spec): Fix maximal rank(+corank) check.
+
+2011-04-20  Jim Meyering  <meyering@redhat.com>
+
+       * expr.c (free_expr0): Remove useless if-before-free.
+       * gfortranspec.c (lang_specific_pre_link): Likewise.
+       * interface.c (gfc_extend_expr): Likewise.
+       * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
+
+2011-04-19  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/48588
+       PR fortran/48692
+
+       * module.c (fix_mio_expr): Commit created symbol.
+
+2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
+
+       * scanner.c (load_file): Use XCNEWVAR instead of xcalloc.
+
+2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
+
+       * frontend-passes.c (gfc_run_passes): Use XDELETEVEC instead of
+       free.
+
+2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
+
+       * misc.c (gfc_getmem): Remove function.
+       * gfortran.h: Remove gfc_getmem prototype. Replace gfc_getmem
+       usage with XCNEW or XCNEWVEC.
+       * expr.c (gfc_check_assign_symbol): Replace gfc_getmem usage with
+       XCNEW or XCNEWVEC.
+       * options.c (gfc_handle_module_path_options)
+       (gfc_get_option_string): Likewise.
+       * resolve.c (gfc_resolve_forall): Likewise.
+       * simplify.c (simplify_transformation_to_array): Likewise.
+       * target-memory.c (gfc_target_interpret_expr): Likewise.
+       * trans-common.c (get_segment_info, copy_equiv_list_to_ns)
+       (get_init_field): Likewise.
+       * trans-expr.c (gfc_conv_statement_function): Likewise.
+       * trans-io.c (nml_full_name): Likewise.
+       * trans-stmt.c (gfc_trans_forall_1): Likewise.
+       * scanner.c (load_file): Replace gfc_getmem usage with xcalloc.
+
+2011-04-19  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.
+
+2011-04-19  Martin Jambor  <mjambor@suse.cz>
+
+       * trans-decl.c (gfc_generate_function_code): Call cgraph_create_node
+       instead of cgraph_get_create_node.
+
 2011-04-18  Jim Meyering  <meyering@redhat.com>
 
        remove now-unused definition of gfc_free