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

2010-11-04  Richard Guenther  <rguenther@suse.de>

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

From-SVN: r166314
This commit is contained in:
Richard Guenther 2010-11-04 15:15:39 +00:00 committed by Richard Biener
parent ab040cea8c
commit 0a58274382
2 changed files with 5 additions and 1 deletions

View 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

View 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;
}