plateform stringclasses 1
value | repo_name stringclasses 2
values | name stringlengths 1 78 | ext stringclasses 2
values | path stringlengths 15 1.11k | size int64 1 8.55M | source_encoding stringclasses 11
values | md5 stringlengths 32 32 | text stringlengths 0 8.49M |
|---|---|---|---|---|---|---|---|---|
google | android | pure1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/pure1.C | 625 | utf_8 | 766fe5b4a709e73fe26896c37842fb64 | // PR c++/23266
// { 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 membe... |
google | android | using5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/using5.C | 368 | utf_8 | 86f5581cd6f6c121d25316a6c0176f89 | template<int> struct A
{
A::A; // { dg-error "constructor|not a base" }
};
struct B
{
void f ();
using B::f; // { dg-error "not a base" }
}; |
google | android | override1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/override1.C | 787 | utf_8 | 1c83e20d447d50159eb23408fda6231f | // { 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, virtua... |
google | android | covariant18 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant18.C | 411 | utf_8 | 299041871d0a75a982e0c449266a9d35 | // PR c++/47873
// { dg-do run }
struct Base
{
virtual ~Base(){}
virtual Base& This() { return *this; }
};
struct Ent : virtual Base
{
void *m_Body;
Ent& This() { return *this; }
virtual Ent& body()
{
return This();
}
};
struct Msg : virtual Ent
{
Msg()
{
bod... |
google | android | using7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/using7.C | 106 | utf_8 | 824afb5f78d6295dc194ab9e7d3ef6c1 | // PR c++/51889
struct A {
void f();
};
template <class T>
struct B: A
{
using A::f;
void f();
};
|
google | android | virtual2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/virtual2.C | 189 | utf_8 | 97a2f1a9fc23a8a008f5567cb6bbefa7 | //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" }
}
|
google | android | virtual6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/virtual6.C | 98 | utf_8 | b3a302411cd7b45b85975ae0f8b1d8fb | // PR c++/45473
struct A
{
virtual void B ();
};
struct B : A
{
B ();
};
struct C : B
{
};
|
google | android | access2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/access2.C | 197 | utf_8 | 6b97e7f34bed3048a23d0a8e86c3e497 | // 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" "" }
}
|
google | android | implicit-trivial1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/implicit-trivial1.C | 398 | utf_8 | 7d95023c0874a9aa20b68dc49fda4f5e | // PR c++/46807
// { dg-options -std=c++98 }
// In C++98/03, B::B(const B&) is trivial because A::A(const A&) is trivial,
// even though doing overload resolution would mean calling the template
// constructor. In C++0x, we do overload resolution to determine triviality.
struct A
{
A() {}
private:
template <class... |
google | android | error1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/error1.C | 113 | utf_8 | c788c5892d7d120b0357a3804e53f50a | // PR 12486
struct A { int ma; };
struct B { };
void foo()
{
B *b;
b->A::ma=0; // { dg-error "" }
}
|
google | android | covariant12 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant12.C | 325 | utf_8 | 024b0d1452f48d9188fd4c6f01697f03 | // 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" "" }
}; |
google | android | virtual11 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/virtual11.C | 339 | utf_8 | a7e9d57f0ba4f7ea8ed0340c0dd10f3e | // PR c++/59031
// { dg-do compile }
// { dg-options "-fdump-tree-gimple " }
class B {
public:
virtual int add (int a, int b) {return a+ b;}
};
class D : public B {
};
int foo (int a, int b) {
D d;
return d.add(a, b);
}
// { dg-final { scan-tree-dump-not "OBJ_TYPE_REF" "gimple" } }
// { dg-final { cleanup-tree... |
google | android | covariant1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant1.C | 396 | utf_8 | d5b9e7987bad7019aaec9e69eab66e85 | // 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 ... |
google | android | virtual3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/virtual3.C | 160 | utf_8 | 88e3f23768b2dfe530d163660b058796 | //PR c++/29022
struct A
{
operator int();
};
struct B : virtual A; // { dg-error "token" }
int foo(B &b)
{
return b; // { dg-error "cannot convert" }
}
|
google | android | virtual8 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/virtual8.C | 594 | utf_8 | 0838d6de2324f8b6f1982b4845383b8c | // PR c++/48035
// { dg-do run }
#include <new>
#include <cstring>
#include <cstdlib>
struct A
{
virtual void foo (void) {}
virtual ~A () {}
};
struct B : public A
{
virtual ~B () {}
};
struct C
{
virtual ~C () {}
int c;
};
struct D : public virtual B, public C
{
virtual ~D () {}
};
struct E : public ... |
google | android | ptrmem3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/ptrmem3.C | 500 | utf_8 | 592d6abc110ab9527c8334e13ec7cfee | // 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 postF... |
google | android | override-attribs | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/override-attribs.C | 414 | utf_8 | 6abda30090918301223d7b90c34e8158 | // PR c++/14688
// { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } }
class one
{
public:
virtual void
test(void* value); // { dg-error "overriding" }
};
class two : public one
{
public:
void __attribute__((regparm(2)))
test(void* value); // { dg-error "conflicting type attributes" }
};
cla... |
google | android | thunk8 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/thunk8.C | 437 | utf_8 | 4d1b2c07599a5eb535ef57e6a781d9a4 | /* PR target/27387
We used to generate a non-PIC thunk on thumb even with -fPIC.
Make sure that won't happen anymore. */
/* { dg-do compile } */
/* { dg-require-effective-target arm_thumb1_ok } */
/* { dg-options "-mthumb -fPIC" } */
struct A {
virtual void f ();
};
struct B {
virtual void g ();
};
struc... |
google | android | thunk6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/thunk6.C | 305 | utf_8 | 2dfbca1638b220825eaaf7ab19f120af | // 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) { }
|
google | android | covariant11 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant11.C | 453 | utf_8 | ca45ea7dee32a2ef2bfe9224172afb59 | // { dg-do compile }
// 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& c... |
google | android | covariant9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant9.C | 492 | utf_8 | 0511cb5b77e0c5f25eb7db8a8b1daba4 | // { dg-do link }
// { dg-options "-w -ansi -pedantic" }
// 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 {
vir... |
google | android | multiple1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/multiple1.C | 266 | utf_8 | 0538ccbaac8b13faa65f78233c14d00f | // { 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);
}
|
google | android | volatile1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/volatile1.C | 169 | utf_8 | 768bdcc7042d268b87a11846a928e38c | // PR c++/19299
// { dg-do compile }
struct V
{
virtual void foo() = 0;
};
void bar(V volatile* p)
{
p->V::~V();
} |
google | android | crash4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/crash4.C | 133 | utf_8 | 9f7779fb2d460dcb7e9a38832eeadcb8 | // PR c++/59082
struct A {};
struct B : virtual A, A {}; // { dg-error "duplicate base type" }
A foo(const B &b)
{
return b;
}
|
google | android | union1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/union1.C | 98 | utf_8 | 8ac7470626f12e0cdefa40e25583472b | // PR c++/15507
struct A {
// empty
};
struct B : A {
int b;
};
union U {
A a;
B b;
};
|
google | android | access7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/access7.C | 145 | utf_8 | fe96fafc31fdff9fba0f4354102ff1ad | struct B {
static void f();
};
template <typename T>
struct D : private B {
void g() {
f();
}
};
void h() {
D<int> d;
d.g();
}
|
google | android | conv3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/conv3.C | 450 | utf_8 | 2306dad7914eaa72347a53252751eb1e | // 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 ~... |
google | android | thunk1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/thunk1.C | 558 | utf_8 | f54f42efb01f78d530cd6440f416587e | // { dg-do run { target i?86-*-* x86_64-*-* s390*-*-* alpha*-*-* ia64-*-* sparc*-*-* } }
#include <stdarg.h>
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 = ... |
google | android | access3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/access3.C | 315 | utf_8 | 782f289a8885743348299a4efef52f20 | // { dg-do compile }
class __new_alloc {
public:
static void allocate() {}
};
template <class _Alloc>
class __debug_alloc : public _Alloc {
public:
static void allocate();
};
template <class _Alloc>
void __debug_alloc<_Alloc>::allocate() {
_Alloc::allocate();
}
template class __debug_alloc<__new_alloc>;
|
google | android | using2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/using2.C | 488 | utf_8 | 26f51eac0b25566825aafb23697d10a4 | // { dg-do run }
// 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 stati... |
google | android | virtual7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/virtual7.C | 292 | utf_8 | b9460b0712e4342a9676337f00a986b0 | // Origin: PR c++/47666
// { dg-do compile }
template <typename T>
struct A
{
int a;
};
template <typename T>
struct B : public A <T>
{
};
class D : public B <D *>
{
virtual D & operator= (const D &);
};
class E : virtual public D
{
};
class F : public E
{
virtual void foo ();
};
|
google | android | error2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/error2.C | 258 | utf_8 | b70b0b78a846f3d11d419c86043a1fdc | // 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; }
|
google | android | covariant13 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant13.C | 443 | utf_8 | a30e748e839e3234af2982a8507640f3 | // 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();
}; |
google | android | operator2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/operator2.C | 451 | utf_8 | 8ec3eec10bb6beeb5a1ec171d1b02302 | typedef int INT_TYPEDEF;
template<class T>
class TypedIfc
{
public:
virtual ~TypedIfc() { }
virtual operator const T&() const = 0;
virtual const T& operator= (const T& t) = 0;
};
template<class Tnative>
class NullIfc : public TypedIfc<Tnative>
{
public:
const Tnative& operator= (const Tnative& t) { return t; ... |
google | android | thunk3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/thunk3.C | 145 | utf_8 | fbd285dcc7270a076d780f76a8ce05f4 | // 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 ){}
|
google | android | thunk2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/thunk2.C | 206 | utf_8 | 9b88ac0413e9487e8a758280c835a160 | // 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();
}
|
google | android | thunk10 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/thunk10.C | 689 | utf_8 | 1207763664f70af366a4b659c0bebe22 | /* { dg-options "-mthumb" { target arm*-*-* } } */
/* { dg-do run } */
/* { dg-timeout 100 } */
/* PR middle-end/39378 */
/* Check if the thunk target function is emitted correctly. */
class B1
{
public:
virtual int foo1(void);
int b1;
};
class B2
{
public:
virtual int foo2 (void);
int b2;
};
class D : publi... |
google | android | thunk4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/thunk4.C | 194 | utf_8 | 36499d0eccceff40478008f2dc2f180f | // 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;
}
|
google | android | virtual5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/virtual5.C | 363 | utf_8 | 96de23b6f959c8b18d4f5e0f021ad980 | // Test that a synthesized op= can override one from a base.
// { dg-do run }
struct B;
struct A
{
virtual B& operator=(const B&);
};
struct B: A
{
B(int i): i(i) { }
int i;
// implicitly-declared op=
};
B& A::operator=(const B& b) { return static_cast<B&>(*this); }
int main()
{
B b1 (123);
B b2 (0);
... |
google | android | ptrmem2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/ptrmem2.C | 303 | utf_8 | fad492da1e6e9e175df8d618db9cf1fa | // 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)();
}
|
google | android | crash2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/crash2.C | 140 | utf_8 | 16fa44188961b0a25cc35f173651cce3 | // PR c++/30298
struct A {};
struct B : A, A {}; // { dg-error "duplicate base type" }
struct B : A, A {}; // { dg-error "redefinition" }
|
google | android | covariant8 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant8.C | 509 | utf_8 | 9a768cc9dfee9447ec4b15a45df32035 | // { dg-do compile }
// 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 {... |
google | android | base1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/base1.C | 465 | utf_8 | 953df2b1556d4072e312369e3d7273a1 | // { dg-do compile }
// { dg-options "-pedantic-errors -w" }
// 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);
... |
google | android | operator1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/operator1.C | 474 | utf_8 | 47a2c8a75fa7e8806502df721a9bf6e3 | // 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) abo... |
google | android | using4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/using4.C | 365 | utf_8 | 2849e299956afd1664047e5a467eefd5 | struct B {
void f();
};
struct D : B {
using B::f; // { dg-message "previous declaration" }
using B::f; // { dg-error "redeclaration" }
}; |
google | android | conv2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/conv2.C | 236 | utf_8 | 65847617fa7d1ccf575a8de01815db58 | // 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;
}
|
google | android | using3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/using3.C | 178 | utf_8 | c9b550ead8867586800cdeee63308c31 | 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;
|
google | android | thunk5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/thunk5.C | 190 | utf_8 | fd1a48e42812d7a049499f6df69ff7fe | // 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;
}
|
google | android | null1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/null1.C | 257 | utf_8 | 929bd841afc583f6793a33214c34c08a | // 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;
}
|
google | android | thunk9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/thunk9.C | 156 | utf_8 | fb6adb819d82abbffb1f0f36f85868ba | // PR tree-optimization/37095
// { dg-options "-O" }
struct A
{
virtual A *foo ();
};
struct B : virtual A
{
virtual B *foo () { return 0; }
};
B b;
|
google | android | crash3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/crash3.C | 165 | utf_8 | c4d38d406bb309cef7f90177b0946475 | // PR c++/51326
struct A
{
virtual int& foo(); // { dg-error "overriding" }
};
struct B : A
{
B& foo(); // { dg-error "conflicting return type" }
};
|
google | android | pr48798 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/pr48798.C | 63 | utf_8 | d52d42fc3833f2c9203fd161bd8ca97e | // PR c++/48798
typedef struct A {} const t;
struct B : t {};
|
google | android | covariant16 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant16.C | 259 | utf_8 | 32f88811a0b79385570154e352028dd2 | /* PR c++/28253 This used to ICE. */
/* { dg-do compile } */
struct A
{
virtual A* foo();
};
struct B : virtual A
{
virtual B* foo(); /* { dg-error "overriding" } */
};
struct C : B
{
virtual C& foo(); /* { dg-error "conflicting return type" } */
};
|
google | android | namespace-as-base | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/namespace-as-base.C | 122 | utf_8 | 0f6055e72f90fb0e0e43e2ab7aa7141a | // { dg-do compile }
namespace Out {
namespace In {
}
}
class Klasse : public Out::In { // { dg-error ".*" "" }
};
|
google | android | thunk11 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/thunk11.C | 143 | utf_8 | 87c44d1c4b40e8ad862b5b5e67316bc0 | // PR c++/42256
// { dg-do link }
// { dg-additional-sources "thunk11-aux.cc" }
// { dg-options "-O2" }
#include "thunk11.h"
int
main ()
{
}
|
google | android | template-as-base | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/template-as-base.C | 205 | utf_8 | 11e5d1f68073db04c0dcb3d956d68731 | // Distilled from PR C++/3656
namespace N
{
template<typename> struct X { };
}
struct A : N::X { }; // { dg-error "expected class-name" "" } |
google | android | covariant10 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant10.C | 369 | utf_8 | cddfdb8e9f01440bf52ef339bab825d0 | // { dg-do compile }
// 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 {}
}; |
google | android | using6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/using6.C | 312 | utf_8 | 2a609ed8062419576ed46e3e969999d6 | struct A
{
operator int ();
};
template <typename T> struct TPL : A
{
using A::operator T; // { dg-error "operator float" }
};
TPL<int> i;
TPL<float> j; // { dg-message "required" } |
google | android | covariant19 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant19.C | 234 | utf_8 | 67641f238f80c6383b7ce6110d58ccb3 | // PR c++/46220
// According to the letter of the standard this is invalid,
// but that seems like a bug.
class Baz;
class Foo {
public:
virtual const Baz* getBaz() = 0;
};
class Bar : public Foo {
public:
Baz* getBaz();
};
|
google | android | pr30297 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/pr30297.C | 139 | utf_8 | de0ba7f6938effcb783f64534175a2c4 | // Regression test for ICE from PR c++/30297.
struct A
{
int i;
};
extern "C" struct B : A
{
A::i; // { dg-warning "deprecated" }
};
|
google | android | covariant17 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant17.C | 554 | utf_8 | 5ab99a1e863904d348c5aaf2266263b6 | // PR c++/43120
// { dg-do run }
extern "C" void abort ();
struct A {
int a;
A(int a_) : a(a_) {}
A(const A &other) { }
virtual void dummy() {}
};
struct B {
virtual B *clone() const = 0;
};
struct C : public virtual B {
virtual C *clone() const = 0;
};
struct E* ep;
struct E : public A, public C {
... |
google | android | covariant14 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant14.C | 369 | utf_8 | 50c88ef50589e6c43504bf35e1780d9c | struct A;
struct B
{
virtual A* foo(); // { dg-error "overriding" "" }
};
namespace N
{
struct A : B
{
virtual A* foo(); // { dg-error "invalid covariant" "" }
};
} |
google | android | thunk7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/thunk7.C | 929 | utf_8 | 658608f7154000cf6832d516ba8f2be5 | // { dg-do run }
#include <stdlib.h>
class A
{
int a, b;
public:
virtual void foo (int a, int b, int c, int d);
};
class B
{
int c, d;
public:
virtual void bar (int a, int b, int c, int d);
};
class D : public virtual A, public virtual B
{
int e, f;
};
void A::foo(int a, int b, int c, int d)
{
... |
google | android | access4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/access4.C | 278 | utf_8 | 2ef6c26071aeff4bfc7114533bcbb6dc | 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.
}
|
google | android | error4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/error4.C | 167 | utf_8 | 6585e3eb587683498e082c97eb7f5805 | //PR c++/28740
struct A { virtual ~A(); };
struct B : A A {}; // { dg-error "expected|initializer|invalid" }
A foo(const B &b) // { dg-error "" }
{
return b;
}
|
google | android | covariant7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant7.C | 1,574 | utf_8 | b65228e6b0e055c2282298a8be7a5263 | // { dg-do compile }
// { dg-prune-output "direct base" }
// { dg-options "-fdump-class-hierarchy" }
// 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, vi... |
google | android | virtual1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/virtual1.C | 275 | utf_8 | 5d675d5e8dcd9e6e6286c004b1e515ee | //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" }
|
google | android | typeinfo1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/typeinfo1.C | 251 | utf_8 | be87b303cd68bc0083e229657e8d162a | 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;
}
|
google | android | local2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/local2.C | 151 | utf_8 | 7ba23e93339cef0810a212036425afb3 | // PR c++/17155
// { dg-do link }
struct A {
virtual ~A() {}
};
void tsk_tsk(void)
{
struct B : public A {
B(int) {}
};
}
int main () {}
|
google | android | virtual10 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/virtual10.C | 246 | utf_8 | 36b96ebe70af50681d376a6b671515ea | // PR c++/14263
struct A { };
struct B : virtual A { };
int main()
{
A* p = new B;
B* q = static_cast<B*>(p); // { dg-error "cannot convert from pointer to base class 'A' to pointer to derived class 'B' because the base is virtual" }
}
|
google | android | typedef1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/typedef1.C | 105 | utf_8 | 543b190c9c0d744209af04ea332cc27e | namespace NS {
class X {};
typedef X Y;
}
struct Base : virtual public NS::Y {
Base() : NS::Y() {}
};
|
google | android | covariant4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant4.C | 1,292 | utf_8 | 8c6bb6aaa56fa2bea8b375c52fab5688 | // { dg-do run }
// 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 (){}};... |
google | android | base2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/base2.C | 289 | utf_8 | 260417b2989a13a1902a4b8b6ec39008 | // Bug 17620. Bogus duplicate base error.
struct S {};
typedef S B;
struct D1 : B {};
struct D2 : B {}; |
google | android | pr57942 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/pr57942.C | 175 | utf_8 | 89131addad59ec4a9674ff0bf8009038 | // PR c++/57942
template<typename T> struct S { typename T::error type; };
struct X {};
void f(S<int>*);
void f(...);
void g() { f((X*)0); }
struct Y;
void h() { f((Y*)0); }
|
google | android | cond1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/cond1.C | 169 | utf_8 | f3b3605ed6515de4b142977d92356815 | // { 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;
} |
google | android | base3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/base3.C | 178 | utf_8 | cb15d1bc001789d3b80a65e3c34f3576 | // PR c++/35985
// { dg-do compile }
template<typename T> struct A : T {}; // { dg-error "struct or class type" }
struct B;
A<void (B::*)()> a; // { dg-message "required" }
|
google | android | local1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/local1.C | 95 | utf_8 | 58a10b4567b6f89d8662c1fc4673d85e | // PR c++/17121
struct A {
virtual ~A() {}
};
void tsk_tsk()
{
struct B : public A {};
}
|
google | android | ptrmem1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/ptrmem1.C | 388 | utf_8 | 57ff79e4f3304cf12253ad956fe99a96 | // 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()
... |
google | android | covariant21 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant21.C | 230 | utf_8 | 3b17afe813a33607cf98920580202062 | // PR c++/59645
struct A { virtual ~A(); };
struct B { virtual ~B(); };
struct C : A, B {};
struct X
{
virtual B* foo(volatile int);
};
struct Y : X
{
virtual C* foo(volatile int);
};
C* Y::foo(volatile int) { return 0; }
|
google | android | ambig1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/ambig1.C | 151 | utf_8 | 6c35057c73488264a919029a2d4ca993 | // PR c++/51614
struct A
{
void foo();
};
struct B : A {};
struct C : A {};
struct D : B, C
{
D() { A::foo(); } // { dg-error "ambiguous" }
};
|
google | android | access5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/access5.C | 83 | utf_8 | c2411e6f8a0da7e3d67e7b6f69f5a766 | struct S { ~S(); };
struct T : virtual private S {};
struct U : private T {};
U u;
|
google | android | local3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/local3.C | 228 | utf_8 | b542b48ead2e56bb6bd2a0ae0f0e435f | // PR c++/13744 (ice-on-valid-code)
// { dg-do compile }
template<int> void foo()
{
struct A
{
virtual void bar() { A a(*this); }
} a;
}
template void foo<0>(); |
google | android | covariant3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant3.C | 1,146 | utf_8 | 24ff947b4da8f1fcee6c7b66d8388009 | // { dg-do run }
// 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;}
vir... |
google | android | 20081127_0 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lto/20081127_0.C | 57 | utf_8 | db4f63bc6be91958e93124af0193e66b | struct Foo { Foo(); };
static void func() { new Foo(); }
|
google | android | 20101010-2_0 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lto/20101010-2_0.C | 474 | utf_8 | 4be6727c042e3b92a7134099761f7c06 | // { dg-lto-do link }
typedef int size_t;
template < size_t _Nw > struct _Base_bitset
{
typedef unsigned _WordT;
_WordT _M_w[_Nw];
void _M_do_set ()
{
for (size_t __i;;)
_M_w[__i] = static_cast < _WordT > (0);
}
};
template < size_t > class bitset:
_Base_bitset < ((sizeof (unsigned)) + ((sizeof (u... |
google | android | pr52035_0 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lto/pr52035_0.C | 287 | utf_8 | 2988f41e84e1e095127d5d8b9547b25d | // PR c++/52035
// { dg-lto-do assemble }
template <typename T> struct QVector {
typedef T* iterator;
static void insert(int n);
typedef int size_type;
};
template <typename T> void QVector<T>::insert(size_type n) {}
void error()
{
int n;
QVector<int>::insert(n);
}
|
google | android | 20101010-3_0 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lto/20101010-3_0.C | 114 | utf_8 | 30f252a01870f55321528cb33b7b6d06 | // { dg-lto-do link }
// { dg-lto-options { "-flto -std=c++0x" } }
decltype(nullptr) a;
int main() { return 0; }
|
google | android | 20091004-1_1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lto/20091004-1_1.C | 585 | utf_8 | b1f395c247ddc53c4f3960a1a72bd398 | typedef double Real;
class Vector {
int dimen;
Real* val;
public:
Vector& operator=(const Vector& vec);
Vector(int p_dimen, Real *p_val)
: dimen(p_dimen), val(p_val) { }
int dim() const;
};
class DVector : public Vector {
public:
void reDim(int newdim);
explicit DVector(const Vector& old... |
google | android | 20081209_0 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lto/20081209_0.C | 134 | utf_8 | cd1fbd677645e7b5db75df63b66a6767 | /* { dg-lto-do link } */
class foo {
public:
foo ();
virtual ~foo ();
};
foo::foo ()
{
}
int
main ()
{
foo dummy;
return 0;
}
|
google | android | 20080907_0 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lto/20080907_0.C | 132 | utf_8 | 407c4f0b437baf8d953baf8331d48311 | // { dg-lto-do assemble }
struct Foo { void func (); }; Foo & bar () { } struct Baz { Baz (Baz &); };
Baz dummy() { bar().func(); }
|
google | android | v1-plugin-api-not-supported_0 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lto/v1-plugin-api-not-supported_0.C | 748 | utf_8 | 6232508298dd20a759cf64fffbca9f5e | // { dg-lto-do run }
// { dg-require-linker-plugin "" }
// { dg-lto-options {{-O2 -fuse-linker-plugin -fno-early-inlining}}
extern "C" void abort (void);
extern "C" void linker_error ();
class A
{
public:
int data;
virtual int foo (int i)
{
return i + 1;
}
};
class B : public A
{
public:
virtual ... |
google | android | 20090315_1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lto/20090315_1.C | 196 | utf_8 | 4668a3c2619c1eb17bf2ef65e3938fe5 | struct Foo {
bool Mumble() { return true; }
static void Bar() { if (foo_->Mumble()) foo_ = 0; }
static void Baz() { Bar(); }
static Foo *foo_;
};
void Unused() { Foo::Bar(); Foo::Baz(); }
|
google | android | 20090106_0 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lto/20090106_0.C | 5,603 | utf_8 | 1ce6c1aebc36b1f96969c33548c941e3 | // { dg-lto-do link }
typedef long unsigned int size_t;
namespace std __attribute__ ((__visibility__ ("default"))) {
using ::size_t;
template<typename _Tp>
struct __is_char
{
};
# 422 "/usr/include/c++/4.4.0/bits/cpp_type_traits.h" 3
}
namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
... |
google | android | pr42987_1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lto/pr42987_1.C | 127 | utf_8 | 1b56fef803fe85ec97121919ad3ba2b9 | struct B {
virtual void b() {}
};
static B* f() {
struct D : public B {
};
return new D;
}
B* g() {
return f();
}
|
google | android | 20101014-1_0 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lto/20101014-1_0.C | 195 | utf_8 | db3624a2e9e37543a071aefd12a406f8 | // { dg-lto-do run }
static const char *fname;
struct S
{
S () { fname = __func__; }
};
extern "C" void abort (void);
int
main ()
{
S tmp;
if (fname[0] != 'S')
abort ();
return 0;
}
|
google | android | 20081203_1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lto/20081203_1.C | 121 | utf_8 | 98778c2b88eda25ce05894a17d7680e4 | void f () {}
struct Foo { static inline void Bar() { f(); } };
static void Func() { Foo::Bar(); }
void g () { Func (); }
|
google | android | 20090313_0 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lto/20090313_0.C | 198 | utf_8 | 4578f2261a13cd87972aad48cbecda45 | // { dg-lto-do link }
// { dg-require-effective-target fpic }
// { dg-lto-options {{-flto -flto-partition=1to1 -fPIC}} }
// { dg-extra-ld-options "-flto -flto-partition=1to1 -r -nostdlib" }
int X;
|
google | android | 20081211-1_0 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lto/20081211-1_0.C | 143 | utf_8 | 215a806aaef01be71e0a1068b8ea5354 | #include "20081211-1.h"
foo *
create_foo (void)
{
return new foo;
}
void
destroy_foo (foo *p)
{
delete p;
}
int
main ()
{
return 0;
}
|
google | android | 20090313_1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lto/20090313_1.C | 147 | utf_8 | af95ff52b10d0e17c8fe8216f7c09b32 | struct Foo {
virtual void X();
virtual void Y();
};
struct Bar: public Foo {
Bar(Foo *);
void Y();
};
void Baz() {
Foo f;
Bar b(&f);
}
|
google | android | 20091004-3_0 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/lto/20091004-3_0.C | 403 | utf_8 | 95f1267a216caf98bd99298c998cd58e | // { dg-lto-do assemble }
// { dg-lto-options {{-O -flto}} }
extern "C" double sqrt (double __x) throw ();
typedef double VECTOR[3];
enum { X = 0, Y = 1, Z = 2, T = 3 };
inline void VLength(double& a, const VECTOR b)
{
a = sqrt(b[X] * b[X] + b[Y] * b[Y] + b[Z] * b[Z]);
}
void
determine_subpatch_flatness(void)
{
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.