This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: r218609 - in /trunk/gcc: ChangeLog common.opt d...


> hubicka@gcc.gnu.org writes:
> 
> > Author: hubicka
> > Date: Wed Dec 10 21:17:28 2014
> > New Revision: 218609
> >
> > URL: https://gcc.gnu.org/viewcvs?rev=218609&root=gcc&view=rev
> > Log:
> > 	* doc/invoke.texi: (-devirtualize-at-ltrans): Document.
> > 	* lto-cgraph.c (lto_output_varpool_node): Mark initializer as removed
> > 	when it is not streamed to the given ltrans.
> > 	(compute_ltrans_boundary): Make code adding all polymorphic
> > 	call targets conditional with !flag_wpa || flag_ltrans_devirtualize.
> > 	* common.opt (fdevirtualize-at-ltrans): New flag.
> 
> /usr/local/gcc/gcc-20141211/gcc/testsuite/g++.dg/ipa/pr64059.C:56:1: internal compiler error: Segmentation fault.
> 0x4000000000df742f crash_signal.
> 	../../gcc/toplev.c:358.
> 0x40000000012f2c9f get_binfo_at_offset(tree_node*, long, tree_node*).
> 	../../gcc/tree.c:11922.
> 0x4000000000a0d75f possible_polymorphic_call_targets(tree_node*, long, ipa_polymorphic_call_context, bool*, void**, bool).
> 	../../gcc/ipa-devirt.c:2404.
> 0x4000000000b6f2ef possible_polymorphic_call_targets(cgraph_edge*, bool*, void**, bool).
> 	../../gcc/ipa-utils.h:109.
> 0x4000000000b6f2ef compute_ltrans_boundary(lto_symtab_encoder_d*).
> 	../../gcc/lto-cgraph.c:952.
> 0x4000000000c40f2f ipa_write_summaries(bool).
> 	../../gcc/passes.c:2511.
> 0x40000000006584ff ipa_passes.
> 	../../gcc/cgraphunit.c:2091.
> 0x40000000006584ff symbol_table::compile().
> 	../../gcc/cgraphunit.c:2187.
> 0x400000000065be1f symbol_table::finalize_compilation_unit().
> 	../../gcc/cgraphunit.c:2340.
> 0x400000000029bcef cp_write_global_declarations().
> 	../../gcc/cp/decl2.c:4688.
> Please submit a full bug report,.
> with preprocessed source if appropriate..
> Please include the complete backtrace with any bug report..
> See <http://gcc.gnu.org/bugs.html> for instructions..
> 
> FAIL: g++.dg/ipa/pr64059.C  -std=gnu++11 (internal compiler error)

The problem here is that BINFO is not streamed because devirt is disabled.  I
have commited the following patch (that I have in my local tree for some time)

Honza

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 218658)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2014-12-12  Jan Hubicka  <hubicka@ucw.cz>
+
+	* ipa-devirt.c (possible_polymorphic_call_targets): Return early
+	if otr_type has no BINFO.
+
 2014-12-12  Zhenqiang Chen  <zhenqiang.chen@arm.com>
 
 	PR rtl-optimization/63917
Index: ipa-devirt.c
===================================================================
--- ipa-devirt.c	(revision 218639)
+++ ipa-devirt.c	(working copy)
@@ -2239,7 +2239,7 @@ possible_polymorphic_call_targets (tree
 
   /* If ODR is not initialized or the constext is invalid, return empty
      incomplete list.  */
-  if (!odr_hash || context.invalid)
+  if (!odr_hash || context.invalid || !TYPE_BINFO (otr_type))
     {
       if (completep)
 	*completep = context.invalid;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]