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
catch9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch9.C
2,611
utf_8
197f4b69d68dd216bc930fead97cdf75
// { dg-do run } // { dg-options "-w" } // We cannot catch an ambiguous base class. // -- public, << private, == virtual // D==B--A // +==C--A struct A { int m; }; struct B : A { int m; }; struct C : A { int m; }; struct D : virtual B, virtual C { int m; }; void fna(A *obj) { throw obj; } void fnb(B *obj) { throw obj;...
google
android
vbase3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/vbase3.C
260
utf_8
787cd08bcfea446b1d5bdff831e7b361
// { dg-do assemble } // Used to use -fsjlj-exceptions, but that isn't an option anymore. struct ios { virtual ~ios(); }; struct fstreambase : virtual public ios { fstreambase(); }; fstreambase::fstreambase() { }
google
android
cleanup2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/cleanup2.C
1,003
utf_8
57ecd5105431558454404c7819e3a288
// { dg-do run } // make sure we don't call base dtors, if we failed to call the // base ctor due to exception throwing #include <stdio.h> static bool bad = false; static int thrower () { printf ("in %s\n", __PRETTY_FUNCTION__); throw 0; return 0; } struct X { X (int) throw (int); ~X () throw (); }; X::X (in...
google
android
throw2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/throw2.C
285
utf_8
b17358a7b7abb8e03e2200e1d687babd
// { dg-do assemble } #define ANY int // a class with a public constructor void athrow(const ANY & e) throw(ANY) { throw e; // { dg-bogus "" } discarding const } int main(void) { athrow(ANY()); return 0; }
google
android
fntry1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/fntry1.C
429
utf_8
4d9e6f65aec19c778c890a288bae5690
// { dg-do run } // Bug: g++ fails to treat function-try-blocks in ctors specially. int c; int r; struct A { int i; A(int j) { i = j; } ~A() { c += i; } }; struct B: public A { A a; B() try : A(1), a(2) { throw 1; } catch (...) { if (c != 3) r |= 1; } }; int main () { try { B b; } catch (.....
google
android
catch5p
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch5p.C
3,562
utf_8
55071b04c42ba6a5afb0653fdfa950c0
// { dg-do run } // { dg-options "-w" } // We cannot catch an ambiguous base class. // -- public, << private, == virtual // D--B==A // +--C==A // +--AA-A struct A { int m; virtual ~A(){}}; struct B : virtual A { int m; }; struct C : virtual A { int m; }; struct AA : A { int m; }; struct D : B, C, AA { int m; }; void f...
google
android
cond1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/cond1.C
1,000
utf_8
cdc579ac8c8f4328b5b16917b301b7e8
// { dg-do assemble } // http://gcc.gnu.org/ml/gcc-bugs/1999-03n/msg00888.html // conditional exprs have some funny rules when one of the types is void. // [expr.cond] 5.16, make sure we do the right things // We implement an extension, allowing one side to be void, check we // pedantically moan. struct X {}; void fn(...
google
android
ptrmem1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/ptrmem1.C
235
utf_8
f719d5e34281fd7f7695b6c2eb8f292e
// { dg-do run } extern "C" void exit (int); extern "C" void abort (void); struct A { int i; }; int main () { try { throw &A::i; } catch (int A::*p) { if (p == &A::i) exit (0); else abort (); } abort (); }
google
android
rethrow6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/rethrow6.C
1,081
utf_8
7d8ba296412c83f633f9284c22944391
// { dg-do run } // Testcase for proper handling of rethrow. #include <stdio.h> int c, d; int wrong; struct A { int i; A () { i = c++; printf ("A() %d\n", i); } A (const A&) { i = c++; printf ("A(const A&) %d\n", i); } ~A() { printf ("~A() %d\n", i); ++d; } }; struct B { ~B () { try { printf (...
google
android
catch9p
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch9p.C
2,615
utf_8
0c50a52f2e135d4383841ee8705917e9
// { dg-do run } // { dg-options "-w" } // We cannot catch an ambiguous base class. // -- public, << private, == virtual // D==B--A // +==C--A struct A { int m; virtual ~A(){}}; struct B : A { int m; }; struct C : A { int m; }; struct D : virtual B, virtual C { int m; }; void fna(A *obj) { throw obj; } void fnb(B *obj...
google
android
catch7p
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch7p.C
4,273
utf_8
da860acfae474cb40b3c3d4201980b67
// { dg-do run } // { dg-options "-w" } // We cannot catch an ambiguous base class. // -- public, << private, == virtual // different levels // F--D--B--A // +--C--A // +--E--A struct A { int m; virtual ~A(){}}; struct B : A { int m; }; struct C : A { int m; }; struct D : B, C { int m; }; struct E : A { int m; }; s...
google
android
cvt18
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt18.C
580
utf_8
1f68fb21dd289bc6d6073480ead2ce03
// { dg-do assemble } // GROUPS passed conversions // cvt file // Subject: gcc 2.4.5 on sparc-sun-sunos4.1.2: automatic conversion functions // Date: Thu, 8 Jul 93 17:42:12 PDT class Token { public: operator const void*() const; int operator !=(int code) const; private: int code_; }; extern Token next_toke...
google
android
bad-error7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/bad-error7.C
480
utf_8
daaf68975d20f0ba1af45a1786dabcfb
// { dg-do assemble } // GROUPS passed bad-errors #include <iostream> class ParX { public: ParX() {} }; class X : public ParX { public: void fn2() { std::cout << "hi" << std::endl; } }; int main() { X x; ...
google
android
arm7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arm7.C
723
utf_8
945a0be661f253e32d06947b00b5a957
// { dg-do run } // { dg-options "-w" } // GROUPS passed ARM-compliance // arm file (also in cvt file) // Subject: Incorrect resolution of conversion path // Date: Sat, 6 Mar 93 06:46:27 -0600 extern "C" int printf (const char *, ...); class Base { public: int i; Base(int ii) : i(ii) {} }; class Derived : public Bas...
google
android
enum3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/enum3.C
431
utf_8
c50a0f8a1377cfbb50605dafa54460db
// { dg-do assemble } // GROUPS passed enums // enum file typedef enum{on, off} TOGGLE; class field { private: TOGGLE toggle; public: virtual void on(void) { toggle = 3; };// { dg-error "" } .* virtual void off(void) { toggle = on; };// { dg-error "" } .* }; int main() { }
google
android
operators21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators21.C
226
utf_8
49e707c4ce0d7c5a4e4775f96cfe3f87
// { dg-do assemble } // GROUPS passed operators struct A { int x; }; int operator()(A x,float y) {// { dg-error "" } .* return 1; } int main() { A x; x(1.0); // { dg-error "" } no match }
google
android
parsing3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/parsing3.C
432
utf_8
4080c6ec6348708729be82222e24b683
// { dg-do assemble } // GROUPS passed parsing // parsing folder /* Notice that this case parses fine */ int (* volatile y)[10]; void foo2() { /* The parser can't handle it now */ int (* volatile x)[10]; }
google
android
parsing5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/parsing5.C
365
utf_8
e7b985a6a3756c3d0443d97ffa3514c4
// { dg-do assemble } // GROUPS passed parsing long (*foo1 ()) (); // This is ok. typedef long INT; INT (*foo2 ()) (); // This is not, g++ says "parse error before `('"
google
android
visibility10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility10.C
309
utf_8
1678bdf123cde06706d7d39e604f971f
// { dg-do assemble } // GROUPS passed visibility #include <iostream> class base { public: void f1 () { std::cout << "f1" << std::endl; } void f2 () { std::cout << "f2" << std::endl; } }; class deriv : public base { void base :: f1();// { dg-error "" } .* }; int main () { deriv d; d.f2(); }
google
android
arg10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arg10.C
422
utf_8
abee0cae5523dfb95a0555bdeda523be
// { dg-do assemble } // GROUPS passed arg-matching // arg-matching file template<class T> class A { public: void func(const T& val) { } }; int main() { A<const void*> a; int* ptr = 0; a.func(ptr); }
google
android
unsorted2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/unsorted2.C
427
utf_8
380881aebe61094f4df13be7d32eb06f
// { dg-do assemble } // GROUPS passed unsorted // code-gen file template <int A,int B> class X { }; template <int A,int B,int C> X<A,C> f(X<A,B>,X<B,C>) { X<A,C> result; return result; } int main() { X<1,3> x; X<1,2> y; X<2,3> z; x=f(y,z); }
google
android
refs4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/refs4.C
324
utf_8
71295388bb61bdec03ad31726c0b9282
// { dg-do run } // GROUPS passed references // execution test int r; const int& min(const int& tX, const int& tY) { return tX < tY ? tX : tY; } void foo(const int m, const int n) { if (m == 1 && n == 100) /* OK */; else r = 1; } int main() { foo(min(2, 1), min(100, 200)); return r...
google
android
arm9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arm9.C
1,031
utf_8
e935bfe654e8cb35b29466d943a901ff
// { dg-do assemble } // GROUPS passed ARM-compliance #include <iostream> enum f1 { F1 }; enum f2 { F2 }; class A { public: void set (f1 f); }; void A::set (f1 f) { std::cout << "called A f1\n";} class B : public A { public: void set (f2 f); }; void B::set (f2 f) { std::cout << "called B\n|n...
google
android
mentor1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/mentor1.C
495
utf_8
c19fee3a5e6a2b1bb1ddf308671313bf
// { dg-do assemble } // { dg-options "-O" } // GROUPS passed mentor struct Word { struct S1 *p1; }; struct S1 { Word o; void shift_left(int delta, int ct); }; inline void S1::shift_left(int delta, int ct) { int cnt = ct; for (S1 *to_p = this, *from_p = to_p + delta; cnt--;) *to_p++ = *from_p++; } void...
google
android
arm6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arm6.C
494
utf_8
56c233110f744e738ac8c9ec0c486784
// { dg-do assemble } // GROUPS passed ARM-compliance // arm file // Subject: ARM page 87 // Date: Mon, 23 Nov 92 11:51:38 +0100 int main() { int a; switch (a) { case 1: int v2 = 3;// { dg-error "" } crosses.* case 2:// { dg-error "" } jump.* if (v2 =...
google
android
ctors6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors6.C
197
utf_8
3c88f551fae35afe3700c32a9b86ba3b
// { dg-do assemble } // GROUPS passed constructors #include <complex> double foo(std::complex<double> *a) { return 0.0; } double bar(void) { std::complex<double> v[10]; return foo(v); }
google
android
arm1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arm1.C
461
utf_8
423460a9aa0433071409edc0bb9877b2
// { dg-do assemble } // GROUPS passed ARM-compliance // arm file // Subject: ARM p79 trivial bug // Date: Thu, 19 Nov 92 12:28:24 +0100 extern "C" int printf( const char *, ...); int main() { int a = 1 ; int b = 2 ; int c = 3 ; (a = b) = c ; ...
google
android
typeck1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/typeck1.C
503
utf_8
83d40dd19fb328b9dca836c90d3d86c8
// { dg-do assemble } // GROUPS passed typeck // typeck file class a { }; class foo : a { }; class bar : a { }; int test( const foo* f, const bar* b ) { return f == b;// { dg-error "comparison between distinct pointer types" } }
google
android
parsing4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/parsing4.C
329
utf_8
1e78050ccdd1cd12d858681c1ee06f0d
// { dg-do assemble } // GROUPS passed parsing // parsing folder int test1(void (**roc)(int,int)); // parse error int test2(int id,void (**orc)(int,int)); // works
google
android
init6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/init6.C
226
utf_8
3f386766c771d61bbe2022fb1a4adcc2
// { dg-do assemble } // GROUPS passed initialization class Vector { double *v; int size; public: Vector(int n); ~Vector(); }; exmpl() { Vector x(8)[16]; }// { dg-error "" } .*
google
android
ctors12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors12.C
873
utf_8
696279d94532f23faaf6dbad6ee673b8
// { dg-do run } // GROUPS passed constructors #include <cstdio> #include <cstdlib> #include <iostream> #define MAGIC 7654 class complex { double re; double im; int magic; static int count; public: complex() { re=im=0; magic=MAGIC; } complex(double d) { re=d; im=0; mag...
google
android
cvt9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt9.C
399
utf_8
408b88e03a9cc8b9e299cd21a7a0b57b
// { dg-do assemble } // { dg-options "-pedantic-errors" } // GROUPS passed conversions // cvt file // Subject: gcc-2.2.2 bug report // Date: Thu, 17 Sep 92 13:27 PDT typedef int (*widget) (); class window { public: int Isopen (); }; widget fp = (widget) &window::Isopen; // { dg-error "" } // ERROR -
google
android
vtable1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/vtable1.C
567
utf_8
f3059608a1f797e501185505c8997b6d
// { dg-do assemble } // { dg-options "-w" } // GROUPS passed vtable // vtable file // prepare_fresh_vtable doesn't build the names of // vtables very well. struct B { virtual void vf() { } }; struct Main { virtual void vf() { } }; struct Other : public Main, public B { virtual void vf() { } }; struct D : public...
google
android
union4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/union4.C
333
utf_8
89ba6c57918145a41fc1df9d58c45704
// { dg-do assemble } // GROUPS passed unions // anon-union file static union { struct SS { int ss; }; };// { dg-warning "no members" }
google
android
cvt22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt22.C
291
utf_8
9f4049af50feb8fc2d762b8fb72e4db2
// { dg-do assemble } // GROUPS passed conversions // cvt file // Subject: typedef bug // Date: Mon, 2 Aug 1993 16:35:28 PDT typedef int A[10]; int main() { int* a1 = new A; }
google
android
arm13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arm13.C
298
utf_8
c05c2f1ee3a19b333421bc4f4791b463
// { dg-do run } // GROUPS passed ARM-compliance #include <stdio.h> #include <stdlib.h> inline void *operator new(size_t, void *place) { return place; } int main() { int* p = (int*) malloc(sizeof(int)); (void) new (p) int(1); typedef int I; p->I::~I(); free(p); printf ("PASS\n"); }
google
android
arg9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arg9.C
885
utf_8
65c54722723fd259d59b8ad9e1a54ea4
// { dg-do assemble } // GROUPS passed arg-matching // arg-matching file #include <assert.h> #include <stdio.h> #include <stdlib.h> class TupleIterator { public: TupleIterator(int *tpl); int& operator*(); int live() const; // The compile fails with "no post-increment operator for type" at "TI++" // below....
google
android
missed-error2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C
1,302
utf_8
099a13af65b3446a02cb78ffe2587b89
// { dg-do assemble } // GROUPS passed missed-error // missed-error file #include <iostream> // The VxWorks kernel-mode headers define a macro named "max", which is not // ISO-compliant, but is part of the VxWorks API. #if defined __vxworks && !defined __RTP__ #undef max #endif inline int max(int a, int b) {return a >...
google
android
pic1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/pic1.C
353
utf_8
ba9f9c290ccad9db193e1e2b8b96a82e
// { dg-do assemble } // GROUPS passed operators // pic file extern const char SDFdomainName[] = "SDF";
google
android
cvt7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt7.C
1,170
utf_8
74e29b644a4c72c033604e00a32a038c
// { dg-do run } // GROUPS passed conversions // cvt file // Subject: implicit int. convs. from member refs. in switch expressions #include <cstdio> class A { public: A(int j) { i = j; } A(A& a) { i = a.i; } operator int() { return i; } void assign(int v) { i = v; } int i; }; class B { public: ...
google
android
bit-fields2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/bit-fields2.C
1,102
utf_8
ba1a7b1525e9a7cef0a59366e2ecede7
// { dg-do run } // GROUPS passed bit-fields // bitfield file // Date: Fri, 28 Jan 1994 06:11:43 -0500 // Subject: GCC bug report // // This test is only meant for targets where EMPTY_FIELD_BOUNDARY is // defined to no larger than the size of an unsigned int, or where // PCC_BITFIELD_TYPE_MATTERS is defined. Add sk...
google
android
operators19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators19.C
357
utf_8
2a72d4dff598f31a98be7b82fe150f26
// { dg-do assemble } // GROUPS passed operators // opr-ampr file class A { public: int j; }; class B: public A { public: B () { !(A::j); } };
google
android
operators31
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators31.C
352
utf_8
137bc288c72aa898b2ca9453751cf6e6
// { dg-do assemble } // GROUPS passed operators // opr-del file class A { char *s; public: void f (); }; void A::f () { delete [] A::s; }
google
android
shadow1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/shadow1.C
518
utf_8
6e00e4d6c6d4d1d3926afc8589bfd4e4
// { dg-do assemble } // { dg-options "-Wshadow" } // GROUPS passed shadow-warnings // shadow file // Subject: GCC Bug.. // Date: Fri, 6 Nov 1992 10:27:10 -0700 class Klasse { public: Klasse(void); // constructor int Shadow(void); // member function private: long value; }; Klass...
google
android
temps2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/temps2.C
792
utf_8
de41c99e37047e7ab7a3c97f25f3d6bb
// { dg-do run } // GROUPS passed temps // temps file // Subject: Temporaries destroyed too soon // Date: Fri, 18 Dec 92 20:14:45 +0100 #include <stdio.h> int status = 0; int fail = 0; class Foo { public: Foo(); ~Foo(); Foo &method(); }; Foo f1() { return Foo(); } Foo::Foo() { } Foo::~Foo() { if (s...
google
android
dtors4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/dtors4.C
335
utf_8
1fa09f230ebdca6e85be9289dedc839b
// { dg-do run } // GROUPS passed destructors #include <stdio.h> int destruct = 2; class a { public: char *p; a(){ ; } ~a(){ destruct--; if (! destruct) printf ("PASS\n");} }; a test(){ return a(); } int main(){ a ai; a...
google
android
missed-error1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/missed-error1.C
527
utf_8
4412eb140fc4d53d0e79cc7b9c480177
// { dg-do assemble } // GROUPS passed missed-error // missed-error file typedef void (*pfv)(); void f (); extern "C" { typedef void (*pcfv)(void); void cf (void); } pfv p = f; pfv p2 = cf; // { dg-error "" "" { xfail *-*-* } } mismatch pcfv p3 = f; // { dg-error "" "" { xfail *-*-* } } mismatch pcfv p4 = cf...
google
android
virtual4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/virtual4.C
448
utf_8
262bdcf37f1f8e0e4ab1e2307a42eb36
// { dg-do run } // GROUPS passed virtual-functions #include <stdio.h> #include <stdlib.h> int aset = 0; class A { public: void Set() { SetProp(); } virtual void SetProp() { aset++;} }; class B:public A { public: void SetProp() { if (!aset) { printf ("FAIL\n"); exit (1);} aset--;} }; int main() { ...
google
android
cvt10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt10.C
1,131
utf_8
fcbd9d2e0d2962c61af5769fe885706c
// { dg-do assemble } // GROUPS passed conversions // cvt file // Subject: g++ 2.4.5 has problems with NON virtual shared base classes // Date: Mon, 23 Aug 1993 12:10:34 GMT #include <stdio.h> #define FAIL class Base { public: Base() { printf("Base::Base\n"); } virtual ~Base() { printf("Base::~Base\n"); } ...
google
android
visibility5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility5.C
204
utf_8
3bd4251d02ab1e87eff95031ca47ebb7
// { dg-do assemble } // GROUPS passed visibility class a { private: a (int i);// { dg-error "" } .* public: a (); }; void test () { a *ap = new a; a *ap2 = new a (3);// { dg-error "" } .* }
google
android
arm11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arm11.C
313
utf_8
587c835fb12312b7730448ae3399fdb6
// { dg-do assemble } // GROUPS passed ARM-compliance // arm file // Subject: Page 81 of the ARM // Date: Thu, 18 Feb 93 11:55:15 +0100 int main() { int x[ 10, 11]; // { dg-error "" } .* return 0; }
google
android
array1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/array1.C
488
utf_8
638fa4956e56c7fb5934d5d519cc118f
// { dg-do run } // GROUPS passed arrays // array file // Subject: constructors not called on new'ed array elements // Date: Sat, 11 Apr 92 22:53:35 CDT #include <stdio.h> int i = 0; class foo { private: static foo *array; public: foo() { i++; } }; foo* foo::array = new foo [5]; int main() { if (i ...
google
android
ctors5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors5.C
988
utf_8
65d852c22c012c68529afb70d7a6ae84
// { dg-do assemble } // { dg-options "-fshow-column" } // GROUPS passed constructors // ctors file // Subject: bug in handling static const object of the enclosing class // Date: Tue, 1 Sep 92 10:38:44 EDT class X // { dg-message "7:X::X|candidate expects" } implicit constructor { private: int x; publi...
google
android
cvt14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt14.C
353
utf_8
477dfc95263afcb90b213932001f322b
// { dg-do assemble } // GROUPS passed conversions // cvt file int main() { double *d; d = new double(10); return 1; }
google
android
operators34
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators34.C
150
utf_8
3d610b4d60d2487ef7c73865ca625dc2
// { dg-do assemble } // GROUPS passed operators class A { public: A() { } }; static class A *A_new_() { return new class A; }
google
android
scope3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/scope3.C
440
utf_8
30ade8dcbeee835295128ff793fbf57f
// { dg-do assemble } // GROUPS passed scoping // local-class file void f() { { struct A { A() {} } a; }; { struct A { A() {} } a ; }; }
google
android
friend5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/friend5.C
535
utf_8
db1d243c61078bc4946fb42ac383a954
// { dg-do assemble } // { dg-options "-Wreturn-type" } // GROUPS passed friends extern "C" int good_friend(int); extern "C" int bad_friend(); class assembler { friend int good_friend(int); friend int bad_friend(); void *parts; }; assembler...
google
android
access1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/access1.C
585
utf_8
1c73e8224f5abf06d0756ccb118b07ce
// { dg-do assemble } // GROUPS passed access // access file // Subject: method access bug in gcc-2.3.1 on a sparc-sun-sunos4.1.2 // Date: Sat, 28 Nov 92 13:52:14 EST extern "C" { int atoi(const char*); } struct thingus; class foo { public: static const foo alpha; static const foo beta; private: int i; foo...
google
android
pr25000
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/pr25000.C
417
utf_8
4203233107643ecb1062050ef0d54a8e
// { dg-do compile } // { dg-options "-O2" } int * f(void); void g(int*); bool h(void); void Find( ) { int * pRes = f(); if( !pRes ) { if( h()){ if( h()){ try { pRes = new int(); f(); }catch(int& e1 ){} ...
google
android
visibility22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility22.C
519
utf_8
2e8a20cca66e2d0bbd58a5543fffaad3
// { dg-do assemble } // GROUPS passed visibility // visibility file // 5.cc #include <iostream> class A { int x; public: void f(int); void f(float); void g(void *); }; class B : private A { protected: A::f; // { dg-warning "deprecated" } public: A::g; // { dg-warning "d...
google
android
inline6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/inline6.C
407
utf_8
07568fbf39d40eda3d02fd38a8c613c6
// { dg-do assemble } // GROUPS passed inlining // inline file // Subject: g++ bug: crash with extern C friend // Date: Fri, 16 Jul 1993 18:40:48 -0400 inline void Ignore(){} extern "C" void foo() {} // but without extern C g++ compiles it struct A { void f() {Ignore();} friend void foo (); };
google
android
parsing2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/parsing2.C
431
utf_8
f2e535626730bf7b85d0fa9adf37dc0b
// { dg-do assemble } // GROUPS passed parsing // parsing folder unsigned char FindMdc ( int (**)() ); unsigned char FindMdc2 ( int (**funcname)() );
google
android
bad-error1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/bad-error1.C
300
utf_8
f2868f3b6bc1abc6a8713d93271caa60
// { dg-do assemble } // GROUPS passed bad-errors // bad-error file // Subject: initializer for static class member array // Date: Fri, 8 Jan 93 11:03:05 GMT struct A { static int v[]; }; int A::v[1] = { 1 };
google
android
dtors5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/dtors5.C
567
utf_8
fe271aeb7a7c464f28bcf486e2eecc87
// { dg-do run } // GROUPS passed destructors // dtor file: // Subject: gcc 2.2.2 -- c++ bug: destructor called twice (example) // Date: 25 Jun 92 18:18:45 GMT #include <stdio.h> int things = 0; class foo { public: foo() { things++; } foo(const foo&) { things++; } ~foo() { things--; } int i; }; void sub(fo...
google
android
visibility11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility11.C
640
utf_8
a25826be78810e5dc71078f5af23ec75
// { dg-do assemble } // { dg-options "-w" } // GROUPS passed visibility // visibility file class A { int a; protected: virtual void State(int b) { a = b; } }; class B : public A { char* foo; public: B(const char*); }; class C : public A { char* foo2; public: C(const char*); }; class D : publ...
google
android
ctors21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors21.C
267
utf_8
dc32c6d12d1a1b5cd5bb38c3c95f7d21
// { dg-do assemble } // GROUPS passed constructors // ctor file // Subject: g++-2.5.2 -- private copy ctor hides public ctor // Date: Mon, 8 Nov 93 10:14:50 PST class A { A(A&); public: A(); }; class B { A a; };
google
android
ctors15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors15.C
535
utf_8
547a4a89b8882a89408c4da563c2cf13
// { dg-do run } // GROUPS passed constructors // ctor file // Subject: bug with new/delete of multidimensional array // Date: Sat, 27 Mar 93 14:04:52 EST #include <stdio.h> #include <stdlib.h> int construct = 0; class Element { public: Element() { construct++; if (construct > 6) {printf ("FAIL\n"); exit(1);}} ...
google
android
init1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/init1.C
705
utf_8
58d32a605230d807049eb5e9c92fd62f
// { dg-do assemble } // { dg-prune-output "non-static data member initializers" } // GROUPS passed initialization class foo { public: int data; foo(int dat) { data = dat; } }; class bar { public: foo f[3] = { 1, 2, 3 }; // works: f[0] = 1, f[1] = 2, f[2] = 3 // { dg-error "" "" { target { ! c++11 } } } ANSI ...
google
android
init7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/init7.C
178
utf_8
1ca2f1117952406b5dee95198e0122e6
// { dg-do assemble } // GROUPS passed initialization class test { public: int x; int y; test (int val) { x = val; y = 0;} }; test ar(34)[5];// { dg-error "" } .*
google
android
operators14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators14.C
152
utf_8
b6a5e16654c8a404c920290086ad4e19
// { dg-do assemble } // GROUPS passed operators void foo (int * a, int * b, int * c) {} int main() { int a,b,c; foo (&a, &b, &c); (a = b) = c; }
google
android
ctors2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors2.C
1,567
utf_8
83c05fe0aab282ba59289316d36fc8ae
// { dg-do run } // GROUPS passed constructors // Subject: serious problems with static constructors #include <stdio.h> #include <stdlib.h> #include <string.h> #define CONST const class Sig { public: enum Type { Byte_t, Word_t, Long_t, Float_t, Double_t, Complex_t, ComplexLong_t, Bad_t }; private: Type T; public: ...
google
android
operators30
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators30.C
446
utf_8
cc101c050ea10c9be6d9b5ddaa8d4986
// { dg-do run } // GROUPS passed operators // opr-mm file // Date: Thu, 2 Jun 94 10:00:29 +0200 // Subject: result of operator -- with g++-2.5.8 #include <stdio.h> void nop() { } int main () { int a = 2; if (----a == 0) nop (); if (a == 0) printf("PASS\n"); else { printf("FAIL\n"); return 1; }...
google
android
ctors7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors7.C
763
utf_8
6ccdf846deed077c0368e1979b098c62
// { dg-do assemble } // GROUPS passed constructors // ctors file // Subject: const constructor causes crash // Date: Fri, 3 Jul 1992 21:46:00 GMT class base_t { public: virtual const char* name () { return "base_t"; } base_t (); virtual ~base_t (); }; class d1_t : public base_t { public: virtual const cha...
google
android
visibility26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility26.C
441
utf_8
ea7844806f8312d4dc27b0469a993bba
// { dg-do assemble } // GROUPS passed visibility // visibility file class X { public: void f(); }; class Y : private X { public: void f(int); // 'X::f' used to be an error; now equivalent to 'using X::f' X::f; // { dg-warning "deprecated" } };
google
android
dtors1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/dtors1.C
331
utf_8
84a28c855235b7c01f16dbd24342986f
// { dg-do assemble } // GROUPS passed destructors // friends file void f() { int i; i.i::~i();// { dg-error "" } .* }
google
android
ctors3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors3.C
451
utf_8
7fca46a172e3bee134b4a9f9b5e04bad
// { dg-do assemble } // GROUPS passed constructors // ctor file // Subject: Apparent bug in g++ 2.5.2 // Date: Wed, 10 Nov 93 18:24 PST class One { public: One() {} }; template<class T> class Two : public One { }; class Three { }; class Four { Two<Three> x[1]; }; class Five { Four y; public: ...
google
android
global-init1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/global-init1.C
487
utf_8
3dcbeb7d145ae39da345f01ab8299d61
// { dg-do run } // GROUPS passed initialization // global-init file // Subject: Initializers - gcc 2.2.2 (g++), SPARC, SunOS 4.1.1 // Date: Wed, 2 Dec 92 09:56:01 PST #include <stdio.h> struct S { int a; int c; }; int i = 3; S s = {6, i}; S * the_s () { return &s; } int main () { S * cls = the_s (); if (cls->a...
google
android
operators9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators9.C
548
utf_8
252860d9a6231d7b9387005d223039d9
// { dg-do assemble } // GROUPS passed operators // opr-eq file // Subject: 2.3.3: failed to detect error // Date: Thu, 14 Jan 93 16:14:21 +0100 class B { public: operator=(B &); // { dg-error "no type" } // { dg-message "B::operator=|no known conversion" "note" { target *-*-* } 12 } }; void test(B &b1, co...
google
android
copy1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/copy1.C
781
utf_8
5a49ca31665ab166f9c7f325e494e17c
// { dg-do run } // GROUPS passed copy-ctors #include <stdio.h> int pass = 0; class name { int namestuff; public: name() { namestuff = 111; } name(const name& subject); name & operator = (const name& right) { this->namestuff = right.namestuff; return *this; } ~name() { ; } }; na...
google
android
arm15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arm15.C
843
utf_8
6b9d818d286e7fcc3181ecc976c5356c
// { dg-do run } // GROUPS passed ARM-compliance // arm file #include <stdio.h> #include <stdlib.h> int state = 0; class A { public: A() { if (state == 0) state = 1; else { printf ("FAIL\n"); exit (1); } } }; class B { public: B() { if (state == 1) state = 2; else { printf ("...
google
android
parsing9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/parsing9.C
617
utf_8
6c538e1ec51e48676485e007b0bd1ca5
// { dg-do assemble } // GROUPS passed parsing // Subject: g++ bug // Date: Fri, 13 Aug 93 10:09:27 PDT /* Testing declaration of "array of pointers to functions returning T" */ typedef int T; T foo() { return 10; } T bar() { return 20; } T baz() { return 30; } int main() { T (*apfrt[10])(); apfrt[0] = foo; apfrt[1] =...
google
android
dtors2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/dtors2.C
909
utf_8
b66c5a2ae3b401b8a32477322a72ea33
// { dg-do run } // GROUPS passed destructors #include <stdio.h> int destruct = 0; class bla { public: inline bla(const char * jim) { ; } inline ~bla() { destruct++; if (destruct == 2) printf ("PASS\n");} }; class ulk { public: inline ulk() {} inline ~ulk() {} void funk...
google
android
casts1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/casts1.C
318
utf_8
d064abffb69b49b904a86972c9b22300
// { dg-do assemble } // GROUPS passed casts // casts file int main() { (struct T { int b; } *) 0; // { dg-error "" } return 0; }
google
android
cvt4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt4.C
539
utf_8
dc37134dafaeeab47e6be2a9391cdd90
// { dg-do run } // GROUPS passed conversions // cvt file // Subject: Bug in GCC 2.4.5 // Date: Mon, 9 Aug 93 14:13:50 MESZ extern "C" int printf (const char *, ...); int destruct = 2; class Test{ protected: long x; public: Test(){;} Test(long l) {x=l;} ~Test() {if (--destruct == 0) printf ("...
google
android
virtual2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/virtual2.C
489
utf_8
b0021e7056bc3ffa8c7abf02d43c8a27
// { dg-do run } // GROUPS passed virtual-functions // Not in g++ bugs snapshot #include <stdio.h> class doubleclass { public: double d; doubleclass(double x = 0) { d = x; } }; class test { doubleclass doublec; }; class vderived : virtual public test { }; int main() { vderived v; printf ("PASS\n"); }
google
android
ctors13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors13.C
293
utf_8
1d5810c003e9c170790ad8e8a65410e6
// { dg-do assemble } // GROUPS passed constructors #include <iostream> class A { A() {} // private constructor// { dg-error "" } .* }; int main() { A* a = new A();// { dg-error "" } .* if (a) { std::cout << "a != NULL\n"; } else { std::cout << "a == NULL\n"; } }
google
android
parsing10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/parsing10.C
423
utf_8
554085d17f0b1efa25b285baf0a730c3
// { dg-do assemble } // GROUPS passed parsing // parsing folder class s; template <class T> class t { public: void f(T *t); }; class l { public: void s() {} }; extern t<l> g; class p { public: void *h; s *a() {return (s *) h;} };
google
android
visibility16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility16.C
616
utf_8
febe274567c48e215fa619cfe9f9810e
// { dg-do assemble } // GROUPS passed visibility // visibility file class A { protected: int astuff; // { dg-error "" } protected A() { astuff = 3; } }; class B : public A { int bstuff; public: B( A *p) { bstuff = p->astuff;// { dg-error "" } .* } }; class C : public A { ...
google
android
operators4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators4.C
705
utf_8
f2eea3bb65e7af345d839d7fa8280b56
// { dg-do assemble } // GROUPS passed operators // opr-del file #include <complex> typedef std::complex<double> Complex; #include <stdio.h> class Vector { int size; Complex *v; public: Vector(int s=1) { size = s; v = new Complex[size];} ~Vector() { delete [size] v;}// { dg-error "" } warning...
google
android
access2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/access2.C
459
utf_8
f2d968b6cc92b14a86959b52a90a8990
// { dg-do assemble } // GROUPS passed access // access file // Subject: Compiler lets access to private constructor in template. // Date: Wed, 30 Jun 93 17:34:10 +0200 template <class T> class Foo { private: friend class Bar; // To avoid warning. Foo(const T &v) {}; // { dg-error "" } private }; int main() ...
google
android
code-gen1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/code-gen1.C
393
utf_8
50fdf8bb033d29c31bc7614b91ecbcbd
// { dg-do run } // GROUPS passed code-generation // code-gen file #include <stdio.h> int main() { int i = 0; (++i)++; if (i == 2) printf ("PASS\n"); else { printf ("FAIL\n"); return 1; } }
google
android
typeck2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/typeck2.C
525
utf_8
f8cb1fe2f91b8dfc0edbec58eee2f6a2
// { dg-do assemble } // GROUPS passed typeck // typeck file typedef int arr[10]; int main() { int * p = new int[10]; int * q = new arr; /* g++ complains, but shouldn't */ int (* r)[10] = new arr; /* g++ doesn't complain, but should */// { dg-error "" } }
google
android
ctors20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors20.C
580
utf_8
2f4413fe68201d0afe8306a16321d3a1
// { dg-do assemble } // GROUPS passed constructors // ctor file // Subject: g++ 2.5.0 fails to automatically generate default initializer // Date: Mon, 01 Nov 1993 12:58:34 -0500 class String { private: char a[100]; int len; public: String(); }; String::String() { len = 0; } struct List { Stri...
google
android
weak
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/weak.C
501
utf_8
cf3128ad2270bb697c9d06fcfe876af7
// { dg-do link { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } // { dg-require-effective-target static } // { dg-options "-static" } // Bug: g++ fails to instantiate operator<<. // libc-5.4.xx has __IO_putc in its static C library, which can conflict // with the copy of __IO_putc in the libstdc++ library built...
google
android
arm8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arm8.C
382
utf_8
21b61c04c0e58d22e2aad4f662ab134d
// { dg-do assemble } // GROUPS passed ARM-compliance // arm file // Subject: Page 141 of the ARM // Date: Tue, 16 Mar 93 12:05:24 +0100 struct K { void f( int *p = 0); // { dg-message "" } previous specification }; extern int * q; void K::f( int *p = q);// { dg-error "" } .*
google
android
virtual3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/virtual3.C
955
utf_8
bf2c9b06556999dd1a62fb7f0b8a0cbc
// { dg-do run } // GROUPS passed virtual-functions // virtual file #include <iostream> #include <sstream> using namespace std; class BugStream : public ostringstream { public: BugStream() {} BugStream& eval(); }; static struct Eval_ { } eval; BugStream& operator<<(ostream& os, Eval_); BugStream& BugStream::ev...
google
android
array2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/array2.C
347
utf_8
9e499d061402ebba6f093043740f0f4e
// { dg-do assemble } // GROUPS passed arrays // array file // Subject: prototype bug ? // Date: Thu, 5 Nov 92 15:37:34 PST extern unsigned char * (*trt_def(int))[][2]; extern unsigned char * (trt_rplst(unsigned char *(*)[][2])); // { dg-error "" }
google
android
arm2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arm2.C
300
utf_8
7967ab12475bf7177886ea4f6cfe8359
// { dg-do assemble } // GROUPS passed ARM-compliance // arm file // Subject: gcc bug // Date: Mon, 25 Jan 1993 20:40:44 -0500 int f() { return 1; } int main() { int (&fr)() = f; return 0; }
google
android
cvt15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt15.C
510
utf_8
cbae2bf0ce3e57fc66439d36da03e0d5
// { dg-do assemble } // GROUPS passed conversions // cvt file // Subject: g++ 2.4.5: Conversion operators to complex types don't work either // Date: Thu, 5 Aug 93 15:30:04 CDT class bar { int x; public: bar() : x(1){} }; class foo { bar a, b; public: foo(bar i, bar j) : a(i),b(j) {} operator const bar()...
google
android
arg7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arg7.C
1,032
utf_8
54cf11556d5c2c44c534aea0527d0782
// { dg-do run } // GROUPS passed arg-matching // arg-matching file // Subject: overloaded function resolved incorrectly // Date: Tue, 4 May 93 13:59:18 EDT #include <stdio.h> // Given the following overloaded function definitions int ovf(unsigned long, short, short) { printf ("PASS\n"); return 0; } int ovf( ...