This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11922] [3.3/3.4 regression] ICE on type_unification_real


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11922


reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-invalid-code,
                   |                            |monitored
           Priority|P2                          |P1
   Last reconfirmed|0000-00-00 00:00:00         |2003-08-15 13:43:35
               date|                            |
            Summary|ICE on type_unification_real|[3.3/3.4 regression] ICE on
                   |                            |type_unification_real


------- Additional Comments From reichelt at gcc dot gnu dot org  2003-08-15 13:43 -------
Reduced testcase:

=======================================================
struct A
{
    template <bool> struct B;
};

template <> struct A::B<false> {};

template <typename T> void foo()
{
    T::template B<false>(); // missing typename
}

void bar()
{
    foo<A>();
}
=======================================================

With 3.3 branch I get:

test.cc: In function `void foo() [with T = A]':
test.cc:15:   instantiated from here
test.cc:10: internal compiler error: in type_unification_real, at cp/pt.c:8275
Please submit a full bug report, [etc.]

With mainline I get:

test.cc: In function `void foo() [with T = A]':
test.cc:15:   instantiated from here
test.cc:10: internal compiler error: in get_first_fn, at cp/tree.c:952
Please submit a full bug report, [etc.]

As Aristarkh already pointed out there's a typename missing.
Thus, we have an ICE on invalid code.

With gcc 3.2.3 I get a normal error message:

test.cc: In function `void foo() [with T = A]':
test.cc:15:   instantiated from here
test.cc:10: no method `A::B<false>'

Thus, we have a regression.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]