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]

Better fix for PR69630


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 ())
 		    {


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