+2016-10-06 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/77839
+ * tree-ssa-sccvn.c (set_ssa_val_to): Forbid value -> constant value
+ lattice transition.
+
2016-10-06 Martin Liska <mliska@suse.cz>
* gcc.c: Set -fprofile-update=atomic when profiling is
+2016-10-06 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/77839
+ * gcc.dg/torture/pr77839.c: New testcase.
+
2016-10-06 Marek Polacek <polacek@redhat.com>
* g++.dg/cpp1z/init-statement9.C: New test.
--- /dev/null
+/* { dg-do compile } */
+
+void
+sd(int yn)
+{
+ while (yn < 1)
+ {
+ int hy;
+ int *n6 = &hy;
+ int **ot = &n6;
+
+ (void)ot;
+ for (yn = 0; yn < 1; ++yn)
+ {
+ int tc, wo = 0, ez = 0, b8 = 0;
+ int *ls = &wo;
+
+ (void)ls;
+ hy = 0;
+ for (tc = 0; tc < 1; ++tc)
+ {
+ ez ^= hy;
+ wo ^= ez;
+ ++b8;
+ }
+ hy += (b8 < wo);
+ }
+ }
+}
}
return false;
}
+ else if (currval != VN_TOP
+ && ! is_gimple_min_invariant (currval)
+ && is_gimple_min_invariant (to))
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "Forcing VARYING instead of changing "
+ "value number of ");
+ print_generic_expr (dump_file, from, 0);
+ fprintf (dump_file, " from ");
+ print_generic_expr (dump_file, currval, 0);
+ fprintf (dump_file, " (non-constant) to ");
+ print_generic_expr (dump_file, to, 0);
+ fprintf (dump_file, " (constant)\n");
+ }
+ to = from;
+ }
else if (TREE_CODE (to) == SSA_NAME
&& SSA_NAME_OCCURS_IN_ABNORMAL_PHI (to))
to = from;