diff options
author | Richard Guenther <rguenther@suse.de> | 2009-03-27 23:00:22 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-03-27 23:00:22 +0000 |
commit | 628c189edb5aae6b4e1d416a92cbd0cb9f68586f (patch) | |
tree | 1d480e401b2ea473d780770388aea56b9a1a1c68 /gcc/tree-ssa.c | |
parent | 0387122d055068bd3f76eb14f3b5f2ee77f21aee (diff) | |
download | gcc-628c189edb5aae6b4e1d416a92cbd0cb9f68586f.zip gcc-628c189edb5aae6b4e1d416a92cbd0cb9f68586f.tar.gz gcc-628c189edb5aae6b4e1d416a92cbd0cb9f68586f.tar.bz2 |
gimplify.c (mark_addressable): Export.
2009-03-27 Richard Guenther <rguenther@suse.de>
* gimplify.c (mark_addressable): Export.
* tree-flow.h (mark_addressable): Declare.
* tree-ssa-loop-manip.c (create_iv): Mark the base addressable.
* tree-ssa.c (verify_phi_args): Verify that address taken
variables have TREE_ADDRESSABLE set.
2009-03-27 Richard Guenther <rguenther@suse.de>
* fold-const.c (build_fold_addr_expr_with_type_1): Rename back to ...
(build_fold_addr_expr_with_type): ... this. Remove in_fold handling.
Do not mark decls TREE_ADDRESSABLE.
(build_fold_addr_expr): Adjust.
(fold_addr_expr): Remove.
(fold_unary): Use build_fold_addr_expr.
(fold_comparison): Likewise.
(split_address_to_core_and_offset): Likewise.
* coverage.c (tree_coverage_counter_addr): Mark the array decl
TREE_ADDRESSABLE.
* gimplify.c (mark_addressable): Do not exclude RESULT_DECLs.
(gimplify_modify_expr_to_memcpy): Mark source and destination
addressable.
* omp-low.c (create_omp_child_function): Mark the object decl
TREE_ADDRESSABLE.
(lower_rec_input_clauses): Mark the var we take the address of
TREE_ADDRESSABLE.
(lower_omp_taskreg): Mark the sender decl TREE_ADDRESSABLE.
fortran/
* trans-array.c (gfc_conv_descriptor_data_addr): Use
gfc_build_addr_expr instead of build_fold_addr_expr.
(gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
gfc_trans_constant_array_constructor, gfc_conv_array_data,
gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
* trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
gfc_conv_function_val, gfc_conv_operator_assign,
gfc_conv_subref_array_arg, gfc_conv_function_call,
gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
* trans-intrinsic.c (gfc_conv_intrinsic_exponent,
gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
* trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
build_filepos, gfc_trans_inquire, gfc_trans_wait,
nml_get_addr_expr, transfer_namelist_element, build_dt,
gfc_trans_dt_end, transfer_array_component, transfer_expr,
transfer_array_desc, gfc_trans_transfer): Likewise.
* trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
* trans.c (gfc_build_addr_expr): Mark the base of the address
TREE_ADDRESSABLE.
From-SVN: r145142
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r-- | gcc/tree-ssa.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 8be2961..ee3df24 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -478,6 +478,21 @@ verify_phi_args (gimple phi, basic_block bb, basic_block *definition_block) op_p, phi, e->flags & EDGE_ABNORMAL, NULL); } + if (TREE_CODE (op) == ADDR_EXPR) + { + tree base = TREE_OPERAND (op, 0); + while (handled_component_p (base)) + base = TREE_OPERAND (base, 0); + if ((TREE_CODE (base) == VAR_DECL + || TREE_CODE (base) == PARM_DECL + || TREE_CODE (base) == RESULT_DECL) + && !TREE_ADDRESSABLE (base)) + { + error ("address taken, but ADDRESSABLE bit not set"); + err = true; + } + } + if (e->dest != bb) { error ("wrong edge %d->%d for PHI argument", |