* init.c (build_vec_delete_1): Fold COND_EXPRs.
From-SVN: r29796
This commit is contained in:
parent
749168094a
commit
37f88e3ea0
@ -1,3 +1,7 @@
|
||||
1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
||||
* init.c (build_vec_delete_1): Fold COND_EXPRs.
|
||||
|
||||
1999-10-03 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* cp-tree.def (VEC_INIT_EXPR): Remove.
|
||||
|
@ -2526,10 +2526,10 @@ build_vec_delete_1 (base, maxindex, type, auto_delete_vec, auto_delete,
|
||||
build_x_delete (base_tbd,
|
||||
2 | use_global_delete,
|
||||
virtual_size));
|
||||
body = build (COND_EXPR, void_type_node,
|
||||
build (BIT_AND_EXPR, integer_type_node,
|
||||
auto_delete, integer_one_node),
|
||||
body, integer_zero_node);
|
||||
body = fold (build (COND_EXPR, void_type_node,
|
||||
fold (build (BIT_AND_EXPR, integer_type_node,
|
||||
auto_delete, integer_one_node)),
|
||||
body, integer_zero_node));
|
||||
}
|
||||
else
|
||||
body = NULL_TREE;
|
||||
@ -2581,11 +2581,12 @@ build_vec_delete_1 (base, maxindex, type, auto_delete_vec, auto_delete,
|
||||
deallocate_expr = build_x_delete (base_tbd,
|
||||
2 | use_global_delete,
|
||||
virtual_size);
|
||||
if (auto_delete_vec != integer_one_node)
|
||||
deallocate_expr = build (COND_EXPR, void_type_node,
|
||||
build (BIT_AND_EXPR, integer_type_node,
|
||||
auto_delete_vec, integer_one_node),
|
||||
deallocate_expr, integer_zero_node);
|
||||
deallocate_expr = fold (build (COND_EXPR, void_type_node,
|
||||
fold (build (BIT_AND_EXPR,
|
||||
integer_type_node,
|
||||
auto_delete_vec,
|
||||
integer_one_node)),
|
||||
deallocate_expr, integer_zero_node));
|
||||
}
|
||||
|
||||
if (loop && deallocate_expr != integer_zero_node)
|
||||
@ -2598,9 +2599,10 @@ build_vec_delete_1 (base, maxindex, type, auto_delete_vec, auto_delete,
|
||||
body = loop;
|
||||
|
||||
/* Outermost wrapper: If pointer is null, punt. */
|
||||
body = build (COND_EXPR, void_type_node,
|
||||
build (NE_EXPR, boolean_type_node, base, integer_zero_node),
|
||||
body, integer_zero_node);
|
||||
body = fold (build (COND_EXPR, void_type_node,
|
||||
fold (build (NE_EXPR, boolean_type_node, base,
|
||||
integer_zero_node)),
|
||||
body, integer_zero_node));
|
||||
body = build1 (NOP_EXPR, void_type_node, body);
|
||||
|
||||
if (controller)
|
||||
|
Loading…
Reference in New Issue
Block a user