public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/98786] New: ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.)
@ 2021-01-22  4:21 asolokha at gmx dot com
  2021-01-22  7:54 ` [Bug tree-optimization/98786] " rguenth at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: asolokha at gmx dot com @ 2021-01-22  4:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98786
           Summary: ICE: SSA corruption (Unable to coalesce ssa_names 2
                    and 10 which are marked as MUST COALESCE.)
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20210117 snapshot (g:0f4c8f517b7954e113afb4d5c7212123c8ee2418)
ICEs when compiling the following testcase w/ -O1 -fno-tree-dce:

void
func_30 (void);

int __attribute__ ((pure, returns_twice))
func_38 (int g_15, int p_39)
{
  return !!g_15 ? p_39 : 0;
}

void
func_26 (int func_26___trans_tmp_1)
{
  long int l_37 = 0;
  int __trans_tmp_1;

  func_26___trans_tmp_1 = func_38 (func_26___trans_tmp_1, 1);
  __trans_tmp_1 = func_38 (func_26___trans_tmp_1, l_37);
  l_37 = 1;
  func_30 ();
}

% gcc-11.0.0 -O1 -fno-tree-dce -c rm463xcz.c

Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.
l_37_2(ab) and  l_37_10(ab)
during RTL pass: expand
rm463xcz.c: In function 'func_26':
rm463xcz.c:11:1: internal compiler error: SSA corruption
   11 | func_26 (int func_26___trans_tmp_1)
      | ^~~~~~~
0xf1ac45 fail_abnormal_edge_coalesce
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/tree-ssa-coalesce.c:1003
0xf1ac45 coalesce_partitions
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/tree-ssa-coalesce.c:1425
0xf1ac45 coalesce_ssa_name(_var_map*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/tree-ssa-coalesce.c:1755
0xeb68cc remove_ssa_form
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/tree-outof-ssa.c:1065
0xeb68cc rewrite_out_of_ssa(ssaexpand*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/tree-outof-ssa.c:1323
0x95fdd0 execute
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cfgexpand.c:6533

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

* [Bug tree-optimization/98786] ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.)
  2021-01-22  4:21 [Bug rtl-optimization/98786] New: ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.) asolokha at gmx dot com
@ 2021-01-22  7:54 ` rguenth at gcc dot gnu.org
  2021-01-22  9:08 ` marxin at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-22  7:54 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-01-22
             Status|UNCONFIRMED                 |ASSIGNED
          Component|rtl-optimization            |tree-optimization
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, seems some odd interaction of inlining and abnormals which do not vanish
for some reason.

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

* [Bug tree-optimization/98786] ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.)
  2021-01-22  4:21 [Bug rtl-optimization/98786] New: ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.) asolokha at gmx dot com
  2021-01-22  7:54 ` [Bug tree-optimization/98786] " rguenth at gcc dot gnu.org
@ 2021-01-22  9:08 ` marxin at gcc dot gnu.org
  2021-01-22  9:30 ` rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-01-22  9:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Btw. started with r6-2159-g9844173510418bfd.

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

* [Bug tree-optimization/98786] ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.)
  2021-01-22  4:21 [Bug rtl-optimization/98786] New: ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.) asolokha at gmx dot com
  2021-01-22  7:54 ` [Bug tree-optimization/98786] " rguenth at gcc dot gnu.org
  2021-01-22  9:08 ` marxin at gcc dot gnu.org
@ 2021-01-22  9:30 ` rguenth at gcc dot gnu.org
  2021-01-22 10:31 ` cvs-commit at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-22  9:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|5.4.0                       |

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #2)
> Btw. started with r6-2159-g9844173510418bfd.

Ah, ok.  Disabling phiopt fixes it and phiopt fails to check for abnormals
so thanks for the hint.  The functionality also oddly transforms

 _2 = (int)_1;
 if (..)
   ;
 # _3 = PHI <_2, 0>

as 'conditional conversion' because it doesn't check the definition place.
Fixing either fixes the issue.

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

