re PR tree-optimization/35834 (building libiberty fails in build2_stat for -mcpu...
authorRichard Guenther <rguenther@suse.de>
Tue, 8 Apr 2008 09:53:52 +0000 (09:53 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 8 Apr 2008 09:53:52 +0000 (09:53 +0000)
2008-04-08  Richard Guenther  <rguenther@suse.de>

PR middle-end/35834
* tree-ssa-address.c (create_mem_ref): Use POINTER_PLUS_EXPR
for adding index to base.

From-SVN: r134090

gcc/ChangeLog
gcc/tree-ssa-address.c

index 05949d1777c7a1772523f9e0e2a9c4d7774c2198..215cc83eb7a7011782ed5e1fc9fb06c3292f54d8 100644 (file)
@@ -1,3 +1,9 @@
+2008-04-08  Richard Guenther  <rguenther@suse.de>
+
+       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  <kai.tietz@onevision.com>
 
        * config/i386/mingw32.h (ENABLE_EXECUTE_STACK): New.
index 5586c484f82825f8e265ecb3294b39829cd4e7b3..a5119d8c2bde5d53c854aa227c890554a62d77c9 100644 (file)
@@ -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