https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61998

--- Comment #4 from Jan Hubicka <hubicka at ucw dot cz> ---
I suppose VECtors do not like to grow to 0 size.  THe following patch fixes the
ICE, does it also fixe you real testcases?
Index: ipa-devirt.c
===================================================================
--- ipa-devirt.c        (revision 214303)
+++ ipa-devirt.c        (working copy)
@@ -3822,6 +3845,9 @@ ipa_devirt (void)
   int nmultiple = 0, noverwritable = 0, ndevirtualized = 0, nnotdefined = 0;
   int nwrong = 0, nok = 0, nexternal = 0, nartificial = 0;

+  if (!odr_types.length ())
+    return 0;
+
   /* We can output -Wsuggest-final-methods and -Wsuggest-final-types warnings.
      This is implemented by setting up final_warning_records that are updated
      by get_polymorphic_call_targets.

Reply via email to