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

            Bug ID: 96931
           Summary: [11 Regression] ICE in add_phi_arg, at
                    tree-phinodes.c:359
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200830 snapshot (g:6ccadc4c0486ff011a32c74de1a31148acb3cbe2)
ICEs when compiling the following testcase w/ -O1 -fpredictive-commoning
-fno-tree-loop-im:

int bl;

void
p3 (void);

void __attribute__ ((returns_twice))
ie (void)
{
  p3 ();

  bl = 0;
  for (;;)
    ++bl;

  ie ();
}

% gcc-11.0.0 -O1 -fpredictive-commoning -fno-tree-loop-im -c d8kidanm.c
during GIMPLE pass: pcom
d8kidanm.c: In function 'ie':
d8kidanm.c:7:1: internal compiler error: in add_phi_arg, at tree-phinodes.c:359
    7 | ie (void)
      | ^~
0x6b7058 add_phi_arg(gphi*, tree_node*, edge_def*, unsigned int)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/tree-phinodes.c:359
0xe41fd0 initialize_root_vars_lm
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/tree-predcom.c:1969
0xe41fd0 execute_load_motion
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/tree-predcom.c:2001
0xe41fd0 execute_pred_commoning
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/tree-predcom.c:2265
0xe45897 tree_predictive_commoning_loop
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/tree-predcom.c:3308
0xe45897 tree_predictive_commoning()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/tree-predcom.c:3333

Reply via email to