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
delete5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/delete5.C
428
utf_8
5b756dec74fffa3f353f5ca224de4022
// { dg-do run } // Test whether dtors of vbases are called from dtor of auto array. // Variant of delete2.C, delete3.C and delete4.C. extern "C" void abort(); extern "C" void exit(int); struct Foo { ~Foo() { exit(0); } }; struct Bar : virtual Foo { }; void foo() { Bar i[1]; } int main() { foo(); abort()...
google
chromium
ns3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/ns3.C
282
utf_8
9909ce1d76f79ca2d7e88855206eeffd
// { dg-do assemble } namespace N { template <typename T> class A { template <typename T_> friend class A; }; }
google
chromium
template2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/template2.C
418
utf_8
44b10a016f12e19d08675ac7ff78ec8e
// { dg-do assemble } template <template <typename> class C, typename T> class foo { typedef typename C<T>::bar bar; foo(bar); }; template <template <typename> class C, typename T> foo<C,T>::foo(bar) {} // { dg-bogus "" } C<T> not a class
google
chromium
partord1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/partord1.C
618
utf_8
a8f0075556adc14556aa2135bcce0a5a
// { dg-do assemble } template <typename T> void foo(T); template <typename T> void foo(T*); template <typename T> class bar { private: int i; // { dg-error "" } this variable friend void foo<T>(T); }; template <typename T> void foo(T) { bar<T>().i = 0; // ok, I'm a friend } template <typename T> void foo(T*) {...
google
chromium
nameret1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/nameret1.C
292
utf_8
bfe4a3c085addec5f331484e5310a5e5
// { dg-do assemble } // { dg-options "-Wno-deprecated" } // distilled from libg++'s Rational.cc inline int bar () return r {} // { dg-error "" } int foo () { return bar (); }
google
chromium
template10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/template10.C
732
utf_8
13f959e91589085e8519a7ce7cb5d4bc
// { dg-do assemble } // based on C++ Standard example in [temp.expl.spec]/5 /* Members of explicitly specialized template classes shall not be defined with template-specialization syntax. The example in the Standard contains a definition of a member function of the explicitly specialized class template, but...
google
chromium
template1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/template1.C
351
utf_8
3edf53951c22bebd2d44372d28915e91
// { dg-do assemble } template<int P = 0> struct foo { static void bar(double (*)[dim]) {} // { dg-error "'dim' was not declared" } }; void bar() { foo<>::bar(0); }
google
chromium
dwarf3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/dwarf3.C
491
utf_8
02919b6670f78e6a0527967376c827d8
// { dg-do assemble } // { dg-xfail-if "" { i386-pc-solaris* } { "*" } { "" } } // Fails with dwarf debugging. template <class T = void> struct foo { int data[1]; }; template <class T = void> struct bar { bar(foo<> *); }; template <class T> bar<T>::bar(foo<> *x) { *x; } void baz() { foo<> *baz; bar<> baar(baz...
google
chromium
partspec1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/partspec1.C
335
utf_8
a656b8b55218fcec4683461b96e1edf2
// { dg-do assemble } template <typename A, int* P> struct X; int a; template <typename A> struct X<A,&a> {}; int b; template <typename A> struct X<A,&b> {}; X<int,&a> x;
google
chromium
stkalign
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/stkalign.C
299
utf_8
745068a3dc92318a7514be58f3413cb0
// { dg-do assemble } // distilled from libg++'s Fix.cc struct Integer { ~Integer () {} }; void foo (const Integer& y); Integer bar (const Integer& x); void show (const Integer& x) { foo (bar (x)); }
google
chromium
new1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/new1.C
502
utf_8
3d2970abfa048bad4c4b489daa7ae29b
// { dg-do run } // execution test #include <new> #include <stdlib.h> struct A { A() { throw 0; } void* operator new(size_t size, double = 0.0) { return ::operator new(size);} void operator delete(void* p, double) { exit(0); } void operator delete(void* p) { abort(); } }; int main() { try { new A; } catch(...)...
google
chromium
delete3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/delete3.C
544
utf_8
11621d62ae5292283691c74f01072c97
// { dg-do run } // Test whether dtors of vbases are called on throw within new[]. // Variant of delete2.C. extern "C" void abort(); extern "C" void exit(int); struct Foo { static bool first; Foo() { if (first) first = false; else throw first; } ~Foo() { exit(0); } }; bool Foo::first ...
google
chromium
dwarf2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/dwarf2.C
254
utf_8
6d5a12efcc966b979f87620e3d24780f
// { dg-do assemble } // { dg-xfail-if "" { i386-pc-solaris* } { "*" } { "" } } // Fails with dwarf debugging. typedef __java_boolean jboolean; void foo() {}
google
chromium
typename2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/typename2.C
784
utf_8
ec472660515f0ea9e6421d6212594f55
// { dg-do assemble } // { dg-options "" } // This is slightly different from typename1.C. This one tests // whether the implicit typename extension works. gcc 2.95 reports: // warning: lookup of `foo' finds `struct foo' // warning: instead of `baz<T>::foo' from dependent base class // warning: (use `typename ba...
google
chromium
template8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/template8.C
468
utf_8
27a944f8490905502531cd05059b838f
// { dg-do assemble } struct B { template <class> void bar(); } b; template <class T> void foo() { b.bar<T>(); // no longer { dg-bogus "" } bar undeclared b.template bar<T>(); // no longer { dg-bogus "" } ditto b.B::bar<T>(); // ok } template void foo<void>(); // no longer { dg-bogus "" }
google
chromium
template9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/template9.C
268
utf_8
ef1e6aaf314569aac27d4d7adfe2e4d2
// { dg-do assemble } struct foo { template <class> void bar() = 0; // { dg-error "virtual" } };
google
chromium
delete4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/delete4.C
426
utf_8
0616469546aadbf2505636e6282105c3
// { dg-do run } // Test whether dtors of vbases are called from dtor of aggregate of array. // Variant of delete2.C and delete3.C. extern "C" void abort(); extern "C" void exit(int); struct Foo { ~Foo() { exit(0); } }; struct Bar : virtual Foo { }; struct Baz { Bar i[1]; }; int main() { Baz(); abort(); ...
google
chromium
typeof1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/typeof1.C
372
utf_8
cb347c003d6bc4d2ac1cd3b8cb0a7ad5
// { dg-do assemble } struct B { int i; }; template <class T> void foo(T b) { b.T::i; // ok // b.__typeof__(b)::i; // parse error, should this be accepted? typedef T t1; b.t1::i; // ok typedef __typeof__(b) t2; } template void foo(B); // not needed for the crash
google
chromium
nameret2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/nameret2.C
307
utf_8
adf17e0939d138a664dee53d472271fc
// { dg-do assemble } // { dg-options "-O1 -Wno-deprecated" } // distilled from libg++'s Integer.cc inline int bar () return r {} // { dg-error "" } int& foo (int& x) { bar (); return x; }
google
chromium
overload1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.oliva/overload1.C
725
utf_8
01da80918c34d148b37c9d4ff4ebd679
// { dg-do assemble } struct foo { static int bar(); // { dg-error "candidate" } void bar(int); // { dg-error "foo::bar" } }; /* gcc emits a hard error without -pedantic, and a warning with -pedantic, even in bad1. */ int (*ok1)() = foo::bar; void (foo::*bad1)(int) = foo::bar; // { dg-error "assuming pointer" ...
google
chromium
00324_02-
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.rfg/00324_02-.C
254
utf_8
2f2015450b109b3a8121247f0e10831e
// { dg-do assemble } // Another simple one. GCC corerctly gives errors for this code when the // - -pedantic-errors options is used. g++ doesn't. void f (int i) { } void (*fp)(void); int i; void test () { i ? f : fp; // { dg-error "" } }
google
chromium
00321_01-
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.rfg/00321_01-.C
295
utf_8
97d8440e0f1b762780a5803933af4eb8
// { dg-do assemble } // Here is a simple one. GCC correctly gives errors for this code when the // - -pedantic-errors option is used, whereas g++ doesn't. int (*p1)[3]; int (*p2)[5]; void test () { p1 == p2; // { dg-error "" } comparison.* p1 > p2; // { dg-error "" } comparison.* }
google
chromium
comdat1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/comdat1.C
435
utf_8
f34963eb24bc981aff6b296a0854778b
// { dg-do run } // { dg-additional-sources " comdat1-aux.cc" } // { dg-options "-O" } // Test that statics in inline functions are unified between // translation units. Currently we handle this by just suppressing // inling and relying on unification of the function itself. inline int f () { static int i; retur...
google
chromium
enum4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/enum4.C
864
utf_8
00c49643882129da30e7c45c80d0e71e
// { dg-do run } // { dg-options "-fshort-enums" } // On ARM EABI targets this testcase will cause a warning to be emitted // whilst EABI attributes are being merged at link time unless // the --no-enum-size-warning option is passed to the linker. Whilst the // enum-size attributes should only be emitted if there are...
google
chromium
crash35
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash35.C
122
utf_8
ba85d7fd72304bcf88631d504f0844f1
// { dg-do assemble } void foo() { if [ // { dg-error "" } parse error }
google
chromium
warn01
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/warn01.C
364
utf_8
92af271225d9aaa11fbb66029eb292ac
// { dg-do assemble } // { dg-options "-W -Wall" } typedef unsigned long size_t; extern void* malloc (size_t); extern void free (void*); extern void* realloc (void*, size_t); struct vtable { void* (* _malloc) (size_t); void (* _free) (void*); void* (* _realloc) (void*, size_t); }; struct vtable mtable = { mal...
google
chromium
store-expr1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C
1,206
utf_8
4f95b9e71699986553235cbbb4e52d7a
// { dg-do run { target i?86-*-* x86_64-*-* } } // { dg-require-effective-target ilp32 } // { dg-require-effective-target fpic } // { dg-options "-mtune=i686 -O2 -fpic" } class G {}; struct N { N *a; }; struct V { typedef N *W; W *m, *n; int s() const { return int(n - m); } const W &operator[](int x) const ...
google
chromium
friend11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/friend11.C
134
utf_8
689a2e160752b9dd397610b28e2c0b19
// { dg-do assemble } class Outer { friend void f1(); class Inner2; }; class Outer::Inner2 { };
google
chromium
access6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/access6.C
249
utf_8
f110d7b225f989a476f79c155a5e5d16
// { dg-do assemble } template <int I> struct S { void g(); }; class C { static const int i = 3; // { dg-bogus "" } private public: S<C::i>* f(); // { dg-bogus "" } redeclared }; S<C::i>* C::f() { // { dg-bogus "" } private return 0; }
google
chromium
using5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/using5.C
230
utf_8
6bcc4660e6325badf5bd5b3a485f9a4d
// { dg-do assemble } // Based on bug report by Klaus-Georg Adams struct bar { typedef bar t; }; struct foo : bar { using bar::t; t field; t meth(); void baz(t arg); };
google
chromium
optimize4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/optimize4.C
468
utf_8
3ad5f2e897d7d4d13ab5589141121099
// { dg-do assemble } // // Bug 3543. We forgot to resolve an OFFSET_REF struct Writeable { bool blocking_mode; }; struct Pipe : Writeable { void ewrite(); void set_write_blocking () { if (Writeable::blocking_mode); } }; void Pipe::ewrite() { set_write_blocking(); } void ewrite(Pipe &p) { p.set_writ...
google
chromium
sibcall2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/sibcall2.C
286
utf_8
4bad359f7d21b4dc141fcb698ae426a1
// { dg-do assemble } // { dg-options "-O2 -foptimize-sibling-calls -fno-exceptions" } struct X { const char *c() const { return b; }; char *b; }; extern "C" int f (const char *); struct A { X x; void y(); }; void A::y() { const char *const a[] = { x.c() }; f (a[0]); }
google
chromium
debug1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/debug1.C
647
utf_8
561238771ab14ea542b51d0fed719ca1
// { dg-do assemble } // { dg-options "-g" } typedef unsigned int size_t; struct dummy { }; struct arrrrrgh { }; template<class Par,class Rand = arrrrrgh> struct whyyyyyyy { }; template<class T, class S =dummy> struct grrrrrrrr { }; template<class Par, class Par2 =Par, class Rand =arrrrrgh> cla...
google
chromium
cond6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cond6.C
297
utf_8
60cc2216254cf4d88abe1ad138469b1b
// { dg-do assemble } // Test that the result of `x ? const E : E' is an E rvalue. enum E { a }; bool b; int main () { E e1 = a; const E &er = e1; E e2 = b ? er : a; // OK const E* ep = &(b ? er : a); // { dg-error "" } non-lvalue }
google
chromium
dyncast5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dyncast5.C
732
utf_8
45acf9d82067b001c75d4c13f6867940
// { dg-do run } // dynamic cast can only cast to public unambiguous bases extern "C" void abort (); struct A {virtual ~A(){} int m; }; struct B {virtual ~B(){} int m; }; struct C1 : A {int m;}; struct C2 : A {int m;}; // A is ambiguous, but private in one branch struct D1 : B, C1, private C2 {int m;}; // A is ambiguo...
google
chromium
typedef8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/typedef8.C
426
utf_8
0651678ecc52b4445e30f811ecc33835
// { dg-do assemble } // // bug 39. We'd generated bogus errors when using a typedef of a nested class. struct X1 { typedef struct { } MyStruct1; typedef struct M2 { } MyStruct2; }; X1::MyStruct1 foo() { X1::MyStruct1 m1; return m1; } X1::MyStruct2 baz() { X1::MyStruct2 m1; return m1; }
google
chromium
scope1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/scope1.C
158
utf_8
4cc954ede319c027e8493b724ffe5c42
// { dg-do run } // Testcase for proper scoping of local externs. int x = 1; int main() { int x = 2; { extern int x; return (x != 1); } }
google
chromium
typedef6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/typedef6.C
270
utf_8
24954a094357425d2ce1a0a996eb4186
// { dg-do assemble } // Bug: g++ fails to see through the T typedef in the C ctor. struct A { A (int) { } }; typedef A T; struct B: public virtual T { B (): T(1) { } }; struct C: public B { C (): T(1) { } };
google
chromium
field2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/field2.C
292
utf_8
c8a67e5273d7857015e7f705d0d454c3
// { dg-do run } // Test for proper handling of field calls. struct A { inline A* operator()() { return this; } }; struct B { int i; union { A a; }; }; int main () { B b; A* ap = &b.a; A* ap2 = b.a(); return (ap != ap2); }
google
chromium
init3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/init3.C
149
utf_8
63abea026a929f3b0c80bcda371963b9
// { dg-do assemble } struct X { static const bool is_signed = true ; static const int digits = is_signed ? 8 *sizeof(wchar_t)-1 : 0; };
google
chromium
array1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/array1.C
237
utf_8
3f1e42cde842279c479b7e4613fc7b6e
// { dg-do run } int i; struct S { S (int) { ++i; if (i == 3) throw 3; } S () {} ~S() { --i; } }; int main() { try { S s[5] = { 0, 1, 2, 3, 4 }; } catch (...) { } if (i != 1) return 1; }
google
chromium
cleanup2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cleanup2.C
318
utf_8
b191bb9b4f4430b44b6ad0ae1ce850c0
// { dg-do run } // { dg-options "-O -fno-exceptions -w" } extern "C" void abort(); class A { public: A(); ~A(); int foo(); }; A::A() {} A::~A() { abort (); } int A::foo() {} extern int f() { return 0; } int main() { return ((f() != 0) ? A().foo() : 0); }
google
chromium
delete2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/delete2.C
312
utf_8
779792404c1ce0b4fc3262f45ab83083
// { dg-do assemble } struct foo { operator char*() const; }; void bar(foo a) { delete a; // should be accepted delete[] a; // should be accepted char b[1]; delete b; // { dg-warning "deleting array" } expecting pointer type delete[] b; // { dg-warning "deleting array" } expecting pointer type }
google
chromium
syntax4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/syntax4.C
655
utf_8
312d7ad19f825aaab6319a917564cf29
// { dg-do assemble } // and several others. With templates, it's very easy to say something // erroneous like // template class X::X<whatever> // The culprit // ... class X::X ... // caused us to ICE as we got confused about pushing and popping scopes. class X { X (); }; class Y { public: typedef ::X W; ...
google
chromium
cond5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cond5.C
1,451
utf_8
fd7e830683d888cfd91c1c228fe62337
// { dg-do assemble } // { dg-options "-W -pedantic -ansi" } // http://gcc.gnu.org/ml/gcc-bugs/1999-03n/msg00888.html // conditional exprs have some funny rules when one of the types is void. // [expr.cond] 5.16, make sure we do the right things // We have checks for mismatching enumerations, check we give them -- the...
google
chromium
overload4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/overload4.C
144
utf_8
2be34216d493e2ffe4f8ae6616ea37d7
// { dg-do link } void f(int* const volatile * const * const*); void f(int* const * const * const*) {} int main() { int*** ip; f(&ip); }
google
chromium
warn3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/warn3.C
762
utf_8
e0c5738b58b2d27b9f96b0529725fe5e
// { dg-do assemble } // { dg-options "-Wctor-dtor-privacy" } class A { }; class B { // { dg-warning "" } only private constructors public: void f(); private: B (); B (const B&); }; class C { // { dg-warning "" } only private destructors public: void f(); private: ~C (); }; class D { // { dg-war...
google
chromium
lookup19
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup19.C
632
utf_8
f8f0ae352cbb51ceb3ac0b70b2e7a295
// { dg-do assemble } // Test for proper handling of type lookup for conversion operator names. // Test 1: Only at file scope typedef int B; struct A { int B; operator B *(); // { dg-error "" } }; A::operator B * () // { dg-error "" } { return 0; } // Test 2: Only at class scope struct C { typedef int D; ...
google
chromium
warn6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/warn6.C
338
utf_8
1590efed7b08e3e0a0e31739b2953e82
// { dg-do assemble } // { dg-options "-W -Wall" } // Bug 2139. We gave an erronous warning about an unused parm on a // synthesized function struct A { virtual ~A (); }; void foo (A const &a) { A a1 = a; }
google
chromium
builtins9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/builtins9.C
264
utf_8
29952296a7caacc2b945db5e0b5fe8c3
// { dg-do run } // Test that inline redeclarations of builtins are emitted. // Origin: Roger Sayle Mar 28, 2002 namespace std { inline int fabs (void) { return 0; } } int main () { return std::fabs (); }
google
chromium
externC1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/externC1.C
187
utf_8
20c3e7bd2094e334ab8bfcd82a2b1e43
// { dg-do assemble } extern "C" { struct T { ~T (); }; struct S { T t; }; } S* s; void f () { delete s; }
google
chromium
crash60
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash60.C
90
utf_8
f839835fe7ce739cfe40a15d9429985c
// { dg-do assemble } void foo () { int e; e := e; // { dg-error "" } parse error }
google
chromium
inline15
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline15.C
485
utf_8
d065f7b802be155187ff416cf56db93e
// { dg-do assemble } // { dg-options "-O1" } class Type; template<class E> class X { public: X<E>(); inline X<E>(int); inline ~X<E>(); }; template<class E> const Type &foo(const X<E> *); template<class E> inline X<E>::X(int x) { const Type &a = foo(this); } template<class E> inline X<E>::~X() { const Type &...
google
chromium
explicit1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/explicit1.C
189
utf_8
a062e6feea05b79de6f4a91e26e7acb3
// { dg-do assemble } struct A { A (); explicit A (int); }; int main () { const A& r = 1; // { dg-error "" } no suitable constructor }
google
chromium
lineno4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lineno4.C
86
utf_8
259b00ebc759f1c2be8bf93afcc1c26c
// { dg-do assemble } #define x \ y int; // { dg-error "" } invalid declaration
google
chromium
headers1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/headers1.C
1,235
utf_8
b8e82e677a564e8f59b1b3efcf52cfc8
// { dg-do run } // // This test catches the occasional macro/symbol conflict between // C++ and system-provided headers. #include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <c...
google
chromium
init18
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/init18.C
862
utf_8
63447b995770773e72d3dad0494ab43c
// Some targets (e.g. those with "set_board_info needs_status_wrapper 1" // in their dejagnu baseboard description) require that the status is // final when exit is entered (or main returns), and not "overruled" by a // destructor calling _exit. It's not really worth it to handle that. // // Any platform that doesn't ...
google
chromium
cast4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cast4.C
1,483
utf_8
2b44765fa9d8a7b3098dacd72b224861
// { dg-do assemble } struct A {operator char * () { return 0;} }; struct B {operator char * () const { return 0;} }; struct C {operator char const * () { return 0;} }; struct D {operator char const * () const { return 0;} }; void f0 () { A a = A (); B b = B (); C c = C (); D d = D (); static_cast <char *...
google
chromium
externC2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/externC2.C
134
utf_8
e4bbf19796485a7cc4158d83c4d3cf4d
// { dg-do assemble } extern "C" { struct xx { int x; xx(); }; xx::xx() { x = 0; } }
google
chromium
crash2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash2.C
246
utf_8
ac66e95a7eb0f724b07b49df214cb0be
// { dg-do assemble } struct A { int rep; static const A a(0); // { dg-error "" } initialization static const A b = 3; // { dg-error "" } initialization static const A& c = 2; // { dg-error "" } initialization A(int x) : rep(x) {} };
google
chromium
field1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/field1.C
102
utf_8
ab5dac12c9731d9f382f77c22f943ed2
// { dg-do assemble } struct X { static const bool b = true; static const int i = b ? 1 : 2; };
google
chromium
crash25
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash25.C
500
utf_8
fb4a8732b3ed06ff7a577ed5a17dbf8d
// { dg-do assemble } // { dg-options "-fshow-column" } class X { // { dg-error "1:new types may not be defined in a return type" "new types" } // { dg-message "1:\\(perhaps a semicolon is missing after the definition of 'X'\\)" "note" { target *-*-* } 5 } public: X(); virtual ~X(); } X::x() // { dg-error "6:no 'X...
google
chromium
static4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/static4.C
192
utf_8
7052f8cb3819c3897cd5141e9caf9ecb
// { dg-do run } // { dg-options "-O" } struct A { A(int, int); }; A::A(int, int) {} static A _A(0, 0); int main() { return(0); }
google
chromium
overload12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/overload12.C
442
utf_8
4ce08bd991a3d17e3a64a27b989b2bdb
// { dg-do assemble } struct A{}; struct B:A{}; struct C:B{}; struct CX { C c; operator C&(){return c;} }; // viable functions for call below void f(A&); void f(B&); int main() { CX cx; C c; f(cx); // after user defined conversion to C& // the standard conversion to B& is better than to A& }
google
chromium
ctor1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/ctor1.C
261
utf_8
bf34c3dce3754aad3a0364358ced05bb
// { dg-do run } // { dg-additional-sources " ctor1-aux.cc" } template <class T> struct S { template <class U> S (U); }; template <class T> template <class U> S<T>::S (U) {} template S<int>::S (double);
google
chromium
inline14
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline14.C
738
utf_8
5048bcdb68a786e7e91b6c13276ea7d9
// { dg-do assemble } #include <iostream> struct IDENT { enum TYPE { Variable, Constant } type; std::ostream& printTo(std::ostream& out) const { switch (type) { case Variable: out << '_'; break; default: break; } return out; } }; template <class T> struct TC { IDEN...
google
chromium
inline9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/inline9.C
190
utf_8
4ff7844073d913c0d5099f3c5a9d1905
// { dg-do assemble } // { dg-options "-O2" } inline void f () { int n; int i[n]; } void g () { f (); } void h () { f (); }
google
chromium
conv4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/conv4.C
230
utf_8
cd23d62f08b43907a909a92b9ad1acd5
// { dg-do run } // Testcase for proper hiding of base conversion ops. struct A { operator const char *(); }; struct B : public A { operator const char *() { return 0; } }; int main( void ) { B b; const char *p = b; }
google
chromium
empty2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/empty2.C
223
utf_8
e0228ca9cb60d1437fd658fe2d597301
// { dg-do assemble } struct E {}; void f () { E e1, e2; e1 = e2; // We should not warn about this statement, even though no // code is generated for it. }
google
chromium
conv7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/conv7.C
785
utf_8
5377676fca91396feae110a743aa9829
// { dg-do assemble } // { dg-options "-Wconversion" } // // Bug 2726. We ICE'd trying to say something about possibly confusing // conversion overload resolution. class foo { }; template<class T> class bar { public: operator const T&() const ; operator T&() ; }; template<class T, class Ref, class NodePtr, cl...
google
chromium
init5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/init5.C
574
utf_8
30819e3a76b3285d4b3e2ffcea49edaf
// { dg-do run { xfail { ! cxa_atexit } } } // Objects must be destructed in decreasing cnt order extern "C" void abort (); static int cnt; class A { int myCnt; public: A() : myCnt(cnt++) {} ~A() { if (--cnt != myCnt) abort(); } }; void f() { static A a; /* a.myCnt == 1 */ } class B { int myCnt; public: B() :...
google
chromium
cast6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cast6.C
1,657
utf_8
e756897428a8086edd93bb63250c2b81
// { dg-do assemble } // We failed to reject static_cast and implicit conversions of pointers to // member that traversed a virtual base. struct bar { int barm; static void a(); }; struct filler1 {int fm;}; struct filler2 {int fm;}; struct filler3 {int fm;}; struct filler4 {int fm;}; struct baz : filler1, bar, f...
google
chromium
lookup23
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup23.C
211
utf_8
5ea9b908bb1ed71c03d053c66cbcbcee
// { dg-do assemble } // Test for proper handling of type lookup if base class has field with the // same name as the containing class. struct a { int a; }; struct b : a {}; b x; void foo () { x.a = 22; }
google
chromium
defarg1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/defarg1.C
416
utf_8
92af71277727e3a1f4146b458ce18b9f
// { dg-do assemble } int f (int x) { extern void g (int i = f (x)); // { dg-error "" } default argument uses local g(); return 0; } int f (void); int h1 (int (*)(int) = f); int h2 (int (*)(double) = f); // { dg-error "" } no matching f template <class T> int j (T t) { extern void k (int i = j (t)); //...
google
chromium
delete1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/delete1.C
251
utf_8
34f6525c6eb87fdc45c8fcf8d0b2115a
// { dg-do assemble } struct cl_heap_ring{ void operator delete (void* ptr) { } cl_heap_ring () { } }; struct cl_heap_null_ring : public cl_heap_ring { void operator delete (void* ptr) { } }; void f() { new cl_heap_null_ring(); }
google
chromium
crash38
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash38.C
380
utf_8
38e9fc13292b02a991e28aa2287aea10
// { dg-do assemble } // Bug 611. We ICEd when calling a member function returning an incomplete // type by value. struct X; // { dg-error "" } forward ref struct Y { X foo (); }; void baz (Y *p) { p->foo (); // { dg-error "" } incomplete }
google
chromium
debug3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/debug3.C
208
utf_8
dcb71e937d0db05ef4cdd26c5e394656
// { dg-do assemble } // { dg-options "-O2" } struct S { ~S(); }; inline void f() { static S s; } typedef void (*fn_t)(); fn_t g() { return &f; }
google
chromium
temporary1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/temporary1.C
1,009
utf_8
5b478975b250ff7adfafa04082a3ca7b
// { dg-do run } extern "C" int printf (const char *, ...); int c, d; class Foo { public: Foo() { printf("Foo() 0x%08lx\n", (__SIZE_TYPE__)this); ++c; } Foo(Foo const &) { printf("Foo(Foo const &) 0x%08lx\n", (__SIZE_TYPE__)this); } ~Foo() { printf("~Foo() 0x%08lx\n", (__SIZE_TYPE__)this); ++d; } }; // Bar...
google
chromium
comdat2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/comdat2.C
526
utf_8
e421748ca6191ef379db9252886457f1
// { dg-do run } // { dg-additional-sources " comdat2-aux.cc" } // { dg-options "-O" } // Test that statics in inline functions are unified between // translation units. Currently we handle this by just suppressing // inling and relying on unification of the function itself. template <class T> struct S { static in...
google
chromium
dll-6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dll-6.C
230
utf_8
8df2e74fcad2732785e27e0358174919
// { dg-do assemble { target arm-*-*pe } } // set not_compiler_result "__imp_" // dll.h class aClass { public: __declspec(dllimport) aClass(); }; // dll.cpp __declspec(dllexport) aClass::aClass() { }
google
chromium
new6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/new6.C
402
utf_8
c9d397e3e3767365ebc352a60e284d3f
// { dg-do run } // Test that we properly default-initialize the new int when () is given. #include <new> using namespace std; extern "C" void *malloc (size_t); int special; int space = 0xdeadbeef; void *operator new (size_t size) throw (bad_alloc) { if (special) return &space; return malloc (size); } int ...
google
chromium
mangle10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/mangle10.C
311
utf_8
cf3e71d84bec47a484318564617d434d
// { dg-do assemble } template<int T> struct A { char *a; A (const char* x) { a = (char*) x; } }; template<int U, int V, class T> struct B { T a[V-U+1]; friend A<V-U+1> f (B const &x) { return A<V-U+1> ((char*) x.a); } }; const int a = 8; typedef B<1,a,int> C; struct D { C x; };
google
chromium
dtor13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dtor13.C
189
utf_8
a38327344ea63a8b5d5757b2bd02efc1
// { dg-do assemble } template <class T> struct S { ~S(); }; int i; void f () { i.~S(); // { dg-error "" } invalid destructor call. }
google
chromium
dll-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dll-1.C
314
utf_8
a9067192357860945ae88185ed54ec2c
// { dg-do assemble { target arm-*-*pe } } // { dg-options "-mno-nop-fun-dllimport" } // declspec test #1 // set compiler_result "__imp_imp.*\.section${spaces}.drectve\n\[^\n\]*-export:exp" // set not_compiler_result "__imp_exp" __declspec (dllimport) void imp (); __declspec (dllexport) void exp () { imp (); }
google
chromium
lookup20
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lookup20.C
189
utf_8
ec3df6ff05f5895bbe08f752327dc07a
// { dg-do assemble } // Bug: typename_sub2 returned the type, so we tried to look up "A" in B. struct A { struct A1 { }; }; struct B { typedef A Q; }; struct C: public B::Q::A1 { };
google
chromium
lineno1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/lineno1.C
283
utf_8
5d4a0219ff1355aba34b447f98bcca36
// { dg-do assemble } // { dg-options "-w" } // Bug: g++ was giving the wrong line number for statics. class A { A(); // { dg-error "" } private ~A(); // { dg-error "" } private }; static A a; // { dg-error "" } here
google
chromium
crash3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/crash3.C
147
utf_8
05f9169b3c0aa560e0ba3e11e6ed4a94
// { dg-do assemble } // { dg-options "-g -O2" } inline void f() { struct S {}; S s; } void g() { for (int i = 0; i < 2; ++i) f(); }
google
chromium
new
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/new.C
963
utf_8
8b6085c52aff23a7171fad945e6399e5
// { dg-do assemble } #include <new> inline void * operator new(size_t alloc_sz, const char *fname, unsigned lineno) { return ::operator new (alloc_sz); } inline void * operator new[](size_t alloc_sz, const char *fname, unsigned lineno) { return ::operator new[] (alloc_sz); } inline void operator delete(void *p...
google
chromium
dtor6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/dtor6.C
365
utf_8
bec7fc1b3e53b667bbfb02f3caa7a751
// { dg-do run } extern "C" void abort (); int count; struct S { S (); S (const S&); ~S (); int i; }; S::S () { i = count++; } S::S (const S&) { i = count++; } S::~S () { if (--count != i) abort (); } void f (S, S) { } int main () { { S s; f (s, s); } return count != 0; }
google
chromium
reload1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/reload1.C
653
utf_8
0467e717fdd659d1980c52044a16d1e1
// { dg-do run } extern "C" void abort (); struct A { unsigned long long u; } *a; struct B { unsigned long long v; unsigned long long w () { return a->u - v; } } b; struct C { static unsigned long long x; static void y (unsigned long long z); }; unsigned long long C::x = 0; int main () { a = n...
google
chromium
vbase1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/vbase1.C
450
utf_8
c9308222bb88ae1582868992681d2514
// { dg-do run } // { dg-options "-w" } int result; struct A { A (); int i; }; A* ap; A::A () { ap = this; } struct B : virtual public A { B (); ~B (); int j; }; B::B () { if ((A*) this != ap) result = 1; } B::~B () { if ((A*) this != ap) result = 1; } struct C : public B { }; struct D : public...
google
chromium
typeid1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/typeid1.C
282
utf_8
1d27cd1e6509508bee24a6470a13c2ee
// { dg-do assemble } // { dg-options "" } #include <typeinfo> int main () { typeid(char*); int len = 1; char carr[len]; typeid(typeof(carr)); // { dg-error "" } type has variable size typeid(carr); // { dg-error "" } type has variable size }
google
chromium
warn4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/warn4.C
1,474
utf_8
5714f810f94d6b2d3d9c4f3373d916a5
// { dg-do assemble } // { dg-options "-Wsign-conversion" } // make sure we only warn on assigning a negative (signed) value // to an unsigned type, and don't warn just if the unsigned value // happens to have the top bit set. typedef unsigned U; void fn (unsigned); void fu () { unsigned s1 = -1u; unsigned s2(-1u)...
google
chromium
linkage4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/linkage4.C
373
utf_8
76738f98b7bbe8a3ed99abf08aec7f10
// { dg-do assemble } static int strlen (const char*) { return 0; } template <int (*)(const char*)> void f () {} // Check that the strlen declaration here is given internal linkage by // using it as a non-type template argument, and expecting an error. template void f<strlen>(); // { dg-error "" } no matching template
google
chromium
new7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/new7.C
624
utf_8
183c9676ec93bdbec47a8769eab34fa8
// { dg-do run } #include <new> extern "C" void abort(); bool new_flag = false; bool delete_flag = false; struct X { X() { throw 1; } void* operator new ( std::size_t n ) throw ( std::bad_alloc ) { new_flag = true; return ::operator new( n ); } void operator delete( void* p, std::size_t n ) t...
google
chromium
copy3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/copy3.C
228
utf_8
e64d54ef396a5130a55e404cd94b500b
// { dg-do link } class bar { }; class foo { foo (const foo &f); public: foo (bar x) {} foo () {} void test (const foo &f) {} }; int main (void) { foo f; bar b; f.test (b); }
google
chromium
mutable1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/mutable1.C
1,066
utf_8
5be873b81ce1aace276fc54e0f2772dc
// { dg-do run } // Make sure objects with mutable members are never placed in a read only // section. // All these are POD structs, and hence do not need ctors struct A { mutable int i; }; struct B { A a; }; struct C { A a[1]; }; struct D { static A const a; }; // all these are static consts and hence naively suitabl...
google
chromium
cond7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/cond7.C
523
utf_8
1d89ee7d1846d1e50779a90e46fc5a7e
// { dg-do assemble } // // Bug 3416. We left some unchecked overloaded functions lying around. struct X { void operator << (int); void operator << (float); }; void OVL1 (int); void OVL1 (float); void OVL2 (int); void OVL2 (float); X x; void foo (bool a) { x << (a ? OVL1 : OVL2); // { dg-error "" } incomplete t...
google
chromium
static12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/static12.C
139
utf_8
df5bbaffad19a99974b639991af19e0a
// { dg-do assemble } int main () { static const int n = 10; static const int *p = &n; }
google
chromium
ptrmem2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.other/ptrmem2.C
410
utf_8
5ea815fbe90353ec75e1c966fd8245fc
// { dg-do assemble } class cow { public: void moo (char *); }; void f() { cow* c; void (cow::*fp0)(char*) = &cow::moo; // OK void (cow::*fp1)(int) = &cow::moo; // { dg-error "" } conversion int (cow::*fp2)(char*) = &cow::moo; // { dg-error "" } conversion int (cow::*fp3)(char*, void*) = fp2; // {...