public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: r218609 - in /trunk/gcc: ChangeLog common.opt d...
       [not found] <20141210211728.19676.qmail@sourceware.org>
@ 2014-12-11 10:25 ` Andreas Schwab
  2014-12-12  8:47   ` Jan Hubicka
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Schwab @ 2014-12-11 10:25 UTC (permalink / raw)
  To: hubicka; +Cc: gcc-patches

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)

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: r218609 - in /trunk/gcc: ChangeLog common.opt d...
  2014-12-11 10:25 ` r218609 - in /trunk/gcc: ChangeLog common.opt d Andreas Schwab
@ 2014-12-12  8:47   ` Jan Hubicka
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Hubicka @ 2014-12-12  8:47 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: hubicka, gcc-patches

> 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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-12  8:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20141210211728.19676.qmail@sourceware.org>
2014-12-11 10:25 ` r218609 - in /trunk/gcc: ChangeLog common.opt d Andreas Schwab
2014-12-12  8:47   ` Jan Hubicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).