2017-09-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/82244
* tree-vrp.c (remove_range_assertions): Do not propagate
a constant to abnormals but replace the assert with a copy.
* gcc.dg/torture/pr82244.c: New testcase.
From-SVN: r252973
+2017-09-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/82244
+ * tree-vrp.c (remove_range_assertions): Do not propagate
+ a constant to abnormals but replace the assert with a copy.
+
2017-09-19 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/57878
+2017-09-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/82244
+ * gcc.dg/torture/pr82244.c: New testcase.
+
2017-09-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/69728
--- /dev/null
+/* { dg-do compile } */
+
+typedef struct a {
+ struct a *b;
+} a;
+
+extern int d(void);
+extern int g(void);
+extern int h(void);
+extern int _setjmp(void *);
+
+int c(void)
+{
+ 1 ? d() : 0;
+
+ a *e;
+ while (e) {
+ e = (e == (a *) c) ? 0 : e->b;
+ while (e) {
+ int f = 0;
+ g();
+ if (_setjmp(0)) {
+ if (f & 6) {
+ ;
+ } else if (f & 2) {
+ h();
+ }
+ }
+ }
+ }
+}
FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
SET_USE (use_p, var);
}
+ /* But do not propagate constants as that is invalid. */
+ else if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs))
+ {
+ gassign *ass = gimple_build_assign (lhs, var);
+ gsi_replace (&si, ass, true);
+ gsi_next (&si);
+ continue;
+ }
else
replace_uses_by (lhs, var);