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
lineno3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/lineno3.C
376
utf_8
95730042db5d44f4dcb6425affbcd679
// { dg-do assemble } // { dg-options "" } // GROUPS passed error-reporting // potential bug: # line directive does not get reproduced in template // expansion template <class T> class A { public: # 200 "lineno3.C" int foo () { undef1(); } // { dg-error "" "" { target *-*-* } 200 } // { dg-message "note" "...
google
android
hmc1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/hmc1.C
340
utf_8
5e32d423dfb820237ec4d5b2dfbc181f
// { dg-do assemble } // GROUPS passed templates default-arguments template <class I> class Klasse { public: void func1(int n=1); void func2(int d) {} }; template <class I> void Klasse<I>::func1(int n) {} //if this is replaced by: //void Klasse<I>::func1(int n=1) {} //the code compiles. int main() { Klasse<in...
google
android
typeid2
.C
toolchain/gcc/gcc-4.9/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
android
synth
.C
toolchain/gcc/gcc-4.9/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
android
builtin2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/builtin2.C
139
utf_8
b2517f61d6564dd5a82b4acf0e6bcb03
// { dg-do assemble } static inline void strlen (const char *) { } void f () { strlen("Hi"); // { dg-bogus "" } wrongful overload }
google
android
crash1
.C
toolchain/gcc/gcc-4.9/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
android
binding2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/binding2.C
224
utf_8
7e21caedc80f7ec02092414e52c37458
// { dg-do assemble } // Bug: g++ screws up binding levels in a switch statement with cleanups. struct A { ~A() { } }; int f (int i) { switch (i) { default: A a; } return 1; } // causes compiler segfault
google
android
pmf5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/pmf5.C
471
utf_8
d6f9788c7e6efa8f8679e2379d495293
// { dg-do assemble } // { dg-options "" } // PRMS Id: 4985 struct Thing { int OverloadFn() const; void FunctionA(char* restOfLine); void OverloadFn(char* restOfLine); }; struct ThingEntry { void (Thing::*_handler)(char* restOfLine); }; static ThingEntry KeyWordTable[] = { &T...
google
android
dcast3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/dcast3.C
625
utf_8
d869c2d816bc0cfa610b34ed7aa7f57e
// { dg-do run } // Testcase for tricky dynamic cast situations. struct A { virtual void f () { } }; struct B : public A { }; struct C : public B { }; struct D : public B { }; struct E : public C, public D { }; struct B2 : public virtual A { }; struct C2 : public B2 { }; struct D2 : public B2 { }; struct E2 : pub...
google
android
access24
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/access24.C
199
utf_8
993df71817c988157c121508d94e2381
// { dg-do assemble } // Bug: forward reference to friend doesn't work in template. template <class T> class A { static int i; friend struct B; }; struct B { void f () { A<int>::i = 0; } };
google
android
overload20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload20.C
313
utf_8
fc3cede87bea163dca46ad8a8398a356
// { dg-do assemble } // Bug: this code causes an internal compiler error 4. void f (char *); void f (int); struct A { void f (); // { dg-message "" } candidate void f (int); // { dg-message "" } candidate void g () { void (*p)(char *) = f; // { dg-error "" } no matching function in scope } };
google
android
cast3
.C
toolchain/gcc/gcc-4.9/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
android
access12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/access12.C
243
utf_8
ae9058192e3a71a7b6a74953d5f58ba4
// { dg-do assemble } // PRMS Id: 4694 // Bug: g++ doesn't realize that A::i refers to a member of `this' in B(). class A { protected: int i; }; struct B : public A { B () { A::i = 0; } }; struct C : public B { C () { B::i = 0; } };
google
android
shadow1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/shadow1.C
171
utf_8
61616ca0577f487c8999427865215005
// { dg-do assemble } // { dg-options "-Wshadow" } class x { public: void fun(); private: int foo; }; void x::fun() { } main () { float foo; }
google
android
conversion3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/conversion3.C
241
utf_8
8e29b3ddb16a6842367a4a2baaa9377b
// { dg-do assemble } void qsort (void *, int, int, int (*)(const void *, const void *)); int f (char *, char *); void g () { typedef int (*pf)(void *, void *); qsort(0, 0, 0, pf(f)); // { dg-error "" } adding const to function parms }
google
android
lineno2
.C
toolchain/gcc/gcc-4.9/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
android
tempdest
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/tempdest.C
250
utf_8
7507cf741facabf703adfff61cf35788
// { dg-do assemble } // GROUPS passed templates destructors // Example of PR 3308 workaround template <class T> class A { T q; public: ~A() { (&q)->T::~T(); } }; typedef unsigned int ui; int main() { A<ui> *ap = new A<ui>; delete ap; }
google
android
enum
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/enum.C
232
utf_8
ccd6d94073b06051f8b3a501c9e981a1
// { dg-do assemble } // PRMS Id: 4337 // Bug: Enums are not looked up to arbitrary depth. struct W { enum A { B }; }; struct X : public W {}; struct Y : public X {}; struct S { X::A a1; Y::A a2; // { dg-bogus "" } };
google
android
warning8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/warning8.C
187
utf_8
a4a98da49e2e4b8c46f1e9653be42b53
// { dg-do assemble } struct A { A(); ~A(); }; struct B { B (const A&); ~B (); }; const B& f () { A a; return a; // { dg-warning "" } returning reference to temporary }
google
android
cond
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/cond.C
1,297
utf_8
f121c942734af51e8c279f46bb555d95
// { dg-do assemble } // GROUPS passed rtti // Negative testcase for decls in conditions. int main() { float i; if (int i = 1) // { dg-message "previously" } { char i; // { dg-error "redeclaration" } char j; } else { short i; // { dg-error "redeclaration" } char j; ...
google
android
soverload
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/soverload.C
259
utf_8
8c4b6c23d8b38175065e5a17ddc5a1a5
// { dg-do assemble } // Bug: dfs_pushdecls doesn't create an overload list for member functions, // like it claims to. struct A { static int foo (int); static int foo (int, int); void bar () { foo (1, 2); } // { dg-bogus "" } broken overloading };
google
android
defctor
.C
toolchain/gcc/gcc-4.9/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
android
rfg13
.C
toolchain/gcc/gcc-4.9/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
android
lineno
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/lineno.C
248
utf_8
34bdc02643581b5f848f513b830c921c
// { dg-do assemble } // Bug; g++ binds a function definition to the line number of a later decl. void foo () { } // { dg-message "" } redeclared void foo (); // { dg-bogus "" } invalid binding void foo () { } // { dg-error "" } redeclared
google
android
rfg12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/rfg12.C
104
utf_8
b68e6789cb14c6dd5e693b769a6b3afb
// { dg-do assemble } int array[3] = { 1, 2, 3, 4 }; /* { dg-error "" } excess initializer elements */
google
android
const4
.C
toolchain/gcc/gcc-4.9/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
android
access1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/access1.C
247
utf_8
3b66cda9337b6d5f44c3eec45af64472
// { dg-do assemble } // Bug: access declarations are broken. class A { public: void foo (); }; class B: private A { public: A::foo; // { dg-warning "deprecated" } }; void foo() { B b; b.foo (); // { dg-bogus "" } }
google
android
tredecl
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/tredecl.C
404
utf_8
776a6eba4666d06b4325a2d0850afe81
// { dg-do assemble } // Bug: Foo<Bar> *p semi-instantiates Foo<Bar> in local scope, so // when Foo<Bar> f tries to instantiate it later, it only finds the partial // instantiation from before. // // No PR; distilled from James Clark's SGML project. // class Bar { }; template<class T> class Foo; Foo<Bar> *p; temp...
google
android
tempargs
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/tempargs.C
335
utf_8
886defc4b8d1c91ce188acb16d63768c
// { dg-do assemble } // GROUPS passed templates overloading template<class T> class Vector { }; template<class T> struct Sort { static void sort (Vector<typename T::foo> &); }; template<class T> void Sort<T>::sort (Vector<typename T::foo> &) { } struct whee { typedef int foo; }; void f (Vector<int> &vi) { Sort<whee>...
google
android
scoping15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/scoping15.C
384
utf_8
8ed8d8244b592c10ad46057d72681a50
// { dg-do assemble } // { dg-options "-ffriend-injection" } // Bug: g++ ignores the :: qualification and dies trying to treat an integer // variable as a list of functions. class DComplex { public: friend double imag(const DComplex& a); }; class FComplex { public: friend float imag(const FComplex& a); };...
google
android
friend2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/friend2.C
346
utf_8
0c48f31e1970e425bf9b46f60cb18ba5
// { dg-do assemble } // PRMS Id: 5189 // Bug: g++ fails to collapse the several declarations of freefoo, so it isn't // recognized as a friend. extern "C" void freefoo(void); class foo { friend void freefoo(void); protected: static void foomem(); public: foo(); ~foo(); }; void freefoo(vo...
google
android
overload
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload.C
359
utf_8
fd557f934b680b4c2089ad1660e60b12
// { dg-do assemble } // GROUPS passed overloading enum bar {}; void operator+ (int, int);// { dg-error "" } .* void operator+ (bar&, int); template <class T> void operator+ (int b, T& t) { return b; } void operator+ (int, bar&); template <class T> class foo { public: friend void operator+ <> (int, T&); }; class...
google
android
template34
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template34.C
481
utf_8
50a283de5b9bae6b741e94ab5099764a
// { dg-do run } template<class T> class Set { public: typedef int (*Compare)(const T&, const T&); static Compare cmp1; static int (*cmp2)(const T&, const T&); }; template<class T> int gen_cmp(const T& a, const T& b) { if (a<b) return -1; else if (a==b) return 0; else return 1; } template<c...
google
android
dtor4
.C
toolchain/gcc/gcc-4.9/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
android
pmf3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/pmf3.C
306
utf_8
23ab62e751a6cfb25832de68d75ddcde
// { dg-do assemble } // Subject: g++ 2.5.8: cannot cast member function pointers // Date: 27 Jan 1994 01:22:56 -0500 struct A { void f(char); void g(int); }; typedef void (A::*Ptr)(char); void q() { Ptr p; p = (Ptr) &A::f; p = (Ptr) &A::g; p = &A::f; }
google
android
rfg5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/rfg5.C
231
utf_8
001e6729da6c1ad6957a44ed2b044664
// { dg-do assemble } // { dg-options "-ansi -pedantic-errors -w" } // Bug: func is treated as an overloaded function when it isn't. int *func () { return 0; } void test () { *func; // { dg-bogus "" } improper overloading }
google
android
parse8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/parse8.C
71
utf_8
9a5fbb33bb10f1f2cebf43769aac579a
// { dg-do assemble } void foo(const int* const); // { dg-bogus "" }
google
android
template7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template7.C
178
utf_8
ebdf62f7f3836654110fa87cfd57eb7f
// { dg-do assemble } // PRMS Id: 4826 class A; template <class T> void f(const T&, const T&); void g (const A& a, A& b) { f (a, b); // { dg-bogus "" } failed unification }
google
android
ref1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/ref1.C
187
utf_8
af741a2ea7ec1635196be2334010d100
// { dg-do assemble } // Bug: g++ tries to call a constructor for a reference. Doh! class B; struct A { B & b; A (B & x) : b (x) { } // { dg-bogus "" } }; // { dg-bogus "" }
google
android
report
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/report.C
1,564
utf_8
75e33e20f3fb5c2a2c1e28071ec80210
// { dg-do assemble } // { dg-options "-Wreturn-type" } // GROUPS passed error-reporting // DR 295 allows qualification via typedef template <char C> class badoo { }; template <int (*F) (int)> class doowop { }; struct A { int a; ~A () { a = 0; } operator int () { return a; } }; extern "C" int atoi (const ch...
google
android
template43
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template43.C
598
utf_8
876bcb7f013c3c4f518818e6eb52f39c
// { dg-do run } // Test matching of partial specializations. template <int* x, int* y> class EQUAL { public: enum { value = 0 }; }; template <int* x> class EQUAL<x,x> { public: enum { value = 1 }; }; int x; int y; int equals_x_x = EQUAL<&x,&x>::value; // expected value: 1 int equals_x_y = EQUAL<&x,&y>::value; //...
google
android
pmf6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/pmf6.C
228
utf_8
55aae92259661af9b0f20c6403311b7d
// { dg-do assemble } // PRMS Id: 5656 // Bug: g++ tries (which is a bug) and fails (which is a bug) to initialize // var at runtime. struct A { int func(int); int func() const; }; int (A::* var) () const = & A::func;
google
android
template20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template20.C
225
utf_8
c3f50a3355c9c6700f6263d388a0d1b5
// { dg-do run } // Make sure type deduction works for both types of array parameters. template <class T> void f (T (&a)[2]) { } template <class T> void g (T a[2]) { } int main() { int a[2] = { 0, 0 }; f (a); g (a); }
google
android
bool7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/bool7.C
310
utf_8
41e60403315b77f3e7cbd274f7f8f2e5
// { dg-do assemble } struct A { operator bool () const; operator const void * () const; }; struct B { A a; int foo1 (); int foo2 (); }; int B::foo1 () { return a ? 0 : 1; // ambiguous default type conversion for `operator !=' } int B::foo2 () { if (a) return 0; else return 1; }
google
android
template15
.C
toolchain/gcc/gcc-4.9/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
android
access21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/access21.C
306
utf_8
025c267bbba39ff9c0d71eb929e2b0bf
// { dg-do assemble } // PRMS Id: 6877 typedef __SIZE_TYPE__ size_t; class aa { public: aa(); ~aa(); private: int iaa; void operator delete(void*, size_t); }; class bb { public: aa caa; }; // { dg-bogus "" } calling private delete void f(){ bb abb; }
google
android
template32
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template32.C
200
utf_8
ad2c663d36d9a0f17dc938a311946155
// { dg-do assemble } // Bug: Instantiating A<int> screws with class bindings for B template <class T> struct A { }; struct B { typedef int foo; void f (); }; void B::f () { A<int> a; foo i; }
google
android
new2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/new2.C
160
utf_8
4a97eabb2936112e96b49ea1a76e3316
// { dg-do run } // { dg-options "-Wno-deprecated -fno-exceptions" } // PRMS Id: 6267 struct A { int i; A() { i = 2; } }; main() { A *p = new A (); }
google
android
aggregate
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/aggregate.C
189
utf_8
40698f8dcb21cc22f4864696f1071eed
// { dg-do run } struct A { int i; }; int main() { A a1 = { 42 }; A a2 (a1); A a3 = { 137 }; a1 = a3; if (a1.i == 137 && a2.i == 42 && a3.i == 137) return 0; return 1; }
google
android
crash8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/crash8.C
166
utf_8
f1a5d1a491e1458924f43b60cd9f3bbe
// { dg-do assemble } struct A { A(); A(A); // { dg-error "" } copy ctor must take reference }; int main() { A a; A b(a); // causes compiler segfault }
google
android
rfg6
.C
toolchain/gcc/gcc-4.9/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
android
typeck
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/typeck.C
383
utf_8
7291a856ad3f7266858cde00b217ccd2
// { dg-do assemble } // Bug: g++ fails to catch incompatibilities in the parameter lists when // assigning. typedef struct S *type_p; typedef struct S const *ctype_p; typedef ctype_p (*PF) (int); type_p callee (type_p arg) { return 0; } void foobar () { static PF p = callee; // { dg-error "" } p = callee; ...
google
android
mangle1
.C
toolchain/gcc/gcc-4.9/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
android
init
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/init.C
190
utf_8
09741e40b6244879acf5b8d3defe1df4
// { dg-do assemble } // Bug: g++ uses an empty initializer list for its own devious purpose // internally, and gets confused if it shows up in the input. struct A { int i; }; A a = { };
google
android
rfg23
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/rfg23.C
159
utf_8
33c899e34b73d78a4e367c8ce81771b9
// { dg-do assemble } signed char *ptr2 = "hello"; /* { dg-error "" } changing sign */ unsigned char *ptr3 = "hello"; /* { dg-error "" } changing sign */
google
android
template23
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template23.C
195
utf_8
17d21442206f559b41c86a494675f0a6
// { dg-do assemble } // Testcase for instantiation with cv-qualified type template<class T> struct A { void foo(); }; template<class T> void A<T>::foo() { } template class A<const int>;
google
android
access8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/access8.C
565
utf_8
f6d6154e05950a0628c09aff9709910d
// { dg-do assemble } // Date: 25 Jan 1994 23:41:33 -0500 // Bug: g++ forgets access decls after the definition. class inh { // { dg-error "" } inaccessible int a; protected: void myf(int); }; class mel : private inh { protected: int t; inh::myf; // { dg-warning "deprecated" } }; class top_t ...
google
android
overload26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload26.C
409
utf_8
cb3dbce2f7d778dfd0a2002a389931a5
// { dg-do assemble } // Bug: g++ tries to build up a mangled name for its ideal match, which // fails for one call below. extern const char foo[]; extern const char baz[10]; extern const char *fred; struct A { void f(const char *); } *a; void bing(const char *); int main () { a->f(foo); // { dg-bogus "" } bec...
google
android
template26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template26.C
2,396
utf_8
b9e4c85b77c73c73d4a668ac75ec5db0
// { dg-do run } // PRMS Id: 6275 // Bug: unification fails for call to find_parameter_in_stack. #include <stdio.h> #include <stdlib.h> const int max_stack_size = 20; template <class T> class Stack { private: T objects[max_stack_size]; int nobjects; public: Stack(): nobjects(0) {} void push(cons...
google
android
overload2
.C
toolchain/gcc/gcc-4.9/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
android
scoping17
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/scoping17.C
127
utf_8
54afd2f673dc93e414b4cf73c33d2e03
// { dg-do run } // Test that the integer hides the struct in block scope. int main () { int A; struct A { }; A = 1; }
google
android
typedef
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/typedef.C
226
utf_8
ec9838215847693501802a19873c81e4
// { dg-do assemble } // PRMS Id: 4687 // Bug: g++ misinterprets typedefs of function type in class scope. typedef int (*F1) (); struct A { typedef int F(); F *fp; F1 g() { return fp; } // { dg-bogus "" } typing };
google
android
parse9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/parse9.C
302
utf_8
b042f1871337323f019cbab8f343e519
// { dg-do run } // PRMS Id: 5720 // Bug: the extra set of parens confuses the expr/declarator disambiguation. class Fu { int val; public: Fu(int i) : val(i) { } void print() { } }; int main(int argc, char * argv[]) { int * i = &argc; Fu((*i)).print(); // { dg-bogus "" } Fu((*j)); }
google
android
byval
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/byval.C
239
utf_8
36fc886b059d49d827435b551f7df603
// { dg-do run } // Bug: a is destroyed in both foo() and main() int count; struct A { double a,b; A(int) { count++; } A(const A&) { count++; } ~A() { count--; } }; void foo (A a) { } int main() { foo (1); return count; }
google
android
bool6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/bool6.C
127
utf_8
81a65b9417af676af77db7a2cae52e06
// { dg-do assemble } // Bug: The conversion from bool to int gets stripped. bool b; int main () { return ((!b) != 0); }
google
android
template17
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template17.C
192
utf_8
921113a11d24628ad027766ee5b2838b
// { dg-do assemble } // Caught by Booch Components. // Bug: g++ tries to instantiate nested enums. template <class T> struct A { struct B { }; enum C { c }; }; template struct A<int>;
google
android
new4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/new4.C
380
utf_8
8a5b018fc769738ff9267be1a33abf51
// { dg-do run } // { dg-options "-fcheck-new" } struct A { A(): i(42) { } A(int j): i(j) { } int i; }; A* ap = new A (1); A* ap2 = new A[3]; main () { if (ap->i != 1 || ap2[0].i != 42 || ap2[1].i != 42 || ap2[2].i != 42) return 1; A* ap = new A (1); A* ap2 = new A[3]; if (ap->i != 1 || ap2[0].i...
google
android
offset3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/offset3.C
226
utf_8
245c3abedb7719c4cc1b50035330729b
// { dg-do assemble } // PRMS Id: 5070 (bug 2) struct A { void f (); }; struct Ptr { A* operator->(); }; struct B { Ptr p; }; struct C: public B { void g (); }; void C::g() { B::p->f(); // { dg-bogus "" } }
google
android
precedence
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/precedence.C
254
utf_8
a55282bfb97785a99ea82c5df50a774d
// { dg-do assemble } // Bug: g++ groups ->* before casts. // PRMS Id: 4484 (bug 4) struct A { }; struct B : public A { void f (); }; void g () { A* ap = new B; void (B::*p)() = &B::f; ((B*)ap->*p)(); // { dg-bogus "" } incorrect precedence }
google
android
access10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/access10.C
253
utf_8
19664a186dd5faf025cae18124258b74
// { dg-do assemble } // PRMS Id: 4839 // Bug: The initializer of a static member of a class has the same acess // rights as a member function. g++ doesn't realize that. class X { X (int); static X foo; public: void dummy(); }; X X::foo = 9;
google
android
overload9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload9.C
703
utf_8
70ede504775cb592907fb5ef243b1b78
// { dg-do assemble } // PRMS Id: 4257 // Bug: g++ ignores non-member possibilities (ideal_candidate_ansi bug) class ostream { public: #ifdef EITHER_ONE_A ostream& operator<<(unsigned long n); ostream& operator<<(long n); #else ostream& operator<<(short n); ostream& operator<<(unsigned short n); #end...
google
android
return
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/return.C
319
utf_8
a291fe4b2802c42c5bf5ef02956040d9
// { dg-do run } // PRMS Id: 5331 // Bug: the return value of foo is constructed in a temporary and then // copied into the return slot. This is not necessary. int c = 0; struct X { X(int i) { } X(X const &XX) { c = 1; } ~X() { } }; const X foo() { return X(3); } int main() { foo(); return c; }
google
android
overload14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload14.C
195
utf_8
17d3d6caeb4ccd622ba916652b26a142
// { dg-do assemble } // Bug: g++ fails to recognize that the template matches the target type. template <class T> void foo (T *, int); struct A; void bar () { void (*p)(A *, int) = &foo; }
google
android
temporary
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/temporary.C
333
utf_8
911b0ff6a8a656d49067bdf00345cba8
// { dg-do run } // Subject: No destructor bug // Date: Mon, 14 Feb 1994 12:49:45 -0300 (Arg) // Bug: temporaries created with constructor notation aren't destroyed. int count = 0; class A { public: A() { ++count; } ~A() { --count; } }; int main() { A(); return count; }
google
android
overload8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload8.C
171
utf_8
a9b091e6f785618c8abcc1b99b6614dc
// { dg-do assemble } // Bug: g++ fails to catch the ambiguity below. struct A { operator int () { return 1; } operator int &() { return 1; } // { dg-error "" } };
google
android
virtual2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/virtual2.C
184
utf_8
df2e95f2cb604e33043e5e22310ad808
// { dg-do run } struct A { virtual A* f () { return this; } }; struct B: public A { virtual B* f () { return 0; } }; int main () { A* ap = new B; return (ap->f () != 0); }
google
android
offset4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/offset4.C
191
utf_8
cd67e3cc1defa75da9090ca742f2a1c4
// { dg-do assemble } // Bug: g++ complains about the use of A::p below. struct A { void *p; }; struct B: public A { int f () { if (A::p) return 1; return 0; } };
google
android
nested8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/nested8.C
141
utf_8
a0fe56c8eaf78c345108e0aa50ba780a
// { dg-do assemble } struct A { }; struct B: public A { struct C { friend struct B; // { dg-bogus "" } base clause w/o members }; };
google
android
static1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/static1.C
586
utf_8
735379da08c8491416b9cab328b00c99
// { dg-do run } // PRMS id: 6863 extern "C" int printf(const char *, ...); extern "C" void abort(); enum ENUM {E1=0, E2 }; int d; class AAA{ public: AAA() {a = new char[10];printf("constructor AAA() called\n");} AAA(int) {printf("constructor AAA(int) called\n");} ~AAA(){ printf("destructor ~AAA() called\n"); d ...
google
android
access2
.C
toolchain/gcc/gcc-4.9/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
android
return3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/return3.C
179
utf_8
81a3d447b3f7290c557ca0078ef4bfb4
// { dg-do run } // PRMS id: 10912 struct A { A() { i=10; } int i; }; struct B : public A {}; B b; A f() { return b; } int main () { A a = f (); return a.i != 10; }
google
android
scoping6
.C
toolchain/gcc/gcc-4.9/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
android
scoping9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/scoping9.C
195
utf_8
ab7a07cc0487ab0ed3103edee5f02796
// { dg-do assemble } // Bug: g++ silently mangles the second 'B' to 'A::B', so the definition is // lost. struct A { enum B { }; }; struct C: public A { enum B { }; void foo (C::B); };
google
android
mi
.C
toolchain/gcc/gcc-4.9/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
android
template2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template2.C
230
utf_8
38ab28668b5cc9902ee6eb9a096d435f
// { dg-do assemble } // Bug: instantiation of member templates breaks. template <class T> struct A { static void f (); void g (); }; template <class T> void A<T>::f () { } template <class T> void A<T>::g () { } A<int> a;
google
android
opeq5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/opeq5.C
616
utf_8
5292a09a4c6bef333b385323117453e7
// { dg-do run } // Testcase for tricky synthesized op= in complex inheritance situation. // This used to test whether the virtual base was copy-assigned only once. // That feature is not required by ISO C++, so the test now only checks // whether the vbase is assigned at all. int count = 0; extern "C" int printf (co...
google
android
anon2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/anon2.C
105
utf_8
6d6ae514cd2c77286bbf074fc8bb8d87
// { dg-do assemble } // g++ should not complain about anonymous bitfields. struct A { int : 2; };
google
android
destruct2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/destruct2.C
293
utf_8
abbf3d21a1a5d5da396f326c2f41618a
// { dg-do assemble } // PRMS Id: 4342 // Bug: g++ does not massage things enough to allow calling ~X(). struct X { virtual ~X (); }; struct Y : public X {}; struct Z : public Y, public X // { dg-warning "" } {}; void foo () { Z* f = new Z; delete f; // { dg-bogus "" } }
google
android
template11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template11.C
246
utf_8
de552e4f0272c200b200bbcb664fc8c7
// { dg-do run } // Bug: initializers for static data members of templates don't get run. template <class T> struct A { static T t; }; int foo () { return 1; } template <> int A<int>::t = foo (); int main () { return (A<int>::t != 1); }
google
android
const
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/const.C
221
utf_8
6ad12b9005b30cbeb1fba802dc27a7d5
// { dg-do run } // Bug: a ends up in the text segment, so trying to initialize it causes // a seg fault. struct A { int i; A(): i(0) {} A(int j): i(j) {} }; const A a; const A b(1); int main () { return 0; }
google
android
new
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/new.C
536
utf_8
d16caf6ee46fa525af3c28b5597c10a1
// { dg-do assemble } // Bug: new doesn't make sure that the count is an integral value. #include <new> extern "C" int printf (const char *, ...); extern "C" void *malloc (std::size_t); std::size_t s; void * operator new (std::size_t siz) #if __cplusplus <= 199711L throw (std::bad_alloc) #endif { if (s == 0) ...
google
android
cond2
.C
toolchain/gcc/gcc-4.9/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
android
complete1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/complete1.C
156
utf_8
a2ab5a0a642d863a09e42f9a8e848ae2
// { dg-do assemble } // PRMS Id: 4695 // Bug: g++ wrongly requires A to be complete here. struct A; void foo(const A &); void bar(A *p) { foo(*p); }
google
android
template1
.C
toolchain/gcc/gcc-4.9/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
android
return2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/return2.C
250
utf_8
696dd8eda2f32a76af21bed332c74dde
// { dg-do run } // PRMS Id: 5368 // Bug: the X temporary in foo() is not destroyed. int c = 0; struct X { X (int) { c++; } ~X() { c--; } }; struct Y { Y(const X &) { } }; Y foo() { return X(3); } int main() { foo(); return c; }
google
android
pmem2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/pmem2.C
620
utf_8
c3c1e18d6e4fd9aea994df6ac4a17e8d
// { dg-do run } template <class Called> class aCallback { public: aCallback(Called& obj, int (Called::*met)()); int callback(); protected: private: Called& object; int (Called::*method)(); }; template <class Called> aCallback<Called>::aCallback(Called& obj, int (...
google
android
template9
.C
toolchain/gcc/gcc-4.9/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
android
builtin
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/builtin.C
186
utf_8
53aef353e2e1a9a9eaac3faea32e02e5
// { dg-do assemble } // { dg-options "-w" } // Bug: g++ overloads strlen instead of bashing the builtin version. extern "C" void strlen (const char *); void f () { strlen("Hi"); }
google
android
rfg8
.C
toolchain/gcc/gcc-4.9/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
android
overload33
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload33.C
1,340
utf_8
e5eb76ccd2233b5455caf1e307c6168e
// { dg-do assemble } // PRMS ID: 7507 /* ------------------------------------------------------------ */ class Base0 { public: Base0() {} virtual ~Base0() {} }; class Base1 { public: Base1() {} virtual ~Base1() {} }; class Derived : public Base0, public Base1 { public: Derived() {} vir...