On Wed, Jun 19, 2024 at 09:26:00AM +0200, Martin Uecker wrote:
> Ok. Then should it, instead of
> 
> TYPE_CANONICAL (x)
>         = build_qualified_type (TYPE_CANONICAL (t), TYPE_QUALS (x));
> 
> be
> 
> tree c = build_qualified_type (TYPE_CANONICAL (t), TYPE_QUALS (x));
> TYPE_CANONICAL (x) = TREE_CANONICAL (c);
> 
> in the patch below?

I think you are right, that matches what build_qualified_type does:
      else if (TYPE_CANONICAL (type) != type)
        /* Build the underlying canonical type, since it is different
           from TYPE. */
        {
          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;

        Jakub

Reply via email to