re PR rtl-optimization/77425 (Pointer test follows dereference in sched-int.h)
authorJakub Jelinek <jakub@redhat.com>
Mon, 5 Sep 2016 08:49:41 +0000 (10:49 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 5 Sep 2016 08:49:41 +0000 (10:49 +0200)
PR rtl-optimization/77425
* ipa-devirt.c (get_odr_type): Set val->id unconditionally.

From-SVN: r239986

gcc/ChangeLog
gcc/ipa-devirt.c

index a66766c7a3e21754dece59fbda1581cac017e72e..c65af836910e442195e7f6b0f392d8e2e3dcff81 100644 (file)
@@ -1,3 +1,8 @@
+2016-09-05  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/77425
+       * ipa-devirt.c (get_odr_type): Set val->id unconditionally.
+
 2016-09-03  Kirill Yukhin  <kirill.yukhin@intel.com>
 
        * ubsan.c (ubsan_use_new_style_p): Fix check for empty string.
index 2cf018bdf39f31d334cbca530c3e0d11d6bca5ae..98d35006f2bf7b474f7e88ffee9d1c02cff4ae81 100644 (file)
@@ -2136,8 +2136,7 @@ get_odr_type (tree type, bool insert)
       /* Be sure we did not recorded any derived types; these may need
         renumbering too.  */
       gcc_assert (val->derived_types.length() == 0);
-      if (odr_types_ptr)
-       val->id = odr_types.length ();
+      val->id = odr_types.length ();
       vec_safe_push (odr_types_ptr, val);
     }
   return val;