From 362e280d10c61bec13c1d02c11a1c4ac0846db7e Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 9 May 2019 10:09:30 +0000 Subject: [PATCH] re PR tree-optimization/90395 (ICE: verify_flow_info failed (error: BB 2 cannot throw but has an EH edge)) 2019-05-09 Richard Biener PR tree-optimization/90395 * tree-ssa-forwprop.c (pass_forwprop::execute): Do not rewrite vector stores that throw internally. * gcc.dg/torture/pr90395.c: New testcase. From-SVN: r271031 --- gcc/ChangeLog | 6 ++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/torture/pr90395.c | 12 ++++++++++++ gcc/tree-ssa-forwprop.c | 1 + 4 files changed, 24 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/torture/pr90395.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7df4ae671de..35badb9d835 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-05-09 Richard Biener + + PR tree-optimization/90395 + * tree-ssa-forwprop.c (pass_forwprop::execute): Do not + rewrite vector stores that throw internally. + 2019-05-09 Thomas Schwinge * cif-code.def (CHKP): Remove. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 270453f247d..f03c44582fd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-05-09 Richard Biener + + PR tree-optimization/90395 + * gcc.dg/torture/pr90395.c: New testcase. + 2019-05-08 Cherry Zhang * go.dg/cmpstring.go: New test. diff --git a/gcc/testsuite/gcc.dg/torture/pr90395.c b/gcc/testsuite/gcc.dg/torture/pr90395.c new file mode 100644 index 00000000000..eba8750eff9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr90395.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-fexceptions -fnon-call-exceptions" } */ + +typedef int v16si __attribute__ ((__vector_size__ (64))); + +void +rl (int uq) +{ + v16si qw[1]; + + qw[uq] = (v16si) { uq }; +} diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 7dd1e64335a..32b5a15151c 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -2570,6 +2570,7 @@ pass_forwprop::execute (function *fun) if (single_imm_use (lhs, &use_p, &use_stmt) && gimple_store_p (use_stmt) && !gimple_has_volatile_ops (use_stmt) + && !stmt_can_throw_internal (cfun, use_stmt) && is_gimple_assign (use_stmt) && (TREE_CODE (gimple_assign_lhs (use_stmt)) != TARGET_MEM_REF)) -- 2.30.2