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
nest21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/nest21.C
2,032
utf_8
693ba8ff2344c35725152e19ccf93570
// { dg-do run } // GROUPS passed nested-classes #include <iostream> #include <cstdio> #include <cstring> static char output[1024]; class BDDRetrace { public: class Dump { public: virtual Dump& operator<<(char c) = 0; virtual Dump& operator<<(int i) = 0; virtual Dump& operator<<(double r) = 0; }; ...
google
android
groff1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/groff1.C
593
utf_8
c42688562e8873f0b3d710da92fd0eea
// { dg-do run } // GROUPS passed groff /* This should compile properly with the new overloading scheme. */ extern "C" int printf (const char *, ...); extern "C" void exit (int); int win = 0; class symbol { public: symbol(const char *p, int how = 0) {} symbol() {} }; class dictionary { public: void lookup(s...
google
android
crash17
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash17.C
727
utf_8
bde6a8384e3bb59092d0c83de1fed4cf
// { dg-do assemble } // GROUPS passed old-abort // // This one creates // // gcc2: Internal compiler error: program cc1plus got fatal signal 11 // // when compiled with g++. // The error goes away, if // 1) int ClassInvariant() is not virtual or // 2) GnObject has a virtual destructor or // 3) GnWidget has no virtual...
google
android
template18
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/template18.C
166
utf_8
516a1d806d3a459e5cadd6571789ec0f
// { dg-do assemble } // GROUPS passed templates template<class T> class X; typedef X<int> IX; template<class T> class X { public: T x; }; struct A { IX c; };
google
android
ptrmem2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/ptrmem2.C
531
utf_8
7a7306f6328f57ef001c6f5ba4e22fa9
// { dg-do assemble } // GROUPS passed pointers-to-members struct C { struct N { int g1(int); int g2(int); }; typedef int (N::*pmfn)(int); int f1(int); int f2(int); }; int (C::*f)(int) = &C::f1; /* The compiler should not crash on the line below; this change fixes it: * cp-tree.c (...
google
android
crash2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash2.C
168
utf_8
3f31ad7a3d6312a1259fb61edfad7bec
// { dg-do assemble } // GROUPS passed old-abort // The compiler used to crash on this example. class x { public: x(); static const x y[23]; }; const x x::y[23];
google
android
reference1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/reference1.C
1,031
utf_8
23996b9ea050e80e407e5267be28b395
// { dg-do run } // { dg-options "-w" } // GROUPS passed references // Check that if a reference is initialized to refer to a value // which is returned from a function call, the actual call to // the function is only invoked for the original initialization // of the reference, and not for each subsequent use of the /...
google
android
crash14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash14.C
300
utf_8
4b3db8cbbfa7bf87638bbbff3162da29
// { dg-do assemble } // GROUPS passed old-abort extern "C" int printf (const char *, ...); class cl { int i; public: cl(int j = 0) {i = j;} int get_i() {return i;} }; int main() { cl ob[3] = {1, 2, 3}; int i; for(i=0; i<3; i++) printf("%d\n", ob[i].get_i()); return 0; }
google
android
cvt5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/cvt5.C
416
utf_8
9ac640694efd20305253ea1d2a2742e3
// { dg-do assemble } // GROUPS passed conversions typedef unsigned long Array[3]; void sample(const unsigned long (&an_array)[3]); class Sample { public: void simple(const Array &an_array); static void sample(const Array &an_array); }; class A { public: Array array; }; Sample s; void simple(c...
google
android
crash5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash5.C
1,652
utf_8
318cf0dc34fa93fdba1f0e7691d777a5
// { dg-do assemble } // GROUPS passed old-abort // Should have been fixed by: // // // * cp-cvt.c (build_default_binary_type_conversion): Look deeper into // what ARG1 and ARG2 are if they're POINTER_TYPEs. class CountableSet { public: virtual ~CountableSet() { } }; template<class T> class FixedSet : virtual...
google
android
friend1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/friend1.C
149
utf_8
88f54cb5637017d0140fbe47b4d64a12
// { dg-do assemble } // GROUPS passed friends class A { private: A () {} friend struct B; }; class B { public: A a; }; B b; int main () {}
google
android
crash49
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash49.C
307
utf_8
efe4265b25ae54dbf04cfbbd033499c1
// { dg-do assemble } // GROUPS passed old-abort #include<iostream> const int keys = 10; const int key[keys] = {6, key[1], 2, keys, 1, 7, 6, key[2], key[8]}; void main() // { dg-error "must return .int" } { for(int i = 0; i < keys;) std::cout << key[i++] << " "; std::endl(std::cout); }
google
android
visibility3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/visibility3.C
694
utf_8
8e9ce7664c7ead346fec4fdcd7af9171
// { dg-do assemble } // GROUPS passed visibility // Used to say: // manip.cc:17: member `_f' is a private member of class `B<int>' // manip.cc:17: member `_a' is a private member of class `B<int>' class A {}; template <class TP> class B; template <class TP> inline A & operator<< (A &o, const B<TP> &m); template <...
google
android
crash11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash11.C
661
utf_8
92eff1245a05c05e1cc8bebcf1a3e004
// { dg-do assemble } // GROUPS passed old-abort extern "C" int printf (const char *, ...); class A { int i; // { dg-error "" } private int j; // { dg-error "" } private public: int h; A() { i=10; j=20; } virtual void f1() { printf("i=%d j=%d\n",i,j); } friend virtual void f2() { printf("i=%d ...
google
android
nest12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/nest12.C
272
utf_8
5253d8a4d833c5ccc220537fa9f1708a
// { dg-do assemble } // GROUPS passed nested-classes struct enclose { class nested; nested *nptr; class nested { int x; }; void f(); }; void enclose::f() { nptr = new enclose::nested; } void g() { enclose obj; obj.nptr = new enclose::nested; }
google
android
ptolemy2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/ptolemy2.C
1,346
utf_8
cd6b194c7bc5cf94285bc6cd0a157e70
// { dg-do run } // GROUPS passed ptolemy-bugs #include <iostream> class PTcl { public: int dispatcher(int which,int argc,char** argv); // fns in the table int one(int argc, char** argv); int two(int argc, char** argv); int three(int argc, char** argv); }; // An InterpFuncP is a pointer to an PTcl function that...
google
android
code-gen2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/code-gen2.C
395
utf_8
616f98f70864801a5abf83247a575d07
// { dg-do run } // GROUPS passed code-generation // Check that declarations with initializations are executed // correctly. extern "C" int printf (const char *, ...); int main () { char buff[40] ; char *tmp = &buff[0]; // also fails for char *tmp = buff; if ((__SIZE_TYPE__) tmp != (__SIZE_TYPE__) &buff[0]) ...
google
android
crash42
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash42.C
154
utf_8
2d7cfb743785f8fc1fc93f89beb2a2b2
// { dg-do assemble } // GROUPS passed old-abort int fn();// { dg-message "" } ambiguates.* int x; int& fn() {// { dg-error "" } new decl.* return x;}
google
android
nest1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/nest1.C
223
utf_8
27ac9d4963f9e102d02f8bb391da9212
// { dg-do assemble } // GROUPS passed nested-classes int x; class enclose { public: int x; // { dg-error "non-static" } class inner { public: void f (int i) { x = i;// { dg-error "" } .* } }; };
google
android
nest24
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/nest24.C
138
utf_8
cd228511a48f71249c67e69f03d3d6fc
// { dg-do assemble } // GROUPS passed nested-classes struct A { A (){} }; void foo () { struct B {}; struct S : B { A a; }; }
google
android
crash63
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash63.C
271
utf_8
8462660e0dcc8cf556a7aa282d31fac0
// { dg-do assemble } // GROUPS passed old-abort class String { public: String (const char *str); String (const String&); }; class UnitList { public: UnitList (...); }; UnitList unit_list (String("keV")); // { dg-error "" } cannot pass non-pod
google
android
nest22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/nest22.C
153
utf_8
ba9215faa6624ffed1978907c5ea0d15
// { dg-do assemble } // GROUPS passed nested-classes class foo { public: typedef int bar; foo::bar fb; // this line causes a syntax error! };
google
android
template6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/template6.C
275
utf_8
414d59c74cbc5fb2ce7f12c2f6af33a2
// { dg-do assemble } // GROUPS passed templates struct B { }; struct X : B { ~X (); }; struct Request { X s; }; template <class ET> class TC { ET data; }; struct TMem { ~TMem() {} TC<Request> *req; }; struct FIO { void init (); FIO () { init(); } };
google
android
err-msg6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/err-msg6.C
158
utf_8
00afba961ae25414c47ec5c93e6b54e1
// { dg-do assemble } // GROUPS passed error-messages class foo { public: ~bar () {}// { dg-error "" } destructor `bar' must match class name `foo'.* };
google
android
prepost1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/prepost1.C
294
utf_8
4e98cad1e3abfc61b7640a5a8d71fdc6
// { dg-do assemble } // GROUPS passed prefix-postfix class foo { public: operator ++ (); // { dg-error "" } no type or storage class }; int main() { foo x; // This should fall back to calling operator++(), and be an error with // the -pedantic flag. x++;// { dg-error "" } }
google
android
template19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/template19.C
492
utf_8
eec3608ad6426a4863e21a95a0447248
// { dg-do assemble } // GROUPS passed templates template <class T> class Base { public: Base() { } }; template <class memberType, class keyType> class Middle : public Base<memberType> { public: Middle (keyType const & (*ko) (memberType const &)) { } }; // EXCHANGE the following lines for this code t...
google
android
crash16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash16.C
330
utf_8
63d187698f719a092db1cc2f96b7e9d1
// { dg-do compile } // { dg-options "-fshow-column" } // GROUPS passed old-abort class Graph { // { dg-error "1:new types|1: note: \\(perhaps" } public: unsigned char N; Graph(void) {} // { dg-message "7:'Graph" } } Graph::Graph(void) // { dg-error "18:return type|1: error: redefinition" } { N...
google
android
delete1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/delete1.C
573
utf_8
750e8cf6468a830d6ad90ed7ebbd6a3d
// { dg-do assemble } // { dg-options "-pedantic-errors" } // GROUPS passed operator-delete /* ARM $5.3.4 */ void f(char *p, char *q[], const char *r, const char *s[]) { delete 0; /* illegal: non-pointer */// { dg-error "" } .*expected pointer.* delete (char*)0; /* no effect */ delete p; delet...
google
android
delete2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/delete2.C
356
utf_8
d18fef4b5dc740a3a5a5a20881e799a0
// { dg-do run } // GROUPS passed operator-delete // Check that using the delete operator with a null pointer // is allowed (as called for by The Book, pg. 259) extern "C" int printf (const char *, ...); struct base { int member; }; base* bp; void test () { delete bp; } int main () { bp = (base *) 0; test ()...
google
android
warnings3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/warnings3.C
325
utf_8
61ec510179dbc56cf029ea27ba32b29c
// { dg-do assemble } // { dg-options "-O2 -Wall" } // GROUPS passed warnings class A { int i; public: void funcA(void) { funcB(); } // The compiler should not emit a warning about not being // able to inline this function. void funcB(void) { i++; ...
google
android
label1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/label1.C
162
utf_8
f88bce394dffb1d830c0d26236adf218
// { dg-do assemble } // GROUPS passed labels // it should only give 1 error, about using an undefined label int main(void) { goto dummy; }// { dg-error "" } .*
google
android
sizeof5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/sizeof5.C
300
utf_8
30da4846a089e66f7b78cd50474b36e3
// { dg-do run } // GROUPS passed sizeof // ARM $5.3.2 extern "C" int printf (const char *, ...); class foo {}; int main () { // The size of any class or class object is larger than zero. int i = sizeof (foo); if (i > 0) printf ("PASS\n"); else { printf ("FAIL\n"); return 1; } }
google
android
enum-clash
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/enum-clash.C
200
utf_8
0b35828a3baa2558fbffe3e9ac2165c9
// { dg-do assemble } // { dg-options "-pedantic-errors" } // GROUPS passed arm enum color {red, yellow, green=20, blue}; color c = 1; // this should be an error// { dg-error "" } .* int i = yellow;
google
android
template3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/template3.C
701
utf_8
aed9cdf54df20f79aba75b526a8d38b0
// { dg-do run } // GROUPS passed templates extern "C" int printf (const char *, ...); extern "C" void exit (int); int count = 0; void die (int x) { if (x != ++count) { printf ("FAIL\n"); exit (1); } } class A { public: void f() const { die (-1); } }; template <class Item> class B : ...
google
android
template24
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/template24.C
308
utf_8
a98c4c7ae4d76628b531026ef33c5a45
// { dg-do run } // GROUPS passed templates extern "C" int printf (const char *, ...); template <class F> class Temp { F func_; public: Temp (F f) :func_(f) {} }; int func (int h = 1, int z = 2) { return h+z; } int main () { Temp<int(*)(int, int)> temp (func); printf ("PASS\n"); return 0; }
google
android
redecl3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/redecl3.C
249
utf_8
1c6e3ab3c0ac7f1ecdf1f598fbf9174d
// { dg-do assemble } // GROUPS passed redeclaration class foo { public: int bar(int a); }; void bar(int &a); int foo::bar(int a) { int a = 0; // Should this be an error ?// { dg-error "" } declaration.* bar(a); return 0; }
google
android
overload1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/overload1.C
340
utf_8
9013b79b529424cbf967ec2808e9869e
// { dg-do assemble } // GROUPS passed overloading class Foo { public: int f (void); }; class Bar : public Foo { public: int f (int); // { dg-message "Bar::f|candidate expects" } }; int main () { Bar b; b.f ();// { dg-error "no matching" } // { dg-message "candidate" "candidate note" { target *-*-* }...
google
android
operators6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/operators6.C
155
utf_8
52b3628faa7d652f30e4e4cf72e3bae4
// { dg-do assemble } // GROUPS passed operators class a { public: a* operator->() { return this; } void p(); }; void a::p() { operator->(); }
google
android
crash3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash3.C
452
utf_8
509e32a23f0fa15e85d26c26684c4a3c
// { dg-do assemble } // GROUPS passed old-abort int strcmp(); extern "C" { // dies in common_type, cuz the TREE_TYPE of t2 is 0, so it can't get its // TYPE_MAIN_VARIANT value. // <void_type 184510 void permanent VOID // size <integer_cst 1844e0 type <integer_type 182548 int> constant perman...
google
android
copy6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/copy6.C
1,607
utf_8
4b2ab58d3d7e3f0db2cd9c43e232e05b
// { dg-do run } // GROUPS passed copy-ctors /* g++ 2.3.3 will prefer using type conversions over the implicitly generated copy constructor. This is wrong. If you explicitly define a copy constructor, it will use it. However, the implicit copy constructor MUST be called whenever an explicit one would have been called ...
google
android
template16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/template16.C
190
utf_8
80d8f014093b5239a7faf1e1696a8057
// { dg-do assemble } // GROUPS passed templates template<class T> class TList { typedef void (T::*TVOIDFUNT)(); typedef T* (T::*TTPFUNT)(T*); }; class A; class B : TList<A> { };
google
android
err-msg12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/err-msg12.C
175
utf_8
73c1bfcf937197fbbb2fa6b4fceb6d08
// { dg-do assemble } // GROUPS passed error-messages class foo { public: friend mutable int x ();// { dg-error "" } non-object member `x' cannot be declared `mutable' };
google
android
visibility9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/visibility9.C
279
utf_8
8d9e0384aa49c53379aad6b6df1c4e6f
// { dg-do assemble } // GROUPS passed visibility class A { public: void aMethod(void) {};// { dg-error "" } .* }; class AA : A { }; class B { public: void thisMethod() { AA ana; ana.aMethod();// { dg-error "" } .* } };
google
android
enum4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/enum4.C
143
utf_8
a88b4a73ce1ec205a26606c69baf3bc1
// { dg-do assemble } // GROUPS passed enums class X { public: enum { a }; }; enum { b = 1 }; enum ok { y = b }; enum notok { z = X::a };
google
android
crash13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash13.C
506
utf_8
440a4666ca3b9be9549267d67d3e2987
// { dg-do assemble } // { dg-options "-Wreturn-type" } // GROUPS passed old-abort class gen_op { public: gen_op ( ); gen_op (const gen_op &Op1); ~gen_op ( ); void operator = (const gen_op &Op1); }; class spin_op { public: spin_op(); spin_op(const spin_op& SOp); ~spin_op(); void operator= (const s...
google
android
enum9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/enum9.C
356
utf_8
06c6940de7779a922f7b5713e12fae2f
// { dg-do assemble } // GROUPS passed enums enum fig { figgy, pudding, // { dg-error "comma at end" "" { target { ! c++11 } } } }; class X { public: static fig (*open)(void *thing, const char *filename); static fig (*parse)(void *thing); }; enum fig (*X::open)(void *thing, const char *filename) = 0...
google
android
ns1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/ns1.C
250
utf_8
8a70a49dd8f898539a46d196782e0fe5
// { dg-do assemble } // GROUPS passed old-abort struct B { void f(char); void g(char); }; class C { int g(); }; class D2 : public B { using B::f; // ok: B is a base of D2 using C::g; // { dg-error "not a base type" } };
google
android
scope5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/scope5.C
298
utf_8
905bd298a5df0d8fc999ae1b0a5c0dcb
// { dg-do assemble } // GROUPS passed scoping class Integer { public: int i; }; class Type { enum Klasse { ENUM, INTEGER }; class Description { public: }; class Integer: public Description { public: ::Integer low; ::Integer high; }; };
google
android
crash6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash6.C
354
utf_8
fe6ac67b99c1ddd7b2d92896792a2eea
// { dg-do assemble } // GROUPS passed old-abort // Should be fixed by: // // * cp-decl.c (start_function): Avoid a null-reference on CTYPE. template<int> class Program { } ; template<> class Program<0> { public: inline friend float EvalNextArg() { return 1.0 ; } } ;
google
android
warnings2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/warnings2.C
151
utf_8
74dea83d2980de218faf5473ae79df96
// { dg-do assemble } // GROUPS passed warnings class K { public: void f() { }; // there should be no warning about this semicolon };
google
android
template25
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/template25.C
438
utf_8
0638f66168edec8abeec999d8939dd9c
// { dg-do assemble } // GROUPS passed templates template <class T> class Temp_Base {}; template <class T> class Temp_Derived : public Temp_Base<T> { public: Temp_Derived (int i = 10) {} }; class Base { float r_; public: Base (float r) : r_(r) {} }; class Derived : public Base { private: Temp_Base<int>* b...
google
android
crash26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash26.C
129
utf_8
8205b5bda9e4b98bed0dd54ab9af735b
// { dg-do assemble } // GROUPS passed old-abort struct B { B(); }; class C : virtual public B { public: C() { } };
google
android
init5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/init5.C
182
utf_8
32c57193ecdb3b2c97d578375591d859
// { dg-do assemble } // GROUPS passed initialization int main( int argc, char**argv, char** envp ){ char* domain = argv[1]; domain = domain? (char*)"component" : domain; }
google
android
warnings10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/warnings10.C
129
utf_8
5f0d83c9a3322cfa98bdcc72e3240081
// { dg-do assemble } // GROUPS passed warnings void foo() { int i; if (1) { for (int i = 0; i < 10; i++) ; } }
google
android
template31
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/template31.C
461
utf_8
1ec188d99d9fceca7c58b5889350401c
// { dg-do assemble } // GROUPS passed templates // PRMS Id: 13218 struct C { int x; char y; double z; }; C c02; template <int* ip> struct A { int* p; A() : p(ip) {} }; template <C* cp> struct B { C* p; B() : p(cp) {} }; int i00; int main(void) { A<&...
google
android
new3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/new3.C
1,021
utf_8
8c4ab768e2c9e181979ff5844bc09b51
// This test fails on VxWorks in kernel mode because it depends on the // library version of "::operator new[]" calling the "::operator new" // defined in this module. This doesn't work because the library version // of "::operator new[]" is built into the kernel itself; library relocations // are resolved when the ke...
google
android
enum5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/enum5.C
232
utf_8
fcf43316699bebcb1f1765e8f2b2d977
// { dg-do assemble } // { dg-options "-pedantic-errors" } // GROUPS passed enums enum Thing { FIRST, SECOND } ; int main() { Thing x = FIRST ; x = 27 ; // this line should be a type error.// { dg-error "" } .* }
google
android
prepost4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/prepost4.C
251
utf_8
91a11c1cbb6524eed619fc6f76db67c2
// { dg-do assemble } // GROUPS passed prefix-postfix class Y { public: friend Y operator++ (Y&); // This is legal---it's a good test to make sure that grokfndecl's // checking of the arguments is sane. friend Y operator++ (Y&, int); };
google
android
template28
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/template28.C
245
utf_8
bae7ade527befccfcd2ba094640a07bc
// { dg-do assemble } // GROUPS passed templates class X { const char *fptr; public: X(const char *ptr) { fptr = ptr; } operator const char*() { return fptr; } }; int main(){ X x1("1234"); X x2(x1+1); }
google
android
template27
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/template27.C
417
utf_8
fda6ea3340caa213364034a337eacbb4
// { dg-do assemble } // GROUPS passed templates template<class K, class V> class MapLS { }; class String {}; class X1 { }; class RefProto { }; template<class REP> class Ref { }; template <> class MapLS<String, Ref<X1> >: public MapLS<String, RefProto> { ...
google
android
new1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/new1.C
186
utf_8
718799fe9f078dd0e2bedf0e9597bd91
// { dg-do assemble } // GROUPS passed operator-new typedef __SIZE_TYPE__ size_t; struct x { int a; void * operator new (size_t, void *); }; struct x * f(void *p) { return new (p) x; }
google
android
err-msg7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/err-msg7.C
118
utf_8
30efe9b8a3b56a4ab66d9e2fff61777a
// { dg-do assemble } // GROUPS passed error-messages class foo { public: volatile int () {}// { dg-error "" } };
google
android
arm3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/arm3.C
308
utf_8
c9e7e0c2e854771ffa91e7877a31b32a
// { dg-do assemble } // GROUPS passed initialization // ARM $11.4: A function first declared in a friend decl is equivalent // to an extern decl, so the below is illegal. class X { friend g(); // { dg-error "" } previous declaration }; static g() { return 1; }// { dg-error "" } previously declared
google
android
recurse
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/recurse.C
2,369
utf_8
964a895f23ebbce94a2c5bfe6e3845b5
// { dg-do assemble } // GROUPS passed recursive-aborts // types typedef unsigned int DBflag; // for storing user flag value typedef unsigned long DBoffset; // 32-bit unsigned integer typedef DBoffset DBsize; // type for storing sizes of objects typedef unsigned char DBbyte; // 8-bit unsigned char class DBlink {...
google
android
code-gen4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/code-gen4.C
562
utf_8
d33a7c1ca1105d06aae19e79d769c996
// { dg-do run } // { dg-options "-O" } // GROUPS passed code-generation // Options: -O // // Check that when an int value is assigned to a short int, the proper // half of the int (i.e. the low order half) ends up in the short. // // This fails with 1.32.0 with -O and f1() is inline. // // Workaround - declare "f1_ar...
google
android
redecl1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/redecl1.C
234
utf_8
d9a3a9426b5c7eef00685fb12ada0206
// { dg-do assemble } // GROUPS passed redeclaration inline int min(int x, int y) {return x < y ? x : y;} /* 235 */// { dg-message "" } .* int min(int a, int b); inline int min(int a, int b) {return (a < b)?a:b;}// { dg-error "" } .*
google
android
parse2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/parse2.C
137
utf_8
f66960747805de8933f936133b8e7153
// { dg-do assemble } // GROUPS passed parsing class BitString { public: int i; }; typedef BitString BS; typedef ::BitString cBS;
google
android
array-refs
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/array-refs.C
153
utf_8
16edd78f1a50b1993dbd9ca1f037bf4c
// { dg-do assemble } // GROUPS passed arm int a, b; // declaring an array of references should be illegal int & v[ 2] = { a, b};// { dg-error "" } .*
google
android
crash38
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash38.C
911
utf_8
9a365f2dc5bc82428d2fc83004ca21a9
// { dg-do assemble } // GROUPS passed old-abort /* I received the following message when using g++ (version 2.3.3): main.cc: In method 'Implicit<implicit<INTEGER,2>,3>::Implicit()': main.cc: Internal compiler error 241. */ #include <iostream> class INTEGER { int x; public: typedef int BASE; INTEGER(...
google
android
overload7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/overload7.C
688
utf_8
20c8208207072ded537d54825c012514
// { dg-do run } // GROUPS passed overloading extern "C" int printf (const char *, ...); struct NoName { int first; int second; }; class Casted { public: NoName x; double y; Casted ( int _x , double _y ): y(_y) { x.first = _x; ...
google
android
parse4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/parse4.C
312
utf_8
31688bf1cd1491c8def445df80420070
// { dg-do assemble } class B { public: B( int t ) {} void f() {} }; int g() { return 0; } // referenced below int main() { int try1; B( try1 ).f(); // no syntax error B b( g() ); // no syntax error B( ::g() ).f(); // no syntax error B( g() ).f(); // no syntax error }
google
android
misc14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/misc14.C
281
utf_8
954d86a6b3718154bf80e620abb0b1f2
// { dg-do assemble } // GROUPS passed miscellaneous-bugs class X { public: enum e { New // { dg-message "previous" } , // { dg-error "comma at end" "" { target { ! c++11 } } } }; static int New(int); // { dg-error "conflicts with a previous" } }; int main() {}
google
android
crash47
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash47.C
1,841
utf_8
d94800227b9326614c08ee7405b8e23b
// { dg-do assemble } // GROUPS passed old-abort const int TRUE = 1; const int FALSE = 0; class Rep { protected: Rep(): count(0) { } Rep(const Rep& other): count(0) { } Rep& operator=(const Rep& other) { /* DO NOT copy over other.count */ return *this; } public: // TODO - for now // Because i...
google
android
nest16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/nest16.C
550
utf_8
674367aa6e84abc2f89bb825235a4e33
// { dg-do assemble } // GROUPS passed nested-classes class BDDHeap { public: BDDHeap(); BDDHeap(const BDDHeap&); class Page { public: int i; }; struct Pointer { Page *page; unsigned index; Pointer(); Pointer(const BDDHeap& heap); }; struct Half { struct { Page *top; ...
google
android
misc1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/misc1.C
186
utf_8
59cf9408e21fc287dfadefe86369088a
// { dg-do assemble } // GROUPS passed miscellaneous-bugs int main( int argc, char**argv, char** envp ){ char* domain = argv[1]; domain = domain? (char*)"component" : domain; }
google
android
init8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/init8.C
222
utf_8
5ad1e47e12a8b41a95f79f673f9c0514
// { dg-do assemble } // GROUPS passed initialization class A { public: A(const A & a) : i_member(a.i_member) { } A(const int & i) : i_member(i) { } union { int i_member; }; };
google
android
cvt2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/cvt2.C
121
utf_8
d2732754499fdd0622ea76207723c993
// { dg-do assemble } // GROUPS passed conversions void f(const short & s) { } int main() { f(0); return 0; }
google
android
enum6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/enum6.C
330
utf_8
417837f7736691e2a2f081e4fac41139
// { dg-do assemble } // GROUPS passed enums 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::a1; // { dg-error "" } within this cont...
google
android
init13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/init13.C
103
utf_8
a305765b5b9a1e0b319b904df2c4a15d
// { dg-do assemble } // GROUPS passed initialization struct A { operator int (); }; int i = A();
google
android
misc4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/misc4.C
219
utf_8
36f9d2b7189e1066203482c3d645a308
// { dg-do assemble } // GROUPS passed miscellaneous // This should not emit an error about A::~A() being redefined; we // should check that it is a pure virtual. class A { public: virtual ~A() = 0; }; A::~A() {}
google
android
union3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/union3.C
132
utf_8
f0cd272a2f8d0f4a5b5e00305fe64682
// { dg-do assemble } // GROUPS passed unions union alan { int a; char *b; alan(); }; alan mary; alan::alan() { a=0; }
google
android
crash27
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash27.C
230
utf_8
915634c5383e42a4857a8cdf46230684
// { dg-do assemble } // GROUPS passed old-abort class First { public: First(const First& a); }; class Second { int i; First f; public: ~Second() {} Second func(); }; void foo() { extern Second x; x = x.func(); }
google
android
parse5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/parse5.C
253
utf_8
b00730f667feb11a789e146e4830d7ed
// { dg-do assemble } class ptr8 { public: ptr8(unsigned char *string,int len); }; template <unsigned int S> class buf { public: buf(const ptr8& aRef); }; int main() { unsigned char b[3]; buf<3> b2(ptr8(&b[0],3)); }
google
android
operators3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/operators3.C
144
utf_8
adee67364642085c61dd0cd25135210e
// { dg-do assemble } // GROUPS passed operators class X { }; void operator->(X& a, X& b) {} // MUST be a member function// { dg-error "" } .*
google
android
visibility2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/visibility2.C
212
utf_8
4a3287008d0b6d55ec4166fc9076757e
// { dg-do assemble } // GROUPS passed visibility class X { void g (int); // { dg-error "" } private public: void g (double); }; class Y : public X { void f() { g (1); } }; // { dg-error "" } private
google
android
overload5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/overload5.C
626
utf_8
a4396bbce384652b7936e281f7ab7cc8
// { dg-do assemble } // GROUPS passed overloading class Foo { public: int operator << (const signed char&); int operator << (const unsigned char&); int operator << (const short&); int operator << (const unsigned short&); int operator << (const long&); int operator << (const unsigned long&); }; int main (...
google
android
overload4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/overload4.C
618
utf_8
d60b7d910767d4bf4c28f1ccb0ecd736
// { dg-do assemble } // GROUPS passed overloading typedef void * (*NewObject) (void); class B { public: static void WantsNew (NewObject creator); // { dg-message "B::WantsNew|no known conversion" } }; class A { public: static A * NewOne (void); static void InitClass (void) ...
google
android
operators2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/operators2.C
144
utf_8
4ac6cb421f470728cde116dd27d0a9b5
// { dg-do assemble } // GROUPS passed operators class X { }; void operator[](X& a, X& b) {} // MUST be a member function// { dg-error "" } .*
google
android
init10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/init10.C
79
utf_8
4e18b3936e86061811d3dfba8b2c4d31
// { dg-do assemble } // GROUPS passed initialization struct S { int :0; } a;
google
android
init11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/init11.C
169
utf_8
9a287d5c1abd4ec24b10f2c76eab0f0a
// { dg-do assemble } // GROUPS passed initialization struct String { char * string; String(const char* st); }; extern char array []; static String sub = array;
google
android
err-msg1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/err-msg1.C
157
utf_8
94b84870c48c9080fde2075377b5d2e9
// { dg-do assemble } // GROUPS passed error-messages class A { }; int i = A::_ter;// { dg-error "" } ._ter.* int j = A::term;// { dg-error "" } .term.*
google
android
warnings9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/warnings9.C
108
utf_8
ba46cd513c748cfd9b7ff43dc0003a78
// { dg-do assemble } // { dg-options "-Wall" } // GROUPS passed warnings inline int foo() { return 3; }
google
android
sorry1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/sorry1.C
355
utf_8
5e2033584074585a4562c059d4224b61
// { dg-do assemble } // GROUPS passed old-sorry class a { public: int* foo(); }; a aa; a* ap; class b { public: int ok(int* p =aa.foo()); // dump_init should know what to do with this NON_LVALUE_EXPR int f(int* p =ap->foo()); }; int b::ok(int *p) { return 0; } int b::f(int *p) { return 0; } voi...
google
android
crash37
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash37.C
340
utf_8
80e5a4815f34399009395248c62241a4
// { dg-do assemble } // GROUPS passed old-abort typedef int _sigset_t; extern "C" { extern int sigaction(int signo, const struct sigaction *action_spec_p, struct sigaction *old_action_p); } extern "C" { extern void foo(); } class SS { friend void foo(); protected: void goo(); }; inline...
google
android
enum11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/enum11.C
394
utf_8
8fedd9fc66adfce5ebeb3860f90fd79c
// { dg-do assemble } // GROUPS passed enums class X { enum { oneMask = 0x0000FFFF, twoMask = 0x000F0000, thiMask = 0xFFF00000, // { dg-error "comma at end" "" { target { ! c++11 } } } }; unsigned int foo; public: X (int) : foo (oneMask | twoMask ) {} // No warn...
google
android
nest13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/nest13.C
503
utf_8
1abeb376cbfaad85af7d961d1957a048
// { dg-do assemble } // GROUPS passed nested-classes // The bug here is that wer'e getting a message about inner not // being a basetype itself. I think it's because it's being // compared as the "inner" we knew about when it was forward-declared, // versus the "inner" we know about when it *has* been defined. clas...
google
android
static3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/static3.C
272
utf_8
a9c90d5ae062d30726f66685c678e0dc
// { dg-do assemble } // GROUPS passed static class foo{ public: static void bar( int i ){ value = i; } static int value;// { dg-message "" } .* }; const int foo::value = 0; // should be an error.// { dg-error "" } .* int main(){ foo::bar( 1 ); return 0; }
google
android
err-msg10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/err-msg10.C
184
utf_8
2441f4634915a8657fe01d92aa58a45a
// { dg-do assemble } // GROUPS passed error-messages class foo { public: virtual static int f () = 0;// { dg-error "" } member `f' cannot be declared both virtual and static.* };
google
android
err-msg11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/err-msg11.C
146
utf_8
94c75c3e0971db04d1f8bb06af164bc2
// { dg-do assemble } // GROUPS passed error-messages void foo (mutable int x);// { dg-error "" } non-member `x' cannot be declared `mutable'.*
google
android
template8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/template8.C
331
utf_8
cd4ddcb646c1124030c201f629f89db5
// { dg-do assemble } // GROUPS passed templates #include <stdio.h> // make sure we accept unions for templates template<int n> union Double_alignt{ double for_alignt; char array[n]; }; int main(){ Double_alignt<20000> heap; printf(" &heap.array[0] = %d, &heap.for_alignt = %d\n", &heap.array[0], &heap.for_a...