On Mon, Dec 12, 2016 at 11:12 AM, Nathan Sidwell <nat...@acm.org> wrote: > This patch fixes an ICE in a checking build where structural_comptypes > disagrees with TYPE_CANONICAL. > > An (implicit) template alias has a different TYPE_TI_TEMPLATE to the thing > its aliasing. That make structural comparison think it's different. In the > testcase we end up thinking 'Loc' refers to a different template than > 'Traits<T>' > > Solved by breaking TYPE_TEMPLATE_INFO into an underlying helper that doesn't > deal with type aliases. While there, I noticed TYPE_TEMPLATE_INFO was doing > more work than necessary because it checked twice whether DECL_LANG_SPECIFIC > (TYPE_NAME (NODE)) was non-null. There's no need to check it again in the > branch we can only get to when it's non-null. I also removed some > unnecessary parens. > > ok?
Note this is originally PR 69481 which I found a year or so ago. I was trying to debug this and try to understand why typedef and using would produce different result but I never could figure it out. I also could not figure out why they went down a different path either and not treated as the same. Thanks, Andrew > > nathan > -- > Nathan Sidwell