public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/104947] New: ICE: SSA corruption (Unable to coalesce ssa_names 5 and 11 which are marked as MUST COALESCE.)
@ 2022-03-16  7:18 asolokha at gmx dot com
  2022-03-16  7:56 ` [Bug tree-optimization/104947] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
  2022-03-16  8:01 ` rguenth at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: asolokha at gmx dot com @ 2022-03-16  7:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

gcc 12.0.1 20220313 snapshot (g:7e28750395889d16a9cba49cd5935ced7dc00ce8) ICEs
when compiling the following testcase w/ -O2 -fno-tree-dce -fno-tree-dse:

int n;

__attribute__ ((returns_twice)) void
foo (void);

void
bar (void);

void
quux (int x)
{
  if (x)
    ++x;
  else
    {
      if (n)
        {
          x = 1;
          foo ();
        }
      else
        bar ();

      if (n)
        {
          ++x;
          ++n;
        }
    }
}

% gcc-12.0.1 -O2 -fno-tree-dce -fno-tree-dse -c ehpnzg5r.c

Unable to coalesce ssa_names 5 and 11 which are marked as MUST COALESCE.
x_5(ab) and  x_11(D)(ab)
during RTL pass: expand
ehpnzg5r.c: In function 'quux':
ehpnzg5r.c:10:1: internal compiler error: SSA corruption
   10 | quux (int x)
      | ^~~~
0xff74bb fail_abnormal_edge_coalesce
       
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/tree-ssa-coalesce.cc:1003
0xff74bb coalesce_partitions
       
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/tree-ssa-coalesce.cc:1425
0xff74bb coalesce_ssa_name(_var_map*)
       
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/tree-ssa-coalesce.cc:1755
0xf89ef1 remove_ssa_form
       
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/tree-outof-ssa.cc:1065
0xf89ef1 rewrite_out_of_ssa(ssaexpand*)
       
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/tree-outof-ssa.cc:1323
0x9d9d56 execute
       
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/cfgexpand.cc:6585

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

* [Bug tree-optimization/104947] [9/10/11/12 Regression] ICE: SSA corruption (Unable to coalesce ssa_names 5 and 11 which are marked as MUST COALESCE.)
  2022-03-16  7:18 [Bug tree-optimization/104947] New: ICE: SSA corruption (Unable to coalesce ssa_names 5 and 11 which are marked as MUST COALESCE.) asolokha at gmx dot com
@ 2022-03-16  7:56 ` pinskia at gcc dot gnu.org
  2022-03-16  8:01 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-03-16  7:56 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-03-16
   Target Milestone|---                         |9.5
            Summary|ICE: SSA corruption (Unable |[9/10/11/12 Regression]
                   |to coalesce ssa_names 5 and |ICE: SSA corruption (Unable
                   |11 which are marked as MUST |to coalesce ssa_names 5 and
                   |COALESCE.)                  |11 which are marked as MUST
                   |                            |COALESCE.)

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note in 4.9.4, ccp1 is able to remove the dead statement:
Removing dead stmt x_9 = x_8(D)(ab) + 1;

Which allowed the coalescing to happen.

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

* [Bug tree-optimization/104947] [9/10/11/12 Regression] ICE: SSA corruption (Unable to coalesce ssa_names 5 and 11 which are marked as MUST COALESCE.)
  2022-03-16  7:18 [Bug tree-optimization/104947] New: ICE: SSA corruption (Unable to coalesce ssa_names 5 and 11 which are marked as MUST COALESCE.) asolokha at gmx dot com
  2022-03-16  7:56 ` [Bug tree-optimization/104947] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
@ 2022-03-16  8:01 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-16  8:01 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Looks like a duplicate of PR98845, -fno-tree-tail-merge fixes it.

*** This bug has been marked as a duplicate of bug 98845 ***

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

end of thread, other threads:[~2022-03-16  8:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16  7:18 [Bug tree-optimization/104947] New: ICE: SSA corruption (Unable to coalesce ssa_names 5 and 11 which are marked as MUST COALESCE.) asolokha at gmx dot com
2022-03-16  7:56 ` [Bug tree-optimization/104947] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2022-03-16  8:01 ` 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).