re PR tree-optimization/88855 (ICE: verify_ssa failed (error: SSA_NAME_OCCURS_IN_ABNORMAL_PHI should be set))

2019-01-15  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/88855
	* tree-if-conv.c (combine_blocks): Collect
	SSA_NAME_OCCURS_IN_ABNORMAL_PHI from propagated out virtuals.

	* gcc.dg/pr88855.c: New testcase.

From-SVN: r267939
This commit is contained in:
Richard Biener 2019-01-15 15:37:29 +00:00 committed by Richard Biener
parent 10ddff67d3
commit 41bc37bad8
4 changed files with 36 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2019-01-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/88855
* tree-if-conv.c (combine_blocks): Collect
SSA_NAME_OCCURS_IN_ABNORMAL_PHI from propagated out virtuals.
2019-01-15 Tom de Vries <tdevries@suse.de>
PR target/80547

View File

@ -1,3 +1,8 @@
2019-01-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/88855
* gcc.dg/pr88855.c: New testcase.
2019-01-15 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/diagnostic/typedef-initialized.C: New.

View File

@ -0,0 +1,21 @@
/* { dg-do compile } */
/* { dg-options "-O -ftree-loop-if-convert -ftree-vrp -fno-tree-copy-prop -fno-tree-dce -fno-tree-dominator-opts" } */
typedef int jmp_buf[1];
extern void exit(int) __attribute__((__noreturn__));
extern int setjmpx(jmp_buf) __attribute__((__returns_twice__));
jmp_buf jbAnagram;
int a[6];
int d;
int b () { exit (1); }
int c () { b (); }
int e ()
{
int f = 0;
for (; f < 6; f++)
a[f] = d;
c ();
setjmpx (jbAnagram);
}

View File

@ -2633,6 +2633,8 @@ combine_blocks (struct loop *loop)
FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
SET_USE (use_p, last_vdef);
}
if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (gimple_phi_result (vphi)))
SSA_NAME_OCCURS_IN_ABNORMAL_PHI (last_vdef) = 1;
gsi = gsi_for_stmt (vphi);
remove_phi_node (&gsi, true);
}
@ -2691,6 +2693,8 @@ combine_blocks (struct loop *loop)
FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
SET_USE (use_p, last_vdef);
}
if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (gimple_phi_result (vphi)))
SSA_NAME_OCCURS_IN_ABNORMAL_PHI (last_vdef) = 1;
gimple_stmt_iterator gsi = gsi_for_stmt (vphi);
remove_phi_node (&gsi, true);
}