ICE with nested template as template argument

pollux duret_g@epita.fr
Tue Jun 22 06:23:00 GMT 1999


Hi there,

I get an ICE when I use an a template-name nested in a class
as parameter of a template.

I tried the following piece of code on both egcs 1.1.2 and the 
`gcc-2.95 19990615 (prerelease)' shapshoot :

 ====
  struct A {
    template< class T >
    struct B {
    };
  };

  template< template< class U > class V >
  struct C 
    {
    };

  int main()
  {
    A::B<int>   b;  // ok 
    C< A::B >  c;   // -> ICE
  }
 ====

The compilation leads to 
  test2.cc: In function `int main()':
  test2.cc:15: Internal compiler error 980422.
  test2.cc:15: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
  test2.cc:15: See <URL: http://egcs.cygnus.com/faq.html#bugreport > for details.

Notice that if I replace the first line by `namespace A {' the code
compile fine.

-- 
                                Alexandre 'Pollux' Duret-Lutz
          '''''            guillaume-alexandre.duret@epita.fr
          (o o)                 http://www.epita.fr/~duret_g/
+---ooO----(_)----Ooo-----------------------------------------+










More information about the Gcc-bugs mailing list