diff options
Diffstat (limited to 'gcc/tree.c')
| -rw-r--r-- | gcc/tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c index 9e725db7958..2c56b95f94e 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; |

