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
lookup13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/lookup13.C
247
utf_8
85667729a1c4d4a36960f668f2a14dd0
// { dg-do run } int main() { typedef double I; struct S1 { typedef char I; struct S2; }; struct S1::S2 { typedef I J; }; return !(sizeof (S1::S2::J) == 1); }
google
android
init14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/init14.C
202
utf_8
f715f2cfa734fefb76e0bb097139a60c
// { dg-do assemble } typedef struct { int count; } mbstate_t; struct fpos { mbstate_t _M_st; fpos(int __pos) : _M_st() { } }; int main () { fpos f (2); }
google
android
access9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/access9.C
192
utf_8
275ffe84a13a7a7254b6c04ac584ef8b
// { dg-do assemble } // Test that g++ allows friends to use private types in their declarations. class A { typedef int I; friend I f (I); }; A::I f (A::I); A::I f (A::I) { return 0; }
google
android
new5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/new5.C
205
utf_8
32154308cdeb3f9a775d1995218bf06b
// { dg-do run } // Test that const-correctness is observed when using new. struct A { A() { } int f () { return 1; } int f () const { return 0; } }; int main () { return (new const A)->f (); }
google
android
local-alloc1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C
303
utf_8
f11c8fcb7786f73f1f8445b703023cc7
// { dg-do assemble { target fpic } } // { dg-options "-O0 -fpic" } // { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } struct bar { bar() {} double x[3]; }; static bar y[4]; void foo(int z) { bar w; y[z] = w; }
google
android
externC3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/externC3.C
271
utf_8
d9d8a652760a5ef1b74c8b6ce815177d
// { dg-do run } // Test that two extern "C" declarations of the same name in different // namespaces are treated as declaring the same function. namespace foo { extern "C" int f (); } extern "C" int f () { return 0; } using namespace foo; int main () { f (); }
google
android
lineno5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/lineno5.C
568
utf_8
b10d8854438dd11a5948ffde81181923
// { dg-do assemble } // // Bug 3621. At the end of saved input, we'd set the lineno to // zero. This would confusing things no end, if there was a subsequent // error. namespace tmp { typedef int B; B b; // { dg-message "tmp::b" } } class A { public: int kaka(tmp::B = b); // { dg-error "" } no b in scope...
google
android
crash26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/crash26.C
186
utf_8
a9f67dc3be68b25679c337cb411fbadb
// { dg-do assemble } class foo { public: foo(int); }; void bar(bool x) { if(x) foo *a = new foo(foo::not); // { dg-error "" } }
google
android
using6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/using6.C
475
utf_8
fd1a1050ed74f9d20e346be428209ebf
// { dg-do run } // Test of class-scope using-declaration for functions. #define assert(COND) if (!(COND)) return 1 struct A { int f(int) { return 1; } int f(char) { return 2; } }; struct B { int f(double) { return 3; } }; struct C : public A, public B { using A::f; using B::f; int f(char) { return 4; } }
google
android
typedef5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/typedef5.C
498
utf_8
8ead358d0bc864f49c9be8d3ff66faa3
// { dg-do assemble } typedef int t; typedef t* u; typedef u v; typedef v* (*w)(t); typedef int t; typedef t* u; typedef u v; typedef v* (*w)(t const); // this is ok typedef v* (*w)(t); // { dg-message "" } covers message `previously declared here' typedef v* (*const w)(t); // { dg-error "" } invalid redeclaration typ...
google
android
ref3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/ref3.C
262
utf_8
a72ffc53a7a0019d3ab3c81b13884063
// { dg-do run } struct B1 { int i; }; struct B2 { int j; }; struct D: public B1, B2 { }; bool f (B2& b) { return b.j == 7; } int main () { D d; d.i = 2; d.j = 7; if (!f (d)) return 1; }
google
android
init5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/init5.C
574
utf_8
30819e3a76b3285d4b3e2ffcea49edaf
// { dg-do run { xfail { ! cxa_atexit } } } // Objects must be destructed in decreasing cnt order extern "C" void abort (); static int cnt; class A { int myCnt; public: A() : myCnt(cnt++) {} ~A() { if (--cnt != myCnt) abort(); } }; void f() { static A a; /* a.myCnt == 1 */ } class B { int myCnt; public: B() :...
google
android
delete5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/delete5.C
617
utf_8
f2e3e23b1fda185e1f462c9e3bf913e6
// { dg-do assemble } typedef __SIZE_TYPE__ size_t; struct X { int i; X():i(){} void *operator new(size_t) { return 0; // { dg-warning "" } cannot return NULL } void *operator new[](size_t) { return 0; // { dg-warning "" } cannot return NULL } }; struct Y { int i; Y():i(){} void *op...
google
android
new3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/new3.C
330
utf_8
eb713ae1628b9077dbad880b05e1249d
// { dg-do run } typedef __SIZE_TYPE__ size_t; template <class T> struct A { int size; A () { size = 20; T *p; p = new T[size]; int foo; foo = 5 * size; } }; struct B { virtual ~B() { } void operator delete [] (void *ptr, size_t size) { } }; int main () { A<B> *p = ne...
google
android
enum5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/enum5.C
576
utf_8
989a20c8af821e747e17e6f4d9323de7
// { dg-do run } // PR 80: Packed enums use minimum required storage. extern "C" void abort(); enum numbers { one, two, three } __attribute__ ((packed)) nums; enum colours { red = 1000, green, blue } __attribute__ ((packed)) cols; enum conditions { fine, rain, cloudy } __attribute__ ((packed)) forecast; int main() { ...
google
android
pod1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/pod1.C
314
utf_8
b8cb1438215d0abddbda0e8e4d70f10d
// { dg-do assemble } // DR 148. Now allows pointer to members in POD struct. struct X { int X::*m; int (X::*f) (); }; void Foo (int, ...); void Baz () { X x; Foo (1, x); }
google
android
dtor3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/dtor3.C
657
utf_8
8f3f1d766e7a640091d25ad94a1ffdb5
// { dg-do assemble } struct S1 { ~S1(int); // { dg-error "" } destructors may not have parameters }; template <class T> struct S2 { ~S2(int); // { dg-error "" } destructors may not have parameters }; struct S3 { ~S3(double) {} // { dg-error "" } destructors may not have parameters }; template <class T> ...
google
android
builtins9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/builtins9.C
264
utf_8
29952296a7caacc2b945db5e0b5fe8c3
// { dg-do run } // Test that inline redeclarations of builtins are emitted. // Origin: Roger Sayle Mar 28, 2002 namespace std { inline int fabs (void) { return 0; } } int main () { return std::fabs (); }
google
android
store-expr2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/store-expr2.C
1,162
utf_8
b8bbfe951a05761b4a734cd5b8b649dd
// { dg-do run { target i?86-*-* x86_64-*-*} } // { dg-require-effective-target ilp32 } // { dg-options "-mtune=generic -O2" } 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) const { return *(m + x); } }; struct H; struct J...
google
android
ptrmem10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/ptrmem10.C
151
utf_8
63a937bd90ab3d2c6b0b65c86cb6033b
// { dg-do run } // Test that we properly convert a constant ptm to bool. class A { }; int main() { int A::*const p = 0; if (p) return 1; }
google
android
ambig3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/ambig3.C
844
utf_8
9c66b70699ff1342d44eb59221237d51
// { dg-do assemble } // // A base which derives a virtual base hides declarations in the virtual base, // even if that virtual base is accessible via another path [10.2]/6. Make // sure that non-virtual bases of the virtual base are also hidden, not matter // what order bases are declared in. struct A {int a;}; stru...
google
android
redecl1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/redecl1.C
129
utf_8
cdb5dd24ac907bdd5ac1e41e63f78adb
// { dg-do assemble } struct X{ void i(); void i(int); // { dg-message "" } int i; // { dg-error "" } conflict };
google
android
parse2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/parse2.C
281
utf_8
7a4035f7336c29328d414399b423c187
// { dg-do assemble } // Bug 531: We ICEd trying to give a parse error. struct X { bool operator (const X &) const; // { dg-error "" } parse error };
google
android
static20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/static20.C
129
utf_8
19d0e5dc3a08ecffcf5d9149ae063218
// { dg-do link } struct foo { foo() {} ~foo() {} void func() { static foo x; } }; int main() { foo f; return 0; }
google
android
exprstmt1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/exprstmt1.C
702
utf_8
cb97f0a4d350c5545ed921b0c95d1800
// { dg-do run } // { dg-options "-O" } // { dg-error "limited range of data type" "16-bit target" { target xstormy16-*-* } 0 } // { dg-error "shift count >=" "16-bit target" { target xstormy16-*-* } 0 } int main() { unsigned int x = 1381237248; if (sizeof (x) != 4) return 0; x = ({ unsigned int...
google
android
syntax4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/syntax4.C
657
utf_8
4ec76c6301c0c17af229271bbe6208c0
// { dg-do assemble } // and several others. With templates, it's very easy to say something // erroneous like // template class X::X<whatever> // The culprit // ... class X::X ... // caused us to ICE as we got confused about pushing and popping scopes. class X { X (); }; class Y { public: typedef ::X W; ...
google
android
dtor13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/dtor13.C
189
utf_8
a38327344ea63a8b5d5757b2bd02efc1
// { dg-do assemble } template <class T> struct S { ~S(); }; int i; void f () { i.~S(); // { dg-error "" } invalid destructor call. }
google
android
crash38
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/crash38.C
380
utf_8
38e9fc13292b02a991e28aa2287aea10
// { dg-do assemble } // Bug 611. We ICEd when calling a member function returning an incomplete // type by value. struct X; // { dg-error "" } forward ref struct Y { X foo (); }; void baz (Y *p) { p->foo (); // { dg-error "" } incomplete }
google
android
overload7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/overload7.C
406
utf_8
2de9c31c594f1535033f0d460dc3b27d
// { dg-do run } // Check that object call works when there are multiple conversion ops // returning the same type. typedef int (*pfn)(); int zero () { return 0; } int one () { return 1; } int two () { return 2; } struct A { A() { } operator pfn () { return one; } operator pfn () const { return zero; } op...
google
android
rttid4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/rttid4.C
1,549
utf_8
8b8a007d3664432d41d8472d3dcbe836
// { dg-do run } // { dg-options "-w" } // test of rtti of single inheritance and multiple inheritance with // virtual inheritance // dynamic casting #include <typeinfo> extern "C" { int printf(const char *, ...); void exit(int); } class X { public: int xi; virtual int f() {}; }; class Y : public virtual...
google
android
inline19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/inline19.C
294
utf_8
3557e3ebfc86655982c4c545a8a9f0ad
// { dg-do assemble } // { dg-options "-O1" } // struct TBtItem { TBtItem(); }; struct TBtInnerNode { TBtInnerNode(); int MaxIndex() const { return 10; } }; TBtInnerNode::TBtInnerNode() { new TBtItem[MaxIndex()+1]; }
google
android
empty1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/empty1.C
460
utf_8
ee6c301abacfe5428f15dcdccc0731da
// { dg-do run } // This test case checks that the return value optimization works for // empty classes. // PR c++/5995 extern "C" void abort(); extern "C" int printf (const char *, ...); int i; struct A; struct A* as[10]; struct A { A () { as[i++] = this; } A (const A&) { as[i++] = this; } ~A() { if (i == 0 || ...
google
android
static13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/static13.C
212
utf_8
5119d1a435f551a1f992637ee1c301ec
// { dg-do link } struct Cleaner { ~Cleaner() {} }; template <class T> void bar () { static Cleaner cleanup; } inline void foo() { bar<int>(); } int main () {}
google
android
typedef8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/typedef8.C
426
utf_8
0651678ecc52b4445e30f811ecc33835
// { dg-do assemble } // // bug 39. We'd generated bogus errors when using a typedef of a nested class. struct X1 { typedef struct { } MyStruct1; typedef struct M2 { } MyStruct2; }; X1::MyStruct1 foo() { X1::MyStruct1 m1; return m1; } X1::MyStruct2 baz() { X1::MyStruct2 m1; return m1; }
google
android
init8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/init8.C
210
utf_8
8f1fad4a3628e33ecda8e9b1d591d956
// { dg-do assemble } // According to [dcl.init]/9, this should be ill-formed void f() { const int var [ 10 ]; // { dg-error "" } missing initializer }
google
android
init13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/init13.C
175
utf_8
5f0aeb2e2e0c81324c51ed3e0e0d43c5
// { dg-do link } // { dg-options "-O3" } void f() {} struct X { ~X() { f (); } }; X x; int main () {}
google
android
ptrmem7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/ptrmem7.C
1,617
utf_8
07dc5594e240030bc8fd36b6a702dbb5
// { dg-do assemble } // // A pointer to member can only be formed by `&T::m', however, other forms // are ok for pointer to static member. Thus the error can only be determined // after overload resolution. struct A { static int ns (short); static int ns (float); int ns (int); int ns (double); int single (...
google
android
inline13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/inline13.C
210
utf_8
6d138e6b605ced1518ce48da2e4a8313
// { dg-do assemble } struct foo { inline void bar(); foo(); }; inline void foo::bar() { switch (0) { case 0: break; } } foo::foo() { bar(); }
google
android
cond5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/cond5.C
1,451
utf_8
fd7e830683d888cfd91c1c228fe62337
// { dg-do assemble } // { dg-options "-W -pedantic -ansi" } // http://gcc.gnu.org/ml/gcc-bugs/1999-03n/msg00888.html // conditional exprs have some funny rules when one of the types is void. // [expr.cond] 5.16, make sure we do the right things // We have checks for mismatching enumerations, check we give them -- the...
google
android
inline23
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/inline23.C
219
utf_8
f1224fb4be126166d0a579ea0dc6acc8
// { dg-do link } struct B { virtual ~B() {} }; struct A : public B { ~A(); void foo(void); void bar(void); }; inline void A::foo(void) { static int i; i++; } void A::bar() { foo(); } int main() { }
google
android
op2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/op2.C
1,576
utf_8
39bfb5ff695929d899d5e0a61a26167a
// { dg-do run } // Bug 91. We'd not preserve constness looking for a base classes assignment // operator. #include <stdio.h> int value = 0; struct A { A() {} A( A& arg) { printf ("%s\n", __PRETTY_FUNCTION__); value = 1;} A( const A& arg) { printf ("%s\n", __PRETTY_FUNCTION__); value = 2;} A& operator=( A...
google
android
refinit2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/refinit2.C
718
utf_8
46335621d24696cad55e77a231ae9250
// { dg-do assemble } // // bug 381. We gave slightly different diagnostics, when binding an rvalue to // a non-const reference, depending on the precise type to the rvalue. namespace A { template <class T> void f(T) {} } void (* &h)(int) = A::f<int>; // { dg-error "" } rvalue to non-const void (*const volatil...
google
android
union3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/union3.C
201
utf_8
ec9963b19a70446506c638f4004a4f77
// { dg-do run } struct A { union { int i; }; int j; A (); }; A::A () : i (1), j (i = 0) { } int main () { A a; return a.i; }
google
android
main2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/main2.C
133
utf_8
3c711568f6920792b9d9ba90585265c2
// { dg-do assemble } double main () {} // { dg-error "" } main must return `int'
google
android
externC4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/externC4.C
153
utf_8
12b18dcb5beead4fc71db9293bcc0606
// { dg-do assemble } // Origin: Neil Booth, from PR #66 extern "C" { class foo { public: ~foo (); void bar (foo *); foo (); }; }
google
android
crash27
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/crash27.C
193
utf_8
ca920fbfee24aea8dd36d80beb365d07
// { dg-do assemble } X(Y(long, Type, CLink)); break; default: break; } } } // { dg-error "" } struct A { inline A (); }; inline A::A () { }
google
android
builtins10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/builtins10.C
201
utf_8
00a8c669c2070d4499e82d3b30319906
// { dg-do assemble } // Test that built-in functions don't warn when prototyped without arguments. // Origin: PR c++/9367 extern "C" int snprintf();
google
android
access4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/access4.C
194
utf_8
1de3c4d64d335a3547d9bd221b65e92b
// { dg-do assemble } struct A { // { dg-error "" } inaccessible static int i; }; struct B : private A { }; struct C : public B { int f () { return A::i; } // { dg-error "" } context };
google
android
builtins4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/builtins4.C
443
utf_8
e584fa125612a2948a12f82049b2da5d
// { dg-do run } // { dg-options "-O2" } // Test whether this builtin minimally works in G++. // Origin: Kaveh Ghazi Jan 16, 2001 // namespace std { extern "C" void abort (void); } int main () { using namespace std; ::__builtin_printf ("hello world\n"); ::__builtin_printf ("\n"); ::__builtin_printf ("%s\...
google
android
lookup6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/lookup6.C
284
utf_8
2e55b1de5c1daaf0fb4be724a8387f6e
// { dg-do run } int f(int i) { struct C { int i; C () : i(1) {} int f() { struct D { int i; D () : i(2) {} int g() { return i; } } d; return d.g(); } } c; return c.f(); } int main() { if (f(0) != 2) return 1; }
google
android
decl8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/decl8.C
232
utf_8
b15c94d17715a47983f0e773d7e3e2c2
// { dg-do assemble } void foo(void) { extern int i; // { dg-message "" } previous declaration extern double i; // { dg-error "" } conflicting type extern int j; extern int j; }
google
android
loop1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/loop1.C
359
utf_8
ff15837f3804b9245a281d67b6046de8
// { dg-do run } // { dg-options "-O2" } // Test for bad loop optimization of goto fixups. typedef bool (*ftype) (); int c, d; struct A { A() { ++c; } A(const A&) { ++c; } ~A() { ++d; } }; void f (ftype func) { A a; do { if ((*func)()) return; } while (true); } bool test () { return true; } main...
google
android
loop2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/loop2.C
476
utf_8
d0ed38cceb3178f8c2ffeb15967bdd06
// { dg-do assemble } // { dg-options "-O" } class foo { public: operator const char*() const { return a; } char *a; }; class bar { public: ~bar(); void operator++(int); bool b() const; protected: void* c() const; }; class baz : public bar { public: foo const &d() const { return *(foo *)bar::c(); } };...
google
android
typedef4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/typedef4.C
86
utf_8
2b0b70a2de4c754682872ec0b6788a74
// { dg-do assemble } struct A { void f (); }; typedef A foo; void foo::f() { }
google
android
typeinfo1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/typeinfo1.C
142
utf_8
b484a46bc776173d0149a8e516119f33
// { dg-do assemble } #include <typeinfo> struct S { S (const char*); }; void f(S s); void f(std::type_info); void g() { f("abc"); }
google
android
ptrmem6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/ptrmem6.C
350
utf_8
d39d6de8da2a8229f976153f5c63cb57
// { dg-do assemble } extern double *y; extern double *x; extern int nPoints; void SetInitCond(void) { int i; for(i = 2; i < nPoints; ++i) y[i] = y[nPoints] .* (x[i]-x[1]) / (x[nPoints]-x[1]); // { dg-error "" } .* }
google
android
overload5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/overload5.C
248
utf_8
ae5b9ad157b8521c8fb2675c60884102
// { dg-do link } struct S {}; struct T : public S {}; struct U : public T {}; void f(int T::*) {} void f(int U::*); void g(void (T::*)(int)) {} void g(void (U::*)(int)); int main() { int S::*ip; void (S::*fp)(int); f(ip); g(fp); }
google
android
dyncast1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/dyncast1.C
2,744
utf_8
35b77fadb22e92c8ff405a2486ab911c
// { 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++; } // 1. downcast // 1.1. si...
google
android
overload4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/overload4.C
144
utf_8
2be34216d493e2ffe4f8ae6616ea37d7
// { dg-do link } void f(int* const volatile * const * const*); void f(int* const * const * const*) {} int main() { int*** ip; f(&ip); }
google
android
std1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/std1.C
234
utf_8
23786dd5fb572a82513966937e1133a0
// { dg-do assemble } extern "C" int memcmp (const void * __s1, const void * __s2, __SIZE_TYPE__ __n) throw (); namespace std { void f () { memcmp (0, 0, 0); } }
google
android
init10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/init10.C
155
utf_8
c65ae1dbb01e95dc5e6b68b729c7b6a6
// { dg-do run } int i; struct D { D () { i++; } }; struct C { C() {} D d[1]; }; int main () { C c; if (i != 1) return 1; }
google
android
lookup7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/lookup7.C
166
utf_8
ebd8f7c10cb0f38aaab48d284f174530
// { dg-do run } // Test for handling of type shadowing in function scope. int main() { int A = 42; struct A { enum { a }; }; A = A::a; return A; }
google
android
defarg8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/defarg8.C
674
utf_8
56c31a277d90ddf2a30fb0acb32b386a
// { dg-do assemble } // { dg-options "-pedantic-errors -ansi -w" } // 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 order...
google
android
init11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/init11.C
590
utf_8
a945aed16fc33d3e6afcb1dc09661a05
// { dg-do run } // Check that elements for which no explicit initializer was given are // default-initialized properly. extern "C" int printf (const char *, ...); struct A { int i; A(): i (42) { } A(int j): i(j) { } }; A ar[4] = { 1, 2 }; struct B { A a1, a2, a3, a4; }; B b = { 1, 2 }; struct C { A ar...
google
android
cast2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/cast2.C
461
utf_8
3edf5ed8769c2a52a2ea5cbefce749fc
// { dg-do assemble } struct A { }; int main() { A a; typedef void (A::*F)(); F p; const_cast<const A>(a); // { dg-error "" } const_cast requires pointer/ref types const_cast<F>(p); // { dg-error "" } const_cast requires pointer/ref types const_cast<int (*)()>(&main); // { dg-error "" } function type in co...
google
android
main1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/main1.C
167
utf_8
b64bdc39eeed52a44af818a150fb166b
// { dg-do compile } int main() // { dg-message "previous declaration" } { return 0; } int main(int, const char**) // { dg-error "conflicting" } { return 0; }
google
android
eh
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/eh.C
260
utf_8
0268c0e962508ed426bff1e44757f34b
// { dg-do assemble } class foo { public: ~foo(); foo &operator=(const foo &); foo e() const; }; class bar { public: foo d() const; }; struct x { foo a; bar* b; }; void baz(x *f, int ic) { f->a = ic ? f->b->d().e() : f->b->d(); }
google
android
conv7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/conv7.C
785
utf_8
5377676fca91396feae110a743aa9829
// { dg-do assemble } // { dg-options "-Wconversion" } // // Bug 2726. We ICE'd trying to say something about possibly confusing // conversion overload resolution. class foo { }; template<class T> class bar { public: operator const T&() const ; operator T&() ; }; template<class T, class Ref, class NodePtr, cl...
google
android
decl4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/decl4.C
203
utf_8
87f1ee2bbfeb5481b12d8c5030343b02
// { dg-do assemble } // Simplified for testsuite by Alexandre Oliva struct foo { operator long double(); }; int bar(int __opr); int bar(int __ope);
google
android
conv6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/conv6.C
689
utf_8
513fd12232465c23dbf171d56a61cb8a
// { dg-do run } // Test for composite pointer types, as defined in [expr.rel], // and common pointer to member types, as defined in [expr.eq]. struct A { int i; }; struct B : public A { }; int main () { B b; // The composite type is `A const *' A* ap = &b; const B* bp = &b; if (ap != bp) // { dg-b...
google
android
dll-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/dll-1.C
314
utf_8
a9067192357860945ae88185ed54ec2c
// { dg-do assemble { target arm-*-*pe } } // { dg-options "-mno-nop-fun-dllimport" } // declspec test #1 // set compiler_result "__imp_imp.*\.section${spaces}.drectve\n\[^\n\]*-export:exp" // set not_compiler_result "__imp_exp" __declspec (dllimport) void imp (); __declspec (dllexport) void exp () { imp (); }
google
android
elab1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/elab1.C
253
utf_8
9f23ed7eff018ebe271c3b47018e5592
// { dg-do assemble } typedef struct {} S; // { dg-message "" } Previous declaration of S S s1; struct S* s2; // { dg-error "" } S is a typedef name template <class T> struct X { friend class T; // { dg-error "" } T is a template type parameter };
google
android
linkage7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/linkage7.C
169
utf_8
9f0e982ef3a2802a121297c93371f22b
// { dg-do link } namespace N { extern "C" int i; void f () { i = 3; } } int i; int main () { N::f (); }
google
android
crash37
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/crash37.C
342
utf_8
61401cb0f17765016e51789fdbcc7c87
// { dg-do assemble } // bug 706. We iced when meeting a decl with type error-mark-node class bifstream; int main() { bifstream bifs; // { dg-error "" } incomplete type if (!bifs) { } return 0; }
google
android
dtor6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/dtor6.C
365
utf_8
bec7fc1b3e53b667bbfb02f3caa7a751
// { dg-do run } extern "C" void abort (); int count; struct S { S (); S (const S&); ~S (); int i; }; S::S () { i = count++; } S::S (const S&) { i = count++; } S::~S () { if (--count != i) abort (); } void f (S, S) { } int main () { { S s; f (s, s); } return count != 0; }
google
android
typedef7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/typedef7.C
380
utf_8
04533139d4ad7b70aeaf7dbc92222136
// { dg-do assemble } typedef int I; typedef int I; // DR56 makes clear that duplicate typedefs in class scopes are // invalid. struct A { typedef int I; // { dg-message "" } typedef int I; // { dg-error "" } }; template <class T> struct S { typedef int I; // { dg-message "" } typedef int I; // { dg-error ""...
google
android
static3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/static3.C
101
utf_8
b28df6285579d288eb89eb3ea95583cc
// { dg-do assemble } class S { ~S(); public: friend void f(); }; S::~S() { static S s; }
google
android
local2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/local2.C
103
utf_8
b0c55f20739e7cf716fcd5af1b14be8b
// { dg-do assemble } // { dg-options "-O2" } void f () { struct Init { Init () { } }; }
google
android
dtor12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/dtor12.C
228
utf_8
49cceaef10e394102fa51c269f289f67
// { dg-do run } // Test that we don't complain about calling a destructor on a const object. #include <new> struct A { ~A() {} }; const A a = {}; int main() { a.~A(); a.A::~A(); // { dg-bogus "" } const violation }
google
android
ctor1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/ctor1.C
261
utf_8
bf34c3dce3754aad3a0364358ced05bb
// { dg-do run } // { dg-additional-sources " ctor1-aux.cc" } template <class T> struct S { template <class U> S (U); }; template <class T> template <class U> S<T>::S (U) {} template S<int>::S (double);
google
android
inline20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/inline20.C
537
utf_8
afc3a04b959aae42619cd9d21f7dbd19
// { dg-do assemble } struct A { int a, b, c, d; }; inline void foo (int, A &); struct D { }; struct E: public D { void f (A &y) { foo (1, y); } }; struct F: public D { void f (A &y) { foo (2, y); } }; E *d; F *e; inline int baz (int y) { A a; if (y) { d->f (a); } else { e->f...
google
android
inline4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/inline4.C
276
utf_8
28e4cd2fa1658df97a354ad0f586f2a8
// { dg-do assemble } // { dg-options "-O2" } inline void f () { return; } inline void g (); void (*gp)() = &g; inline void g () { f (); } extern int array_size; void h () { int lookup_array[array_size]; g (); }
google
android
dtor2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/dtor2.C
116
utf_8
573c74f438072a08f4c7e076c4fde80a
// { dg-do assemble } class K { public: friend class C; private: static K qwe; K(); ~K(); }; K K::qwe;
google
android
empty2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/empty2.C
223
utf_8
e0228ca9cb60d1437fd658fe2d597301
// { dg-do assemble } struct E {}; void f () { E e1, e2; e1 = e2; // We should not warn about this statement, even though no // code is generated for it. }
google
android
inline8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/inline8.C
1,272
utf_8
b031d36f414843127e437e3936c33921
// { dg-do run } // { dg-options "-O1" } #include <map> #include <cstdlib> #include <cstring> using namespace std; class NAMES_ITEM { public: char *name; NAMES_ITEM(const NAMES_ITEM& item2); NAMES_ITEM(const char* name2); ~NAMES_ITEM(); bool operator==(const NAMES_ITEM& n) const; };...
google
android
decl3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/decl3.C
489
utf_8
da4392d4b8319374e5f686fd1c71ef28
// { dg-do assemble } // http://gcc.gnu.org/ml/gcc-bugs/1999-04n/msg00505.html // We should not allow arrays of abstract type. [class.abstract/2] struct cow_t { // { dg-message "pure" } virtual void f()=0; // { dg-message "note" } }; int main() { cow_t cow[2]; // { dg-error "invalid abstract type" } co...
google
android
inline11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/inline11.C
542
utf_8
3bd78b7aee29c89595c18932ab7c6ff7
// { dg-do assemble } // { dg-options "-O2" } class baz { public: baz& operator += (const baz&); }; inline baz& baz::operator += (const baz& r) { return *this; } inline baz operator + (int x, const baz& y) { return y; } static inline baz bar (int alpha); static inline baz foo (int alpha) { baz tmp = alpha + ...
google
android
virtual10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/virtual10.C
468
utf_8
930c4b7b0bbff2696a8528cc462df701
// { dg-do assemble } // We failed to spot a static member which overrode a virtual struct A { virtual int foo (char); static int foo (); virtual int foo (int); // { dg-error "" } this function static int foo (float); virtual int foo (double); }; struct B : A { static int foo (int); // { dg-error "" }...
google
android
eh1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/eh1.C
253
utf_8
af4bf43b1d12ba745d0006242f963725
// { dg-do assemble } class C2 { public: ~C2(); C2 a() const; }; class C3 { public: C3(const C2 &c); }; class C4 { public: C3 *foo(bool b, const C2 &c); C2 d() const; }; C3 *C4::foo(bool b, const C2 &c) { return new C3(b ? d().a() : c); }
google
android
eh3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/eh3.C
292
utf_8
260c328a7fb09ba03925bbff7306c211
// { dg-do run } // { dg-options "-O" } typedef struct { } e; char *p; void _Jv_throw (); int barf (int len) { char a[len]; p = a; _Jv_throw (); return 0; } void _Jv_throw () { e ex; throw ex; } int main () { try { barf (2); } catch (...) { } return 0; }
google
android
dtor10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/dtor10.C
412
utf_8
7299011904104fb6c29ba323cb11ab6d
// { dg-do run } extern "C" void abort (); int j; struct S { static S* s[5]; S () { s[j++] = this; } S (const S&) { s[j++] = this; } ~S () { for (int k = 0; k < j; ++k) if (s[k] == this) return; abort (); } }; S* S::s[5]; struct T { int i; S s; }; T t; T f () { return t; } void g (S) { ...
google
android
vbase3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/vbase3.C
340
utf_8
b40e169f8b79ca99a995c50951bcb176
// { dg-do assemble } class d0_Collection_Base {}; template <class T> class d0_List : virtual public d0_Collection_Base { public: d0_List (); template <class Input_Iterator> d0_List (Input_Iterator first, Input_Iterator last) ; }; void tlist () { const d0_List<int> l4 (1, 2); }
google
android
fnname1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/fnname1.C
155
utf_8
cdb14b1ccbe32a578cb98ecd21523f57
// { dg-do link } // { dg-options "-g" } int main () { const char *s = __FUNCTION__; }
google
android
eh5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/eh5.C
413
utf_8
50ccfaa907c448bee3f02ccdb3da5d91
// { dg-do assemble } // { dg-options "-O2" } struct X {}; struct Y { Y(); virtual ~Y(); }; struct Z { int f (const int *x); int g; }; inline int operator<< (Z &os, int x) { os.f (&x); return os.g; } void foo (Z &a, X *b, X &c) { X *d = b; int e = 0; Z &f = a; if (!(f << e)) do { do { } wh...
google
android
typedef1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/typedef1.C
189
utf_8
5a247f9665f19a540726811b53701d4f
// { dg-do assemble } typedef const struct { int x; } Test; static void foo(Test); static void foo(Test t) { t.x = 0; // { dg-error "" } assignment of read-only member return; }
google
android
cvqual1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/cvqual1.C
158
utf_8
318c1c72b2da29f5b9e81e957fcbc16e
// { dg-do assemble } int i = 3; void *pv=&i; const void* pcv=&i; int main() { pcv = 0 ? pv : pcv; }
google
android
cleanup2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/cleanup2.C
318
utf_8
b191bb9b4f4430b44b6ad0ae1ce850c0
// { dg-do run } // { dg-options "-O -fno-exceptions -w" } extern "C" void abort(); class A { public: A(); ~A(); int foo(); }; A::A() {} A::~A() { abort (); } int A::foo() {} extern int f() { return 0; } int main() { return ((f() != 0) ? A().foo() : 0); }
google
android
dtor8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/dtor8.C
335
utf_8
d553422d1e882d1f572883010b7fd3e3
// { dg-do run } // { dg-options "-O1" } int result; struct S { S (); S (const S&); ~S (); int i; double d[18]; }; S* s; S::S () { s = this; } S::~S () { if (s != this) result = 1; } inline S f () { return S (); } int main () { f (); return result; }
google
android
builtins2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/builtins2.C
439
utf_8
174f8d8294990e01924aeade4ba2d025
// { dg-do run } // { dg-options "-O2" } // Test whether this builtin minimally works in G++. // Origin: Kaveh Ghazi Jan 16, 2001 // namespace std { extern "C" void abort (void); } int main () { using namespace std; char f[16]; if (::__builtin_strcpy (f, "hello world") != f || __builtin_memcmp (f, "h...
google
android
crash33
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/crash33.C
219
utf_8
af86322780df2d44590d8b2285db668a
// { dg-do assemble } template <class T> inline const T& bar(const T& a, const T& b) { return a < b ? b : a; } int foo(void) { return bar(sizeof(int), sizeof(long)); }