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
ambig1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/ambig1.C
290
utf_8
73989b3452d2816b82b699381496d741
// { dg-do assemble } // { dg-options "-pedantic-errors" } // Testcase for ambiguity between functional cast and abstract declarator. // This ambiguity accounts for 6 of the r/r conflicts. int i = sizeof (int ()); // { dg-error "" } sizeof applied to fn type int j = sizeof (int () + 1);
google
chromium
opeq
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/opeq.C
748
utf_8
5ffddebe82794ada567fae406a67baf5
// { dg-do run } // PRMS Id: 4297 (related to 3525) // Bug: Generating default op= didn't set TYPE_HAS_ASSIGNMENT, so it wasn't // found. extern "C" int printf (const char *, ...); class Y { public: Y(const char*) {} Y& operator = (const Y&) { return *this; } }; class X { public: X(int v, const ch...
google
chromium
dtor5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/dtor5.C
427
utf_8
692190139cdda0f4ba5690607b9cf795
// { dg-do run } // PRMS Id: 5286 // Bug: g++ forgets side-effects of object in call to nonexistent destructor. #include <new> int r; template <class T> struct A { T *p; int i; A() { i = 0; p = (T*) new char[sizeof (T)]; new (p + i++) T; } ~A() { p[--i].~T(); r = i; } }; int main() { { A<int> a; } int...
google
chromium
dcast1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/dcast1.C
209
utf_8
85074d6a3cdfb8487034a6529ab9694c
// { dg-do assemble } // PRMS Id: 7162 struct B { int i; B() : i(1) {} }; struct D : B { int i; D() : i(2) {} }; void ch() { D od2; D &rd2 = od2; B &rd1 = dynamic_cast<B&>(rd2); }
google
chromium
access15
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/access15.C
276
utf_8
1eef12506a75ad8cf906e3779c9db776
// { dg-do assemble } // Bug: g++ complains about Z being a private base when trying to // initialize B::foo. struct Z { Z(); Z(int); }; struct A : private Z { }; struct B : public A { ::Z foo; B(); B(const B&); }; B::B() : foo(1) { } // { dg-bogus "" }
google
chromium
tempover
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/tempover.C
212
utf_8
e52640ce299bfcc91181e32b0d6c3b88
// { dg-do assemble } // GROUPS passed templates overloading #define TEMPL template <class T> class B {}; TEMPL class A : virtual public B { public: A(int); }; TEMPL A<T>::A(int){} A<double> a(1);
google
chromium
temporary6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/temporary6.C
211
utf_8
904f134c7ec633ab2982b1e531310f3f
// { dg-do assemble } // Bug: the temporary from the default parameter to f2 is reused. struct A {}; int f2 (int i, const A& ar = A()); void f (int i, int j = f2(1)); void g () { f (1); } void h () { f (1); }
google
chromium
template10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template10.C
608
utf_8
e56248583485844e691edcdc168e6046
// { dg-do assemble } // Bug: member operator shadows global template in tsubst. class ostream; template <class TP> class smanip; template<class TP> ostream& operator<<(ostream& o, const smanip<TP>& m); template <class TP> class smanip { public: friend ostream& operator<< <>(ostream &o, const smanip<TP>&m); }; ...
google
chromium
scoping8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/scoping8.C
219
utf_8
36252f66db6a8e4cf57c9dbcbefe7a4e
// { dg-do assemble } // Bug: g++ allows two different meanings of a name in the same scope. typedef int foo; // { dg-error "" } struct A { A (foo); int foo (); // { dg-error "" } foo already used in scope };
google
chromium
overload36
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/overload36.C
222
utf_8
f1bdd7bb9a17034917e666175d71ef24
// { dg-do run } // Test for subsequence checking in overload resolution. class foo { public: void operator <<(char *) { } void operator <<(const char * const &); }; int main() { char s[20]; foo f; f << s; }
google
chromium
cond2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/cond2.C
820
utf_8
3e98a53b2fd5e64ea69c739618bd5668
// { dg-do run } // Positive testcase for decls in conditions. extern "C" int printf(const char *, ...); int up = 0; int down = 0; struct T { int i; T(int j) { i = j; printf("UP\n"); up++; } T(const T& t) { i = t.i; printf("unwanted copy\n"); } ~T() { printf ("DOWN\n"); down++; } operator int () { return ...
google
chromium
scoping7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/scoping7.C
235
utf_8
dd19dbe87938973c6a79bd71c6cc15d0
// { dg-do assemble } // Bug: g++ doesn't flag name collisions between types and non-types as // errors. It shouldn't for class names, but it should for typedefs. int bar; // { dg-error "" } typedef int bar; // { dg-error "" }
google
chromium
access13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/access13.C
256
utf_8
cda590cdcff940e24584e29447dea85a
// { dg-do assemble } // PRMS Id: 4955 struct A { protected: int i; void f (); }; struct B: public A { void g () { this->A::i = 1; // { dg-bogus "" } access control failure this->A::f(); // { dg-bogus "" } access control failure } };
google
chromium
offset2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/offset2.C
278
utf_8
0ba1f119f97556fe052d9276e19e0b77
// { dg-do run } // PRMS Id: 5070 (testcase 2) int status = 1; struct foo { foo& operator= (const foo&) { status = 0; return *this; } }; struct xx { foo a; }; struct yy : public xx { yy(foo& a) { xx::a = a; } }; int main() { foo f; yy y (f); return status; }
google
chromium
crash11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/crash11.C
220
utf_8
e801e26cb7bc53d313a1859ca999282f
// { dg-do assemble } // Bug: g++ crashes on this input. struct A { const char *p; }; const char foo[] = "bar"; const A a = { foo }; extern const A* ap = &a; //{ dg-warning "'ap' initialized and declared 'extern'" }
google
chromium
template1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template1.C
312
utf_8
00ad7a65f5a13a306059f82d2d154c75
// { dg-do assemble } // PRMS Id: 4688 // Bug: g++ can't deal with templates instantiated within extern "C". class Gnaf { public: virtual int invariant (); }; template <class T> class Array : public Gnaf { public: virtual int invariant(); }; extern "C" int foo() { Array<int> toConv; return 0; }
google
chromium
tredecl3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/tredecl3.C
209
utf_8
bb1e0f3963c848d63c1da72405f295ce
// { dg-do assemble } // PRMS Id: 4679 // Bug: redeclaration of templates erases the definition. template <class T> class Foo { public: void h(); }; template <class T> class Foo; void g() { Foo<int> f; }
google
chromium
template30
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template30.C
263
utf_8
de7e194500cf12d2f505efb7176a4f26
// { dg-do assemble } template <class T, class U> int func(U, T); // { dg-message "candidates" } template <class T, class U> int func(T, U) // { dg-message "note" } { return 2; } int main () { func (0, 1); // { dg-error "ambiguous" } }
google
chromium
enum3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/enum3.C
328
utf_8
837f785c12882efb205074f3bdcb14bc
// { dg-do assemble } // { dg-options "-Wall" } enum tristate { no = -1, maybe, yes }; tristate tristate_satisfies (register tristate const t1, register tristate const t2) { switch (t1) { case no: return (tristate) -t2; case maybe: return yes; case yes: return t2; } return m...
google
chromium
rfg9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/rfg9.C
131
utf_8
4db6c46266a3c32e83e4b4f8e13f4321
// { dg-do assemble } int cond; int i; int *ip; void test () { cond ? i : ip; /* { dg-error "" } pointer/integer mismatch */ }
google
chromium
access9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/access9.C
175
utf_8
b809cea88b6deb90f883f62542a22c96
// { dg-do assemble } // Bug: g++ doesn't allow const objects to be constructed. struct B { B(); }; const B foo() { return B(); // { dg-bogus "" } constructing const }
google
chromium
template15
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template15.C
459
utf_8
b3fe174c10ec60fb8cdfbb20a0c5392f
// { dg-do run } // PRMS Id: 2139 // Bug: g++ tries to instantiate the template with types on the function // obstack and fails. template<class T> class X { public: X(int) { } T x; }; class A { }; int main() { int i; X<int> xi(i); X<double> xd(i); X<int (*)(int, void *)> fp0(i); X<...
google
chromium
overload18
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/overload18.C
120
utf_8
9be51fa78cb4f2e3e91c5c8315d4cacb
// { dg-do assemble } // pushdecl gets confused by this. void f (); void f (int, int); template <class T> T f (T) { }
google
chromium
defctor
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/defctor.C
210
utf_8
10c105ad06bea72935a4678e196c397b
// { dg-do run } // Bug: g++ doesn't generate default constructor. class A { public: int i; }; extern "C" int printf(const char *, ...); int main () { A a; a.i = 1; A b (a); printf("%d\n",b.i); }
google
chromium
overload5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/overload5.C
159
utf_8
1d648e94fcecb703a3df3b5d3b643278
// { dg-do assemble } // Testcase for simple overloading resolution. int foo (); // { dg-error "" } void foo (); // { dg-error "" } disallowed overload
google
chromium
rfg7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/rfg7.C
191
utf_8
3369cc5b05dc78391a5b93d6bd0c5496
// { dg-do assemble } // Bug: fixincludes and/or cpp mangle the definition of wchar_t so that this // doesn't work. #include <stdlib.h> wchar_t array[] = L"xxx"; // { dg-bogus "" } wchar_t
google
chromium
rfg6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/rfg6.C
100
utf_8
6aed67fcd89628a91165264394d8f942
// { dg-do assemble } const wchar_t *single = L"xyz" ; const wchar_t *(array[]) = { L"xyz" };
google
chromium
destruct4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/destruct4.C
274
utf_8
b992f53c34c645aeccccb6057d446f0b
// { dg-do assemble } // PRMS Id: 4342 // Bug: g++ fails to massage ambiguity in calling virtual destructor. class A { public: virtual ~A();}; class B: public A { }; class C: public A { }; class D: public B, public C { }; void foo () { D* p = new D; delete p; }
google
chromium
overload17
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/overload17.C
305
utf_8
37a0b3d044128b7ad11ac5a7928b6b68
// { dg-do assemble } // Bug: g++ fails to prefer UDC's alone to UDC's plus standard conversions. struct B { }; struct D: public B { }; struct DP { operator D * () const; operator double () const; }; void f (B *); void f (D *); void g (double); void g (float); void h (DP p) { f (p); g (p); }
google
chromium
temporary5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/temporary5.C
240
utf_8
67d58b441a5c66d4881ce1d39192d168
// { dg-do run } // PRMS Id: 6604 // Bug: Scoped constructor call is not properly recognized as a functional cast int c; struct A { A() { ++c; } ~A() { --c; } operator int () { return 1; } }; int main () { A::A(); return c; }
google
chromium
cast1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/cast1.C
179
utf_8
5b2e6d162a150fb1b7a57feab087fb05
// { dg-do assemble } // Bug: g++ fails to grok functional casts in all situations. class A { public: typedef int B; static B foo() { return B(1); } // { dg-bogus "" } };
google
chromium
inline
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/inline.C
411
utf_8
a0e1b6eb3991c100ca8ff0b3b67ef383
// { dg-do run } // PRMS Id: 4341 // Bug: Instantiating a template in the middle of processing the functions // from another template screws up lineno/input_filename. #pragma implementation "C.h" #line 1 "A.h" #pragma interface template <class T> class A {}; #line 1 "C.h" #pragma interface template <class T> class C ...
google
chromium
mi
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/mi.C
297
utf_8
78cd82525f4a367aeff1cb8874f59f79
// { dg-do run } int status; struct A { virtual void foo () { status = 1; } }; struct B { }; struct C : public A, public B { }; struct D { virtual void baz () { } }; struct E : public D, public C { void foo () { status = 0; } }; int main () { E* ep = new E; ep->foo(); return status; }
google
chromium
delete3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/delete3.C
231
utf_8
bab45524ccba473f2da00ba1b2c7f1a4
// { dg-do assemble } // PRMS Id: 6093 class A { public: A(); ~A(); protected: void operator delete(void *); // { dg-error "" } protected }; A::~A() { } void foo(A *p) { delete p; // { dg-error "" } in this context }
google
chromium
opeq6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/opeq6.C
363
utf_8
1477d34b82967d572fc358778ff2b504
// { dg-do assemble } // Testcase for wrongful generation of operator =. class ivResource { public: ivResource (); private: ivResource & operator =(const ivResource &); }; class ivButtonState : virtual public ivResource { public: void operator=(ivButtonState &); }; class ivPrintBS : public ivButtonState { }; ...
google
chromium
template42
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template42.C
234
utf_8
a38dfe63aedc2cf73a44464a7ca9b564
// { dg-do run } // Testcase for not evaluating template default args if they are // never used. struct X { X(int) { } }; template <class T> struct A { void f (T t = T()) { } }; int main () { A<X> a; X x (1); a.f (x); }
google
chromium
scoping6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/scoping6.C
437
utf_8
4f59c3a229fb40c0841c771b4a2a71f1
// { dg-do assemble } // Testcase for all uses of explicit global scope. int a, B; struct A { }; int operator+(A&, int); struct B { struct C { static int a; static int f () { A a; return ::operator+ (a, ::a); } // { dg-bogus "" } }; }; int B::C::a = 0; struct D : public ::B::C { }; // { dg-bogus "" }...
google
chromium
vecdel
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/vecdel.C
405
utf_8
e53f8b117ecf4eba5c6610643b9c8d37
// { dg-do run } __SIZE_TYPE__ newsize = 0; __SIZE_TYPE__ delsize = 0; struct A { int i; void * operator new [] (__SIZE_TYPE__ i) { newsize = i; return ::operator new [](i); } void operator delete [] (void *p, __SIZE_TYPE__ i) { delsize = i; ::operator delete [](p); } }; int main() { A* ap = new A [2...
google
chromium
access3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/access3.C
159
utf_8
a27f8fda827e27cce6b195811cf0f147
// { dg-do assemble } // Simple testcase for access control. class A { protected: void f (); }; class B : public A { public: void f () { A::f(); } };
google
chromium
ref3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/ref3.C
123
utf_8
66a1410cc0e7843cfd4a0231992df941
// { dg-do assemble } // PRMS Id: ???? void f (const int& i) { &(int&)i; // { dg-bogus "" } references ARE lvalues }
google
chromium
conversion4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/conversion4.C
227
utf_8
33db3d7a6fd00ee617691c31ef191028
// { dg-do assemble } struct A { A (int); }; struct B { operator int () { return 1; } }; void f (const A&); void g() { B b; f ((A) b); f (A (b)); // { dg-bogus "" } functional cast treated differently from C style }
google
chromium
ref12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/ref12.C
79
utf_8
b5bb9f26a206c4355bb81212d54935b3
// { dg-do run } void f (const char *const &) { } int main () { f ("hi"); }
google
chromium
trivial
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/trivial.C
2,197
utf_8
2f67020daf77d25c2c7bef28cfe4c164
// { dg-do assemble } // PRMS Id: 3665 //------------------------------------------------------------- // Referential declaration within class // // Imbeded below is the invocation of the compiler and the error // message // // This compiles successfully with both the xlC and CFRONT compilers // This was reviewe...
google
chromium
access16
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/access16.C
368
utf_8
bba77cc131421cb81193e76229707e6b
// { dg-do assemble } // Bug: g++ uses the same binfo for the a subobject of c and the a subobject // of b, so basetype_paths get bashed improperly. class a { protected: virtual void foo() { } // { dg-bogus "" } }; class b : public virtual a {}; class c : public b { public: void bar() { b::foo(); } // { dg-bogus...
google
chromium
warning7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/warning7.C
102
utf_8
68587f14a57035c7dcfe5788d601729c
// { dg-do assemble } // { dg-options "-Wunused" } // PRMS Id: 5481 struct A { }; static A a = A();
google
chromium
destruct
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/destruct.C
428
utf_8
fab7e62b3dbe52c95ce400b9a0a8614d
// { dg-do assemble } // Exhaustive test for destructors of simple types. // PRMS Id: 2744, 3308 template <class T> class A { T q; public: ~A() { q.T::~T(); q.~T(); (&q)->T::~T(); (&q)->~T(); } }; typedef char * cp; typedef int I; int main () { A<int> a; A<cp> b; int i; cp c; i.~I()...
google
chromium
rfg13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/rfg13.C
198
utf_8
ffde7a25a76a6d04ac637d8dbfedd1be
// { dg-do assemble } // Bug: g++ does overloading on a function-by-function basis. void f () { void (*fp)(void); { extern void g (); } fp = g; /* { dg-error "" } no 'g' in scope */ }
google
chromium
tempinst1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/tempinst1.C
469
utf_8
53ac07097be9bf3d20cdf6763ff25482
// { dg-do link } // { dg-options "-g" } // Bug: g++ fails to instantiate operator<<. struct ostream { ostream& operator<< (const char *) { return *this; }; }; template <class T> class foo; template <class T> ostream& operator<< (ostream& ios, foo<T>&obj) {return ios;} template <class T> class foo { friend ost...
google
chromium
parse11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/parse11.C
158
utf_8
46e40596c5c8c2adbf39d991c1fd3e92
// { dg-do assemble } // PRMS Id: 6825 class aClass { ; // { dg-error "" } missing declaration private: ; // { dg-error "" } missing declaration };
google
chromium
nested7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/nested7.C
211
utf_8
df399d2cf6bbc29c72c1f80ed9e1c459
// { dg-do assemble } // Testcase for defining nested types separately. class remote { class remote_file; }; class remote::remote_file { public: ~remote_file(); }; remote::remote_file::~remote_file() {}
google
chromium
dtor2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/dtor2.C
205
utf_8
825c81ed88e11a6d3a68a8d7854afacd
// { dg-do run } // PRMS Id: 5163 // Bug: g++ doesn't accept the explicit destructor call syntax for templates. template <class T> struct A { }; A<int> a; int main() { a.~A(); // { dg-bogus "" } }
google
chromium
synth
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/synth.C
227
utf_8
8cd600514f99027d8442f70908638e13
// { dg-do assemble } // Bug: the synthesized copy constructor for A is not found. struct A { // A (const A& a): i(a.i) {} int i; }; struct B { A a; B (const B& b): a(b.a), j(b.j) { } // { dg-bogus "" } int j; };
google
chromium
typeid2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/typeid2.C
525
utf_8
bc885562c630090d460d3a7b10e34c16
// { dg-do run } // PRMS Id: 11596 #include <typeinfo> extern "C" int printf (const char *, ...); class Chicken { public: int eggs_per_day; }; template <class Bird> class Flock { public: Bird * flock_head; int head_count; void print_self() { printf ("A flock of %d %ss\n", head_count, typeid (Bird).na...
google
chromium
conversion7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/conversion7.C
165
utf_8
1359528b6158fe5a538a004fca342b24
// { dg-do run } // Bug: g++ tries to look inside (B*)0 for a virtual base pointer. struct A { }; struct B : virtual A { }; A* a; int main() { a = (B*)0; }
google
chromium
pmf4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/pmf4.C
221
utf_8
b3db09b7cd9a1af401831695d40bab7b
// { dg-do assemble } // PRMS Id: 4484 (bug 5) // Bug: g++ can't convert between pmf types. class A; typedef void (A::*pmf)(); typedef void (A::*pmfc)() const; pmfc p = (pmfc)(pmf)0; // { dg-bogus "" } pmf conversion
google
chromium
bool
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/bool.C
884
utf_8
9b9ae08364d88d05090a55ccbf561424
// { dg-do assemble } // Testcase for uses of bool. int i,j,k; /* Check that types of certain expressions are bool. */ void f () { i ? j == k : true; i ? j < k : true; i ? j && k : true; } /* Check that g++ can find a conversion to bool when one exists. */ struct A { operator char * (); } a; struct B { oper...
google
chromium
ref10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/ref10.C
351
utf_8
5e43a7d7d89e730c493f6ba337b2dc0b
// { dg-do run } // Test that conversion from D* to B*& works properly. extern "C" int printf (const char *, ...); struct V { int a; }; struct B: virtual V { int b; }; struct D: B { int c; }; V* gp = 0; void foo(V * const &r) { gp = r; } int bar(V *r) { return (r != gp); } int main() { D *p = new D...
google
chromium
opeq2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/opeq2.C
415
utf_8
ad4155e3d2f483ba54c6a79b0bd37591
// { dg-do assemble } // Bug: default operator= is not being generated properly. // PRMS Id: 3525 struct ccUnwind { ccUnwind& operator = (const ccUnwind&); }; struct ccEllipseUnit { ccEllipseUnit () {} }; struct ccEllipse : ccUnwind { ccEllipse (); ccEllipse (const ccEllipseUnit&); }; void ...
google
chromium
cast3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/cast3.C
278
utf_8
b1c35f1220768faee5ffeeaee105279a
// { dg-do assemble } // PRMS Id: 7088 struct string { int length () const; string (string &); string (char * = 0); int operator [] (int); ~string (); }; void _cook(const string raw, bool for_postscript) { unsigned char c = (unsigned) ((string &)raw)[1]; }
google
chromium
condexp
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/condexp.C
183
utf_8
fc4a6af03c5197badf1546ba01faa800
// { dg-do assemble } // PRMS id: 5629 struct String { const char *x; }; class Pathname: public String { }; String f(int i) { Pathname p; String s; return i ? p: s; }
google
chromium
template16
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template16.C
604
utf_8
98b96ccfdf508217c8411ed9577d4b22
// { dg-do run } // PRMS Id: 1502 // Bug: g++ fails to resolve 'gnc' in the call to 'grid'. template<class T> class foo { public: foo() { } }; template<class T> class bar : public foo<T> { public: bar() : foo<T>() {} }; template<class T> class ben : public foo<T> { public: ben() : foo<T>() {} void grid(T ...
google
chromium
access23
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/access23.C
1,710
utf_8
35741288d1515537d02786e97fa11639
// { dg-do assemble } // PRMS Id: 9127 // Bug: members of anonymous unions are not access-controlled. #include <stdio.h> struct Foo { public: union { long A; void *pX; }; union X { long A; void *pX; } PUB ; int PUB_A; protected: union { long B; // { dg-error "" } protected void *p...
google
chromium
redecl1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/redecl1.C
223
utf_8
fb060d17ea08793e6aa9ab3c387a6fc5
// { dg-do assemble } class A { public: A (const A& ccref); friend A const re (const A& v1); // { dg-error "ambiguates" } }; A // const re (const A& ref) // { dg-error "new declaration" } { return A (ref); }
google
chromium
mangle1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/mangle1.C
291
utf_8
d7b46d0356390a8bd5909d6532368139
// { dg-do assemble } // Bug: numeric_outputed_need_bar is not cleared properly, adding random '_'s // to mangled names. template <int seed_length> class rand1 { public: rand1 (); }; class codes { public: rand1<32> * randgen; codes (int ptr); }; codes::codes (int ptr) { }
google
chromium
template8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template8.C
186
utf_8
bf9b9e774390745b6524aacd80dda893
// { dg-do assemble } // PRMS Id: 4827 class A; template <class T> int f (const T&, const A *); int g (const int& a) { return f (a, (A *)0); // { dg-bogus "" } failed unification }
google
chromium
rfg11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/rfg11.C
85
utf_8
c01631c31e11d4cc9155124ca3be92ad
// { dg-do assemble } typedef int int; /* { dg-error "" } trying to redefine int */
google
chromium
lvalue2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/lvalue2.C
355
utf_8
c1cda7bbd046edda77bc40c19bc41db7
// { dg-do assemble } // PRMS Id: 4892 // Bug: COND_EXPRs, MODIFY_EXPRs and COMPOUND_EXPRs aren't properly recognized // as lvalues. extern int foo; int& f (int& a, int& b) { return (foo ? a : b); // { dg-bogus "" } } int& g (int& a) { return (a = 0); // { dg-bogus "" } } int& h (int& a, int& b) { return ...
google
chromium
crash1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/crash1.C
322
utf_8
e1f35dc5cdbe0950a3d2f11e2bae3e0d
// { dg-do assemble } // Bug: g++ dies on this input. class Sample { public: int operator <<(const char *c); }; extern Sample sample; struct Simple { int a; }; extern "C" void get_it(); class Test { private: void test(); friend void get_it(); }; void Test::test() { sample << "hello"; ...
google
chromium
thunk1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/thunk1.C
656
utf_8
9c846445e2018745dcc34b2f1642858c
// { dg-do run } // Test that non-variadic function calls using thunks work right. struct A { void* p; A (void* q): p (q) { } A (const A& a): p (a.p) { } }; class CBase { public: virtual void BaseFunc(); }; class MMixin { public: virtual A MixinFunc(int arg, A arg2) = 0; }; class CExample : public CBase, pu...
google
chromium
template9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template9.C
286
utf_8
8440d3da5688b035d93aa00b1a95c9c6
// { dg-do assemble } // PRMS Id: 4864 // Bug: g++ can't deal with a guiding declaration which comes before the // template. void f (const int&, const int&); template <class T> void f (const T&, const T&) { } void g (int a) { f (a,a); // { dg-bogus "" } two identical candidates }
google
chromium
pmf
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/pmf.C
171
utf_8
0e7cc1525ad3899313048d3cbd75fe99
// { dg-do assemble } // PRMS Id: 4333 // Bug: g++ can't deal with casts to pointer to member function. class A { }; typedef void (A::* pmf)(); void foo () { (pmf) 0; }
google
chromium
pmem
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/pmem.C
226
utf_8
ec5eff12ccb92d8e588374b0048d3c28
// { dg-do assemble } // Bug: g++ parses the declaration of 'char A::* foo' below as a // declaration of 'char A'. class A { }; typedef int foo; void f () { char A::* foo; foo = 0; // { dg-bogus "" } parsing blunder }
google
chromium
overload21
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/overload21.C
337
utf_8
8dfded660dfee2157b69050dee60eea0
// { dg-do assemble } struct X { void f (int = 4, char = 'r'); // { dg-error "previous specification" } void g (int = 4, char = 'r'); // { dg-error "previous specification" } }; void X::f (int i = 4, char x = 'r') // { dg-error "default argument" } { } void X::g (int i = 9, char x = 's') // { dg-error "default...
google
chromium
overload2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/overload2.C
319
utf_8
5ae6f5bc4522176f97d2cd841e1a7926
// { dg-do assemble } // Bug: foo and bar are considered to be overloaded (i.e. their // IDENTIFIER_GLOBAL_VALUES are TREE_LISTs) even though they aren't, // so ?: thinks it can't resolve the names. void foo (); void bar (); void baz () { void (*p)() = 1 ? foo : bar; // { dg-bogus "" } wrongful overloading }
google
chromium
temporary8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/temporary8.C
362
utf_8
debc812df1a0f637076b9bc28f127e54
// { dg-do run } // Test for proper handling of temporaries in ?: exprs. extern "C" int printf (const char *, ...); int c = 0, d = 0; class A { public: A() { ++c; } A(const A&) { ++c; } ~A() { ++d; } }; A f (const A& a) { return (c ? A() : A()); } int main() { { f (c ? A() : A()); } printf ("%d %...
google
chromium
access20
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/access20.C
586
utf_8
93396a527b94b7c75ed7f8d6c9052bab
// { dg-do assemble } // PRMS Id: 6662 // Bug: we crash trying to check the access on anglesSinesCosines. #define Double double class GCTransform { protected: struct angle { Double phi1 ; Double phi2 ; } ; struct sineAndCosine { Double cosine1 ; Double cosine2 ; Double sine1 ; Double sin...
google
chromium
access22
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/access22.C
303
utf_8
3e06c58fbaf584a9dd8137542a79f1e3
// { dg-do assemble } // PRMS Id: 8518 // Bug: Call to foo is not checked for accessibility class A { private: static void foo() {} // { dg-error "" } public: void goo() {} }; struct B : public A { void func() { foo(); } // { dg-error "" } }; int main() { B b; b.func(); }
google
chromium
template19
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template19.C
255
utf_8
fb67cebef52c2be3f07d28476c83da0f
// { dg-do run } // Make sure type deduction isn't confused by top-level cv-quals. template <class T> T max (const T a, const T b) { return a>b?a:b; } int main() { int a = 0, b = 1; int c = max (a, b); int d = max ((const int)a, (const int)b); }
google
chromium
dtor4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/dtor4.C
306
utf_8
3cd62f4f912a371656574c92fe53adbd
// { dg-do assemble } // PRMS Id: 5420 // Bug: g++ gets mixed up calling destructors for references. template<class X> class Z { public: char space[100]; void kill() { X& x = (X&) space[0]; x.~X(); } }; class C { int i; }; void f() { Z<int> r; r.kill(); Z<C> s; s.kill(); }
google
chromium
pmf2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/pmf2.C
256
utf_8
ce5cc815b53f6400ffe4461ca2ca0def
// { dg-do assemble } // PRMS Id: 4484 (bug 3) // Bug: g++ does implicitly take the address of methods passed to fns. struct A { void f (); }; void g (void (A::*)()); void h () { g (A::f); // { dg-error "" } failed conversion to method pointer }
google
chromium
rfg24
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/rfg24.C
159
utf_8
2cbe5674217be63ecc40b37d229fac84
// { dg-do assemble } typedef int Int; Int Int_object_1; void test () { ((Int) Int_object_1) = Int_object_1; /* { dg-error "" } not an lvalue*/ }
google
chromium
overload32
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/overload32.C
225
utf_8
8c0888e528f92e93b1dc0928311cde10
// { dg-do assemble } // PRMS Id: 7128 class B {}; class D : public B {}; class X { public: operator const B & () const; operator const D & () const; }; void f( const D & ); void g( const X & x ) { f( x ); }
google
chromium
template29
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template29.C
292
utf_8
df154678c22816af85a841d67d2cbe30
// { dg-do assemble } // PRMS Id: 9500 template <int S> class base { public: inline base(); }; template <class T> class derived : public base<sizeof(T)> { public: inline derived(); }; template <class T> inline derived<T>::derived() : base<sizeof(T)>(){}
google
chromium
rfg17
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/rfg17.C
315
utf_8
00dc71ab735085e8af95ef62c58042dd
// { dg-do assemble } // The default assignment operator for B uses array assignment, so we can't // just disallow it... struct A { A& operator=(const A&); }; struct B { A f[20]; }; int a1[20], a2[20]; B b1, b2; void test () { b1 = b2; /* OK */ a1 = a2; /* { dg-error "" } array assignment */ }
google
chromium
template33
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template33.C
247
utf_8
088a934dd8a70a8383d8a361fa4f4a53
// { dg-do assemble } // Test nested enums in templates. template <class T> class A { public: enum muni {X, Y}; muni e() { return X; } muni f(); }; template <class T> typename A<T>::muni A<T>::f() { return X; } template class A<int>;
google
chromium
crash4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/crash4.C
818
utf_8
13d8905426885faa6eafe2778f295fe4
// { dg-do assemble } // PRMS Id: 4346 // Bug: g++ dies on redefinition of cc_Array::repInvariant. class ccObjectInfo { public: virtual const ccObjectInfo& repInvariant (int =0) const; }; template <class T> class cc_Array : public ccObjectInfo { public: virtual const ccObjectInfo& repInvariant (int =0) const ;...
google
chromium
enum5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/enum5.C
125
utf_8
beb5eb6418228be74e469fbcf0dbb8b4
// { dg-do run } enum { a = 1 }; int main(void) { int l = -1; return ! (l < a); // testcase fails if a is unsigned }
google
chromium
rfg8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/rfg8.C
124
utf_8
341832e9eafc4942ac97aff26eb9a16f
// { dg-do assemble } // Bug: g++ is wrongfully pedantic about union initializers. union U { int mbr; } array[1] = { 0 };
google
chromium
const4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/const4.C
399
utf_8
13566f1e842dbeb924a2cacac98f41c5
// { dg-do assemble } // PRMS Id: 8927 // Bug: complex inheritance interferes with const checking class GrandParent { public: virtual void DoIt(); protected: int A; }; class Parent : virtual public GrandParent { public: virtual void DoX() const; }; class Child : public Parent { public: void DoX() const; }; ...
google
chromium
lookup2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/lookup2.C
165
utf_8
43b430aae4fdb9e4cc108190d037691d
// { dg-do assemble } struct A { struct B { B (); }; }; void f (A::B); void g () { A::B b; f (b); // { dg-bogus "" } can't find nested constructor }
google
chromium
synth5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/synth5.C
250
utf_8
6533edd5a6561a080c6dbde7e54e4d75
// { dg-do run } // Bug: generated B::operator= tries to call A::operator= #pragma implementation #line 1 "synth5.h" #pragma interface struct A { virtual A& operator= (const A&) = 0; }; struct B: public A { }; #line 5 "synth5.C" int main() { }
google
chromium
lineno2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/lineno2.C
265
utf_8
8ec729bd9f48e94f3823976c8a4d526c
// { dg-do assemble } // { dg-options "" } // GROUPS passed error-reporting // Bug: # line directive gets ignored immediately after text. template <class T> class A { public: # 200 "lineno2.C" }; main() { undef1(); // { dg-error "" "" { target *-*-* } 204 } }
google
chromium
parse2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/parse2.C
118
utf_8
5f6db8ff9f40046b7990fff2e896f95a
// { dg-do assemble } // Bug: g++ doesn't understand constructor syntax for pointers. void f () { char * p (0); }
google
chromium
context
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/context.C
366
utf_8
7e6b372b5cf2e20339dfcaaaca502ad0
// { dg-do assemble } // PRMS Id: 3988 // Bug: DECL_CONTEXT of A::B gets clobbered in pushdecl when defining A::foo(). #pragma implementation "context.h" #line 1 "context.h" #pragma interface template <class T> struct A { inline void foo () { } class B { }; }; struct C : public A<int> { void bar (C::B&); }; #...
google
chromium
rvalue2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/rvalue2.C
256
utf_8
a7a84efb83b07b626b9173305e6c605d
// { dg-do run } // Test for undesired aliasing. struct A { const A * get_this () const { return this; } }; int main () { A a; int r = 0; const A& ar1 = (A)a; if (&ar1 == &a) r |= 1; if (A(a).get_this () == &a) r |= 2; return r; }
google
chromium
thunk2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C
789
utf_8
e009d9b91513051053d5ef3a438adbd8
// { dg-do run { target fpic } } // { dg-options "-fPIC" } // { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } // Test that non-variadic function calls using thunks and PIC work right. struct A { void* p; A (void* q): p (q) { } A (const A& a): p (a.p) { } }; class CBase { publi...
google
chromium
access2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/access2.C
178
utf_8
bebb40e67f9af5ddda7a716f19ffba0f
// { dg-do assemble } // Bug: g++ doesn't deal with friends also being derived classes. class A { int i; friend class B; }; class B : public A { void f () { i = 1; } };
google
chromium
byval3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/byval3.C
261
utf_8
e532df26a2e57d3c517f97d9d1dd2ac2
// { dg-do assemble } // Test to make sure that value return of classes with cleanups works; it // has been broken at various times on PCC_STATIC_STRUCT_RETURN targets. struct A {}; struct R : virtual A { virtual ~R(); }; R g(); void encode() { g(); }
google
chromium
overload28
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/overload28.C
221
utf_8
ee0e97396936ce49927904231465b6b0
// { dg-do assemble } // PRMS Id: 6056 struct Foo { Foo() { } // { dg-message "note" } Foo(int i = 25) { } // { dg-message "note" } }; int main() { Foo* f1 = new Foo(); // { dg-error "ambiguous" } }
google
chromium
overload35
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/overload35.C
342
utf_8
4eb62e3619bb721a42dfdb4b6e8187a6
// { dg-do assemble } // PRMS Id: 9647 class castBug { public: operator int *(); operator const int *() const; }; class castBug2 { public: operator const int *() const; }; void voidfn(void *); void test() { castBug b; castBug2 b2; voidfn(b); // { dg-bogus "" } voidfn(b2); // { dg-error ""...