diff options
author | Devang Patel <dpatel@apple.com> | 2002-08-20 18:01:14 -0700 |
---|---|---|
committer | Devang Patel <dpatel@gcc.gnu.org> | 2002-08-20 18:01:14 -0700 |
commit | 92b5aacd3300c2154c62528c6a8914a749c7a663 (patch) | |
tree | 487ede87395d20bb36a115837b7d1c9b31422c63 /gcc/tree.c | |
parent | a5aa74218fa95fb01fce7d4129f66912056c628d (diff) | |
download | gcc-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |