On Fri, Aug 08, 2014 at 02:17:04PM -0400, Jason Merrill wrote:
> --- a/gcc/cp/pt.c
> +++ b/gcc/cp/pt.c
> @@ -7813,6 +7813,12 @@ lookup_template_class_1 (tree d1, tree arglist, tree 
> in_decl, tree context,
>           }
>       }
>  
> +      if (OVERLOAD_TYPE_P (t)
> +       && !DECL_ALIAS_TEMPLATE_P (gen_tmpl))
> +     if (tree attributes
> +         = lookup_attribute ("abi_tag", TYPE_ATTRIBUTES (template_type)))
> +       TYPE_ATTRIBUTES (t) = attributes;

Doesn't this copy the first abi_tag attribute and all following attributes
in the chain?  If other attributes are possible at this point, shouldn't the
above be done only if TYPE_CHAIN (attributes) == NULL_TREE and otherwise
(perhaps in a loop) copy each abi_tag attribute individually?

        Jakub

Reply via email to