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
visibility27
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility27.C
410
utf_8
5bf028a54c42be753c5a70a61ce49abc
// { dg-do assemble } // GROUPS passed visibility // visibility file struct R { protected: virtual void foo(); }; struct A : public R { }; struct B : virtual public A { void bletch() { foo();} };
google
android
arm14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arm14.C
557
utf_8
5a4d8804ee8bd4119db184fad7166f88
// { dg-do assemble } // GROUPS passed ARM-compliance // unsorted.2 file class X { private: enum E1 {a1, b1}; // { dg-error "" } private public: enum E2 {a2, b2}; }; void h(X* p) { X::E2 e2; int x2 = X::a2; X::E1 e1; // { dg-error "" } within this context int x1 = X::a...
google
android
cvt17
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt17.C
501
utf_8
9a6a4b84f0461a6a230340a55aa24a13
// { dg-do assemble } // GROUPS passed conversions // cvt file // Subject: illegal code compiles silently // Date: Thu, 20 May 93 21:24:22 -0400 class Point {}; class Line_Segment{ public: Line_Segment(const Point&){} }; class Node { public: Point Location(){ Point p; return p; } }; int main() { Node** node1; Li...
google
android
vtable2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/vtable2.C
209
utf_8
248e82b0d6c1c80f463a405ecdc6ed4a
// { dg-do assemble } // GROUPS passed vtable struct C1 { virtual ~C1(); }; struct C2 : public virtual C1 { virtual ~C2(); }; struct C3 : public virtual C2 { virtual ~C3(); }; C3::~C3() {}
google
android
incdec1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/incdec1.C
1,448
utf_8
48e16841a2d71a47ef942cdd221a4ce2
// { dg-do assemble } // { dg-options "-w -O3" } // GROUPS passed incdec typedef void* Pix; class ndbArtPtrVec { public: ndbArtPtrVec (ndbArtPtrVec&); }; class intndbArtPtrVecMap { protected: int count; ndbArtPtrVec def; intndbArt...
google
android
template1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/template1.C
480
utf_8
391c989429af823aab04d0ac377f0c83
// { dg-do assemble } // GROUPS passed templates class String { char s[100]; }; template <class Element> class Art { public: Element *data; Art() { data=new Element[100]; } }; template <class Key,class Value> class Assoc { public: struct KeyValue { Key key; ...
google
android
arg4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arg4.C
695
utf_8
e7a24e4040e7c2420672577d30863369
// { dg-do assemble } // GROUPS passed arg-matching // arg-matching file // Subject: g++ 2.3.3 Doesn't check function types in initializer lists ? // Date: Tue, 9 Mar 1993 21:39:08 GMT typedef void (*FuncPtr)(int a, float b); class Amazing { int a; int b; int c; }; extern void *Wrong1(char *a, int *b); extern void *Wr...
google
android
scope1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/scope1.C
429
utf_8
46a6e26271d3f0d8ac451258913ab825
// { dg-do assemble } // GROUPS passed scoping // scoping file int main(void) { struct A{ public: int i; void set (int i) {A::i = i;} // g++ gives wrong error }; A a; a.set(17); return 0; }
google
android
static-mem3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/static-mem3.C
624
utf_8
4420683085194c13af157409ff496ca5
// { dg-do assemble } // GROUPS passed static-mem // static-mem file // Date: Thu, 2 Jun 94 09:39:09 -0700 // Subject: static members function pointers class CRTFooBar; class CRTFoo { public: static const CRTFooBar & defaultFooBar( ); CRTFoo( const CRTFoo & ); CRTFoo( ); CRTFoo( const ...
google
android
ctors10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors10.C
605
utf_8
7a3469597d71dca36d051be33105b52a
// { dg-do assemble } // GROUPS passed constructors // ctor file // Subject: bug019.cc // Date: Fri, 5 Feb 93 15:51:42 -0800 #include <iostream> class Klasse { class Err : public std::ostream { public: Err(void) : std::ostream(NULL) { } ~Err(void) { } }; ...
google
android
init4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/init4.C
252
utf_8
e3dd9efb103bf1cc825765f67f73e977
// { dg-do assemble } // { dg-options "-pedantic-errors" } // GROUPS passed initialization class Time; class TimeNote; class SvTime { public: static TimeNote *time_events = 0;// { dg-error "" } .* }; SvTime CurrentTime = {0};// { dg-error "" }
google
android
cvt1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt1.C
299
utf_8
f0df189213175eb2b1bbf550a1c849cc
// { dg-do assemble } // GROUPS passed conversions // cvt file int main() { int (*a)[5] = new int[6][5]; }
google
android
union1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/union1.C
723
utf_8
7852b50ea06c609148bfee1ccab7b3e6
// { dg-do assemble } // GROUPS passed unions // anon-union file typedef enum { BADBINOP = 0, PLUS, MINUS, MULT, DIV, POWR } binoptype; typedef enum { BADUNOP = 0, NEG = POWR+1, SIN, COS, TAN } unoptype; typedef struct { const char *s; union { binoptype bop; unoptype uop; }; } op_to_charp; op_to_charp BI...
google
android
except6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/except6.C
532
utf_8
2c9505d31f11fedc1ea3c45d6d817fd4
// { dg-do assemble } // { dg-options "-fexceptions" } // GROUPS passed exceptions // except file struct Exception { int v; Exception(int i) { v = i; }; }; void inc(int &i) { try { if (i == 0) throw Exception(i); else i++; } catch (Exception v) { ...
google
android
init3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/init3.C
342
utf_8
9b194baffdc3cd87c779ff60625d15f6
// { dg-do assemble } // GROUPS passed initialization // init file int main() { int offset; char buf[offset]=""; // { dg-error "" } ansi forbids variable arrays }
google
android
scope2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/scope2.C
885
utf_8
06d0dda96e5115c8db9f563ca5ce7dcf
// { dg-do run } // GROUPS passed scoping // scoping file #include <stdio.h> #include <stddef.h> #include <stdlib.h> class foo { public: foo () { ; } ~foo () { ; } void *operator new (size_t); void operator delete (void *); }; void *foo::operator new (size_t size) { return malloc (size); } int overloaded_de...
google
android
operators18
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators18.C
596
utf_8
851c5232212f96b8f53783fa25fb13c0
// { dg-do assemble } // GROUPS passed operators // opr-ampr file enum E { a, b, c }; struct Estr { E value; Estr() {} Estr( int i ) : value( (E)i ) {} operator E() { return value; } }; ...
google
android
visibility13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility13.C
2,494
utf_8
ada624624ac329cec31588daed334d60
// { dg-do assemble } // GROUPS passed visibility // visibility file #include <iostream> #include <cassert> // --------------- Array.h && Array.cc ------------------ using namespace std; const int ArraySize = 12; template <class Type> class Array { // { dg-error "" } .struct Array_RC redecl.* friend class Ar...
google
android
visibility4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility4.C
556
utf_8
19415a8b2c4bcb3642e9debecfffb440
// { dg-do assemble } // GROUPS passed visibility // visibility file class A { public: int b; // { dg-error "" } private }; class C : private A { // NOTE WELL. private, not public public: int d; }; extern "C" int printf( const char *, ...); class E : public C { void f() { ...
google
android
init2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/init2.C
286
utf_8
8280f7d5ae8108561fa946e893fe8835
// { dg-do assemble } // GROUPS passed initialization // init file int * const & fiddle = 0;
google
android
operators15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators15.C
606
utf_8
06776eb2fb48141d4042c0f36e3d7340
// { dg-do run } // GROUPS passed operators // opr-del file // Subject: bug report // Date: Wed, 27 Jan 1993 16:37:30 -0500 extern "C" int printf(const char* ...); int delete_counter = -1; struct T{ void operator delete (void * p) {delete_counter ++; ::operator delete(p);} }; int main(void) { T * ps1 = new T; ...
google
android
visibility28
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility28.C
396
utf_8
a24bfda97e2b33d0ab14a8f7ba45e74a
// { dg-do assemble } // GROUPS passed visibility extern "C" int printf( const char *, ...); class B { public: B() { } virtual ~B() { printf( "B::~B\n"); } }; class D : public B { public: virtual ~D() { printf( "D::~D\n"); } void operator = ( int i) { this->~B(); } }; int main() { ...
google
android
visibility15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility15.C
531
utf_8
d2997ded14d51717c762887d4392e84c
// { dg-do assemble } // GROUPS passed visibility // visibility file #include <stdio.h> #include <sys/types.h> class X { private: void* operator new(size_t) throw(){// { dg-error "" } .* printf("Inside private new().\n"); return NULL; } public: X() {} }; int main(void) { X* p = new X;// { dg-error "" }...
google
android
refs2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/refs2.C
121
utf_8
57c54b83f5425f794b19b867f0a27073
// { dg-do assemble } // GROUPS passed references int func(int& i) { static int& v = i; return v; } int main() { }
google
android
visibility25
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility25.C
492
utf_8
c42ec3a1df1d4b0130e39689ff6061cc
// { dg-do assemble } // GROUPS passed visibility // visibility file #include <iostream> class A { public: A(void); }; class B : private A { public: B(void) : A() {} }; class C : public B { public: C(void) : B(), a() {} private: ::A a; };
google
android
operators33
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators33.C
622
utf_8
f240605f2293a1088aa4b41a32d367f7
// { dg-do assemble } // GROUPS passed operators // opr-new file #include <stdio.h> struct fcell { FILE *fd; struct fcell *next; }; class FStack { public: struct fcell *top; FStack() { top = NULL ; } inline void push(FILE * fd1, int line_num, char *fname = NULL) { ...
google
android
cvt3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt3.C
318
utf_8
5a53e590eeb34714c1cdc96900f7bf8c
// { dg-do assemble } // GROUPS passed conversions // cvt file
google
android
access3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/access3.C
464
utf_8
9969f99108bad773ac33911d5a467ba4
// { dg-do assemble } // GROUPS passed access // unsorted.2 file // Date: Sat, 6 Jun 1992 18:23:03 -0400 // Subject: bug with access control to member functions class X { void g (int); // { dg-error "" } is private public: void g (double); }; class Y : public X { void f()...
google
android
refs3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/refs3.C
128
utf_8
ba81cc1584de7e22a78f9d7c3c75a0bb
// { dg-do assemble } // GROUPS passed references const int& min(const int& n, const int& m) { return n < m ? n : m; }
google
android
arg3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arg3.C
383
utf_8
1230662efab55537e4bf48d84a984c7a
// { dg-do assemble } // GROUPS passed arg-matching typedef void* Ptr; void func(int, const Ptr& p); template <class T> void func(T, const Ptr& p); Ptr& return_ref(); int main() { char* x; func(x,return_ref()); // bug: // call of func(int, const Ptr&) ...
google
android
enum1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/enum1.C
218
utf_8
12930551b195f966438b23dac7f2802e
// { dg-do assemble } // GROUPS passed enums class X { struct X1; enum { A= sizeof(X1 *) }; //Causes a problem. struct X1 { int i; }; X1 *f(X1 *); public: X(void); }; X::X1 *X::f(X1 *x) { return x; }
google
android
dtors3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/dtors3.C
556
utf_8
f32e57d61173dca2e302b2ef30799a86
// { dg-do run } // GROUPS passed destructors // dtor file // Subject: 2.3.3: premature dtor of temp? // Date: Sun, 24 Jan 93 15:17:07 CST #include <stdio.h> #include <stdlib.h> int killed = 0; class Foo { int a; public: Foo() :a(0) {;} ~Foo() { killed++;} Foo& operator << (int b) { a += b; if (ki...
google
android
operators28
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators28.C
465
utf_8
d2376f572f4ee331f301579b4b343859
// { dg-do assemble } // GROUPS passed operators #include <sys/types.h> #include <stdio.h> class new_test { int type; public: void* operator new(size_t sz, int count, int type); }; void* new_test::operator new(size_t sz, int count, int type) { void *p; printf("%d %d %d\n", sz, count, type); p = new char[...
google
android
visibility14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility14.C
321
utf_8
dce4661dcbcb694a1167a86aab76bfea
// { dg-do assemble } // GROUPS passed visibility // visibility file class A { static A* list; protected: struct AA { AA(); ~AA(); }; }; A::AA::~AA() { A* d=list; }
google
android
vbase1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/vbase1.C
492
utf_8
b670a00f5a22d3c4393b7380abc9bb6f
// { dg-do assemble } // GROUPS passed vbase // vbase file #include <iostream> class a { protected: virtual void foo() { std::cout << "Class A\n";} }; class b : public virtual a {}; class c : public b { public: void bar() { b::foo();} }; int main() { c test; test.bar(); }
google
android
cvt8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt8.C
719
utf_8
5544958900d2ad38f3227e493b473950
// { dg-do assemble } // GROUPS passed conversions // cvt file // Subject: g++ 2.2.2 seems to be forgetting a "const" // Date: Mon, 14 Sep 92 10:09:58 -0500 extern "C" int printf (const char *, ...); struct A { int i; }; struct B { int i; operator const A&() const; }; B::operator const A&() con...
google
android
nest3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/nest3.C
438
utf_8
c47e91e5ce6ff2031199530ac45527c6
// { dg-do assemble } // GROUPS passed nest #include <iostream> struct inner { static void f() { std::cout << "inner::f()\n";} }; struct outer { struct inner { static void f() { std::cout << "outer::inner::f()\n";} }; static void f() { inner::f(); //call of outer::inner::f() ::inner::f(); ...
google
android
arm10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arm10.C
251
utf_8
9ac5b9af9bf7f58a3a9618dde4a508e9
// { dg-do assemble } // GROUPS passed ARM-compliance // arm file // Subject: ARM Page 65 // Date: 18 Mar 1993 17:21:21 GMT int(*p)[10]=new int[20][10];
google
android
ctors17
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors17.C
754
utf_8
bdc8f11188ced4ec38de9f92ed9bd625
// { dg-do assemble } // GROUPS passed constructors // ctor file // Subject: gcc 2.4.3.1: illegal constructor call not rejected // Date: Tue, 15 Jun 1993 18:34:14 +0200 (MET DST) // C++0x mode doesn't print the deleted copy constructor as a candidate. // { dg-prune-output ":14:" } #include <fstream> class X : public s...
google
android
temps7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/temps7.C
130
utf_8
8a7dbb074a12d500597c712c544bc6a5
// { dg-do assemble } // GROUPS passed temps template <class B > class A { public: class C {}; }; template class A<int>::C;
google
android
operators25
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators25.C
370
utf_8
61f8f9003d92927e6c3f46c939952df7
// { dg-do assemble } // GROUPS passed operators // opr-new file typedef int (**PPF)(int); int main(void) { PPF pf2 = new (int (*) (int)); // internal compiler error on this line. return 0; }
google
android
operators8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators8.C
789
utf_8
9dd866325635f38988914adf0a344f74
// { dg-do run } // GROUPS passed operators #include <stdio.h> class shape { public: virtual int vDisplay(void) const = 0; protected: int X; int Y; }; class square :public shape { public: square(int x, int y, int width_) { X = x; Y = y; width = width_; } int vDisplay(void) const { p...
google
android
cvt19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt19.C
343
utf_8
59c4dcdbd25a43a3d1379b1156ae3c08
// { dg-do assemble } // GROUPS passed conversions // cvt file // Date: Tue, 13 Jul 93 17:00:44 BST class B {}; class A { public: operator const B*() const { return b; } private: B* b; }; int main() { A a; if (a!=0) { } }
google
android
nest2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/nest2.C
148
utf_8
0e841c8579dbf3f077a536abcaf5bbba
// { dg-do assemble } // GROUPS passed nest struct B { class B_I { }; }; struct D : public B { B_I foo; class I : public B_I { }; };
google
android
temps5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/temps5.C
729
utf_8
c2c8b180a44ba52b34571e512aeeeda8
// { dg-do run } // GROUPS passed temps // temps file // Subject: gcc 2.5.3 - bug deleting object that is still referred to // Date: Wed, 17 Nov 93 21:29:23 EST #include <stdio.h> class C { public: C(int i) : val(i) { ; } C(const C& c) : val(c.val) { ; } ~C(void) { val = 999; } C...
google
android
refs1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/refs1.C
777
utf_8
b13e21bd4f45e20bd28833048a99706f
// { dg-do run } // GROUPS passed references // (Message bugs/refs:1) #include <stdio.h> class C { private: const char** list; public: C(const char** ); void count (int&); }; C::C (const char** l) { list = l; } void C::count (int& total) { if (*list == NULL) return; else { list++; c...
google
android
arg8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arg8.C
679
utf_8
5c91652b075ce38aa0f796399b9b8a0e
// { dg-do run } // GROUPS passed arg-matching // arg-matching file // Subject: g++ bug // Date: Thu, 8 Jul 93 11:47:28 MDT #include <iostream> #include <cstdio> // With this declaration the program will not link. template <class Type> std::ostream & save(std::ostream & os, Type T); template <class Type> std::ostre...
google
android
builtin1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/builtin1.C
580
utf_8
0261272f9b949fb8c1de6aa0afe5eb19
// { dg-do run } // { dg-options "" } // GROUPS passed builtins // Apparently not in g++ bug snapshot (was originally sent to bug-gcc) // Subject: builtin_alloca on hpux (gcc-2.5.6) // We have to avoid using -ansi, which results in a call to alloca instead of // the use of __builtin_alloca, and thus ends up being unr...
google
android
arg5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arg5.C
287
utf_8
b0f9075e05d637f35c3bd890e20791bf
// { dg-do assemble } // GROUPS passed arg-matching extern double pow(double,int*); extern "C" { extern int printf (const char *, ...); extern double pow(double, double); } int main() { if (pow (2.0, 3.0) != 8.0) { printf ("FAIL\n"); return 1; } else printf ("PASS\n"); }
google
android
bad-error6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/bad-error6.C
466
utf_8
822533128eb0e0a4bcaef22a20c38fad
// { dg-do assemble } // GROUPS passed bad-errors typedef __SIZE_TYPE__ size_t; class tt { public: tt(int); private: void *operator new(size_t a); // Forbid object creation in heap memory. }; void st(const tt&, int); void ff(int i, int j) { if( i > 0 ) { // This work ok. tt a_tt...
google
android
dossier1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/dossier1.C
340
utf_8
8ccd1e790f8112ea7cb62ae884f3b194
// { dg-do assemble } // { dg-options "-frtti" } // GROUPS passed rtti // dossier file // Subject: bug // Date: Wed, 2 Dec 92 07:01:30 PST class Vector { int *p; int sz; public: Vector(int ); ~Vector(); int& operator[](int i); };
google
android
ctors4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors4.C
553
utf_8
06ecb0ea3c8fc37c696d9abb04e7f082
// { dg-do run } // { dg-options "-w" } // GROUPS passed constructors // ctors file // Subject: g++ 2.3.1 rejects initialization with object of derived class // Date: 25 Nov 92 19:21:23 extern "C" int printf (const char *, ...); class A { public: virtual void foo() {}; }; class B : public A { public: void foo() {}...
google
android
cvt5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt5.C
407
utf_8
0a0df1b8d53bb1f1473e61fac304a29e
// { dg-do assemble } // GROUPS passed conversions // cvt file // Subject: g++ bug // Date: Fri, 31 Jul 1992 14:28:56 GMT class A {}; class B : public A {}; B b; class R{ public: R() {} operator B&() { return b; } }; void f(A&) {} int main(){ R r; f(r); // problem to cast to B& and then to A& }
google
android
arg2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arg2.C
617
utf_8
58bbec3d47e3c1093dc15fd38738d280
// { dg-do assemble } // GROUPS passed arg-matching // arg-matching file // Subject: Overloading bug in g++ 2.3.3 (sparc) compiled by GNU C version 2.3.3 // Date: Wed, 03 Mar 1993 14:14:02 MST class c1 { }; typedef void (*fnp)(void *); typedef void (c1::*memfnp)(void *); extern void fn1( fnp ); extern void ...
google
android
arm5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arm5.C
543
utf_8
2b4a336aec2b1f50014550ed0e9a7d37
// { dg-do run } // GROUPS passed ARM-compliance // arm file // Subject: page 78 of the ARM // Date: Mon, 7 Dec 92 22:27:09 +0100 extern "C" int printf( const char *, ...); int & max( int & a, int & b) { return (a < b) ? b : a; } int main( void) { int a = 1; int b = 2; int & c = max( a,...
google
android
friend1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/friend1.C
566
utf_8
5011d6417e25d1f2e0b0a0fb38d33773
// { dg-do assemble } // GROUPS passed friends // friends file #include <stddef.h> #include <new> struct Foo { #if __cplusplus <= 199711L friend void* operator new(size_t) throw (std::bad_alloc); #else friend void* operator new(size_t); #endif friend void operator delete(void*) throw (); Foo(); ~Foo(); }; Fo...
google
android
visibility3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility3.C
522
utf_8
9e4bafcb0396f1d1497046a7eb4ecac9
// { dg-do assemble } // GROUPS passed visibility // visibility file int x; int main(void) { static int s; int x; // { dg-message "" } declared extern int g(); struct local { int g() { return x; } // illegal (non-static x); g++ does not give error// { dg-error "" } int h() { return s; } // ok, but...
google
android
code-gen2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/code-gen2.C
898
utf_8
7b8aed78776df3b5447bad3ab2124a53
// { dg-do run } // GROUPS passed code-generation // code-gen file #include <stdio.h> class X { public: double x; X () { x=3.5; } // Here we go. This assignment fails because // of X::x being aligned on a doubleword // boundary, not a quadword one. }; class ...
google
android
cvt21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt21.C
526
utf_8
f4d804181feaef36ad9e9c57d9ace840
// { dg-do assemble } // GROUPS passed conversions // cvt file // Subject: int & conversion operator // Date: Tue, 20 Jul 93 15:28:47 EST class Int { public: Int(void); Int(int); Int(const Int&); Int* copy(void) const; operator int&(); Int& operator ++(void); Int& operator --(void); private:...
google
android
operators22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators22.C
172
utf_8
e9e99b7ca1bde9611e92275f33e876dc
// { dg-do assemble } // GROUPS passed operators template <class T> class t { public: t() {} }; class m { t<int> c; public: m() : c() {} }; m *p() {return new m;}
google
android
nest1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/nest1.C
437
utf_8
cc2b9dfbc4e578959e9156b3545eb091
// { dg-do assemble } // GROUPS passed nest // nest file typedef char* T; // { dg-error "" } previous declaration struct Y { T a; typedef long T; // error. See ARM p189-191 for details// { dg-error "" } T b; };
google
android
static-mem5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/static-mem5.C
395
utf_8
c92c5524fc726c394131a8db74797f2e
// { dg-do assemble } // { dg-options "-w -fpermissive" } // GROUPS passed static-mem // static-mem file class A { public: static void F (int i) {} static void A::G (int i) {} }; main () { A::F (17); A::G (42); }
google
android
parsing8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/parsing8.C
848
utf_8
a24fcf602f3d08b6fdaa6df61f40e188
// { dg-do assemble } // GROUPS passed parsing // parsing folder int main() { void (**f)(); } // Same as
google
android
cvt23
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt23.C
478
utf_8
7c3b8faaed2aac780d6da9e8a809304f
// { dg-do assemble } // GROUPS passed conversions // cvt file // Subject: Bug in g++ 2.4.5: Conversion operators to enumerated types don't wor // Date: Thu, 5 Aug 93 12:09:09 CDT enum bar { AAA, BBB }; class foo { bar a, b; public: foo(bar i, bar j) : a(i),b(j) {} operator const bar() const { return a; } ...
google
android
missed-error3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/missed-error3.C
4,115
utf_8
148550d0fadd59c32845caec87bce551
// { dg-do assemble } // GROUPS passed missed-error // missed-error file // enum bool { FALSE = 0, TRUE = 1 }; typedef int T; class Traversable { public: virtual const T item() const = 0; virtual const bool off() const = 0; virtual ~Traversable() { } }; class Chain : public Traversable { public: virtua...
google
android
bit-fields3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/bit-fields3.C
133
utf_8
0367f254f4f882067f24c4d417963ff3
// { dg-do assemble } // GROUPS passed bit-fields class t { short :(sizeof(short)-2); public: t(); };
google
android
temps1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/temps1.C
423
utf_8
55c36d3ed52f81870142c43955ed69cd
// { dg-do assemble } // GROUPS passed temps // temps file // Date: Mon, 07 Sep 1992 13:12:28 EDT // { dg-options "-fpermissive" } struct foo { char *s; foo(char *x) { s=x; } }; struct cookie { foo * v; cookie ( foo * x) { v=x; } }; cookie cat(&foo("apabepa"));// { dg-warning "deprecated conversion" "dep" } //...
google
android
visibility20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility20.C
825
utf_8
e9573d0983340ad54cf7a7d17c6f9765
// { dg-do assemble } // GROUPS passed visibility // visibility file class Base { protected: void protectedBaseFunction() {} // { dg-error "" } protected public: Base() {} }; class Derived : public Base { public: Derived() {} void noticeThisFunction(Base *); }; void Derived::noticeThisFunction(Base *...
google
android
cvt13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt13.C
335
utf_8
b6252956b6b17df232f650c3bd42b803
// { dg-do assemble } // GROUPS passed conversions // cvt file // Subject: Type conversion problem. // Date: Fri, 26 Mar 1993 08:25:09 GMT typedef int array[10]; void f(array &arg) { } int main() { array var; f(var); }
google
android
operators11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators11.C
572
utf_8
f92d76b909469e15341b42f75160dc0f
// { dg-do assemble } // GROUPS passed operators // opr-eq file // Subject: g++ 2.4.5: assignment operator in base class // Date: Mon, 30 Aug 1993 00:54:29 GMT class B { public: B & operator = (B); // delete this line and problem goes away }; class D : public B { public: D(); D(int); D(B); }; int main() { B b; D...
google
android
template3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/template3.C
248
utf_8
d23ef9b8d21b1c02e42bdecdf5a495b8
// { dg-do assemble } // GROUPS passed templates template< class R, class T1 = R, class T2 = T1 > struct plus { R operator()( const T1& x, const T2& y ) const { return x + y; } }; int main() { plus< int > p; return 0; }
google
android
parsing1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/parsing1.C
371
utf_8
a1ff8997b097e88dbc6b13a59b5b5223
// { dg-do assemble } // GROUPS passed parsing // parsing folder class goo{ public: void noo_bloo(); }; void choo(goo* too) { (too->noo_bloo)(); } void choo_too(goo* too) { too->noo_bloo(); }
google
android
inline7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/inline7.C
217
utf_8
2983fb2df63a87b23801a2e31f0fd6ea
// { dg-do assemble } // GROUPS passed inlining template <class Type> struct A { typedef int X; A() {} virtual ~A() { } }; template <class Type> struct B : public A<Type> { B() { } }; B<int>::X x;
google
android
ctors18
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors18.C
473
utf_8
a5b63aa60cdf98f11396c1db1f6cd89f
// { dg-do assemble } // GROUPS passed constructors class test1 { }; template<class T> class GC_PTR { public: GC_PTR(T &a) {} }; void gotPtrs(GC_PTR<test1> r1) { } static void short_alloc(int n) { test1 here; GC_PTR<test1> foo = here; // This works fine. gotPtrs(here); // ...
google
android
operators13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators13.C
385
utf_8
8a50c19c0775dd6c081574f2fe4a4617
// { dg-do assemble } // GROUPS passed operators // opr-eq file // Subject: g++ 2.5.4 bug : operator= // Date: Thu, 18 Nov 1993 21:05:02 GMT class T { }; class EP { public: void operator=(T *); }; void EP::operator=(T *) { } int main() { EP ep1, ep2; ep1 = ep2; }
google
android
operators23
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators23.C
676
utf_8
9766da435363869a4aaa3f2a6b560688
// { dg-do run } // GROUPS passed operators // opr-new file #include <stdio.h> #include <stdlib.h> class blah { int j; public: blah(); void *operator new(size_t size) throw(); }; inline blah::blah() : j(0) { } void *blah::operator new(size_t size) throw(){ printf ("FAIL\n"); exit (1); ...
google
android
operators6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators6.C
441
utf_8
55b05d62217b8d49e3417722b1406cea
// { dg-do assemble } // GROUPS passed operators // opr-as file class A { public: A(int){} A& operator=(const A&){return *this;} }; class B: public A { public: B(int i): A(i) {} }; int main() { B b=1; b=1; }
google
android
visibility9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility9.C
468
utf_8
6476bf88463c00ab0c5adf3d245d2a67
// { dg-do assemble } // GROUPS passed visibility // visibility file class A { protected: int a; // { dg-error "" } protected }; class B : public A { public: void f1(A* pa); }; void B::f1(A* pa) { pa->a = 1; // illegal but allowed by gcc// { dg-error "" } .* }
google
android
enum4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/enum4.C
666
utf_8
e2c91a6a5a94779a1019ea75239364a6
// { dg-do assemble } // GROUPS passed enums // enum file enum Enum {enumerator1, enumerator2}; struct Struct { int i; int getI(Enum) {return i;} // { dg-message "Struct::getI|no known conversion" } }; int funct (Enum) { return 0; } int main() { Enum e = enumerator1; Struct s; int x = funct(e+1);// { d...
google
android
casts3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/casts3.C
320
utf_8
37d297edaf905e63dbdf9877939b5652
// { dg-do assemble } // { dg-options "-pedantic-errors" } // GROUPS passed casts // casts file // Subject: should emit diagnostic for `int *p = (void *)0;' // Date: Wed, 13 Oct 93 5:39:35 EST int *p = (void *)0;// { dg-error "" } .*
google
android
enum9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/enum9.C
943
utf_8
d44f6ee016eccdbe30300e87b97ce849
// { dg-do run } // { dg-options "-fshort-enums" } // On ARM EABI targets this testcase will cause a warning to be emitted // whilst EABI attributes are being merged at link time unless // the --no-enum-size-warning option is passed to the linker. Whilst the // enum-size attributes should only be emitted if there ar...
google
android
scope5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/scope5.C
584
utf_8
6cb4f5b7e9f7233b21e596a38ac08812
// { dg-do assemble } // GROUPS passed scoping // local-class file int main() { class foo { int i; } ; class bar { public: bar() { y = 0; } void f() { foo x; } private: ...
google
android
init14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/init14.C
446
utf_8
7c4b313b31666bebeda89f6c518a0fbe
// { dg-do run } // GROUPS passed initialization // init file // Subject: g++ Bug // Date: Mon, 13 Dec 93 18:27:51 +0900 #include <stdio.h> int X = 7; struct foo { int a,b,c; }; struct foo Ack = {5, X, 3}; int main() { if (Ack.a != 5 || Ack.b != 7 || Ack.c != 3) { printf ("FAIL\n"); return 1; } else...
google
android
temps6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/temps6.C
489
utf_8
d21b9d4454b6997df2c975e4e771432c
// { dg-do run } // GROUPS passed temps // Date: Tue, 22 Mar 94 12:46:28 +0100 // Subject: Bad code for pointer to member use as reference in g++ 2.5.8 #include <stdio.h> struct str { int i; } xxx = {0}; int& test(str *arg1, int str::*arg2) { return (arg1->*arg2); } int main() { test(&xxx, &str::i) = 5; if (xx...
google
android
init5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/init5.C
445
utf_8
487713cc015ab092a5e86139acb05d82
// { dg-do assemble } // { dg-options "-pedantic-errors" } // GROUPS passed initialization // init file extern int fred( int); class X { public : void f( int = fred( 0) ) ; // { dg-message "previous spec" } } ; void X::f( int x = fred( 0) ) { // { dg-error "default argument" } }
google
android
bad-error3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/bad-error3.C
501
utf_8
d577d8c55e685042d83bba698f01886b
// { dg-do assemble } // GROUPS passed bad-errors // bad-error file // Date: Sun, 31 Jul 1994 11:37:43 +1000 (EST) #include <stddef.h> void * operator new(size_t, int *); void * operator new(size_t, void *); int *x = 0; int foo(){ new (x) int *; new (&x) int *; new (x) int *; // This is identical to line 8 !!! return...
google
android
operators27
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators27.C
675
utf_8
9059d0f5dc8aee61276cb65932bd9983
// { dg-do run } // GROUPS passed operators // opr-new file int FLAG=0; #include <new> extern "C" int printf( const char *, ...); void * operator new(std::size_t, const std::nothrow_t&) throw() { FLAG=1; return 0; } class K { private: int i; public: K( int j) { i = j; } ...
google
android
unsorted1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/unsorted1.C
551
utf_8
7e48a824266024bbb564141961124a61
// { dg-do assemble } // { dg-options "-O" } // GROUPS passed unsorted // unsorted.2 file class A { public: virtual void func() = 0; }; class B : public A { public: void func() {} }; class C : private B { public: B::func; // { dg-warning "deprecated" } }; class D { C c; public: void func() ...
google
android
nest5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/nest5.C
401
utf_8
3a28e8608852c676107da2157b8bcf50
// { dg-do assemble } // GROUPS passed nest // nest file void foo() { class Wrapper { public: void F (void * Wrapperptr) { Wrapper * wrapptr = ( Wrapper *) Wrapperptr; } }; }
google
android
static-mem2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/static-mem2.C
317
utf_8
2de879b88276c759f845e28b9d9ab7a1
// { dg-do assemble } // GROUPS passed static-mem class desc; class a_desc { public: static desc the_desc; virtual desc *get_desc(); }; class desc : public a_desc { public: static desc the_desc; desc(int); desc *get_desc(); }; desc desc::the_desc(1); desc a_desc::the_desc(0);
google
android
arm3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arm3.C
412
utf_8
fa3fe87a524763ec485b4809b2b2e5f2
// { dg-do assemble } // GROUPS passed ARM-compliance // arm file // Subject: gcc bug // Date: Mon, 25 Jan 1993 20:39:19 -0500 class X { enum S { blue, pink }; int S; public: void f (enum S arg) ; }; void X::f (enum S arg) { S = arg; // g++ gives error on this line. }
google
android
visibility24
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility24.C
624
utf_8
37f88fd28433ac2b99509ff0256f5281
// { dg-do assemble } // GROUPS passed visibility // visibility file /* * private.cc */ extern "C" int printf (const char *, ...); template <class T> class A { public: void Fun() { printf( "Fun fun fun!\n" ); } // { dg-error "" } private }; template <class T> class B: private A<T> { }; class C { public: C(...
google
android
code-gen4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/code-gen4.C
533
utf_8
886f82bebaa2deb6160aeb372904ca7c
// { dg-do run } // GROUPS passed code-generation // code-gen file class A { public: char c; }; typedef char A::*PMA; PMA pmA = &A::c; A oA; extern "C" int printf( const char *, ...); int main() { oA.c = 'q'; if ( (oA .* pmA)) printf( "PASS\n"); else ...
google
android
visibility18
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility18.C
456
utf_8
e3495b47d8941198b10d0377144a4b7a
// { dg-do assemble } // GROUPS passed visibility // visibility file struct T1 { int i; }; struct T2 { int j; }; // { dg-error "" } private struct T3 : public T1, private T2 { } x; int main () { x.i = 1; x.j = 2; // error: x.j is private// { dg-error "" } .* return 0; }
google
android
missing1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/missing1.C
277
utf_8
9f60400f904c292745b6a579c3b0857c
// { dg-do assemble } // GROUPS passed missing // missing file // Subject: G++ does not allow parens around declarators. // Date: Thu, 9 Jul 92 19:59:51 PDT void foo() { long (bar)[5]; }
google
android
ctors14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors14.C
640
utf_8
0ba2fb7388850829ec3b09582a604416
// { dg-do assemble } // GROUPS passed constructors // ctor file // Subject: problems with default constructors // Date: Sat, 30 Jan 1993 18:03:32 -0800 class A0 { }; class A1 { public: A1(void) {} }; class A2 { A1 a; }; class B0 : public A0 { public: B0(void) {} B0(int) {} B0(char) : A0() {} ...
google
android
cvt12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt12.C
824
utf_8
f6b6504a942b7a3076ae456211b1217b
// { dg-do run } // GROUPS passed conversions // cvt file // Subject: conversion method never called // Date: Thu, 7 Jan 93 18:08:33 +0100 #include <stdio.h> class test { double d; int i; public: test(double dd,int ii) {d=dd; i=ii;} // constructor operator int&() {return i;} // define a conversio...
google
android
code-gen5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/code-gen5.C
4,115
utf_8
487411f4f4e244f536f57f235040951b
// { dg-do run } // GROUPS passed code-generation // code-gen file #include <cstdlib> #include <cstdio> #include <cassert> #include <fstream> #include <iostream> #include <cmath> #define ANSI_C typedef double VEC ; class Vector; class VectorInt { public: /* Nothing public!! Only Vector can use this class */ privat...
google
android
arg11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arg11.C
728
utf_8
f54044d834098c90b38bfebb76e0d656
// { dg-do assemble } // GROUPS passed arg-matching struct String { String(const char*); }; struct Ack { Ack(String); }; struct S { void method(Ack); }; // { dg-message "S::method|no known conversion" } referenced below void function(Ack); int foo(S *o) { // Neither call has a usable constructor for conversions of cha...
google
android
arm12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arm12.C
600
utf_8
39b5d67caa4d415cc767392982e5f975
// { dg-do assemble } // GROUPS passed ARM-compliance // arm file // Subject: Bad access control with private constructor and derivation // Date: Fri, 28 May 1993 12:39:57 -0400 (EDT) #include <iostream> class X { public: void f(); private: X(); }; class Y : public X { public: Y(); }; X::X() // { dg-error "is pr...