* [Bug tree-optimization/98786] ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.)
  2021-01-22  4:21 [Bug rtl-optimization/98786] New: ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.) asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2021-01-22  9:30 ` rguenth at gcc dot gnu.org
@ 2021-01-22 10:31 ` cvs-commit at gcc dot gnu.org
  2021-01-22 10:39 ` [Bug tree-optimization/98786] [8/9/10 Regression] " rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-22 10:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 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:fd61ca67f97acc5462d02676380af92329c37bb2

commit r11-6851-gfd61ca67f97acc5462d02676380af92329c37bb2
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Jan 22 10:34:42 2021 +0100

    tree-optimization/98786 - fix issue with phiopt and abnormals

    This fixes factor_out_conditional_conversion to avoid creating overlapping
    lifetimes for abnormals.  It also makes sure we do deal with a conditional
    conversion (at least for one PHI arg def) - for the testcase that wasn't
the case.

    2021-01-22  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/98786
            * tree-ssa-phiopt.c (factor_out_conditional_conversion): Avoid
            adding new uses of abnormals.  Verify we deal with a conditional
            conversion.

            * gcc.dg/torture/pr98786.c: New testcase.

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

* [Bug tree-optimization/98786] [8/9/10 Regression] ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.)
  2021-01-22  4:21 [Bug rtl-optimization/98786] New: ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.) asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2021-01-22 10:31 ` cvs-commit at gcc dot gnu.org
@ 2021-01-22 10:39 ` rguenth at gcc dot gnu.org
  2021-05-05  9:03 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-22 10:39 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
      Known to work|                            |11.0
      Known to fail|11.0                        |
            Summary|ICE: SSA corruption (Unable |[8/9/10 Regression] ICE:
                   |to coalesce ssa_names 2 and |SSA corruption (Unable to
                   |10 which are marked as MUST |coalesce ssa_names 2 and 10
                   |COALESCE.)                  |which are marked as MUST
                   |                            |COALESCE.)
   Target Milestone|---                         |8.5

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.

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

* [Bug tree-optimization/98786] [8/9/10 Regression] ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.)
  2021-01-22  4:21 [Bug rtl-optimization/98786] New: ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.) asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2021-01-22 10:39 ` [Bug tree-optimization/98786] [8/9/10 Regression] " rguenth at gcc dot gnu.org
@ 2021-05-05  9:03 ` rguenth at gcc dot gnu.org
  2021-05-05  9:42 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-05  9:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98786
Bug 98786 depends on bug 100414, which changed state.

Bug 100414 Summary: [11 Regression] ICE: in dominated_by_p, at dominance.c:1120 with -O -fno-tree-dce -fno-tree-dse
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100414

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

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

* [Bug tree-optimization/98786] [8/9/10 Regression] ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.)
  2021-01-22  4:21 [Bug rtl-optimization/98786] New: ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.) asolokha at gmx dot com
                   ` (5 preceding siblings ...)
  2021-05-05  9:03 ` rguenth at gcc dot gnu.org
@ 2021-05-05  9:42 ` cvs-commit at gcc dot gnu.org
  2021-05-05  9:43 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-05  9:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:329f730fd1daa7cdae4a637244d4e215f9bb9a8c

commit r10-9800-g329f730fd1daa7cdae4a637244d4e215f9bb9a8c
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Jan 22 10:34:42 2021 +0100

    tree-optimization/98786 - fix issue with phiopt and abnormals

    This fixes factor_out_conditional_conversion to avoid creating overlapping
    lifetimes for abnormals.

    2021-01-22  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/98786
            * tree-ssa-phiopt.c (factor_out_conditional_conversion): Avoid
            adding new uses of abnormals.

            * gcc.dg/torture/pr98786.c: New testcase.

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

* [Bug tree-optimization/98786] [8/9/10 Regression] ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.)
  2021-01-22  4:21 [Bug rtl-optimization/98786] New: ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.) asolokha at gmx dot com
                   ` (6 preceding siblings ...)
  2021-05-05  9:42 ` cvs-commit at gcc dot gnu.org
@ 2021-05-05  9:43 ` rguenth at gcc dot gnu.org
  2021-05-05 10:12 ` 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 @ 2021-05-05  9:43 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |10.3.1
      Known to fail|                            |10.3.0

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Backported a simplified fix to GCC 10, avoiding PR100414.

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

