This is the mail archive of the gcc-bugs@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]

[Bug ipa/64282] [5 Regression] ICE in gimple_get_virt_method_for_vtable, at gimple-fold.c:5635


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

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
The reduced testcase does not seem to reproduce for me.  The ICE is however
just overactive sanity check - the program is invalid and accesses random data
as vtable pointer. In this case we can just optimize to unreachable instead of
ICEing. I am testing the following:

Index: gimple-fold.c
===================================================================
--- gimple-fold.c       (revision 219876)
+++ gimple-fold.c       (working copy)
@@ -5649,7 +5649,6 @@ gimple_get_virt_method_for_vtable (HOST_
   if (TREE_CODE (v) != VAR_DECL
       || !DECL_VIRTUAL_P (v))
     {
-      gcc_assert (in_lto_p);
       /* Pass down that we lost track of the target.  */
       if (can_refer)
        *can_refer = false;


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