Commit 39960d1c by Jan Hubicka Committed by Jan Hubicka

re PR ipa/59882 (internal compiler error: Segmentation fault)


	PR ipa/59882
	* tree.c (get_binfo_at_offset): Do not get confused by empty classes;
	* g++.dg/torture/pr59882.C: New testcase

From-SVN: r207451
parent 6f746413
2014-02-03 Jan Hubicka <jh@suse.cz> 2014-02-03 Jan Hubicka <hubicka@ucw.cz>
PR ipa/59882
* tree.c (get_binfo_at_offset): Do not get confused by empty classes;
2014-02-03 Jan Hubicka <hubicka@ucw.cz>
* gimple-fold.c (gimple_extract_devirt_binfo_from_cst): Remove. * gimple-fold.c (gimple_extract_devirt_binfo_from_cst): Remove.
* gimple-fold.h (gimple_extract_devirt_binfo_from_cst): Remove. * gimple-fold.h (gimple_extract_devirt_binfo_from_cst): Remove.
2014-02-03 Jan Hubicka <jh@suse.cz> 2014-02-03 Jan Hubicka <hubicka@ucw.cz>
PR ipa/59831 PR ipa/59831
* ipa-cp.c (ipa_get_indirect_edge_target_1): Use ipa-devirt * ipa-cp.c (ipa_get_indirect_edge_target_1): Use ipa-devirt
...@@ -14,7 +19,7 @@ ...@@ -14,7 +19,7 @@
(get_polymorphic_call_info): ... here. (get_polymorphic_call_info): ... here.
(get_polymorphic_call_info_from_invariant): New function. (get_polymorphic_call_info_from_invariant): New function.
2014-02-03 Jan Hubicka <jh@suse.cz> 2014-02-03 Jan Hubicka <hubicka@ucw.cz>
* ipa-cp.c (ipa_get_indirect_edge_target_1): Do direct * ipa-cp.c (ipa_get_indirect_edge_target_1): Do direct
lookup via vtable pointer; check for type consistency lookup via vtable pointer; check for type consistency
...@@ -152,7 +157,7 @@ ...@@ -152,7 +157,7 @@
(reduc_splus_<mode>): Call gen_altivec_vsumsws_direct instead of (reduc_splus_<mode>): Call gen_altivec_vsumsws_direct instead of
gen_altivec_vsumsws. gen_altivec_vsumsws.
2014-02-02 Jan Hubicka <jh@suse.cz> 2014-02-02 Jan Hubicka <hubicka@ucw.cz>
* ipa-devirt.c (subbinfo_with_vtable_at_offset, * ipa-devirt.c (subbinfo_with_vtable_at_offset,
vtable_pointer_value_to_binfo): New functions. vtable_pointer_value_to_binfo): New functions.
...@@ -479,7 +484,7 @@ ...@@ -479,7 +484,7 @@
if -minrt given. if -minrt given.
(ENDFILE_SPEC): Likewise. (ENDFILE_SPEC): Likewise.
2014-01-29 Jan Hubicka <jh@suse.cz> 2014-01-29 Jan Hubicka <hubicka@ucw.cz>
* ipa-inline-analysis.c (clobber_only_eh_bb_p): New function. * ipa-inline-analysis.c (clobber_only_eh_bb_p): New function.
(estimate_function_body_sizes): Use it. (estimate_function_body_sizes): Use it.
...@@ -1234,12 +1239,12 @@ ...@@ -1234,12 +1239,12 @@
* config/microblaze/microblaze.md: Correct bswaphi2 insn. * config/microblaze/microblaze.md: Correct bswaphi2 insn.
2014-01-22 Jan Hubicka <jh@suse.cz> 2014-01-22 Jan Hubicka <hubicka@ucw.cz>
* config/i386/x86-tune.def (X86_TUNE_ACCUMULATE_OUTGOING_ARGS): * config/i386/x86-tune.def (X86_TUNE_ACCUMULATE_OUTGOING_ARGS):
Enable for generic and recent AMD targets. Enable for generic and recent AMD targets.
2014-01-22 Jan Hubicka <jh@suse.cz> 2014-01-22 Jan Hubicka <hubicka@ucw.cz>
* combine-stack-adj.c (combine_stack_adjustments_for_block): Remove * combine-stack-adj.c (combine_stack_adjustments_for_block): Remove
ARG_SIZE note when adjustment was eliminated. ARG_SIZE note when adjustment was eliminated.
...@@ -1404,7 +1409,7 @@ ...@@ -1404,7 +1409,7 @@
* config/i386/i386.c (ix86_avoid_lea_for_addr): Return false * config/i386/i386.c (ix86_avoid_lea_for_addr): Return false
if operands[1] is a REG or ZERO_EXTEND of a REG. if operands[1] is a REG or ZERO_EXTEND of a REG.
2014-01-19 Jan Hubicka <jh@suse.cz> 2014-01-19 Jan Hubicka <hubicka@ucw.cz>
* varasm.c (compute_reloc_for_constant): Use targetm.binds_local_p. * varasm.c (compute_reloc_for_constant): Use targetm.binds_local_p.
...@@ -1481,7 +1486,7 @@ ...@@ -1481,7 +1486,7 @@
* ree.c (combine_set_extension): Temporarily disable test for * ree.c (combine_set_extension): Temporarily disable test for
changing number of hard registers. changing number of hard registers.
2014-01-17 Jan Hubicka <jh@suse.cz> 2014-01-17 Jan Hubicka <hubicka@ucw.cz>
PR middle-end/58125 PR middle-end/58125
* ipa-inline-analysis.c (inline_free_summary): * ipa-inline-analysis.c (inline_free_summary):
...@@ -1658,7 +1663,7 @@ ...@@ -1658,7 +1663,7 @@
* ipa-ref.c (ipa_remove_stmt_references): Fix references * ipa-ref.c (ipa_remove_stmt_references): Fix references
traversal when removing references. traversal when removing references.
2014-01-16 Jan Hubicka <jh@suse.cz> 2014-01-16 Jan Hubicka <hubicka@ucw.cz>
PR ipa/59775 PR ipa/59775
* tree.c (get_binfo_at_offset): Look harder for virtual bases. * tree.c (get_binfo_at_offset): Look harder for virtual bases.
...@@ -2070,7 +2075,7 @@ ...@@ -2070,7 +2075,7 @@
occurs before the extension when optimizing extensions with occurs before the extension when optimizing extensions with
different source and destination hard registers. different source and destination hard registers.
2014-01-10 Jan Hubicka <jh@suse.cz> 2014-01-10 Jan Hubicka <hubicka@ucw.cz>
PR ipa/58585 PR ipa/58585
* ipa-devirt.c (build_type_inheritance_graph): Also add types of * ipa-devirt.c (build_type_inheritance_graph): Also add types of
......
2014-02-03 Jan Hubicka <hubicka@ucw.cz>
PR ipa/59882
* g++.dg/torture/pr59882.C: New testcase
2014-02-03 Jan Hubicka <jh@suse.cz> 2014-02-03 Jan Hubicka <jh@suse.cz>
PR ipa/59831 PR ipa/59831
......
/* { dg-do compile } */
class A;
class B {};
struct C {
virtual void dispatch();
int traversal_map_;
};
template <typename> class F : public virtual C {};
struct I : F<A>, F<int> {};
struct J : B, I {};
class D {};
struct L {
L(D &, int &p2) : map_(p2) {}
virtual void traverse(int &p1) {
int &s = p1;
names<L>(s, names_);
}
int &map_;
J names_;
template <typename> void names(int &, C &p2) { p2.dispatch(); }
};
struct G : D {
G(D &, int &p2) : map_(p2) { L(*this, map_); }
int &map_;
};
int a;
void fn1(D &p1) { G(p1, a); }
...@@ -12005,10 +12005,15 @@ get_binfo_at_offset (tree binfo, HOST_WIDE_INT offset, tree expected_type) ...@@ -12005,10 +12005,15 @@ get_binfo_at_offset (tree binfo, HOST_WIDE_INT offset, tree expected_type)
break; break;
} }
else else
if (BINFO_OFFSET (base_binfo) - BINFO_OFFSET (binfo) < pos if ((tree_to_shwi (BINFO_OFFSET (base_binfo))
- tree_to_shwi (BINFO_OFFSET (binfo)))
* BITS_PER_UNIT < pos
/* Rule out types with no virtual methods or we can get confused
here by zero sized bases. */
&& BINFO_VTABLE (TYPE_BINFO (BINFO_TYPE (base_binfo)))
&& (!containing_binfo && (!containing_binfo
|| (BINFO_OFFSET (containing_binfo) || (tree_to_shwi (BINFO_OFFSET (containing_binfo))
< BINFO_OFFSET (base_binfo)))) < tree_to_shwi (BINFO_OFFSET (base_binfo)))))
containing_binfo = base_binfo; containing_binfo = base_binfo;
if (found_binfo) if (found_binfo)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment