summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/20011113-1.c
diff options
context:
space:
mode:
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-14 02:16:33 +0000
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-14 02:16:33 +0000
commitcc84ca71c9e7616237b3f6ded74a246c5f12bd99 (patch)
tree2d5f3cafc7c251c04b6d58417c531a4995917206 /gcc/testsuite/gcc.dg/20011113-1.c
parenta689a61a730eb53a53223d1d10fe69f7215a5233 (diff)
downloadgcc-cc84ca71c9e7616237b3f6ded74a246c5f12bd99.tar.gz
* 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. * gcc.dg/20011113-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47984 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/20011113-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/20011113-1.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/20011113-1.c b/gcc/testsuite/gcc.dg/20011113-1.c
new file mode 100644
index 00000000000..3f40160ed99
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/20011113-1.c
@@ -0,0 +1,16 @@
+/* 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}
+};