diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-27 06:38:52 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-27 06:38:52 +0000 |
commit | 2db0b3527cdd32dc1bb494d18508dc4320a19f69 (patch) | |
tree | c7c3eab8c786f9630cce495ae3913a2d458e808d /gcc/tree-ssa.c | |
parent | d0986467397b442d06f2d63557bbc3548919d783 (diff) | |
download | gcc-2db0b3527cdd32dc1bb494d18508dc4320a19f69.tar.gz |
2009-10-27 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 153581
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@153582 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r-- | gcc/tree-ssa.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 9858b109d03..b646ded59e7 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -1192,6 +1192,11 @@ useless_type_conversion_p (tree outer_type, tree inner_type) if (POINTER_TYPE_P (inner_type) && POINTER_TYPE_P (outer_type)) { + /* Do not lose casts between pointers to different address spaces. */ + if (TYPE_ADDR_SPACE (TREE_TYPE (outer_type)) + != TYPE_ADDR_SPACE (TREE_TYPE (inner_type))) + return false; + /* If the outer type is (void *) or a pointer to an incomplete record type or a pointer to an unprototyped function, then the conversion is not necessary. */ |