diff options
author | Richard Biener <rguenth@gcc.gnu.org> | 2010-04-30 18:52:44 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-04-30 18:52:44 +0000 |
commit | 8267740011a51a553aadedc6b949bddc40770ccc (patch) | |
tree | 135eab53c53a261c8ca9c5b95389db6efb6fb6ce /gcc/tree-ssa-structalias.c | |
parent | cd71491e1cc5df228efbc518502cdc373c2d7585 (diff) | |
download | gcc-8267740011a51a553aadedc6b949bddc40770ccc.zip gcc-8267740011a51a553aadedc6b949bddc40770ccc.tar.gz gcc-8267740011a51a553aadedc6b949bddc40770ccc.tar.bz2 |
re PR tree-optimization/43879 (-fipa-pta causes various miscompilations)
2010-04-30 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43879
* tree-ssa-structalias.c (type_could_have_pointers): Functions
can have pointers.
From-SVN: r158945
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 28bb0bb..fce39de 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -2940,6 +2940,12 @@ type_could_have_pointers (tree type) if (TREE_CODE (type) == ARRAY_TYPE) return type_could_have_pointers (TREE_TYPE (type)); + /* A function or method can consume pointers. + ??? We could be more precise here. */ + if (TREE_CODE (type) == FUNCTION_TYPE + || TREE_CODE (type) == METHOD_TYPE) + return true; + return AGGREGATE_TYPE_P (type); } |