diff options
author | Ian Lance Taylor <iant@google.com> | 2008-01-28 19:43:51 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2008-01-28 19:43:51 +0000 |
commit | e8b0eabccd680e52131e674430a3b14416abf233 (patch) | |
tree | 9ec8e655c3e072818b1caf8e5d6dbde0e71be4dd /gcc/tree-ssa-copyrename.c | |
parent | bc81405676677a2216476eaebc34d23adf855f83 (diff) | |
download | gcc-e8b0eabccd680e52131e674430a3b14416abf233.zip gcc-e8b0eabccd680e52131e674430a3b14416abf233.tar.gz gcc-e8b0eabccd680e52131e674430a3b14416abf233.tar.bz2 |
re PR c++/34862 (operator new placement variant with reference arg not accepted by g++ 4.3)
PR c++/34862
PR c++/33407
* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Don't
coalesce pointers if they have different DECL_NO_TBAA_P values.
* tree-ssa-copy.c (may_propagate_copy): Don't propagate copies
between variables with different DECL_NO_TBAA_P values.
From-SVN: r131916
Diffstat (limited to 'gcc/tree-ssa-copyrename.c')
-rw-r--r-- | gcc/tree-ssa-copyrename.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/tree-ssa-copyrename.c b/gcc/tree-ssa-copyrename.c index c5526f6..d701d43 100644 --- a/gcc/tree-ssa-copyrename.c +++ b/gcc/tree-ssa-copyrename.c @@ -1,5 +1,5 @@ /* Rename SSA copies. - Copyright (C) 2004, 2007 Free Software Foundation, Inc. + Copyright (C) 2004, 2006, 2007, 2008 Free Software Foundation, Inc. Contributed by Andrew MacLeod <amacleod@redhat.com> This file is part of GCC. @@ -249,8 +249,11 @@ copy_rename_partition_coalesce (var_map map, tree var1, tree var2, FILE *debug) /* Don't coalesce if the aliasing sets of the types are different. */ if (POINTER_TYPE_P (TREE_TYPE (root1)) && POINTER_TYPE_P (TREE_TYPE (root2)) - && get_alias_set (TREE_TYPE (TREE_TYPE (root1))) - != get_alias_set (TREE_TYPE (TREE_TYPE (root2)))) + && ((get_alias_set (TREE_TYPE (TREE_TYPE (root1))) + != get_alias_set (TREE_TYPE (TREE_TYPE (root2)))) + || ((DECL_P (root1) && !MTAG_P (root1)) + && (DECL_P (root2) && !MTAG_P (root2)) + && DECL_NO_TBAA_P (root1) != DECL_NO_TBAA_P (root2)))) { if (debug) fprintf (debug, " : 2 different aliasing sets. No coalesce.\n"); |