aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorJosh Conner <jconner@apple.com>2005-09-09 01:37:29 +0000
committerJosh Conner <jconner@gcc.gnu.org>2005-09-09 01:37:29 +0000
commitd047a201981e027f1e55a5625de5881725ade231 (patch)
tree71a3817dd6245660974808b4df9d8fa3f76bd31e /gcc/expr.c
parentdb5f8b93fe442457a30fa5289ae9b336f2cb1eda (diff)
downloadgcc-d047a201981e027f1e55a5625de5881725ade231.zip
gcc-d047a201981e027f1e55a5625de5881725ade231.tar.gz
gcc-d047a201981e027f1e55a5625de5881725ade231.tar.bz2
re PR c++/23180 (Segfault on const initializer with bogus pointer arithmetics)
PR c++/23180 * expr.c (expand_expr_addr_expr_1): Don't invoke expand_simple_binop for EXPAND_INITIALIZER. From-SVN: r104069
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index ff6adec..50886bc 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6338,7 +6338,7 @@ expand_expr_addr_expr_1 (tree exp, rtx target, enum machine_mode tmode,
result = convert_memory_address (tmode, result);
tmp = convert_memory_address (tmode, tmp);
- if (modifier == EXPAND_SUM)
+ if (modifier == EXPAND_SUM || modifier == EXPAND_INITIALIZER)
result = gen_rtx_PLUS (tmode, result, tmp);
else
{