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]
Other format: [Raw text]

[C++ Patch] Add PR 31027 Testcase


Hi,

this test now certainly passes in mainline and 4_2-branch. I propose to
add it to both branches and remove the 4.2 / 4.3 regression markers.

Tested x86_64-linux, ok?

Paolo.

///////////////////
2007-07-11  Paolo Carlini  <pcarlini@suse.de>

	PR c++/31027
	* g++.dg/inherit/virtual4.C: New.
Index: g++.dg/inherit/virtual4.C
===================================================================
*** g++.dg/inherit/virtual4.C	(revision 0)
--- g++.dg/inherit/virtual4.C	(revision 0)
***************
*** 0 ****
--- 1,24 ----
+ // PR c++/31027
+ 
+ struct A {};
+ 
+ template<typename T>
+ struct C: virtual A {
+   C() {}
+   template<typename T_OTHER> C(const C<T_OTHER>&) {}
+   C func(const class C<long>&) const;
+   operator bool() const;
+ };
+ 
+ template<typename T>
+ struct D: C<T> {
+   void func2() {
+     C<int>a;
+     a.func(a);
+   }
+ };
+ 
+ void func3() {
+   C<int>a;
+   a.func(a);
+ }

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