Iain Sandoe [Sat, 1 May 2010 00:32:13 +0000 (00:32 +0000)]
[multiple changes]
2010-04-30 Iain Sandoe <iains@gcc.gnu.org>
PR objc++/32052
* objc-act.c (encode_aggregate_within): Encode structure tags
with template args for ObjC++.
2010-04-30 Iain Sandoe <iains@gcc.gnu.org>
PR objc++/32052
* obj-c++.dg/encode-2.mm: Remove XFAIL. Add test for anonymous
structure and nested declarations.
* obj-c++.dg/encode-3.mm: Remove XFAIL. Add test for anonymous
structure and nested declarations. Reduce header clutter and
use _exit() rather than abort().
* objc.dg/encode-10.m: New.
* objc.dg/encode-11.m: New.
Eric Botcazou [Fri, 30 Apr 2010 21:10:53 +0000 (21:10 +0000)]
tree-ssa-loop-ivopts.c (may_be_unaligned_p): Check the alignment of the variable part of the offset as well.
* tree-ssa-loop-ivopts.c (may_be_unaligned_p): Check the alignment of
the variable part of the offset as well. Use highest_pow2_factor for
all alignment checks.
Steven Bosscher [Fri, 30 Apr 2010 14:58:54 +0000 (14:58 +0000)]
sdbout.c: Include vec.h, do not include varray.h.
* sdbout.c: Include vec.h, do not include varray.h.
(deferred_global_decls, sdbout_global_decl,
sdbout_finish, sdbout_init): Use VEC instead of VARRAY.
* toplev.c: Do not include varray.h.
(dump_memory_report): Do not dump VARRAY statistics.
* gengtype.c (open_base_file): Ignore varray.h.
* Makefile.in: Update for abovementioned changes.
Remove all traces of varray.c and varray.h.
* varray.c: Remove file.
* varray.h: Remove file.
* config/picochip/picochip.c (picochip_legitimize_address): Define.
Use this function to do machine-specific conversion.
(picochip_legitimize_reload_address): Likewise.
(picochip_legitimate_address_p): Check valid base register only if
strict.
(picochip_check_conditional_copy): Check for modw only if opnd is
register.
* config/picochip/picochip.h (LEGITIMIZE_RELOAD_ADDRESS): Use this
to call the function in c.
* config/picochip/picochip-protos.h
(picochip_legitimize_reload_address): Define.
* config/picochip/picochip.md (supported_compare1): Define.
* cgraph.h (cgraph_local_info): Remove for_functions_valid.
(cgraph_global_info): Remove inlined.
(LTO_cgraph_tag_names): Remove.
(LTO_cgraph_tags, LCC_NOT_FOUND): Move to ...
* lto-cgraph.c (LTO_cgraph_tags, LCC_NOT_FOUND): ... here;
simplify cgraph tags and document.
(lto_output_node): Use only LTO_cgraph_unavail_node and
LTO_cgraph_analyzed_node; Do not save analzed, reachable,
for_functions_valid, global info, process and output
flags.
(input_overwrite_node): Initialize estimated stack size and
estimated growth.
Do not read flags we no longer store.
(input_node): Likewise do not read info no longer stored.
* ipa-inline.c (cgraph_mark_inline_edge): Do not set global.inlined
flag.
re PR target/42895 (Low registers are preferred than register ip in thumb2 mode)
PR target/42895
* doc/tm.texi (ADJUST_REG_ALLOC_ORDER): Renamed from
ORDER_REGS_FOR_LOCAL_ALLOC. All instances of this macro changed.
(HONOR_REG_ALLOC_ORDER): Describe new macro.
* ira.c (setup_alloc_regs): Use ADJUST_REG_ALLOC_ORDER if defined.
* ira-color.c (assign_hard_reg): Take prologue/epilogue costs into
account only if HONOR_REG_ALLOC_ORDER is not defined.
* config/arm/arm.h (HONOR_REG_ALLOC_ORDER): Define.
* system.h (ORDER_REGS_FOR_LOCAL_ALLOC): Poison.
Paul Thomas [Thu, 29 Apr 2010 19:10:48 +0000 (19:10 +0000)]
[multiple changes]
2010-04-29 Janus Weil <janus@gcc.gnu.org>
PR fortran/43896
* symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
initializers for PPC members of the vtabs.
2010-04-29 Janus Weil <janus@gcc.gnu.org>
PR fortran/42274
* symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
attribute for all PPC members of the vtypes.
(copy_vtab_proc_comps): Copy the correct interface.
* trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
* trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
a dummy argument and make sure all PPC members of the vtab are
initialized correctly.
(gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
in call to gfc_trans_assign_vtab_procs.
* trans-stmt.c (gfc_trans_allocate): Ditto.
2010-04-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/43326
* resolve.c (resolve_typebound_function): Renamed
resolve_class_compcall.Do all the detection of class references
here.
(resolve_typebound_subroutine): resolve_class_typebound_call
renamed. Otherwise same as resolve_typebound_function.
(gfc_resolve_expr): Call resolve_typebound_function.
(resolve_code): Call resolve_typebound_subroutine.
2010-04-29 Janus Weil <janus@gcc.gnu.org>
PR fortran/43492
* resolve.c (resolve_typebound_generic_call): For CLASS methods
pass back the specific symtree name, rather than the target
name.
2010-04-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/42353
* resolve.c (resolve_structure_cons): Make the initializer of
the vtab component 'extends' the same type as the component.
2010-04-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/42680
* interface.c (check_interface1): Pass symbol name rather than NULL to
gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
trap MULL. (gfc_compare_derived_types): Revert previous change
incorporated incorrectly during merge from trunk, r155778.
* resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
than NULL to gfc_compare_interfaces.
* symbol.c (add_generic_specifics): Likewise.
2010-02-29 Janus Weil <janus@gcc.gnu.org>
PR fortran/42353
* interface.c (gfc_compare_derived_types): Add condition for vtype.
* symbol.c (gfc_find_derived_vtab): Sey access to private.
(gfc_find_derived_vtab): Likewise.
* module.c (ab_attribute): Add enumerator AB_VTAB.
(mio_symbol_attribute): Use new attribute, AB_VTAB.
(check_for_ambiguous): Likewise.
2010-04-29 Paul Thomas <pault@gcc.gnu.org>
Janus Weil <janus@gcc.gnu.org>
PR fortran/41829
* trans-expr.c (select_class_proc): Remove function.
(conv_function_val): Delete reference to previous.
(gfc_conv_derived_to_class): Add second argument to the call to
gfc_find_derived_vtab.
(gfc_conv_structure): Exclude proc_pointer components when
accessing $data field of class objects.
(gfc_trans_assign_vtab_procs): New function.
(gfc_trans_class_assign): Add second argument to the call to
gfc_find_derived_vtab.
* symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
implement holding off searching for the vptr derived type.
(add_proc_component): New function.
(add_proc_comps): New function.
(add_procs_to_declared_vtab1): New function.
(copy_vtab_proc_comps): New function.
(add_procs_to_declared_vtab): New function.
(void add_generic_specifics): New function.
(add_generics_to_declared_vtab): New function.
(gfc_find_derived_vtab): Add second argument to the call to
gfc_find_derived_vtab. Add the calls to
add_procs_to_declared_vtab and add_generics_to_declared_vtab.
* decl.c (build_sym, build_struct): Use new arg in calls to
gfc_build_class_symbol.
* gfortran.h : Add vtype bitfield to symbol_attr. Remove the
definition of struct gfc_class_esym_list. Modify prototypes
of gfc_build_class_symbol and gfc_find_derived_vtab.
* trans-stmt.c (gfc_trans_allocate): Add second argument to the
call to gfc_find_derived_vtab.
* module.c : Add the vtype attribute.
* trans.h : Add prototype for gfc_trans_assign_vtab_procs.
* resolve.c (resolve_typebound_generic_call): Add second arg
to pass along the generic name for class methods.
(resolve_typebound_call): The same.
(resolve_compcall): Use the second arg to carry the generic
name from the above. Remove the reference to class_esym.
(check_members, check_class_members, resolve_class_esym,
hash_value_expr): Remove functions.
(resolve_class_compcall, resolve_class_typebound_call): Modify
to use vtable rather than member by member calls.
(gfc_resolve_expr): Modify second arg in call to
resolve_compcall.
(resolve_select_type): Add second arg in call to
gfc_find_derived_vtab.
(resolve_code): Add second arg in call resolve_typebound_call.
(resolve_fl_derived): Exclude vtypes from check for late
procedure definitions. Likewise for checking of explicit
interface and checking of pass arg.
* iresolve.c (gfc_resolve_extends_type_of): Add second arg in
calls to gfc_find_derived_vtab.
* match.c (select_type_set_tmp): Use new arg in call to
gfc_build_class_symbol.
* trans-decl.c (gfc_get_symbol_decl): Complete vtable if
necessary.
* parse.c (endType): Finish incomplete classes.
2010-04-29 Janus Weil <janus@gcc.gnu.org>
PR fortran/42274
* gfortran.dg/class_16.f03: New test.
2010-04-29 Janus Weil <janus@gcc.gnu.org>
PR fortran/42274
* gfortran.dg/class_15.f03: New.
2010-04-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/43326
* gfortran.dg/dynamic_dispatch_9.f03: New test.
2010-04-29 Janus Weil <janus@gcc.gnu.org>
PR fortran/43492
* gfortran.dg/generic_22.f03 : New test.
2010-04-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/42353
* gfortran.dg/class_14.f03: New test.
2010-04-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/42680
* gfortran.dg/interface_32.f90: New test.
2009-04-29 Paul Thomas <pault@gcc.gnu.org>
Janus Weil <janus@gcc.gnu.org>
PR fortran/41829
* gfortran.dg/dynamic_dispatch_5.f03 : Change to "run".
* gfortran.dg/dynamic_dispatch_7.f03 : New test.
* gfortran.dg/dynamic_dispatch_8.f03 : New test.
Jon Grant [Thu, 29 Apr 2010 17:42:54 +0000 (17:42 +0000)]
collect2.c (vflag): Change type from int to bool.
2010-04-29 Jon Grant <04@jguk.org>
* collect2.c (vflag): Change type from int to bool.
(debug): Likewise.
(helpflag): New global bool.
(main): Set vflag and debug with boolean, not integer truth
values. Accept new "--help" option and output usage text if
found.
* collect2.h (vflag): Update prototype.
(debug): Likewise.
Eric Botcazou [Wed, 28 Apr 2010 20:03:02 +0000 (20:03 +0000)]
lto-streamer-in.c (unpack_ts_type_value_fields): Replace test for record or union type with RECORD_OR_UNION_TYPE_P predicate.
* lto-streamer-in.c (unpack_ts_type_value_fields): Replace test for
record or union type with RECORD_OR_UNION_TYPE_P predicate.
(lto_input_ts_type_tree_pointers): Likewise.
* lto-streamer-out.c (pack_ts_type_value_fields): Likewise.
(lto_output_ts_type_tree_pointers): Likewise.
* gcc.dg/plugin/plugin.exp: Run the plugindir tests.
* gcc.dg/plugindir1.c: Move to gcc.dg/plugin/plugindir1.c.
* gcc.dg/plugindir2.c: Move to gcc.dg/plugin/plugindir2.c.
* gcc.dg/plugindir3.c: Move to gcc.dg/plugin/plugindir3.c.
* gcc.dg/plugindir4.c: Move to gcc.dg/plugin/plugindir4.c.
Eric Botcazou [Wed, 28 Apr 2010 19:11:50 +0000 (19:11 +0000)]
Uniquization of constants at the Tree level
Uniquization of constants at the Tree level
* tree.h (DECL_IN_CONSTANT_POOL): New macro
(tree_decl_with_vis): Add in_constant_pool bit, move shadowed_for_var_p
bit to the end.
(tree_output_constant_def): Declare.
* gimplify.c (gimplify_init_constructor): When using block copy,
uniquize the constant constructor on the RHS.
* lto-streamer-in.c (unpack_ts_decl_with_vis_value_fields): Deal
with DECL_IN_CONSTANT_POOL flag.
* lto-streamer-out.c (pack_ts_decl_with_vis_value_fields): Likewise.
* varasm.c (make_decl_rtl): Deal with variables belonging to the
global constant pool.
(assemble_variable): Deal with symbols belonging to the tree constant
pool.
(get_constant_section): Add ALIGN parameter and simplify.
(build_constant_desc): Build a VAR_DECL and attach it to the symbol.
(assemble_constant_contents): Use the expression of the VAR_DECL.
(output_constant_def_contents): Use the alignment of the VAR_DECL.
(tree_output_constant_def): New global function.
(mark_constant): Use the expression of the VAR_DECL.
(place_block_symbol): Use the alignment of the VAR_DECL and the size
of its expression.
(output_object_block): Likewise and assemble the expression.
ada/
* gcc-interface/trans.c (gnat_gimplify_expr) <ADDR_EXPR>: Uniquize
constant constructors before taking their address.
Martin Jambor [Wed, 28 Apr 2010 14:05:54 +0000 (16:05 +0200)]
cgraph.h (struct cgraph_node): New field indirect_calls.
2010-04-28 Martin Jambor <mjambor@suse.cz>
* cgraph.h (struct cgraph_node): New field indirect_calls.
(struct cgraph_indirect_call_info): New type.
(struct cgraph_edge): Removed field indirect_call. New fields
indirect_info, indirect_inlining_edge and indirect_unknown_callee.
(cgraph_create_indirect_edge): Declare.
(cgraph_make_edge_direct): Likewise.
(enum LTO_cgraph_tags): New item LTO_cgraph_indirect_edge.
* ipa-prop.h (struct ipa_param_call_note): Removed.
(struct ipa_node_params): Removed field param_calls.
(ipa_create_all_structures_for_iinln): Declare.
* cgraph.c: Described indirect edges and uids in initial comment.
(cgraph_add_edge_to_call_site_hash): New function.
(cgraph_edge): Search also among the indirect edges, use
cgraph_add_edge_to_call_site_hash to add edges to the call site hash.
(cgraph_set_call_stmt): Possibly turn an indirect edge into a direct
one, use cgraph_add_edge_to_call_site_hash to add edges to the call
site hash.
(initialize_inline_failed): Assign a reason to indirect edges.
(cgraph_create_edge_1): New function.
(cgraph_create_edge): Moved some functionality to
cgraph_create_edge_1.
(cgraph_create_indirect_edge): New function.
(cgraph_edge_remove_callee): Add an assert checking for
non-indirectness.
(cgraph_edge_remove_caller): Special-case indirect edges.
(cgraph_remove_edge): Likewise.
(cgraph_set_edge_callee): New function.
(cgraph_redirect_edge_callee): Use cgraph_set_edge_callee.
(cgraph_make_edge_direct): New function.
(cgraph_update_edges_for_call_stmt_node): Do nothing only when also
the declaration of the call statement matches.
(cgraph_node_remove_callees): Special-case indirect edges.
(cgraph_clone_edge): Likewise.
(cgraph_clone_node): Clone also the indirect edges.
(dump_cgraph_node): Dump indirect_inlining_edge flag instead of
indirect_call, dump count of indirect_calls edges.
* ipa-prop.c (iinlining_processed_edges): New variable.
(ipa_note_param_call): Create indirect edges instead of
creating notes. New parameter node.
(ipa_analyze_call_uses): New parameter node, pass it on to
ipa_note_param_call.
(ipa_analyze_stmt_uses): Likewise.
(ipa_analyze_params_uses): Pass node to ipa_analyze_stmt_uses.
(print_edge_addition_message): Work on edges rather than on notes.
(update_call_notes_after_inlining): Likewise, renamed to
update_indirect_edges_after_inlining.
(ipa_create_all_structures_for_iinln): New function.
(ipa_free_node_params_substructures): Do not free notes.
(ipa_edge_duplication_hook): Propagate bits within
iinlining_processed_edges bitmap.
(ipa_node_duplication_hook): Do not duplicate notes.
(free_all_ipa_structures_after_ipa_cp): Renamed to
ipa_free_all_structures_after_ipa_cp.
(free_all_ipa_structures_after_iinln): Renamed to
ipa_free_all_structures_after_iinln.g
(ipa_write_param_call_note): Removed.
(ipa_read_param_call_note): Removed.
(ipa_write_indirect_edge_info): New function.
(ipa_read_indirect_edge_info): Likewise.
(ipa_write_node_info): Do not stream notes, do stream information
in indirect edges.
(ipa_read_node_info): Likewise.
(lto_ipa_fixup_call_notes): Removed.
* ipa-cp.c (pass_ipa_cp): Set stmt_fixup to NULL.
* ipa-inline.c (pass_ipa_inline): Likewise.
* cgraphunit.c (verify_cgraph_node): Check also indirect edges.
* cif-code.def (INDIRECT_UNKNOWN_CALL): New reason.
* tree-inline.c (copy_bb): Removed an unnecessary double check for
is_gimple_call.
* tree-inline.c (get_indirect_callee_fndecl): Do not consider indirect
edges.
* lto-cgraph.c (output_outgoing_cgraph_edges): New function.
(output_cgraph): Stream also indirect edges.
(lto_output_edge): Added capability to stream indirect edges.
(input_edge): Likewise.
(input_cgraph_1): Likewise.
* testsuite/gcc.dg/lto/20091209-1_0.c: New testcase.
Jason Merrill [Tue, 27 Apr 2010 21:35:17 +0000 (17:35 -0400)]
tree.c (get_fns): Split out from get_first_fn.
* tree.c (get_fns): Split out from get_first_fn.
* cp-tree.h: Declare it.
* search.c (shared_member_p): Use it.
* semantics.c (finish_qualified_id_expr): Simplify.
(finish_id_expression): Simplify.
re PR c++/42844 (const variable requires initializer / no explicitly declared default constructor)
PR c++/42844
* decl.c (check_for_uninitialized_const_var): Handle classes that need
constructing, too.
(check_initializer): Call it for classes that need constructing, too.
* class.c (in_class_defaulted_default_constructor): New.
* cp-tree.h: Declare it.
Co-Authored-By: Jason Merrill <jason@redhat.com>
From-SVN: r158797
Jakub Jelinek [Tue, 27 Apr 2010 18:12:32 +0000 (20:12 +0200)]
dwarf2out.c (def_cfa_1): After DW_CFA_def_cfa_expression force using DW_CFA_def_cfa instead of...
* dwarf2out.c (def_cfa_1): After DW_CFA_def_cfa_expression
force using DW_CFA_def_cfa instead of DW_CFA_def_cfa_register
or DW_CFA_def_cfa_offset{,_sf}.
Jan Hubicka [Tue, 27 Apr 2010 14:56:33 +0000 (16:56 +0200)]
invoke.texi (-fipa-profile): Document.
* doc/invoke.texi (-fipa-profile): Document.
* opts.c (decode_options): Enable ipa-profile at -O1.
* timevar.def (TV_IPA_PROFILE): Define.
* common.opt (fipa-profile): Add.
* cgraph.c (cgraph_clone_node): Set local flag and clear vtable method flag
for clones.
(cgraph_propagate_frequency): Handle only local ones.
* tree-pass.h (pass_ipa_profile): Declare.
* ipa-profile.c (gate_profile): Use flag_ipa_profile.
(pass_ipa_profile): Use TV_IPA_PROFILE.
* ipa.c (ipa_profile): New function.
(gate_ipa_profile): Likewise.
(pass_ipa_profile): New global variable.
* passes.c (pass_ipa_profile): New.
Martin Jambor [Tue, 27 Apr 2010 10:07:47 +0000 (12:07 +0200)]
re PR middle-end/43812 (compiling .cc file with -fwhole-program results in ICE, in ipcp_iterate_stage, at ipa-cp.c:760)
2010-04-27 Martin Jambor <mjambor@suse.cz>
PR middle-end/43812
* ipa.c (dissolve_same_comdat_group_list): New function.
(function_and_variable_visibility): Call
dissolve_same_comdat_group_list when comdat group contains external or
newly local nodes.
* cgraphunit.c (verify_cgraph_node): Verify that same_comdat_group
lists are circular and that they contain only DECL_ONE_ONLY nodes.
Eric Botcazou [Tue, 27 Apr 2010 09:47:13 +0000 (09:47 +0000)]
varasm.c (decode_addr_const): Handle special case of INDIRECT_REF.
* varasm.c (decode_addr_const): Handle special case of INDIRECT_REF.
(const_hash_1) <VECTOR_CST>: New case.
(compare_constant) <VECTOR_CST>: Likewise.
<ADDR_EXPR>: Deal with LABEL_REFs.
(copy_constant) <VECTOR_CST>: New case.
re PR target/40657 (allocate local variables with fewer instructions)
PR target/40657
* config/arm/arm.c (thumb1_extra_regs_pushed): New function.
(thumb1_expand_prologue, thumb1_output_function_prologue): Call it
here to determine which regs to push and how much stack to reserve.
PR target/40657
* gcc.target/arm/thumb-stackframe.c: New test.