aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>2019-10-15 07:19:41 +0000
committerPrathamesh Kulkarni <prathamesh3492@gcc.gnu.org>2019-10-15 07:19:41 +0000
commit3c8e341b996546607fa1f39a0fd9a9d7c2c38214 (patch)
tree6003d1912201949e1194f1a78591b9b8ce639548 /gcc
parent51992f15a7d9adce1016f8c31d37409e50d5797f (diff)
downloadgcc-3c8e341b996546607fa1f39a0fd9a9d7c2c38214.zip
gcc-3c8e341b996546607fa1f39a0fd9a9d7c2c38214.tar.gz
gcc-3c8e341b996546607fa1f39a0fd9a9d7c2c38214.tar.bz2
re PR tree-optimization/92085 (ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.c:86)
2019-10-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> PR tree-optimization/92085 * tree-if-conv.c (ifcvt_local_dce): Call gsi_next in else clause, instead of calling it unconditionally after delete_dead_or_redundant_assignment and fix indentation. testsuite/ * gcc.dg/tree-ssa/pr92085-1.c: New test. * gcc.dg/tree-ssa/pr92085-2.c: Likewise. From-SVN: r276984
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr92085-1.c20
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr92085-2.c29
-rw-r--r--gcc/tree-if-conv.c9
5 files changed, 67 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9957d2c..91809ca 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2019-10-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
+
+ PR tree-optimization/92085
+ * tree-if-conv.c (ifcvt_local_dce): Call gsi_next in else clause,
+ instead of calling it unconditionally after
+ delete_dead_or_redundant_assignment and fix indentation.
+
2019-10-15 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
* config/arm/vfp.md (fma<SDF:mode>4): Enable DF only when
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0285490..ae16907 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2019-10-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
+
+ PR tree-optimization/92085
+ * gcc.dg/tree-ssa/pr92085-1.c: New test.
+ * gcc.dg/tree-ssa/pr92085-2.c: Likewise.
+
2019-10-14 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/89943
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr92085-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr92085-1.c
new file mode 100644
index 0000000..c18f820
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr92085-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fexceptions -fnon-call-exceptions -ftree-loop-vectorize -fno-tree-sink --param dse-max-alias-queries-per-store=2 -w" } */
+
+void
+di (int y9, int qw)
+{
+ if ((int) &y9 != 0)
+ {
+ int py;
+ int **fq = &py;
+
+ while (qw < 1)
+ {
+ if ((0 < (**fq ? **fq : (**fq = 1))) / (**fq = y9))
+ ;
+
+ ++qw;
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr92085-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr92085-2.c
new file mode 100644
index 0000000..f62585c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr92085-2.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -ftree-loop-vectorize -fno-tree-dce -fno-tree-sink -w" } */
+
+int a8;
+
+void
+c1 (int oz, int dk, int ub)
+{
+ int *hd = 0;
+ long int *th = &dk;
+
+ while (ub < 1)
+ {
+ oz || dk;
+ ++ub;
+ }
+
+ while (oz < 2)
+ {
+ long int *lq = &oz;
+
+ (*hd < (*lq = *th)) < oz;
+
+ if (oz == 0)
+ *th = a8 = oz;
+
+ *lq = 0;
+ }
+}
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index af49813..3c296ec 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -2973,10 +2973,11 @@ ifcvt_local_dce (class loop *loop)
ao_ref write;
ao_ref_init (&write, lhs);
- if (dse_classify_store (&write, stmt, false, NULL, NULL, latch_vdef)
- == DSE_STORE_DEAD)
- delete_dead_or_redundant_assignment (&gsi, "dead");
- gsi_next (&gsi);
+ if (dse_classify_store (&write, stmt, false, NULL, NULL, latch_vdef)
+ == DSE_STORE_DEAD)
+ delete_dead_or_redundant_assignment (&gsi, "dead");
+ else
+ gsi_next (&gsi);
continue;
}