tree-nested.c (build_addr): Use build_fold_addr_expr.
authorRichard Guenther <rguenther@suse.de>
Thu, 4 Nov 2010 15:15:39 +0000 (15:15 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 4 Nov 2010 15:15:39 +0000 (15:15 +0000)
2010-11-04  Richard Guenther  <rguenther@suse.de>

* tree-nested.c (build_addr): Use build_fold_addr_expr.

From-SVN: r166314

gcc/ChangeLog
gcc/tree-nested.c

index 5ec536dcf34f77c627f5ed0c35c45eb860e3948d..996b6cb1d07f5383a63c5dcdfcb510f326c29cd0 100644 (file)
@@ -1,3 +1,7 @@
+2010-11-04  Richard Guenther  <rguenther@suse.de>
+
+       * tree-nested.c (build_addr): Use build_fold_addr_expr.
+
 2010-11-04  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/45991
index b811ec500dff75d70168be12ecaccf185d758ace..b7bf9ed76b921881381ab6db773d76952f29754d 100644 (file)
@@ -184,7 +184,7 @@ build_addr (tree exp, tree context)
      way the properties are for the ADDR_EXPR are computed properly.  */
   save_context = current_function_decl;
   current_function_decl = context;
-  retval = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (exp)), exp);
+  retval = build_fold_addr_expr (exp);
   current_function_decl = save_context;
   return retval;
 }