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
chromium
crash44
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash44.C
352
utf_8
99f6d128ad96516aeafdae150359d92a
// { dg-do assemble } // GROUPS passed old-abort template <class T> class bug { public: void Foo(const int = 0); void NotRedeclared(const int); private: T TheItem; }; template <class T> void bug<T>::NotRedeclared(const int) { } template <class T> void bug<T>::Foo(const int) { } int main() { bug<char>...
google
chromium
visibility10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/visibility10.C
295
utf_8
a04d488a9766677467424bbf662856ed
// { dg-do assemble } // GROUPS passed visibility struct base { protected: void base_func() {}// { dg-error "" } .*is protected.* }; struct derived : public base { protected: void derived_func(base *ptr) { ptr->base_func(); }// { dg-error "" } within this context };
google
chromium
crash66
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash66.C
2,863
utf_8
2000fd7ff28385cbab610558a172e452
// { dg-do assemble } // { dg-options "-O" } // GROUPS passed old-abort typedef unsigned char uchar; typedef unsigned short ushort; typedef unsigned long ulong; extern int swap_endian; inline ushort swapshort(ushort value) { value &= 0xffff; return ((value << 8) | (value >> 8)); } struct eshort { ushor...
google
chromium
init9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/init9.C
272
utf_8
0f0122e77a799ed8e3fc9e03da38cb59
// { dg-do assemble } // GROUPS passed initialization int FALSE = 0; class X { public: static int FALSE; }; // The compiler should NOT complain about redeclaration of the global // `FALSE' with this declaration...grokvardecl shouldn't be doing that. int X::FALSE = 0;
google
chromium
crash24
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash24.C
611
utf_8
207fe563f561496a1ca248b198318d28
// { dg-do assemble } // { dg-options "-O" } // GROUPS passed old-abort // gcc puts the array into a register, and then the store_bit_field () code // in expmed.c gets confused when it tries to store zero past the end of the // register (because the index is past the array bounds). It ends up calling // store_split_...
google
chromium
visibility9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/visibility9.C
279
utf_8
8d9e0384aa49c53379aad6b6df1c4e6f
// { dg-do assemble } // GROUPS passed visibility class A { public: void aMethod(void) {};// { dg-error "" } .* }; class AA : A { }; class B { public: void thisMethod() { AA ana; ana.aMethod();// { dg-error "" } .* } };
google
chromium
crash4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash4.C
101
utf_8
549525d98ff3703d364f494aff337190
// { dg-do assemble } // GROUPS passed old-abort typedef struct Thing { Thing(); int x; } Thing;
google
chromium
enum5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/enum5.C
232
utf_8
fcf43316699bebcb1f1765e8f2b2d977
// { dg-do assemble } // { dg-options "-pedantic-errors" } // GROUPS passed enums enum Thing { FIRST, SECOND } ; int main() { Thing x = FIRST ; x = 27 ; // this line should be a type error.// { dg-error "" } .* }
google
chromium
cvt2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/cvt2.C
121
utf_8
d2732754499fdd0622ea76207723c993
// { dg-do assemble } // GROUPS passed conversions void f(const short & s) { } int main() { f(0); return 0; }
google
chromium
init13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/init13.C
103
utf_8
a305765b5b9a1e0b319b904df2c4a15d
// { dg-do assemble } // GROUPS passed initialization struct A { operator int (); }; int i = A();
google
chromium
crash53
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash53.C
354
utf_8
0d23b5f837eca50d6659a9747fa8e8bd
// { dg-do assemble } // GROUPS passed old-abort class A { public: class B { public: virtual ~B(); }; }; template<int I> class C { public: class B : public A::B { }; // bug2.cc:18: Internal compiler error 233. }; C<0> c;
google
chromium
init10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/init10.C
79
utf_8
4e18b3936e86061811d3dfba8b2c4d31
// { dg-do assemble } // GROUPS passed initialization struct S { int :0; } a;
google
chromium
recurse
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/recurse.C
2,369
utf_8
964a895f23ebbce94a2c5bfe6e3845b5
// { dg-do assemble } // GROUPS passed recursive-aborts // types typedef unsigned int DBflag; // for storing user flag value typedef unsigned long DBoffset; // 32-bit unsigned integer typedef DBoffset DBsize; // type for storing sizes of objects typedef unsigned char DBbyte; // 8-bit unsigned char class DBlink {...
google
chromium
arm1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/arm1.C
198
utf_8
bdc4d1d13818def6ccb6fa43c79d8bf5
// { dg-do assemble } // { dg-options "-pedantic-errors" } // GROUPS passed ARM-compliance // ARM $5.7, it's illegal to do math on a `void*'. int main() { void *p; ++p;// { dg-error "" } .* }
google
chromium
sizeof5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/sizeof5.C
300
utf_8
30da4846a089e66f7b78cd50474b36e3
// { dg-do run } // GROUPS passed sizeof // ARM $5.3.2 extern "C" int printf (const char *, ...); class foo {}; int main () { // The size of any class or class object is larger than zero. int i = sizeof (foo); if (i > 0) printf ("PASS\n"); else { printf ("FAIL\n"); return 1; } }
google
chromium
err-msg5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/err-msg5.C
138
utf_8
905514d94e69c283791a395b1caa8949
// { dg-do assemble } // GROUPS passed error-messages class foo {}; ~foo () {}// { dg-error "" } destructors must be member functions.*
google
chromium
sizeof4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/sizeof4.C
221
utf_8
155582fcdd8e972166db70e5fa5f3f72
// { dg-do assemble } // { dg-options "-pedantic-errors" } // GROUPS passed sizeof // ARM $5.3.2 int main() { // sizeof may not be applied to the type void int l = sizeof (void);// { dg-error "" } .* return 0; }
google
chromium
enum1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/enum1.C
200
utf_8
f4a6198b346287ed8325efbed8566b1d
// { dg-do assemble } // GROUPS passed enums class foo { public: enum bar { baz = 1, bat = 7 }; }; class derv : public foo { }; int main() { foo::bar x = foo::baz; derv::bar y = derv::bat; }
google
chromium
parse2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/parse2.C
137
utf_8
f66960747805de8933f936133b8e7153
// { dg-do assemble } // GROUPS passed parsing class BitString { public: int i; }; typedef BitString BS; typedef ::BitString cBS;
google
chromium
bit-fields2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/bit-fields2.C
249
utf_8
1a5afe81ac27807110b2c7f1e488f194
// { dg-do assemble } // GROUPS passed bit-fields struct S { char c; int i:8; } s; int main() { int &ir = s.i; // { dg-error "" } address of bitfield int *ip = &s.i; // { dg-error "" } address of bitfield ir = 10; }
google
chromium
nest16
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/nest16.C
550
utf_8
674367aa6e84abc2f89bb825235a4e33
// { dg-do assemble } // GROUPS passed nested-classes class BDDHeap { public: BDDHeap(); BDDHeap(const BDDHeap&); class Page { public: int i; }; struct Pointer { Page *page; unsigned index; Pointer(); Pointer(const BDDHeap& heap); }; struct Half { struct { Page *top; ...
google
chromium
anon-union1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/anon-union1.C
161
utf_8
8f1779bd8e0be9254448d93593ccd35a
// { dg-do assemble } // GROUPS passed anonymous-unions static union { char* uC; private: int uI;// { dg-error "" } .*private member.* };
google
chromium
crash61
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash61.C
194
utf_8
cdbb9c9cfe241a7d44af748e52523748
// { dg-do assemble } // GROUPS passed old-abort template <class TP> class sapp { }; class foo {}; extern foo& __iomanip_setw (foo&, TP);// { dg-error "" } type spec.*
google
chromium
crash40
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash40.C
225
utf_8
3b168f8ca606522149df9bdb8d936a0e
// { dg-do assemble } // GROUPS passed old-abort class foo { public: virtual foo &operator <<(foo &(foo::*)(foo &)); }; foo &foo::operator<<(foo &(foo::*manip)(foo &)) { (this->*manip)(*this); return *this; }
google
chromium
template23
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/template23.C
438
utf_8
a99b2cfa96092ee5eda03d6704610cff
// { dg-do assemble } // GROUPS passed templates template <class T> class T_Base {}; template <class T> class T_Derived : public T_Base<T> {}; class Base { public: Base (float name); }; class Derived : public Base { private: T_Base<int>* data_; // Fix (1): Change date_ from T_Base<int>* to T_Derived<int>* p...
google
chromium
crash15
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash15.C
313
utf_8
7529342852a16fca993789714b764021
// { dg-do assemble } // GROUPS passed old-abort #include <iostream> class A { public: virtual ~A() {std::cout << "executed ~A()\n";} }; class B : public A { public: virtual ~B() {std::cout << "executed ~B()\n";} }; int main() { std::cout << "starting\n"; B b; b.~A(); std::cout << "done\n"; }
google
chromium
sorry1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/sorry1.C
355
utf_8
5e2033584074585a4562c059d4224b61
// { dg-do assemble } // GROUPS passed old-sorry class a { public: int* foo(); }; a aa; a* ap; class b { public: int ok(int* p =aa.foo()); // dump_init should know what to do with this NON_LVALUE_EXPR int f(int* p =ap->foo()); }; int b::ok(int *p) { return 0; } int b::f(int *p) { return 0; } voi...
google
chromium
crash10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash10.C
400
utf_8
9bb5650319b1cbd73f548bcbcadbf2b4
// { dg-do assemble } // GROUPS passed old-abort class word { unsigned char b1, b2; public: word (unsigned int i = 0) { b1 = i & 0xff; b2 = (i & 0xff00) >> 8; } operator unsigned int () { return (b2 << 8) + b1; } }; class just_another { int foo; char bar[23]; }; int mumble(word w) { just_another *jap; ...
google
chromium
crash27
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash27.C
230
utf_8
915634c5383e42a4857a8cdf46230684
// { dg-do assemble } // GROUPS passed old-abort class First { public: First(const First& a); }; class Second { int i; First f; public: ~Second() {} Second func(); }; void foo() { extern Second x; x = x.func(); }
google
chromium
misc15
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/misc15.C
214
utf_8
9893e6edc662a5622bc8f4c0d8c89dfc
// { dg-do assemble } // GROUPS passed miscellaneous-bugs struct A { int aa; }; struct B : public A { }; struct C : public A { }; struct D : public C, public B { void fun() { C::aa = 10; } };
google
chromium
template25
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/template25.C
438
utf_8
0638f66168edec8abeec999d8939dd9c
// { dg-do assemble } // GROUPS passed templates template <class T> class Temp_Base {}; template <class T> class Temp_Derived : public Temp_Base<T> { public: Temp_Derived (int i = 10) {} }; class Base { float r_; public: Base (float r) : r_(r) {} }; class Derived : public Base { private: Temp_Base<int>* b...
google
chromium
crash30
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash30.C
121
utf_8
d09610f03864daed6e9a2f6492204235
// { dg-do assemble } // GROUPS passed old-abort #include <string> int main(void) { std::string a[] = {"Hello"}; }
google
chromium
ambiguity1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/ambiguity1.C
275
utf_8
0dcd1362db7930337b0574137923320a
// { dg-do assemble } // GROUPS passed ambiguity struct A { A (int); }; struct B { B (int); }; void myfunc (const A& t0); // { dg-message "candidates" } void myfunc (const B& t0); // { dg-message "note" } int main () { myfunc(1); // { dg-error "ambiguous" } }
google
chromium
template17
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/template17.C
592
utf_8
ea1706d9d14be41fc2048b33a29cb1b7
// { dg-do assemble } // GROUPS passed templates struct Regex { int i; Regex(char *, int); }; template<class KEY> class NDAMName { public: static const Regex pattern; static unsigned sequence_number; }; const Regex NDAMName<'L'>::pattern("^[Ll](.*)$", 1);// { dg-error "type/value mismatch" "mismatch" } // {...
google
chromium
crash46
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash46.C
389
utf_8
04ce4fbaa4f8ef72247f66f12db00ef1
// { dg-do assemble } // GROUPS passed old-abort class Rational { public: Rational(int v): value(v) { } int value; }; typedef Rational __Rational; extern int operator>(const Rational&, const Rational&); class V { public: class Rational { public: static int x(const __Rational& value); }; }; i...
google
chromium
init2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/init2.C
230
utf_8
9af433ccb94c3683185fc8f46ee6f51d
// { dg-do assemble } // GROUPS passed initialization // this should give an error in require_instantiated_type about not // being allowed to have an initializer list in an argument list. int f(int a = {1});// { dg-error "" } .*
google
chromium
visibility6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/visibility6.C
258
utf_8
1914475b1bdf83ff9a257461ae04068e
// { dg-do assemble } // GROUPS passed visibility class bottom { public: int b; // { dg-error "" } private }; class middle : private bottom { public: void foo () { b; } }; class top : public middle { public: void bar () { b; }// { dg-error "" } .* };
google
chromium
ptolemy2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/ptolemy2.C
1,346
utf_8
cd6b194c7bc5cf94285bc6cd0a157e70
// { dg-do run } // GROUPS passed ptolemy-bugs #include <iostream> class PTcl { public: int dispatcher(int which,int argc,char** argv); // fns in the table int one(int argc, char** argv); int two(int argc, char** argv); int three(int argc, char** argv); }; // An InterpFuncP is a pointer to an PTcl function that...
google
chromium
shadow1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/shadow1.C
142
utf_8
2ae7dc2e9f111a3ddbbb01e5ca479553
// { dg-do assemble } // GROUPS passed errors void f( int a) { int a; // this should be an error now// { dg-error "" } .* { int a; } }
google
chromium
dtors2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/dtors2.C
1,105
utf_8
11771f1272b718c8cf7cc1d0433af15e
// { dg-do run } // GROUPS passed destructors // Check that virtual destructors work correctly. Specifically, // check that when you destruct an object of a derived class for // which the base class had an explicitly declared virtual destructor // no infinite recursion occurs. // // Bug description: // The generat...
google
chromium
enum12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/enum12.C
180
utf_8
6e6712bb465842808e9709b41ad09c15
// { dg-do assemble } // GROUPS passed enums enum Bool { False, True }; enum Bool object; struct S { Bool field:1; void copy_enum_bit_field () const { object = field; } };
google
chromium
init6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/init6.C
375
utf_8
ede67b1757812c2a41023760af3a0608
// { dg-do assemble } // GROUPS passed initialization class Tag { public: Tag(int i):value(i){} int value; }; extern const Tag myTag; extern const Tag myTag=9; // The compiler should not issue an error on this line; expand_static_init // should be checking that there's no initializer for this line, and thus // doe...
google
chromium
visibility8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/visibility8.C
334
utf_8
39924637e7e7ef40764e478c625a4383
// { dg-do assemble } // GROUPS passed visibility // Make sure private inheritance affects the visibility of // static members used in an inherited context. class foo { public: static int y; // { dg-error "" } private }; class foo1 : private foo { }; class foo2 : public foo1 { public: void bar () { y; }// { dg-err...
google
chromium
reference1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/reference1.C
1,031
utf_8
23996b9ea050e80e407e5267be28b395
// { dg-do run } // { dg-options "-w" } // GROUPS passed references // Check that if a reference is initialized to refer to a value // which is returned from a function call, the actual call to // the function is only invoked for the original initialization // of the reference, and not for each subsequent use of the /...
google
chromium
err-msg9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/err-msg9.C
163
utf_8
7a6a0e6395384ac6c714734bef224a75
// { dg-do assemble } // GROUPS passed error-messages class foo { public: int ~foo ();// { dg-error "" } return type specification for destructor invalid.* };
google
chromium
enum2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/enum2.C
276
utf_8
776648f2fef522a6e4680ce5f119697c
// { dg-do assemble } // GROUPS passed enums class foo { public: enum bar { baz = 1, bat = 7 }; }; class foo2 { public: enum bar2 { baz2 = 1, bat2 = 7 }; }; class derv : public foo, public foo2 { }; int main() { foo::bar x = foo::baz; derv::bar2 y = derv::bat2; }
google
chromium
overload1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.brendan/overload1.C
257
utf_8
a99396cc9b492413ad5d6fa982b64371
// { dg-do assemble } // GROUPS passed overloading class Foo { public: int f (void); }; class Bar : public Foo { public: int f (int); // { dg-message "candidates" } }; int main () { Bar b; b.f ();// { dg-error "no matching" } b.f (10); }
google
chromium
scope05
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.gb/scope05.C
159
utf_8
6d3bb8b7bfd4eac932c4685708a70423
// { dg-do assemble } // GROUPS passed gb scope struct C { void foo (int); void foo (char); struct D { void foo (); }; }; void C::D::foo () { }
google
chromium
scope03
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.gb/scope03.C
144
utf_8
3f7b5c540163c41c97af5949f79d9d85
// { dg-do assemble } // GROUPS passed gb scope struct c { class t { }; struct d { void foo (t &); }; }; void c::d::foo (t & x) { }
google
chromium
scope10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.gb/scope10.C
137
utf_8
bb9e514ad1e581841027a696c4bf8e47
// { dg-do assemble } // GROUPS passed gb scope void Foo (void) { class C { public: virtual int foo (void) { return 0; } }; }
google
chromium
scope08
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.gb/scope08.C
215
utf_8
c93cf26371b7789f7b57b4c803605c7f
// { dg-do assemble } // GROUPS passed gb scope template <class X> class C { public: int f (X ob) { return 0; } int g (X ob) { return f (ob); } }; class D { public: class E { public: E (); }; C <E> x; };
google
chromium
scope01
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.gb/scope01.C
108
utf_8
4d9cd810ad5cff69d049f09d2f729d45
// { dg-do assemble } // GROUPS passed gb scope struct c { typedef int t; }; struct d { typedef char t; };
google
chromium
scope13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.gb/scope13.C
118
utf_8
c4d0daf10d710e65ae6ea4021b2c12b1
// { dg-do assemble } // GROUPS passed gb scope class X { public: }; class Y { public: void X(); ::X X(int); };
google
chromium
scope12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.gb/scope12.C
482
utf_8
32a45a0b56c8fcf1bb6bf90a706fa9b3
// { dg-do assemble } // GROUPS passed gb scope template<class T, int N> class FixedArray_t { public: T _array[N]; FixedArray_t () { } }; typedef FixedArray_t<unsigned char, 4> IPAddress_t; class IPAddress { public: IPAddress (IPAddress_t ip) { } operator IPAddress_t () { IPAddress_t rv; return r...
google
chromium
scope07
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.gb/scope07.C
153
utf_8
0ab7c611473a180dc5a41d239cd5a80e
// { dg-do assemble } // GROUPS passed gb scope struct D { friend class A; friend class B; friend class C; void foo (); }; void D::foo () { }
google
chromium
scope06
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.gb/scope06.C
210
utf_8
8f655c77d41e64cbb0f5920d870c27e1
// { dg-do assemble } // GROUPS passed gb scope struct C { struct D { int x; void foo (); }; const int Ok = 0; // { dg-error "" } initialization forbidden }; void C::D::foo () { x = Ok; }
google
chromium
scope02
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.gb/scope02.C
146
utf_8
8e3f1fdefb7607038f8846096d94f798
// { dg-do assemble } // GROUPS passed gb scope struct c { typedef int t; struct d { void foo (t &); }; }; void c::d::foo (t & x) { }
google
chromium
scope04
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.gb/scope04.C
234
utf_8
b4d18f58489b4b47679251992da9ff25
// { dg-do assemble } // GROUPS passed gb scope struct a { struct c { struct d { static int foo (int); }; }; struct b { int foo (int x) { return c::d::foo (x); } }; }; int a::c::d::foo (int) { return 0; }
google
chromium
scope09
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.gb/scope09.C
227
utf_8
fc9de0cb191e65ca614f854c367b10bd
// { dg-do assemble } // GROUPS passed gb scope class enclose { int e; protected: class nested { int n; }; }; class derived : public enclose { protected: class nested_derived : public nested { int nd; }; };
google
chromium
scope11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.gb/scope11.C
420
utf_8
e5d1da0f71c705fa50bd4da154277f8a
// { dg-do assemble } // GROUPS passed gb scope template<class T, int N> class fixed_array { public: T _array[N]; }; class Hash { public: Hash (int); }; typedef fixed_array<char, 4> ipAddress_t; class IPAddress { protected: long _i; public: IPAddress (ipAddress_t ip) { } IPAddress () { } IPAddress netMa...
google
chromium
pure1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/pure1.C
261
utf_8
3abfff206eac2eebf18679f40e8098fd
// { dg-do assemble } class A { public: virtual void f(void) = 0; // pure virtual function. A() {f();} // { dg-warning "const" } called in a constructor ~A() {f();} // { dg-warning "destr" } called in a destructor };
google
chromium
sts_partial
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/sts_partial.C
273
utf_8
6559759743eb2199fa9006b098433139
// { dg-do run } // ecgs-bugs 1999-02-22 14:26 Stefan Schwarzer // partial ordering problem in egcs <= 1.1.1 template<class T> int f(T &){ return 1; } template<class T> int f( T[] ){ return 0; } int main(){ int d[] ={2}; return f(d); }
google
chromium
sts_vectini
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/sts_vectini.C
757
utf_8
0b908e167eab8ad4a9de653fb70fdfe2
// { dg-do run } // { dg-options "-O2 -w" } // egcs-bugs 1999-02-22 14:24 Stefan Schwarzer // optimizer problem in egcs <= 1.1.1 struct XTVec{ XTVec(){x[0]=x[1] =x[2] =0;} XTVec(int ax,int y=0.,int z=0.){x[0]=ax;x[1]=y; x[2]=z; } int& operator[](int); int x[3]; }; inline int & XTVec::operator[](int i){ retu...
google
chromium
sts_conv
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/sts_conv.C
427
utf_8
b3ef74ff27c2ba57a74b34bb37147ee9
// { dg-do run } // ecgs-bugs 1999-02-22 14:21, Stefan Schwarzer // this code should compile quietly class CArray { public: operator double* (){ return a; } // works if we comment this line: operator double* () const { return const_cast<double *>(a); } private: double a[2]; }; int main(){ CArray...
google
chromium
eval1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/eval1.C
257
utf_8
1fcbe469d9287f683e48ab8325c6dc60
// { dg-do run } // Postfix expression must be evaluated even if accessing a static member. struct S { static int i; S* foo(); }; S* S::foo(){ i = 0; return this; } int S::i = 1; int main(void) { S * s = new S; int k=(s->foo())->i; return k; }
google
chromium
conv1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/conv1.C
115
utf_8
6c8edde09ed94b46e6c9fdec33f669e8
// { dg-do run } struct S{ operator bool() { return true; } }; int main() { S a; if (S &b = a); }
google
chromium
sts_iarr
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/sts_iarr.C
823
utf_8
882a58f5a489b16575709320c8d71752
// { dg-do run } // egcs-bugs 999-02-22 14:26 Stefan Schwarzer // should compile and return 0 template <int N> struct Outer{ struct Inner{ Inner(int n): sum(n){} typename Outer<N-1>::Inner operator[](int n) const { return typename Outer<N-1>::Inner(sum + n); } int sum; }; typename Outer<N-1>::I...
google
chromium
typedef2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/typedef2.C
186
utf_8
17402530552c868122134e23cd65f7ed
// { dg-do assemble } // Check implicit conversion from string constants into typedefs typedef char CHAR; void f2(CHAR *s="");
google
chromium
access1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/access1.C
157
utf_8
99f229ca2e8b470ed7c34283d8fc4e1a
// { dg-do assemble } class A{ public: enum Foo{f1,f2}; class B{ friend class A; Foo f; public: B():f(f1){} }; };
google
chromium
ambig1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/ambig1.C
385
utf_8
299fcc89ddbeaeba2068539f38eb848c
// { dg-do assemble } struct foo { protected: int x; // { dg-error "" } candidate }; struct bar { public: int x(); // { dg-error "" } candidate }; struct foobar: public foo, public bar { foobar(); }; int func(int); foobar::foobar() { func(x); // { dg-error "" } ambiguous member acce...
google
chromium
lookup1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/lookup1.C
305
utf_8
f7c3c07528a0fc1e61c6d947e61d78ac
// { dg-do assemble } //In the base class list, the context of the current is used namespace N1 { namespace N2 { class A{}; class B; } } class N1::N2::B : public A { }; class C1 { class A{}; class B; }; class C1::B : A { };
google
chromium
new1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/new1.C
1,890
utf_8
ba8a347349b1bb0043c7d42249c8fd24
// { dg-do run } //Lifetime of temporaries: //egcs 2.92 performs cleanup for temporaries inside new expressions //after the new is complete, not at the end of the full expression. #include <new> #include <cstdlib> #include <cstdio> bool new_throws; bool ctor_throws; int new_done; int ctor_done; int func_done; int ...
google
chromium
pmf1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/pmf1.C
347
utf_8
48a5f2cf28d6fed53bd37f93a37d127f
// { dg-do run } // Check for pointer-to-virtual-function calls on // bases without virtual functions. struct B{}; struct D: public B{ virtual void foo(); }; void D::foo(){} int main() { B *b = new D; void (B::*f)() = static_cast<void (B::*)()>(&D::foo); (b->*f)(); }
google
chromium
bitset1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/bitset1.C
157
utf_8
bbcf18896f3a1d744cf356a0a66cd95a
// { dg-do run } #include <bitset> int main() { std::bitset<sizeof(int) * 8> bufWord; bufWord[3] = 0; }
google
chromium
crash1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/crash1.C
184
utf_8
35f6ed93fa63b9db22cde011b976421d
// { dg-do assemble } int i = 4; struct S{ char c[i]; // { dg-error "" } size not constant int h; int foo(){ return h; } }; int main() { S x; int i = x.foo(); }
google
chromium
typedef1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/typedef1.C
238
utf_8
35e71a2f28b22101fdc791da5d12d0e4
// { dg-do assemble } // Make sure we see through typedefs. typedef int Int; void fn() { int *p; Int *&pr2 = p; }
google
chromium
pmf2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/pmf2.C
328
utf_8
45900dcbe065b97983fa9607056287f8
// { dg-do run } // { dg-options "-Wno-pmf-conversions" } // Test conversion of pointers to virtual member functions to // pointers to non-member functions. struct A{ int i; A () :i(1){} virtual void foo(); }a; void A::foo() { i = 0; } int main() { void (*f)(A*) = (void(*)(A*))(&A::foo); f(&a); return...
google
chromium
overload1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.martin/overload1.C
176
utf_8
cbc1074c24be7acf9a3d5e06f47f9987
// { dg-do run } //Overload resolution should consider both declarations of func identically. struct S{}; void func(S&){} int main() { void func(S&); S s; func(s); }
google
chromium
pretty
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/pretty.C
732
utf_8
7bf4e5e0e822e66bda26a8880cb1e595
// { dg-do assemble } // Test for PRETTY_FUNCTION class SV; class SVTable // : public Debug { // It is an array to pointer to a SV. SV ** array; // This is the size of array. int maxCount; // This is the current element count. int count; void fatal_error (const char *f, ...); public: SVTable (in...
google
chromium
array1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/array1.C
503
utf_8
ad0913538dd7d6e5fa83fb6ba070dcf4
// { dg-do assemble } // { dg-options "" } // Testcase for assignment of non-array to array (assigns the same value to // each member) // Special Options: typedef struct {} ct2d_rigid, ct2d_rigid_a[1]; class ccInspection { protected: ct2d_rigid_a _dev2phys; }; class ccBgaInspection : public ccInspection { public...
google
chromium
namedret3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/namedret3.C
357
utf_8
95d2c4a18ce65af541fc6de3f5d3674a
// { dg-do assemble } // { dg-options "-Wno-deprecated" } extern "C" void abort(); int f2(int *x) { *x = 1; return 2; } int f1() return x // { dg-error "" } { f2(&x); // { dg-error "" } } void g() { int scratch[100]; int i; for (i = 0; i < 100; ++i) scratch[i] = 0; } int main() { g(); if (f1...
google
chromium
addrfunc4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/addrfunc4.C
477
utf_8
42f6563911a2f8cf1b2d1047bdaf7a81
// { dg-do run } // { dg-options "-fms-extensions" } // Test that an object-dependent reference to a member function can be // used to produce a pointer to member function, as in VC++. struct A { int f(int a) { return 0; } void f(int a, int b) { } }; typedef int (A::* pmf1)(int); typedef void (A::* pmf2)(int, in...
google
chromium
syshdr1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/syshdr1.C
232
utf_8
9c864011e86a2caf368208e1cf707f09
// { dg-do assemble } // { dg-options "" } // Test that we don't complain about trying to define bool or wchar_t in a // system header. # 1 "syshdr1.C" # 1 "syshdr1.h" 1 3 typedef int bool; typedef int wchar_t; # 2 "syshdr1.C" 2
google
chromium
bound1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/bound1.C
512
utf_8
3319bbc157c0ea8b1ee782f722a5788a
// { dg-do assemble } // { dg-options "-Wno-pmf-conversions" } // Testcase for cast of bound pointer to member function. struct A { int f (); }; typedef int (*fptr)(A *); typedef void* vptr; typedef int (A::*pmf)(); void foo (A* ap, pmf fp, int A::* ip) { fptr p; vptr q; A a; p = (fptr)(ap->*fp); p = (...
google
chromium
arrnew2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/arrnew2.C
155
utf_8
c18d645703992bc6c135227ac629f48c
// { dg-do run { xfail *-*-* } } // { dg-options "-w -fpermissive" } int *foo = new int[1](42); // { dg-bogus "" } int main () { return foo[0] != 42; }
google
chromium
arrnew
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/arrnew.C
198
utf_8
a63da864353b6cb3e1690e564308ffb3
// { dg-do assemble } // { dg-options "" } // PRMS Id: 4992 int *f(){ return new int[1] = { 1 }; // { dg-error "lvalue" "err" } // { dg-warning "extended init" "warn" { target *-*-* } 6 } }
google
chromium
attrib4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/attrib4.C
656
utf_8
ae9068ea19cc94f508bcfca599cf3160
// { dg-do assemble } // { dg-options "-Wformat" } // Test that attributes are really applied to function declarations under // various conditions. #define PF __attribute__ ((format (printf, 1, 2))) struct A { static PF void f (const char *, ...); static PF void g (const char *, ...) { } static void test (); }; ...
google
chromium
pretty2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/pretty2.C
1,677
utf_8
02044b0d3f0a562855e9108718011a3e
// { dg-do run } // make sure __FUNCTION__ and __PRETTY_FUNCTION__ work in member functions #include <stdio.h> #include <string.h> static bool bad = false; struct X { X (); ~X (); void fn (); operator int (); }; X::X () { char const *function = __FUNCTION__; char const *pretty = __PRETTY_FUNCTION__; p...
google
chromium
label2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/label2.C
395
utf_8
0ca8735aa70dd60af0734860b2521e34
// { dg-do run } // { dg-options "" } template <class T> int f () { int i = 0; int j = 0; int k = 0; l: if (j) return 0; ({ __label__ l; k = 0; l: if (++k <= 2) goto l; ++i;}); if (i > 1 || k != 3) return 1; else { j = 1; goto l; } } int main () { ...
google
chromium
default
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/default.C
409
utf_8
09e867b0fab670965c20be371975da13
// { dg-do assemble } // PRMS Id: 5353 // This may be an extension, but it's a very common one... extern "C" int printf (const char *, ...); class A { public: static A*func (int = 3); static A*(*ptr)(int = 4); // { dg-error "" } .* }; A*(*A::ptr)(int) = &A::func; int main() { A foo; A::ptr(); // { dg-err...
google
chromium
null1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/null1.C
128
utf_8
441e900253b789b6b51d853547d8c928
// { dg-do run } // Test for overloading with g++ NULL. void f (int *) { } void f (char, char); int main () { f (__null); }
google
chromium
asmspec1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/asmspec1.C
163
utf_8
a73fc887eed082ef683e77dde6521d24
// { dg-do assemble { target i?86-*-* x86_64-*-* } } void foo () { register const char *h asm("%esi") = "hey"; }
google
chromium
jump1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/jump1.C
271
utf_8
b6418b336a13fd226ab5d32e33b8f7a6
// { dg-do run } // { dg-options "-fpermissive -w" } // Test that we can jump over the declaration of a non-POD object. struct A { }; union U { void (A::*p)(); }; int main() { goto foo; U u; foo: return 0; }
google
chromium
pretty3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/pretty3.C
1,094
utf_8
94ba708371ff08ece1345c37517ff7db
// { dg-do run } // make sure __FUNCTION__ and __PRETTY_FUNCTION__ work in templates #include <stdio.h> #include <string.h> static bool bad = false; template<class T> void f1 (T) { char const *function = __FUNCTION__; char const *pretty = __PRETTY_FUNCTION__; printf ("generic\n"); printf ("__FUNCTION__ %s\n...
google
chromium
delvoid
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/delvoid.C
245
utf_8
04aaaf608d3428b0ce27c992835dd4ca
// { dg-do run } // { dg-options "-w" } // Test for deleting a void pointer, which the standard says is undefined, // but which is used by several free C++ programs. void *p; int main () { delete [] p; }
google
chromium
typename1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/typename1.C
574
utf_8
4bb09491c286d809524eeecc77d75765
// { dg-do run } // Bug: g++ forgets about the instantiation of class1 when looking up // class11_value, and tries to look things up in class1<class2>. template<class ItIsInt> struct class1 { struct class11 { typedef ItIsInt class11_value; }; }; template<class ItIsClass2> struct class3 { int f(); }; templ...
google
chromium
constructor
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/constructor.C
345
utf_8
7e968cebb40357949b08db2dd18895f3
// { dg-do run } // { dg-options "" } // Testcase for constructor expressions (GNU extension) struct Any { int *type; int *addr; }; int i, j; main () { struct Any *ap = (struct Any *) __builtin_alloca (sizeof(struct Any)); *ap = ((struct Any){ &i, &j }) ; if (ap->type != &i || ap->addr != &j) ...
google
chromium
array3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/array3.C
154
utf_8
0358c365e76d6d31e6b0d88db4a8b90b
// { dg-do assemble } // { dg-options "" } void *vp; void f () { int i = (*((int (*)[i]) vp))[0]; }
google
chromium
array4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/array4.C
623
utf_8
b2f69c1973b3d4b6b9e01df5ce3b43ba
// { dg-do assemble } // { dg-options "" } // [nathan] We have a zero sized array extension, and (unfortunately) allow it // to be the sole member of a struct (rather than the trailing member of a // non-empty struct as C99 is/will allow). Such a type will have a size of // zero, but is not incomplete. struct A { in...
google
chromium
memconst
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ext/memconst.C
511
utf_8
c498da5600ebe490c0b6d83d8aacef54
// { dg-do assemble } // { dg-options "" } // Subject: ss-940630:cc1plus: internal error // Date: Sat, 2 Jul 1994 05:07:20 +0200 class qwerty { public: qwerty (const unsigned short userkey[8]); ~qwerty (); }; class foo { private: static const unsigned char * const dummy_key = (unsigned char*)"ThisIs a dummy!"...