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
override2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/override2.C
387
utf_8
1ac3bd50583791f213271d4572952a13
// { dg-do assemble } // Test for diagnosis of missing final overrider. struct A { virtual void f (); }; struct B1: virtual A { virtual void f (); }; struct B2: virtual A { virtual void f (); }; struct C: public B1, public B2 {}; // { dg-error "" } no final overrider
google
android
new
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/new.C
973
utf_8
b570e69e7f39e0f5f39cb8f160b4ef20
// { dg-do assemble } #include <new> inline void * operator new(std::size_t alloc_sz, const char *fname, unsigned lineno) { return ::operator new (alloc_sz); } inline void * operator new[](std::size_t alloc_sz, const char *fname, unsigned lineno) { return ::operator new[] (alloc_sz); } inline void operator dele...
google
android
badarrow
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/badarrow.C
108
utf_8
1ac5ba19c1885e9be0e0ca6b9a4c52be
// { dg-do assemble } struct S { int i; } s; void f() { s->i = 3; // { dg-error "" } base operand }
google
android
cond2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/cond2.C
223
utf_8
adc0a6dcb5fd4ac47a11b684146ac09c
// { dg-do assemble } class Wpt {}; class RAYhit { protected: Wpt _nearpt; public: Wpt surf () const { return true ? Wpt(): _nearpt; } };
google
android
delete7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/delete7.C
256
utf_8
db00ad7b8cb4aebea3e6520ea992edfe
// { dg-do run } // Test that we call a class-specific vector op delete. #include <new> int r = 1; struct A { void operator delete[](void *p) { r = 0; ::operator delete (p); } }; int main () { A (*p)[2] = new A[2][2]; delete [] p; return r; }
google
android
crash20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/crash20.C
479
utf_8
85193429796a8ae3f75eec98865e8208
// { dg-do assemble } #include <typeinfo> struct GcspFlags { enum Enum { OffYes, OffNo, Root }; static char const* name(Enum flag); template<Enum GCSP_FLAG> struct btmFlag { static Enum const f=OffNo; }; }; template<> struct GcspFlags::btmFlag<GcspFlags::OffYes> { static G...
google
android
optimize1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/optimize1.C
824
utf_8
2767ef2c41b48fe7c46c35b7eab0ccec
// { dg-do run } // { dg-options "-O2" } // // Bug 2781. We forgot to copy addressability information when // cloning. struct B { B(int v1); void Member (int v1); static void Static (int v1); }; struct D : B { D (int v1); }; void xswap(int& x1) ; int xxx = 0; B::B(int v1) { xswap(v1); xxx = v1; } void B:...
google
android
scope1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/scope1.C
158
utf_8
4cc954ede319c027e8493b724ffe5c42
// { dg-do run } // Testcase for proper scoping of local externs. int x = 1; int main() { int x = 2; { extern int x; return (x != 1); } }
google
android
asm1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/asm1.C
158
utf_8
ba720d64a0cf99613a5d491c9d9a9315
// { dg-do assemble } struct S { int i asm ("abc"); // { dg-error "" } `asm' specifier not permitted };
google
android
dtor5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/dtor5.C
365
utf_8
95142dab2cdf06c9a812ece53a941442
// { dg-do run } extern "C" void abort (); struct B; struct S { S (B*); ~S (); B* b_; }; struct B { B () : s (this) { } virtual void f () { } S s; }; S::S (B* b) : b_ (b) { } S::~S () { b_->f (); } struct D : public B { virtual void f () { abort (); } }; int main () { D d; }
google
android
friend11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/friend11.C
134
utf_8
689a2e160752b9dd397610b28e2c0b19
// { dg-do assemble } class Outer { friend void f1(); class Inner2; }; class Outer::Inner2 { };
google
android
inline1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/inline1.C
308
utf_8
5841802bbaf58c45a8be3d0bc688eae3
// { dg-do assemble } // { dg-options "-O2 -Winline" } class foo { public: float x; foo (float xval) : x (xval) {} foo operator+ (const foo &foo2) const { return foo (x+foo2.x); } }; int main() { foo f=foo(1)+foo(2); }
google
android
overcnv2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/overcnv2.C
812
utf_8
067175052927a6bd5ef2269919005cc0
// { dg-do assemble } // { dg-options "-Wconversion" } // Test that we resolve this case as mandated by the standard, but also // warn about it. We choose op char* not because it is a member of B -- // the standard says that all conversion ops are treated as coming from // the type of the argument -- but because it ...
google
android
dyncast6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/dyncast6.C
1,439
utf_8
5cd17ceac92a7733addb1d3c1daccbc5
// { dg-do run } // { dg-options "-w -ansi -pedantic-errors" } // We were generating incorrect type_info structures, and hence breaking // dynamic_cast. #include <stdio.h> class OBASE { public: virtual void bz () {}}; class IBASE { public: virtual void by () {}}; class V {public:int m; }; class A : public virtual V { ...
google
android
field2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/field2.C
292
utf_8
c8a67e5273d7857015e7f705d0d454c3
// { dg-do run } // Test for proper handling of field calls. struct A { inline A* operator()() { return this; } }; struct B { int i; union { A a; }; }; int main () { B b; A* ap = &b.a; A* ap2 = b.a(); return (ap != ap2); }
google
android
cleanup1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/cleanup1.C
238
utf_8
7e98cad14d668019fde5bd860087b395
// { dg-do run } // Bug: fold is too eager about pushing down CLEANUP_POINT_EXPR. int d; struct A { A() { } ~A() { d = 1; } }; int f (const A& a) { return 1; } int main () { if (f (A()) && d == 0) return 0; return 1; }
google
android
optimize4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/optimize4.C
468
utf_8
3ad5f2e897d7d4d13ab5589141121099
// { dg-do assemble } // // Bug 3543. We forgot to resolve an OFFSET_REF struct Writeable { bool blocking_mode; }; struct Pipe : Writeable { void ewrite(); void set_write_blocking () { if (Writeable::blocking_mode); } }; void Pipe::ewrite() { set_write_blocking(); } void ewrite(Pipe &p) { p.set_writ...
google
android
vbase4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/vbase4.C
490
utf_8
69bf12b116250163342f3546f41dff4c
// { dg-do assemble } // Bug 933. Secondary vtables weren't correctly located for non-primary // virtual bases. Causing us to ICE. class d0_Object { public: virtual ~d0_Object (); }; class M10 : virtual public d0_Object {}; class M4 : virtual public M10 {}; class M9 : public M4, virtual public M10 { public: M9 (); }; ...
google
android
init15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/init15.C
451
utf_8
acbc04d2aab1cb7f7fdd4569759a9c75
// { dg-do assemble } // Origin GNATS bug report 136 from // language specific constants caused the backend's constant caching machinery // to fall over. struct A { const char *name; int reserved; int a; int b; void (A::*func)(); void Fn (); }; void Interpret() { struct A cmd_list = {"a",0,0, 0,&A::F...
google
android
lookup18
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/lookup18.C
437
utf_8
21f8dfca32a2d700b3161a29e71363d4
// { dg-do assemble } // Test that referring to an ambiguous base in name lookup prevents // access to the field, even though the field is not ambiguous. struct A { int i; }; struct B: virtual A { }; struct C: public B { }; struct D: public B { }; struct E: public C, public D { void f (); }; void E::f() { B::...
google
android
init4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/init4.C
212
utf_8
ed2cf04edb9bfa17f33eb839d466104d
// { dg-options "-std=c++98 -pedantic-errors" } // { dg-do assemble } class error { public: error(int) {} }; class foo { const error x = 1; // { dg-error "" } initialization of non-static data member };
google
android
linkage1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/linkage1.C
372
utf_8
0d7920be36619e02ff9957bc490fca97
// { dg-do assemble { target { ! c++11 } } } typedef struct { int i; } *p; void f (p) { } // { dg-error "with no linkage" } p q; // { dg-warning "with no linkage" } int main() { extern p j; // { dg-warning "with no linkage" } struct A { int j; }; extern A a; // { dg-warning "with no linkage" } exte...
google
android
friend3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/friend3.C
277
utf_8
13817ac9cad48290aba294b443352ef4
// { dg-do assemble } class foo { public: class bar; void func(bar *); class bar { int st; friend void foo::func(bar *); }; }; void foo::func(bar *obj) { obj->st++; } void test02() { foo obj_f; foo::bar obj_b; obj_f.func( &obj_b); }
google
android
anon9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/anon9.C
282
utf_8
28ca54f7b047c4a242f5908ac0c5f3ca
// { dg-do assemble { target { ! c++11 } } } // Test that we properly diagnose an attempt to use an anonymous class // in declaring an external function. typedef const struct { int i; } T; // { dg-message "" } referenced below void f (T* t); // { dg-error "" } uses unnamed type
google
android
debug8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/debug8.C
192
utf_8
b23319808394ce6738b1508b7f4ec38d
// { dg-do assemble } // { dg-options "-g" } struct X { const int x[4]; }; struct A { A(); A(const A&); }; struct B { A a; int b[4]; }; struct C { A a; C() { B b=B(); }; };
google
android
pmf1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/pmf1.C
136
utf_8
4098c06dcc9bbc0bbbe416ca5d88a064
// { dg-do run } struct foo {}; typedef long unsigned int & (foo::*pmf)(void); void fn (...) {} int main () { pmf y = 0; fn (y); }
google
android
friend8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/friend8.C
420
utf_8
67ee9d21d65713f4864239d26a69aa29
// { dg-options "-std=c++98 -pedantic-errors" } // { dg-do assemble } // // We failed to diagnose when a class friend declaration did not use an // elaborated type specifier. struct Y; struct Z; struct X { friend class Z; friend Y; // { dg-error "" } friend must use aggr tag };
google
android
sizeof4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/sizeof4.C
1,378
utf_8
add3c3df9921a070d253f354f2ab7805
// { dg-do assemble } // C++ does not decay lvalues into rvalues until as late as possible. This // means things like the rhs of a comma operator mustn't decay. This will make // a difference if it is an array or function. struct S; struct T {int m;}; extern S s; // an incomplete extern S arys[20]; // an incomplete ...
google
android
volatile1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/volatile1.C
440
utf_8
2e9e2b46102363068fa7bf21fb7e5424
// { dg-do assemble } // Test that failed lvalue-to-rvalue conversion of vf doesn't crash the // compiler. class f_class // { dg-message "note" "candidates" } { }; volatile f_class ret_v_f_class() { f_class t; return t; } int main(void) { volatile f_class vf; 0 ? ret_v_f_class() : vf; // { dg-error ...
google
android
cvt1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/cvt1.C
190
utf_8
3793b7ec7538ca22ef6e87810890ec6d
// { dg-do assemble } typedef int Array_T[2]; struct S1 { S1(const Array_T&); }; struct S2 { S1 g(); Array_T a; }; S1 S2::g() { return S1(a); } void h() { S2 s2; s2.g(); }
google
android
anon7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/anon7.C
453
utf_8
13fc8a0348302614c207ead23a28e499
// { dg-do assemble } struct A { union { int a; // { dg-message "" } conflicts with previous declaration }; int a; // { dg-error "" } }; struct B { int b; // { dg-message "" } conflicts with previous declaration union { int b; // { dg-error "" } duplicate member }; }; struct C { union { i...
google
android
lookup21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/lookup21.C
285
utf_8
303ad36f28e46f5e782cff9679222b86
// { dg-do run } // Check that we don't complain about ambiguity between the same static // member function in different subobjects. struct A { static void f() {} }; struct B: public A { }; struct C: public A { }; struct D: public B, public C { }; int main() { D d; d.f(); }
google
android
crash4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/crash4.C
151
utf_8
caa8dc1b04811d1550ebeedd3db0961f
// { dg-do assemble } struct T { struct S __attribute__ ((packed)) { // { dg-error "" } parse error int i; }; };
google
android
union1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/union1.C
225
utf_8
538a4c98eca920ebe7c798e2fbfca3d4
// { dg-do assemble } class A { private: int myInt; public: A& operator = (int right) {myInt = right; return *this;} }; union B { char f1; A f2; // { dg-bogus "" } non-copy assignment op is OK };
google
android
crash10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/crash10.C
918
utf_8
a60d440d97e27b06efd91dce983278ee
// { dg-do assemble } template <class T> class REFptr { public: REFptr(); REFptr(T *pObj); virtual ~REFptr(); operator T* () const; }; class GEL; class GELsubc { public : virtual GEL *GELcast() const; }; class GELptr : public REFptr<GEL>{ public : ...
google
android
decl1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/decl1.C
157
utf_8
5676a661a2b6a27ccd1e71dbf5846d8d
// { dg-do assemble } int foo(int); int bar() { int baz(int(foo(0))); int foo = baz; }
google
android
dtor7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/dtor7.C
320
utf_8
8706c67091af1a99f99c926204a00007
// { dg-do run } // { dg-options "-O2" } int i; int j; struct A { A (); A (const A&); ~A (); }; A::A () { ++i; } A::A (const A&) { ++i; } A::~A () { --i; } A f () { return A (); } void g (const A&) { } int main () { g (f ()); return i; }
google
android
init3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/init3.C
149
utf_8
63abea026a929f3b0c80bcda371963b9
// { dg-do assemble } struct X { static const bool is_signed = true ; static const int digits = is_signed ? 8 *sizeof(wchar_t)-1 : 0; };
google
android
typename1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/typename1.C
442
utf_8
99723d1ca86d142cdfe4a828ea865228
// { dg-do assemble } // { dg-options "-pedantic -Wno-deprecated" } // This code snippet should be rejected with -pedantic template<class T> class Vector { public: typedef T* iterator; }; template<class T> void f() { Vector<T>::iterator i = 0; // { dg-error "typename" "typename" } missing typename } // { dg-error ...
google
android
dyncast2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/dyncast2.C
1,589
utf_8
3d3d7f8af29920e383800473352bbc3b
// { dg-do run } // test of dynamic_cast // runtime detecting of valid // downcasts within nonpublic // baseclasses. extern "C" void abort(); extern "C" int printf (const char *, ...); static int errors = 0; void error(int i) { printf("Error %i\n",i); errors++; } // 1. downcast // 1.1 single inheritance case str...
google
android
debug7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/debug7.C
180
utf_8
291c9e5d4d89fc28eb097defb251f26a
// { dg-do link } // { dg-options "-g -O2" } namespace std { const int __stl_chunk_size = 7; } int main () { }
google
android
init18
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/init18.C
862
utf_8
63447b995770773e72d3dad0494ab43c
// Some targets (e.g. those with "set_board_info needs_status_wrapper 1" // in their dejagnu baseboard description) require that the status is // final when exit is entered (or main returns), and not "overruled" by a // destructor calling _exit. It's not really worth it to handle that. // // Any platform that doesn't ...
google
android
warn6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/warn6.C
338
utf_8
1590efed7b08e3e0a0e31739b2953e82
// { dg-do assemble } // { dg-options "-W -Wall" } // Bug 2139. We gave an erronous warning about an unused parm on a // synthesized function struct A { virtual ~A (); }; void foo (A const &a) { A a1 = a; }
google
android
warn3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/warn3.C
762
utf_8
e0c5738b58b2d27b9f96b0529725fe5e
// { dg-do assemble } // { dg-options "-Wctor-dtor-privacy" } class A { }; class B { // { dg-warning "" } only private constructors public: void f(); private: B (); B (const B&); }; class C { // { dg-warning "" } only private destructors public: void f(); private: ~C (); }; class D { // { dg-war...
google
android
decl2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/decl2.C
332
utf_8
589daf00ab11a288c7fe3c5d5b24404c
// { dg-do assemble } int i(0)(1); // { dg-error "" } multiple initialization int j(2) = 3; // { dg-error "" } multiple initialization int k(4)(5)(6); // { dg-error "" } multiple initialization int m, n(7)(8); // { dg-error "" } multiple initialization
google
android
eh4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/eh4.C
250
utf_8
0e4cdc96271eaf0009e927797d8bc4e3
// { dg-do assemble } class foo { public: foo() {} void throwMe () { throw *this; // { dg-error "" } cannot be used in throw-expression } virtual void test () = 0; };
google
android
defarg1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/defarg1.C
416
utf_8
92af71277727e3a1f4146b458ce18b9f
// { dg-do assemble } int f (int x) { extern void g (int i = f (x)); // { dg-error "" } default argument uses local g(); return 0; } int f (void); int h1 (int (*)(int) = f); int h2 (int (*)(double) = f); // { dg-error "" } no matching f template <class T> int j (T t) { extern void k (int i = j (t)); //...
google
android
access7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/access7.C
636
utf_8
36d84e42cb470cc6cded750349e2fa48
// { dg-do assemble } // Test that access control for types and statics works properly // with nested types. class A { static int I1; // { dg-error "" } private struct B1 { }; // { dg-error "" } private public: static int I2; struct B2 { }; }; class D: public A { struct E { void f (); }; }; void ...
google
android
dll-5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/dll-5.C
308
utf_8
681d330e5a588ec1581c75f83745a574
// { dg-do assemble { target arm-*-*pe } } // dllimport is "sorta like" to "extern". // set compiler_result "(\nfoo1:.*\nfoo2:|\nfoo2:.*\nfoo1:)" // set not_compiler_result "__imp_" __declspec (dllimport) int foo1; int foo1; __declspec (dllimport) int foo2; int foo2 = 5; int f () { return foo1 + foo2; }
google
android
mangle3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/mangle3.C
543
utf_8
f7e15e08ea3f4ff8a460a7c8be7c998b
// { dg-do run } struct foo { static int bar () { int i; static int baz = 1; { static int baz = 2; i = baz++; } { struct baz { static int m () { static int n; return n += 10; } }; baz a; i += a.m (); } { ...
google
android
defarg2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/defarg2.C
257
utf_8
e9dc61c83b948a4d158bfdb94b298963
// { dg-do run } // Test that default args don't mess up pmf type comparisons. struct A { void f (int = 0) { } }; int main () { void (A::*p)(int) = 0; p = &A::f; if (p != &A::f) return 1; }
google
android
ptrmem5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/ptrmem5.C
360
utf_8
4bbafe05a45a25868b17dce17c662a22
// { dg-do assemble } // Bug: g++ doesn't see that A is a vbase of C. struct A { int i; void f (); }; struct B: public A { }; struct C: public virtual B { }; void g () { int C::*p = &A::i; // { dg-error "" } conversion from vbase void (C::*fp)() = &A::f; // { dg-error "" } conversion from vbase }
google
android
anon1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/anon1.C
110
utf_8
6dd624697232798767c1ec209dcd1491
// { dg-do assemble } static union { union { }; }; // { dg-warning "" } anonymous union with no members
google
android
asm2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/asm2.C
190
utf_8
52fdbbd9f9882f7fbb0abca172c7d7ab
// { dg-do assemble } struct C { void f (); }; void C::f () { asm ("" : : "m" (f)); // { dg-error "" } type could not be determined }
google
android
static6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/static6.C
113
utf_8
1d96263569b24b72e0b415644d2d1dde
// { dg-do assemble } void f (int i) { static int a[] = { i }; }
google
android
lookup5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/lookup5.C
227
utf_8
0c9ba209e786b7b5cc7c7d95cf1b823c
// { dg-do assemble } template <class T> class vector {}; class foo {}; int main() { foo f; f.vector(); // { dg-error "" } not a method }
google
android
dyncast3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/dyncast3.C
659
utf_8
77acee0de8a57b4945b482ef64b63edc
// { dg-do run } // test of dynamic_cast // runtime detecting of nonpublic // inheritance within a cast // and therefor failing with result 0. extern "C" void abort(); extern "C" int printf (const char *, ...); static int errors = 0; void error(int i) { printf("Error %i\n",i); errors++; } struct A {virtual ~A(){}}...
google
android
array3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/array3.C
427
utf_8
411d0d10a2d4315b64fbac017194d094
// { dg-do assemble } // // bug 386.C We ICE'd before emitting a diagnostic when trying to // initialize a constant non-pod array from something bogus. struct A { A(char); }; class B { const A ary[16]; B (const A ary[]); }; B::B (const A a[]) : ary(a) // { dg-error "array" } { }
google
android
nested1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/nested1.C
163
utf_8
0acdd865dd1d89a48fa1161141acf8d7
// { dg-do assemble } struct C { struct D { }; }; struct E { C& c; void g(); }; void E::g() { c.D().f(); // { dg-error "" } no matching function }
google
android
init2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/init2.C
182
utf_8
09cdc6f15b9f59aca7cb90db7fa556d5
// { dg-do run } // { dg-options "-O3" } typedef int (*fp)(); struct S { fp f; }; static int f() { return 0; } static const S s = { &f }; int main() { return (*s.f)(); }
google
android
vtbl2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/vtbl2.C
1,625
utf_8
eb95e5130876ef3196237bb42ac3c02a
// { dg-do run } // vtable construction reorganisation broke this // execution test #include <stdio.h> static int fail = 0; void bad (char const *name) { printf ("Bad %s\n", name); fail = 1; } void ok (char const *name) { printf ("Ok %s\n", name); } struct Core { virtual ~Core (); virtual void Wibble () {bad...
google
android
array5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/array5.C
180
utf_8
ad371cb0e0e5569f8e4f12bdaefa7c0d
// { dg-do assemble } // We tried to create a temporary of unknown size and crashed. extern int a1[]; extern int a2[]; int foo(int p) { int x = (p ? a1 : a2)[1]; return x; }
google
android
debug6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/debug6.C
326
utf_8
23b1cd73956069e85a1cd6af724e04c1
// { dg-do assemble } // { dg-options "-g -O2" } // This causes assember relocation errors struct X { virtual ~X () {} }; struct Y { Y (){}; }; void foo () { X *x = new X; x->~X (); Y ys[2]; }
google
android
stmtexpr2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/stmtexpr2.C
155
utf_8
efe0ae4dc8f0b66c61c03ab2a35a0a2a
// { dg-do assemble } // { dg-options "-O2" } void bar(int); void foo(int x) { bar(({ int y; y = x; })); }
google
android
using9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/using9.C
591
utf_8
0f229d4546185b8be1ab9e2745b0d5c9
// { dg-do assemble } // // Bug 75. using declarations cannot introduce functions which ambiguate // those in the current namespace, BUT here we're reaccessing the current // namespace -- the function is not being 'introduced'. extern int a(); struct x {}; using ::x; using ::a; extern "C" void foo (); // { dg-error ...
google
android
init12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/init12.C
250
utf_8
6763453ad9902cd9fd256016d6697e04
// { dg-do link } // { dg-options "-O3" } typedef int (*fp)(); struct S { fp f; }; struct T { static int f() { return 0; } }; static const S s = { &T::f }; int main() { return (*s.f)(); }
google
android
debug5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/debug5.C
147
utf_8
acf7d6efd1fb48de4b8f25567876691d
// { dg-do assemble } // { dg-options "-g" } struct S { ~S (); }; void f () { t: S s3; }
google
android
overload10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/overload10.C
160
utf_8
05e31669787864f1c11b882a62ef8b59
// { dg-do assemble } const char *pc; enum A { x } a; int i; int main() { return i ? *pc : a; }
google
android
overload6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/overload6.C
199
utf_8
d04ef404bb73d618062ed7ed78c01903
// { dg-do run } extern "C" void abort(); struct S1 { int f() { return 0; } int f() const { return 1; } }; struct S2 : public S1 { }; int main() { S2 s2; if (s2.f() != 0) abort (); }
google
android
cond3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/cond3.C
300
utf_8
a1c2753cfb142a358f8ffc3053ae4a4f
// { dg-do assemble } class Wtransf {}; const Wtransf Identity2 = Wtransf (); class HELPER { public: int current() const { return 0; } }; void problem_function() { HELPER tm; Wtransf delta = (tm.current()) ? Identity2 : Wtransf(); }
google
android
expr1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/expr1.C
282
utf_8
96d5ae4c186cc08bb5276ac33f3f40f3
// { dg-do assemble } struct T { // { dg-message "candidate" } int operator()(int) { } // { dg-message "operator|candidate expects" } }; int main() { T()(); // { dg-error "match" } no such operator }
google
android
debug2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/debug2.C
315
utf_8
ff25450bb13adebb57a287d4d4c6f1bc
// { dg-do assemble } // { dg-options "-funroll-loops -O2 -g" } inline void f() { typedef int T; } inline void g() { typedef double U; } int n; struct B { ~B() { for (int i = 0; i < n; ++i) g(); } }; struct D : public B { ~D() { for (int j = 0; j < n; ++j) f(); } }; D d;
google
android
singleton
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/singleton.C
1,122
utf_8
3b3f003bf4668f29ca853eeb7fb0819d
// { dg-do run } // This tests two things: // 1. there is an annoying warning. // singleton.C:26: warning: `class singleton' only defines private constructors and has no friends // egcs fails to see that there is a public static accessor function. // 2. the program crashes, because apparently the static variable s in ...
google
android
bitfld3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/bitfld3.C
753
utf_8
5f9c3301ce01dbaca25e43e1bb35e475
// { dg-do assemble } // http://gcc.gnu.org/ml/gcc-bugs/1999-06n/msg00107.html // Builtin ops don't always need reference bindings, and we weren't removing // them always after doing overload resolution. This caused us to try and take // the address of a bitfield. enum E {one}; struct A { E m1: 8; E m2: 8; unsig...
google
android
conv3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/conv3.C
223
utf_8
df181711cf49d00ca15fec38197e79c8
// { dg-do assemble } typedef const int ci; typedef ci aci[ 10]; aci var = { 2, 3, 5, 7, 11, 13 }; void f() { int * ip = var; // { dg-error "" } requires const_cast }
google
android
lookup15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/lookup15.C
462
utf_8
4e5bbeda32847d5103fd91a11643cd0c
// { dg-do assemble } class b { int j; public: b(int a = 6): j(a) {} void imbue(int a) {++j;} }; class d: public b { int k; public: d(int a = 7): b(a), k(a) {} void imbue(int a) {++k;} }; //virtual public kills, public ok class mostd: virtual public d { int l; public: mostd(int a = 9): d(a), l(a) {}...
google
android
crash12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/crash12.C
222
utf_8
1ecd49225243c3c830fc3dc18bf42f4f
// { dg-do assemble } // { dg-options "" } template<typename T> struct S { void f() {} }; int main() { S<int> s; int len = 50; char array[len]; s.f(); }
google
android
array4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/array4.C
98
utf_8
95a3df89db79879be49e39caf37b733d
// { dg-do assemble } enum { FOO = 3 }; int* arr = new int[FOO];
google
android
externC2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/externC2.C
134
utf_8
e4bbf19796485a7cc4158d83c4d3cf4d
// { dg-do assemble } extern "C" { struct xx { int x; xx(); }; xx::xx() { x = 0; } }
google
android
ptrmem4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C
247
utf_8
bb327e881454a6a26fa54655b2093d87
// { dg-do run } // Test to make sure g++ can handle target types that aren't identical // with pointers to members. struct A { int i; }; struct B : public A { }; int main () { int A::*p = &A::i; const int B::*q = &A::i; return p != q; }
google
android
thunk1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/thunk1.C
401
utf_8
4996212d38cb7834f6f2b4fecdb803ae
// { dg-do run } extern "C" void abort(); int ic; struct X { X() { ++ic; } X( const X & ) { ++ic; } ~X() { if (--ic < 0) abort(); } }; struct V { virtual ~V() {} }; struct A : public virtual V { }; struct B : public virtual V { virtual void foo( X ) = 0; }; struct D : public A, public virtual B {...
google
android
access3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/access3.C
374
utf_8
95bc91bf3f9273af01c9579897a93507
// { dg-do assemble } // The standard sez that a use of a name gets the most access it can through // the various paths that can reach it. Here, the access decl in B gives // us access. struct A { void f (); }; struct B: private virtual A { A::f; // { dg-warning "deprecated" } }; struct C: private virtual A...
google
android
goto2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/goto2.C
259
utf_8
72371ac4585f8b9c70feb54fea8e821c
// { dg-do assemble } // { dg-options "-Wunused" } struct S { S (); ~S (); }; void f () { { S s1; int j; // { dg-warning "" } unused t: // { dg-warning "" } unused S s2; } }
google
android
using2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/using2.C
113
utf_8
6c35041de2c842ecc924c4de5eb53781
// { dg-do assemble } struct X{ void f(); }; struct Y:X{ void f(int); void f(); using X::f; };
google
android
externC5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/externC5.C
280
utf_8
7d36ee48a189b66e67773c2763f76faa
// { dg-do assemble } extern "C" int rand (void) throw (); namespace std { extern "C" int rand(void) throw(); template <class T> void f(T a) {} } using namespace std; int main() { f(rand); f(std::rand); f(::rand); }
google
android
crash7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/crash7.C
155
utf_8
77451a6454a80a01eac1f409126d059e
// { dg-do assemble } void f() { union { private: int i; // { dg-error "" } private } u; u.i = 3; // { dg-error "" } within this context }
google
android
debug4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/debug4.C
92
utf_8
45980c61fd1fff6e98536c35f841d2f6
// { dg-do assemble } // { dg-options "-g" } typedef volatile struct { int i; } mutex_t;
google
android
linkage4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/linkage4.C
399
utf_8
401dd676954d0a7a71f3fb7f5cf4375e
// { dg-do assemble } static int strlen (const char*) { return 0; } template <int (*)(const char*)> void f () {} // Check that the strlen declaration here is given internal linkage by // using it as a non-type template argument, and expecting an error. template void f<strlen>(); // { dg-error "" "" { target { ! c++11 ...
google
android
crash32
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/crash32.C
414
utf_8
4b488e0ee229b17e181b7bc4e6d4b5d9
// { dg-do assemble } struct foo { enum e { not // { dg-error "" } }; // { dg-bogus "" } ~foo(); // { dg-bogus "" "" { xfail *-*-* } } void x (foo *&a, bool b = (unsigned char)0); }; // { dg-bogus "" "" { xfail *-*-* } } namespace N { struct bar; template<class T> struct baz { baz(T *p)...
google
android
mutable1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/mutable1.C
1,066
utf_8
5be873b81ce1aace276fc54e0f2772dc
// { dg-do run } // Make sure objects with mutable members are never placed in a read only // section. // All these are POD structs, and hence do not need ctors struct A { mutable int i; }; struct B { A a; }; struct C { A a[1]; }; struct D { static A const a; }; // all these are static consts and hence naively suitabl...
google
android
enum1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/enum1.C
163
utf_8
5b6d9e3f0f202ed5f985699483d694c3
// { dg-do run } extern "C" void abort(); struct A { enum { a = 3}* p; int f() { return (int) a; } }; int main() { A a; if (a.f() != 3) abort(); }
google
android
virtual7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/virtual7.C
270
utf_8
6c07ee47e97d6ed4c53954ac388d1f85
// { dg-do assemble } // { dg-options "-fno-rtti" } class _JvObjectPrefix { protected: virtual void finalize (void) = 0; }; class Object : public _JvObjectPrefix { protected: virtual void finalize (void); }; Object x;
google
android
anon6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/anon6.C
441
utf_8
4f0bd17a856faeab69b4712edbe53eed
// { dg-do run } extern "C" void abort (); struct A { union { int a; double b; int d; }; int c; }; struct B : public A { union { double a; void *c; }; float b; int e; }; int main () { struct B b; b.a = 1.5; b.b = 2.5; b.d = 1; b.e = 2; if (b.a != 1.5 || b.b != 2.5 || b...
google
android
crash40
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/crash40.C
505
utf_8
0ca4ff6d948e35f2891e5d06e8a9e4b7
// { dg-do assemble } // Bug 1917. We were considering thunks to clones to be clones. and // hence getting confused. struct A { virtual ~A(); }; struct B { virtual ~B(); }; struct C: public A,B {}; template <class TYPE> inline TYPE sqr(const TYPE& x) { return 1; } int f(const int t) { return sqr(t); }
google
android
vbase1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/vbase1.C
450
utf_8
c9308222bb88ae1582868992681d2514
// { dg-do run } // { dg-options "-w" } int result; struct A { A (); int i; }; A* ap; A::A () { ap = this; } struct B : virtual public A { B (); ~B (); int j; }; B::B () { if ((A*) this != ap) result = 1; } B::~B () { if ((A*) this != ap) result = 1; } struct C : public B { }; struct D : public...
google
android
warn7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/warn7.C
737
utf_8
c28a879506c3f174191552c356bfd7fe
// { dg-do assemble } // { dg-options "-W -Wall" } // // Bug 2356. Unused parameter information introduced in a ctor // definition was not propagated to clones, leading to missed or // unwarranted unused parameter warnings, possibly given twice. struct X { X(int i); void foo (int i); }; void foo (int i); X::X(...
google
android
goto4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/goto4.C
296
utf_8
3b16032627e4a56483ab6c1a869fba90
// { dg-do run } // Test that we clean up temporaries bound to references properly when // jumping out of their scope. int ret = 1; struct A { ~A() { ret = 0; } }; void f() { if (0) { out: return; } const A& a = A(); goto out; } int main() { f(); return ret; }
google
android
store-expr1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C
1,209
utf_8
0baeb2f734c660b1346b2a5b0acdcacc
// { dg-do run { target i?86-*-* x86_64-*-* } } // { dg-require-effective-target ilp32 } // { dg-require-effective-target fpic } // { dg-options "-mtune=generic -O2 -fpic" } class G {}; struct N { N *a; }; struct V { typedef N *W; W *m, *n; int s() const { return int(n - m); } const W &operator[](int x) con...
google
android
bitfld1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/bitfld1.C
222
utf_8
56c6d186238c4423a7d3d97bacd8cd42
// { dg-do assemble } // declares template operator!= #include <utility> struct foo { enum e { bar } baz:1; void test() { baz != bar; } };
google
android
defarg7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/defarg7.C
875
utf_8
c60e35453aa201f9a53cebeea1e937f0
// { dg-do assemble } // As of G++ 3.4, we no longer attempt to detect dependencies; the // standard does not require that we do. // Bug 1038. Default args on class members can produce circular dependencies. // Make sure we spot them, and don't depend on a particular ordering. struct A { static int Foo (int = Baz ()...