diff options
author | Ian Lance Taylor <iant@google.com> | 2007-06-12 17:47:37 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2007-06-12 17:47:37 +0000 |
commit | 058dcc25b74ed4d171182311a12d27272844ee16 (patch) | |
tree | 10cbad9d2cb8a5b2d59d7944bd237eecb6610348 /gcc/print-tree.c | |
parent | 52a39a4c5db03b2e614f4bde1632e025348d1ebe (diff) | |
download | gcc-058dcc25b74ed4d171182311a12d27272844ee16.zip gcc-058dcc25b74ed4d171182311a12d27272844ee16.tar.gz gcc-058dcc25b74ed4d171182311a12d27272844ee16.tar.bz2 |
re PR libstdc++/29286 (placement new does not change the dynamic type as it should)
./: PR libstdc++/29286
* tree.def: Add CHANGE_DYNAMIC_TYPE_EXPR.
* tree.h (CHANGE_DYNAMIC_TYPE_NEW_TYPE): Define.
(CHANGE_DYNAMIC_TYPE_LOCATION): Define.
(DECL_NO_TBAA_P): Define.
(struct tree_decl_common): Add no_tbaa_flag field.
* tree-ssa-structalias.c (struct variable_info): Add
no_tbaa_pruning field.
(new_var_info): Initialize no_tbaa_pruning field.
(unify_nodes): Copy no_tbaa_pruning field.
(find_func_aliases): Handle CHANGE_DYNAMIC_TYPE_EXPR.
(dump_solution_for_var): Print no_tbaa_pruning flag.
(set_uids_in_ptset): Add no_tbaa_pruning parameter. Change all
callers.
(compute_tbaa_pruning): New static function.
(compute_points_to_sets): Remove CHANGE_DYNAMIC_TYPE_EXPR nodes.
Call compute_tbaa_pruning.
* tree-ssa-alias.c (may_alias_p): Test no_tbaa_flag for pointers.
* gimplify.c (gimplify_expr): Handle CHANGE_DYNAMIC_TYPE_EXPR.
* gimple-low.c (lower_stmt): Likewise.
* tree-gimple.c (is_gimple_stmt): Likewise.
* tree-ssa-operands.c (get_expr_operands): Likewise.
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
* tree-inline.c (estimate_num_insns_1): Likewise.
(copy_result_decl_to_var): Likewise.
* expr.c (expand_expr_real_1): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree-inline.c (copy_decl_to_var): Copy DECL_NO_TBAA_P flag.
* omp-low.c (omp_copy_decl_2): Likewise.
* print-tree.c (print_node): Print DECL_NO_TBAA_P flag.
* doc/c-tree.texi (Expression trees): Document
CHANGE_DYNAMIC_TYPE_EXPR.
cp/:
PR libstdc++/29286
* init.c (avoid_placement_new_aliasing): New static function.
(build_new_1): Call it.
testsuite/:
PR libstdc++/29286
* g++.dg/init/new16.C: New test.
* g++.dg/init/new17.C: New test.
* g++.dg/init/new18.C: New test.
* g++.dg/init/new19.C: New test.
Co-Authored-By: Daniel Berlin <dberlin@dberlin.org>
From-SVN: r125653
Diffstat (limited to 'gcc/print-tree.c')
-rw-r--r-- | gcc/print-tree.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/print-tree.c b/gcc/print-tree.c index 7eef3a3..7301f47 100644 --- a/gcc/print-tree.c +++ b/gcc/print-tree.c @@ -401,7 +401,9 @@ print_node (FILE *file, const char *prefix, tree node, int indent) if (DECL_VIRTUAL_P (node)) fputs (" virtual", file); if (DECL_PRESERVE_P (node)) - fputs (" preserve", file); + fputs (" preserve", file); + if (DECL_NO_TBAA_P (node)) + fputs (" no-tbaa", file); if (DECL_LANG_FLAG_0 (node)) fputs (" decl_0", file); if (DECL_LANG_FLAG_1 (node)) |