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
crash32
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash32.C
414
utf_8
4b488e0ee229b17e181b7bc4e6d4b5d9
// { dg-do assemble } struct foo { enum e { not // { dg-error "" } }; // { dg-bogus "" } ~foo(); // { dg-bogus "" "" { xfail *-*-* } } void x (foo *&a, bool b = (unsigned char)0); }; // { dg-bogus "" "" { xfail *-*-* } } namespace N { struct bar; template<class T> struct baz { baz(T *p)...
google
chromium
using3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/using3.C
144
utf_8
05f711f6abdedb15c61dbb1d837d2141
// { dg-do assemble } struct A{ A(); }; typedef struct { A i; } S; struct B: S{ using S::S; // { dg-error "" } no such field };
google
chromium
inline13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline13.C
210
utf_8
6d138e6b605ced1518ce48da2e4a8313
// { dg-do assemble } struct foo { inline void bar(); foo(); }; inline void foo::bar() { switch (0) { case 0: break; } } foo::foo() { bar(); }
google
chromium
ptrmem7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/ptrmem7.C
1,599
utf_8
7ca9506666fea6517c4f892b951c872d
// { dg-do assemble } // // A pointer to member can only be formed by `&T::m', however, other forms // are ok for pointer to static member. Thus the error can only be determined // after overload resolution. struct A { static int ns (short); static int ns (float); int ns (int); int ns (double); int single (...
google
chromium
overload8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/overload8.C
308
utf_8
f272a8b69636a219100a059f6d6fbae0
// { dg-do run } class a { public: int f() { return 0; } int f() const { return 1; } }; class b : public a { }; int main() { int (b::* ptr1)() = &b::f; int (b::* ptr2)() const = &b::f; b ao; if ((ao.*ptr1)() != 0) return 1; if ((ao.*ptr2)() != 1) return 1; }
google
chromium
defarg4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/defarg4.C
258
utf_8
710632e062afe5e9c781e28d1840cdbf
// { dg-do assemble } class complex { public: complex(); }; struct MLC33 { MLC33( const complex& = complex() ); }; void EmptyClone() { MLC33(); } void makeM33() { MLC33(); } void Clone() { MLC33(); }
google
chromium
decl7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/decl7.C
157
utf_8
b7922b62c66771d84dbb60a4b1b4545c
// { dg-do assemble } struct S { void* sp; }; void* f () { struct S s = { &s.sp }; return s.sp; }
google
chromium
lineno3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lineno3.C
235
utf_8
5e52821ca49563fbc530d8e6757296ea
// { dg-do assemble } // Bug: g++ gets confused by the #line directive within a method. struct S { void f () { int i; int j; } };
google
chromium
cond4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cond4.C
467
utf_8
ac45c51548ac5c0e398a0afcf2e9042b
// { dg-do assemble } template <class V> class _vec3d { public: double _x, _y; }; class Wvec : public _vec3d<int> { }; template <class T> class TDI { public: T &get(); }; template <class T> class hashvar { public : T _val; TDI<T> *val() const; T get() const { return true ? va...
google
chromium
dyncast3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dyncast3.C
659
utf_8
77acee0de8a57b4945b482ef64b63edc
// { 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++; } struct A {virtual ~A(){}}...
google
chromium
union2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/union2.C
508
utf_8
de2953c02f20c253d55673ce9923a7ab
// { dg-do run } // Bug: g++ crashed on empty initializers for unions. // Bug: gcc and g++ didn't zero unions with empty initializers. extern "C" void exit (int); typedef union u { union u *up; void *vp; } u; static u v = {}; void bar (u); void baz (u); void foo() { u w = {}; u x = { &v }; baz...
google
chromium
ambig3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/ambig3.C
844
utf_8
9c66b70699ff1342d44eb59221237d51
// { dg-do assemble } // // A base which derives a virtual base hides declarations in the virtual base, // even if that virtual base is accessible via another path [10.2]/6. Make // sure that non-virtual bases of the virtual base are also hidden, not matter // what order bases are declared in. struct A {int a;}; stru...
google
chromium
lookup6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup6.C
284
utf_8
2e55b1de5c1daaf0fb4be724a8387f6e
// { dg-do run } int f(int i) { struct C { int i; C () : i(1) {} int f() { struct D { int i; D () : i(2) {} int g() { return i; } } d; return d.g(); } } c; return c.f(); } int main() { if (f(0) != 2) return 1; }
google
chromium
lookup5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup5.C
227
utf_8
0c9ba209e786b7b5cc7c7d95cf1b823c
// { dg-do assemble } template <class T> class vector {}; class foo {}; int main() { foo f; f.vector(); // { dg-error "" } not a method }
google
chromium
debug6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/debug6.C
326
utf_8
23b1cd73956069e85a1cd6af724e04c1
// { dg-do assemble } // { dg-options "-g -O2" } // This causes assember relocation errors struct X { virtual ~X () {} }; struct Y { Y (){}; }; void foo () { X *x = new X; x->~X (); Y ys[2]; }
google
chromium
null1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/null1.C
1,347
utf_8
f79943d385291c23f50b8bbf4a5fdbb7
// { dg-do link } // { dg-options "-Wconversion" } #include <cstddef> void g(int) {} void g(long) {} extern void g(void*); template <int I> void h() {} void k(int) {} template <class T> void l(T); template <> void l(int) {} template <> void l(long) {} int main() { int i = NULL; // { dg-warning "" } convertin...
google
chromium
lookup3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup3.C
283
utf_8
3bd35389c0d7c63e698e0dd66eac2663
// { dg-do run } // Test to make sure that the use of __typeof__ in WIFEXITED works. int main () { int stat_loc = 0; (__extension__ ({ union { __typeof__ (stat_loc) __in; int __i; } __u; __u.__in = (stat_loc); __u.__i; }) ); }
google
chromium
linkage2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/linkage2.C
393
utf_8
7b3fb63fa48296d67b7bca86995e7e3c
// { dg-do assemble } extern "C" { typedef struct {int dummy[10];} *GDBM_FILE; extern GDBM_FILE gdbm_open(); } typedef struct { int dummy[10]; } *FAIL_FILE; extern FAIL_FILE fail_open(); // { dg-error "" } non-local function typedef struct { int dummy[10]; } *SUCCESS_FILE, S; extern SUCCESS_FILE success_open();
google
chromium
lex1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lex1.C
297
utf_8
7c7aaab427900113172f72ddcd0b0c5e
// { dg-do assemble } // // Bug 2510. We ICEd when a bogus char was present. void foo () { // there is a ctrl-h on the next line  // { dg-error "" } stray char }
google
chromium
pmf6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/pmf6.C
462
utf_8
b31a25b82d28a89a3180f169923be884
// { dg-do run } // Test that we only call f once and that pointers to different subobjects // compare as different. struct A { void f() { } }; struct B: public A { }; struct C: public A { }; struct D : public B, public C { }; typedef void (B::*bp)(); typedef void (C::*cp)(); typedef void (D::*dp)(); dp d1; int ca...
google
chromium
pod1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/pod1.C
314
utf_8
b8cb1438215d0abddbda0e8e4d70f10d
// { dg-do assemble } // DR 148. Now allows pointer to members in POD struct. struct X { int X::*m; int (X::*f) (); }; void Foo (int, ...); void Baz () { X x; Foo (1, x); }
google
chromium
dtor3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dtor3.C
657
utf_8
8f3f1d766e7a640091d25ad94a1ffdb5
// { dg-do assemble } struct S1 { ~S1(int); // { dg-error "" } destructors may not have parameters }; template <class T> struct S2 { ~S2(int); // { dg-error "" } destructors may not have parameters }; struct S3 { ~S3(double) {} // { dg-error "" } destructors may not have parameters }; template <class T> ...
google
chromium
op1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/op1.C
136
utf_8
47d2d0b024512d64bb5cf3a664e78979
// { dg-do assemble } struct S { bool operator! (int, ...); // { dg-error "" } };
google
chromium
typedef2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/typedef2.C
135
utf_8
7691281c2c879357cb49ac4141e7abdf
// { dg-do assemble } struct S{ static const int i; static const int j; }; typedef S T; const int T::i = 4; const int T::j = 4;
google
chromium
linkage1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/linkage1.C
363
utf_8
f415d984740e9e018b21e481dcd83884
// { dg-do assemble } typedef struct { int i; } *p; void f (p) { } // { dg-error "uses anonymous type" } p q; // { dg-warning "uses anonymous type" } int main() { extern p j; // { dg-warning "uses anonymous type" } struct A { int j; }; extern A a; // { dg-warning "uses local type" } extern void f...
google
chromium
static7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/static7.C
132
utf_8
5716a35500cf10cf7c0b79db0019b806
// { dg-do run } int j = 42; int main () { static int i = j; return (i != 42); }
google
chromium
crash42
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash42.C
377
utf_8
af8f62de6c70479ed39928da6720383e
// { dg-do assemble } // { dg-options "-g" } // // Bug 3152. Using a typedef to declare a function used an unset // global variable, last_function_parms. struct actor { typedef bool (operation)(); operation a; operation b; operation c; };
google
chromium
overload6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/overload6.C
199
utf_8
d04ef404bb73d618062ed7ed78c01903
// { dg-do run } extern "C" void abort(); struct S1 { int f() { return 0; } int f() const { return 1; } }; struct S2 : public S1 { }; int main() { S2 s2; if (s2.f() != 0) abort (); }
google
chromium
incomplete
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/incomplete.C
556
utf_8
5eac42064e4beea7ad7dcd49e3ed88db
// { dg-do assemble } // gcc represents non-ellipsis parmlists by terminating them with // a void parm. We need to distinguish between a parmlist of (void), and // some ill-formed ones. struct S; // { dg-error "" } forward ref void f(S); // ok void f(S s) {} // { dg-error "" } incomplete type void...
google
chromium
builtins7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/builtins7.C
400
utf_8
4395e6192c7bdea88521a5bbd51f34e0
// { dg-do run } // { dg-options "-O2" } // Test that built-in functions are recognized with a prototype. // Origin: Roger Sayle Mar 20, 2002 // extern "C" void link_error (void); namespace std { typedef __SIZE_TYPE__ size_t; extern "C" size_t strlen (const char*); } int main () { if (std::strlen ("foo") != 3) ...
google
chromium
typedef5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/typedef5.C
496
utf_8
f7a7e105c161d1bd575ee9abf15972ce
// { dg-do assemble } typedef int t; typedef t* u; typedef u v; typedef v* (*w)(t); typedef int t; typedef t* u; typedef u v; typedef v* (*w)(t const); // this is ok typedef v* (*w)(t); // { dg-error "" } covers message `previously declared here' typedef v* (*const w)(t); // { dg-error "" } invalid redeclaration typed...
google
chromium
rtti3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/rtti3.C
1,394
utf_8
a38005b6d0e8fdd5bd057e0c2b48bccd
// { dg-do run } // { dg-options "-frtti" } // test of rtti of single inheritance and multiple inheritance with // virtual functions #include <typeinfo> extern "C" { int printf(const char *, ...); void exit(int); } class X { public: int xi; virtual int f() {return 0;}; }; class Y : public X { short ys;...
google
chromium
eh
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/eh.C
260
utf_8
0268c0e962508ed426bff1e44757f34b
// { dg-do assemble } class foo { public: ~foo(); foo &operator=(const foo &); foo e() const; }; class bar { public: foo d() const; }; struct x { foo a; bar* b; }; void baz(x *f, int ic) { f->a = ic ? f->b->d().e() : f->b->d(); }
google
chromium
access1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/access1.C
137
utf_8
4781d101689a334ce5edaf88a1e77c83
// { dg-do assemble } class X{ unsigned int i; public: void f(); }; void X::f() { union { int foo[sizeof (i)]; }; }
google
chromium
using2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/using2.C
113
utf_8
6c35041de2c842ecc924c4de5eb53781
// { dg-do assemble } struct X{ void f(); }; struct Y:X{ void f(int); void f(); using X::f; };
google
chromium
virtual4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/virtual4.C
411
utf_8
aae91d68382d78f5fff446edb0141d1c
// { dg-do assemble } class A { public: virtual int foo() = 0; // { dg-error "" } original definition }; class B { public: virtual double foo() = 0; }; class C : public A, public B { public: virtual double foo() { return 2; } // { dg-error "" } conflicting return type }; class D : public B, public A { ...
google
chromium
vbase4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/vbase4.C
490
utf_8
69bf12b116250163342f3546f41dff4c
// { dg-do assemble } // Bug 933. Secondary vtables weren't correctly located for non-primary // virtual bases. Causing us to ICE. class d0_Object { public: virtual ~d0_Object (); }; class M10 : virtual public d0_Object {}; class M4 : virtual public M10 {}; class M9 : public M4, virtual public M10 { public: M9 (); }; ...
google
chromium
crash16
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash16.C
261
utf_8
e2583d606408edde03d81c01b8ba817f
// { dg-do assemble } // { dg-options "-O2" } void _S_initialize(); class locale { public: locale() throw() { _S_initialize (); } }; void foo(const locale& __loc); void print (const int&) { foo(locale()); }
google
chromium
conv6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/conv6.C
689
utf_8
513fd12232465c23dbf171d56a61cb8a
// { dg-do run } // Test for composite pointer types, as defined in [expr.rel], // and common pointer to member types, as defined in [expr.eq]. struct A { int i; }; struct B : public A { }; int main () { B b; // The composite type is `A const *' A* ap = &b; const B* bp = &b; if (ap != bp) // { dg-b...
google
chromium
crash12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash12.C
222
utf_8
1ecd49225243c3c830fc3dc18bf42f4f
// { dg-do assemble } // { dg-options "" } template<typename T> struct S { void f() {} }; int main() { S<int> s; int len = 50; char array[len]; s.f(); }
google
chromium
inline12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline12.C
7,792
utf_8
b345c4f1fbc76ff8eea95ef0d960c978
// { dg-do assemble } // { dg-options "-O2 -g" } // (Should preferrably cycle through options.) // See <URL:http://gcc.gnu.org/ml/gcc-patches/2000-06/msg00310.html> typedef unsigned int udword; extern "C" { void __assert (const char *, int, const char *); } class ShZzy; class ShBe; class Sh { public: class Xy; ...
google
chromium
virtual5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/virtual5.C
246
utf_8
f183acc74794fda2e8a0f2e69d95b26c
// { dg-do assemble } // { dg-options "-w" } class vector {}; class V { }; class A : public vector { }; class B : public A, virtual V, public vector { B() {} };
google
chromium
mangle2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/mangle2.C
269
utf_8
87f64d8c97e5d1f8d2473475b0171ff6
// { dg-do assemble } // Test for overloaded operators in "C" linkage extern "C" { typedef struct b { int a; } c; extern const c z; inline bool operator!=(const c& x, const c& y) { return x.a != y.a; } } void foo(); void bar(c x) { if (x != z) foo(); }
google
chromium
crash19
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash19.C
159
utf_8
0ab3c2f96220a27295790bc3c1e52831
// { dg-do assemble } template <class T> struct S {}; struct X {}; void f () { typedef X Y; S<Y> s; }
google
chromium
typename1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/typename1.C
373
utf_8
d0f03fee5fed088bc6dbc56c6af6710b
// { dg-do assemble } // { dg-options "-pedantic -Wno-deprecated" } // This code snippet should be rejected with -pedantic template<class T> class Vector { public: typedef T* iterator; }; template<class T> void f() { Vector<T>::iterator i = 0; // { dg-error "expected" } missing typename }
google
chromium
goto1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/goto1.C
276
utf_8
f7be1197051cef5c4a84228232f830bc
// { dg-do assemble } struct S { S (); ~S (); }; void f () { { S s1; // { dg-error "" } skips initialization t: // { dg-error "" } jump to label S s2; ; } goto t; // { dg-error "" } from here }
google
chromium
pmf5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/pmf5.C
599
utf_8
d2bcb17f853c43ef64a4867c0150e323
// { dg-do run } // Bug: g++ expanded b->member() multiple times, causing the optimizer to // decide that things weren't related and optimize 'die' into an infinite // loop. struct A { virtual ~A() { } void f (bool) { } }; typedef void (A::*pmf_void)(); typedef void (A::*pmf_bool)(bool); struct B { ~B() {} ...
google
chromium
copy1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/copy1.C
317
utf_8
bcb09919195a6c71370b1f44704a9ace
// { dg-do run } // Bug: expand_vec_init doesn't copy arrays of builtin types. struct B { B() { } B(const B&) { } }; struct A { B b; int ar[5]; }; int main() { A a; for (int i = 0; i < 5; ++i) a.ar[i] = i; A a2 = a; for (int i = 0; i < 5; ++i) if (a2.ar[i] != a.ar[i]) return 1; }
google
chromium
call1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/call1.C
577
utf_8
0c90f373fd88712b9af55b3d45ab88f8
// { dg-do run } // Test that various calls to non-functions work. void f () { } typedef void (*fptr)(); typedef void (&fref)(); fptr p = f; fref r = f; const fptr &pr = p; struct A { fptr p; A (fptr n): p(n) { } operator fptr () { return p; } }; struct B { fref r; B (fptr n): r(*n) { } operator cons...
google
chromium
for2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/for2.C
353
utf_8
542e3d0c6c6213214631bbea885d8ce6
// { dg-do assemble } // Bug 306 // binding a reference in for scope creates nameless objects. Make sure // we don't try and inject them into scope, for ARM compatibility. void foo () { for (const int &thing = 0;;) ; }
google
chromium
string2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/string2.C
386
utf_8
54063a09aa297bbbcf4708e110652da3
// { dg-do run } // A char const array should never be confused for a string literal. int main () { static const char ary[] = "wibble"; void const *ptr = 0; ptr = ary; if (ptr == "wibble") return 1; if (ptr != ary) return 1; return 0; }
google
chromium
lookup18
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup18.C
437
utf_8
21f8dfca32a2d700b3161a29e71363d4
// { dg-do assemble } // Test that referring to an ambiguous base in name lookup prevents // access to the field, even though the field is not ambiguous. struct A { int i; }; struct B: virtual A { }; struct C: public B { }; struct D: public B { }; struct E: public C, public D { void f (); }; void E::f() { B::...
google
chromium
ptrmem4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C
247
utf_8
bb327e881454a6a26fa54655b2093d87
// { dg-do run } // Test to make sure g++ can handle target types that aren't identical // with pointers to members. struct A { int i; }; struct B : public A { }; int main () { int A::*p = &A::i; const int B::*q = &A::i; return p != q; }
google
chromium
struct1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/struct1.C
903
utf_8
d0fef28f76677a1cd976d576a9a7fd19
// { dg-do assemble } // Duplicate definitions are wrong, we should just cough // politely, but we used to die horribly. class Y { // { dg-error "" } previous definition }; class Y // { dg-error "" } redefinition { }; template<class T> class X { // { dg-error "" } previous definition }; template<class T> class ...
google
chromium
cast5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cast5.C
915
utf_8
3da45a84fdb0e4b43d9260d61d9695bb
// { dg-do assemble } // Array of cv T decays to pointer to cv T, and pointer to array of cv T can // be converted to pointer to cv T. We need to make sure the `cv's don't // confuse us. typedef char const *ary_t[2]; void f0 (ary_t const *const &ary) { static_cast <void const *> (ary); static_cast <void *> (ary); ...
google
chromium
dtor9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dtor9.C
201
utf_8
f3a397572b3d30079dae4262a09ad6dd
// { dg-do run } int i; struct CC { virtual ~CC () { ++i; } }; class BB : virtual public CC { }; class AA : public virtual BB { }; int main () { { AA xx; } if (i != 1) return 1; }
google
chromium
deref1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/deref1.C
496
utf_8
382473fc6c53960e79489c1e820820b1
// { dg-do assemble } // [expr.unary.op]/1 says you can dereference all pointers except for pointers // to cv void. void fn (void *vp, volatile void *vvp) { *vp; // { dg-error "" } not a pointer to object *vvp; // { dg-error "" } not a pointer to object &*vp; // { dg-error "" } not a pointer to obje...
google
chromium
array3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/array3.C
443
utf_8
3bec1e5398fe3d1e7e5d9487c5d0e37a
// { dg-do assemble } // // bug 386.C We ICE'd before emitting a diagnostic when trying to // initialize a constant non-pod array from something bogus. struct A { A(char); }; class B { const A ary[16]; B (const A ary[]); }; B::B (const A a[]) : ary(a) // { dg-error "bad array initializer" } { }
google
chromium
defarg3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/defarg3.C
131
utf_8
66bed1c478469224297df66607f38744
// { dg-do assemble } int* hp; int* jp; void f (int *ip, int kp = hp - jp) { }
google
chromium
union1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/union1.C
225
utf_8
538a4c98eca920ebe7c798e2fbfca3d4
// { dg-do assemble } class A { private: int myInt; public: A& operator = (int right) {myInt = right; return *this;} }; union B { char f1; A f2; // { dg-bogus "" } non-copy assignment op is OK };
google
chromium
dyncast2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dyncast2.C
1,589
utf_8
3d3d7f8af29920e383800473352bbc3b
// { dg-do run } // test of dynamic_cast // runtime detecting of valid // downcasts within nonpublic // baseclasses. 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 single inheritance case str...
google
chromium
builtins6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/builtins6.C
377
utf_8
b6316b52e8653a9cd53c0f5148b0daee
// { dg-do run } // { dg-options "-O2" } // Test that built-in functions are recognized with a prototype. // Origin: Roger Sayle Mar 20, 2002 // typedef __SIZE_TYPE__ size_t; extern "C" size_t strlen (const char*); extern "C" void link_error (void); int main () { if (strlen ("foo") != 3) link_error (); return...
google
chromium
overload14
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/overload14.C
384
utf_8
1814ba09dcbbc9987c90048e924acf14
// { dg-do run } // { dg-options "-Wconversion" } extern "C" void abort(); struct A { typedef double (&B); typedef const double (&C); A() { } operator C () const; operator B (); }; static const double d = 2.0; static double e = 3.0; A::operator A::C () const { abort (); return d; } A::operator A::B...
google
chromium
builtins3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/builtins3.C
363
utf_8
0b197580584cf50c69e128310bb59412
// { dg-do run } // { dg-options "-O2" } // Test whether this builtin minimally works in G++. // Origin: Kaveh Ghazi Jan 16, 2001 // namespace std { extern "C" void abort (void); } int main () { using namespace std; void *foo; foo = ::__builtin_alloca (32); if (!foo) abort (); return 0; }
google
chromium
array4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/array4.C
98
utf_8
95a3df89db79879be49e39caf37b733d
// { dg-do assemble } enum { FOO = 3 }; int* arr = new int[FOO];
google
chromium
nested1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/nested1.C
163
utf_8
0acdd865dd1d89a48fa1161141acf8d7
// { dg-do assemble } struct C { struct D { }; }; struct E { C& c; void g(); }; void E::g() { c.D().f(); // { dg-error "" } no matching function }
google
chromium
vtbl2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/vtbl2.C
1,625
utf_8
eb95e5130876ef3196237bb42ac3c02a
// { dg-do run } // vtable construction reorganisation broke this // execution test #include <stdio.h> static int fail = 0; void bad (char const *name) { printf ("Bad %s\n", name); fail = 1; } void ok (char const *name) { printf ("Ok %s\n", name); } struct Core { virtual ~Core (); virtual void Wibble () {bad...
google
chromium
init11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/init11.C
590
utf_8
a945aed16fc33d3e6afcb1dc09661a05
// { dg-do run } // Check that elements for which no explicit initializer was given are // default-initialized properly. extern "C" int printf (const char *, ...); struct A { int i; A(): i (42) { } A(int j): i(j) { } }; A ar[4] = { 1, 2 }; struct B { A a1, a2, a3, a4; }; B b = { 1, 2 }; struct C { A ar...
google
chromium
inline17
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline17.C
250
utf_8
71248f6786229af294e1836c18601abb
// { dg-do assemble } // { dg-options "-O3" } struct foo { char a; foo (); void bar (); void baz (char c); }; void foo::baz (char c) { if (c != a) a = c; } void foo::bar () { baz (1); }
google
chromium
init7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/init7.C
527
utf_8
218366b1db7ad573de9089b8dc32b49f
// { dg-do run } // simplified from testcase in Windows Developer Journal, // The initialization of a static local variable must be retried if a // previous try finished by throwing an exception [stmt.dcl]/4 extern "C" void abort (); struct foo { foo() { throw true; } }; void bar() { static foo baz; } int main() {...
google
chromium
bitfld1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/bitfld1.C
222
utf_8
56c6d186238c4423a7d3d97bacd8cd42
// { dg-do assemble } // declares template operator!= #include <utility> struct foo { enum e { bar } baz:1; void test() { baz != bar; } };
google
chromium
crash23
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash23.C
236
utf_8
af65e288be12d726dd36d9f12b4a6332
// { dg-do assemble } class T; inline void operator<(T&, T&) { } // { dg-error "" } previous definition inline void operator<(T&, T&) { } // { dg-error "" } duplicate definition
google
chromium
anon6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/anon6.C
441
utf_8
4f0bd17a856faeab69b4712edbe53eed
// { dg-do run } extern "C" void abort (); struct A { union { int a; double b; int d; }; int c; }; struct B : public A { union { double a; void *c; }; float b; int e; }; int main () { struct B b; b.a = 1.5; b.b = 2.5; b.d = 1; b.e = 2; if (b.a != 1.5 || b.b != 2.5 || b...
google
chromium
null3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/null3.C
53
utf_8
f8b25e8f3d0cef5866fb3d971ab4f1de
// { dg-do assemble } void x() { int* p = 1==0; }
google
chromium
overcnv1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/overcnv1.C
162
utf_8
85b2e733960278035f693286903dd300
// { dg-do assemble } class A { public: void f(const char * const * ); }; void f(const char * const *) {} void g() { char *ar[10]; A a; f(ar); a.f(ar); }
google
chromium
delete5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/delete5.C
617
utf_8
f2e3e23b1fda185e1f462c9e3bf913e6
// { dg-do assemble } typedef __SIZE_TYPE__ size_t; struct X { int i; X():i(){} void *operator new(size_t) { return 0; // { dg-warning "" } cannot return NULL } void *operator new[](size_t) { return 0; // { dg-warning "" } cannot return NULL } }; struct Y { int i; Y():i(){} void *op...
google
chromium
eh3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/eh3.C
292
utf_8
260c328a7fb09ba03925bbff7306c211
// { dg-do run } // { dg-options "-O" } typedef struct { } e; char *p; void _Jv_throw (); int barf (int len) { char a[len]; p = a; _Jv_throw (); return 0; } void _Jv_throw () { e ex; throw ex; } int main () { try { barf (2); } catch (...) { } return 0; }
google
chromium
linkage6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/linkage6.C
253
utf_8
031860326d5d4c1b03d2fa8b5333dc2b
// { dg-do assemble } // { dg-options "-fno-weak" } template <typename T> void f (); void h () { f<int> (); } template <void (*X)()> void g () {} template <typename T> void f () { g<&f<T> >(); }
google
chromium
init8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/init8.C
210
utf_8
8f1fad4a3628e33ecda8e9b1d591d956
// { dg-do assemble } // According to [dcl.init]/9, this should be ill-formed void f() { const int var [ 10 ]; // { dg-error "" } missing initializer }
google
chromium
const1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/const1.C
119
utf_8
6f779a48e303e5714ade1dc1eaf9964f
// { dg-do assemble } struct S { void f() { const int i; // { dg-error "" } uninitialized const } };
google
chromium
exprstmt1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/exprstmt1.C
702
utf_8
cb97f0a4d350c5545ed921b0c95d1800
// { dg-do run } // { dg-options "-O" } // { dg-error "limited range of data type" "16-bit target" { target xstormy16-*-* } 0 } // { dg-error "shift count >=" "16-bit target" { target xstormy16-*-* } 0 } int main() { unsigned int x = 1381237248; if (sizeof (x) != 4) return 0; x = ({ unsigned int...
google
chromium
loop2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/loop2.C
476
utf_8
d0ed38cceb3178f8c2ffeb15967bdd06
// { dg-do assemble } // { dg-options "-O" } class foo { public: operator const char*() const { return a; } char *a; }; class bar { public: ~bar(); void operator++(int); bool b() const; protected: void* c() const; }; class baz : public bar { public: foo const &d() const { return *(foo *)bar::c(); } };...
google
chromium
cvqual1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cvqual1.C
158
utf_8
318c1c72b2da29f5b9e81e957fcbc16e
// { dg-do assemble } int i = 3; void *pv=&i; const void* pcv=&i; int main() { pcv = 0 ? pv : pcv; }
google
chromium
cast2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cast2.C
461
utf_8
3edf5ed8769c2a52a2ea5cbefce749fc
// { dg-do assemble } struct A { }; int main() { A a; typedef void (A::*F)(); F p; const_cast<const A>(a); // { dg-error "" } const_cast requires pointer/ref types const_cast<F>(p); // { dg-error "" } const_cast requires pointer/ref types const_cast<int (*)()>(&main); // { dg-error "" } function type in co...
google
chromium
overload9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/overload9.C
220
utf_8
7a6d8d2604d3c3cdbd9267f412bb7ad2
// { dg-do run } struct T { ~T() {} }; int g () { foo: T t; int f(int); bar: T t2; int f(double); return f(3); } int f(int) { return 0; } int f(double) { return 1; } int main() { return g(); }
google
chromium
defarg5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/defarg5.C
228
utf_8
c8d9865e55428fe9bef770d7cf7a264d
// { dg-do assemble } // Bug: the SAVE_EXPR in the new expression remembers that it's in g(), // causing the compiler to crash in h(). struct A { A (); }; void f (A* = new A); void g () { f (); } void h () { f (); }
google
chromium
dcast2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dcast2.C
276
utf_8
76c9f4918ecd1c1a16e2d4a1cfd10a97
// { dg-do assemble } struct B { virtual ~B(); }; struct D : public B { }; void foo() { B x; dynamic_cast<D*>(&x); // { dg-warning "" } will never succeed B* p = &x; dynamic_cast<D*>(p); }
google
chromium
init15
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/init15.C
451
utf_8
acbc04d2aab1cb7f7fdd4569759a9c75
// { dg-do assemble } // Origin GNATS bug report 136 from // language specific constants caused the backend's constant caching machinery // to fall over. struct A { const char *name; int reserved; int a; int b; void (A::*func)(); void Fn (); }; void Interpret() { struct A cmd_list = {"a",0,0, 0,&A::F...
google
chromium
ref4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/ref4.C
476
utf_8
79d707ba18e6801d7bcfcbfa35d50f7a
// { dg-do assemble } // Bug 2117. A conversion op to reference type created a temporary, even // when bound to another reference. struct Abstract { virtual void Foo () = 0; }; struct Proxy { operator Abstract & (); Abstract &Convert (); }; void Baz (Abstract &); void Foo () { Proxy proxy; Baz (proxy); ...
google
chromium
main2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/main2.C
133
utf_8
3c711568f6920792b9d9ba90585265c2
// { dg-do assemble } double main () {} // { dg-error "" } main must return `int'
google
chromium
dtor7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dtor7.C
320
utf_8
8706c67091af1a99f99c926204a00007
// { dg-do run } // { dg-options "-O2" } int i; int j; struct A { A (); A (const A&); ~A (); }; A::A () { ++i; } A::A (const A&) { ++i; } A::~A () { --i; } A f () { return A (); } void g (const A&) { } int main () { g (f ()); return i; }
google
chromium
nested2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/nested2.C
255
utf_8
aeef223a893d7a87dce9b388f1cd200f
// { dg-do assemble } struct M1 { struct I {}; }; struct M2 { struct I {}; struct J : virtual public M2::I, virtual public M1::I {}; };
google
chromium
ref2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/ref2.C
216
utf_8
cc81859ae9c266583b18d8a58fe87aed
// { dg-do assemble } struct A { int operator * (); }; struct B : public A { }; int operator * (B &); int main () { B b; B& br = b; *br; }
google
chromium
lookup14
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup14.C
163
utf_8
557c4eed5560ec6f7f08ef624ba62960
// { dg-do assemble } union U { typedef int I; struct S { void f(); }; }; void U::S::f() { I i; }
google
chromium
builtins8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/builtins8.C
419
utf_8
dfc338f135a8279a02404bc9fe49be59
// { dg-do run } // { dg-options "-O2" } // Test that built-in functions are recognized with a prototype. // Origin: Roger Sayle Mar 20, 2002 // extern "C" void link_error (void); namespace std { typedef __SIZE_TYPE__ size_t; extern "C" size_t strlen (const char*); } using namespace std; int main () { if (strlen ("...
google
chromium
debug7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/debug7.C
180
utf_8
291c9e5d4d89fc28eb097defb251f26a
// { dg-do link } // { dg-options "-g -O2" } namespace std { const int __stl_chunk_size = 7; } int main () { }
google
chromium
dyncast4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dyncast4.C
438
utf_8
e7ae9ecae1158825c61dc13b8aa8b855
// { dg-do run } // Even in a derived class, a private base cannot be dynamically downcasted // from. extern "C" void abort(); struct A { virtual ~A () {} }; struct B : private A { B* a2b (A* objp) { return dynamic_cast<B*> (objp); } }; int main () { B b; A* aptr = (A*) &b; if (dynamic_cast <B*> (apt...
google
chromium
loop1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/loop1.C
359
utf_8
ff15837f3804b9245a281d67b6046de8
// { dg-do run } // { dg-options "-O2" } // Test for bad loop optimization of goto fixups. typedef bool (*ftype) (); int c, d; struct A { A() { ++c; } A(const A&) { ++c; } ~A() { ++d; } }; void f (ftype func) { A a; do { if ((*func)()) return; } while (true); } bool test () { return true; } main...
google
chromium
typedef3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/typedef3.C
164
utf_8
8016305c244d25142ebc9bf73cf36155
// { dg-do assemble } template<class T> struct X{ T v; X(){} virtual ~X(){} virtual inline T f(T x){return x;} }; void f() { typedef int H; X<H> y; }
google
chromium
debug5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/debug5.C
147
utf_8
acf7d6efd1fb48de4b8f25567876691d
// { dg-do assemble } // { dg-options "-g" } struct S { ~S (); }; void f () { t: S s3; }