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

Reply via email to