2018-08-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/87124
* tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
constants before looking up avail.
* g++.dg/torture/pr87124.C: New testcase.
From-SVN: r263918
+2018-08-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/87124
+ * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
+ constants before looking up avail.
+
2018-08-28 Jakub Jelinek <jakub@redhat.com>
PR middle-end/87099
+2018-08-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/87124
+ * g++.dg/torture/pr87124.C: New testcase.
+
2017-08-28 Paul Thomas <pault@gcc.gnu.org>
PR fortran/80477
--- /dev/null
+// { dg-do compile }
+
+class A {
+ void m_fn1();
+};
+
+void A::m_fn1()
+{
+ A *a = this;
+ for (int i; i && a;)
+ a = 0;
+}
res_op->type, ops, &vnresult);
/* If this is used from expression simplification make sure to
return an available expression. */
- if (res && mprts_hook && rpo_avail)
+ if (res && TREE_CODE (res) == SSA_NAME && mprts_hook && rpo_avail)
res = rpo_avail->eliminate_avail (vn_context_bb, res);
return res;
}