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]

bug57: Internal compiler error


/* Typing "g++ bug57.cc -o bug57" on RedHat 6.1 running egcs-1.1.2 produces:
bug57.cc: In method `B<int>::B<int>(int, int)':
bug57.cc:24:   instantiated from here
bug57.cc:18: Internal compiler error.
bug57.cc:18: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
bug57.cc:18: See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.
*/

template <class T1, class T2>
struct A {
     T1 v1;
     T2 v2;
     A (T1 x, T2 y) : v1 (x), v2 (y) {}
};

template <class T>
struct B : public A<T,T> {
     B (T x, T y) : A (x, y) {}
     T first () {return A::v1;}
};

int main ()
{
     B<int> b (7, 9);
     b.first();
     return 0;
}

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