https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70778

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gcc dot gnu.org
      Known to work|                            |4.5.3
            Summary|internal compiler error: in |[5/6/7 regression] internal
                   |tsubst, at cp/pt.c:12158    |compiler error: in tsubst,
                   |                            |at cp/pt.c:12158

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
The same problem can be reproduced with typedefs instead of template aliases.

The likely root cause of the ICE is r166179 committed into 4.6.0 (r166174
compiles the program successfully, r166181 fails but it looks benign).

r166179 | dodji | 2010-11-02 08:44:19 -0400 (Tue, 02 Nov 2010) | 83 lines

Restore canonical type comparison for dependent type(def)s

This patch restores canonical type comparison for dependent types and
then dependent typedefs. After this patch, two template type
parameters T are equal if they have the same index, level, *and*
number of sibling parameters. The novelty is to take in account the
number of sibling parameters.

To do this we first build the template parameters w/o taking in
account their number of siblings. When we know the number of template
parameters we fix up each template parameter with the number of
slibling parameters and we build the appropriate canonical types
accordingly. The patch fixes the fallouts deemed necessary.

This fixes PR c++/45606 but actually fixes all the previous bugs
related to dependent typedef comparison we had since we started to
properly representing dependent typedefs.

Reply via email to