From: Richard Biener Date: Tue, 15 Jan 2019 15:37:29 +0000 (+0000) Subject: re PR tree-optimization/88855 (ICE: verify_ssa failed (error: SSA_NAME_OCCURS_IN_ABNO... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=41bc37bad8cb29027155f247e6ad4be83d64f163;p=gcc.git re PR tree-optimization/88855 (ICE: verify_ssa failed (error: SSA_NAME_OCCURS_IN_ABNORMAL_PHI should be set)) 2019-01-15 Richard Biener 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e45150933e0..14f0730a038 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-01-15 Richard Biener + + 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 PR target/80547 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 999810a1c89..a5cfa7f6291 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-01-15 Richard Biener + + PR tree-optimization/88855 + * gcc.dg/pr88855.c: New testcase. + 2019-01-15 Paolo Carlini * g++.dg/diagnostic/typedef-initialized.C: New. diff --git a/gcc/testsuite/gcc.dg/pr88855.c b/gcc/testsuite/gcc.dg/pr88855.c new file mode 100644 index 00000000000..be6ffe3675a --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr88855.c @@ -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); +} diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index 76a5bc481da..bdd4c2aa6c4 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -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); }