2010-08-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/45143
* io/format.c: Remove fnode storage structure definitions, moving these
to format.h. (parse_format_list): Add check for data descriptors,
taking care of nested formats. Adjust calling parameters to pass a
check flag. (parse_format): Likewise.
* io/format.h: Add structures moved from format.c.
From-SVN: r162978
* gcc-interface/decl.c (subst_pair): Declare. Declare a VEC of it.
(build_subst_list): Return a VEC instead of a tree.
(build_variant_list): Take a VEC for subst_list. Adjust
accordingly.
(create_field_decl_from): Likewise.
(create_variant_part_from): Likewise.
(copy_and_substitute_in_size): Likewise.
(gnat_to_gnu_entity): Adjust for new interface to build_subst_list.
Free the built vector.
From-SVN: r162975
2010-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45159
* dependency.c (check_section_vs_section): Handle cases where
the start expression coincides with the lower or upper
bound of the array.
2010-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45159
* gfortran.dg/dependency_31.f90: New test.
From-SVN: r162966
2010-08-06 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/tuple (pack_arguments): Rename to forward_as_tuple
and simplify, per US 98 and US 99.
* testsuite/20_util/tuple/creation_functions/pack_arguments.cc:
Rename to...
* testsuite/20_util/tuple/creation_functions/forward_as_tuple.cc:
... this, adjust.
* testsuite/20_util/pair/piecewise.cc: Adjust.
From-SVN: r162948
* postreload.c (reload_cse_simplify_operands): Use
SET_REGNO_RAW instead of SET_REGNO.
* caller-save.c (reg_save_code): Use SET_REGNO_RAW instead of
SET_REGNO.
* ira.c (setup_prohibited_mode_move_regs): Use SET_REGNO_RAW
instead of SET_REGNO.
* rtl.h (SET_REGNO_RAW): New macro.
From-SVN: r162924
2010-08-05 Richard Guenther <rguenther@suse.de>
* expr.c (store_expr): Use emit_block_move only if both
source and target are MEMs. Use store_bit_field if only
the target is a MEM.
From-SVN: r162918
2010-08-05 Martin Jambor <mjambor@suse.cz>
* ipa-cp.c (ipcp_discover_new_direct_edges): New function.
(ipcp_insert_stage): Redirect only edges not flagged with
indirect_inlining_edge. Call ipcp_discover_new_direct_edges for all
discovered constants.
* testsuite/gcc.dg/ipa/ipcp-ii-1.c: New test.
* testsuite/g++.dg/ipa/ipcp-ivi-1.C: Likewise.
From-SVN: r162912
2010-08-05 Martin Jambor <mjambor@suse.cz>
* ipa-prop.h (enum ipa_lattice_type): Changed comments.
(struct ipa_param_descriptor): New fields types and
cannot_devirtualize.
(ipa_param_cannot_devirtualize_p): New function.
(ipa_param_types_vec_empty): Likewise.
(ipa_make_edge_direct_to_target): Declare.
* ipa-cp.c: Fixed first stage driver name in initial comment,
described devirtualization there too.
(ipcp_analyze_node): Call ipa_analyze_params_uses.
(ipcp_print_all_lattices): Print devirtualization info.
(ipa_set_param_cannot_devirtualize): New function.
(ipcp_initialize_node_lattices): Set cannot_devirtualize when setting
lattice to BOTTOM.
(ipcp_init_stage): Merged into...
(ipcp_generate_summary): ...its caller.
(ipcp_change_tops_to_bottom): Also process type lists.
(ipcp_add_param_type): New function.
(ipcp_copy_types): Likewise.
(ipcp_propagate_types): Likewise.
(ipcp_propagate_stage): Also propagate types.
(ipcp_need_redirect_p): Variable jump_func moved to its scope block.
Also return true if propagated types require it.
(ipcp_update_callgraph): Dump redirection info.
(ipcp_process_devirtualization_opportunities): New function.
(ipcp_const_param_count): Include known type information.
(ipcp_insert_stage): Call ipcp_process_devirtualization_opportunities
on new node. Fixed formatting.
* ipa-prop.c (make_edge_direct_to_target): Renamed to
ipa_make_edge_direct_to_target and changed all callers. Made
externally visible.
(ipa_node_duplication_hook): Duplicate types vector.
* cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Also try to
redirect outgoing calls for which we can't get a decl from the
statement. Check that we can get a decl from the call statement.
* ipa-inline.c (inline_indirect_intraprocedural_analysis): Call
ipa_analyze_params_uses only when ipa-cp is disabled.
* tree-inline.c (get_indirect_callee_fndecl): Removed.
(expand_call_inline): Do not call get_indirect_callee_fndecl.
* params.def (PARAM_DEVIRT_TYPE_LIST_SIZE): New parameter.
* Makefile.in (ipa-cp.o): Add gimple.h to dependencies.
* testsuite/g++.dg/ipa/devirt-1.C: New test.
* testsuite/g++.dg/ipa/devirt-2.C: Likewise.
* testsuite/g++.dg/ipa/devirt-3.C: Likewise.
* testsuite/g++.dg/ipa/devirt-4.C: Likewise.
* testsuite/g++.dg/ipa/devirt-5.C: Likewise.
* testsuite/gcc.dg/ipa/iinline-3.c: Likewise.
From-SVN: r162911
* expmed.c (expand_mult_const) <case alg_shift>: Expand shift into
temporary. Emit move from temporary to accum, so REG_EQUAL note will
be attached to this insn in correct mode.
From-SVN: r162910
2010-08-05 Robert Dewar <dewar@adacore.com>
* gnat1drv.adb: Minor reformatting.
2010-08-05 Ed Schonberg <schonberg@adacore.com>
* sem.adb (Do_Unit_And_Dependents): If some parent unit is an
instantiation, process its body before the spec of the main unit,
because it may contain subprograms invoked in the spec of main.
* einfo.ads: Add documention of delayed freeze.
2010-08-05 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Process_Linker): Take into account new values for
attribute Response_File_Format.
* prj.ads (Response_File_Format): New enumeration values GCC_GNU,
GCC_Object_List and GCC_Option_List.
2010-08-05 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Expand_N_Selected_Component): Do not constant-fold a
selected component that denotes a discriminant if it is the
discriminant of a component of an unconstrained record type.
From-SVN: r162908
2010-08-05 Ed Schonberg <schonberg@adacore.com>
* exp_util.adb (Insert_Actions): If the action appears within a
conditional expression that is already analyzed, insert action further
out.
2010-08-05 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb: Minor reformatting.
From-SVN: r162907
2010-08-05 Thomas Quinot <quinot@adacore.com>
* exp_ch4.adb: Minor reformatting
* gnat1drv.adb: Minor reformatting.
Minor code reorganization (use Nkind_In).
2010-08-05 Ed Schonberg <schonberg@adacore.com>
* exp_util.ads, exp_util.adb (Needs_Constant_Address): New predicate to
determine whether the expression in an address clause for an
initialized object must be constant. Code moved from freeze.adb.
(Remove_Side_Effects): When the temporary is initialized with a
reference, indicate that the temporary is a constant as done in all
other cases.
* freeze.adb (Check_Address_Clause): use Needs_Constant_Address.
* exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case 'Address):
If object does not need a constant address, remove side effects from
address expression, so it is elaborated at the point of the address
clause and not at the freeze point of the object, so that elaboration
order is respected.
2010-08-05 Vincent Celier <celier@adacore.com>
* prj.adb (Is_Compilable): Return False for header files of non Ada
languages.
2010-08-05 Emmanuel Briot <briot@adacore.com>
* prj-nmsc.adb: The Missing_Source_Files flag also considers a missing
exec directory as a warning rather than an error.
From-SVN: r162906
2010-08-05 Thomas Quinot <quinot@adacore.com>
* sem_ch6.adb, gnat1drv.adb, exp_ch6.adb, sem_eval.adb: Minor
reformatting.
2010-08-05 Steve Baird <baird@adacore.com>
* exp_util.adb (Remove_Side_Effects): An access value which designates
a volatile object of a nonvolatile type is prohibited.
Do not call Make_Reference to construct a reference to such an object.
From-SVN: r162905
2010-08-05 Gary Dismukes <dismukes@adacore.com>
* sem_ch4.adb (Analyze_Allocator): Flag errors on allocators of a
nested access type whose designated type has tasks or is a protected
object when the restrictions No_Task_Hierarchy or
No_Local_Protected_Objects apply. Add ??? comment.
* sem_ch9.adb (Analyze_Protected_Type): Give a warning when a protected
type is not a library-level type and No_Local_Protected_Objects applies.
(Analyze_Task_Type): Give a warning when a task type is not a
library-level type and No_Task_Hierarchy applies.
From-SVN: r162902