From db736800338fdbd22559d15dc7f781cbb30a8b44 Mon Sep 17 00:00:00 2001
From: Richard Guenther <rguenther@suse.de>
Date: Tue, 3 Jun 2008 10:55:00 +0000
Subject: [PATCH] tree-ssa-structalias.c (find_func_aliases): Add constraints
 for the lhs of calls if the return type contains pointers.

2008-06-03  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-structalias.c (find_func_aliases): Add constraints
	for the lhs of calls if the return type contains pointers.

From-SVN: r136315
---
 gcc/ChangeLog              | 5 +++++
 gcc/tree-ssa-structalias.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7f756464b054..b42de54c2c47 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2008-06-03  Richard Guenther  <rguenther@suse.de>
+
+	* tree-ssa-structalias.c (find_func_aliases): Add constraints
+	for the lhs of calls if the return type contains pointers.
+
 2008-06-03  Kai Tietz  <kai.tietz@onevision.com>
 
 	* doc/tm.texi (OVERRIDE_ABI_FORMAT): New.
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index b6d73ce66f4f..0e422146f9b3 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -3726,7 +3726,7 @@ find_func_aliases (tree origt)
 	  if (TREE_CODE (t) == GIMPLE_MODIFY_STMT)
 	    {
 	      handle_rhs_call (GIMPLE_STMT_OPERAND (t, 1));
-	      if (POINTER_TYPE_P (TREE_TYPE (GIMPLE_STMT_OPERAND (t, 1))))
+	      if (could_have_pointers (GIMPLE_STMT_OPERAND (t, 1)))
 		handle_lhs_call (GIMPLE_STMT_OPERAND (t, 0));
 	    }
 	  else
-- 
GitLab