URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/trunk/gnu-src/gcc-4.2.2/gcc/testsuite/g++.dg/inherit
- from Rev 149 to Rev 154
- ↔ Reverse comparison
Rev 149 → Rev 154
/virtual2.C
0,0 → 1,13
//PR c++/29022 |
|
struct A |
{ |
operator int(); |
}; |
|
struct B : virtual A, A<0> {}; // { dg-error "token" } |
|
int foo(B &b) |
{ |
return b; // { dg-error "cannot convert" } |
} |
virtual2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: union1.C
===================================================================
--- union1.C (nonexistent)
+++ union1.C (revision 154)
@@ -0,0 +1,14 @@
+// PR c++/15507
+
+struct A {
+ // empty
+};
+
+struct B : A {
+ int b;
+};
+
+union U {
+ A a;
+ B b;
+};
union1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: virtual4.C
===================================================================
--- virtual4.C (nonexistent)
+++ virtual4.C (revision 154)
@@ -0,0 +1,24 @@
+// PR c++/31027
+
+struct A {};
+
+template
+struct C: virtual A {
+ C() {}
+ template C(const C&) {}
+ C func(const class C&) const;
+ operator bool() const;
+};
+
+template
+struct D: C {
+ void func2() {
+ Ca;
+ a.func(a);
+ }
+};
+
+void func3() {
+ Ca;
+ a.func(a);
+}
virtual4.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: thunk1.C
===================================================================
--- thunk1.C (nonexistent)
+++ thunk1.C (revision 154)
@@ -0,0 +1,41 @@
+// { dg-do run { target i?86-*-* x86_64-*-* s390*-*-* alpha*-*-* ia64-*-* sparc*-*-* } }
+
+#include
+
+extern "C" void abort ();
+
+struct A {
+ virtual void f (int, ...) {}
+ int i;
+};
+
+struct B : virtual public A {
+};
+
+struct C : public B {
+ C ();
+ virtual void f (int, ...);
+};
+
+extern C* cp;
+
+C::C () { cp = this; }
+
+void C::f (int i, ...) {
+ if (this != cp)
+ abort ();
+ va_list ap;
+ if (i != 3)
+ abort ();
+ va_start (ap, i);
+ if (va_arg (ap, int) != 7)
+ abort ();
+ va_end (ap);
+}
+
+C* cp = new C;
+
+int main ()
+{
+ cp->f (3, 7);
+}
thunk1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: operator1.C
===================================================================
--- operator1.C (nonexistent)
+++ operator1.C (revision 154)
@@ -0,0 +1,34 @@
+// Test that conversions to base classes happen when calling
+// operators.
+
+// { dg-do run }
+
+extern "C" void abort ();
+
+struct B1;
+struct B2;
+
+B2* p;
+B1* p2;
+
+struct B1 {
+ virtual void f () {}
+};
+
+struct B2 {
+ int i;
+ bool operator!() { if (this != p) abort (); return true; }
+ operator void*() { if (this != p) abort (); return this; }
+};
+
+struct B3 : public B1, public B2 {
+};
+
+int main () {
+ B3 b;
+ p = (B2*) &b;
+ p2 = (B1*) &b;
+ bool b1 = b;
+ bool b2 = !b;
+}
+
operator1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: multiple1.C
===================================================================
--- multiple1.C (nonexistent)
+++ multiple1.C (revision 154)
@@ -0,0 +1,20 @@
+// { dg-options "-w" }
+
+struct Base {
+ int b;
+
+ Base(int b) : b(b) { }
+};
+
+struct Derived : public Base {
+ Derived(int d) : Base(d) { }
+};
+
+struct Final : public Derived, public Base {
+ Final(int f) : Derived(f), Base(f-1) { }
+};
+
+int main()
+{
+ Final f(5);
+}
multiple1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: local2.C
===================================================================
--- local2.C (nonexistent)
+++ local2.C (revision 154)
@@ -0,0 +1,16 @@
+// PR c++/17155
+// { dg-do link }
+
+struct A {
+ virtual ~A() {}
+};
+
+
+void tsk_tsk(void)
+{
+ struct B : public A {
+ B(int) {}
+ };
+}
+
+int main () {}
local2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: thunk3.C
===================================================================
--- thunk3.C (nonexistent)
+++ thunk3.C (revision 154)
@@ -0,0 +1,12 @@
+// PR c++/18492
+
+struct X{ ~X(); };
+struct B
+{
+ virtual void a( X ) = 0;
+};
+struct D : public virtual B
+{
+ void a( X );
+};
+void D::a( X ){}
thunk3.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: thunk5.C
===================================================================
--- thunk5.C (nonexistent)
+++ thunk5.C (revision 154)
@@ -0,0 +1,22 @@
+// PR c++/21123
+
+struct A
+{
+ A(const A &a);
+ const A& operator=(const A& a);
+};
+
+struct B
+{
+ virtual A f(A);
+};
+
+struct C : virtual B
+{
+ virtual A f(A);
+};
+
+A C::f(A a)
+{
+ return a;
+}
thunk5.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: typedef1.C
===================================================================
--- typedef1.C (nonexistent)
+++ typedef1.C (revision 154)
@@ -0,0 +1,8 @@
+namespace NS {
+class X {};
+typedef X Y;
+}
+
+struct Base : virtual public NS::Y {
+ Base() : NS::Y() {}
+};
typedef1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: template-as-base.C
===================================================================
--- template-as-base.C (nonexistent)
+++ template-as-base.C (revision 154)
@@ -0,0 +1,9 @@
+// Contributed by Gabriel Dos Reis
+// Distilled from PR C++/3656
+
+namespace N
+{
+ template struct X { };
+}
+
+struct A : N::X { }; // { dg-error "expected class-name" "" }
template-as-base.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: covariant11.C
===================================================================
--- covariant11.C (nonexistent)
+++ covariant11.C (revision 154)
@@ -0,0 +1,29 @@
+// { dg-do compile }
+
+// Contributed by Nathan Sidwell 23 Oct 2003
+// Origin: grigory@stl.sarov.ru
+// PR c++/12700 ICE with covariancy
+
+struct c2 { int i; };
+
+struct c1 {
+ virtual c2& f8() {};
+};
+
+struct c3 : c1, c2 {
+ virtual c2& f8() {};
+};
+
+struct c11 : public c1 {
+ virtual c3& f8() {};
+};
+
+struct c15 : virtual c3 {
+ virtual c2& f8() {};
+};
+
+struct c18 : virtual c11 {
+ virtual c15& f8();
+};
+
+c15& c18::f8() { throw 0; }
covariant11.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: covariant13.C
===================================================================
--- covariant13.C (nonexistent)
+++ covariant13.C (revision 154)
@@ -0,0 +1,25 @@
+// Copyright (C) 2004 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 8 May 2005
+
+// Origin:Andrew Pinski: pinskia@gcc.gnu.org
+// PR 21427: ICE on valid
+
+struct B1 {
+ public:
+ virtual void foo();
+};
+
+struct B2 {
+ public:
+ virtual B2 & bar() = 0;
+};
+
+struct I : public B1, B2 {
+ public:
+ virtual ~I();
+ virtual I & bar();
+};
+
+struct D : public I {
+ virtual ~D();
+};
covariant13.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: covariant15.C
===================================================================
--- covariant15.C (nonexistent)
+++ covariant15.C (revision 154)
@@ -0,0 +1,18 @@
+/* This used to ICE (PR c++/27492) */
+/* { dg-do "compile" } */
+
+struct A {};
+
+class B : A
+{
+ virtual A* foo(); /* { dg-error "overriding" } */
+};
+
+struct C : virtual B
+{
+ virtual C* foo(); /* { dg-error "invalid covariant return type" } */
+};
+
+C* C::foo() { return 0; }
+
+struct D : C {};
covariant15.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: using1.C
===================================================================
--- using1.C (nonexistent)
+++ using1.C (revision 154)
@@ -0,0 +1,34 @@
+// Test that overloading on 'this' quals works with class using-declarations.
+
+// { dg-do link }
+
+struct A {
+ void f() const;
+ void f() {}
+ void g() const {}
+ void g();
+ void h() const;
+ void h();
+ void i() const;
+ void i() {}
+};
+
+struct B: private A {
+ using A::f;
+ using A::g;
+ void h () const {}
+ using A::h;
+ void i () const {}
+ using A::i;
+};
+
+int main()
+{
+ B b1;
+ const B b2 = B();
+
+ b1.f ();
+ b2.g ();
+ b2.h ();
+ b1.i ();
+}
using1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: covariant1.C
===================================================================
--- covariant1.C (nonexistent)
+++ covariant1.C (revision 154)
@@ -0,0 +1,33 @@
+// PR c++/5607
+
+// { dg-do run }
+
+class A {
+public:
+ virtual A* getThis() { return this; }
+};
+
+class B {
+int a;
+public:
+ virtual B* getThis() { return this; }
+};
+
+class AB : public A, public B {
+public:
+ virtual AB* getThis() { return this; }
+};
+
+int main ()
+{
+ AB* ab = new AB();
+
+ A* a = ab;
+ B* b = ab;
+
+ if (a->getThis() != a
+ || b->getThis() != b)
+ return 1;
+
+ return 0;
+}
covariant1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: using3.C
===================================================================
--- using3.C (nonexistent)
+++ using3.C (revision 154)
@@ -0,0 +1,19 @@
+class A
+{
+public:
+ typedef int T;
+ int a;
+};
+
+class B : virtual private A
+{
+};
+
+class C : virtual private A, public B
+{
+public:
+ using A::a;
+ using A::T;
+};
+
+C::T x;
using3.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: covariant3.C
===================================================================
--- covariant3.C (nonexistent)
+++ covariant3.C (revision 154)
@@ -0,0 +1,70 @@
+// { dg-do run }
+
+// Copyright (C) 2002 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 27 Nov 2002
+
+// covariant returns. Virtual offset.
+
+struct B1;
+struct B2;
+struct D;
+
+struct B1
+{
+ virtual B1 *foo1 () {return this;}
+ virtual B2 *foo2 (D *);
+};
+struct B2
+{
+ virtual B2 *baz1 () {return this;}
+ virtual B1 *baz2 (D *);
+};
+
+struct D : virtual B1, virtual B2
+{
+ virtual D *foo1 () {return this;}
+ virtual D *foo2 (D *d) {return d;}
+ virtual D *baz1 () {return this;}
+ virtual D *baz2 (D *d) {return d;}
+};
+
+B2 *B1::foo2 (D *d) {return d;}
+B1 *B2::baz2 (D *d) {return d;}
+
+int test (B1 *b1, B2 *b2, D *d)
+{
+ if (b1->foo1 () != b1)
+ return 1;
+ if (b2->baz1 () != b2)
+ return 2;
+ if (b1->foo2 (d) != b2)
+ return 3;
+ if (b2->baz2 (d) != b1)
+ return 4;
+ return 0;
+}
+
+int test (D *d)
+{
+ if (d->foo2 (d) != d)
+ return 11;
+ if (d->baz2 (d) != d)
+ return 12;
+ if (d->foo1 () != d)
+ return 13;
+ if (d->baz1 () != d)
+ return 14;
+ return 0;
+}
+
+int main ()
+{
+ D d;
+ int r;
+
+ if ((r = test (&d, &d, &d)))
+ return r;
+ if ((r = test (&d)))
+ return r;
+ return 0;
+}
covariant3.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: error1.C
===================================================================
--- error1.C (nonexistent)
+++ error1.C (revision 154)
@@ -0,0 +1,10 @@
+// PR 12486
+
+struct A { int ma; };
+struct B { };
+
+void foo()
+{
+ B *b;
+ b->A::ma=0; // { dg-error "" }
+}
error1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: using5.C
===================================================================
--- using5.C (nonexistent)
+++ using5.C (revision 154)
@@ -0,0 +1,17 @@
+// Copyright (C) 2005 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 8 Jun 2005
+
+// PR 19496: Missing error during parsing.
+// Origin: Volker Reichelt
+
+template struct A
+{
+ A::A; // { dg-error "constructor" }
+};
+
+struct B
+{
+ void f ();
+ using B::f; // { dg-error "not a base" }
+};
+
using5.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: covariant5.C
===================================================================
--- covariant5.C (nonexistent)
+++ covariant5.C (revision 154)
@@ -0,0 +1,27 @@
+// { dg-do compile }
+
+// Copyright (C) 2002 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 27 Dec 2002
+
+// We ICE'd
+
+struct c0 {};
+
+struct c1 : virtual c0
+{
+ virtual c0 &f2();
+};
+
+struct c3 : c1
+{
+ virtual c1 &f2();
+};
+
+c1 &c3::f2()
+{
+ throw 0;
+}
+
+struct c4 : virtual c3
+{
+};
covariant5.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: error3.C
===================================================================
--- error3.C (nonexistent)
+++ error3.C (revision 154)
@@ -0,0 +1,11 @@
+//PR c++/27316
+
+struct A {};
+
+struct B : A
+! // { dg-error "token" }
+{};
+
+struct B : A
+! // { dg-error "token" }
+{};
error3.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: covariant7.C
===================================================================
--- covariant7.C (nonexistent)
+++ covariant7.C (revision 154)
@@ -0,0 +1,33 @@
+// { dg-do compile }
+
+// Copyright (C) 2002 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 27 Dec 2002
+
+// We ICE'd
+
+struct c0 {};
+
+struct c1 : virtual c0
+{
+ virtual c0 &f2() volatile;
+};
+
+struct c2
+{
+ int m;
+};
+
+struct c3 : virtual c0, virtual c1, c2
+{
+ virtual c1 &f2() volatile;
+};
+
+struct c4 : virtual c3, virtual c0, virtual c1
+{
+ int m;
+};
+
+struct c6 : c0, c3, c4
+{ // { dg-warning "direct base" "" }
+ virtual c1 &f2() volatile;
+};
covariant7.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: typeinfo1.C
===================================================================
--- typeinfo1.C (nonexistent)
+++ typeinfo1.C (revision 154)
@@ -0,0 +1,18 @@
+typedef struct {
+ virtual const char *blah() {
+ return "Heya::blah";
+ }
+} Heya;
+
+struct Grok : public Heya {
+ virtual const char *blah() {
+ return "Grok::blah";
+ }
+};
+
+int main() {
+ Grok *g = new Grok();
+ delete g;
+ return 0;
+}
+
typeinfo1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: covariant9.C
===================================================================
--- covariant9.C (nonexistent)
+++ covariant9.C (revision 154)
@@ -0,0 +1,32 @@
+// { dg-do link }
+// { dg-options "-w -ansi -pedantic" }
+
+// Contributed by Nathan Sidwell 23 Oct 2003
+// Origin: grigory@stl.sarov.ru
+// PR c++/12698. Duplicate covariant thunks emitted.
+
+struct c1 {};
+
+struct c0 {
+ int i;
+ virtual c1& f10() {};
+};
+
+struct c2 : virtual c1, c0 { };
+
+struct c6 : virtual c2, c0 {
+ virtual c2& f10() {};
+};
+
+struct c14 : virtual c2 { };
+
+struct c19 : virtual ::c6 {
+ virtual class ::c14& f10() {};
+};
+
+int main ()
+{
+ c19 obj;
+}
+
+
covariant9.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: access1.C
===================================================================
--- access1.C (nonexistent)
+++ access1.C (revision 154)
@@ -0,0 +1,19 @@
+// Test that we can access a member from an inaccessible base if it has
+// been promoted with a using-declaration.
+
+// { dg-do compile }
+
+struct A
+{
+ int i;
+};
+
+struct B: private A
+{
+ using A::i;
+};
+
+struct C: public B
+{
+ void f () { B::i = 0; }
+};
access1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: access3.C
===================================================================
--- access3.C (nonexistent)
+++ access3.C (revision 154)
@@ -0,0 +1,19 @@
+// { dg-do compile }
+
+class __new_alloc {
+public:
+ static void allocate() {}
+};
+
+template
+class __debug_alloc : public _Alloc {
+public:
+ static void allocate();
+};
+
+template
+void __debug_alloc<_Alloc>::allocate() {
+ _Alloc::allocate();
+}
+
+template class __debug_alloc<__new_alloc>;
access3.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: ptrmem1.C
===================================================================
--- ptrmem1.C (nonexistent)
+++ ptrmem1.C (revision 154)
@@ -0,0 +1,21 @@
+// PR c++/14803
+// { dg-options "-Werror" }
+
+struct sc_module { int member; };
+
+struct sc_signal_in_if { bool state; };
+
+typedef void (sc_module::*SC_ENTRY_FUNC)();
+
+class sc_clock : public sc_signal_in_if, public sc_module
+{
+public:
+ sc_clock();
+ void posedge_action();
+ SC_ENTRY_FUNC fptr;
+};
+
+sc_clock::sc_clock()
+{
+ fptr = static_cast(&sc_clock::posedge_action);
+}
ptrmem1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: access5.C
===================================================================
--- access5.C (nonexistent)
+++ access5.C (revision 154)
@@ -0,0 +1,4 @@
+struct S { ~S(); };
+struct T : virtual private S {};
+struct U : private T {};
+U u;
access5.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: conv1.C
===================================================================
--- conv1.C (nonexistent)
+++ conv1.C (revision 154)
@@ -0,0 +1,23 @@
+typedef struct _A A;
+typedef struct _A B;
+
+void some_function(B *b);
+
+class AClass {
+
+public:
+ operator A*() { return 0;}
+
+};
+
+class BClass :public AClass {
+
+public:
+ operator B*() { return 0;}
+
+};
+
+int main(int argc, char **argv) {
+ BClass b;
+ some_function(b);
+}
conv1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: ptrmem3.C
===================================================================
--- ptrmem3.C (nonexistent)
+++ ptrmem3.C (revision 154)
@@ -0,0 +1,17 @@
+// Copyright (C) 2005 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 27 May 2005
+
+// Origin:Andrew Pinski pinskia@gcc.gnu.org
+// PR 21455 bogus error with pointer to member of incomplete
+
+class XMLFile;
+
+typedef bool (XMLFile::*ParserFunctionPtr)();
+
+struct ParserElement
+{
+ ParserFunctionPtr getPreFunc() const { return preFunc; }
+ ParserFunctionPtr getPostFunc() const { return postFunc; }
+ ParserFunctionPtr preFunc;
+ ParserFunctionPtr postFunc;
+};
ptrmem3.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: conv3.C
===================================================================
--- conv3.C (nonexistent)
+++ conv3.C (revision 154)
@@ -0,0 +1,31 @@
+// PR 31074
+// Bug: The reference cast wasn't finding the desired static_cast followed by
+// const_cast interpretation.
+
+struct Shape
+{
+ Shape() {}
+ virtual ~Shape() {}
+};
+
+struct Loop
+{
+ Loop() {}
+ virtual ~Loop() {}
+ virtual void func() {}
+};
+
+struct Rect :
+ public Shape,
+ public Loop
+{
+ Rect() {}
+ virtual ~Rect() {}
+};
+
+int main ()
+{
+ const Rect* rect = new Rect();
+ Loop &l = ((Loop&)(*rect));
+ return (&l != (const Loop *)rect);
+}
conv3.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: access7.C
===================================================================
--- access7.C (nonexistent)
+++ access7.C (revision 154)
@@ -0,0 +1,15 @@
+struct B {
+ static void f();
+};
+
+template
+struct D : private B {
+ void g() {
+ f();
+ }
+};
+
+void h() {
+ D d;
+ d.g();
+}
access7.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: base1.C
===================================================================
--- base1.C (nonexistent)
+++ base1.C (revision 154)
@@ -0,0 +1,22 @@
+// { dg-do compile }
+// { dg-options "-pedantic-errors -w" }
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 29 Nov 2001
+
+// PR 164
+// Although a direct base can be inaccessible due to ambiguity, that
+// should not blow up synthesized methods.
+
+struct A {int m;};
+struct B : A {int m;};
+struct C : virtual A, B {int m;};
+struct D : B, C {int m;};
+
+void foo2 ()
+{
+ D d;
+ D e (d);
+
+ e = d;
+}
base1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: volatile1.C
===================================================================
--- volatile1.C (nonexistent)
+++ volatile1.C (revision 154)
@@ -0,0 +1,14 @@
+// PR c++/19299
+// Origin: Andrew Pinski
+
+// { dg-do compile }
+
+struct V
+{
+ virtual void foo() = 0;
+};
+
+void bar(V volatile* p)
+{
+ p->V::~V();
+}
volatile1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: override1.C
===================================================================
--- override1.C (nonexistent)
+++ override1.C (revision 154)
@@ -0,0 +1,20 @@
+// { dg-options "-w" }
+
+struct c0 { virtual void f (); };
+struct c1 : public c0 {};
+struct c2 : public c0 {};
+struct c3 : virtual public c0, public c1, public c2 {};
+struct c5 {};
+struct c7 : virtual public c3 {};
+struct c8 : virtual public c1 { virtual void f (); };
+struct c9 {};
+struct c10 : virtual public c8, virtual public c7 {};
+struct c11 : virtual public c5 {};
+struct c12 : virtual public c8, public c7 {};
+struct c13 : public c9, public c3, virtual public c2 {};
+struct c14 : virtual public c1, virtual public c5, virtual public c0,
+ public c2 {};
+struct c15 : public c14, public c12, virtual public c3 {};
+struct c16 : public c12, public c10, public c2 { virtual void f (); };
+struct c17 : virtual public c13, public c15, virtual public c0,
+ virtual public c16 {};
override1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: virtual1.C
===================================================================
--- virtual1.C (nonexistent)
+++ virtual1.C (revision 154)
@@ -0,0 +1,12 @@
+//PR c++/27952
+
+struct A
+{
+ virtual ~A() {}
+};
+
+struct B : A, virtual A {}; // { dg-error "duplicate base|forward declaration" }
+
+struct C : A, B {}; // { dg-error "duplicate base|invalid use" }
+
+C c; // { dg-error "aggregate" }
virtual1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: virtual3.C
===================================================================
--- virtual3.C (nonexistent)
+++ virtual3.C (revision 154)
@@ -0,0 +1,13 @@
+//PR c++/29022
+
+struct A
+{
+ operator int();
+};
+
+struct B : virtual A; // { dg-error "token" }
+
+int foo(B &b)
+{
+ return b; // { dg-error "cannot convert" }
+}
virtual3.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: local1.C
===================================================================
--- local1.C (nonexistent)
+++ local1.C (revision 154)
@@ -0,0 +1,10 @@
+// PR c++/17121
+
+struct A {
+ virtual ~A() {}
+};
+
+void tsk_tsk()
+{
+ struct B : public A {};
+}
local1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: thunk2.C
===================================================================
--- thunk2.C (nonexistent)
+++ thunk2.C (revision 154)
@@ -0,0 +1,19 @@
+// PR c++/14108
+
+class ClassC {
+public:
+ ~ClassC();
+};
+
+class ClassA {
+ virtual ClassC f();
+};
+
+class ClassB : public virtual ClassA {
+ virtual ClassC f();
+};
+
+ClassC ClassB::f() {
+ return ClassC();
+}
+
thunk2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: operator2.C
===================================================================
--- operator2.C (nonexistent)
+++ operator2.C (revision 154)
@@ -0,0 +1,22 @@
+typedef int INT_TYPEDEF;
+
+template
+class TypedIfc
+{
+public:
+ virtual ~TypedIfc() { }
+ virtual operator const T&() const = 0;
+ virtual const T& operator= (const T& t) = 0;
+};
+
+template
+class NullIfc : public TypedIfc
+{
+public:
+ const Tnative& operator= (const Tnative& t) { return t; }
+ operator const Tnative&() const { return *(Tnative *)0; }
+};
+
+typedef TypedIfc INT_TYPEDEFIfc;
+
+NullIfc i32;
operator2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: local3.C
===================================================================
--- local3.C (nonexistent)
+++ local3.C (revision 154)
@@ -0,0 +1,14 @@
+// PR c++/13744 (ice-on-valid-code)
+// Origin: Thom Harp
+
+// { dg-do compile }
+
+template void foo()
+{
+ struct A
+ {
+ virtual void bar() { A a(*this); }
+ } a;
+}
+
+template void foo<0>();
local3.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: thunk4.C
===================================================================
--- thunk4.C (nonexistent)
+++ thunk4.C (revision 154)
@@ -0,0 +1,23 @@
+// PR c++/21123
+
+struct A
+{
+ A( const A &a);
+ const A& operator=( const A& a);
+};
+
+struct B
+{
+ virtual A f();
+};
+
+struct C : virtual B
+{
+ virtual A f();
+ A a;
+};
+
+A C::f()
+{
+ return a;
+}
thunk4.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: thunk6.C
===================================================================
--- thunk6.C (nonexistent)
+++ thunk6.C (revision 154)
@@ -0,0 +1,16 @@
+// PR c++/26957
+
+struct LongDouble {
+ char ld[16];
+};
+
+struct DynAny {
+ virtual void insert_longdouble(LongDouble value) = 0;
+};
+
+struct TAO_DynCommon : public virtual DynAny {
+ virtual void insert_longdouble (LongDouble value);
+};
+
+void TAO_DynCommon::insert_longdouble (LongDouble value) { }
+
thunk6.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: covariant10.C
===================================================================
--- covariant10.C (nonexistent)
+++ covariant10.C (revision 154)
@@ -0,0 +1,22 @@
+// { dg-do compile }
+
+// Contributed by Nathan Sidwell 23 Oct 2003
+// Origin: grigory@stl.sarov.ru
+// PR c++/12699 ICE with covariancy
+
+struct c1 {
+ virtual void f1() const {};
+};
+
+struct c5 {};
+
+struct c6 : virtual c1 {
+ virtual c5* f33() const {};
+};
+
+struct c13 : virtual c5 { };
+
+struct c17 : virtual c6
+{
+ virtual c13* f33() const {};
+};
covariant10.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: covariant12.C
===================================================================
--- covariant12.C (nonexistent)
+++ covariant12.C (revision 154)
@@ -0,0 +1,18 @@
+// Copyright (C) 2004 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 27 Feb 2005
+
+// PR 20232: ICE on invalid
+
+struct T { };
+
+struct S;
+
+struct B
+{
+ virtual T *Foo (); // { dg-error "overriding" "" }
+};
+
+struct D : B
+{
+ virtual S *Foo (); // { dg-error "invalid covariant" "" }
+};
covariant12.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: covariant14.C
===================================================================
--- covariant14.C (nonexistent)
+++ covariant14.C (revision 154)
@@ -0,0 +1,20 @@
+// Copyright (C) 2005 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 18 Oct 2005
+
+// PR 22604
+// Origin: Volker Reichelt
+
+struct A;
+
+struct B
+{
+ virtual A* foo(); // { dg-error "overriding" "" }
+};
+
+namespace N
+{
+ struct A : B
+ {
+ virtual A* foo(); // { dg-error "invalid covariant" "" }
+ };
+}
covariant14.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: pure1.C
===================================================================
--- pure1.C (nonexistent)
+++ pure1.C (revision 154)
@@ -0,0 +1,19 @@
+// PR c++/23266
+// Origin: Volker Reichelt
+// { dg-do compile }
+
+void foo0() = 0; // { dg-error "like a variable" }
+virtual void foo1() = 0; // { dg-error "outside class|variable" }
+
+struct A
+{
+ void foo2() = 0; // { dg-error "non-virtual" }
+ static void foo3() = 0; // { dg-error "static member" }
+ virtual static void foo4() = 0; // { dg-error "both virtual and static" }
+ virtual void foo5() = 0; // { dg-error "base class" }
+};
+
+struct B : A
+{
+ static void foo5() = 0; // { dg-error "static member|declared" }
+};
pure1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: cond1.C
===================================================================
--- cond1.C (nonexistent)
+++ cond1.C (revision 154)
@@ -0,0 +1,10 @@
+// Origin: jason@redhat.com
+// { dg-do compile }
+
+struct A { A(); A(const A&); int i; };
+struct B: public A { };
+
+int f (bool b, A& ar, B& br)
+{
+ return (b?ar:br).i;
+}
cond1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: namespace-as-base.C
===================================================================
--- namespace-as-base.C (nonexistent)
+++ namespace-as-base.C (revision 154)
@@ -0,0 +1,9 @@
+// { dg-do compile }
+
+namespace Out {
+ namespace In {
+ }
+}
+
+class Klasse : public Out::In { // { dg-error ".*" "" }
+};
namespace-as-base.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: using2.C
===================================================================
--- using2.C (nonexistent)
+++ using2.C (revision 154)
@@ -0,0 +1,25 @@
+// { dg-do run }
+
+// Copyright (C) 2002 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 15 Sep 2002
+
+// PR 7919. Methods found via using decls didn't have their this
+// pointers converted to the final base type.
+
+struct Base {
+ int m;
+ protected:
+ void *Return () { return this; }
+};
+
+struct Derived : Base {
+ using Base::Return;
+ virtual ~Derived () {}
+};
+
+int main ()
+{
+ Derived d;
+
+ return static_cast (&d) != d.Return ();
+}
using2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: covariant2.C
===================================================================
--- covariant2.C (nonexistent)
+++ covariant2.C (revision 154)
@@ -0,0 +1,70 @@
+// { dg-do run }
+
+// Copyright (C) 2002 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 27 Nov 2002
+
+// covariant returns. Fixed offset.
+
+struct B1;
+struct B2;
+struct D;
+
+struct B1
+{
+ virtual B1 *foo1 () {return this;}
+ virtual B2 *foo2 (D *);
+};
+struct B2
+{
+ virtual B2 *baz1 () {return this;}
+ virtual B1 *baz2 (D *);
+};
+
+struct D : B1, B2
+{
+ virtual D *foo1 () {return this;}
+ virtual D *foo2 (D *d) {return d;}
+ virtual D *baz1 () {return this;}
+ virtual D *baz2 (D *d) {return d;}
+};
+
+B2 *B1::foo2 (D *d) {return d;}
+B1 *B2::baz2 (D *d) {return d;}
+
+int test (B1 *b1, B2 *b2, D *d)
+{
+ if (b1->foo1 () != b1)
+ return 1;
+ if (b2->baz1 () != b2)
+ return 2;
+ if (b1->foo2 (d) != b2)
+ return 3;
+ if (b2->baz2 (d) != b1)
+ return 4;
+ return 0;
+}
+
+int test (D *d)
+{
+ if (d->foo2 (d) != d)
+ return 11;
+ if (d->baz2 (d) != d)
+ return 12;
+ if (d->foo1 () != d)
+ return 13;
+ if (d->baz1 () != d)
+ return 14;
+ return 0;
+}
+
+int main ()
+{
+ D d;
+ int r;
+
+ if ((r = test (&d, &d, &d)))
+ return r;
+ if ((r = test (&d)))
+ return r;
+ return 0;
+}
covariant2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: using4.C
===================================================================
--- using4.C (nonexistent)
+++ using4.C (revision 154)
@@ -0,0 +1,14 @@
+// Copyright (C) 2005 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 6 Jun 2005
+
+// PR 20613:uninformative diagnostic
+// Origin: Wolfgang Bangerth
+
+struct B {
+ void f();
+};
+
+struct D : B {
+ using B::f;
+ using B::f; // { dg-error "repeated" }
+};
using4.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: covariant4.C
===================================================================
--- covariant4.C (nonexistent)
+++ covariant4.C (revision 154)
@@ -0,0 +1,76 @@
+// { dg-do run }
+
+// Copyright (C) 2002 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 27 Nov 2002
+
+// covariant returns. Fixed & virtual offset.
+
+struct B1;
+struct B2;
+struct D;
+
+struct B1
+{
+ virtual B1 *foo1 () {return this;}
+ virtual B2 *foo2 (D *);
+};
+
+struct B2
+{
+ virtual B2 *baz1 () {return this;}
+ virtual B1 *baz2 (D *);
+};
+
+struct Pad1 { virtual ~Pad1 (){}};
+struct Pad2 { virtual ~Pad2 (){}};
+struct Proxy1 : Pad1, B1 {};
+struct Proxy2 : Pad2, B2 {};
+
+struct D : virtual Proxy1, virtual Proxy2
+{
+ virtual D *foo1 () {return this;}
+ virtual D *foo2 (D *d) {return d;}
+ virtual D *baz1 () {return this;}
+ virtual D *baz2 (D *d) {return d;}
+};
+
+B2 *B1::foo2 (D *d) {return d;}
+B1 *B2::baz2 (D *d) {return d;}
+
+int test (B1 *b1, B2 *b2, D *d)
+{
+ if (b1->foo1 () != b1)
+ return 1;
+ if (b2->baz1 () != b2)
+ return 2;
+ if (b1->foo2 (d) != b2)
+ return 3;
+ if (b2->baz2 (d) != b1)
+ return 4;
+ return 0;
+}
+
+int test (D *d)
+{
+ if (d->foo2 (d) != d)
+ return 11;
+ if (d->baz2 (d) != d)
+ return 12;
+ if (d->foo1 () != d)
+ return 13;
+ if (d->baz1 () != d)
+ return 14;
+ return 0;
+}
+
+int main ()
+{
+ D d;
+ int r;
+
+ if ((r = test (&d, &d, &d)))
+ return r;
+ if ((r = test (&d)))
+ return r;
+ return 0;
+}
covariant4.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: using6.C
===================================================================
--- using6.C (nonexistent)
+++ using6.C (revision 154)
@@ -0,0 +1,15 @@
+// Copyright (C) 2005 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 8 Jun 2005
+
+struct A
+{
+ operator int ();
+};
+
+template struct TPL : A
+{
+ using A::operator T; // { dg-error "operator float" }
+};
+
+TPL i;
+TPL j; // { dg-error "instantiated" }
using6.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: error2.C
===================================================================
--- error2.C (nonexistent)
+++ error2.C (revision 154)
@@ -0,0 +1,16 @@
+// PR c++/28259
+// { dg-do compile }
+
+struct A
+{
+ virtual A* foo(); // { dg-error "overriding" }
+};
+
+struct B : virtual A; // { dg-error "before" }
+
+struct C : A
+{
+ virtual B* foo(); // { dg-error "invalid covariant" }
+};
+
+B* C::foo() { return 0; }
error2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: covariant6.C
===================================================================
--- covariant6.C (nonexistent)
+++ covariant6.C (revision 154)
@@ -0,0 +1,27 @@
+// { dg-do compile }
+
+// Copyright (C) 2002 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 27 Dec 2002
+
+// We ICE'd
+
+struct c0 {};
+
+struct c1 : virtual c0
+{
+ virtual c0 &f2();
+};
+
+struct c3 : virtual c1
+{
+ virtual c1 &f2();
+};
+
+c1 &c3::f2()
+{
+ throw 0;
+}
+
+struct c4 : virtual c3
+{
+};
covariant6.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: error4.C
===================================================================
--- error4.C (nonexistent)
+++ error4.C (revision 154)
@@ -0,0 +1,10 @@
+//PR c++/28740
+
+struct A { virtual ~A(); };
+
+struct B : A A {}; // { dg-error "'A'|function definition|extra" }
+
+A foo(const B &b)
+{
+ return b; // { dg-error "conversion" }
+}
error4.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: covariant8.C
===================================================================
--- covariant8.C (nonexistent)
+++ covariant8.C (revision 154)
@@ -0,0 +1,34 @@
+// { dg-do compile }
+
+// Copyright (C) 2002 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 31 Dec 2002
+
+// ICE with covariant thunks.
+
+struct c0 {};
+
+struct c1 : virtual c0
+{
+ virtual c0 &f2 ();
+};
+
+struct c2
+{
+ int m;
+};
+
+struct c3 : virtual c0, virtual c1, c2
+{
+ virtual c1 &f2 ();
+};
+
+c1 &c3::f2 ()
+{
+ throw 0;
+}
+
+struct c4 : virtual c3, virtual c0, virtual c1 {};
+
+struct c8 : virtual c2, virtual c0 {};
+
+struct c12 : virtual c4, virtual c3, virtual c8 {};
covariant8.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: access2.C
===================================================================
--- access2.C (nonexistent)
+++ access2.C (revision 154)
@@ -0,0 +1,14 @@
+// Test that a base doesn't get special rights to convert to itself.
+
+struct A {
+ void f ();
+};
+
+struct B: private A { };
+
+B b;
+
+void A::f ()
+{
+ A* ap = &b; // { dg-error "base|inherit" "" }
+}
access2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: access4.C
===================================================================
--- access4.C (nonexistent)
+++ access4.C (revision 154)
@@ -0,0 +1,8 @@
+struct Container { int Count(); };
+struct List : private Container {
+ using Container::Count;
+};
+struct INetContentTypeParameterList : private List { void Clear(); };
+void INetContentTypeParameterList::Clear() {
+ Count();//Calling non static but in a non-static method.
+}
access4.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: ptrmem2.C
===================================================================
--- ptrmem2.C (nonexistent)
+++ ptrmem2.C (revision 154)
@@ -0,0 +1,25 @@
+// PR c++/16810
+
+struct C {
+ virtual void f() {}
+};
+
+struct B {virtual ~B() {} };
+
+class D : public B, public C
+{
+public:
+ virtual void f() {}
+};
+
+typedef void ( C::*FP)();
+typedef void ( D::*D_f)();
+
+int main() {
+ D *d = new D();
+ C *c = d;
+
+ const FP fptr = (FP) &D::f;;
+ (d->* (D_f)fptr)();
+}
+
ptrmem2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: conv2.C
===================================================================
--- conv2.C (nonexistent)
+++ conv2.C (revision 154)
@@ -0,0 +1,22 @@
+// PR c++/25895
+// { dg-do run }
+
+class base {
+public:
+ base() {}
+private:
+ int val_;
+};
+
+class derived : public base {
+public:
+ derived() {}
+};
+
+static bool x = true ? (derived*)0 : (base*)0;
+
+int main ()
+{
+ if (x)
+ return 1;
+}
conv2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: access6.C
===================================================================
--- access6.C (nonexistent)
+++ access6.C (revision 154)
@@ -0,0 +1,15 @@
+// PR c++/28588
+
+class Foo {
+ static void f(); // { dg-error "private" }
+ static void f(int);
+ static void g(); // { dg-error "private" }
+};
+
+void h()
+{
+ Foo foo;
+ void (*f)();
+ f = foo.f; // { dg-error "context" }
+ f = foo.g; // { dg-error "context" }
+}
access6.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: access8.C
===================================================================
--- access8.C (nonexistent)
+++ access8.C (revision 154)
@@ -0,0 +1,25 @@
+// PR c++/29138
+
+class A
+{
+public:
+ int i;
+ class A1
+ {
+ int j;
+ };
+};
+
+class B : private A
+{
+public:
+ A::i;
+ A::A1;
+};
+
+void
+f ()
+{
+ B b;
+ B::A1 a1;
+}
access8.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: null1.C
===================================================================
--- null1.C (nonexistent)
+++ null1.C (revision 154)
@@ -0,0 +1,15 @@
+// PR c++/5453: Test that we don't assume that the pointer target of a
+// reference is non-null just because we know the reference isn't.
+
+// { dg-do run }
+
+struct V { };
+struct A: virtual public V { };
+
+A* ap;
+A*& apr (ap);
+
+int main ()
+{
+ V* vp = apr;
+}
null1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: base2.C
===================================================================
--- base2.C (nonexistent)
+++ base2.C (revision 154)
@@ -0,0 +1,12 @@
+// Copyright (C) 2004 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 23 Sep 2004
+
+// Origin: Wolfgang Bangerth
+// Bug 17620. Bogus duplicate base error.
+
+struct S {};
+
+typedef S B;
+
+struct D1 : B {};
+struct D2 : B {};
base2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property