diff options
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/tree.c b/gcc/tree.c index 5ce8e902b33..293b29f8e6f 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -6215,8 +6215,11 @@ build_qualified_type (tree type, int type_quals) else if (TYPE_CANONICAL (type) != type) /* Build the underlying canonical type, since it is different from TYPE. */ - TYPE_CANONICAL (t) = build_qualified_type (TYPE_CANONICAL (type), - type_quals); + { + tree c = build_qualified_type (TYPE_CANONICAL (type), + type_quals); + TYPE_CANONICAL (t) = TYPE_CANONICAL (c); + } else /* T is its own canonical type. */ TYPE_CANONICAL (t) = t; |