This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Better fix for PR69630
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 10 Mar 2016 17:07:11 +0100
- Subject: Better fix for PR69630
- Authentication-results: sourceware.org; auth=none
Hi,
my first fix was just partial and fixed ICE in one branch not in other.
The issue is that code does not expect cxa_pure_virtual in target list and ICEs handling
it as a method while checking whether it should suggest final.
Bootstrapped/regtested x86_64-linux, comitted.
ipa/69630
* ipa-devirt.c (possible_polymorphic_call_targets): Do not ICE
on cxa_pure_virtual.
Index: ipa-devirt.c
===================================================================
--- ipa-devirt.c (revision 234108)
+++ ipa-devirt.c (working copy)
@@ -3177,11 +3177,11 @@ possible_polymorphic_call_targets (tree
if (!outer_type->all_derivations_known)
{
- if (!speculative && final_warning_records)
+ if (!speculative && final_warning_records
+ && TREE_CODE (TREE_TYPE (nodes[0]->decl)) == METHOD_TYPE)
{
if (complete
&& nodes.length () == 1
- && TREE_CODE (TREE_TYPE (nodes[0]->decl)) == METHOD_TYPE
&& warn_suggest_final_types
&& !outer_type->derived_types.length ())
{