aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-02-08 14:16:50 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-02-08 14:16:50 +0000
commit3865a06fb99d4a893989b7bbf3fc81f4c5cbf354 (patch)
treedf6511160dc905811e8b3a601792e9480742cd11 /gcc
parent62902f3fea6432056c9e1c95d574ca133cfe5b8d (diff)
downloadgcc-3865a06fb99d4a893989b7bbf3fc81f4c5cbf354.zip
gcc-3865a06fb99d4a893989b7bbf3fc81f4c5cbf354.tar.gz
gcc-3865a06fb99d4a893989b7bbf3fc81f4c5cbf354.tar.bz2
re PR tree-optimization/47639 (ICE: verify_stmts failed: statement marked for throw, but doesn't with -fstack-check=generic -fexceptions -fnon-call-exceptions)
2011-02-08 Richard Guenther <rguenther@suse.de> PR middle-end/47639 * tree-vect-generic.c (expand_vector_operations_1): Update stmts here ... (expand_vector_operations): ... not here. Cleanup EH info and the CFG if required. * g++.dg/opt/pr47639.c: New testcase. From-SVN: r169926
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/opt/pr47639.c17
-rw-r--r--gcc/tree-vect-generic.c15
4 files changed, 41 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f22f667..39a1913 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,13 @@
2011-02-08 Richard Guenther <rguenther@suse.de>
+ PR middle-end/47639
+ * tree-vect-generic.c (expand_vector_operations_1): Update
+ stmts here ...
+ (expand_vector_operations): ... not here. Cleanup EH info
+ and the CFG if required.
+
+2011-02-08 Richard Guenther <rguenther@suse.de>
+
PR tree-optimization/47641
* tree-ssa.c (execute_update_addresses_taken): For asm outputs
require type compatibility.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 51b225f..a9c1bf4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2011-02-08 Richard Guenther <rguenther@suse.de>
+ PR middle-end/47639
+ * g++.dg/opt/pr47639.c: New testcase.
+
+2011-02-08 Richard Guenther <rguenther@suse.de>
+
PR tree-optimization/47632
* g++.dg/opt/pr47632.C: New testcase.
diff --git a/gcc/testsuite/g++.dg/opt/pr47639.c b/gcc/testsuite/g++.dg/opt/pr47639.c
new file mode 100644
index 0000000..6ee8bb7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr47639.c
@@ -0,0 +1,17 @@
+// { dg-do compile }
+// { dg-options "-fnon-call-exceptions" }
+
+typedef int __attribute__ ((vector_size (8))) vec;
+
+vec foo (vec v1, vec v2)
+{
+ try
+ {
+ return v1 / v2;
+ }
+ catch (...)
+ {
+ throw;
+ }
+}
+
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index 54a6075..fce1fc7 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -606,8 +606,7 @@ expand_vector_operations_1 (gimple_stmt_iterator *gsi)
way to do it is change expand_vector_operation and its callees to
return a tree_code, RHS1 and RHS2 instead of a tree. */
gimple_assign_set_rhs_from_tree (gsi, new_rhs);
-
- gimple_set_modified (gsi_stmt (*gsi), true);
+ update_stmt (gsi_stmt (*gsi));
}
/* Use this to lower vector operations introduced by the vectorizer,
@@ -624,16 +623,24 @@ expand_vector_operations (void)
{
gimple_stmt_iterator gsi;
basic_block bb;
+ bool cfg_changed = false;
FOR_EACH_BB (bb)
{
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
expand_vector_operations_1 (&gsi);
- update_stmt_if_modified (gsi_stmt (gsi));
+ /* ??? If we do not cleanup EH then we will ICE in
+ verification. But in reality we have created wrong-code
+ as we did not properly transition EH info and edges to
+ the piecewise computations. */
+ if (maybe_clean_eh_stmt (gsi_stmt (gsi))
+ && gimple_purge_dead_eh_edges (bb))
+ cfg_changed = true;
}
}
- return 0;
+
+ return cfg_changed ? TODO_cleanup_cfg : 0;
}
struct gimple_opt_pass pass_lower_vector =