Commit e8b0eabc by Ian Lance Taylor Committed by Ian Lance Taylor

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
parent bc814056
2008-01-28 Ian Lance Taylor <iant@google.com>
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.
2008-01-28 Nathan Froyd <froydnj@codesourcery.com> 2008-01-28 Nathan Froyd <froydnj@codesourcery.com>
PR 31535 PR 31535
......
/* Copy propagation and SSA_NAME replacement support routines. /* Copy propagation and SSA_NAME replacement support routines.
Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -143,6 +143,11 @@ may_propagate_copy (tree dest, tree orig) ...@@ -143,6 +143,11 @@ may_propagate_copy (tree dest, tree orig)
else if (get_alias_set (TREE_TYPE (type_d)) != else if (get_alias_set (TREE_TYPE (type_d)) !=
get_alias_set (TREE_TYPE (type_o))) get_alias_set (TREE_TYPE (type_o)))
return false; return false;
else if (!MTAG_P (SSA_NAME_VAR (dest))
&& !MTAG_P (SSA_NAME_VAR (orig))
&& (DECL_NO_TBAA_P (SSA_NAME_VAR (dest))
!= DECL_NO_TBAA_P (SSA_NAME_VAR (orig))))
return false;
/* Also verify flow-sensitive information is compatible. */ /* Also verify flow-sensitive information is compatible. */
if (SSA_NAME_PTR_INFO (orig) && SSA_NAME_PTR_INFO (dest)) if (SSA_NAME_PTR_INFO (orig) && SSA_NAME_PTR_INFO (dest))
......
/* Rename SSA copies. /* 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> Contributed by Andrew MacLeod <amacleod@redhat.com>
This file is part of GCC. This file is part of GCC.
...@@ -249,8 +249,11 @@ copy_rename_partition_coalesce (var_map map, tree var1, tree var2, FILE *debug) ...@@ -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. */ /* Don't coalesce if the aliasing sets of the types are different. */
if (POINTER_TYPE_P (TREE_TYPE (root1)) if (POINTER_TYPE_P (TREE_TYPE (root1))
&& POINTER_TYPE_P (TREE_TYPE (root2)) && POINTER_TYPE_P (TREE_TYPE (root2))
&& get_alias_set (TREE_TYPE (TREE_TYPE (root1))) && ((get_alias_set (TREE_TYPE (TREE_TYPE (root1)))
!= get_alias_set (TREE_TYPE (TREE_TYPE (root2)))) != 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) if (debug)
fprintf (debug, " : 2 different aliasing sets. No coalesce.\n"); fprintf (debug, " : 2 different aliasing sets. No coalesce.\n");
......
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