+2010-11-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/45670
+ * expr.c (expand_expr_real_1) <case MEM_REF>: Use EXPAND_SUM
+ instead of EXPAND_NORMAL for base expansion.
+
2010-11-05 Uros Bizjak <ubizjak@gmail.com>
* config.gcc: Support --with-fpmath=avx for x86.
}
align = MAX (TYPE_ALIGN (TREE_TYPE (exp)),
get_object_alignment (exp, BIGGEST_ALIGNMENT));
- op0 = expand_expr (base, NULL_RTX, VOIDmode, EXPAND_NORMAL);
+ op0 = expand_expr (base, NULL_RTX, VOIDmode, EXPAND_SUM);
op0 = convert_memory_address_addr_space (address_mode, op0, as);
if (!integer_zerop (TREE_OPERAND (exp, 1)))
{
+2010-11-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/45670
+ * gcc.target/i386/pr45670.c: New test.
+
2010-11-05 Janus Weil <janus@gcc.gnu.org>
PR fortran/45451
--- /dev/null
+/* PR target/45670 */
+/* { dg-do compile } */
+/* { dg-options "-Os -mtune=generic" } */
+
+struct S
+{
+ float *buf;
+ int size;
+};
+
+void
+foo (struct S *s)
+{
+ int i;
+ for (i = 0; i < s->size; ++i)
+ s->buf[i] = 0;
+}
+
+/* Ensure we don't generate
+ lea (reg1,4),reg2; add (reg3),reg2; movl $0, (reg2)
+ instead of smaller
+ mov (reg3),reg2; movl $0, (reg2,reg1,4) */
+/* { dg-final { scan-assembler-not "lea\[lq\]" } } */