aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-01-11 18:56:39 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2016-01-11 18:56:39 +0100
commit1ebd5558eb04938a62eaa8cbfaa24b0205326b87 (patch)
tree2392d4d1604ee48729edf6ea5d71ab85cf6841c4 /gcc
parentde41ebf5ddab45c643cfe8166c1d274ed4620d4f (diff)
downloadgcc-1ebd5558eb04938a62eaa8cbfaa24b0205326b87.zip
gcc-1ebd5558eb04938a62eaa8cbfaa24b0205326b87.tar.gz
gcc-1ebd5558eb04938a62eaa8cbfaa24b0205326b87.tar.bz2
re PR tree-optimization/69214 (ICE (segfault) at -Os on x86_64-linux-gnu in "fail_abnormal_edge_coalesce")
PR tree-optimization/69214 * tree-vrp.c (simplify_cond_using_ranges): Don't propagate innerop into a comparison if SSA_NAME_OCCURS_IN_ABNORMAL_PHI. Formatting fix. * gcc.c-torture/compile/pr69214.c: New test. From-SVN: r232235
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr69214.c17
-rw-r--r--gcc/tree-vrp.c7
4 files changed, 31 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6ae3248..4f4bb00 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2016-01-11 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/69214
+ * tree-vrp.c (simplify_cond_using_ranges): Don't propagate
+ innerop into a comparison if SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
+ Formatting fix.
+
PR tree-optimization/69207
* tree-vect-slp.c (vect_get_constant_vectors): For
VECTOR_BOOLEAN_TYPE_P, assert op has integral type instead of
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8c05bf8..1497f00 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/69214
+ * gcc.c-torture/compile/pr69214.c: New test.
+
2016-01-11 Uros Bizjak <ubizjak@gmail.com>
* gcc.target/i386/pr66232-10.c: Do not compile on ia32 target.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr69214.c b/gcc/testsuite/gcc.c-torture/compile/pr69214.c
new file mode 100644
index 0000000..61728f5
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr69214.c
@@ -0,0 +1,17 @@
+/* PR tree-optimization/69214 */
+
+extern void bar (void);
+extern int __setjmp (char *);
+
+void
+foo (char *p)
+{
+ int d = 0;
+ bar ();
+ if (__setjmp (p))
+ return;
+ long a = d;
+ d = 8;
+ if (!a)
+ bar ();
+}
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index e6c11e0..920a9b1 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -9478,7 +9478,8 @@ simplify_cond_using_ranges (gcond *stmt)
if (TREE_CODE (innerop) == SSA_NAME
&& !POINTER_TYPE_P (TREE_TYPE (innerop))
- && desired_pro_or_demotion_p (TREE_TYPE (innerop), TREE_TYPE (op0)))
+ && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (innerop)
+ && desired_pro_or_demotion_p (TREE_TYPE (innerop), TREE_TYPE (op0)))
{
value_range *vr = get_value_range (innerop);
@@ -9509,8 +9510,8 @@ simplify_cond_using_ranges (gcond *stmt)
else
location = gimple_location (stmt);
warning_at (location, OPT_Wstrict_overflow,
- "assuming signed overflow does not occur when "
- "simplifying conditional");
+ "assuming signed overflow does not occur when "
+ "simplifying conditional");
}
tree newconst = fold_convert (TREE_TYPE (innerop), op1);