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
visibility19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility19.C
932
utf_8
6938f2fc6aa2411fa4c11e2e5fb89e8c
// { dg-do assemble } // GROUPS passed visibility // visibility file class B { protected: int i; // { dg-error "" } protected }; class D1 : public B { }; class D2 : public B { friend void fr(B*,D1*,D2*); void mem(B*,D1*); }; void fr(B* pb, D1* p1, D2* p2) { pb->i = 1; // illegal// { dg-error "" } .* ...
google
android
visibility12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility12.C
474
utf_8
38535a28fad7416aa9e05ecaf425f431
// { dg-do assemble } // GROUPS passed visibility // visibility file struct a { int aa; // { dg-error "" } private }; class b : private a { }; class c : public b { int xx(void) { return (aa); } // aa should be invisible// { dg-error "" } .* };
google
android
ctors16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors16.C
773
utf_8
7f2178002dceafebd3b7ea2554c8f683
// { dg-do run } // GROUPS passed constructors // ctor file // Subject: gcc 2.4.1 bug // Date: Wed, 2 Jun 1993 11:33:34 -0400 #include <stdio.h> #include <stdlib.h> #include <string.h> char stuff[50]; char *p = stuff; class A { public: A() { *p++ = 'A';} }; class B { public: B() { *p++ = 'B'; } }; class C : ...
google
android
operators10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators10.C
383
utf_8
b91033cea46793dace64923d9eb6d3e9
// { dg-do assemble } // GROUPS passed operators // opr-eq file // Subject: g++ bug // Date: Thu, 3 Jun 93 22:24:13 -0500 template <class T> struct Test { int data; Test& operator=(int i) { data = i; return *this; } }; int main() { Test<int> i, j; i = j; return 0; }
google
android
except3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/except3.C
850
utf_8
95575b4fe563c42cff645192dcef1092
// { dg-do assemble } // { dg-options "-fexceptions" } // GROUPS passed exceptions // except file // Subject: -fansi-exceptions bug // Date: Mon, 30 Nov 92 11:18:05 GMT extern "C" int printf(const char *, ...); class Vector { int* p; int sz; public: Vector(int s) { p = new int[sz=s]; } ~Vector() {del...
google
android
parsing7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/parsing7.C
448
utf_8
e2aca0bfecb1ac5bfe0d136b80c912d6
// { dg-do assemble } // GROUPS passed parsing // parsing folder int f1( int (**a1)() ); int f2( int (**a1)() ); int f3( int (**a1)( int a, int b ) ); int f4( int (**a1)( int a, int b ) );
google
android
init8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/init8.C
439
utf_8
f2c13e6cd29dd70b627fe2a9bbd29b74
// { dg-do assemble } // GROUPS passed initialization // init file const int ic = 1; void f(int& arg) // { dg-message "passing argument 1" } { if (arg) ; } const int& icr = ic; int main(void) { f(icr); // { dg-error "invalid initialization" } return 0; }
google
android
cvt2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt2.C
720
utf_8
15d1e6d8211f9560955e7b29645c20ea
// { dg-do run } // GROUPS passed conversions #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <fstream> class cvec { public: ~cvec(){ delete s; } cvec(const char*x) { s = new char[std::strlen(x)+1]; std::strcpy(s, x); } cvec(const cvec& c) { s = new char[std::strl...
google
android
enum6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/enum6.C
446
utf_8
2509a6d3dfafb6c8581c6d6baa1a2b55
// { dg-do assemble } // GROUPS passed enums // enum file enum Color { Red, Green, Blue }; struct S { Color c : 8; } s; void foo() { s.c = Red; // <== This statement produces the warning message. }
google
android
init13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/init13.C
364
utf_8
c3e54fbfdc7acd00564d8782151e53d6
// { dg-do run } // GROUPS passed initialization // init file // Subject: Page 289 of the ARM // Date: Mon, 28 Jun 93 10:34:37 +0200 struct T { int m; T( int g):m(g){} }; // T s1[2][2] = {1,2,3,4}; int main() { T s1[2][2] = {1,2,3,4}; return 0; }
google
android
casts2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/casts2.C
702
utf_8
5e96fdf64986b7604ef1cbfb2a62765f
// { dg-do assemble } // GROUPS passed casts class VObject; typedef int boolean; typedef boolean (VObject::*method)(); typedef boolean (VObject::*method0)(); typedef boolean (VObject::*method1)(long); #define methodOf(o,m) (method)(&o::m) class VObject { public: boolean perform(method ); boolean perf...
google
android
union3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/union3.C
322
utf_8
4a037a2b9ff9c90b575c035057cf4efa
// { dg-do assemble } // GROUPS passed unions // anon-union file static union { char* uC; private: int uI;// { dg-error "" } };
google
android
except2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/except2.C
328
utf_8
78fafdc2ce65c395103fb31e50e03979
// { dg-do assemble } // { dg-options "-fexceptions -g" } // GROUPS passed exceptions // except file // Subject: g++-2.3.1 gets fatal signal with -g and -fhandle-exceptions // Date: Fri, 6 Nov 92 14:30:33 +0100 int main() { return 0; }
google
android
access4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/access4.C
883
utf_8
290826314993d06808df06d917f52e38
// { dg-do assemble } // GROUPS passed access // (Message bugs/access:3) class ForceLeafSterile { // { dg-error "" } friend class Sterile; ForceLeafSterile() {} // { dg-error "" } }; class Sterile : private virtual ForceLeafSterile { public: Sterile() {} Sterile(const char* /*blah*/) {} }; class Il...
google
android
virtual1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/virtual1.C
527
utf_8
f06f47a235e63776d0557c606f366d12
// { dg-do assemble } // { dg-options "-Woverloaded-virtual" } // GROUPS passed virtual-warnings // copy file struct A { virtual ~A(void); }; struct B { friend class A; virtual void f(void); }; struct C : public A { ...
google
android
operators3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators3.C
463
utf_8
422bdebc048dd2cd33dc7f5239729aeb
// { dg-do assemble } // GROUPS passed operators // opr-pl file // Subject: Failure to use conversion operator. // Date: Tue, 1 Dec 92 15:11:18 EST class BUG1 { public: operator const char*() const { return myData; } const char* myData; }; void bug1() { BUG1 bug1; bug1.myData = "0123456789"; const char...
google
android
ctors19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors19.C
548
utf_8
a3655db48ce5aa14618d4b6b4c59c540
// { dg-do assemble } // GROUPS passed constructors // ctor file // Subject: Nested class constructor calling bug class X { public: class Y { public: Y(int i) : a(i) {} int a; }; static void f(Y y); }; void X::f(X::Y y) { } int main() { X::Y y = X::Y(1); // Tries to call c...
google
android
visibility2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility2.C
1,227
utf_8
3aedc5971e8aa2703881ee564d90b111
// { dg-do assemble } // GROUPS passed visibility #include <iostream> class base { //========== void base_priv(const char * n) { std::cout << "base_priv called from: " << n << "\n"; } protected: void base_prot(const char * n) { std::cout << "base_prot called from: " << n << "\n"; } public: v...
google
android
temps4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/temps4.C
621
utf_8
fdf9d9284c4d3e1cff1f2b9f62c243a2
// { dg-do run } // { dg-options "-felide-constructors" } // GROUPS passed temps // temps file // Subject: elide-constructors (aka return value optimization) // Date: Wed, 10 Nov 93 14:43:54 CST #include <stdio.h> #include <stdlib.h> class X { int i; public: X(); X(const X&); X(int); ~X(); }; int...
google
android
operators2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators2.C
312
utf_8
035b0ba4392f6cccd091604f2331e29d
// { dg-do assemble } // GROUPS passed operators // opr-conv file // Subject: gcc bug // Date: Mon, 25 Jan 1993 20:42:35 -0500 int main(void) { int i = int(); // g++ 2.3.3 cannot compile it. return 0; }
google
android
init10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/init10.C
441
utf_8
c33c89be27ac5f2efdfcd9e1a03b88df
// { dg-do assemble } // GROUPS passed initialization // init file class b; class a { public: a(const b*); // needs this parameter }; class b { private: a three[3]; public: b(); }; b::b() : three(this) // { dg-error "array" } { }
google
android
init11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/init11.C
441
utf_8
3950c430bd280f39e8049a1f539a5785
// { dg-do run } // GROUPS passed initialization // init file #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 ("PASS\n"); else { printf ("FAIL\n"); return 1; } }
google
android
cvt16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt16.C
491
utf_8
8aa22627fdc9a22b8eef20f4fdcb3a12
// { dg-do assemble } // GROUPS passed conversions // cvt file // Subject: g++ bug // Date: Mon, 12 Apr 93 10:47:01 MDT #include <iostream> class B { }; class A : public B { short s; public: A(short _s = 0) { s = _s; } operator const short &() const { return s; } }; int main() { A a(37); //cout << a ...
google
android
static-mem4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/static-mem4.C
186
utf_8
d360b646180a1bddcb974249a70738e5
// { dg-do assemble } // GROUPS passed static-mem struct test { void test_member() { static test& ds = *this; // FIX: static test* ds = this; } }; int main() { test t; }
google
android
ctors8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors8.C
474
utf_8
1c153aca2432c068fe35c65ebd6b24b9
// { dg-do run } // GROUPS passed constructors // ctor file // Subject: gcc 2.3.1 global ctor bug ? // Date: Tue, 15 Dec 92 22:09:37 PST #include <stdio.h> struct foo { foo() : index(-1) {} int index; }; foo *arr = new foo[2]; int main() { if (arr[0].index == -1 && arr[1].index == -1) printf ("PA...
google
android
arm16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arm16.C
387
utf_8
057e61f135edc44d894404532230c505
// { dg-do assemble } // { dg-options "-ansi -Wall -pedantic" } // GROUPS passed ARM-compliance // arm file struct C { void foo(); }; void (C::*pfm)() = C::foo;// { dg-error "" } .*
google
android
operators29
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators29.C
484
utf_8
f91c5a2f03f5949157b6ef9b260ea969
// { dg-do assemble } // GROUPS passed operators // (Message bugs/opr-del:4) template<class T> class Ptr { public: Ptr(T*); operator T*(); }; int main() { Ptr<int> ip = new int(2); delete ip; operator delete(ip); return 0; }
google
android
visibility17
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility17.C
1,141
utf_8
5ba0516b7ceca15dab4eff4a92799239
// { dg-do assemble } // GROUPS passed visibility // visibility file #include <iostream> #include <cstring> class Base { public: char* getName() {return name_;} private: Base(); Base(char* str); char* name_; }; class Derived : public Base { public: Derived(int n, char* str); Derived(int n); int getNum() ...
google
android
inline4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/inline4.C
426
utf_8
d621cc9a35c3180103ded4695025f3cb
// { dg-do run } // GROUPS passed inlining // inline file // Subject: gcc-2.4.2 template function bug (1) // Date: Wed, 2 Jun 93 10:23:14 +0200 extern "C" int printf (const char *, ...); template <class T> inline T func(const T& x) { return x; } inline int func(const int& x) { return x; } int main() { int x; func(...
google
android
arg6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arg6.C
506
utf_8
f28b31a8801c7e65bbdbcc76c8f2ee8f
// { dg-do assemble } // GROUPS passed arg-matching // arg-matching file // Subject: overloaded function bug // Date: Mon, 3 May 93 19:10:10 EDT typedef int (*fnp)(int, void*); void dispatch_insert(int, int, fnp, void* = 0); void dispatch_insert(int, int, long*, char*); typedef void (*InsertFunP)(int, ...
google
android
ctors11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors11.C
553
utf_8
deab2b5f9ee4ce9dfcefc24f6cbbb010
// { dg-do assemble } // GROUPS passed constructors // ctor file // Date: Mon, 8 Feb 93 08:31:39 PST extern "C" int printf (const char *, ...); class A{ public: inline A(int x){printf("constructing A with %d\n", x);} }; class B:public A{ // { dg-message "note" } non-default constructor private: public: }; int main()...
google
android
temps3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/temps3.C
516
utf_8
44205740268580d94274eae346c01cbf
// { dg-do run } // GROUPS passed temps // temps file // Subject: g++ 2.4.5 does not destroy temporaries // Date: Mon, 23 Aug 93 17:35:34 +0200 #include <stdio.h> class A { public: int a; A (int i) : a (i) { ;} A (const A& aa) : a (aa.a) { ;} ~A () { printf ("PASS\n");; } }; A foo () { ...
google
android
bit-fields1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/bit-fields1.C
98
utf_8
cc941aafb35ee4370727338c862b89a3
// { dg-do assemble } // GROUPS passed bit-fields typedef int A; struct B { int A : 2; } ;
google
android
operators32
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators32.C
979
utf_8
c4789e17d02e5d86387e80d818889ddf
// { dg-do assemble } // GROUPS passed operators #include <iostream> // // ffrees space allocated for N-D array // template <class T> void ffree(long rows, T** array) { for( long i = 0; i < rows; i++ ) delete [] array[i]; // delete row delete [] array; // delete outer array...
google
android
visibility1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility1.C
1,228
utf_8
de29ab2e92616aa500d00dccc5c13384
// { dg-do assemble } // GROUPS passed visibility #include <iostream> class base { //========== void base_priv(const char * n) { std::cout << "base_priv called from: " << n << "\n"; } protected: void base_prot(const char * n) { std::cout << "base_prot called from: " << n << "\n"; } public: v...
google
android
ctors9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors9.C
815
utf_8
3bd2f761d9ce772d2cf080ca9c5c487c
// { dg-do assemble } // { dg-options "-pedantic-errors" } // GROUPS passed constructors // ctors file // Subject: 2.3.3: accepts ctor-less derived class of ctor-ful base class // Date: Wed, 13 Jan 93 14:30:21 CST // Note: It gives an error now. But not a very good one. struct Foo { Foo(int aa); int a; const Fo...
google
android
visibility21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility21.C
437
utf_8
78bc191294f6f93cfea3d6813fcb41f2
// { dg-do assemble } // GROUPS passed visibility // visibility file class A { protected: void foo(); // { dg-error "" } protected }; class B : public A { void bar(A &a) { a.foo(); }// { dg-error "" } .* };
google
android
scope4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/scope4.C
421
utf_8
973ba91fa12691d7e643d2a9ca540fe9
// { dg-do assemble } // GROUPS passed scoping // local-class file void f() { class foo { int x; public: foo() : x(1) {} int bar() { foo p; return p.x; } }; }
google
android
shadow2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/shadow2.C
518
utf_8
06c6cf9d29ec0281a2d29a1bffcce839
// { dg-do assemble } // { dg-options "-Wshadow" } // GROUPS passed shadow-warnings // (Message bugs/shadow:2) class X { int count; public: X() {} // necessary to produce the `count' warning }; template <class T> class Y { T t; public: int f (int count) { return (count); } }; main () { Y<char> y; }
google
android
parsing6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/parsing6.C
375
utf_8
1211d898222e0ecc0193f8e5f6ca4d9d
// { dg-do assemble } // GROUPS passed parsing // parsing folder typedef int (*cow[3])(...); int main() { cow fs; int (*pig[3])(...); // line 5 }
google
android
operators12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators12.C
416
utf_8
84a049468c8e1f578316b778e2a4a269
// { dg-do assemble } // GROUPS passed operators // opr-eq file // Subject: g++ 2.5.3 can't disable assignment // Date: Thu, 18 Nov 1993 11:18:18 -0500 class B { B &operator = (const B &); //Disable assignment! public: virtual ~B () {} }; class D: public B { public: D () {} };
google
android
enum7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/enum7.C
327
utf_8
a148f19373f2b475268eafbb0a19cd4c
// { dg-do assemble } // GROUPS passed enums // friends file class X { enum E { A, B }; static enum E e; }; enum X::E X::e = A;
google
android
vtable3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/vtable3.C
452
utf_8
2ce54c476e19764bdebe4ac6fc7d64f7
// { dg-do run } // GROUPS passed vtable // vtable file extern "C" int printf (const char *, ...); struct A { }; struct B : virtual A { public: int b; }; int main() { B blist[10]; printf ("PASS\n"); }
google
android
except5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/except5.C
832
utf_8
8d6be9ca065c2ea51a648e772196fb09
// { dg-do assemble } // { dg-options "-fexceptions" } // GROUPS passed exceptions // except file // Subject: exception's bug? // Date: Wed, 10 Nov 1993 11:07:12 -0500 #include <iostream> class X { int *a; int sz; public: class range { }; // exception class X(int s) { a=n...
google
android
union2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/union2.C
500
utf_8
280fb2e960055cf59d3bbb76de3ddea7
// { dg-do assemble } // GROUPS passed unions // anon-union file class A { public: int x; private: int y; // { dg-error "" } private union { int z; // { dg-error "" } private }; }; void f() { A a; a.x = 0; a.y = 1;// { dg-error "" } .* a.z = 2;// { dg-error "" } }
google
android
patches1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/patches1.C
546
utf_8
db70425749f0bcf360ec8a3d2c5bdb73
// { dg-do assemble } // GROUPS passed patches // patches file int type(float) { return 1; } int type(double) { return 2; } int type(long double) { return 3; } extern "C" int printf( const char *, ...); int main() { int i = 0; if (type(0.0) != 2) ++i; if (i > 0) { printf ("F...
google
android
arg1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arg1.C
880
utf_8
f5347d8fcd12c0f50694617d7134e656
// { dg-do assemble } // GROUPS passed arg-matching // arg-matching file // Subject: argument matching depending on the def order // Date: Fri, 04 Sep 92 17:41:05 JST #include <iostream> // check the order of declarations class A { public: void f(double* p) { std::cout << "A(double*)\n"; } // { dg-message "note...
google
android
friend4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/friend4.C
386
utf_8
01820d5f43051fc079e1496a888f6b61
// { dg-do assemble } // GROUPS passed friends // friends file class T2; class T { friend void f (int&); }; class T2 { friend void f (int& i) { // BOGUS - i = 1; } };
google
android
except1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/except1.C
494
utf_8
fa91781a296ec68a2631735b5a3d93e8
// { dg-do assemble } // { dg-options "-fexceptions" } // GROUPS passed exceptions // except file // Subject: Bugs // Date: Wed, 22 Jul 92 08:29:30 EDT extern "C" void puts(const char *); class foo { public: class error {}; void cause_error(void) { throw error(); } }; int main(void) { foo f; try { f.cause_...
google
android
operators16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators16.C
565
utf_8
a2ad1fc1ffe77ce7c03c4bd15ba450ad
// { dg-do run } // GROUPS passed operators // copy file #include <stdio.h> int pass = 0; struct A { A(void) {} A(const A& a) { ; } A& operator = (const A& a) { pass = 1; return *this; } }; struct B { B(const A& aa) { B::a = aa; } A a; }; int main(void) { B b = A(); if ...
google
android
cvt6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt6.C
469
utf_8
ff6b0fa6a62a37fa613449af33cbdea8
// { dg-do assemble } // GROUPS passed conversions // cvt file // Subject: gcc (g++) 2.2.2 constructing nested class from external scope // Date: Wed, 26 Aug 92 14:51:17 -0400 class foo { class bar { int i; public: bar(int j) { i = j; } }; bar b; public: foo() : b(3) {} void test(bar lb) { b = lb; ...
google
android
enum2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/enum2.C
837
utf_8
0b36efa7a7b15f38033bb5cd75fa3a99
// { dg-do assemble } // { dg-options "-fshort-enums" } // GROUPS passed enums // enum file typedef unsigned long __fmtflags; class ios { public: typedef __fmtflags fmtflags; enum { skipws=01, left=02, right=04, internal=010, dec=020, oct=040, hex=0100, showbase=0200, showpoint=0400, up...
google
android
copy2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/copy2.C
583
utf_8
29d3471a87868e8920c62fa56566e9ee
// { dg-do assemble } // GROUPS passed copy-ctors // copy file class String { private: char a[100]; int len; public: String(); }; String::String() { len = 0; } struct List { String item[100]; int num_items; // List(); // uncomment this line to let compile work }; int ma...
google
android
typeck4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/typeck4.C
261
utf_8
7fabb065dd8c5691fcfa9a14987f3d8a
// { dg-do assemble } // GROUPS passed typeck class A { public: const int &operator[]( int i ); private: int k; }; const int& A::operator[]( int i ) { return k; } void ff( A &anA ) { int &ani = anA[0];// { dg-error "" } ani = 7; }
google
android
visibility6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility6.C
504
utf_8
7e90928363971d529814c3222a33b5ee
// { dg-do assemble } // GROUPS passed visibility // visibility file class Top { public: Top() {} void val() {} // { dg-error "" } private base class }; class Derived : private Top { public: Derived() {} }; class Unrelated { Derived derived; public: void oops() { derived.val(); }// { dg-error "" ...
google
android
operators17
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators17.C
350
utf_8
383d1f9e7a38d4fee3871e8dae108b89
// { dg-do assemble } // { dg-options "-Wall -pedantic-errors" } // GROUPS passed operators // copy file struct A { A& operator = (const A& a) {}// { dg-warning "" } };
google
android
cvt20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt20.C
406
utf_8
83e8e63e530368a4ce42def5d428e364
// { dg-do assemble } // GROUPS passed conversions // cvt file // Subject: g++ won't convert char[] to char*& // Date: Thu, 15 Jul 93 18:50:59 EDT // Compiles fine with Sun CC 2.1 void f(char *& x) // { dg-message "passing argument" } { x++; } int main() { f ("foo"); // { dg-error "invalid initialization" } }
google
android
typeck3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/typeck3.C
469
utf_8
fb72e0d2fea16c73ec4fddda21e15df1
// { dg-do assemble } // GROUPS passed typeck // typeck file class a { public: typedef void (X)(); X x; // Member function of type X }; class b { public: typedef void (X)(); //!!!!!! g++ says : syntax error before `;' X x; // Member function of type X };
google
android
access5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/access5.C
600
utf_8
e09bec31492e7b564db9fc9c4c486f41
// { dg-do assemble } // GROUPS passed access // access file class enclose { public: class nested_public { int x; }; protected: class nested_protected { int x; }; private: class nested_private { int x; }; // { dg-error "" } private }; class derived : public enclose { nested_public obj1; // ok nested_prot...
google
android
init9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/init9.C
906
utf_8
f2e0e66a77f891c7ed59feea320b4691
// { dg-do run } // GROUPS passed initialization // init file extern "C" int printf (const char *, ...); class samp { int a; public: samp(int n) { a = n; } int get_a() { return a; } }; int main() { samp ob[4] [2] = { // Generated Error 1, 2, 3, 4, ...
google
android
visibility7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility7.C
1,584
utf_8
d8a41454edc8533e369074294d53c672
// { dg-do assemble } // GROUPS passed visibility // visibility file #include <iostream> class A { private: int number; public: A(int i) : number(i) {} virtual ~A() {} virtual void Number(int c) // { dg-error "inaccessible" } { number = c; } virtual int Number() // { dg-error "inaccessible" } ...
google
android
except4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/except4.C
517
utf_8
9f5fd5a9c0d286a6da07b43ffdab9523
// { dg-do assemble } // { dg-options "-fexceptions" } // GROUPS passed exceptions // except file // Subject: exceptions broken // Date: Wed, 7 Jul 1993 16:56:52 +0200 (MET DST) class ball { public: int dummy; ball() : dummy(0) { ; } }; void pitcher() { throw ball(); } void catcher() { try // <=== gcc 2.* fails he...
google
android
operators24
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/operators24.C
450
utf_8
16fb9bff7ed958acd387f399137ff50b
// { dg-do assemble } // GROUPS passed operators // opr-new file #include <stddef.h> struct Link { void* operator new(size_t, int); friend void* __builtin_new(size_t); // This declaration triggers the bug }; void f() { new(2) Link; }
google
android
profile1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/profile1.C
255
utf_8
a2cd340fc2f6f04051d7c42da2aedcd9
// { dg-do run } // { dg-require-profiling "-pg" } // { dg-options "-pg" } // { dg-options "-pg -static" { target hppa*-*-hpux* } } // GROUPS passed profiling #include <stdio.h> main() { printf ("PASS\n"); } /* { dg-final { cleanup-profile-file } } */
google
android
arm4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/arm4.C
496
utf_8
52ad024cb6dcdc4df071c7097fb83ca8
// { dg-do run } // GROUPS passed ARM-compliance // arm file // Subject: g++ bug // Date: Wed, 27 Jan 1993 16:39:10 -0500 extern "C" int printf(const char*,...); int count = 0; struct S { int i; S(int b) { i = b; count++; } }; int main(void) { double a = 2.0; S x(int (a)); if (count > 0) { p...
google
android
bad-error4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/bad-error4.C
263
utf_8
934b6723375a87f52becce540f07892b
// { dg-do assemble } // GROUPS passed bad-errors #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 1; }
google
android
nest4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/nest4.C
405
utf_8
5c6b35283eff7477cf49c096a29df5f4
// { dg-do assemble } // GROUPS passed nest // nest file void f() { static int s; struct local { int j() { return s; } // should be okay, see 1991 ref. man. r.9.8 }; } int main() { }
google
android
visibility8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility8.C
438
utf_8
ebcad15f2df16a055754c0803b28e6c6
// { dg-do assemble } // GROUPS passed visibility // visibility file class t1 { protected: int a; // { dg-error "" } protected }; class t2 : private t1 { public: int b; }; class t3 : public t2 { public: int ttt(); }; int t3::ttt() { return a; }// { dg-error "" } .*
google
android
ctors1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/ctors1.C
342
utf_8
ddd94f6a966c58c0d4cb276a337f304f
// { dg-do assemble } // GROUPS passed constructors // ctor file class POOL { public: POOL(); }; struct VAL_LIST { POOL pool[2]; }; VAL_LIST baz;
google
android
cvt11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt11.C
797
utf_8
53722df5bc5651a362cb45fdd38a8937
// { dg-do assemble } // GROUPS passed conversions // cvt file // Date: Tue, 10 Nov 92 11:08:08 PST // Subject: type cast of qualified const member breaks g++2.3.1 // Ignore extra errors in C++0x mode. // { dg-prune-output "non-static data member initializers" } // { dg-prune-output "from this location" } // { dg-prun...
google
android
using1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/using1.C
66
utf_8
718e0c469228e45d5db2aa2abf67d121
// { dg-do assemble } using namespace bb; // { dg-error "" } .*
google
android
template5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/template5.C
421
utf_8
442e49475c9a00e4cbed4344561a2788
// { dg-do run } //Check whether namespace-scoped template instantiations //are mangled differently. namespace X{ template<class T> struct Y{ int f(T){ return 1; } template<class X>void g(){} }; } template<class T> struct Y{ int f(T){ return 2; } }; int main() { X::Y<int> z; if (z.f(...
google
android
template12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/template12.C
355
utf_8
09d89e1d6a0ce7924dfddbbec1198053
// { dg-do assemble } // Templates can be defined outside of the namespace if the have been declared // inside namespace bar { template <typename T> T const foo(T const &); template<> const int foo<int>(int const &); } template <typename T> T const bar::foo(T const &a) { return a; } template<> const int bar:...
google
android
overload3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/overload3.C
130
utf_8
58c2533d4f809584c8591b980dec0b8d
// { dg-do assemble } namespace A{ void f(); } using A::f; namespace A{ void f(int); } using A::f; void g() { f(4); }
google
android
koenig9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/koenig9.C
355
utf_8
9c23ab644eb72efd56640189e842d9d5
// { dg-do assemble } int count (int); void *count (char *, char); void foo(const char*,...); inline void bar() { foo("",count); // { dg-error "overloaded function" "multiple overloaded functions" } }
google
android
ns6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/ns6.C
141
utf_8
432dfa0f46a8ab12692ae5c7f0f85499
// { dg-do run } namespace A{ int i; namespace B{ void f(){i++;} int i; void g(){i++;} } } int main() { return A::i-A::B::i; }
google
android
using11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/using11.C
131
utf_8
1fcf3b1e575d6ca566f2fd977f19bcc1
// { dg-do assemble } class joey { public: typedef int SVec; }; using joey::SVec; // { dg-error "" } joey is not a namespace
google
android
crash1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/crash1.C
150
utf_8
f4e9ca642ad2357663c99460eb9dc63d
// { dg-do assemble } template <class T> struct S1 {}; namespace N { } struct S2 { typedef N::S1<int> S2_T; // { dg-error "" } parse error };
google
android
alias4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/alias4.C
363
utf_8
2158ca3707e479c6776df30a2ef438f1
// { dg-do assemble } namespace A = B; // { dg-error "" } unknown namespace namespace C{} namespace D = C; namespace D { // { dg-error "" } reopening namespace with alias void f(); } void C::f(){} // { dg-message "" } previous definition void D::f(){} // { dg-error "" } redefinition namespace E = ...
google
android
lookup4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/lookup4.C
276
utf_8
42d07132c8589b594e5fe06abcf87a15
// { dg-do assemble } namespace X{ typedef int foo; const int bar=2; namespace Y{ void f(foo); extern int g; extern int g1; struct h{ void i(foo); }; } } void X::Y::f(foo) { } int X::Y::g = bar; int X::Y::g1(bar); void X::Y::h::i(foo) {}
google
android
using13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/using13.C
258
utf_8
83100bb2e5d0f0acdd78e8e5e8d2db9c
// { dg-do run } namespace A{ void foo(int){} } namespace B{ void foo(bool){} } void bar() { using B::foo; using A::foo; foo(true); } namespace Foo { template<class N> void Hello(N) {} } int main() { using Foo::Hello; Hello(4); bar(); }
google
android
ns3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/ns3.C
192
utf_8
3ae50688828246dd500f69a0de29fbb3
// { dg-do assemble } namespace foo{ void eine_funktion(int) {} } using namespace foo; namespace foo{ void eine_funktion(int,int) {} } void andere_funktion() { eine_funktion(3,4); }
google
android
friend2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/friend2.C
105
utf_8
a1cd086b33bc3d6ba70f12f6067be3ef
// { dg-do assemble } namespace A{ void foo(); } namespace B{ class B{ friend void A::foo(); }; }
google
android
invalid1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/invalid1.C
243
utf_8
89941597be39f2078ede1d0b9fc6f061
// { dg-do assemble } namespace x { } void f(int); int main() { x(); // { dg-error "" } calling a namespace x=4; // { dg-error "" } assigning to a namespace f(x); // { dg-error "" } passing a namespace as parameter }
google
android
template7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/template7.C
224
utf_8
1c6ee0a1bb618267fbe665d645884e8e
// { dg-do assemble } namespace foo { template<class F> struct bar {}; } void baz() { foo::bar(); // { dg-error "" } template used as expression }
google
android
template15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/template15.C
152
utf_8
fb7efad85b5d9c15dafe0c0fe014f92e
// { dg-do assemble } namespace X { template <class T> void f () {} } template void X::f<int> ();
google
android
overload2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/overload2.C
287
utf_8
7f30601e8edbcf1620259b3bfea12bfb
// { dg-do assemble } namespace A{ void f(); // { dg-message "note" } } using namespace A; void f(); // { dg-message "note" } void g() { f(); // { dg-error "ambiguous" } ambiguous, ::f or A::f ? // { dg-message "candidate" "candidate note" { target *-*-* } 12 } }
google
android
template17
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/template17.C
672
utf_8
1871d9ecaab279ca652b002d80dd7f59
// { dg-do assemble } // // Bug 2258. We failed to implement using directives inside template // functions. This makes us regress now that ::std is real. namespace thing { template <typename T> T end2 (T); } namespace whatever { } template <typename T> void fn (T, T (*)(T)); namespace whatever { template <typena...
google
android
koenig6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/koenig6.C
126
utf_8
e1c5a7e2ac7cf4243e2819e9e428db16
// { dg-do assemble } namespace A{ struct X{}; X* foo(X a); void bar(X*){} } int main() { A::X x; bar(foo(x)); }
google
android
using5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/using5.C
125
utf_8
153674baa1aaa794e45086f74ebc1719
// { dg-do assemble } namespace a { class b { using std::c; //{ dg-error "" } namespace using on class level }; }
google
android
ns4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/ns4.C
112
utf_8
9c96b7a7d9f5e6c5f75e3e7ec55f16ed
// { dg-do assemble } namespace A{ enum foo{a,b,c}; } using A::foo; using A::b; void g() { foo x; x=b; }
google
android
using7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/using7.C
98
utf_8
ea73badcef0f5166a559e07a0c263a92
// { dg-do run } namespace X{ void f(int){} } void f(); int main() { using X::f; f(3); }
google
android
undef1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/undef1.C
97
utf_8
74672b3a85e5f203e098165b872316ad
// { dg-do assemble } namespace A{ } struct Y: A::S<int>{}; //{ dg-error "" } no such type
google
android
template2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/template2.C
189
utf_8
73d49c61290b79275cc9f49efdafcaff
// { dg-do assemble } //Inheritance from templates which are namespace members namespace foo { template <class T> struct x { x(){} }; } class y : public foo::x<int> {}; y r;
google
android
ns12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/ns12.C
208
utf_8
eb31b0947da8881be39e7a024d7a729f
// { dg-do run } namespace fred { int barney(); extern int wilma; } int fred::barney() { return fred::wilma; } int fred::wilma; int barney() { return 1; } int main() { return fred::barney(); }
google
android
template11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/template11.C
171
utf_8
6cb7cc1d655ff7d02bf6b115d27c2f20
// { dg-do run } void foo(){} namespace Bar{ template<class X> class Y{ friend void foo(Y<X>){} }; } int main() { Bar::Y<int> y; foo(y); foo(); }
google
android
koenig3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/koenig3.C
304
utf_8
266341d48a47c15170ec783c99d32be1
// { dg-do run } //Check association of member pointer in overload resolution. struct A { int m_val; friend int operator ->* (A & other, int A::*pm) { return 31; } }; int A::*pi = & A::m_val; int main(void) { A c; c.m_val = 42; int j = c ->* pi; if (j == 31) return 0; else return 1; }
google
android
ns10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/ns10.C
163
utf_8
fc6a7e08ed0cee9d6e593a2555659ac0
// { dg-do assemble } namespace bb { int f(int); namespace k { void foo(int bar) { int i=bb:f(bar); // { dg-error "" } namespace } } }
google
android
template1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/template1.C
94
utf_8
039d19c86cd107b1fdcec33f4214e0e4
// { dg-do assemble } namespace foo { template <class T> class x {}; } foo::x<int> y;
google
android
ns11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ns/ns11.C
408
utf_8
2cc8051257e4a7c74517c2aae0adb968
// { dg-do assemble } // Build don't link // Check [namespace.memdef]/2 namespace A{ void f(int); void f(int,int); int i; // { dg-message "" } .* } void A::f(){} // { dg-error "" } should have been declared before namespace B{ void A::f(int){} // { dg-error "" } B does not surround A...