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
eh11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh11.C
149
utf_8
1fb9ab6ee027cdbda2a3e1ad7937488f
// { dg-do assemble } // { dg-options "-fexceptions" } struct A { ~A(); }; int main(int argc, char** argv) { A a; return 0; } A::~A() { }
google
android
p4623
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p4623.C
645
utf_8
7db0ca76173c1ac3dbd593a544f9d269
// { dg-do run } // prms-id: 4623 class base { public: int b_data; base( int i=0 ) { b_data = i; } void b_print() { } }; class base1: virtual public base { public: int b1_data; base1( int i = 0 ) { b1_data = i; b_data++; } void b1_print() { } }; class base2: virtual public base { public: int b2_data; ...
google
android
eh49
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh49.C
201
utf_8
56edd02b7784e92a67033d6faa6ca9c3
// { dg-do run { xfail sparc64-*-elf arm-*-pe } } // { dg-options "-fexceptions -O9" } void main1() { throw 1; } int main() { try { main1(); } catch (...) { return 0; } return 1; }
google
android
p701
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p701.C
378
utf_8
fce354eefa60b3dd2a21b0878c231ee8
// { dg-do assemble } // prms-id: 701 extern "C" { int printf(const char *, ...); } void Munge(int& x) // { dg-message "passing argument 1" } { x = 2; } class A { public: int i; A(int x) : i(x) {} void Safe() const; }; void A::Safe() const { Munge(i); // { dg-error "invalid initiali...
google
android
pmf2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/pmf2.C
1,221
utf_8
bf1759a2afdf502ed48c5eaa28f88d1f
// { dg-do run } extern "C" int printf(const char *, ...); class A_table { int c; public: A_table() { c = 3;} virtual void func2(int &item) { printf("func2(%d,) c=%d\n",item,c);} }; class B_table : private A_table { public: typedef void (B_table::* B_ti_fn) (int &item); B_table() { j = 0x4321;} virtual v...
google
android
p11110
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p11110.C
350
utf_8
e2feac9127adf4e8c8be5089abc9d8de
// { dg-do assemble } // prms-id: 11110 class data; class conatiner { public: virtual void* first (); virtual data* contents (void* i); }; class user { public: data* data1 () const; private: conatiner& _c; }; data* user::data1() const { return (_c.contents (_c.first)); // { dg-error "invalid use of no...
google
android
net40
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net40.C
258
utf_8
2f2541bf5b0e85ee09355583f2630b4e
// { dg-do run } #include <stddef.h> #include <stdlib.h> class toto { public: void * operator new (size_t t) { abort(); } void operator delete (void*p, size_t t) { abort(); } }; int main() { toto * p; p = new toto[5]; delete [] p; }
google
android
p8460
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p8460.C
190
utf_8
33264a969fb250b3e91cf07a1018c26a
// { dg-do assemble } // prms-id: 8460 class A { public: A(); A(int) { } A(const A&) { } private: }; int main() { A a; a.A(1); // { dg-error "" } cannot find name this way }
google
android
p2394
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p2394.C
473
utf_8
e889e3271509938bfb1799b00e72a841
// { dg-do run } // prms-id: 2394 class Foo { public: int x; int y; Foo(int i, int j) { x = i; y = j; } } foo(10, 11); class Wasted { int unsed; }; class Bar : Wasted, public Foo { public: Bar() : Foo(12, 13) { } } bar; int test0() { int Foo::* pmi = &Foo::y; return (int)(foo.*pmi); } int test1() { ...
google
android
eh26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh26.C
269
utf_8
426aad51dcaa306b4f14a5e7a917b13f
// { dg-do run { xfail sparc64-*-elf arm-*-pe } } // { dg-options "-fexceptions" } class MyExceptionHandler { }; main() { try { throw MyExceptionHandler(); } catch(const MyExceptionHandler& eh) { return 0; } catch(...) { return 1; } return 1; }
google
android
net19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net19.C
401
utf_8
f0b18a96412fba40036c5cc3ed4f11e9
// { dg-do assemble } // Test to make sure &<incomplete record type> works in c++ struct FILE { int _flags; }; extern struct _fake_filebuf __std_filebuf_2; class Value { int width; public: Value(); friend Value operator&( __const Value&, ...
google
android
p5469
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p5469.C
264
utf_8
1a935fddf8f373c48dd3eee1ba9c897d
// { dg-do run } // prms-id: 5469 int count; class A { A(); A(const A&); public: A(int) { ++count; } ~A() { --count; } int operator== (const A& r) { return 0; } }; int main() { { A a (1); if (a == 2 && a == 1) ; } return count; }
google
android
p8825
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p8825.C
148
utf_8
c72a798543e6c81aadc0d950380daad4
// { dg-do assemble } // prms-id: 8825 class A { typedef A x; }; class B { typedef B x; }; class C : public A, public B { typedef C x; };
google
android
net34
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net34.C
838
utf_8
0b99d5ae3cfcaf801570bec710c47ef5
// { dg-do run } // { dg-options "" } #include <iostream> class foo { public: foo(int i) {k = i;} protected: int k; }; class bar_1 : public foo { public: bar_1(int i) : foo(i) {} int get_k() {return k;} }; class bar_2 : public foo { public: bar_2(int i) : foo(i) {} int g...
google
android
ns15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/ns15.C
597
utf_8
0ed11b4a4f5389ab9000774f49fd2938
// { dg-do assemble } // { dg-xfail-if "" { xstormy16-*-* } { "*" } { "" } } #include <stdio.h> #include <stdlib.h> #define MAX 256 #define MAXSTATE 1000000 struct R { int count; int state1; int state2; }; int cmp_d(const R* a, const R* b) { return a->count > b->count; } namespace CXX { template<class T,...
google
android
mangle2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/mangle2.C
248
utf_8
20d83b29da6597663dbc53d1ccc46699
// { dg-do assemble } // { dg-options "" } typedef struct { } color; void foo(color) { } #ifdef sparc void f1() asm("foo__FG3$_0"); void f1() { } void f2() asm("_foo__FG3$_0"); void f2() { } void f3() asm("__foo__FG3$_0"); void f3() { } #endif
google
android
for3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/for3.C
294
utf_8
45614c0636f513ef349aa932b1e98cc3
// { dg-do assemble } // { dg-options "-Wshadow" } int main(int i) { // { dg-warning "" } shadowed decl for(int i=1; i < 3; i++); // { dg-warning "" } declaration of for(int i=1; i < 3; i++); // { dg-warning "" } declaration of for(int j=1; j < 3; j++); for(int j=1; j < 3; j++); }
google
android
net30
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net30.C
181
utf_8
8eba26f3f24ac2280d1e1f07222fb6db
// { dg-do assemble } class X { public: void x(void); }; class Y : public X { }; class Z : private Y { public: void y(void); }; void Z::y(void) { x(); // should be OK }
google
android
p12306a
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p12306a.C
466
utf_8
c4dcd550948be751ed2cff210eb115fc
// { dg-do run } // prms-id: 12306 // a net report of the same problem as 12306 class a { public: int i; }; class g : virtual public a { }; class b : virtual public a { int j; }; class c : public g, public b { }; class d { public: virtual class b* get() {return 0;} }; class f : public d { public: ...
google
android
eh45
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh45.C
398
utf_8
52098c9dc07ae7ac2528293e3260932a
// { dg-do run } int i; int fail; class ca { public: ca() { if (++i != 1) fail = 1; } virtual ~ca() { if (++i != 4) fail = 4; } }; class cb { public: cb(const ca &rca) { if (++i != 2) fail = 2; } virtual ~cb() { if (++i != 3) fail = 3; } }; void foo(const cb &...
google
android
dyncast5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/dyncast5.C
1,274
utf_8
85f0e8d1ccc85a511c10e149de6699ef
// { dg-do run } #include <stddef.h> void *p; int fail; class HeapTracked { public: virtual ~HeapTracked() = 0; void *operator new(size_t size); void operator delete(void *ptr); static bool isObjectAllocation(const HeapTracked *ptr); }; HeapTracked::~HeapTracked(){} void * HeapTracked::operator new(...
google
android
p6058
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p6058.C
564
utf_8
475b47a42ee70abe78335897be8ea9d6
// { dg-do assemble } // { dg-options "-fexceptions -pedantic-errors" } // prms-id: 6058 void bar(struct s1 { } a) { (void)a; } // { dg-error "" } struct s2*fooey() { try { static_cast<struct s3 { } *>(0); // { dg-error "" } const_cast<struct s4 { } *>((s4*)0); // { dg-error "" } reinterpret_ca...
google
android
debug1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/debug1.C
163
utf_8
0c91e02e7644b50ede450d7cb1446994
// { dg-do assemble } // { dg-options "-g -O -fkeep-inline-functions" } class c { public: ~c () { }; }; int foo (const c& lhs) { c str (lhs); return 0; }
google
android
eh47
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh47.C
311
utf_8
f8183dcbc6058df4590cc83c33f4aa2f
// { dg-do run { xfail sparc64-*-elf arm-*-pe } } // { dg-options "-fexceptions" } #include <cstdlib> #include <exception> void myterm() { exit (0); } main() { try { throw ""; } catch (...) { } try { std::set_terminate (myterm); throw; } catch (...) { return 1; } return 1; }
google
android
p3538b
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p3538b.C
739
utf_8
b1b966c3965a606c26db54bfd2b2e5ad
// { dg-do assemble } // prms-id: 3538 // This tests for an ambiguous conversion of the this pointer (going // down to DECL_CONTEXT of a FUNCTION_DECL. class ccObjectInfo { public: virtual const ccObjectInfo& repInvariant (int); }; template<class T> class ccHandle : public ccObjectInfo { protected: T* p; pub...
google
android
net14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net14.C
165
utf_8
6244bb180f7da963718f9bc0cfdfcda6
// { dg-do assemble } // this probably does not have correct debugging info generated. typedef struct Thing { Thing(); int x; } Thing;
google
android
p5673
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p5673.C
182
utf_8
7f521645b6bf7842d609aec10c16b92d
// { dg-do run } // prms-id: 5673 class A { public: operator int () { return 7; } ~A(); }; int foo() { return A(); } int main() { return foo() != 7; } A::~A() { }
google
android
p1862
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p1862.C
636
utf_8
2cc0d722d21a29ba111bd534794ebb39
// { dg-do run } // GROUPS vtable extern "C" int printf (const char *, ...); class A { public: virtual ~A(){} virtual int type(void) { return -1; } }; class B { public: virtual ~B(){} }; class C0 : public B, public A { public: virtual int type(void) { return 0; } }; class C1 : public C0 { ...
google
android
p4246
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p4246.C
564
utf_8
08a37d133c402084e71556dd65ad82fd
// { dg-do run } // prms-id: 4246 extern "C" void abort (); int num_d; class A { public: A() { } virtual ~A() { } virtual void id() { } }; class B { public: B() { } virtual ~B() { } virtual void id() { } }; class C : public A, public B { public: C() { } virtual ~C() { } void id() { abort();...
google
android
p10148
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p10148.C
423
utf_8
e4699854bed66b3f68a770685ea0d61a
// { dg-do run } // { dg-options "" } // prms-id: 10148 int fail = 1; void ok() { fail = 0; } class TC { int s_; }; class TIRD { public: void (*itc)(); TIRD() { itc = ok; } }; class TCCB : public TC, public TIRD { }; class TCRCB : public TCCB { public: virtual void eat (); }; void TCRCB::eat () { void ...
google
android
p4238
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p4238.C
174
utf_8
e7ec7bd63f6db6afe87b63ecd2e7d5de
// { dg-do assemble } // This showed a problem with default op= // prms-id: 4238 struct sigcontext { int sc_wbuf[31][25]; }; // { dg-bogus "" } default op= seems broken
google
android
p4750
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p4750.C
264
utf_8
8ac43191f98210fa0bcfdc44d55770e3
// { dg-do assemble { target native } } // { dg-options "-fpic -pedantic-errors -S" } // prms-id: 4750 extern const int FRAME_VEC_MAX; const int FRAME_VEC_MAX = 12; int frame_vec_sizes[FRAME_VEC_MAX+1] = { 0, 1, 3, 3, 6, 6, 6, 9, 9, 9, 12, 12, 12 };
google
android
ns1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/ns1.C
115
utf_8
18b189c7ce9975404c5da7000eae77d6
// { dg-do run } namespace Foo { int bar() { return 0; } } using namespace Foo; int main() { bar(); }
google
android
p2736
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p2736.C
577
utf_8
5de470969094eb667c0f4a6dfede0ef5
// The VxWorks kernel has no implementation of atexit, so local statics // are never destroyed. // { dg-do run { xfail vxworks_kernel } } // This is a poor test case, it is meant to ensure that function local // statics are destroyed at the right time. See PR 2736 for details. // prms-id: 2736 #include <stdlib.h> i...
google
android
eh48
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh48.C
510
utf_8
2abe3b18a084b2fbe09928b1cd1fe387
// { dg-do run { xfail sparc64-*-elf arm-*-pe } } // { dg-options "-fexceptions" } #include <exception> #include <stdlib.h> using std::uncaught_exception; class A { public: ~A() { if (uncaught_exception ()) exit (0); } }; int main() { if (uncaught_exception ()) return 1; try { throw ""; }...
google
android
misc12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/misc12.C
265
utf_8
da1ce6afddaab5620bf824cf528ecf55
// { dg-do assemble } // GROUPS passed struct A { virtual void f(); }; struct B { virtual void f() ; }; struct C : virtual A , virtual B { virtual void f(); }; /* This used to get an error because the DECL_CONTEXT was blown away. */ void g(A *ptr) { ptr->f(); }
google
android
p9706
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p9706.C
663
utf_8
477e5601067b35a4b0eb32aa141b908c
// { dg-do run { xfail sparc64-*-elf arm-*-pe } } // { dg-options "-fexceptions" } // prms-id: 9706 #include <stdlib.h> int count, acount; void *operator new(size_t sz) { ++count; return malloc (sz); } void operator delete(void *p) throw() { --count; free (p); } class A { public: A() { ++acount; } A(const A&) {...
google
android
net20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net20.C
134
utf_8
ed72c29086bebb4ba46634996ad57aa1
// { dg-do assemble } // A pointer to member function test case. struct X { }; void (X::* fee ())() { lab: goto lab; return 0; }
google
android
net31
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net31.C
1,399
utf_8
9da8a99a0de586df6f86aeee6badc669
// { dg-do assemble } class foo_a { protected: double func(int xi) {return 0.0;} public: foo_a() {} }; class foo_b { public: foo_b(int); foo_b(); ~foo_b(); foo_b(const foo_b&); double& operator()(int); foo_b& operator=(foo_b&); void bar_a(...
google
android
p8269
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p8269.C
161
utf_8
a8d1f43c29337c73cef852c3b839c49f
// { dg-do assemble } // prms-id: 8269 typedef char* const char_ptr; class Foo_Bar { public: static char* const counter; }; char_ptr Foo_Bar::counter = 0;
google
android
p6610b
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p6610b.C
432
utf_8
1d9b4b88ab42fb70b17b3240da3263ef
// { dg-do run } // prms-id: 6610 int fail = 1; struct B; struct A { virtual int f(const B*) = 0; int g(const B*); }; int A::g(const B* t) { return f(t); } struct B : virtual A { int f(const B*); B* B_this; }; int B::f(const B* t) { return t == this; } struct S1 { }; struct C : virtual S1, virtual B, virtual A { C();...
google
android
p9732c
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p9732c.C
115
utf_8
ba1d7c99a7bb61b9dcb2dcf3b54facba
// { dg-do assemble } // prms-id: 9732 struct foo {}; foo& x() { return foo(); } // { dg-error "invalid init" }
google
android
net11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net11.C
203
utf_8
1943b8a0ba3e57ee8e1a45729af9388a
// { dg-do assemble } // { dg-options "-pedantic-errors" } struct Foo { char *p; const char *q; void m() const; }; void other(char &x); void Foo::m() const { other(*p); // this is legal }
google
android
p4263
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p4263.C
264
utf_8
6538ddb934e930743862cc56fcc2d9c3
// { dg-do assemble } // prms-id: 4263 enum OT {A_type, B_Type}; enum AT {A, B}; /* These are not ok. */ OT t = A; // { dg-error "" } OT e2 = 1; // { dg-error "" } OT e3 = 1.1; // { dg-error "" } /* These are ok. */ int i = A; double d = A; OT e4 = A_type;
google
android
p4736a
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p4736a.C
431
utf_8
e79018dfdcda343a7caddbb25a5b7da3
// { dg-do run } // prms-id: 4736 int did_fail = 1; class O { public: virtual void of() { } }; class A : public O { public: virtual void vf() { } }; class W { public: virtual void vf() { } }; class X : public W, public A { public: virtual void vf() { } }; class Z : public X { public: virtual void vf() ...
google
android
s35520
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/s35520.C
86
utf_8
0ab0374962964cf99132d3da38867803
// { dg-do assemble } static void kbdNormal() { } void (*keyHandler)() = kbdNormal;
google
android
eh36
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh36.C
371
utf_8
e8ac0e863192eebea4391b9ef5bfaa6e
// { dg-do run { xfail sparc64-*-elf arm-*-pe } } // { dg-options "-fexceptions" } #include <typeinfo> class A { int space; }; class B { public: int data; B(int i) : data(i) { } }; class D : public A, public B { public: D(int i) : B(i) { } } d(42); main() { try { throw &d; } catch (B* b) { if...
google
android
p438
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p438.C
363
utf_8
b791decc83ba3fdb9c3f22e45bb40a47
// { dg-do assemble } // prms-id: 438 class D; class C { public: void test() const; }; class D { public: void a(C& b); // { dg-message "D::a|no known conversion" } }; void C::test() const { D d; d.a(*this); // { dg-error "match" } *this is const, so should get error // { dg-message "candidate...
google
android
net10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net10.C
221
utf_8
cd9054e1e5f8438c5b5ed72aa90b5f17
// { dg-do assemble } // { dg-options "-pedantic-errors" } const int ci=10, *pc = &ci, *const cpc = pc, **ppc; int i, *p, *const cp = &i; int main() { i = ci; *cp = ci; pc++; pc = cpc; pc = p; ppc = &pc; }
google
android
net22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net22.C
313
utf_8
dd897b060e18a57913573828d835f10c
// { dg-do assemble } class Parent { public: Parent() {} Parent( char *s ) {} }; class Child : public Parent { // { dg-message "note" } called }; int main() { Child c( "String initializer" ); // { dg-error "match" } bad // { dg-message "candidate" "candidate note" { target *-*-* } 12 } return 0; }
google
android
visibility-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/visibility-1.C
491
utf_8
b602c376ec5ff3d1db7c5a438588de18
/* Test visibility attribute on template member function instantiations. */ /* { dg-do compile } */ /* { dg-options "-fvisibility=hidden" } */ /* { dg-require-visibility "" } */ /* { dg-final { scan-not-hidden "_ZN7myClassIiE3maxEii" } } */ #define EXPORT __attribute__((visibility("default"))) template <class T> ...
google
android
p10416
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p10416.C
190
utf_8
a7a6d47941956a765eef77a6f8261b3a
// { dg-do assemble } // { dg-xfail-if "" { sparc64-*-elf arm-*-pe } { "*" } { "" } } // { dg-options "-fexceptions" } // prms-id: 10416 class not_ok { public: void f() throw(int) { } };
google
android
p3764
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p3764.C
554
utf_8
4b1a7c34b8ed5d990961952f0b22e280
// { dg-do assemble } // prms-id: 3764 class Menu; class MenuItem; class MenuAction { public: virtual void execute (Menu& menu, MenuItem& menuItem) = 0; protected: MenuAction () {} }; class Test { class MenuCBA : public MenuAction { public: typedef void (Test::* MenuCBA_Member) (Menu& menu, MenuItem&...
google
android
p4068
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p4068.C
239
utf_8
66fb34038131ca2a5c3f21e7cd432a94
// { dg-do run } // prms-id: 4068 struct A { A(); typedef void (A::*F)(); void d(); void foo() { } F& f() { return f_; } F f_; }; A::A() : f_(&A::foo) { } void A::d() { (this->*(f()))(); } int main() { A a; a.d(); }
google
android
explicit2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/explicit2.C
526
utf_8
5d4b3f2ce15b60cc3c7c9355f7f02c50
// { dg-do assemble } class string { public: string(const char*) { } explicit string(int size) { } }; void foo(string) { } string bar() { foo("hello"); // ok foo(string(2)); // ok foo(2); // { dg-error "" } no implicit conversion from int to string string x = 2; // { dg-error "" } no implicit conve...
google
android
net42
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net42.C
410
utf_8
4f61ec7d766463300ed40fbe4c73980e
// { dg-do assemble } typedef void (*__sighandler_t)(int); struct sigaction { __sighandler_t sa_handler; }; struct task_struct { struct sigaction sigaction[32]; }; void get_stat() { struct task_struct ** p = 0; unsigned long bit = 1; unsigned long sigignore = 0; int i = 0; switch((__SIZE_TYPE__) (*p)...
google
android
eh50
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh50.C
351
utf_8
0da00905d1a5c1ef1231106ffc9a27ab
// { dg-do run { xfail sparc64-*-elf z8k-*-* arm-*-pe } } // { dg-options "-fexceptions" } #include <exception> void my_unexpected() { throw 42; } template <class T> void foo(T) throw (int) { throw "Hi"; } main() { std::set_unexpected (my_unexpected); try { foo(1); } catch (int i) { if (i == 42) ...
google
android
net16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net16.C
323
utf_8
408295eaf840ff85c9f71e987a5c0596
// { dg-do run } // On an i386, this core dumps because the reg-stack.c code is wrong, and // pops an fp register that it thinks is not used, but it is. extern "C" int printf (const char*, ...); struct S { ~S () { } }; double f (S) { return 5; } int main() { S s; double dist = f (s); printf ("%g\n", dist); return 0;...
google
android
eh46
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh46.C
643
utf_8
ef55f86e1f7f58007b5e5224013d6310
// { dg-do assemble } // { dg-xfail-if "" { arm-*-pe } { "*" } { "" } } // { dg-options "-fexceptions" } int atoi(const char *); struct ios { virtual ~ios(); }; class fstreambase : virtual public ios { }; class ifstream : public fstreambase { }; class ofstream : public fstreambase { }; extern const short O; ext...
google
android
mi1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/mi1.C
509
utf_8
a5a20b474dfedd22ce291f83012e6f40
// { dg-do run } // { dg-options "-w" } class A { public: virtual ~A(){}; virtual int type(void) { return -1; } }; class B : public A { public: virtual ~B(){}; }; class C0 : public B, public virtual A { public: virtual int type(void) { return 0; } }; class C1 : public C0 { public: virtual in...
google
android
misc14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/misc14.C
402
utf_8
93add0632516dbe14bb4b6b5c500f2eb
// { dg-do run } // GROUPS passed extern "C" int printf (const char *, ...); extern "C" void exit(int); class A { public: virtual ~A() { printf("FAIL\n"); exit (1); } }; class B : public A { public: virtual ~B() { printf("PASS\n"); exit (0); } }; int main() { B b; A *ap = &b; ap->~A();...
google
android
virt6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/virt6.C
649
utf_8
7240cae0387b1d43adfbdb2539476c43
// { dg-do run } // This testcase ensures that we can build vtable names for complex MI // classes. class C_A { public: virtual int foo(void *) { return 0; } } a; class C_B : public C_A { } b; class C_C : public C_A { } c; class C_D : public C_A { } d; class C_E : public C_C, public C_B { public: virtual...
google
android
net7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net7.C
113
utf_8
3b0a59fdf2e871154f766f5c2e0554f0
// { dg-do assemble } // { dg-options "" } // This should compile. int foo (signed char *); int foo (char *);
google
android
eh40
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh40.C
375
utf_8
e6ba830cc6481da95dd65b5db9ad0278
// { dg-do run { xfail sparc64-*-elf arm-*-pe } } // { dg-options "-fexceptions" } int fail = 1; class B { public: B() { throw 1; } }; class D : public B { public: D() try : B() { fail = 1; } catch (char c) { fail = 1; throw; } catch (...) { fail = 0; throw; } }; main() { try { D d...
google
android
misc1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/misc1.C
695
utf_8
8bf0ae9467ae58915d74cf8e2d3445f2
// { dg-do run } // GROUPS passed construct-destruct /* g++ constructs j 13 times, and destructs it once. */ extern "C" { int printf (const char *, ...); void exit(int); } void foo() { } class C { int val; public: static int count; C(int ii) { val = ii; ++count; printf("up\n"); } ~C() { ...
google
android
p2846b
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p2846b.C
1,116
utf_8
60c4e62b2d4472f11e5d9c1c76530654
// { dg-do run } // Shows that problem of initializing one object's secondary base from // another object via a user defined copy constructor for that base, // the pointer for the secondary vtable is not set after implicit // vtable for the secondary base left over from the user defined copy // constructor for that ba...
google
android
p5611
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p5611.C
120
utf_8
18364084554acc54c8f6a87f5c8462e1
// { dg-do run } // prms-id: 5611 int main(void) { struct B { virtual void b1() { } }; return 0; }
google
android
net15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net15.C
635
utf_8
deb64da9194335a65907087580028837
// { dg-do run } // InterViews (ibuild) requires this to work. extern "C" void exit(int); void *old; class c1 { int i; public: c1 () {} }; class c2 { int j; public: c2 () {} }; class c3 : public c1, public c2 { public: c3 () { old = this; // printf("new object c3 at %x\n", (int)this); } ...
google
android
p3524c
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p3524c.C
259
utf_8
c0f1d32ce4ef83a2ef41ecaaaf05b504
// { dg-do assemble } // Make sure we can cast to a templated type, that requires a conversion by // constructor, from a non-aggregate type. // prms-id: 3524 template <class T> struct ccPair { ccPair (int i) { } }; void foo () { (ccPair<float>)1; }
google
android
ns5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/ns5.C
199
utf_8
0e59928b45a4ab704b3775f904c2ab5c
// { dg-do assemble } namespace A { int i = 1; // { dg-message "A::i" } } int j = i; // { dg-error "" } // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } 6 }
google
android
eh10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh10.C
318
utf_8
c35d4a2175cf5f6443d0cbea273e9b35
// { dg-do run { xfail sparc64-*-elf arm-*-pe } } // { dg-options "-fexceptions" } void foo() { int i; i = 42; throw i; } void ee(int *); void bar() { int i = 2; ee(&i); } void ee(int *) { } main() { try { foo(); return 3; } catch (int& i) { bar(); return i != 42; } return 2; }
google
android
p8620
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p8620.C
141
utf_8
fc62e8b9edb86d2587ebe5d1bdc7dbd4
// { dg-do assemble } // prms-id: 8620 struct S { long l; }; typedef unsigned long l; void f() { S* p; if (p->l < 0) return; }
google
android
p4671
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p4671.C
290
utf_8
f3429bac8d6cf8c6e09d39a1447f4b20
// { dg-do assemble } // prms-id: 4671 class ccUnwind { public: virtual void _c_getInfo() const; virtual ~ccUnwind (); }; class ccTransmittable { public: virtual ~ccTransmittable(); }; class ccCommand : public ccUnwind, public ccTransmittable { }; class foo : public ccCommand { };
google
android
p8483
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p8483.C
318
utf_8
b3e302bb0a97791145a6de62ede07f3a
// { dg-do run } // prms-id: 8483 int count; class A { public: A() { ++count; } ~A() { } }; class B { private: A b[2]; }; class C { public: private: A c[2][2]; }; class D { public: private: A d[2][2][2]; }; int main() { { A a; } { B b; } { C c; } { D d; } if (count != 15) return 1; }
google
android
eh41
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh41.C
443
utf_8
3614d36cc02d33e0dd3ed7c28a33f241
// { dg-do run { xfail sparc64-*-elf arm-*-pe } } // { dg-options "-fexceptions" } int fail = 0; struct A { A () { a = 'a'; b = 'b'; c = 'c'; } ~ A () { if ( a != 'a' ) fail = 1; if ( b != 'b' ) fail = 1; if ( c != 'c' ) fail = 1; } char a, b, c; }; void some_init () { throw 1; } struc...
google
android
pmf9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/pmf9.C
238
utf_8
0d0a72886399dd539462e97ce580afdb
// { dg-do run } class K { public: int f(int i) { return i; } }; class Q { public: Q() { kp = new K; } int g(); private: K * kp; }; int Q::g() { return (kp->f)(42); } int main () { Q q; if (q.g() != 42) return 1; }
google
android
dyncast1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/dyncast1.C
297
utf_8
ace99590d34eb0094953512378201308
// { dg-do run { xfail sparc64-*-elf arm-*-pe } } // { dg-options "-fexceptions -w" } #include <typeinfo> struct B { virtual int f() { } }; struct D { virtual int f() { } }; main() { B b; try { (void)dynamic_cast<D&>(b); } catch (std::bad_cast) { return 0; } return 1; }
google
android
p5571
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p5571.C
1,043
utf_8
7862ccbfc24631e1c8cc9f04873dfb41
// { dg-do run } // prms-id: 5571 int e = 0; void *vp = 0; class ParentOne { public: ParentOne() {} #ifdef MAKE_WORK virtual ~ParentOne() {} #endif private: char SomeData[101]; }; class ParentTwo { public: ParentTwo() {} virtual ~ParentTwo() {} private: int MoreData[12]; virtual int foo() { return 0; ...
google
android
p7912
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p7912.C
302
utf_8
f9ad056c846b5523a365885f16c5b781
// { dg-do run { xfail sparc64-*-elf arm-*-pe } } // { dg-options "-fexceptions" } // prms-id: 7912 int count = 0; class Foo { public: Foo() { ++count; }; Foo(const Foo&) { ++count; }; ~Foo() { --count; }; }; main() { try { throw Foo(); } catch (Foo object) { } return count; }
google
android
p7651
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p7651.C
338
utf_8
c72b8635bd4c8a699c1f38ebb8414856
// { dg-do run } // prms-id: 7651 int fail = 0; class Foo { public: Foo(double i) : data(i) { if (data != 1.0) fail = 1; } ~Foo() { if (data != 1.0) fail = 1; } private: volatile double data; }; int DingDong(double A) { volatile Foo a(A); if ( A != 0.0 ) { return 1; } return 0; } int main() { ...
google
android
ns2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/ns2.C
91
utf_8
9be7d6e725403b1902c85e3e64c44b8a
// { dg-do run } namespace N { int i; } using namespace N; int main() { return i; }
google
android
net13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net13.C
171
utf_8
7c89530ff9fd80f6511e504fdc1d1f22
// { dg-do assemble } // make sure extern "C" friends work. extern "C" { void func(); } struct crash { int i; friend void func(); } a; void func() { a.i = 1; }
google
android
ns7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/ns7.C
217
utf_8
f6154254f59f8d91e8d75c6467ab7803
// { dg-do assemble } namespace A { int i = 1; // { dg-message "A::i" } } namespace B { int j = i; // { dg-error "" } // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } 8 } }
google
android
p3524b
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p3524b.C
340
utf_8
693b6c60f422fdab956590df5258b75c
// { dg-do assemble } // Make sure we can cast to a templated type, that requires a conversion by // constructor, from a derived type to a base type. // prms-id: 3524 template <class T> struct ccPair { ccPair () { } }; template <class T> struct ccO : ccPair<T> { ccO () { } }; void foo () { ccO<float> r; ...
google
android
p8786
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p8786.C
229
utf_8
8856a44a30fe6484fa001b3ed5121e1f
// { dg-do assemble } // { dg-options "-O" } // prms-id: 8786 class B { public: ~B(); }; class D : public B { public: D(int); }; int foo() { D t(0); bool h = 1; if (h) { D p(0); return 0; } return 0; }
google
android
eh1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh1.C
628
utf_8
9e7c5feec1ed6da88ac2e9fd0aa7dccb
// { dg-do assemble } // { dg-options "-fexceptions -O -S" } extern "C" int printf (const char *, ...); extern "C" int atoi (const char *); extern "C" void exit (int); struct Exception { int v; Exception(int i) { v = i; }; }; void inc(int &i) { try { if (i == 0) throw Except...
google
android
eh3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh3.C
286
utf_8
b7fa20379a5b48ef16b0a75fd8198fb6
// { dg-do run { xfail sparc64-*-elf arm-*-pe } } // { dg-options "-fexceptions" } class foo { public: class error {}; void cause_error(void) { throw error(); } }; int main(void) { foo f; try { f.cause_error(); } catch (foo::error&) { return 0; } return 1; }
google
android
misc3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/misc3.C
100
utf_8
473921d830110d536bc5bc6135616708
// { dg-do assemble } // GROUPS uncaught int a;// { dg-message "" } .* int a;// { dg-error "" } .*
google
android
ns9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/ns9.C
117
utf_8
4a3de2ed51c5c86f093a526a49706d78
// { dg-do run } namespace Foo { int bar() { return 0; } } using Foo::bar; int main() { return bar(); }
google
android
p7865
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p7865.C
289
utf_8
480520bf49d17525acbe91efff31b383
// { dg-do run } // prms-id: 7865 int count; struct A { A() { ++count; } ~A() { --count; } }; int foo() { return 1; } int bar() { A a; for (;;) { A b; if (foo()) return 0; if (foo()) return 0; } return 0; } int main() { bar(); return count; }
google
android
pmd1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/pmd1.C
154
utf_8
78f5eb9b8316817c46e62d2bbc11b749
// { dg-do assemble } class A; struct XX { int A::*py; }; class A { public: int p; void setp(XX *xp); }; void A::setp(XX *xp) { xp->py = &A::p; }
google
android
p8039
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p8039.C
204
utf_8
8472419124354902b61c57d6a82f2ee7
// { dg-do assemble } // prms-id: 8039 class C { public: int func (); }; extern void bar(int*); int main() { int (C::*mfp)() = &C::func; bar((int*)mfp); // { dg-error "" } no clear semantics }
google
android
net23
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net23.C
205
utf_8
1b1082e7d062b133767d098f62d4b100
// { dg-do assemble } class environment { public: int get_font() ; }; typedef int (environment::*INT_FUNCP)(); void myfoo(INT_FUNCP a); void init_env_requests() { myfoo(&environment::get_font); }
google
android
eh5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh5.C
297
utf_8
e8830fa94b8e95afd3d97b061a114384
// { dg-do run { xfail sparc64-*-elf arm-*-pe } } // { dg-options "-fexceptions" } class foo { public: class error {}; void cause_error(void) { throw "Hello World!"; } }; int main(void) { foo f; try { f.cause_error(); } catch (const char cp[]) { return 0; } return 1; }
google
android
pmf8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/pmf8.C
429
utf_8
4d623182737c4a611535ee30b2f4a975
// { dg-do run } int fail; class A *ptr_a; class A { public: char space1[24]; virtual void foo() { if (this != ptr_a) fail = 1; } }; class Space { char space2[36]; }; class B : public Space, public A { } b; void (B::*pmf1)() = &A::foo; void (A::*pmf2)() = &A::foo; int main() { ptr_a = &b; (...
google
android
p2846a
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p2846a.C
719
utf_8
d6d68f430bfaba7d33736d647fbc5f9a
// { dg-do run } // Shows that problem of initializing one object's vtable pointer from // another object's vtable pointer when doing a default copy of it // and the vtable pointer involved is the main one. // Correct answer is B::print. // g++ prints D::print, which is wrong. Cfront gets is right. // prms-id: 2846...
google
android
pmf4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/pmf4.C
165
utf_8
8b18309b744fe7614cc29c20e9a8316f
// { dg-do assemble } class NF { }; struct QF { NF nf; typedef float(NF::* const NPF)() const; void p (NPF npf) const { float q = (nf.*npf)(); } };
google
android
net3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net3.C
196
utf_8
7ff8d6daf63881f79c2dcb40a00920b6
// { dg-do assemble } // Here is another program from the net. class BOOL { public: int val; BOOL(int i =0); operator int(); }; BOOL& foo() { static BOOL status; return status; }
google
android
p4693
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p4693.C
263
utf_8
c02eafb028d82f1c577cfa700db86211
// { dg-do assemble } // prms-id: 4693 class a { public: virtual ~a(); }; class b { public: virtual void set_var() = 0; }; class c : public b, public a { }; class d : public c { public: void set_var() { } }; int main() { d * test; test = new d; }
google
android
unroll1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/unroll1.C
138
utf_8
952bab3887bfbee188ffdab05f3e1463
// { dg-do assemble } // { dg-options "-g -O -funroll-loops" } struct A { inline ~A() { } }; void foo (A) { while (1) A bar; }