public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/95320] New: [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const
@ 2020-05-25 16:47 burnus at gcc dot gnu.org
  2020-05-25 16:59 ` [Bug ipa/95320] " burnus at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2020-05-25 16:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95320
           Summary: [11 Regression] ICE in odr_type_p, at ipa-utils.h:246,
                    during IPA pass: pure-const
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: ams at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---

For some reason, this only occurs when compiling for AMDGCN and it seems to be
a recent regression.

The issue seems to affect nearly all testcases in libgomp, I get 2500+ FAIL.

For instance
  gcc -fopenmp libgomp/testsuite/libgomp.c-c++-common/for-11.c
fails as:

during IPA pass: fnsummary
src/gcc-mainline/libgomp/testsuite/libgomp.c-c++-common/for-11.c:5: internal
compiler error: in odr_type_p, at ipa-utils.h:246
0x8b3ccf odr_type_p(tree_node const*)
        gcc-mainline/gcc/ipa-utils.h:246
0x8b3ccf local_tree_p
        gcc-mainline/gcc/lto-streamer-out.c:594
0x8b3ccf DFS::DFS(output_block*, tree_node*, bool, bool, bool)
        gcc-mainline/gcc/lto-streamer-out.c:639


Breakpoint 1, DFS::DFS(output_block*, tree_node*, bool, bool, bool) () at
gcc-mainline/gcc/lto-streamer-out.c:639
639               if (ob->local_trees && local_tree_p (expr))
(gdb) p ob
$1 = <optimized out>
(gdb) p expr
$2 = (tree) 0x7ffff734ac78
(gdb) p debug_tree(expr)
 <record_type 0x7ffff734ac78 .omp_data_t.89 TI

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug ipa/95320] [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const
  2020-05-25 16:47 [Bug ipa/95320] New: [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const burnus at gcc dot gnu.org
@ 2020-05-25 16:59 ` burnus at gcc dot gnu.org
  2020-05-26  7:19 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2020-05-25 16:59 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug ipa/95320] [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const
  2020-05-25 16:47 [Bug ipa/95320] New: [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const burnus at gcc dot gnu.org
  2020-05-25 16:59 ` [Bug ipa/95320] " burnus at gcc dot gnu.org
@ 2020-05-26  7:19 ` rguenth at gcc dot gnu.org
  2020-05-26  7:37 ` burnus at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-26  7:19 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0
            Version|10.0                        |11.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug ipa/95320] [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const
  2020-05-25 16:47 [Bug ipa/95320] New: [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const burnus at gcc dot gnu.org
  2020-05-25 16:59 ` [Bug ipa/95320] " burnus at gcc dot gnu.org
  2020-05-26  7:19 ` rguenth at gcc dot gnu.org
@ 2020-05-26  7:37 ` burnus at gcc dot gnu.org
  2020-05-26 14:51 ` burnus at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2020-05-26  7:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
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;

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug ipa/95320] [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const
  2020-05-25 16:47 [Bug ipa/95320] New: [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const burnus at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-05-26  7:37 ` burnus at gcc dot gnu.org
@ 2020-05-26 14:51 ` burnus at gcc dot gnu.org
  2020-05-26 16:26 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2020-05-26 14:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug ipa/95320] [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const
  2020-05-25 16:47 [Bug ipa/95320] New: [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const burnus at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-05-26 14:51 ` burnus at gcc dot gnu.org
@ 2020-05-26 16:26 ` cvs-commit at gcc dot gnu.org
  2020-05-26 16:28 ` burnus at gcc dot gnu.org
  2020-08-21 15:15 ` cvs-commit at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-26 16:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <burnus@gcc.gnu.org>:

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

commit r11-640-gc5ab336ba106a407a67e84d8faac5b0ea6f18310
Author: Tobias Burnus <tobias@codesourcery.com>
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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug ipa/95320] [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const
  2020-05-25 16:47 [Bug ipa/95320] New: [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const burnus at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-05-26 16:26 ` cvs-commit at gcc dot gnu.org
@ 2020-05-26 16:28 ` burnus at gcc dot gnu.org
  2020-08-21 15:15 ` cvs-commit at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2020-05-26 16:28 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> ---
FIXED.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug ipa/95320] [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const
  2020-05-25 16:47 [Bug ipa/95320] New: [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const burnus at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-05-26 16:28 ` burnus at gcc dot gnu.org
@ 2020-08-21 15:15 ` cvs-commit at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-08-21 15:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Tobias Burnus
<burnus@gcc.gnu.org>:

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

commit r10-8653-g2974c828615b240f66b208301b5a73c6a07fcb22
Author: Tobias Burnus <tobias@codesourcery.com>
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)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-08-21 15:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25 16:47 [Bug ipa/95320] New: [11 Regression] ICE in odr_type_p, at ipa-utils.h:246, during IPA pass: pure-const burnus at gcc dot gnu.org
2020-05-25 16:59 ` [Bug ipa/95320] " burnus at gcc dot gnu.org
2020-05-26  7:19 ` rguenth at gcc dot gnu.org
2020-05-26  7:37 ` burnus at gcc dot gnu.org
2020-05-26 14:51 ` burnus at gcc dot gnu.org
2020-05-26 16:26 ` cvs-commit at gcc dot gnu.org
2020-05-26 16:28 ` burnus at gcc dot gnu.org
2020-08-21 15:15 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).