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
lookup10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup10.C
106
utf_8
d870c2b83ff4174d5142d37d47482ac8
// { dg-do assemble } struct A { struct B { static int i; }; enum { a }; }; int A::B::i = a;
google
chromium
inline11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline11.C
542
utf_8
3bd78b7aee29c89595c18932ab7c6ff7
// { dg-do assemble } // { dg-options "-O2" } class baz { public: baz& operator += (const baz&); }; inline baz& baz::operator += (const baz& r) { return *this; } inline baz operator + (int x, const baz& y) { return y; } static inline baz bar (int alpha); static inline baz foo (int alpha) { baz tmp = alpha + ...
google
chromium
cast1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cast1.C
229
utf_8
3e481321ce6593bc8e2a10365bdd175a
// { dg-do assemble } struct S0 { }; struct S1 : virtual public S0 { }; struct S2 : virtual public S0 { }; struct S3 : public S1, public S2, virtual public S0 { }; void f(const S0*) {} void g() { f(static_cast<S3*>(0)); }
google
chromium
syntax2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/syntax2.C
308
utf_8
fef6c903a3c6e37acec0c8b57da07155
// { dg-do assemble } // { dg-options "-fsyntax-only" } struct B { double d; virtual void f (); }; struct C: virtual public B { char c; }; struct D: virtual public B { int i; virtual void f (); }; struct E : public C, public D { }; E e;
google
chromium
return1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/return1.C
270
utf_8
9c8cbb38ce8d4bece4eccb6a484c763c
// { dg-do assemble } // Special g++ Option: struct C { int f() {return 0;} }; struct D { C a[1]; C* g(); }; C* D::g() { int i = 0; while (i < 1 && a[i].f() != 1) {} return undefined_variable; // { dg-error "" } }
google
chromium
delete3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/delete3.C
585
utf_8
2b4ccd5eba9b684fb50aa6134ccb3787
// { dg-do run } #include <new> int i; extern "C" int printf (const char *, ...); template <class T, class U> struct map { ~map (); }; template <class T, class U> map<T, U>::~map () {} struct SomeClass { }; void* operator new(size_t numBytes, SomeClass&, const std::nothrow_t&) throw() { return operator new(...
google
chromium
array9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/array9.C
97
utf_8
87ec86cd5f9b8c9a9c9b300876e3dccb
// { dg-do assemble } template <class T> class A { T *d; public: void f() { (T[10])d; } };
google
chromium
using9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/using9.C
522
utf_8
93d1ed4adb130eb9fc3d60050dc39707
// { dg-do assemble } // // Bug 75. using declarations cannot introduce functions which ambiguate // those in the current namespace, BUT here we're reaccessing the current // namespace -- the function is not being 'introduced'. extern int a(); struct x {}; using ::x; using ::a; extern "C" void foo (); namespace { e...
google
chromium
refinit2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/refinit2.C
718
utf_8
46335621d24696cad55e77a231ae9250
// { dg-do assemble } // // bug 381. We gave slightly different diagnostics, when binding an rvalue to // a non-const reference, depending on the precise type to the rvalue. namespace A { template <class T> void f(T) {} } void (* &h)(int) = A::f<int>; // { dg-error "" } rvalue to non-const void (*const volatil...
google
chromium
crash13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash13.C
182
utf_8
b0a2fa7128614543dd35f84eefd11f1a
// { dg-do assemble } struct Base_bitset { unsigned M_w[2]; void M_do_right_shift(); }; void Base_bitset::M_do_right_shift () { unsigned n = 0; M_w[0] = M_w[n + 1] ; }
google
chromium
static11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/static11.C
295
utf_8
64a40bc5f69b830a25453fd37ea10cd1
// { dg-do assemble } enum ReservedName { rIGNORE, rINCLUDE }; void maybeStatusKeyword() { static const ReservedName statusKeywords[] = { rINCLUDE, rIGNORE }; for (int i = 0; i < 2; i++) { ReservedName r = statusKeywords[i]; } }
google
chromium
access3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/access3.C
343
utf_8
046e318ea200701dd28791f84d3364ca
// { dg-do assemble } // The standard sez that a use of a name gets the most access it can through // the various paths that can reach it. Here, the access decl in B gives // us access. struct A { void f (); }; struct B: private virtual A { A::f; }; struct C: private virtual A, public B { }; int main () { ...
google
chromium
inline21
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline21.C
634
utf_8
7a3ef5192a33feec85ef28205357b71b
// { dg-do run } // { dg-options "-O2" } // DECLARATIONS struct Record { Record (int bb) : b (bb) { } int extra; // Having an extra member in record is crucial. int b; }; struct Container { Record record; // The const on the next line is crucial. Container ( const Record b) : re...
google
chromium
stmtexpr2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/stmtexpr2.C
155
utf_8
efe0ae4dc8f0b66c61c03ab2a35a0a2a
// { dg-do assemble } // { dg-options "-O2" } void bar(int); void foo(int x) { bar(({ int y; y = x; })); }
google
chromium
cond3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cond3.C
300
utf_8
a1c2753cfb142a358f8ffc3053ae4a4f
// { dg-do assemble } class Wtransf {}; const Wtransf Identity2 = Wtransf (); class HELPER { public: int current() const { return 0; } }; void problem_function() { HELPER tm; Wtransf delta = (tm.current()) ? Identity2 : Wtransf(); }
google
chromium
ref3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/ref3.C
262
utf_8
a72ffc53a7a0019d3ab3c81b13884063
// { dg-do run } struct B1 { int i; }; struct B2 { int j; }; struct D: public B1, B2 { }; bool f (B2& b) { return b.j == 7; } int main () { D d; d.i = 2; d.j = 7; if (!f (d)) return 1; }
google
chromium
dll-3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dll-3.C
371
utf_8
8b98f2004a966104a390f6cc5bf87729
// { dg-do assemble { target arm-*-*pe } } // { dg-options "-mno-nop-fun-dllimport" } // set compiler_result "__imp_f1.*\.section${spaces}.drectve\n\[^\n\]*-export:f2" // set not_compiler_result "__imp_f2" class aClass { public: __declspec(dllimport) int f1(); __declspec(dllexport) int f2(); }; __declspec(...
google
chromium
using4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/using4.C
219
utf_8
b9957a14eef8c9cfa198dafcb46f2a11
// { dg-do assemble } struct foo { void m(); }; struct bar : foo { using foo::m; void m(int); }; void f() { bar b; b.m(); b.m(1); }
google
chromium
overload10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/overload10.C
160
utf_8
05e31669787864f1c11b882a62ef8b59
// { dg-do assemble } const char *pc; enum A { x } a; int i; int main() { return i ? *pc : a; }
google
chromium
vtbl1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/vtbl1.C
186
utf_8
d53c4432baa20a0f63dd7f479d478d65
// { dg-do link } class X { public: int i; X() { i = 0; } ~X(); virtual int foo() { return i; } virtual void bar(); }; int main() { }
google
chromium
using6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/using6.C
475
utf_8
fd1a1050ed74f9d20e346be428209ebf
// { dg-do run } // Test of class-scope using-declaration for functions. #define assert(COND) if (!(COND)) return 1 struct A { int f(int) { return 1; } int f(char) { return 2; } }; struct B { int f(double) { return 3; } }; struct C : public A, public B { using A::f; using B::f; int f(char) { return 4; } }
google
chromium
lookup12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup12.C
202
utf_8
498b648156e20d27ee54c22b9aa0a165
// { dg-do assemble } struct B { struct X {}; }; struct D : public B { void X(); struct X x; void f(); }; void D::f() { struct X y; }
google
chromium
align
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/align.C
224
utf_8
73bdfe8d6d8f2a96e6ea0812e1c73bc8
// { dg-do assemble } #include <string.h> class bar { public: bar() { rw = 0; } static const bar baz; private: unsigned char rw; }; char buf[4096]; void foo(char *uc) { memcpy(buf,&bar::baz,sizeof(bar)); }
google
chromium
crash39
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash39.C
429
utf_8
135d27e338f13f3cf263a6d927ea3b3d
// { dg-do assemble } // Bug 595. We failed to clear out some things after seeing a duplicate // struct definition. That caused us to become inconsistent. struct X { ~X (); }; struct S { X a; }; // { dg-error "" } previous defn struct S { X a; }; // { dg-error "" } redefinition void c1(S s) { }
google
chromium
dtor2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dtor2.C
116
utf_8
573c74f438072a08f4c7e076c4fde80a
// { dg-do assemble } class K { public: friend class C; private: static K qwe; K(); ~K(); }; K K::qwe;
google
chromium
sizeof2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/sizeof2.C
271
utf_8
b31eda0e2e2b2a4d007a778a5211d562
// { dg-do assemble } struct S { int j; int i[2]; // { dg-error "" "" { xfail *-*-* } } non-static data member }; void f () { sizeof (S::j); sizeof (S::i[0]); // { dg-error "" "" { xfail *-*-* } } used here }
google
chromium
defarg2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/defarg2.C
257
utf_8
e9dc61c83b948a4d158bfdb94b298963
// { dg-do run } // Test that default args don't mess up pmf type comparisons. struct A { void f (int = 0) { } }; int main () { void (A::*p)(int) = 0; p = &A::f; if (p != &A::f) return 1; }
google
chromium
pmf1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/pmf1.C
136
utf_8
4098c06dcc9bbc0bbbe416ca5d88a064
// { dg-do run } struct foo {}; typedef long unsigned int & (foo::*pmf)(void); void fn (...) {} int main () { pmf y = 0; fn (y); }
google
chromium
lookup17
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup17.C
179
utf_8
8a1fafd7339e35a324f0c9633e4504e0
// { dg-do run } // Bug: t->B is resolved to the type instead of the field. struct A { struct B { } *B; int i, j, k, l, m; }; struct A a; int main () { void *p = a.B; }
google
chromium
crash21
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash21.C
224
utf_8
7a4372cd40c6563853635eb0ae16404d
// { dg-do assemble } struct A { virtual void f(int&) const; }; struct B : public A { int x; }; void B::f(int& t) { // { dg-error "" } undeclared method x = t; }
google
chromium
builtins1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/builtins1.C
347
utf_8
61fb12d3b094aee63b1654fa642f29ad
// { 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; if (::__builtin_strlen ("hello") != 5) abort (); return 0; }
google
chromium
inline5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline5.C
313
utf_8
ccfaa381b4b7ddc2ae21136f982f0584
// { dg-do assemble } // { dg-options "-O2" } class X; extern X* tab1; struct Y { explicit Y(int); }; void* x (); Y k (void *); inline void f() { k (x ()); } inline void* x () { return 0; } static void g() { f(); } static void h() { f(); }
google
chromium
friend4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/friend4.C
691
utf_8
a81525f7456919fc54f1c69499313ca6
// { dg-do assemble } // I'm not 100% sure this program is correct, but g++ shouldn't just // crash. // The idea is to give privileged access to bar<A> only to // specializations foo<A,B>, for all B. template <class A, class B> void foo(); template <class C> class bar { int i; // { dg-error "" } private template <...
google
chromium
inline6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline6.C
187
utf_8
4b2c8697535041bce609a3148c50d503
// { dg-do assemble } // { dg-options "-O2" } struct S { }; void f (S s = S ()); inline void g () { f (); } void h () { g (); }
google
chromium
pmf4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/pmf4.C
532
utf_8
9a3b6813081867a1df6cba19658db429
// { dg-do run } // Bug: g++ doesn't compensate for finding a virtual function in a // non-primary vtable when generating PMFs. struct A { virtual ~A() {} }; struct B { virtual void f () = 0; }; struct C : public A, public B { void f (); }; void (C::* B_f)() = &B::f; // this works void (C::* C_f)() = &C::f; // t...
google
chromium
singleton
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/singleton.C
1,122
utf_8
3b3f003bf4668f29ca853eeb7fb0819d
// { dg-do run } // This tests two things: // 1. there is an annoying warning. // singleton.C:26: warning: `class singleton' only defines private constructors and has no friends // egcs fails to see that there is a public static accessor function. // 2. the program crashes, because apparently the static variable s in ...
google
chromium
goto4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/goto4.C
296
utf_8
3b16032627e4a56483ab6c1a869fba90
// { dg-do run } // Test that we clean up temporaries bound to references properly when // jumping out of their scope. int ret = 1; struct A { ~A() { ret = 0; } }; void f() { if (0) { out: return; } const A& a = A(); goto out; } int main() { f(); return ret; }
google
chromium
init1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/init1.C
107
utf_8
a5b35401aabff5d46ee703160a256207
// { dg-do run } extern "C" void abort(); int i; int j = i++; int main() { if (i != 1) abort(); }
google
chromium
redecl4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/redecl4.C
174
utf_8
6be0129988c7c99cd612850873cfb90b
// { dg-do assemble } int main() { struct A { void f(); // { dg-error "with" } already declared void f(); // { dg-error "overloaded" } already declared }; }
google
chromium
cast3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cast3.C
1,456
utf_8
f1cef821ea3ed4921f67bfc6512231f6
// { dg-do assemble } // static_cast should not cast _away_ constness ([expr.static.cast]/6), // but nothing bans _adding_ constness. [expr.static.cast]/10 states that a // pointer of type cv void can be cast to pointer to object type. struct X; struct Y {}; struct Z : Y {}; void fn (void *p, void const *cp, Y *yp, Y ...
google
chromium
signed
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/signed.C
283
utf_8
75a099ea3dd81f52fe5c8a7f4baa9726
// { dg-do assemble } // Determine that function style casts are groked void fn() { +char(5); +short(5); +int(5); +long(5); +signed(5); +unsigned(5); }
google
chromium
inline23
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline23.C
219
utf_8
f1224fb4be126166d0a579ea0dc6acc8
// { dg-do link } struct B { virtual ~B() {} }; struct A : public B { ~A(); void foo(void); void bar(void); }; inline void A::foo(void) { static int i; i++; } void A::bar() { foo(); } int main() { }
google
chromium
redecl1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/redecl1.C
128
utf_8
550bbf8cfd71829a78758a156138e874
// { dg-do assemble } struct X{ void i(); void i(int); // { dg-error "" } int i; // { dg-error "" } conflict };
google
chromium
typename2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/typename2.C
112
utf_8
5ada46d551dbf758c5f205a1191c4e09
// { dg-do assemble } template<typename T> void f() { typename T::u; // { dg-error "" } declare anything }
google
chromium
virtual10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/virtual10.C
468
utf_8
930c4b7b0bbff2696a8528cc462df701
// { dg-do assemble } // We failed to spot a static member which overrode a virtual struct A { virtual int foo (char); static int foo (); virtual int foo (int); // { dg-error "" } this function static int foo (float); virtual int foo (double); }; struct B : A { static int foo (int); // { dg-error "" }...
google
chromium
rtti1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/rtti1.C
2,543
utf_8
975c6f5dc39ccf0719efb4a802333342
// { dg-do run } // { dg-options "-frtti" } // test of rtti of non-class types #include <typeinfo> extern "C" { int printf(const char *, ...); void exit(int); } int i; short s; char c; long l; unsigned int ui; unsigned short us; unsigned char uc; unsigned long ul; float f; double d; int& ri = i; const volatile int...
google
chromium
crash1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash1.C
159
utf_8
cb311fca6afff769f4122785b119455c
// { dg-do assemble } class A { enum B { ONE, TWO, THREE }; // { dg-error "" } private }; class A::B; // { dg-error "" } A::B is not a class type, context
google
chromium
thunk1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/thunk1.C
401
utf_8
4996212d38cb7834f6f2b4fecdb803ae
// { dg-do run } extern "C" void abort(); int ic; struct X { X() { ++ic; } X( const X & ) { ++ic; } ~X() { if (--ic < 0) abort(); } }; struct V { virtual ~V() {} }; struct A : public virtual V { }; struct B : public virtual V { virtual void foo( X ) = 0; }; struct D : public A, public virtual B {...
google
chromium
rttid4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/rttid4.C
1,549
utf_8
8b8a007d3664432d41d8472d3dcbe836
// { dg-do run } // { dg-options "-w" } // test of rtti of single inheritance and multiple inheritance with // virtual inheritance // dynamic casting #include <typeinfo> extern "C" { int printf(const char *, ...); void exit(int); } class X { public: int xi; virtual int f() {}; }; class Y : public virtual...
google
chromium
overload2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/overload2.C
463
utf_8
7ac2eb316531c89193f2d2d44e146cb5
// { dg-do link } template <class T> class ConstArray { }; template <class T1, class T2> void operator+(const ConstArray<T1>&, const ConstArray<T2>&) { } template <class T1, class T2> void operator+(const ConstArray<T1>&, T2); template <class T1, class T2> void operator+(T1, const ConstArray<T2>&); const ConstArr...
google
chromium
externC3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/externC3.C
271
utf_8
d9d8a652760a5ef1b74c8b6ce815177d
// { dg-do run } // Test that two extern "C" declarations of the same name in different // namespaces are treated as declaring the same function. namespace foo { extern "C" int f (); } extern "C" int f () { return 0; } using namespace foo; int main () { f (); }
google
chromium
stmtexpr1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/stmtexpr1.C
170
utf_8
01e666c7606315a2bef1f5933007d6dc
// { dg-do assemble } // { dg-options "-O" } #include <ctype.h> bool f( char c ) { return tolower( c ); }
google
chromium
conv3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/conv3.C
223
utf_8
df181711cf49d00ca15fec38197e79c8
// { dg-do assemble } typedef const int ci; typedef ci aci[ 10]; aci var = { 2, 3, 5, 7, 11, 13 }; void f() { int * ip = var; // { dg-error "" } requires const_cast }
google
chromium
crash17
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash17.C
143
utf_8
7976e30c9ad8cf3f397394bd62325bcd
// { dg-do assemble } class C { static int const N (1000); // { dg-error "" } invalid declaration };
google
chromium
typedef1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/typedef1.C
189
utf_8
5a247f9665f19a540726811b53701d4f
// { dg-do assemble } typedef const struct { int x; } Test; static void foo(Test); static void foo(Test t) { t.x = 0; // { dg-error "" } assignment of read-only member return; }
google
chromium
using1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/using1.C
382
utf_8
f3b85ec775a54c37dce4715b71275e75
// { dg-do assemble } class D2; class B { private: int a; // { dg-error "" } B::a is private protected: int b; friend class D2; }; class D : public B { // { dg-error "" } within this context public: using B::a; using B::b; }; class D2 : public B { // { dg-error "" } conflicting access specifications publ...
google
chromium
comdat3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/comdat3.C
278
utf_8
3cb11229a87ec97d36dc77b6c3b38fd3
// { dg-do run } // { dg-additional-sources " comdat3-aux.cc" } // Test that duplicate elimination of implicit instantiations of static // data members works properly. // Additional files: comdat3.h #include "comdat3.h" int main () { const bool *p = &A<int>::b; f (); }
google
chromium
ptrmem1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/ptrmem1.C
162
utf_8
f75732a46d8496aac3e6fbd99609c316
// { dg-do assemble } class x { public: virtual int is_constant(); }; void foo() { x* y; if (y->is_constant) // { dg-error "" } assuming & { } }
google
chromium
ptrmem6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/ptrmem6.C
350
utf_8
d39d6de8da2a8229f976153f5c63cb57
// { dg-do assemble } extern double *y; extern double *x; extern int nPoints; void SetInitCond(void) { int i; for(i = 2; i < nPoints; ++i) y[i] = y[nPoints] .* (x[i]-x[1]) / (x[nPoints]-x[1]); // { dg-error "" } .* }
google
chromium
syntax1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/syntax1.C
207
utf_8
ae4eba98ae301d865a86a5f999875b69
// { dg-do assemble } // { dg-options "-fsyntax-only" } class AAA{ public: virtual void fff(); }; void AAA::fff() {} AAA aaa; main () { aaa.fff(); }
google
chromium
dtor4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dtor4.C
494
utf_8
beaa62d9f1bf0ffca6cd65768337e910
// { dg-do assemble } struct S1 { ~S1(); // { dg-error "" } candidate }; S1::~S1() const // { dg-error "" } prototype does not match { } struct S2 { ~S2() volatile; // { dg-error "" } destructors may not be volatile }; template <class T> struct S3 { ~S3(); // { dg-error "" } candidate }; template <class ...
google
chromium
pmf2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/pmf2.C
208
utf_8
24409f65f5180d90e9b1dccd3ab7fede
// { dg-do assemble } struct S { void f(); }; void (S ::* pmf) (); S * pf; void f() { pmf = & pf->f; // { dg-error "" } not a valid pmf expression }
google
chromium
delete4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/delete4.C
1,154
utf_8
48cb9639142065438719c2e0123ef935
// { dg-do assemble } // delete (void *)e and delete[] (void *)e result in undefined behavior // [expr.delete/3]. Check we warn about them // operator new functions can only return NULL, if their exceptions // specification is `throw()'. All other cases must return a non-null pointer // [expr.new/13]. typedef __SIZE_T...
google
chromium
overcnv2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/overcnv2.C
812
utf_8
067175052927a6bd5ef2269919005cc0
// { dg-do assemble } // { dg-options "-Wconversion" } // Test that we resolve this case as mandated by the standard, but also // warn about it. We choose op char* not because it is a member of B -- // the standard says that all conversion ops are treated as coming from // the type of the argument -- but because it ...
google
chromium
fnname1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/fnname1.C
155
utf_8
cdb14b1ccbe32a578cb98ecd21523f57
// { dg-do link } // { dg-options "-g" } int main () { const char *s = __FUNCTION__; }
google
chromium
bitfld3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/bitfld3.C
753
utf_8
5f9c3301ce01dbaca25e43e1bb35e475
// { dg-do assemble } // http://gcc.gnu.org/ml/gcc-bugs/1999-06n/msg00107.html // Builtin ops don't always need reference bindings, and we weren't removing // them always after doing overload resolution. This caused us to try and take // the address of a bitfield. enum E {one}; struct A { E m1: 8; E m2: 8; unsig...
google
chromium
lookup11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup11.C
120
utf_8
4d8dd7569edee5d6f3ae1b7961abcaf3
// { dg-do assemble } namespace A { int i; } using namespace A; namespace B { int i; } using namespace B; int i;
google
chromium
override1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/override1.C
318
utf_8
ce00cea856ec8d8bf5df0e966319573e
// { dg-do assemble } struct A { virtual void f (); }; struct B : virtual public A { void f (); }; struct C : virtual public A { void f (); }; struct D : virtual public B, virtual public C { void f (); }; struct Di : virtual public B, virtual public C, virtual public D {};
google
chromium
instan1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/instan1.C
353
utf_8
024add5304c41b827990193948da5b1f
// { dg-do link } // { dg-options "-fno-implicit-templates" } template <class T> struct U { static int j; }; template <class T> struct S { static const int i = 7; }; template <class T> const int S<T>::i; template <class T> int U<T>::j = S<T>::i + 5; template int U<double>::j; int main () { }
google
chromium
friend10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/friend10.C
405
utf_8
a8a2b073e880541aac32c952a151d54e
// { dg-do assemble } // Origin: Neil Booth, from PR #78 namespace MySpace { class Tag1 { }; class Tag2 { }; template<class Tag> class Object { public: friend void Forgotten(Object const & m) {} }; typedef Object<Tag1> U1; typedef Object<Tag2> U2; void foo() { Forgotten...
google
chromium
vbase5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/vbase5.C
2,928
utf_8
b15a88f072398bb5359ad5a15e6c576c
// { dg-do run } // Bug 1701. building a vbase path was not using the shortest number of // vbases. Normally that's just a pessimization, unfortunately during // constructoring it leads to uninitialized reads. extern "C" int printf (...); int fail = 0; /*{{{ struct Base*/ struct Base { unsigned m; static Base *ad...
google
chromium
init16
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/init16.C
324
utf_8
3a30cb3e5ae697139f2bcd67859bffad
// { dg-do run } struct bar { char c; bar (const char *); bar (const bar &); }; struct foo { bar x; }; extern const struct foo y = { "foo" }; bar::bar (const bar &ref) { c = ref.c; } bar::bar (const char *p) { c = p[2]; } int main () { return y.x.c != 'o'; }
google
chromium
static13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/static13.C
212
utf_8
5119d1a435f551a1f992637ee1c301ec
// { dg-do link } struct Cleaner { ~Cleaner() {} }; template <class T> void bar () { static Cleaner cleanup; } inline void foo() { bar<int>(); } int main () {}
google
chromium
lookup9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup9.C
97
utf_8
a9a74cf7de9ad7a2eaa872544ff3f96b
// { dg-do assemble } struct S { typedef long I; }; struct D : virtual public S { I i; };
google
chromium
perf1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/perf1.C
1,772
utf_8
a2272ed46f0dfbf3a43486c9c3083da5
// { dg-do assemble } // Test of severe performance regression from 2.95. This code generates // a heavily self-referential tree which caused the inliner to take // O(3**N) time to scan it for function calls. bool in0 ; bool in1 ; bool in2 ; bool in3 ; bool in4 ; bool in5 ; bool in6 ; bool in7 ; bool in8 ; bool in9 ;...
google
chromium
decl4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/decl4.C
203
utf_8
87f1ee2bbfeb5481b12d8c5030343b02
// { dg-do assemble } // Simplified for testsuite by Alexandre Oliva struct foo { operator long double(); }; int bar(int __opr); int bar(int __ope);
google
chromium
local2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/local2.C
103
utf_8
b0c55f20739e7cf716fcd5af1b14be8b
// { dg-do assemble } // { dg-options "-O2" } void f () { struct Init { Init () { } }; }
google
chromium
init9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/init9.C
837
utf_8
0696a984444c04ea186eb0741dab5b5d
// { dg-do assemble } // X is not a POD because it has a user-defined destructor. // Therefore, we can't cross its initialization. // vector<int> is not even an aggregate; nevertheless, no error is // reported... struct A { A() {} }; void a() { goto bar; // { dg-error "" } jump from here A x; // { dg-error "" } ...
google
chromium
lookup21
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup21.C
285
utf_8
303ad36f28e46f5e782cff9679222b86
// { dg-do run } // Check that we don't complain about ambiguity between the same static // member function in different subobjects. struct A { static void f() {} }; struct B: public A { }; struct C: public A { }; struct D: public B, public C { }; int main() { D d; d.f(); }
google
chromium
crash24
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash24.C
489
utf_8
0430d2f1d132d43d48853d1267f37db4
// { dg-do assemble } class foo { public: class __iterator; friend class __iterator; typedef __iterator const_iterator; virtual ~foo() { } __iterator begin(); // { dg-message "candidates" } }; static void iteratorTest(const foo &x) { foo::const_iterator i = x.begin(); // { dg-error "incomplete ...
google
chromium
crash4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash4.C
151
utf_8
caa8dc1b04811d1550ebeedd3db0961f
// { dg-do assemble } struct T { struct S __attribute__ ((packed)) { // { dg-error "" } parse error int i; }; };
google
chromium
eh2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/eh2.C
230
utf_8
fff040d0461db3bb906852d2efd56a9d
// { dg-do assemble } // { dg-options "-O2" } class a { public: double b; int c; ~a() { } }; int bar(a x); a foo(double x); int baz(double x, int y) { return bar(foo(x)); }
google
chromium
enum5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/enum5.C
576
utf_8
989a20c8af821e747e17e6f4d9323de7
// { dg-do run } // PR 80: Packed enums use minimum required storage. extern "C" void abort(); enum numbers { one, two, three } __attribute__ ((packed)) nums; enum colours { red = 1000, green, blue } __attribute__ ((packed)) cols; enum conditions { fine, rain, cloudy } __attribute__ ((packed)) forecast; int main() { ...
google
chromium
init13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/init13.C
175
utf_8
5f0aeb2e2e0c81324c51ed3e0e0d43c5
// { dg-do link } // { dg-options "-O3" } void f() {} struct X { ~X() { f (); } }; X x; int main () {}
google
chromium
lookup2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup2.C
139
utf_8
a0a6b7f99c096f6cba8f03f9c614a72f
// { dg-do assemble } struct B { int i; }; struct D: virtual public B { int i; }; struct D2 : public D { void f() { i = 3; } };
google
chromium
inline16
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline16.C
310
utf_8
94a6d3c26b108e05298c1283ec8a85a9
// { dg-do assemble } // { dg-options "-O1" } struct foo { bool x; inline void a (unsigned char y); inline void b (void); virtual ~foo (); }; foo::~foo () { } void foo::a (unsigned char y) { x = ((y & 2) != 0); } void foo::b (void) { a(0x07); }
google
chromium
init10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/init10.C
155
utf_8
c65ae1dbb01e95dc5e6b68b729c7b6a6
// { dg-do run } int i; struct D { D () { i++; } }; struct C { C() {} D d[1]; }; int main () { C c; if (i != 1) return 1; }
google
chromium
op2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/op2.C
1,576
utf_8
39bfb5ff695929d899d5e0a61a26167a
// { dg-do run } // Bug 91. We'd not preserve constness looking for a base classes assignment // operator. #include <stdio.h> int value = 0; struct A { A() {} A( A& arg) { printf ("%s\n", __PRETTY_FUNCTION__); value = 1;} A( const A& arg) { printf ("%s\n", __PRETTY_FUNCTION__); value = 2;} A& operator=( A...
google
chromium
ptrmem9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/ptrmem9.C
269
utf_8
11aead89d7c9ba7d1d714df900e9e821
// { dg-do run } // Test that const-correctness is observed when using pointers-to-members. struct A { int f () { return 1; } int f () const { return 0; } }; struct B { A a; B() { } }; int main () { A B::*bm = &B::a; const B b; return (b.*bm).f (); }
google
chromium
decl1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/decl1.C
157
utf_8
5676a661a2b6a27ccd1e71dbf5846d8d
// { dg-do assemble } int foo(int); int bar() { int baz(int(foo(0))); int foo = baz; }
google
chromium
typedef4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/typedef4.C
86
utf_8
2b0b70a2de4c754682872ec0b6788a74
// { dg-do assemble } struct A { void f (); }; typedef A foo; void foo::f() { }
google
chromium
sizeof5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/sizeof5.C
513
utf_8
4ca4b75456ba54e283ab183ea72ddd89
// { dg-do assemble } struct A; void foo () { sizeof ( void ()); // { dg-error "" } ISO forbids sizeof ( void (A::*) ()); sizeof ( void (A::*) () const); sizeof (void (*) () const); // { dg-error "" } invalid quals sizeof ( void () const); // { dg-error "" } ISO forbids, ERROR - invalid quals }
google
chromium
sizeof4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/sizeof4.C
1,378
utf_8
add3c3df9921a070d253f354f2ab7805
// { dg-do assemble } // C++ does not decay lvalues into rvalues until as late as possible. This // means things like the rhs of a comma operator mustn't decay. This will make // a difference if it is an array or function. struct S; struct T {int m;}; extern S s; // an incomplete extern S arys[20]; // an incomplete ...
google
chromium
enum1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/enum1.C
163
utf_8
5b6d9e3f0f202ed5f985699483d694c3
// { dg-do run } extern "C" void abort(); struct A { enum { a = 3}* p; int f() { return (int) a; } }; int main() { A a; if (a.f() != 3) abort(); }
google
chromium
bitfld4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/bitfld4.C
315
utf_8
ee1225393f6bfc001e60b0b16f335bdf
// { dg-do assemble } template <class T> bool operator!=(const T&, const T&); enum MsgType { MSG_DATA }; class C { public: MsgType mType : 8; }; int main(void) { extern C& c; c.mType = MSG_DATA; if (c.mType != MSG_DATA) return -1; return 0; }
google
chromium
array6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/array6.C
226
utf_8
e3d968a14c4d5d023f855b46af29bb70
// { dg-do run } // { dg-options "-O1" } int count = 0; double foo () { count++; return 0; } double bar () { const double x[1] = { foo() }; return x[0]; } int main () { bar(); if (count != 1) return 1; }
google
chromium
lineno2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lineno2.C
368
utf_8
9c7886f38212d10f28c72da01bfc819a
// { dg-do assemble } // Bug: g++ wasn't listing candidates for a failed conversion. void f(int, double); // { dg-error "" } candidate void f(double, int); // { dg-error "" } candidate void f(int); // { dg-error "" } candidate int main () { void (*ptr)(int, int); ptr = &f; // { dg-error "" } no match }
google
chromium
rttid3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/rttid3.C
1,468
utf_8
a9cc0e1c16e568172282adb889a34614
// { dg-do run } // { dg-options "-frtti" } // test of rtti of single inheritance and multiple inheritance with // virtual functions // dynamic casting #include <typeinfo> extern "C" { int printf(const char *, ...); void exit(int); } class X { public: int xi; virtual int f() {return 0;}; }; class Y : pub...
google
chromium
parse2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/parse2.C
281
utf_8
7a4035f7336c29328d414399b423c187
// { dg-do assemble } // Bug 531: We ICEd trying to give a parse error. struct X { bool operator (const X &) const; // { dg-error "" } parse error };
google
chromium
static15
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/static15.C
201
utf_8
806912cb7bd438f1b7cb7b33253780dd
// { dg-do run } // Special g++ Option: -fdata-sections void f() { static int ctors[3] = { 0, 0, 0 }; ctors[2] = 7; } int main () { f (); }