public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/97162] New: [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark
@ 2020-09-22 11:34 tnfchris at gcc dot gnu.org
  2020-09-22 12:05 ` [Bug fortran/97162] " marxin at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2020-09-22 11:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97162
           Summary: [11 Regression] ICE when building SPECCPU 2006 Gamess
                    benchmark
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tnfchris at gcc dot gnu.org
  Target Milestone: ---

Unforunately I don't have data going back to the start of GCC 11 and I also
don't know any fortran so no idea how to go about minimizing this..

But Gamess in SPECCPU 2006 fails with an ICE:

  0x6ca753 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
    ../.././gcc/tree.c:9905
  0x753033 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
    ../.././gcc/tree.h:3413
  0x753033 compare_base_decls(tree_node*, tree_node*)
    ../.././gcc/alias.c:2145
  0xdaa9c3 ptr_deref_may_alias_decl_p
    ../.././gcc/tree-ssa-alias.c:227
  0x17f67bb dr_may_alias_p(data_reference const*, data_reference const*, loop*)
    ../.././gcc/tree-data-ref.c:2769
  0x17f693f initialize_data_dependence_relation(data_reference*,
data_reference*, vec<loop*, va_heap, vl_ptr>)
    ../.././gcc/tree-data-ref.c:2843
  0x17fb13b compute_all_dependences(vec<data_reference*, va_heap, vl_ptr>,
vec<data_dependence_relation*, va_heap, vl_ptr>*, vec<loop*, va_heap, vl_ptr>,
bool)
    ../.././gcc/tree-data-ref.c:5391
  0x1800807 compute_data_dependences_for_loop(loop*, bool, vec<loop*, va_heap,
vl_ptr>*, vec<data_reference*, va_heap, vl_ptr>*,
vec<data_dependence_relation*, va_heap, vl_ptr>*)
    ../.././gcc/tree-data-ref.c:5868
  0xd6b307 tree_predictive_commoning_loop
    ../.././gcc/tree-predcom.c:3211
  0xd6b307 tree_predictive_commoning()
    ../.././gcc/tree-predcom.c:3333

when built with

-Ofast -fomit-frame-pointer -flto --param ipa-cp-eval-threshold=1 --param
ipa-cp-unit-growth=80 -fno-inline-functions-called-once

Removing any of these options seems to make it go away.

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

* [Bug fortran/97162] [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark
  2020-09-22 11:34 [Bug fortran/97162] New: [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark tnfchris at gcc dot gnu.org
@ 2020-09-22 12:05 ` marxin at gcc dot gnu.org
  2020-09-22 12:19 ` marxin at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-09-22 12:05 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org
   Last reconfirmed|                            |2020-09-22
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
I can reproduce that and I'm working on a reduction of the issue..

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

* [Bug fortran/97162] [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark
  2020-09-22 11:34 [Bug fortran/97162] New: [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark tnfchris at gcc dot gnu.org
  2020-09-22 12:05 ` [Bug fortran/97162] " marxin at gcc dot gnu.org
@ 2020-09-22 12:19 ` marxin at gcc dot gnu.org
  2020-09-22 12:58 ` tnfchris at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-09-22 12:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Hm, is it really a GCC 11 regression? I see another ICE with the oldest
revision I have:
9d55066c88b4c276(09 Oct 2014 07:40)(fxcoudert@gcc.gnu.org)


scflib.fppized.f: In function 'symh.constprop':
scflib.fppized.f:3780:0: internal compiler error: in expand_assignment, at
expr.c:4857
   460 H(KL) = T(K,L)
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[1]: *** [/tmp/cceDDRMT.mk:8: /tmp/ccGK5ftT.ltrans2.ltrans.o] Error 1

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

* [Bug fortran/97162] [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark
  2020-09-22 11:34 [Bug fortran/97162] New: [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark tnfchris at gcc dot gnu.org
  2020-09-22 12:05 ` [Bug fortran/97162] " marxin at gcc dot gnu.org
  2020-09-22 12:19 ` marxin at gcc dot gnu.org
@ 2020-09-22 12:58 ` tnfchris at gcc dot gnu.org
  2020-09-22 14:05 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2020-09-22 12:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Hmm it compiles for me with GCC 10.2 built from
e939674db6fda62a98675d20b95175ec4ba81140

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

* [Bug fortran/97162] [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark
  2020-09-22 11:34 [Bug fortran/97162] New: [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark tnfchris at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-09-22 12:58 ` tnfchris at gcc dot gnu.org
@ 2020-09-22 14:05 ` rguenth at gcc dot gnu.org
  2020-09-22 14:07 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-09-22 14:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org
   Target Milestone|---                         |11.0

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
So what are base1/base2 when the assert triggers?  Also try a checking build
which should ICE a bit earlier in the assert:

   gcc_checking_assert (DECL_P (base1) && DECL_P (base2));

but the call chain looks sufficiently protected - so maybe it's a GC issue
of SCEV data...

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

* [Bug fortran/97162] [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark
  2020-09-22 11:34 [Bug fortran/97162] New: [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark tnfchris at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-09-22 14:05 ` rguenth at gcc dot gnu.org
@ 2020-09-22 14:07 ` rguenth at gcc dot gnu.org
  2020-09-22 14:11 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-09-22 14:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
So just in case the following fixes it we've nailed it (somewhere I have a
verifier written...)

diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index b1d6e63559c..2f41ad222a0 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -3326,6 +3326,7 @@ tree_predictive_commoning (void)
   class loop *loop;
   unsigned ret = 0, changed = 0;

+  scev_reset ();
   initialize_original_copy_tables ();
   FOR_EACH_LOOP (loop, LI_ONLY_INNERMOST)
     if (optimize_loop_for_speed_p (loop))

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

* [Bug fortran/97162] [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark
  2020-09-22 11:34 [Bug fortran/97162] New: [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark tnfchris at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-09-22 14:07 ` rguenth at gcc dot gnu.org
@ 2020-09-22 14:11 ` marxin at gcc dot gnu.org
  2020-09-23  7:09 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-09-22 14:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #5)
> So just in case the following fixes it we've nailed it (somewhere I have a
> verifier written...)
> 
> diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
> index b1d6e63559c..2f41ad222a0 100644
> --- a/gcc/tree-predcom.c
> +++ b/gcc/tree-predcom.c
> @@ -3326,6 +3326,7 @@ tree_predictive_commoning (void)
>    class loop *loop;
>    unsigned ret = 0, changed = 0;
>  
> +  scev_reset ();
>    initialize_original_copy_tables ();
>    FOR_EACH_LOOP (loop, LI_ONLY_INNERMOST)
>      if (optimize_loop_for_speed_p (loop))

Unfortunately, it doesn't help.

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

* [Bug fortran/97162] [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark
  2020-09-22 11:34 [Bug fortran/97162] New: [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark tnfchris at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-09-22 14:11 ` marxin at gcc dot gnu.org
@ 2020-09-23  7:09 ` rguenth at gcc dot gnu.org
  2020-09-23  7:12 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-09-23  7:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
So we're getting a CONST_DECL into compare_base_decls which doesn't have RTL
but DECL_REGISTER requires DECL_WITH_RTL.  One fix would be

diff --git a/gcc/alias.c b/gcc/alias.c
index 1cb702be2ce..3f01c7072d2 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -2142,7 +2142,9 @@ compare_base_decls (tree base1, tree base2)

   /* If we have two register decls with register specification we
      cannot decide unless their assembler names are the same.  */
-  if (DECL_REGISTER (base1)
+  if (HAS_RTL_P (base1)
+      && HAS_RTL_P (base2)
+      && DECL_REGISTER (base1)
       && DECL_REGISTER (base2)
       && HAS_DECL_ASSEMBLER_NAME_P (base1)
       && HAS_DECL_ASSEMBLER_NAME_P (base2)

but I wonder if we instead want

   VAR_P (base1) && DECL_HARD_REGISTER (base1)

?  So I'm testing the following which also fixes the testcase

diff --git a/gcc/alias.c b/gcc/alias.c
index 1cb702be2ce..f6d7a1791c4 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -2142,10 +2142,10 @@ compare_base_decls (tree base1, tree base2)

   /* If we have two register decls with register specification we
      cannot decide unless their assembler names are the same.  */
-  if (DECL_REGISTER (base1)
-      && DECL_REGISTER (base2)
-      && HAS_DECL_ASSEMBLER_NAME_P (base1)
-      && HAS_DECL_ASSEMBLER_NAME_P (base2)
+  if (VAR_P (base1)
+      && VAR_P (base2)
+      && DECL_HARD_REGISTER (base1)
+      && DECL_HARD_REGISTER (base2)
       && DECL_ASSEMBLER_NAME_SET_P (base1)
       && DECL_ASSEMBLER_NAME_SET_P (base2))
     {

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

* [Bug fortran/97162] [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark
  2020-09-22 11:34 [Bug fortran/97162] New: [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark tnfchris at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2020-09-23  7:09 ` rguenth at gcc dot gnu.org
@ 2020-09-23  7:12 ` rguenth at gcc dot gnu.org
  2020-09-23  8:09 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-09-23  7:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

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

* [Bug fortran/97162] [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark
  2020-09-22 11:34 [Bug fortran/97162] New: [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark tnfchris at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2020-09-23  7:12 ` rguenth at gcc dot gnu.org
@ 2020-09-23  8:09 ` cvs-commit at gcc dot gnu.org
  2020-09-23  8:12 ` tnfchris at gcc dot gnu.org
  2020-09-23  8:15 ` rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-23  8:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:371f0b990f2bbf638b44da27cf6fc5f86e0d6d4e

commit r11-3385-g371f0b990f2bbf638b44da27cf6fc5f86e0d6d4e
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Sep 23 10:07:37 2020 +0200

    middle-end/97162 - fix ICE when building gamess

    This appropriately guards the check for a hard register in
    compare_base_decls which otherwise ICEs when passed a CONST_DECL.

    2020-09-23  Richard Biener  <rguenther@suse.de>

            PR middle-end/97162
            * alias.c (compare_base_decls): Use DECL_HARD_REGISTER
            and guard with VAR_P.

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

* [Bug fortran/97162] [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark
  2020-09-22 11:34 [Bug fortran/97162] New: [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark tnfchris at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2020-09-23  8:09 ` cvs-commit at gcc dot gnu.org
@ 2020-09-23  8:12 ` tnfchris at gcc dot gnu.org
  2020-09-23  8:15 ` rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2020-09-23  8:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Thanks Richi!

I can confirm the testcase builds with that patch :)

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

* [Bug fortran/97162] [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark
  2020-09-22 11:34 [Bug fortran/97162] New: [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark tnfchris at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2020-09-23  8:12 ` tnfchris at gcc dot gnu.org
@ 2020-09-23  8:15 ` rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-09-23  8:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2020-09-23  8:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22 11:34 [Bug fortran/97162] New: [11 Regression] ICE when building SPECCPU 2006 Gamess benchmark tnfchris at gcc dot gnu.org
2020-09-22 12:05 ` [Bug fortran/97162] " marxin at gcc dot gnu.org
2020-09-22 12:19 ` marxin at gcc dot gnu.org
2020-09-22 12:58 ` tnfchris at gcc dot gnu.org
2020-09-22 14:05 ` rguenth at gcc dot gnu.org
2020-09-22 14:07 ` rguenth at gcc dot gnu.org
2020-09-22 14:11 ` marxin at gcc dot gnu.org
2020-09-23  7:09 ` rguenth at gcc dot gnu.org
2020-09-23  7:12 ` rguenth at gcc dot gnu.org
2020-09-23  8:09 ` cvs-commit at gcc dot gnu.org
2020-09-23  8:12 ` tnfchris at gcc dot gnu.org
2020-09-23  8:15 ` rguenth 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).