Commit d98e8686 by Eric Botcazou Committed by Eric Botcazou

fold-const.c (build_fold_addr_expr_with_type): Take the address of the operand…

fold-const.c (build_fold_addr_expr_with_type): Take the address of the operand of VIEW_CONVERT_EXPR.

	* fold-const.c (build_fold_addr_expr_with_type): Take the address of
	the operand of VIEW_CONVERT_EXPR.

From-SVN: r147739
parent 37c50435
2009-05-20 Eric Botcazou <ebotcazou@adacore.com>
* fold-const.c (build_fold_addr_expr_with_type): Take the address of
the operand of VIEW_CONVERT_EXPR.
2009-05-20 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/driver-i386.c (host_detect_local_cpu): Check
......
......@@ -7999,6 +7999,13 @@ build_fold_addr_expr_with_type (tree t, tree ptrtype)
if (TREE_TYPE (t) != ptrtype)
t = build1 (NOP_EXPR, ptrtype, t);
}
else if (TREE_CODE (t) == VIEW_CONVERT_EXPR)
{
t = build_fold_addr_expr (TREE_OPERAND (t, 0));
if (TREE_TYPE (t) != ptrtype)
t = fold_convert (ptrtype, t);
}
else
t = build1 (ADDR_EXPR, ptrtype, t);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment