+2010-11-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/45991
+ * gimplify.c (force_gimple_operand_1): Use the provded test
+ function in the initial test.
+
2010-11-04 Jeff Law <law@redhat.com>
* ira.c (validate_equiv_mem): Remove code to avoid invalidation
*stmts = NULL;
- if (is_gimple_val (expr))
+ /* gimple_test_f might be more strict than is_gimple_val, make
+ sure we pass both. Just checking gimple_test_f doesn't work
+ because most gimple predicates do not work recursively. */
+ if (is_gimple_val (expr)
+ && (*gimple_test_f) (expr))
return expr;
push_gimplify_context (&gctx);
2010-11-04 Richard Guenther <rguenther@suse.de>
+ PR tree-optimization/45991
+ * gcc.dg/pr45991.c: New testcase.
+
+2010-11-04 Richard Guenther <rguenther@suse.de>
+
PR tree-optimization/46154
* g++.dg/torture/pr46154.C: New testcase.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O -fstrict-overflow" } */
+
+struct S
+{
+ int i;
+};
+
+char A[64];
+
+void foo (char **dst, int i)
+{
+ char *p = A + 16;
+ while (i--)
+ {
+ int b = ((struct S *) (&p[i * 16 + 4]))->i;
+ char *c = A + i * 16;
+ dst[i] = c + b;
+ }
+}