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
crash36
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash36.C
1,072
utf_8
d0032889a1a88a1e855cd15715dd4d70
// { dg-do assemble } // Bug 573. We ICE'd verifying operator new and operator delete conformed // to the standard's expectation. void *operator new (__SIZE_TYPE__); // ok void operator new (__SIZE_TYPE__); // { dg-error "" } must return void * void *operator new (); // { dg-error "" } must take size_t v...
google
chromium
crash9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash9.C
141
utf_8
894ac4875d2973910281036a8c447ce4
// { dg-do assemble } struct A { }; struct B : public A { int A; }; struct C : public B { };
google
chromium
defarg6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/defarg6.C
194
utf_8
2bf46981883d131190ab94087d53bafe
// { dg-do assemble } #include <vector> #include <fstream> class STACK { public: std::vector<int> data; STACK() : data() { } };
google
chromium
sizeof3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/sizeof3.C
560
utf_8
4fc019ae48048136a589dc3fc21ec8b9
// { dg-do run } // 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. extern "C" void abort(); int main (int argc, char **argv) { int ary[10]; int ary1[10]; if (s...
google
chromium
dll-5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dll-5.C
308
utf_8
681d330e5a588ec1581c75f83745a574
// { dg-do assemble { target arm-*-*pe } } // dllimport is "sorta like" to "extern". // set compiler_result "(\nfoo1:.*\nfoo2:|\nfoo2:.*\nfoo1:)" // set not_compiler_result "__imp_" __declspec (dllimport) int foo1; int foo1; __declspec (dllimport) int foo2; int foo2 = 5; int f () { return foo1 + foo2; }
google
chromium
dtor11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dtor11.C
338
utf_8
2c756b64f3f0786c22e84ea88c6573d6
// { dg-do run } extern "C" void abort (); int j; struct S { S () { ++j; } S (const S&) { ++j; } ~S () { if (--j < 0) abort (); } }; struct T { void g (S) { } }; struct U { int i; S s; }; U u; U f () { return u; } int main () { T t; t.g (f ().s); }
google
chromium
static1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/static1.C
154
utf_8
94bc9e6417859abe314b0eb330f97196
// { dg-do assemble } extern "C" void abort(); struct S { static const int i = 3; }; const int S::i = 2; // { dg-error "" } duplicate initialization
google
chromium
lineno5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lineno5.C
450
utf_8
e44ad22b26a06856bf4b7933f64ab19d
// { dg-do assemble } // // Bug 3621. At the end of saved input, we'd set the lineno to // zero. This would confusing things no end, if there was a subsequent // error. namespace tmp { typedef int B; B b; } class A { public: int kaka(tmp::B = b); // { dg-error "" } no b in scope };
google
chromium
inline19
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline19.C
294
utf_8
3557e3ebfc86655982c4c545a8a9f0ad
// { dg-do assemble } // { dg-options "-O1" } // struct TBtItem { TBtItem(); }; struct TBtInnerNode { TBtInnerNode(); int MaxIndex() const { return 10; } }; TBtInnerNode::TBtInnerNode() { new TBtItem[MaxIndex()+1]; }
google
chromium
expr1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/expr1.C
234
utf_8
6b78905b209539c93148488d9e5e315c
// { dg-do assemble } struct T { int operator()(int) { } // { dg-message "candidates" } }; int main() { T()(); // { dg-error "match" } no such operator }
google
chromium
decl8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/decl8.C
230
utf_8
70374012e8e3dd49e53dfd2d182ad64d
// { dg-do assemble } void foo(void) { extern int i; // { dg-error "" } previous declaration extern double i; // { dg-error "" } conflicting type extern int j; extern int j; }
google
chromium
sizeof1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/sizeof1.C
204
utf_8
a84ac2bbca6e4a347ff10c74435b64dc
// { dg-do assemble } struct X { int f (); int f (int); }; void f(int i) { i = sizeof(X::f); // { dg-error "" } cannot take sizeof a member function }
google
chromium
friend1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/friend1.C
1,416
utf_8
f5b511f3ec5f4d24414f371b7643aad5
// { dg-do assemble } // f() should be able to access B::j, as of FDIS [class.protected]/1 // Subject: Re: [bug] Inheritance and friend access control broken // Date: 06 Mar 1998 01:43:18 -0300 template <int*> class X {}; template <typename T> void g(); struct S; template <typename T> struct R; class B { protected: ...
google
chromium
goto3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/goto3.C
680
utf_8
c316b72961a5e3b35f0cad6ae96805dd
// { dg-do assemble } // Testcase for various invalid gotos. void f () { goto foo1; // { dg-error "" } jumps try { foo1:; } catch (...) { } // { dg-error "" } into try goto foo2; // { dg-error "" } jumps try { } catch (...) { foo2:; } // { dg-error "" } into catch goto foo3; // { dg-error "" } jumps...
google
chromium
syshdr1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/syshdr1.C
179
utf_8
21e31c820eea768ab1908212d3565046
// { dg-do assemble } // { dg-options "" } # 1 "foo" 3 void f () {} extern "C" void foo(int); extern "C" void foo(int) throw();
google
chromium
mangle3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/mangle3.C
543
utf_8
f7e15e08ea3f4ff8a460a7c8be7c998b
// { dg-do run } struct foo { static int bar () { int i; static int baz = 1; { static int baz = 2; i = baz++; } { struct baz { static int m () { static int n; return n += 10; } }; baz a; i += a.m (); } { ...
google
chromium
warn5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/warn5.C
378
utf_8
fbe9ec3566cd58bff749af239478babb
// { dg-do assemble } // { dg-options "-W " } // // Bug 1765. We gave bogus warning on default initializer. struct X { int i; }; X *foo () { return new X (); // gets bogus warning } X x = {}; // { dg-warning "" } missing initializer
google
chromium
decl5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/decl5.C
2,180
utf_8
b5bff59738d7a2328a6f6318082a50c6
// { dg-do assemble } // http://gcc.gnu.org/ml/gcc-bugs/1999-04n/msg00631.html // the code is wrong, but we fell over badly struct A { int A::fn(); // { dg-error "extra qualification" } int A::m; // { dg-error "extra qualification" } struct e; struct A::e {int i;}; // { dg-error "extra quali...
google
chromium
union3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/union3.C
201
utf_8
ec9963b19a70446506c638f4004a4f77
// { dg-do run } struct A { union { int i; }; int j; A (); }; A::A () : i (1), j (i = 0) { } int main () { A a; return a.i; }
google
chromium
builtins4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/builtins4.C
443
utf_8
e584fa125612a2948a12f82049b2da5d
// { 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; ::__builtin_printf ("hello world\n"); ::__builtin_printf ("\n"); ::__builtin_printf ("%s\...
google
chromium
local-alloc1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C
303
utf_8
f11c8fcb7786f73f1f8445b703023cc7
// { dg-do assemble { target fpic } } // { dg-options "-O0 -fpic" } // { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } struct bar { bar() {} double x[3]; }; static bar y[4]; void foo(int z) { bar w; y[z] = w; }
google
chromium
pmf3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/pmf3.C
543
utf_8
f0159431d45efcd9d1629724f904a6ea
// { dg-do assemble } // Bug: g++ was crashing after giving errors. template<class T> void connect_to_method( // { dg-message "candidates are" } T *receiver, void (T::*method)()) {} class Gtk_Base { public: void expose(); void show(); void show(int); Gtk_Base(); }; Gtk_Base::Gtk_Base() { connect_...
google
chromium
const2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/const2.C
118
utf_8
0d1cb77ade62214d4e6b0d9e0303213f
// { dg-do assemble } struct S { static const char* cp = "abc"; // { dg-error "" } initialization of non-const };
google
chromium
anon5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/anon5.C
313
utf_8
aad0443f7c41b4a122886b6f70c3ee81
// { dg-do assemble } // Bug 649. A cv qualified anonymous union would cause confusion. struct X { int fn () const { return member; } const union { int member; }; };
google
chromium
dyncast6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dyncast6.C
1,439
utf_8
5cd17ceac92a7733addb1d3c1daccbc5
// { dg-do run } // { dg-options "-w -ansi -pedantic-errors" } // We were generating incorrect type_info structures, and hence breaking // dynamic_cast. #include <stdio.h> class OBASE { public: virtual void bz () {}}; class IBASE { public: virtual void by () {}}; class V {public:int m; }; class A : public virtual V { ...
google
chromium
crash7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash7.C
155
utf_8
77451a6454a80a01eac1f409126d059e
// { dg-do assemble } void f() { union { private: int i; // { dg-error "" } private } u; u.i = 3; // { dg-error "" } within this context }
google
chromium
std1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/std1.C
234
utf_8
23786dd5fb572a82513966937e1133a0
// { dg-do assemble } extern "C" int memcmp (const void * __s1, const void * __s2, __SIZE_TYPE__ __n) throw (); namespace std { void f () { memcmp (0, 0, 0); } }
google
chromium
sibcall1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/sibcall1.C
182
utf_8
df2e977a7fb4fb0bc14455136a875f07
// { dg-do run } // { dg-options "-O2" } #include <iostream> std::ostream& foo (const char *x, std::ostream &y) { return y << "" << x; } int main () { foo ("", std::cout); }
google
chromium
static16
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/static16.C
277
utf_8
60c3c7e60e3f883eb653b72d84f8ae6d
// { dg-do run } // Test that we properly evaluate the object parameter when accessing static // members. struct A { static void f () {} static int i; }; int A::i; int c = 0; A g () { ++c; return A(); } int main () { g().f(); g().i = 42; return (c != 2); }
google
chromium
string1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/string1.C
356
utf_8
92b98ec5c36a99fa733a7b345e6d5d26
// { dg-do assemble } class Wrapper { public: static const char msgPtr[]; static const char *JunkFunc() { return &msgPtr[0]; } }; const char Wrapper::msgPtr[] = "Hello world."; int main() { const char *p1 = &Wrapper::msgPtr[0]; const char *p2 = Wrapper::JunkFunc(); if (p1 != p2) return 1; }
google
chromium
conv9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/conv9.C
521
utf_8
c486ee9f9b6f71a51d4f615e6e470c17
// { dg-do assemble } struct Foo { public: typedef void* (*copier_fn)(void const*); void foo() const; void bar(char const*, void const*) const; private: struct Bar { char const* key; void const* item; }; }; void Foo::foo() const { Bar* cp = 0; copier_fn copyfn = 0; bar(cp->key, cp->item)...
google
chromium
access7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/access7.C
636
utf_8
36d84e42cb470cc6cded750349e2fa48
// { dg-do assemble } // Test that access control for types and statics works properly // with nested types. class A { static int I1; // { dg-error "" } private struct B1 { }; // { dg-error "" } private public: static int I2; struct B2 { }; }; class D: public A { struct E { void f (); }; }; void ...
google
chromium
redecl3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/redecl3.C
129
utf_8
5e934e52ca0ebb8aec763916909e5aa0
// { dg-do assemble } // Bug: g++ thought this was a redeclaration of a local variable. int i; int main () { extern int i; }
google
chromium
cleanup1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cleanup1.C
238
utf_8
7e98cad14d668019fde5bd860087b395
// { dg-do run } // Bug: fold is too eager about pushing down CLEANUP_POINT_EXPR. int d; struct A { A() { } ~A() { d = 1; } }; int f (const A& a) { return 1; } int main () { if (f (A()) && d == 0) return 0; return 1; }
google
chromium
overload11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/overload11.C
4,315
utf_8
0cae623faf6c1a7e5d1b6f0a356539ab
// { dg-do assemble } // [over.match] 13.3 tells us where overload resolution occurs. // [over.match.call] 13.3.1.1 says that in // (...( postfix-expression )...) (expression-list) // the postfix-expression must be the name of a function (amongst some other // choices). This means comma and conditional exprs cannot be...
google
chromium
builtins2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/builtins2.C
439
utf_8
174f8d8294990e01924aeade4ba2d025
// { 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; char f[16]; if (::__builtin_strcpy (f, "hello world") != f || __builtin_memcmp (f, "h...
google
chromium
vbase2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/vbase2.C
298
utf_8
25e374f2166f5b9af6e33b6d1797ed8b
// { dg-do run } int i; struct A { ~A (); }; A::~A () { i = 1; } struct B : virtual public A { }; struct C { C (); B b; }; C::C () { throw 3; } int main () { try { C c; } catch (...) { } if (i != 1) return 1; }
google
chromium
null2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/null2.C
277
utf_8
3d711ec70ea8da8349b2ae221992e597
// { dg-do run } extern "C" void abort (); const char * const foo = ""; // foo is not NULL int main() { if ((foo == 0) ? 0 : foo) // so this should evaluate to `foo' return 0; else abort(); }
google
chromium
crash20
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash20.C
479
utf_8
85193429796a8ae3f75eec98865e8208
// { dg-do assemble } #include <typeinfo> struct GcspFlags { enum Enum { OffYes, OffNo, Root }; static char const* name(Enum flag); template<Enum GCSP_FLAG> struct btmFlag { static Enum const f=OffNo; }; }; template<> struct GcspFlags::btmFlag<GcspFlags::OffYes> { static G...
google
chromium
rtti4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/rtti4.C
1,294
utf_8
6092a9839bd38aadb991960135272d26
// { dg-do run } // { dg-options "-frtti -w" } // test of rtti of single inheritance and multiple inheritance with // virtual inheritance #include <typeinfo> extern "C" { int printf(const char *, ...); void exit(int); } class X { public: int xi; virtual int f() {}; }; class Y : public virtual X { short...
google
chromium
initstring
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/initstring.C
61
utf_8
8aea0874ae47ec6f53fb668325fd6e48
// { dg-do assemble } static const char foo[] = { "bar" };
google
chromium
crash6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash6.C
173
utf_8
a5242e83d48fc8527715027a7b0e1314
// { dg-do assemble } // { dg-options "-O2" } struct E { int f(int); }; void ha() { enum {X = 0}; int A, C; E vList[10]; A = (C + 1) % 3; vList[1].f(A); }
google
chromium
delete6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/delete6.C
407
utf_8
002b9210ec0b57b8244b0909a259b25f
// { dg-do run } typedef __SIZE_TYPE__ size_t; int i; struct B{}; struct A{ static void* operator new(size_t) {return &i;} inline static void operator delete(void*p); static void operator delete(void*, const B&){} }; inline void A::operator delete(void*p) {A::operator delete(p,B());} int main() {A *ap=new A;...
google
chromium
linkage3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/linkage3.C
199
utf_8
42b8a76745e45d733d565ced3107d4fa
// { dg-do assemble } extern "C" void f (); // { dg-error "" } previous declaration static void f () {} // { dg-error "" } extern redeclared static
google
chromium
dll-4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dll-4.C
520
utf_8
17d764709d0c92abbfa72daf5aec6b8e
// { dg-do assemble { target arm-*-*pe } } // Ensure dllexport overrides dllimport. // set compiler_result "\.section${spaces}\.drectve\n\[^\n\]*-export:foo1.*\.section${spaces}\.drectve\n\[^\n\]*-export:foo2" // set not_compiler_result "(__imp_foo1|__imp_foo2)" __declspec (dllimport) int foo1 (); __declspec (dllexpor...
google
chromium
overload13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/overload13.C
222
utf_8
52b8dcde24c324a2d8dc19ecd0d0eb40
// { dg-do assemble } struct A { bool operator== (A const &); operator bool () const; operator int * () const; }; bool foo (A &a1, A &a2) { return a1 == a2; }
google
chromium
bitfld5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/bitfld5.C
77
utf_8
b64773507b85e60ad31dac30c11ec352
// { dg-do assemble } // { dg-options "-w" } struct S { int i : 1756; };
google
chromium
inline3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline3.C
596
utf_8
7b08662ff0ad8e5c427bcdd4565beaf7
// { dg-do assemble } // { dg-options "-O3" } class ostream; struct S { virtual void print(ostream&) const = 0; }; template <class _Tp> class vector { public: _Tp& operator[](unsigned __n) const { return *(_M_start + __n); } _Tp* _M_start; }; class T { public: void print(ostream&) const; vector<S*> bcList_m;...
google
chromium
900519_12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/900519_12.C
264
utf_8
d2a61b5f238fbeef49772675bd6c035f
// { dg-do assemble } // GROUPS abort // g++ 1.37.1 bug 900519_12 // The following erroneous code causes g++ to segfault. // cfront 2.0 passes this test. // keywords: segfault, typedef, pointer type, function type typedef eek void (*)(); // { dg-error "" }
google
chromium
cast7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cast7.C
254
utf_8
da02549549f36fdbec2ad51af3f80f0b
// { dg-do run } // Test that we can add cv-quals in a static cast to a pointer-to-base type. struct A { int i; }; struct B : public A {}; int main() { int B::* bp = &B::i; const int A::* ap = static_cast<const int A::*>(bp); return ap != bp; }
google
chromium
cvt1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cvt1.C
190
utf_8
3793b7ec7538ca22ef6e87810890ec6d
// { dg-do assemble } typedef int Array_T[2]; struct S1 { S1(const Array_T&); }; struct S2 { S1 g(); Array_T a; }; S1 S2::g() { return S1(a); } void h() { S2 s2; s2.g(); }
google
chromium
crash8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash8.C
133
utf_8
fe179e76a385143c20d1033600901ddd
// { dg-do assemble } int main() { void f(); class A { friend void f(); }; }
google
chromium
anon9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/anon9.C
258
utf_8
4203b8d1bec88b84e8402433b5f6c3ed
// { dg-do assemble } // Test that we properly diagnose an attempt to use an anonymous class // in declaring an external function. typedef const struct { int i; } T; // { dg-error "" } referenced below void f (T* t); // { dg-error "" } uses unnamed type
google
chromium
anon8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/anon8.C
166
utf_8
2ffce2c938097596af2012ee18265f3f
// { dg-do assemble } struct B { int a; B & operator= (const B &); }; struct A { union { int a; }; B b; }; A x; void foo (const A &y) { x = y; }
google
chromium
externC5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/externC5.C
280
utf_8
7d36ee48a189b66e67773c2763f76faa
// { dg-do assemble } extern "C" int rand (void) throw (); namespace std { extern "C" int rand(void) throw(); template <class T> void f(T a) {} } using namespace std; int main() { f(rand); f(std::rand); f(::rand); }
google
chromium
vaarg3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/vaarg3.C
1,182
utf_8
96fb20d9b2965f77cd84c02761c4ec55
// { dg-do assemble } // { dg-options "-Wno-abi" { target arm_eabi } } // Make sure we diagnose bad uses of va_arg #include <stdarg.h> struct X {int m;}; struct Y : X {int m;}; struct Z; // { dg-error "forward decl" } void fn1(va_list args) { int i = va_arg (args, int); Y x = va_arg (args, Y); // { dg-w...
google
chromium
access11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/access11.C
292
utf_8
556fbcb3dab4f03751dfdafd58f0b61d
// { dg-do assemble } // { dg-options "-w" } class A { private: template <class T> void g(T t) {} int i; }; template <> void A::g<int>(int t) { i = 1; } // { dg-error "" } private int main() { A a; a.g<int>(0); // { dg-error "" } private }
google
chromium
inline1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline1.C
308
utf_8
5841802bbaf58c45a8be3d0bc688eae3
// { dg-do assemble } // { dg-options "-O2 -Winline" } class foo { public: float x; foo (float xval) : x (xval) {} foo operator+ (const foo &foo2) const { return foo (x+foo2.x); } }; int main() { foo f=foo(1)+foo(2); }
google
chromium
crash31
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash31.C
137
utf_8
1703e72cd30f5bb840b4131a1214464e
// { dg-do assemble } namespace bar { struct foo { foo(); }; // { dg-error "expected" }
google
chromium
lookup7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup7.C
166
utf_8
ebd8f7c10cb0f38aaab48d284f174530
// { dg-do run } // Test for handling of type shadowing in function scope. int main() { int A = 42; struct A { enum { a }; }; A = A::a; return A; }
google
chromium
badarrow
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/badarrow.C
108
utf_8
1ac5ba19c1885e9be0e0ca6b9a4c52be
// { dg-do assemble } struct S { int i; } s; void f() { s->i = 3; // { dg-error "" } base operand }
google
chromium
refinit1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/refinit1.C
258
utf_8
2b5e35f667bf97fa9e5512c25a5c776b
// { dg-do assemble } // Test that we don't allow multiple user-defined conversions in reference // initialization. struct B { }; struct A { A (const B&); }; struct C { operator B (); }; C c;
google
chromium
ambig2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/ambig2.C
674
utf_8
2799c1248a840cb14758affa4c24408d
// { dg-do assemble } // We should spot all ambiguities struct A {int m;}; struct B : A { int m; }; struct C : A { int m; }; struct D0 : virtual B, virtual C { int m; }; struct D1 : virtual B, C { int m; }; struct D2 : B, virtual C { int m; }; struct D3 : B, C { int m; }; void fn(D0 *d0, D1 *d1, D2 *d2, D3 *d3) { A ...
google
chromium
inline2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline2.C
223
utf_8
cdf515ec26e7beadbb14fdea9061b732
// { dg-do assemble } // { dg-options "-O2 -Winline" } #include <cmath> int main() { double foo = 4.5; if (std::abs (0.5-std::abs (foo-0.5)) < 1e-10) foo+=1; }
google
chromium
lookup8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup8.C
127
utf_8
83207211c82e3d97cf37257247e71e10
// { dg-do assemble } struct S { int A; struct A { enum { a = 0 }; }; void f(); }; void S::f() { A = A::a; }
google
chromium
conv1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/conv1.C
110
utf_8
3ce601b39551204293395f2d5fca36c7
// { dg-do assemble } class X { public: const operator int (); // { dg-error "" } invalid declaration. };
google
chromium
nested4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/nested4.C
450
utf_8
552b2e0a8d9d578ce36c1e690e691fed
// { dg-do assemble } // // bug 372 We ICE'd on the out-of-class definition of a nested class of a // class template. struct Bar { }; template <class T> struct Foo { struct Baz; struct Biz; struct Boz : Bar { }; }; template <class T> struct Foo<T>::Biz { }; template <class T> struct Foo<T>::Baz : Bar { };
google
chromium
static14
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/static14.C
194
utf_8
09f659f17296ea95013e95aafeac22be
// { dg-do link } struct basic_string { ~basic_string(); }; struct Side { void name() { static basic_string sname; } }; int main () { }
google
chromium
union4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/union4.C
415
utf_8
e3acc80ebcbe5b254d3b0f851c3cfc52
// { dg-do assemble } // { dg-options "" } union A { int i; int j; A () : i (3), j (2) {} // { dg-error "" } multiple initializations }; union B { int i; union { int j; }; B () : i (3), j (2) {} // { dg-error "" } multiple initializations }; union C { union { struct { int i; int j; ...
google
chromium
static10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/static10.C
199
utf_8
8a674bc4fae54c6f2e6187118ffc8d1f
// { dg-do assemble } // { dg-options "-w" } struct st { int a; }; int foo (int a) { static const st i = { 0 }; if (i.a == a) return 0; }
google
chromium
op3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/op3.C
1,615
utf_8
7f0f2835698d0b670a7025708a71bdcd
// { dg-do run } // Related to bug 91. We'd not preserve constness accessing a member of the // source type in copy ctor and assignment op. #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_...
google
chromium
linkage7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/linkage7.C
169
utf_8
9f0e982ef3a2802a121297c93371f22b
// { dg-do link } namespace N { extern "C" int i; void f () { i = 3; } } int i; int main () { N::f (); }
google
chromium
init19
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/init19.C
872
utf_8
26ec57de6560c0aac7851fcd80111d7f
// { dg-do run { xfail { ! cxa_atexit } } } #include <stdlib.h> #define assert(x) do { if (! (x)) abort(); } while (0) int count = 0; class A { public: explicit A(int i); ~A(); int i; A(const A&); A& operator=(const A&); }; A::A(int i_) : i(i_) { } A::~A() { assert(++count == i); i = -1; } extern "C" { ...
google
chromium
optimize1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/optimize1.C
824
utf_8
2767ef2c41b48fe7c46c35b7eab0ccec
// { dg-do run } // { dg-options "-O2" } // // Bug 2781. We forgot to copy addressability information when // cloning. struct B { B(int v1); void Member (int v1); static void Static (int v1); }; struct D : B { D (int v1); }; void xswap(int& x1) ; int xxx = 0; B::B(int v1) { xswap(v1); xxx = v1; } void B:...
google
chromium
new4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/new4.C
150
utf_8
30ec7e2f8989e636154506533aaaaabd
// { dg-do assemble } struct S { S(); virtual int f() { new S[+f()]; return 0; } };
google
chromium
ptrmem3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/ptrmem3.C
126
utf_8
e3f652dc9cfb0d8f1306ed706fdc31ce
// { dg-do assemble } class c { void (c::*x)(); public: void f() { this->x(); } // { dg-error "" } pointer-to-member };
google
chromium
printf1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/printf1.C
221
utf_8
ceecfe2bb2ab30a7f08b690dee78b96a
// { dg-do assemble } // { dg-options "-Wall" } struct a { void x(char *f,...) __attribute__((format(printf,2,3))); }; int main() { a A; A.x("%d"); // { dg-warning "" } too few arguments for format return 0; }
google
chromium
init4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/init4.C
164
utf_8
9586910c917e9757eb948e6ba2dc14d7
// { dg-do assemble } class error { public: error(int) {} }; class foo { const error x = 1; // { dg-error "" } initialization of non-static data member };
google
chromium
decl9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/decl9.C
351
utf_8
e132f4eacd09364c6ba47417c0724608
// { dg-do assemble } // Build don't link typedef struct { } S; // OK typedef struct { }; // { dg-error "" } Missing type-name typedef union { } U; // OK typedef union { }; // { dg-error "" } Missing type-name
google
chromium
optimize3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/optimize3.C
697
utf_8
b76250225ce6553674e4a57a86b2db26
// { dg-do run } // { dg-options "-O2" } // // Bug 2936. We ICE'd on tree inlining a function with an anonymous // union decl. inline const unsigned char *Foo (const char *string) { union { const char *p1; const unsigned char *p2; }; p1 = 0; p2 = 0; p1 = string; return p2; } const unsigned ch...
google
chromium
ptrmem5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/ptrmem5.C
360
utf_8
4bbafe05a45a25868b17dce17c662a22
// { dg-do assemble } // Bug: g++ doesn't see that A is a vbase of C. struct A { int i; void f (); }; struct B: public A { }; struct C: public virtual B { }; void g () { int C::*p = &A::i; // { dg-error "" } conversion from vbase void (C::*fp)() = &A::f; // { dg-error "" } conversion from vbase }
google
chromium
access5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/access5.C
188
utf_8
e4ecc06adc838b3365a048dd635b4f75
// { dg-do assemble } class A { protected: int i; }; class B : private A { protected: A::i; }; struct C : public B { friend int f(C *p); }; int f(C *p) { return p->i; }
google
chromium
regstack
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/regstack.C
368
utf_8
94c5e744c201427e7b5dffedacfb7873
// { dg-do run { target i?86-*-* x86_64-*-* } } // { dg-options "-O2" } inline double foo (double x) { register double r; asm volatile ("fsqrt" : "=t" (r) : "0" (x)); return r; } struct X { ~X() {} }; int b; double bar (X x) { if (b) return 1.0; return 36.0 * foo (36.0); } int main () { X x; if...
google
chromium
asm3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/asm3.C
205
utf_8
f213d17d284e5fe46a0e8455aaf71d07
// { dg-do assemble { target i?86-*-* x86_64-*-* } } // { dg-options "-O2" } typedef unsigned long long uint64; uint64 fstps(void) { uint64 ret; asm volatile("fstps %0" : "=m" (ret)); return ret; }
google
chromium
rtti5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/rtti5.C
358
utf_8
f57f671f89a2d7c44af7acf386f3fba3
// { dg-do assemble } // { dg-options "-fno-rtti" } // check we don't die with disabled rtti int main(void) { int i; typeid(i); // { dg-error "" } rtti disabled }
google
chromium
sc1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/sc1.C
220
utf_8
2fc4734e1062da92300b8aa3641fcc10
// { dg-do assemble } }
google
chromium
access4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/access4.C
194
utf_8
1de3c4d64d335a3547d9bd221b65e92b
// { dg-do assemble } struct A { // { dg-error "" } inaccessible static int i; }; struct B : private A { }; struct C : public B { int f () { return A::i; } // { dg-error "" } context };
google
chromium
linkage5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/linkage5.C
112
utf_8
8f5f0bc1ea8aec63ad7e64ec0fb5a60d
// { dg-do assemble } static int f (); int f (); static int f ();
google
chromium
externC4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/externC4.C
153
utf_8
12b18dcb5beead4fc71db9293bcc0606
// { dg-do assemble } // Origin: Neil Booth, from PR #66 extern "C" { class foo { public: ~foo (); void bar (foo *); foo (); }; }
google
chromium
init12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/init12.C
250
utf_8
6763453ad9902cd9fd256016d6697e04
// { dg-do link } // { dg-options "-O3" } typedef int (*fp)(); struct S { fp f; }; struct T { static int f() { return 0; } }; static const S s = { &T::f }; int main() { return (*s.f)(); }
google
chromium
eh1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/eh1.C
253
utf_8
af4bf43b1d12ba745d0006242f963725
// { dg-do assemble } class C2 { public: ~C2(); C2 a() const; }; class C3 { public: C3(const C2 &c); }; class C4 { public: C3 *foo(bool b, const C2 &c); C2 d() const; }; C3 *C4::foo(bool b, const C2 &c) { return new C3(b ? d().a() : c); }
google
chromium
copy2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/copy2.C
246
utf_8
c51d339838c157d1f925c6eb729dbd72
// { dg-do run } int i; struct B { B () {} B (B&) { i = 1; } B (const B&) { i = 2; } }; struct D : public B { D () {} }; int main () { D d; D d2 (d); if (i != 2) return 1; }
google
chromium
typeck1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/typeck1.C
463
utf_8
6dc718815091fffb06eb18a915dd8339
// { dg-do assemble } extern int a[][]; // { dg-error "" } invalid multidimensional array extern int b[7][]; // { dg-error "" } invalid multidimensional array extern int c[][7]; // OK extern int (*i)[]; // { dg-error "" } previous declaration extern int (*i)[7]; // { dg-error "" } conflicting types for `i' ext...
google
chromium
vaarg4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/vaarg4.C
394
utf_8
8acac086379f3da71d7c6026e1e5330a
// { dg-do assemble } // { dg-options "-Wno-abi" { target arm_eabi } } // Bug 845. We were treating __builtin_va_arg as a unary expr, not a primary, // and hence getting parse errors. typedef __builtin_va_list __gnuc_va_list; typedef __gnuc_va_list va_list; struct X { int y; }; void func(va_list va) { char* a = ...
google
chromium
static2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/static2.C
178
utf_8
33149c771cc5305bbfb6fa0b743567a1
// { dg-do assemble } struct foo { static void (*mystatic) (); }; void bar(foo& t) { t.mystatic (); }
google
chromium
static9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/static9.C
204
utf_8
6acb6adf2268d2428bbada70553fa5ba
// { dg-do assemble } struct st { int a, b, c, d; }; void g () { static const st i = { 0,1,2,3 }; } void h () { static const st i = { 0,1,2,3 }; }
google
chromium
static5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/static5.C
187
utf_8
1e9288736d4e4b254b0aa94a642002d2
// { dg-do assemble } struct S { ~S(); }; inline void f() { static S s; atexit (0); // { dg-error "" } implicit declaration }
google
chromium
static3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/static3.C
101
utf_8
b28df6285579d288eb89eb3ea95583cc
// { dg-do assemble } class S { ~S(); public: friend void f(); }; S::~S() { static S s; }
google
chromium
virtual2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/virtual2.C
210
utf_8
facad90a3e09689495cfd0bb984b74ad
// { dg-do run } struct B { virtual int f() volatile { return 0; } }; struct D : public B { virtual int f() { return 1; } }; int main() { volatile D d; volatile B& b = d; return b.f(); }
google
chromium
debug8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/debug8.C
192
utf_8
b23319808394ce6738b1508b7f4ec38d
// { dg-do assemble } // { dg-options "-g" } struct X { const int x[4]; }; struct A { A(); A(const A&); }; struct B { A a; int b[4]; }; struct C { A a; C() { B b=B(); }; };