aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2007-09-07 12:17:46 +0200
committerUros Bizjak <uros@gcc.gnu.org>2007-09-07 12:17:46 +0200
commitb616a16e1a5ea4e8ea62b5ed5690b428d9393e58 (patch)
tree86bc2a69e632746478df68506829ec6c7eb1f74b
parentc664bb1b461cfee89b2e9b65c5fe827f3da40173 (diff)
downloadgcc-b616a16e1a5ea4e8ea62b5ed5690b428d9393e58.zip
gcc-b616a16e1a5ea4e8ea62b5ed5690b428d9393e58.tar.gz
gcc-b616a16e1a5ea4e8ea62b5ed5690b428d9393e58.tar.bz2
re PR tree-optimization/32821 (tree-if-conv:combine_blocks with -ftree-dump-tree-all-details fails on ICE in compilation: segfault)
PR tree-optimization/32821 * tree_if_conv.c (combine_blocks): Use alloc_stmt_list instead of NULL in the call to set_bb_stmt_list. testsuite/ChangeLog: PR tree-optimization/32821 * gcc.dg/tree-ssa/pr32821.c: New file. From-SVN: r128235
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr32821.c15
-rw-r--r--gcc/tree-if-conv.c2
4 files changed, 28 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e5a2363..7ae6007 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2007-09-07 Richard Guenther <rguenther@suse.de>
+ Uros Bizjak <ubizjak@gmail.com>
+
+ PR tree-optimization/32821
+ * tree_if_conv.c (combine_blocks): Use alloc_stmt_list instead of
+ NULL in the call to set_bb_stmt_list.
+
2007-09-07 Richard Sandiford <richard@codesourcery.com>
* config/mips/mips.c (build_mips16_call_stub): Emit all direct
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0781fb1..c9dc15f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-09-07 Uros Bizjak <ubizjak@gmail.com>
+
+ PR tree-optimization/32821
+ * gcc.dg/tree-ssa/pr32821.c: New file.
+
2007-09-07 Richard Sandiford <richard@codesourcery.com>
* gcc.dg/attr-alias-3.c: Use real asm for MIPS.
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr32821.c b/gcc/testsuite/gcc.dg/tree-ssa/pr32821.c
new file mode 100644
index 0000000..2195739
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr32821.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-ifcvt-details" } */
+
+void
+main1 (int *arr, int n, int a, int b)
+{
+ int i;
+ for (i = 0; i < n; i++)
+ {
+ int m = arr[i];
+ arr[i] = (m < a ? m - a : b);
+ }
+}
+
+/* { dg-final { cleanup-tree-dump "ifcvt" } } */
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index 289da6e..f97c23d 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -985,7 +985,7 @@ combine_blocks (struct loop *loop)
/* Update stmt list. */
last = tsi_last (bb_stmt_list (merge_target_bb));
tsi_link_after (&last, bb_stmt_list (bb), TSI_NEW_STMT);
- set_bb_stmt_list (bb, NULL);
+ set_bb_stmt_list (bb, alloc_stmt_list());
delete_basic_block (bb);
}