Commit 7ad97d17 by Richard Biener Committed by Richard Biener

re PR tree-optimization/89135 (internal compiler error: in gimple_split_edge, at tree-cfg.c:2747)

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

	PR tree-optimization/89135
	* tree-ssa-phiprop.c (pass_phiprop::execute): Skip blocks
	with abnormal preds.

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

From-SVN: r268417
parent 6206a883
2019-01-31 Richard Biener <rguenther@suse.de>
PR tree-optimization/89135
* tree-ssa-phiprop.c (pass_phiprop::execute): Skip blocks
with abnormal preds.
2019-01-31 Jakub Jelinek <jakub@redhat.com> 2019-01-31 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/89124 PR sanitizer/89124
......
2019-01-31 Richard Biener <rguenther@suse.de>
PR tree-optimization/89135
* gcc.dg/torture/pr89135.c: New testcase.
2019-01-31 Jakub Jelinek <jakub@redhat.com> 2019-01-31 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/89124 PR sanitizer/89124
......
/* { dg-do compile } */
typedef __INTPTR_TYPE__ intptr_t;
intptr_t a, b, c, d;
int foo (void) { return 0; }
int baz (void);
void
bar (void)
{
intptr_t g = (intptr_t) &&h;
void *i = &&j, *k = &&l;
j:
if (baz ())
{
intptr_t **n = (intptr_t **) &a;
l:
b = 0;
for (; b >= 0;)
goto *k;
h:
**n = 0;
for (;;)
{
intptr_t *o = &c;
g = foo ();
*o = g;
if (c)
goto *d;
}
}
goto *i;
}
...@@ -495,8 +495,14 @@ pass_phiprop::execute (function *fun) ...@@ -495,8 +495,14 @@ pass_phiprop::execute (function *fun)
bbs = get_all_dominated_blocks (CDI_DOMINATORS, bbs = get_all_dominated_blocks (CDI_DOMINATORS,
single_succ (ENTRY_BLOCK_PTR_FOR_FN (fun))); single_succ (ENTRY_BLOCK_PTR_FOR_FN (fun)));
FOR_EACH_VEC_ELT (bbs, i, bb) FOR_EACH_VEC_ELT (bbs, i, bb)
for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi)) {
did_something |= propagate_with_phi (bb, gsi.phi (), phivn, n); /* Since we're going to move dereferences across predecessor
edges avoid blocks with abnormal predecessors. */
if (bb_has_abnormal_pred (bb))
continue;
for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
did_something |= propagate_with_phi (bb, gsi.phi (), phivn, n);
}
if (did_something) if (did_something)
gsi_commit_edge_inserts (); gsi_commit_edge_inserts ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment