]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[LTO/offloading] Fix offloading-compilation ICE without -flto (PR84320)
authorTobias Burnus <tobias@codesourcery.com>
Tue, 26 May 2020 16:24:28 +0000 (18:24 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Fri, 21 Aug 2020 15:10:34 +0000 (17:10 +0200)
gcc/ChangeLog:
PR ipa/95320
* ipa-utils.h (odr_type_p): Also permit calls with
only flag_generate_offload set.

(cherry picked from commit c5ab336ba106a407a67e84d8faac5b0ea6f18310)

gcc/ipa-utils.h

index 6597593d1385f56541c9670700f8fa11629de5e5..178c2cbe446f80cf5cd9a77f938f03f185ecbbf4 100644 (file)
@@ -245,7 +245,7 @@ odr_type_p (const_tree t)
 {
   /* We do not have this information when not in LTO, but we do not need
      to care, since it is used only for type merging.  */
-  gcc_checking_assert (in_lto_p || flag_lto);
+  gcc_checking_assert (in_lto_p || flag_lto || flag_generate_offload);
   return TYPE_NAME (t) && TREE_CODE (TYPE_NAME (t)) == TYPE_DECL
          && DECL_ASSEMBLER_NAME_SET_P (TYPE_NAME (t));
 }