aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2002-08-20 18:01:14 -0700
committerDevang Patel <dpatel@gcc.gnu.org>2002-08-20 18:01:14 -0700
commit92b5aacd3300c2154c62528c6a8914a749c7a663 (patch)
tree487ede87395d20bb36a115837b7d1c9b31422c63 /gcc/tree.c
parenta5aa74218fa95fb01fce7d4129f66912056c628d (diff)
downloadgcc-92b5aacd3300c2154c62528c6a8914a749c7a663.zip
gcc-92b5aacd3300c2154c62528c6a8914a749c7a663.tar.gz
gcc-92b5aacd3300c2154c62528c6a8914a749c7a663.tar.bz2
tree.c (get_qualified_type): Add TYPE_CONTEXT check.
2002-08-20 Devang Patel <dpatel@apple.com> * tree.c (get_qualified_type): Add TYPE_CONTEXT check. testsuite: * objc.dg/proto-hier-2.m: New test. From-SVN: r56475
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 9e725db..2c56b95 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -2832,7 +2832,8 @@ get_qualified_type (type, type_quals)
like the one we need to have. If so, use that existing one. We must
preserve the TYPE_NAME, since there is code that depends on this. */
for (t = TYPE_MAIN_VARIANT (type); t; t = TYPE_NEXT_VARIANT (t))
- if (TYPE_QUALS (t) == type_quals && TYPE_NAME (t) == TYPE_NAME (type))
+ if (TYPE_QUALS (t) == type_quals && TYPE_NAME (t) == TYPE_NAME (type)
+ && TYPE_CONTEXT (t) == TYPE_CONTEXT (type))
return t;
return NULL_TREE;