2012-09-21 Richard Guenther <rguenther@suse.de>
PR tree-optimization/54647
* tree-ssa-pre.c (compute_avail): Do not put COND_EXPR
or VEC_COND_EXPR into EXP_GEN again.
* g++.dg/torture/pr54647.C: New testcase.
From-SVN: r191613
+2012-09-21 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54647
+ * tree-ssa-pre.c (compute_avail): Do not put COND_EXPR
+ or VEC_COND_EXPR into EXP_GEN again.
+
2012-09-21 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/54629
+2012-09-21 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54647
+ * g++.dg/torture/pr54647.C: New testcase.
+
2012-09-21 Marc Glisse <marc.glisse@inria.fr>
PR c++/54427
--- /dev/null
+// { dg-do compile }
+
+class A
+{
+};
+template <class type> struct D:A
+{
+ type & operator[](int);
+};
+struct B
+{
+ typedef D <int *>Row;
+ struct C
+ {
+ Row *row;
+ };
+};
+B::C a;
+B::Row & b = *a.row;
+void
+fn1 ()
+{
+ while (1)
+ b[0] = b[0] ? (int *) -1 : 0;
+}
{
case VN_NARY:
{
+ enum tree_code code = gimple_assign_rhs_code (stmt);
vn_nary_op_t nary;
+
+ /* COND_EXPR and VEC_COND_EXPR are awkward in
+ that they contain an embedded complex expression.
+ Don't even try to shove those through PRE. */
+ if (code == COND_EXPR
+ || code == VEC_COND_EXPR)
+ continue;
+
vn_nary_op_lookup_pieces (gimple_num_ops (stmt) - 1,
- gimple_assign_rhs_code (stmt),
+ code,
gimple_expr_type (stmt),
gimple_assign_rhs1_ptr (stmt),
&nary);