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
scoping11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/scoping11.C
135
utf_8
55dc1fca689030b5a494bddbb4c29887
// { dg-do assemble } void f (); void g () { int f; { void f (); f (); // { dg-bogus "" } trying to call integer } }
google
android
rfg21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/rfg21.C
101
utf_8
13ebf23427fa18f4ee543a709e2a52be
// { dg-do assemble } char array0[4] = "abcde"; /* { dg-error "" } initializer too long */
google
android
overload13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload13.C
491
utf_8
39865fb082322c1d2f877e1e31f98ce2
// { dg-do run } // Bug: g++ screws up derived->base conversions when calling a global function // in the presence of matching members in the base. Whew. struct xios { virtual ~xios() { } }; struct xistream: virtual public xios { int j; void operator>>(char&); }; struct xfstreambase: virtual public xios { };...
google
android
rfg18
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/rfg18.C
242
utf_8
e3f5957253643467d6197c84c260a066
// { dg-do assemble } // Any expression may be explicitly converted to type void. struct S { int m[10]; } object; struct S f () { return object; } void test () { (void) f().m; /* OK - cast to void; see constraints in 3.8.1 */ }
google
android
parse13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/parse13.C
137
utf_8
91df7257f1a1bda745fa52ba4d8a400d
// { dg-do assemble } struct A { struct B {}; struct C; }; struct A :: C : A :: B {}; // { dg-bogus "" } parse error before `:'
google
android
pmem3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/pmem3.C
263
utf_8
a4443cf3b2310e9fdd2347e296db725e
// { dg-do run } // Test that comparison of pointers to members does not complain about // contravariance violation. struct A { int i; }; struct B : public A { int j; int f (); }; int main () { int A::*apm = &A::i; int B::*bpm = apm; return apm != bpm; }
google
android
scoping
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/scoping.C
199
utf_8
647286463ce7ee3841394dc65c3053c9
// { dg-do assemble } // PRMS Id: 3977 // Bug: A member function is not hidden properly by a later use of its name. struct A { void index (); }; struct B: A { int index; B(): index(4) {} };
google
android
optimize2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/optimize2.C
274
utf_8
796c0d119fc65e4ae223644438d7907e
// { dg-do run } // { dg-options "-w" } // Used to crash on the alpha with optimization. extern "C" void abort (void); struct Fix { unsigned short l; }; static inline void f (int len) { if (len > 65535) abort (); } struct Fix a = { 33 }; main() { f (a.l); }
google
android
crash5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/crash5.C
136
utf_8
5723e0186bec62dede196f7a356a847b
// { dg-do assemble } // Bug: g++ doesn't deal well with abstract declarators used inappropriately. void (*)(); // { dg-error "" }
google
android
crash11
.C
toolchain/gcc/gcc-4.9/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
android
pmf2
.C
toolchain/gcc/gcc-4.9/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
android
special
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/special.C
225
utf_8
6ae3f3bde787593240dc6100cd27cf10
// { dg-do assemble } // Make sure that forward declarations of specializations work... template <class T> class A { }; template <> class A<int>; A<int> a; // { dg-error "" } incomplete type template <> class A<int> { };
google
android
default3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/default3.C
148
utf_8
d0074ebb32b10bb09619461814aaee7e
// { dg-do assemble } // Bug: type_list_equal aborts when it sees lang-specific tree nodes. struct A { }; void f (A a = A()); void g (A a = A());
google
android
synth8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/synth8.C
232
utf_8
bbe86c8c489266c11677d7fd660aa887
// { dg-do assemble } // Bug: the synthesized constructor for A tries to use the mem-initializer // list for the B constructor. struct A { virtual ~A(); }; struct B { B(); char* x; A* a; }; B::B() : x(0), a(new A()) { }
google
android
typedef3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/typedef3.C
194
utf_8
19a2f7b346b6515ddde5ce656b1b2981
// { dg-do assemble } // Test that inheriting from a type typedefed to itself works. typedef struct class1 { class1& operator=(const class1&); } class1; class class2 : public class1 { };
google
android
temporary8
.C
toolchain/gcc/gcc-4.9/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
android
conversion
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/conversion.C
224
utf_8
f1da5c6f4551b93349dffadb77337aba
// { dg-do assemble } // Bug: g++ doesn't find the conversion path from DPtr& to B*. class B {}; class D : public B {}; class DPtr { public: operator D*() const; }; void foo (B* bp); void bar (DPtr& dp) { foo (dp); }
google
android
lex1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/lex1.C
85
utf_8
8abcf8e3e06b96f67a9d0eb9fc42ae3e
// { dg-do run } int main() { char c = '\351'; if (c != '\351') return 1; }
google
android
pmf
.C
toolchain/gcc/gcc-4.9/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
android
3523
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/3523.C
998
utf_8
3c25148320e99f6c4530d8657360c9e9
// { dg-do assemble } // GROUPS passed assignment class ccUnwind { public: virtual ~ccUnwind (); // comment out virtual, and void diag changes }; template<class T> class ccHandle : public ccUnwind // similarly comment out inheritance { public: ccHandle& operator = (const ccHandle& h); }; class cc_Image; ...
google
android
rfg14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/rfg14.C
492
utf_8
6875f3adb94cd43f54c4abc1a4ad7a96
// { dg-do assemble } void *vp; int (*ap)[]; struct S *sp; union U *up; int (*fp)(); void test () { vp++; /* { dg-error "" } incrementing void * */ ap++; /* { dg-error "" } incrementing ptr to incomplete type */ sp++; /* { dg-error "" } incrementing ptr to incomp...
google
android
lvalue3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/lvalue3.C
179
utf_8
0add9f87083749cc19c9e33240565f59
// { dg-do assemble } // Bug: C++ semantics for assignment don't match the backend semantics for // MODIFY_EXPR. void foo (int j) { (j = 1)++; // causes compiler segfault }
google
android
template6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template6.C
334
utf_8
fe7efb4be97a1c7553a5496a0ab7646a
// { dg-do run } // PRMS Id: 4656 // Testcase for use of member pointers in template resolution template <class T> class A { public: A() : a(1) {} T a; }; template <class T> int foo (T A<int>::*p) { return 0; } int main() { int A<int>::*pm = &A<int>::a; // { dg-bogus "" } failed temp resolution foo (pm); ...
google
android
mangle2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/mangle2.C
227
utf_8
a107ecddc0aee51804b7689ef643b5e6
// { dg-do assemble } // I guess this was broken once. template <class C, int D> class X { }; typedef X<int, 0> T; class Y { public: ~Y(); }; class Z { public: void f(T**); }; void Z::f(T** t) { } Y::~Y() { }
google
android
tempcons
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/tempcons.C
174
utf_8
9e42d5df6437e76834d1b688b85f8b68
// { dg-do assemble } // Bug: member initializers are allowed where they shouldn't be. template <class T> struct A { int i; Blarg () : i(0) { } // { dg-error "" } };
google
android
inline2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/inline2.C
223
utf_8
e97423b043f136c0afd26832a1056bab
// { dg-do assemble } // { dg-options "-O" } // Bug: the lang-specific bits of the decl for g aren't being copied when // inlining. inline void f () { void g (); } void h() { f(); // causes compiler segfault - }
google
android
template41
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template41.C
579
utf_8
06612c475479383f58b655c5b6f0dad6
// { dg-do run } // PRMS Id: 11420 // Bug: Can't handle indirect virtual template base init. extern "C" int printf (const char *, ...); template<class T> class Vbase { public: Vbase(T i) { printf ("%d\n", i); } }; template<class T> class D1 : virtual public Vbase<T> { public: D1(T i) : Vbase<T>(i) {} }; temp...
google
android
template19
.C
toolchain/gcc/gcc-4.9/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
android
overload12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload12.C
239
utf_8
6641ce97a2ce97987c1ef099986f9747
// { dg-do run } // PRMS Id: 4066 // Bug: g++ doesn't notice the const on reference returns. struct B { int foo() { return 1; } int foo() const { return 0; } }; B b_; const B &b () { return b_; } int main() { return b().foo(); }
google
android
rfg25
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/rfg25.C
106
utf_8
6dac5867e70284742950f30fffc05b04
// { dg-do assemble } struct { int :0; }; /* { dg-error "" } anon struct not used to declare objects */
google
android
lineno4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/lineno4.C
373
utf_8
b21779b582953ad0e5d78c2b9d29b161
// { dg-do assemble } // { dg-options "" } // GROUPS passed error-reporting // Bug: # line directive in template definition interferes with growing obstack template <class T> class A { public: # 200 "lineno4.C" int foo () { undef1(); } // { dg-error "" "" { target *-*-* } 200 } // { dg-message "note" "not...
google
android
delete1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/delete1.C
204
utf_8
770ac6962abed053d610c257880c8d9f
// { dg-do assemble } #include <stddef.h> struct A { virtual void operator delete (void *); // { dg-error "" } virtual delete virtual void * operator new (size_t); // { dg-error "" } virtual new };
google
android
delete2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/delete2.C
230
utf_8
2c2af3538bbebd7769b8502247845d12
// { dg-do assemble } // PRMS Id: 5003 // Bug: g++ complains about calling the destructor for a const object. struct A { public: ~A(); }; const A foo (); void bar() { A n; n = foo(); // { dg-bogus "" } deleting const }
google
android
nested5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/nested5.C
149
utf_8
113f331fb4d3fad52e53327471782660
// { dg-do assemble } struct A { struct B { }; }; struct C : public A { struct D : public B // { dg-bogus "" } can't find B { }; };
google
android
template3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template3.C
248
utf_8
04bedf6df6ecdffcb63b9a43eb255c70
// { dg-do run } // PRMS Id: 4679 // Bug: g++ doesn't re-instantiate templates after definition is seen. template <class T> struct A; A<int> *a; template <class T> struct A { T t; }; int main() { if (a) a->t = 1; // { dg-bogus "" } }
google
android
template24
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template24.C
331
utf_8
0095813e8809c346cf2bf57814a3b7e8
// { dg-do run } // Bug: g++ doesn't find the conversion from ostream_withassign to ostream. #include <iostream> template <class T> struct A { T t; }; template <class T> std::ostream & operator<< (std::ostream & os, A<T> & a) { os << a.t; return os; } int main () { A<int> a = { 1 }; std::cout << a << std...
google
android
nested7
.C
toolchain/gcc/gcc-4.9/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
android
inline3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/inline3.C
810
utf_8
d5b295340ce3c4e7c90072f6f9d23b1f
// { dg-do run } // { dg-options "-O2" } // Testcase for order of destruction. extern "C" int printf (const char *, ...); int c; int r; struct B { B(); B( B const& ); ~B(); }; struct A { A(); A( A const& ); ~A(); operator B (); }; inline A::operator B () { printf( "operator B ()\n"); return B(); } A...
google
android
destruct
.C
toolchain/gcc/gcc-4.9/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
android
scoping13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/scoping13.C
198
utf_8
c95f927cfb45bc8afae59ec5c34f2c56
// { dg-do assemble } struct A { typedef int foo; }; struct B: public A { typedef int bar; struct C { void g (B::bar); // { dg-bogus "" } nested type failure void f (B::foo); }; };
google
android
overload1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload1.C
204
utf_8
1af3ca24349ac74154f0d4733a757f63
// { dg-do assemble } // Bug: g++ thinks there is a conversion from void * to B *. struct A { operator void* (); }; struct B: public A { }; void bar (A& a) { B* bp = (B*)a; // { dg-error "" } }
google
android
c-inline
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/c-inline.C
287
utf_8
cf06a8bbf7aa350ee56e4d98d2401d80
// { dg-do assemble } // Bug: the compiler gets hopelessly confused. #line 1 "c-inline.h" #pragma interface inline double abs (double) { return 0.0; } inline short abs (short) { return 0; } #line 2 "c-inline.C" extern "C" { inline int abs (int) { return 0; } // causes segfault - }
google
android
overload34
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload34.C
99
utf_8
67066a5a83966325305a697e98a8a080
// { dg-do assemble } // PRMS ID: 8010 class X { int & flag; public: void f(){ flag++ ; } };
google
android
crash3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/crash3.C
325
utf_8
2de80771dcd7a4c3c3ef369443d1499d
// { dg-do assemble } // Bug: g++ tries to generate initialization semantics for a Node from an int, // and fails. struct Node // { dg-message "note" } { Node* child[2]; }; void bug(int i) { Node* q = new Node(i); // { dg-error "no matching" } // { dg-message "candidate" "candidate note" { target *-*-* } 12...
google
android
template16
.C
toolchain/gcc/gcc-4.9/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
android
temporary7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/temporary7.C
338
utf_8
b6a4074e8ef245e11293a519205c99f3
// { dg-do run } // PRMS ID: 7304 struct V { int n; V() : n(0) { } V(int x) : n(x) { } }; V baz(const V &x) { return x; } int bar(V v1, V v2, V v3) { return v1.n; } struct A { A(): n(7) { } int foo(); V n; }; int A::foo() { V v1, v2; return bar(n, baz(v1), v2); } int main() { A a; return ...
google
android
warning3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/warning3.C
210
utf_8
6384c745095d306a45f180077d5d781e
// { dg-do assemble } // { dg-options "-Wshadow" } // Bug: overloading of 'A' for template causes bogus shadowing warnings. template<class T> class A { public: virtual ~A() {} }; template class A<int>;
google
android
optimize
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/optimize.C
556
utf_8
50849d785fd4c47ffa71357f340f5f0e
// { dg-do assemble } // { dg-options "-O -pedantic-errors" } // Bug: g++ claims that control can fall off the end of these functions. // PRMS Id: 4943 struct A { A(); A(const A&); A& operator= (const A&); ~A(); }; int f () { A a[2]; return 1; } // { dg-bogus "" } jump_optimize int g () { A a; re...
google
android
enum4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/enum4.C
162
utf_8
743310178fbb706facf03822fb40e31e
// { dg-do assemble } // { dg-options "-Wall" } enum tristate { no = -1, maybe, yes }; tristate definite_tristate (int truth) { return (truth) ? yes : no; }
google
android
bool3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/bool3.C
369
utf_8
0281d501181e7c62410bcd2b6de8ccdc
// { dg-do assemble } // Subject: Problem with constant expressions for bitfields // Date: Mon, 6 Jun 94 14:00:01 EDT // Bug: g++ doesn't treat boolean true and false as constant values. enum E { e1,e2,e3,e4,e5 }; struct X { unsigned int bits : ((e5 > 4) ? 8 : 4); // { dg-bogus "" } constant expression };
google
android
dcast1
.C
toolchain/gcc/gcc-4.9/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
android
lvalue
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/lvalue.C
396
utf_8
0744b000765a926abafe72b512dad92f
// { dg-do assemble } // Bug: Scoped method calls don't propagate the constness of `this'. // PRMS Id: 4181 (second testcase) class D; class Bptr { public: Bptr& operator=(D*); const Bptr& operator=(const D*) const; }; class Dptr : public Bptr { public: const Dptr& operator=(...
google
android
opeq2
.C
toolchain/gcc/gcc-4.9/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
android
conversion4
.C
toolchain/gcc/gcc-4.9/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
android
dcast2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/dcast2.C
320
utf_8
45c186d279214c05bed1af3877bbe916
// { dg-do run } struct A { virtual void f() { } }; struct B { virtual void g() { } }; struct C : public A, public B { }; int main () { C* cp = 0; B* bp = 0; if (dynamic_cast <B*> (cp) != 0) return 1; if (dynamic_cast <void *> (bp) != 0) return 1; if (dynamic_cast <C*> (bp) != 0) return 1; }
google
android
synth3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/synth3.C
170
utf_8
178748a5e7a2c50f62f87e26390a355e
// { dg-do assemble } // Testcase for wrongful generation of copy constructor. class A { }; class B: virtual private A { }; class D: public B { }; // { dg-bogus "" }
google
android
default2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/default2.C
437
utf_8
34c1a26078a116f37cbfb5185bf0aa67
// { dg-do assemble } // PRMS Id: 5921 // Bug: default arguments containing constructor calls persist incorrectly. class foo { public: foo(); foo(int x); public: int iamamember; }; class bar { public: bar(); int memberfunction(int i, const char *j, double k, foo foo1 = foo(0)); }; int pain(bar *bar1) {...
google
android
crash6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/crash6.C
136
utf_8
708d8b60488e8033c68be64bdd4d3a10
// { dg-do assemble } // Bug: g++ dies on the below. class A { }; void f () { A a; a.~a(); // { dg-error "" } causes segfault }
google
android
2371
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/2371.C
9,450
utf_8
f864717479387b2c1ef761870928e97e
// { dg-do run } // { dg-options "" } # 1 "SetLS.cc" // GROUPS passed templates nested-classes // // The SetLS template test // // #pragma implementation "ListS.h" #pragma implementation "SetLS.h" #include <cstdlib> #include <iostream> using namespace std; # 1 "../../templates/SetLS.h" 1 // -*- C++ -*- // // A Set Tem...
google
android
access16
.C
toolchain/gcc/gcc-4.9/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
android
template14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template14.C
355
utf_8
4e368747f0f17e48897b1f1e32c1ce30
// { dg-do run } // PRMS Id: 4745 // Bug: g++ gets the constructor and destructor confused because the default // parm prevents the two constructor types from satisfying ==. template <class T> struct A { A(int = 1); ~A(); }; template <class T> A<T>::A(int) { } // causes compiler abort template <class T> A<T>::~A...
google
android
access9
.C
toolchain/gcc/gcc-4.9/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
android
conversion9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/conversion9.C
169
utf_8
75d3a37da568ed0385b73bc311845a19
// { dg-do run } // PRMS Id: 8475 class SomeClass { public: operator int & () { static int x; return x; } } a; int main (int, char**) { return a + 0; }
google
android
rvalue1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/rvalue1.C
1,121
utf_8
8d7bfb887f857b536bd49eb6280f1359
// { dg-do run } // PRMS Id: 6000 // Bug: g++ gets confused trying to build up a reference to a cast. class String { protected: char *cp; public: String(char *incp); String(const String &constStringRef); virtual void virtualFn1(void) const {;} }; String::String(char *incp) { cp = incp; } String::String(co...
google
android
new5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/new5.C
82
utf_8
a0e06fefdf82fe1040c38c7cfbfe6cc6
// { dg-do run } int main () { const int *p = new const int (0); delete p; }
google
android
anon
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/anon.C
278
utf_8
8d11cb9a258c08aefb18a70b8e85fd27
// { dg-do run } typedef struct { int i; } foo; struct A : public foo { struct { int i; } x; }; int main () { A a; a.i = 5; a.x.i = 42; A b (a); a = b; if (a.i != 5 || a.x.i != 42) return 1; return 0; }
google
android
parse12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/parse12.C
223
utf_8
44598d99c92aed74b55f3f978bcc2506
// { dg-do run } // PRMS Id: 6821 struct A { int operator()(int i) { return i; } }; struct B { A* p; int f () { return (*p)(42); } // { dg-bogus "" } }; int main () { B b = { new A }; return b.f () != 42; }
google
android
rfg28
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/rfg28.C
381
utf_8
9be6d3008ce17e1879ba82dc3dbf0f2d
// { dg-do assemble } /* From 01/25/94 working paper (7.1.3): If, in a decl-specifier-seq containing the decl-specifier typedef, there is no type-specifier, or the only type-specifiers are cv- qualifiers, the typedef declaration is ill-formed. */ typedef foo; // { dg-error "" } invalid ty...
google
android
template25
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template25.C
788
utf_8
f99f8582ab403089e9e338e2a37e5eda
// { dg-do run } // PRMS Id: 6393 // Bug: g++ is too lax in considering UPTs to be the same. template <class R, class T> class Bar { public: R do_bar (T arg); }; template <class T> class Foo { T i; public: void do_foo () {} void do_foo (T const & t) {} void do_foo (Bar<char, T> const & bar); // {} Put t...
google
android
lineno5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/lineno5.C
196
utf_8
a11de2fe636242e28276ae01dfbca8c7
// { dg-do assemble } // GROUPS passed error-reporting // Bug: incomplete instantiation messes with lineno template <class T> class A; int main() { A<int> *p; undef1();// { dg-error "" } }
google
android
ref3
.C
toolchain/gcc/gcc-4.9/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
android
template31
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template31.C
615
utf_8
1b0ebe91aa68fdfb45280fb9a08e7c53
// { dg-do run } // PRMS Id: 8569 #include <iostream> #include <vector> #include <cstdlib> using std::vector; class Component { int george; char mabel[128]; }; class CopyMe { public: CopyMe(){;} private: vector<Component> strvec; }; class IncludeIt { public: IncludeIt() {} ~IncludeIt() {...
google
android
overload22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload22.C
290
utf_8
bc7e41c42c6e2576b834163c75d5d78e
// { dg-do assemble } // PRMS Id: 4574 // Bug: g++ prefers int to double for float& argument inline double abs (double x) { return x;} inline int abs (int i) { return i; } float& fn(float& f) { return f; } void foo() { float f = 23.45; abs(fn(f)); // gets bogus warning }
google
android
new3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/new3.C
526
utf_8
eb117dc6d9c6a4627be2ca6a7a06236e
// { dg-do run } // { dg-options "-fcheck-new -pedantic -Wno-long-long" } // PRMS Id: 6037 extern "C" void * malloc (__SIZE_TYPE__); int ena = 0; struct A { int i; A () { i = 2; } void * operator new (__SIZE_TYPE__ s) { if (ena) return 0; return malloc (s); } }; struct B { int i; B () {...
google
android
enum5
.C
toolchain/gcc/gcc-4.9/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
android
dtor3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/dtor3.C
367
utf_8
4ab2fc38e3661e2742b975972c9b2dbc
// { dg-do assemble } // PRMS Id: 5341 // Bug: g++ complains about the explicit destructor notation. #include <stddef.h> void *operator new(size_t Size, void* pThing) { return pThing; } template <class T> class Stack { public: Stack() { new (Data) T(); } ~Stack() { ((T*)Data)->~T(); } private: char Data[sizeo...
google
android
opover
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/opover.C
248
utf_8
fa239349b87333357926a294a44fee03
// { dg-do assemble } // Bug: g++ prefers a non-matching operator== over user-defined conversions // and a default operator==. struct A { operator int (); }; struct B { friend int operator== (B, int); }; int foo (A& a) { return a == 1; }
google
android
template28
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template28.C
315
utf_8
55a4409b20effb409975701d8a1450dc
// { dg-do run } // PRMS Id: 7179 template <class T> class Car{ public: Car(); } ; class Wheels{ public: Wheels(); } ; class Shop { public: Shop(); private: Car<Wheels> car ; } ; Wheels::Wheels() {} Shop::Shop() {} int main() { Shop shop ; return 0 ; } template <class T> Car<T>::Car() {}
google
android
template27
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template27.C
616
utf_8
6e91adcf7521dd4621b538d210111b67
// { dg-do run } // PRMS Id: 6826 // Check that unnecessary templates are not instantiated. template <class T> class Test { public: void doThiss(); void doThat(); }; template <class T> void Test<T>::doThiss() { T x; x.thiss(); } template <class T> void Test<T>::doThat() { T x; x.that(...
google
android
temporary3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/temporary3.C
386
utf_8
852f61e7f2559e88807caba3b50ea8e2
// { dg-do run } // Bug: the temporary returned from f is elided, causing a to be constructed // twice but only destroyed once. extern "C" int printf (const char *, ...); int c,d; struct A { A (int) { c++; } ~A () { d++; } A (const A&) { c++; } int i; }; A f () { return 1; } int main () { { A a (1);...
google
android
overload24
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload24.C
288
utf_8
7c012da1d459fa7efbbe77bdacf46eb4
// { dg-do assemble } // PRMS Id: 5124 // Bug: g++ promotes bar to int* too soon and the call to f fails. typedef int arr[1]; struct A { void f(void); void f(arr &); void g(void); void g(int *); void h(void); }; void A::h(void) { arr bar; f(bar); g(bar); }
google
android
synth7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/synth7.C
231
utf_8
a04f1c7b8c7495f28bbc0d57eb6602c0
// { dg-do run } // Testcase to make sure that synthesized methods are found when needed. struct B { ~B() { } }; struct A { B b; }; int main() { A a, b (a), c = A(); A& (A::*afp)(const A&) = &A::operator=; (a.*afp) (b); }
google
android
explicit
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/explicit.C
259
utf_8
48450b1b5f0295f7905a77b1f41b6274
// { dg-do assemble } // Testcase for explicit instantiation of templates. template <class T> class A { T t; public: void f () { } }; template class A<int>; template <class T> T min (T a, T b) { return (a < b ? a : b); } template int min (int, int);
google
android
parse7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/parse7.C
121
utf_8
6d54085572d370d3dcef11aec57be624
// { dg-do assemble } // Bug: g++ tries to parse this as a constructor. typedef int foo; struct A { foo (*bar)(); };
google
android
ambig3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/ambig3.C
320
utf_8
dd61795a3b7287674e730b30bf7d8d37
// { dg-do assemble } // Testcase for ambiguity between function and variable declaration (8.2). struct A { A (int, int); int k; }; void f () { int i[2], j; A a (int (i[1]), j); // { dg-bogus "" } late parsing A b (int (i[1]), int j); // function a.k = 0; // { dg-bogus "" } late parsing b (i, j); }
google
android
redecl1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/redecl1.C
230
utf_8
a9ef52f3707d02b8e4025fc5a4f3be5e
// { dg-do assemble } class A { public: A (const A& ccref); friend A const re (const A& v1); // { dg-message "old declaration" } }; A // const re (const A& ref) // { dg-error "new declaration" } { return A (ref); }
google
android
rfg26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/rfg26.C
175
utf_8
a6945d529cadafc1ffa77e88d84f2880
// { dg-do assemble } typedef void (FTYPE) (); FTYPE f; /* ok */ void test_0 () { (FTYPE) f; /* { dg-error "" } casting to function type */ }
google
android
overload36
.C
toolchain/gcc/gcc-4.9/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
android
rfg10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/rfg10.C
273
utf_8
8f35f367754c4d6045130631a8a4fdd0
// { dg-do assemble } // { dg-options "-pedantic-errors -std=c++98" } // Bug: g++ doesn't notice the overflow in the enum values. #include <limits.h> enum COLOR { red, green = ULONG_MAX, blue // { dg-error "too large for .unsigned long|overflow" } };
google
android
ctor2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/ctor2.C
222
utf_8
72eeeca091d298f9f36a3fac59791c23
// { dg-do assemble } // Bug: the reference to c in the initializer list doesn't get fixed up. struct AP { AP(unsigned char); }; struct AI : AP { AI(unsigned char); }; AI::AI(unsigned char c) { &c; }
google
android
parse2
.C
toolchain/gcc/gcc-4.9/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
android
dtor
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/dtor.C
133
utf_8
f886fba98a8473911e0d9eef1980e41e
// { dg-do assemble } struct A { ~A(); }; struct B { ~B(); }; int main() { A a; a.~B(); // { dg-error "" } wrong name }
google
android
jump
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/jump.C
247
utf_8
cdf49dba584ca3a6ab8b7627c7f95242
// { dg-do assemble } // PRMS Id: 6036 extern int a; int main() { switch (a) { case 1: int v2 = 3; // { dg-error "" } referenced below case 2: // { dg-error "" } jumping past initializer if (v2 == 7) ; } return 0; }
google
android
rfg16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/rfg16.C
181
utf_8
d12b5f26d5c767f0038af7fb5c875bc7
// { dg-do assemble } // Bug: g++ doesn't push parameter decls as they are parsed. void (*ptr) (int foo, int array[sizeof(foo)]); void test2 (int bar, int array[sizeof(bar)]) { }
google
android
ref8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/ref8.C
277
utf_8
19588b0bee244a661417723272509e39
// { dg-do run } // PRMS Id: 5184 // Bug: cast to C& below does not adjust address struct A {}; struct B { virtual void foo () {} }; struct C : public B, public A {}; int main() { C c; A& ar = c; C& cr = (C&)ar; cr.foo(); // this line causes core dump }
google
android
opeq3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/opeq3.C
288
utf_8
beb07d7e7193d5b20c559e39f9f833bb
// { dg-do assemble } // Bug: g++ generates code for assignment in invalid situations. class X { // { dg-error "reference|operator=" } int& a; public: X(int& i): a(i) { } }; void foo () { int one=1, two=2; X a(one), b(two); a = b; // { dg-message "synthesized|deleted" } }
google
android
synth2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/synth2.C
242
utf_8
221fe47e6a82a0c5750f0f947f85b57f
// { dg-do assemble } // PRMS Id: 4623 // Bug: g++ tries and fails to synthesize a copy constructor for D. class A { }; class B: public virtual A { }; class C: public A { }; class D: public B, public C { }; // { dg-bogus "" } bad synthesis
google
android
overload7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload7.C
239
utf_8
5cb2caad38424c3aefd0bd8ca6e40fd0
// { dg-do assemble } // Bug: g++ thinks there is a default conversion from A& to B*. // There isn't. struct A { operator A* (); }; struct B: public A { }; void foo (B* bp); void bar (A& a) { foo (a); // { dg-error "" } }
google
android
parse4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/parse4.C
179
utf_8
8f9d1553897bdf7eca0984338ed83326
// { dg-do assemble } // Bug: g++ doesn't handle superfluous parentheses when redeclaring a TYPENAME. typedef int foo; class A { typedef int ((foo)); // { dg-bogus "" } };
google
android
conversion7
.C
toolchain/gcc/gcc-4.9/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; }