flag_force_addr for modifier != EXPAND_CONST_ADDRESS,
modifier != EXPAND_INITIALIZER and modifier != EXPAND_SUM.
* gcc.dg/
20011113-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47984
138bc75d-0d04-0410-961f-
82ee72b054a4
+2001-12-13 Hans-Peter Nilsson <hp@axis.com>
+
+ * expr.c (expand_expr, case ADDR_EXPR): Don't honor
+ flag_force_addr for modifier != EXPAND_CONST_ADDRESS,
+ modifier != EXPAND_INITIALIZER and modifier != EXPAND_SUM.
+
Thu Dec 13 20:30:08 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* expr.c (copy_blkmode_from_reg): Add missing braces to eliminate
op0 = force_operand (XEXP (op0, 0), target);
}
- if (flag_force_addr && GET_CODE (op0) != REG)
+ if (flag_force_addr
+ && GET_CODE (op0) != REG
+ && modifier != EXPAND_CONST_ADDRESS
+ && modifier != EXPAND_INITIALIZER
+ && modifier != EXPAND_SUM)
op0 = force_reg (Pmode, op0);
if (GET_CODE (op0) == REG
+2001-12-13 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.dg/20011113-1.c: New test.
+
2001-12-13 John David Anglin <dave@hiauly1.hia.nrc.ca>
* g++.old-deja/g++.jason/template31.C: Remove templates for classes
--- /dev/null
+/* Copyright (C) 2001 Free Software Foundation.
+ by Hans-Peter Nilsson <hp@axis.com> */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -fforce-addr" } */
+
+const char foo[] = "fum";
+const struct fi
+{
+ const char *const in;
+ const char *const out;
+ const int flags;
+} fie[] = {
+ {"nw", " new", 0},
+ {"dl", foo, 1}
+};