re PR c++/23180 (Segfault on const initializer with bogus pointer arithmetics)
authorJosh Conner <jconner@apple.com>
Fri, 9 Sep 2005 01:37:29 +0000 (01:37 +0000)
committerJosh Conner <jconner@gcc.gnu.org>
Fri, 9 Sep 2005 01:37:29 +0000 (01:37 +0000)
        PR c++/23180
        * expr.c (expand_expr_addr_expr_1): Don't invoke
        expand_simple_binop for EXPAND_INITIALIZER.

From-SVN: r104069

gcc/ChangeLog
gcc/expr.c

index 17e6ee7b111554e66c2970808ee9cd4ff1360df0..82562db19c91051ac4f0a55555a65a848b5849f4 100644 (file)
@@ -1,3 +1,9 @@
+2005-09-08  Josh Conner  <jconner@apple.com>
+
+       PR c++/23180
+       * expr.c (expand_expr_addr_expr_1): Don't invoke
+       expand_simple_binop for EXPAND_INITIALIZER.
+
 2005-09-08  Richard Henderson  <rth@redhat.com>
 
        PR debug/23190
index ff6adec6855435756b57245a2866be8077cae37b..50886bcc8cdc02069d3a183258447579da5f6de5 100644 (file)
@@ -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
        {