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
chromium
type
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/type.C
196
utf_8
6d84e8dcfc220d81a1b71b1eb0c4eb68
// { dg-do assemble } typedef unsigned short ushort; class foo { public: static ushort a; }; extern "C" { typedef unsigned short ushort; } ushort foo::a; static int baz() { return foo::a; }
google
chromium
realloc
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/realloc.C
153
utf_8
2f2163de7ae71b96b78dd69929d4f9eb
// { dg-do assemble } extern "C" void realloc(); class bug { public: void realloc(int foo,int bar); }; void f() { bug c; c.realloc(50,50); }
google
chromium
inline8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline8.C
1,272
utf_8
b031d36f414843127e437e3936c33921
// { dg-do run } // { dg-options "-O1" } #include <map> #include <cstdlib> #include <cstring> using namespace std; class NAMES_ITEM { public: char *name; NAMES_ITEM(const NAMES_ITEM& item2); NAMES_ITEM(const char* name2); ~NAMES_ITEM(); bool operator==(const NAMES_ITEM& n) const; };...
google
chromium
crash5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash5.C
175
utf_8
408d886884b4f130230a709d77c58ad3
// { dg-do assemble } class TecMesh {}; extern TecMesh& m; struct X { X(TecMesh&); }; struct D { D(); TecMesh& Mesh; }; D::D () : Mesh(m) { X x(D::Mesh); }
google
chromium
rttid2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/rttid2.C
1,092
utf_8
42faab5f8138a94eaefe65e8f33afa4a
// { dg-do run } // { dg-options "-frtti" } // test of rtti of single inheritance and multiple inheritance classes // dynamic casting #include <typeinfo> extern "C" { int printf(const char *, ...); void exit(int); } class X { public: int xi; }; class Y : public X { short ys; }; class Z : public Y { int...
google
chromium
redecl2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/redecl2.C
212
utf_8
021b847eaf4c57e6a1b1059adaf32f51
// { dg-do assemble } struct S { S(int); // { dg-error "with" } S(int); // { dg-error "overloaded" } already declared ~S();// { dg-error "with" } ~S(); // { dg-error "overloaded" } already declared };
google
chromium
volatile1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/volatile1.C
424
utf_8
4bc022997e5724537a76c5c1112a7398
// { dg-do assemble } // Test that failed lvalue-to-rvalue conversion of vf doesn't crash the // compiler. class f_class { }; // { dg-message "candidates" "candidates" } // { dg-message "note" "note" { target *-*-* } 6 } volatile f_class ret_v_f_class() { f_class t; return t; } int main(void) { volatile f...
google
chromium
qual1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/qual1.C
426
utf_8
9a413d6cc2fc61c326d8be31a011267d
// { dg-do assemble } // { dg-options "-O" } // DR 295 allows qualification via typedef typedef const char *(func_type)(); class C { public: func_type *Function; // The following is DR 295 dependent const func_type* function(void) { return Function; } volatile func_type* functionv(void); } action; void work(co...
google
chromium
defarg7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/defarg7.C
875
utf_8
c60e35453aa201f9a53cebeea1e937f0
// { dg-do assemble } // As of G++ 3.4, we no longer attempt to detect dependencies; the // standard does not require that we do. // Bug 1038. Default args on class members can produce circular dependencies. // Make sure we spot them, and don't depend on a particular ordering. struct A { static int Foo (int = Baz ()...
google
chromium
defarg9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/defarg9.C
644
utf_8
f7f9c2f14ef416153be680c07c0850ff
// { dg-do assemble } // // Bug 2608. A default parameter introduced in the definition of a // ctor never made it into the clones, leading to later overload // resolution failures. This is related to bug 2356. struct A { A (int, int); }; A::A (int d, int = 0) { if (d) { A a (0); } } void get_width (...
google
chromium
overload7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/overload7.C
406
utf_8
2de9c31c594f1535033f0d460dc3b27d
// { dg-do run } // Check that object call works when there are multiple conversion ops // returning the same type. typedef int (*pfn)(); int zero () { return 0; } int one () { return 1; } int two () { return 2; } struct A { A() { } operator pfn () { return one; } operator pfn () const { return zero; } op...
google
chromium
conv5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/conv5.C
186
utf_8
b9ae66aae4340b5cdc832fb897055d10
// { dg-do assemble } // { dg-options "" } int foo(); const int (*bar)() = foo; // { dg-error "" } adding const
google
chromium
anon3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/anon3.C
1,283
utf_8
367733c92db9bcfe12fccf6f5357cd64
// { dg-do run } // Although anon unions cannot have user defined member functions // [class.union/2]. They should have implicitly defined copy ctors and // and the like [class.copy/4]. Make sure we generate one of the correct // signature and that it works ok. extern "C" void abort(); struct A { union { int...
google
chromium
crash33
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash33.C
219
utf_8
af86322780df2d44590d8b2285db668a
// { dg-do assemble } template <class T> inline const T& bar(const T& a, const T& b) { return a < b ? b : a; } int foo(void) { return bar(sizeof(int), sizeof(long)); }
google
chromium
crash28
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash28.C
530
utf_8
eb5fc8d3914bbcff1e195a301b96c52e
// { dg-do assemble } namespace N { class X; template <class T> class Y { public: inline Y () {} inline operator const Y<X> & () const { return *reinterpret_cast<const Y<X> *>(this); } }; } class bar { public: inline bar () {} inline bar (const ::N::Y< ::N::X>& a); }; class foo { ...
google
chromium
dyncast1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dyncast1.C
2,744
utf_8
35b77fadb22e92c8ff405a2486ab911c
// { dg-do run } // test of dynamic_cast // runtime detecting of nonpublic // inheritance within a cast // and therefor failing with result 0. extern "C" void abort(); extern "C" int printf (const char *, ...); static int errors = 0; void error(int i) { printf("Error %i\n",i); errors++; } // 1. downcast // 1.1. si...
google
chromium
access8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/access8.C
498
utf_8
e63ab962df8f1acaa0719e9e325a762c
// { dg-do assemble } // Test that access to static members from a nested class of the derived // type works. class Base { protected: static int Some_var; typedef int Some_t; }; class Derived : Base { protected: struct Nested { void Foo (Some_t); void Bar (Base::Some_t) { Base::Some_var = 1; } };...
google
chromium
crash22
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash22.C
619
utf_8
4d21fb21f1a5c07669bf5bcc4701f5d6
// { dg-do link } // { dg-options "-O2" } class foo { }; typedef void *voidp; class vect : public foo { public: voidp& a(); int b(); }; class bar { public: bar *c(bool (*f)(bar *node), voidp g) { int i=0; bool j; while (i < d.b()){ j = (f == __null) || f((bar*)d.a()); if ...
google
chromium
pmf7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/pmf7.C
300
utf_8
e8c1b04efac1c3d4b2dc87bc880171ed
// { dg-do assemble } // Test for proper diagnostics on trying to take the address of a non-static // member function. struct A { void f (); void f (int); void g (); }; int main () { A a; &a.f; // { dg-error "" } overloaded &a.g; // { dg-error "" } can't write a pmf like this }
google
chromium
delete8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/delete8.C
515
utf_8
84bdff781f1a6fd221ea3dfef103b8d4
// { dg-do run } #include <stdlib.h> struct S { ~S (); }; bool flag; S* s1; S* s2; void* operator new (size_t s) { return malloc (s); } void operator delete (void* p) { if (flag && p != s2) abort (); } S::~S () { if (this != s2) abort (); s1 = 0; } int main () { s2 = new S; s1 = s2; // Turn on...
google
chromium
dtor12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dtor12.C
228
utf_8
49cceaef10e394102fa51c269f289f67
// { dg-do run } // Test that we don't complain about calling a destructor on a const object. #include <new> struct A { ~A() {} }; const A a = {}; int main() { a.~A(); a.A::~A(); // { dg-bogus "" } const violation }
google
chromium
anon2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/anon2.C
308
utf_8
89bb93dbf845b7033c1fbe70d2dfb2be
// { dg-do run } extern "C" void abort (void); static union { int x1; long x2; short x3; long x4; }; static union { union { union { int z; }; }; union { union { double d; int i; }; }; }; int main() { z = 3; if (i != 3) abort (); d = 2.5; }
google
chromium
lookup15
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup15.C
462
utf_8
4e5bbeda32847d5103fd91a11643cd0c
// { dg-do assemble } class b { int j; public: b(int a = 6): j(a) {} void imbue(int a) {++j;} }; class d: public b { int k; public: d(int a = 7): b(a), k(a) {} void imbue(int a) {++k;} }; //virtual public kills, public ok class mostd: virtual public d { int l; public: mostd(int a = 9): d(a), l(a) {}...
google
chromium
friend3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/friend3.C
277
utf_8
13817ac9cad48290aba294b443352ef4
// { dg-do assemble } class foo { public: class bar; void func(bar *); class bar { int st; friend void foo::func(bar *); }; }; void foo::func(bar *obj) { obj->st++; } void test02() { foo obj_f; foo::bar obj_b; obj_f.func( &obj_b); }
google
chromium
optimize2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/optimize2.C
1,172
utf_8
d5d37e6cb7f00378dcaaddfcc4604637
// { dg-do run } // { dg-options "-O2" } // // Bug 2823. Inlineing the body of a thunk broke things. But that's // rarely a sensible thing to do anyway. #include <cstdio> #include <cstdlib> int objCount = 0; struct Thing { int count; Thing (); Thing (Thing const &src); ~Thing (); }; Thing::Thing () :c...
google
chromium
new3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/new3.C
330
utf_8
eb713ae1628b9077dbad880b05e1249d
// { dg-do run } typedef __SIZE_TYPE__ size_t; template <class T> struct A { int size; A () { size = 20; T *p; p = new T[size]; int foo; foo = 5 * size; } }; struct B { virtual ~B() { } void operator delete [] (void *ptr, size_t size) { } }; int main () { A<B> *p = ne...
google
chromium
anon1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/anon1.C
110
utf_8
6dd624697232798767c1ec209dcd1491
// { dg-do assemble } static union { union { }; }; // { dg-warning "" } anonymous union with no members
google
chromium
covar1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/covar1.C
135
utf_8
d7423d0670f9d8abf6b30397edaa1235
// { dg-do assemble } struct A { virtual A& f(); }; struct B: public A { B& f(); };
google
chromium
init14
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/init14.C
202
utf_8
f715f2cfa734fefb76e0bb097139a60c
// { dg-do assemble } typedef struct { int count; } mbstate_t; struct fpos { mbstate_t _M_st; fpos(int __pos) : _M_st() { } }; int main () { fpos f (2); }
google
chromium
friend2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/friend2.C
187
utf_8
dba3090eb844e8c6c1d4e88f5f742e83
// { dg-do assemble } void f() { class Local_2 { friend class Friend; int i; }; class Friend { public: void g() { Local_2 l2; l2.i = 3; } }; }
google
chromium
goto2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/goto2.C
259
utf_8
72371ac4585f8b9c70feb54fea8e821c
// { dg-do assemble } // { dg-options "-Wunused" } struct S { S (); ~S (); }; void f () { { S s1; int j; // { dg-warning "" } unused t: // { dg-warning "" } unused S s2; } }
google
chromium
eh4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/eh4.C
250
utf_8
0e4cdc96271eaf0009e927797d8bc4e3
// { dg-do assemble } class foo { public: foo() {} void throwMe () { throw *this; // { dg-error "" } cannot be used in throw-expression } virtual void test () = 0; };
google
chromium
ref1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/ref1.C
230
utf_8
3d97599f1668f6276ba8fcb8536abf4f
// { dg-do assemble } int f(); void g() { const int& i = f(); // OK int& j = f(); // { dg-error "" } initialization of non-const reference const volatile int& k = f(); // { dg-error "" } initialization of volatile ref }
google
chromium
crash37
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash37.C
342
utf_8
61401cb0f17765016e51789fdbcc7c87
// { dg-do assemble } // bug 706. We iced when meeting a decl with type error-mark-node class bifstream; int main() { bifstream bifs; // { dg-error "" } incomplete type if (!bifs) { } return 0; }
google
chromium
900403_04
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/900403_04.C
264
utf_8
8f92a8912de7394d42ee9868868d7e1f
// { dg-do assemble } // GROUPS passed abort // g++ 1.37.1 bug 900403_04 // The following erroneous code causes g++ to abort. // keywords: abort, bit-fields, zero length struct s { unsigned int foo:0; // { dg-error "" } causes abort unsigned int field; };
google
chromium
decl3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/decl3.C
489
utf_8
da4392d4b8319374e5f686fd1c71ef28
// { dg-do assemble } // http://gcc.gnu.org/ml/gcc-bugs/1999-04n/msg00505.html // We should not allow arrays of abstract type. [class.abstract/2] struct cow_t { // { dg-message "pure" } virtual void f()=0; // { dg-message "note" } }; int main() { cow_t cow[2]; // { dg-error "invalid abstract type" } co...
google
chromium
access10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/access10.C
187
utf_8
557115836c5559580c903849b953750e
// { dg-do assemble } // Test that defining a static member of private type with the () syntax works. class A { private: struct B { B(int) {} }; static B b; }; A::B A::b (1);
google
chromium
static20
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/static20.C
129
utf_8
19d0e5dc3a08ecffcf5d9149ae063218
// { dg-do link } struct foo { foo() {} ~foo() {} void func() { static foo x; } }; int main() { foo f; return 0; }
google
chromium
inline4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline4.C
276
utf_8
28e4cd2fa1658df97a354ad0f586f2a8
// { dg-do assemble } // { dg-options "-O2" } inline void f () { return; } inline void g (); void (*gp)() = &g; inline void g () { f (); } extern int array_size; void h () { int lookup_array[array_size]; g (); }
google
chromium
elab1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/elab1.C
251
utf_8
5d7f93c2ec3abd2ea79f1736d302ce96
// { dg-do assemble } typedef struct {} S; // { dg-error "" } Previous declaration of S S s1; struct S* s2; // { dg-error "" } S is a typedef name template <class T> struct X { friend class T; // { dg-error "" } T is a template type parameter };
google
chromium
comdat5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/comdat5.C
240
utf_8
8bdec5d59e3ad4184e303beb93c1b552
// PR target/17828 // { dg-do link { target fpic } } // { dg-additional-sources " comdat5-aux.cc" } // { dg-options "-O2 -fPIC" } // { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } #include "comdat4.C"
google
chromium
inline20
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline20.C
537
utf_8
afc3a04b959aae42619cd9d21f7dbd19
// { dg-do assemble } struct A { int a, b, c, d; }; inline void foo (int, A &); struct D { }; struct E: public D { void f (A &y) { foo (1, y); } }; struct F: public D { void f (A &y) { foo (2, y); } }; E *d; F *e; inline int baz (int y) { A a; if (y) { d->f (a); } else { e->f...
google
chromium
vbase3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/vbase3.C
340
utf_8
b40e169f8b79ca99a995c50951bcb176
// { dg-do assemble } class d0_Collection_Base {}; template <class T> class d0_List : virtual public d0_Collection_Base { public: d0_List (); template <class Input_Iterator> d0_List (Input_Iterator first, Input_Iterator last) ; }; void tlist () { const d0_List<int> l4 (1, 2); }
google
chromium
overload3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/overload3.C
171
utf_8
14c85fe3998040c710174b388b703406
// { dg-do link } void f(const int *); void f(int *) {} void f2(const volatile int *); void f2(volatile int *) {} int i; int main() { f(&i); f2(&i); }
google
chromium
warn7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/warn7.C
737
utf_8
c28a879506c3f174191552c356bfd7fe
// { dg-do assemble } // { dg-options "-W -Wall" } // // Bug 2356. Unused parameter information introduced in a ctor // definition was not propagated to clones, leading to missed or // unwarranted unused parameter warnings, possibly given twice. struct X { X(int i); void foo (int i); }; void foo (int i); X::X(...
google
chromium
main1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/main1.C
163
utf_8
cb44ff20f4d826e7c7f0fa3f72c74cc2
// { dg-do compile } int main() // { dg-error "previous declaration" } { return 0; } int main(int, const char**) // { dg-error "conflicts" } { return 0; }
google
chromium
virtual6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/virtual6.C
308
utf_8
6aa085a55573a3d71f21cd92d50b53b8
// { dg-do assemble } // { dg-options "-Woverloaded-virtual" } // Bug: g++ checks certain non-virtual functions to see if they override // virtual functions. struct A { virtual void f (int); }; struct B: public A { static void f (); void f (int); };
google
chromium
inline18
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline18.C
169
utf_8
69da7d680ad5e7376411f896aed134fa
// { dg-do assemble } // { dg-options "-O3" } static void foo (int a) { a = a; } static void bar (void) { foo (-1); }
google
chromium
typedef7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/typedef7.C
376
utf_8
1f17b072c75d7737cd498c2318f8e0f4
// { dg-do assemble } typedef int I; typedef int I; // DR56 makes clear that duplicate typedefs in class scopes are // invalid. struct A { typedef int I; // { dg-error "" } typedef int I; // { dg-error "" } }; template <class T> struct S { typedef int I; // { dg-error "" } typedef int I; // { dg-error "" } }...
google
chromium
decl6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/decl6.C
1,245
utf_8
f1bafdb743032a2162ea7c270025c1dd
// { dg-do assemble } // int j(); struct B {}; struct A { friend explicit int j(); // { dg-error "" } only ctor decls can be explicit friend explicit B::B (); // { dg-error "" } only ctor decls can be explicit int f(const); // { dg-error "" } ansi forbids no type const k; ...
google
chromium
builtins10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/builtins10.C
201
utf_8
00a8c669c2070d4499e82d3b30319906
// { dg-do assemble } // Test that built-in functions don't warn when prototyped without arguments. // Origin: PR c++/9367 extern "C" int snprintf();
google
chromium
crash34
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash34.C
225
utf_8
8737598586da048dab5bd4c2c89c4eaf
// { dg-do assemble } class v { double x, y; public: v(); }; class w : public v { public : static const w X; w(); }; void bar(w x); void foo() { bar(w::X); }
google
chromium
local4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/local4.C
170
utf_8
27f9dff2a26887c8da1bef9ace8c5587
// { dg-do run } // Test that a local declaration of one of a global overload set works int f () { return 0; } int f (int); int main () { int f (); return f (); }
google
chromium
badopt1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/badopt1.C
480
utf_8
31c33cf79e513b19bb021aa4e593d7b3
// { dg-do run } // { dg-options "-O2" } // egcs 1.1 fails to increment count struct Base { Base() {} }; // removing the constructor fixes the problem struct Derived : Base {}; // so does removing the base class int main() { int count = 0; Derived* array[1]; // making this Base*[1] does not fix the problem array...
google
chromium
inline10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline10.C
182
utf_8
50d7ee902563f62414c3d4e1c3e2be49
// { dg-do assemble } // { dg-options "-O2" } struct S { }; inline const S f () { return S (); } void g () { S s; f (); }
google
chromium
local3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/local3.C
275
utf_8
d66fe3a8dd3fe648291bfe2f4d9cff5d
// { dg-do run } // Bug: g++ lies about DECL_CONTEXT, so the backend thinks B::f is not // function-local. struct A { virtual void f () = 0; }; int main() { struct B : public A { void f () { } }; B b; }
google
chromium
debug4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/debug4.C
92
utf_8
45980c61fd1fff6e98536c35f841d2f6
// { dg-do assemble } // { dg-options "-g" } typedef volatile struct { int i; } mutex_t;
google
chromium
parse1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/parse1.C
129
utf_8
58adafdc7ab2ab6ac2577722d3d861ba
// { dg-do assemble } // Test that we save declspecs before a class defn properly. static volatile union { void f() { } } u;
google
chromium
static6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/static6.C
113
utf_8
1d96263569b24b72e0b415644d2d1dde
// { dg-do assemble } void f (int i) { static int a[] = { i }; }
google
chromium
ambig1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/ambig1.C
582
utf_8
dbf974ebd11e39754e731e5fdbd636d6
// { dg-do assemble } struct A { int operator ++(); // { dg-error "" } candidates void operator ()(); // { dg-error "" } candidates void operator delete(void*); // { dg-error "" } candidates }; struct B { int operator ++(int); // { dg-error "" } candidates void operator ()(); // { dg-error "" } candidates ...
google
chromium
dtor5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dtor5.C
365
utf_8
95142dab2cdf06c9a812ece53a941442
// { dg-do run } extern "C" void abort (); struct B; struct S { S (B*); ~S (); B* b_; }; struct B { B () : s (this) { } virtual void f () { } S s; }; S::S (B* b) : b_ (b) { } S::~S () { b_->f (); } struct D : public B { virtual void f () { abort (); } }; int main () { D d; }
google
chromium
virtual9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/virtual9.C
465
utf_8
cca0c5a42a9d8567da46895f512d7620
// { dg-do run } // Source: Neil Booth, from PR #111. class A { public : int i; }; class B : virtual public A { }; class C : virtual public A { }; class D : public B, public C { public : int f(void); int g(void); }; int D::f(void) { return B::i; } int D::g(void) { return this->B::i; } D...
google
chromium
dcast1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dcast1.C
256
utf_8
c747550f76f0c18401c345889e28d956
// { dg-do assemble } class C { public: virtual void f(); }; extern volatile C* cp; extern volatile C& cr; void f () { dynamic_cast<void*>(cp); // { dg-error "" } cannot dynamic_cast dynamic_cast<C&>(cr); // { dg-error "" } cannot dynamic_cast }
google
chromium
virtual7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/virtual7.C
270
utf_8
6c07ee47e97d6ed4c53954ac388d1f85
// { dg-do assemble } // { dg-options "-fno-rtti" } class _JvObjectPrefix { protected: virtual void finalize (void) = 0; }; class Object : public _JvObjectPrefix { protected: virtual void finalize (void); }; Object x;
google
chromium
array2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/array2.C
145
utf_8
d50b30478795daedce9de07a07ed3991
// { dg-do run } int i; struct S { S () { ++i; } S (int) { } }; int main() { S s[3][3] = { 2 }; if (i != 8) return 1; }
google
chromium
cond1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cond1.C
215
utf_8
7ce8357f84bf1c23ea2ef3e1897f0788
// { dg-do link } template <class T> void f (T&) ; template <> void f (void (&)()) { } void g () { } void h () { } bool b; int main () { f (b ? g : h); }
google
chromium
cond2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cond2.C
223
utf_8
adc0a6dcb5fd4ac47a11b684146ac09c
// { dg-do assemble } class Wpt {}; class RAYhit { protected: Wpt _nearpt; public: Wpt surf () const { return true ? Wpt(): _nearpt; } };
google
chromium
dtor8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dtor8.C
335
utf_8
d553422d1e882d1f572883010b7fd3e3
// { dg-do run } // { dg-options "-O1" } int result; struct S { S (); S (const S&); ~S (); int i; double d[18]; }; S* s; S::S () { s = this; } S::~S () { if (s != this) result = 1; } inline S f () { return S (); } int main () { f (); return result; }
google
chromium
virtual3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/virtual3.C
243
utf_8
126d0ea106a5252fb709751de41abae2
// { dg-do run } struct B { virtual int f() volatile { return 1; } }; struct D : public B { int f() { return 0; } }; struct D2 : public D { int f() { return 2; } }; int main() { D2 d2; D& d = d2; return d.f(); }
google
chromium
crash11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash11.C
351
utf_8
476429a62cb15b3c9ee8c125027e40c3
// { dg-do assemble } template <typename T> struct allocator { typedef int size_type; }; template <typename T> struct string { typedef typename allocator<T>::size_type size_type; static size_type size; size_type max_size() const { return size; } }; template struct string <char>;
google
chromium
debug9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/debug9.C
801
utf_8
b82c1ff0b46d37526b002e9eadb7b5a2
// { dg-do assemble } // { dg-options "-g" } // This illustrates that debugging information for CONCAT RTL's // supports only COMPLEX_TYPE types, not other types. namespace std { template<typename _Tp> class complex; template<> class complex<double> { public: complex(double =0.0, double =0.0); private: ...
google
chromium
enum3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/enum3.C
295
utf_8
703ef9888858691fda401137ea6e0340
// { dg-do assemble } // Bug 338 and DR 128. Allow static cast to convert between enums. enum E1 {e1}; enum E2 {e2}; E2 Foo (E1 e) { return static_cast <E2> (e); }
google
chromium
syntax3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/syntax3.C
553
utf_8
ea0aa7ca8d71e498d340c85c8bcc2ddf
// { dg-do assemble } // and several others. With templates, it's very easy to say something // erroneous like // template class X::X<whatever> // The culprit // ... class X::X ... // caused us to ICE as we got confused about pushing and popping scopes. class X { public: X(); }; class X::X () {} // { dg-e...
google
chromium
decl2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/decl2.C
332
utf_8
589daf00ab11a288c7fe3c5d5b24404c
// { dg-do assemble } int i(0)(1); // { dg-error "" } multiple initialization int j(2) = 3; // { dg-error "" } multiple initialization int k(4)(5)(6); // { dg-error "" } multiple initialization int m, n(7)(8); // { dg-error "" } multiple initialization
google
chromium
lookup22
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup22.C
196
utf_8
45c0f0aa9666c49e0065d9e14fe7f8fb
// { dg-do assemble } struct super { union { int myName; void* secondMember; }; }; struct sub : super { int myName() { return 1; } };
google
chromium
dll-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dll-2.C
651
utf_8
d967c7f394d25e627016c2e15ede2890
// { dg-do assemble { target arm-*-*pe } } // Microsoft's MSVC 2.0 allows dllimport followed by dllexport for variables, // but does not allow dllexport followed by dllimport. // // Switching between dll{export,import} works for functions. // We test for that too (by ensuring no error is produced). __declspec (dllimpo...
google
chromium
access9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/access9.C
192
utf_8
275ffe84a13a7a7254b6c04ac584ef8b
// { dg-do assemble } // Test that g++ allows friends to use private types in their declarations. class A { typedef int I; friend I f (I); }; A::I f (A::I); A::I f (A::I) { return 0; }
google
chromium
crash14
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash14.C
188
utf_8
a41c516fa6d4cda9be81fec03b88b214
// { dg-do assemble } struct S { }; struct T : public S { }; struct U : public T { }; void f (U); int main () { U u; f (u); }
google
chromium
init17
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/init17.C
469
utf_8
cc3c1af250386499471f365de78ad096
// { dg-do assemble } // Bug 1631. Default initialization of enumeral types did not convert to the // enumeral type. enum X { alpha, beta }; void f(void *ptr) { X y = X (); X y1 (0); // { dg-error "" } cannot convert X y2 = X (0); X *x = new X (); X *x2 = new X (0); // { dg-error "...
google
chromium
crash26
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash26.C
186
utf_8
a9f67dc3be68b25679c337cb411fbadb
// { dg-do assemble } class foo { public: foo(int); }; void bar(bool x) { if(x) foo *a = new foo(foo::not); // { dg-error "" } }
google
chromium
asm2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/asm2.C
190
utf_8
52fdbbd9f9882f7fbb0abca172c7d7ab
// { dg-do assemble } struct C { void f (); }; void C::f () { asm ("" : : "m" (f)); // { dg-error "" } type could not be determined }
google
chromium
vaarg2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/vaarg2.C
1,174
utf_8
8c21b5e35109125a2fe0210c85ae1bc6
// { dg-do run } // { dg-options "-Wno-abi" { target arm_eabi } } // Make sure we can deal with POD aggregate in va_args #include <stdarg.h> extern "C" void abort (); struct X {int m;}; struct Y {int a; int b; int c; int d; int e; int f;}; void fn1(va_list args) { int i = va_arg (args, int); X x = va_arg (args, X)...
google
chromium
overload5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/overload5.C
248
utf_8
ae5b9ad157b8521c8fb2675c60884102
// { dg-do link } struct S {}; struct T : public S {}; struct U : public T {}; void f(int T::*) {} void f(int U::*); void g(void (T::*)(int)) {} void g(void (U::*)(int)); int main() { int S::*ip; void (S::*fp)(int); f(ip); g(fp); }
google
chromium
lookup13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup13.C
247
utf_8
85667729a1c4d4a36960f668f2a14dd0
// { dg-do run } int main() { typedef double I; struct S1 { typedef char I; struct S2; }; struct S1::S2 { typedef I J; }; return !(sizeof (S1::S2::J) == 1); }
google
chromium
ptrmem8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/ptrmem8.C
1,567
utf_8
009011b9cd19b98128e3af55e810f0df
// { dg-do assemble } // bug 827. We died issuing warnings about dangerous pointer to member // conversions. struct bar { int barm; static void a(); }; struct filler1 {int fm;}; struct filler2 {int fm;}; struct filler3 {int fm;}; struct filler4 {int fm;}; struct baz : filler1, bar, filler2 { int bazm; }; struc...
google
chromium
inline7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline7.C
203
utf_8
4eaa61a7f4169081f2327958cf38f524
// { dg-do run } // { dg-options "-O2" } #include <list> std::list<int*> li; void f () { li.size (); } int main () { li.push_back (0); f (); }
google
chromium
builtins5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/builtins5.C
340
utf_8
7f04f8d8d62ea3de9f05662634d150c4
// { dg-do assemble } // Test that built-in functions aren't recognized without a prototype. // Origin: Roger Sayle Mar 20, 2002 int foo () { return (int) ::strlen ("foo"); // { dg-error "" } undeclared } int bar () { return (int) std::strlen ("bar"); // { dg-error "" } undeclared }
google
chromium
using8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/using8.C
776
utf_8
dcadc285f1b7a525ad8b9352919eae27
// { dg-do assemble } // We rejected using decls bringing in functions from a base which would hide a // nested class of the same name, but only if we had no functions by that name // already. Also, we failed to find that using declaration during lookup. Also // we failed to reject using declarations which matched the...
google
chromium
friend8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/friend8.C
372
utf_8
300e9a1ebba6e1b59b9aade1f7c72f54
// { dg-do assemble } // // We failed to diagnose when a class friend declaration did not use an // elaborated type specifier. struct Y; struct Z; struct X { friend class Z; friend Y; // { dg-error "" } friend must use aggr tag };
google
chromium
virtual11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/virtual11.C
488
utf_8
c85db2d12c2f86f74278074a4ea6cbd7
// { dg-do assemble } // We failed to check virtual functions hidden by using declarations. struct A { virtual int foo (); }; struct B { virtual void foo (); // { dg-error "" } of this function }; struct C : A , B { }; struct D : C { void foo (short); using A::foo; }; struct E : D { virtual int foo (); //...
google
chromium
array5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/array5.C
180
utf_8
ad371cb0e0e5569f8e4f12bdaefa7c0d
// { dg-do assemble } // We tried to create a temporary of unknown size and crashed. extern int a1[]; extern int a2[]; int foo(int p) { int x = (p ? a1 : a2)[1]; return x; }
google
chromium
lookup16
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup16.C
576
utf_8
68b1b92ac10f904ef8d7df25feb47671
// { dg-do assemble } // Bug 3 // typenames are not injected early enough, [basic.scope.pdecl]3.3.1/4 // indicates this should compile. struct A { }; struct B : A { typedef A Parent; struct F { }; }; struct C : B { typedef B Parent; struct G {}; struct F : C::Parent::F { typedef C::Parent::F Parent; ...
google
chromium
delete7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/delete7.C
256
utf_8
db00ad7b8cb4aebea3e6520ea992edfe
// { dg-do run } // Test that we call a class-specific vector op delete. #include <new> int r = 1; struct A { void operator delete[](void *p) { r = 0; ::operator delete (p); } }; int main () { A (*p)[2] = new A[2][2]; delete [] p; return r; }
google
chromium
lookup1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup1.C
166
utf_8
f99b40c8a5dca68f114e31c176c89436
// { dg-do assemble } // simple test for id from base class during class defn struct foo { enum { blah = 1 }; }; struct bar : public foo { char cache[blah]; };
google
chromium
dtor1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dtor1.C
211
utf_8
42930a953066f66409a9916d49210973
// { dg-do run } // Test for use of typedef in explicit destructor call. #include <new> struct X { typedef X foo; }; X x; unsigned char bar[sizeof (X)]; int main () { X* p = new (bar) X; p->~foo(); }
google
chromium
using7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/using7.C
211
utf_8
555cd6e25e52a5dcd11e63480967cc2e
// { dg-do assemble } class A { protected: static void f() {} }; class B : A { public: using A::f; void g() { f(); A::f(); } struct C { void g() { f(); A::f(); } }; };
google
chromium
for1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/for1.C
414
utf_8
cbd2042bbd0e31ca134217190c71ebbb
// { dg-do assemble } int i; int j; struct S { int operator()(int) { i = 1; return i; } typedef int I; void f() { for (S I; false; ) ; int k = I(3); } }; typedef int J; struct T { int operator()(int) { j = 1; return j; } void f() { for (T J; ...
google
chromium
lookup4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup4.C
257
utf_8
2adb0f0075c1250803736bde31fee757
// { dg-do run } // Test for proper handling of references to overloaded member functions. struct A { static void f (int) { } void f (); }; void (*p)(int) = &A::f; void A::f () { p = f; } int main() { A a; p = &a.f; (a.f)(); (a.f)(42); }
google
chromium
comdat4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/comdat4.C
672
utf_8
f3481f025b2bc515a0e79ac333c18c02
// PR c++/16276 // { dg-do link } // { dg-additional-sources " comdat4-aux.cc" } // { dg-options "-O2" } extern void bar (int x); inline void foo (int i) { switch (i) { case 3: case 5: case 6: case 9: case 15: bar (1); break; case 2: case 4: case 7: case 10: c...
google
chromium
crash29
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash29.C
175
utf_8
52b9cd9c6a2f857dac5de21020b454ea
// { dg-do assemble } class bar { public: void foo (); void baz (); }; void bar::foo () { baz x(); // { dg-error "" } }