From d047a201981e027f1e55a5625de5881725ade231 Mon Sep 17 00:00:00 2001 From: Josh Conner Date: Fri, 9 Sep 2005 01:37:29 +0000 Subject: 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 --- gcc/ChangeLog | 6 ++++++ gcc/expr.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 17e6ee7..82562db 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-09-08 Josh Conner + + PR c++/23180 + * expr.c (expand_expr_addr_expr_1): Don't invoke + expand_simple_binop for EXPAND_INITIALIZER. + 2005-09-08 Richard Henderson PR debug/23190 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 { -- cgit v1.1