+2016-02-12 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2016-02-09 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/69715
+ * tree-ssa.c (execute_update_addresses_taken): Mark non-decl
+ LHS on calls as non-rewritable.
+
+ 2016-02-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/69579
+ * tree-ssa-loop-ivcanon.c (propagate_constants_for_unrolling):
+ Do not propagate through abnormal PHI results.
+
+ 2016-02-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/69574
+ * tree-chrec.c (hide_evolution_in_other_loops_than_loop): Instead
+ of asserting return chrec_dont_know.
+
2016-02-11 Richard Biener <rguenther@suse.de>
Backport from mainline
+2016-02-12 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2016-02-09 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/69715
+ * gcc.dg/torture/pr69715.c: New testcase.
+
+ 2016-02-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/69579
+ * gcc.dg/setjmp-6.c: New testcase.
+
+ 2016-02-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/69574
+ * gcc.dg/torture/pr69574.c: New testcase.
+
2016-02-11 Richard Biener <rguenther@suse.de>
Backport from mainline
--- /dev/null
+/* PR69569 */
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+#include <setjmp.h>
+
+jmp_buf buf;
+
+struct str {
+ int Count;
+};
+int fun2(struct str *p1)
+{
+ int i = 1;
+ while (1) {
+ setjmp(buf);
+ break;
+ }
+ for (; i;) {
+ i = 0;
+ for (; i < (p1 ? p1->Count : 1); i++)
+ fun2(p1);
+ }
+ return 1;
+}
--- /dev/null
+/* { dg-do compile } */
+
+typedef unsigned mytype;
+
+struct S {
+ mytype *pu;
+};
+
+mytype f(struct S *e)
+{
+ mytype x;
+ if(&x != e->pu)
+ __builtin_memcpy(&x, e->pu, sizeof(unsigned));
+ return x;
+}
--- /dev/null
+/* { dg-do compile } */
+
+struct __attribute__((may_alias)) S { long long low; int high; };
+struct S foo (void);
+long double
+bar (void)
+{
+ long double a;
+ *(struct S *)&a = foo ();
+ return a;
+}
/* There is no evolution in this loop. */
return initial_condition (chrec);
+ else if (flow_loop_nested_p (loop, chloop))
+ return hide_evolution_in_other_loops_than_loop (CHREC_LEFT (chrec),
+ loop_num);
+
else
- {
- gcc_assert (flow_loop_nested_p (loop, chloop));
- return hide_evolution_in_other_loops_than_loop (CHREC_LEFT (chrec),
- loop_num);
- }
+ return chrec_dont_know;
default:
return chrec;
tree result = gimple_phi_result (phi);
tree arg = gimple_phi_arg_def (phi, 0);
- if (gimple_phi_num_args (phi) == 1 && TREE_CODE (arg) == INTEGER_CST)
+ if (! SSA_NAME_OCCURS_IN_ABNORMAL_PHI (result)
+ && gimple_phi_num_args (phi) == 1
+ && TREE_CODE (arg) == INTEGER_CST)
{
propagate_into_all_uses (result, arg);
gsi_remove (&gsi, true);
tree lhs = gimple_get_lhs (stmt);
if (lhs
&& TREE_CODE (lhs) != SSA_NAME
- && non_rewritable_lvalue_p (lhs))
+ && ((code == GIMPLE_CALL && ! DECL_P (lhs))
+ || non_rewritable_lvalue_p (lhs)))
{
decl = get_base_address (lhs);
if (DECL_P (decl))