* [Bug tree-optimization/98786] [8/9/10 Regression] ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.)
  2021-01-22  4:21 [Bug rtl-optimization/98786] New: ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.) asolokha at gmx dot com
                   ` (7 preceding siblings ...)
  2021-05-05  9:43 ` rguenth at gcc dot gnu.org
@ 2021-05-05 10:12 ` cvs-commit at gcc dot gnu.org
  2021-05-05 10:43 ` cvs-commit at gcc dot gnu.org
  2021-05-05 10:43 ` rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-05 10:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:61cf7ddeae6d13c81498088c1c643ca47fdbde2c

commit r9-9512-g61cf7ddeae6d13c81498088c1c643ca47fdbde2c
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Jan 22 10:34:42 2021 +0100

    tree-optimization/98786 - fix issue with phiopt and abnormals

    This fixes factor_out_conditional_conversion to avoid creating overlapping
    lifetimes for abnormals.

    2021-01-22  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/98786
            * tree-ssa-phiopt.c (factor_out_conditional_conversion): Avoid
            adding new uses of abnormals.

            * gcc.dg/torture/pr98786.c: New testcase.

    (cherry picked from commit 329f730fd1daa7cdae4a637244d4e215f9bb9a8c)

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

* [Bug tree-optimization/98786] [8/9/10 Regression] ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.)
  2021-01-22  4:21 [Bug rtl-optimization/98786] New: ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.) asolokha at gmx dot com
                   ` (8 preceding siblings ...)
  2021-05-05 10:12 ` cvs-commit at gcc dot gnu.org
@ 2021-05-05 10:43 ` cvs-commit at gcc dot gnu.org
  2021-05-05 10:43 ` rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-05 10:43 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:1a121f0c20f490ff03f78e7f3f8a22ab9b2bbac9

commit r8-10951-g1a121f0c20f490ff03f78e7f3f8a22ab9b2bbac9
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Jan 22 10:34:42 2021 +0100

    tree-optimization/98786 - fix issue with phiopt and abnormals

    This fixes factor_out_conditional_conversion to avoid creating overlapping
    lifetimes for abnormals.

    2021-01-22  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/98786
            * tree-ssa-phiopt.c (factor_out_conditional_conversion): Avoid
            adding new uses of abnormals.

            * gcc.dg/torture/pr98786.c: New testcase.

    (cherry picked from commit 329f730fd1daa7cdae4a637244d4e215f9bb9a8c)

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

* [Bug tree-optimization/98786] [8/9/10 Regression] ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.)
  2021-01-22  4:21 [Bug rtl-optimization/98786] New: ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.) asolokha at gmx dot com
                   ` (9 preceding siblings ...)
  2021-05-05 10:43 ` cvs-commit at gcc dot gnu.org
@ 2021-05-05 10:43 ` rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-05 10:43 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |8.4.0
             Status|ASSIGNED                    |RESOLVED
      Known to work|                            |8.4.1, 9.3.1
         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:[~2021-05-05 10:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22  4:21 [Bug rtl-optimization/98786] New: ICE: SSA corruption (Unable to coalesce ssa_names 2 and 10 which are marked as MUST COALESCE.) asolokha at gmx dot com
2021-01-22  7:54 ` [Bug tree-optimization/98786] " rguenth at gcc dot gnu.org
2021-01-22  9:08 ` marxin at gcc dot gnu.org
2021-01-22  9:30 ` rguenth at gcc dot gnu.org
2021-01-22 10:31 ` cvs-commit at gcc dot gnu.org
2021-01-22 10:39 ` [Bug tree-optimization/98786] [8/9/10 Regression] " rguenth at gcc dot gnu.org
2021-05-05  9:03 ` rguenth at gcc dot gnu.org
2021-05-05  9:42 ` cvs-commit at gcc dot gnu.org
2021-05-05  9:43 ` rguenth at gcc dot gnu.org
2021-05-05 10:12 ` cvs-commit at gcc dot gnu.org
2021-05-05 10:43 ` cvs-commit at gcc dot gnu.org
2021-05-05 10:43 ` 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).