From: Richard Guenther Date: Tue, 8 Apr 2008 09:53:52 +0000 (+0000) Subject: re PR tree-optimization/35834 (building libiberty fails in build2_stat for -mcpu... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=903b30032861bc93d95e0d12bf7e53804a62d240;p=gcc.git re PR tree-optimization/35834 (building libiberty fails in build2_stat for -mcpu=m32c as of r133403) 2008-04-08 Richard Guenther PR middle-end/35834 * tree-ssa-address.c (create_mem_ref): Use POINTER_PLUS_EXPR for adding index to base. From-SVN: r134090 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 05949d1777c..215cc83eb7a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-04-08 Richard Guenther + + PR middle-end/35834 + * tree-ssa-address.c (create_mem_ref): Use POINTER_PLUS_EXPR + for adding index to base. + 2008-04-08 Kai Tietz * config/i386/mingw32.h (ENABLE_EXECUTE_STACK): New. diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c index 5586c484f82..a5119d8c2bd 100644 --- a/gcc/tree-ssa-address.c +++ b/gcc/tree-ssa-address.c @@ -640,9 +640,9 @@ create_mem_ref (block_stmt_iterator *bsi, tree type, aff_tree *addr) { atype = TREE_TYPE (parts.base); parts.base = force_gimple_operand_bsi (bsi, - fold_build2 (PLUS_EXPR, atype, + fold_build2 (POINTER_PLUS_EXPR, atype, parts.base, - fold_convert (atype, parts.index)), + parts.index), true, NULL_TREE, true, BSI_SAME_STMT); } else