Commit 60c90ad1 by Roger Sayle Committed by Roger Sayle

re PR middle-end/14531 (pessimise code, loose constantness)


	PR middle-end/14531
	* class.c (build_base_path): Call fold whilst building the NULL
	pointer check expression trees.

From-SVN: r80877
parent 423c1189
2004-04-19 Roger Sayle <roger@eyesopen.com>
PR middle-end/14531
* class.c (build_base_path): Call fold whilst building the NULL
pointer check expression trees.
2004-04-15 Bryce McKinlay <mckinlay@redhat.com> 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
* init.c (build_new_1): Don't use type size argument for Java * init.c (build_new_1): Don't use type size argument for Java
......
...@@ -290,7 +290,8 @@ build_base_path (enum tree_code code, ...@@ -290,7 +290,8 @@ build_base_path (enum tree_code code,
expr = save_expr (expr); expr = save_expr (expr);
if (want_pointer && !nonnull) if (want_pointer && !nonnull)
null_test = build (EQ_EXPR, boolean_type_node, expr, integer_zero_node); null_test = fold (build2 (NE_EXPR, boolean_type_node,
expr, integer_zero_node));
offset = BINFO_OFFSET (binfo); offset = BINFO_OFFSET (binfo);
...@@ -365,9 +366,9 @@ build_base_path (enum tree_code code, ...@@ -365,9 +366,9 @@ build_base_path (enum tree_code code,
expr = build_indirect_ref (expr, NULL); expr = build_indirect_ref (expr, NULL);
if (null_test) if (null_test)
expr = build (COND_EXPR, target_type, null_test, expr = fold (build3 (COND_EXPR, target_type, null_test, expr,
build1 (NOP_EXPR, target_type, integer_zero_node), fold (build1 (NOP_EXPR, target_type,
expr); integer_zero_node))));
return expr; return expr;
} }
......
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