This is the mail archive of the gcc-patches@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]

PATCH new test


Here's a new test, it triggers a bug that I found with my `libr' project.

Carlo


*** /dev/null	Tue Jan  1 05:00:00 1980
--- gcc/testsuite/g++.old-deja/g++.other/virtual2.C	Sat Jul  4 16:18:34 1998
***************
*** 0 ****
--- 1,30 ----
+ // Build don't run:
+ // Causes "undefined reference to `A<D, C>::V virtual table'"
+ 
+ class V {
+ public:
+   virtual void v(void) { }
+ };
+ 
+ template <class T1, class T2>
+ class A : virtual public V {
+   typedef A<T2, T1> reversed_t;
+ };
+ 
+ template <class T>
+ class B {
+ public:
+   virtual void f(void)
+   {
+     typename T::reversed_t foo;
+   }
+ };
+ 
+ class C { }; 
+ class D { };
+ 
+ int main(void)
+ {
+   B<A<C, D> > bar;
+   return 0;
+ }


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