[Bug ipa/95320] [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const

2020-08-21 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95320

--- Comment #6 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Tobias Burnus
:

https://gcc.gnu.org/g:2974c828615b240f66b208301b5a73c6a07fcb22

commit r10-8653-g2974c828615b240f66b208301b5a73c6a07fcb22
Author: Tobias Burnus 
Date:   Tue May 26 18:24:28 2020 +0200

[LTO/offloading] Fix offloading-compilation ICE without -flto (PR84320)

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)

[Bug ipa/95320] [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const

2020-05-26 Thread burnus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95320

Tobias Burnus  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED

--- Comment #5 from Tobias Burnus  ---
FIXED.

[Bug ipa/95320] [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const

2020-05-26 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95320

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Tobias Burnus :

https://gcc.gnu.org/g:c5ab336ba106a407a67e84d8faac5b0ea6f18310

commit r11-640-gc5ab336ba106a407a67e84d8faac5b0ea6f18310
Author: Tobias Burnus 
Date:   Tue May 26 18:24:28 2020 +0200

[LTO/offloading] Fix offloading-compilation ICE without -flto (PR84320)

gcc/ChangeLog:
PR ipa/95320
* ipa-utils.h (odr_type_p): Also permit calls with
only flag_generate_offload set.

[Bug ipa/95320] [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const

2020-05-26 Thread burnus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95320

--- Comment #3 from Tobias Burnus  ---
Patch:
  https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546535.html

[Bug ipa/95320] [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const

2020-05-26 Thread burnus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95320

--- Comment #2 from Tobias Burnus  ---
Possible patch:

diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index 288e3c0f4c6..6441ab30c8b 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -591,7 +591,7 @@ local_tree_p (tree t)
 Only work hard for main variants;
 variant types will inherit locality.  */
   return TYPE_MAIN_VARIANT (t) == t
-&& odr_type_p (t) && type_with_linkage_p (t)
+&& in_lto_p && odr_type_p (t) && type_with_linkage_p (t)
 && type_in_anonymous_namespace_p (t);
 default:
   return false;

[Bug ipa/95320] [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const

2020-05-26 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95320

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |11.0
Version|10.0|11.0

[Bug ipa/95320] [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const

2020-05-25 Thread burnus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95320

Tobias Burnus  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org

--- Comment #1 from Tobias Burnus  ---
Forgot to mention: That's still the cc1 compiler
(libexec/gcc/x86_64-none-linux-gnu/11.0.0/cc1) not yet an offloading LTO.

The problem seems to be the followingat ipa-utils.h:246:
  /* 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);


Here, we do not compile with LTO but write LTO for offloading.

That code is called by local_tree_p which was added by
r11-525-g03d90a20a1afcbb9c30da8d4adf4922b0685061f , Honza's
  "Avoid SCC hashing on unmergeable trees"
patch of May 20, 2020.