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
android
eh18
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh18.C
1,238
utf_8
dd1383b0cb6f173f9f961cead9f6f5ba
// { dg-do run { xfail sparc64-*-elf arm-*-pe } } // { dg-options "-fexceptions" } class VB { public: int n; VB (int v) { n = v; } VB (const VB& o) { n = o.n; } }; class D : public virtual VB { int j; public: D(int i1, int i2) : VB(i2) { j = i1; } VB& vb() { return *(VB*)this; } const VB& vb() const...
google
android
p8018
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p8018.C
1,160
utf_8
0e89d49104a6c56e8123ffbaf84463ad
// { dg-do run } // prms-id: 8018 class RefCount { private: int nref; public: RefCount() : nref(0) {} ~RefCount() {} int nrefs() const { return nref; } int reference() { nref++; return nref; } int unreference() { nref--; return nref; } }; class A : public RefCount { public: A() {}...
google
android
misc13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/misc13.C
810
utf_8
5fd3339f10cb6e59bce87e7ba17cfc02
// { dg-do run } // GROUPS passed vtable extern "C" int printf (const char *, ...); enum E { vf_request, vf_event } want; int errs = 0; class ivResource { public: virtual ~ivResource () { } }; class ivHandler : public ivResource { public: virtual void event() { } }; class ivGlyph : public ivResource { ...
google
android
pmf7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/pmf7.C
423
utf_8
8fb2c2da170b2d3648dca0f135957421
// { dg-do run } class A; typedef int (A::*f_ptr) (void); class B { public: B() {} ~B() {} B& dummy(f_ptr cb) { return *this; } }; template<class SP, class CB> SP& call_dummy(SP* sp, CB cb) { sp->dummy(cb); return *sp; } class A { public: A() {} ~A() {} int ok() { return 0; } A& call_it(B* s) { ca...
google
android
p9206
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p9206.C
283
utf_8
597cdf446ddcb87d616b76140812c601
// { dg-do run } // prms-id: 9206 class X { public: void xtest() { } }; class Y { }; typedef void (X::*Xptr)(); typedef void (Y::*Yptr)(); int main() { X xx; Xptr xp = &X::xtest; Yptr yp = reinterpret_cast<Yptr>(xp); xp = reinterpret_cast<Xptr>(yp); (xx.*xp)(); }
google
android
misc9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/misc9.C
286
utf_8
c0a0ee051f07383fd186d9c88990720f
// { dg-do assemble } // { dg-options "-Wall -pedantic" } // GROUPS passed qualifiers class bee { public: int bee::bar; // { dg-error "extra" } there is an extra bee:: here }; class foo { public: int bee::bar; // { dg-error "invalid use" } you cannot do this int me(); };
google
android
p6610a
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p6610a.C
473
utf_8
c08220ad297c848fcc61433677ce38a7
// { dg-do run } // prms-id: 6610 // There is a bug in vtable thunks with multiple/virtual inheritance. int fail = 1; struct B; struct A { virtual int f(const B*) = 0; int g(const B*); }; int A::g(const B* t) { return f(t); } struct B : virtual A { B(); int f(const B*); B* B_this; }; B::B() { if (g(this)) fail = 0; }...
google
android
p2846
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p2846.C
796
utf_8
d2c99260e4f431ccfe3df52d0417f3e2
// { dg-do run } // prms-id: 2846 extern "C" int printf(const char *, ...); extern "C" void exit(int); class A; class B; int c; class A { public: A(void){} A(const A&){} A(const B&); virtual ~A(void){} virtual void print(void) const { printf("A::print\n"); printf("FAIL\n"); exit(1); } ...
google
android
p6927
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p6927.C
232
utf_8
866dc96069d3e273437caf99e8bb5c1c
// { dg-do run } // prms-id: 6927 class Object { public: Object(); int Value; }; Object::Object() : Value(-1) { } Object *pArr = new Object[2]; int main() { if (pArr[0].Value != -1 || pArr[1].Value != -1) return 1; }
google
android
p1248
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p1248.C
346
utf_8
9653441fa46b854dd109cbd4c3270f47
// { dg-do run } // GROUPS passed pure-virt extern "C" int printf (const char *, ...); class Base { public: virtual ~Base() =0; }; class Deranged : public Base { public: int value; virtual ~Deranged(); }; Deranged::~Deranged(){} void foo() { Deranged d; } int main() { foo(); printf("PASS\n"); return...
google
android
p4619
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p4619.C
190
utf_8
553392370bc5a522b51ceecad9d74647
// { dg-do assemble } // prms-id: 4619 int main() { int i = 3; int (*p)[10] = new int [20][10]; int (*p1)[5][7][13][10] = new int [i][5][7][13][10]; delete [] p1; delete [] p; }
google
android
ambig1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/ambig1.C
452
utf_8
368feed73d0bdf7acba2d3e943377182
// { dg-do assemble } extern "C" int printf(const char *, ...); struct VB { virtual void f() { printf("VB\n"); } }; class M : public virtual VB { public: int i; void f() { printf("M(%d)\n", i); } }; class lM : public M { }; class rM : public M { }; class D : public lM, rM { // { dg-error "" } am...
google
android
p5840
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p5840.C
782
utf_8
2ac225cf71223dec2cfd104fe4c04ae3
// { dg-do run } // prms-id: 5840 class Signal { public: int Name(void) { return 1; } }; class Derived : public Signal { public: int Name(void) { return 2; } }; template <class Foo , int (Foo::*Id)(void)> class Bar { public: int value (Foo* a) { return (a->*Id)(); } }; /* The following line is illegal under ...
google
android
warn4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/warn4.C
71
utf_8
c2be7b4febf6a7cd916d3d2cb0f6b56e
// { dg-do assemble } void foo (int a, int a) { } // { dg-error "" }
google
android
p3836
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p3836.C
225
utf_8
ded273b1de5ad9590c4dd3bc67d3d232
// { dg-do assemble } // prms-id: 3836 void f(int &i) { // { dg-message "" } ref line i = 10; } int main() { int i=1, j=2; f(i); f((int)j); // { dg-error "" } passing in to non-const if (j != 2) return 1; }
google
android
p4677
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p4677.C
138
utf_8
83d4769667bd9035ed028c7c8dbcd5bc
// { dg-do assemble } // prms-id: 4677 struct A { A(double d) { } }; struct B { B(A) { } } bad = 1; // { dg-error "" } B good (1);
google
android
net24
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net24.C
81
utf_8
7ecd808b646274e5020f8058282b5dce
// { dg-do assemble } char HexDigit(unsigned char ch) { return ch < 'f'; }
google
android
p789a
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p789a.C
940
utf_8
714d98e3d735427631e925e8babbbbb1
// { dg-do run } // global and local multidimensional array objects are not getting // constructors called on any dimension, other than the first. Also, // the destructors are not being called. Seems odd, they probably // used to work. :-( // prms-id: 789 extern "C" int printf (const char *, ...); struct foo { st...
google
android
opr-dot1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/opr-dot1.C
282
utf_8
85a2185da4141e90bad27178d19ee7ae
// { dg-do assemble } typedef struct base1 { int x; } base1_t; typedef struct base2 { int x; } base2_t; class derived1 : public base1 { }; class derived2 : public derived1, public base2 { }; struct test { derived2& fails; void test1() { fails.base1::x = 5; } };
google
android
p5958
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p5958.C
402
utf_8
2d4c6c42c29792576558af377abc661f
// { dg-do run } // { dg-options "-ansi" } // prms-id: 5958 class A { }; main() { int i = 1; if (1 not_eq 1) return 1; if (not (1 and 1)) return 1; if (not (1 or 1)) return 1; if (compl ~0) return 1; if (1 bitand 2) return 1; if (not (1 bitor 2)) return 1; if (1 xor 1) ret...
google
android
p3524a
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p3524a.C
403
utf_8
db7c9e14c1fff96be31e998b65fccbd6
// { dg-do assemble } // Make sure we can initialize a reference to a templated type, that // requires a conversion from a derived type to a base type. // prms-id: 3524 struct cc2Vector {}; template <class T> struct ccPair { ccPair (const cc2Vector&); }; struct ccLine : cc2Vector { double distToPoint (co...
google
android
eh38
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh38.C
384
utf_8
4c0c23ce77af79025aa22945d05f5629
// { dg-do run { xfail sparc64-*-elf arm-*-pe } } // { dg-options "-fexceptions" } #include <typeinfo> class B { public: int data; B(int i) : data(i) { } } b(42); main() { try { throw &b; } catch (const B* bptr) { if (bptr->data == 42) { try { throw &b; } catch (void *bptr) { if (((B*...
google
android
virt1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/virt1.C
288
utf_8
acec0a7fe32250197bfe1e5bef3eec9a
// { dg-do assemble } struct S0 { virtual void f1 () { } }; struct S1 : virtual public S0 { virtual void f1 () { } }; struct S2 : public S1 { virtual void f1 () { } }; struct S3 : virtual public S0 { virtual void f1 () { } }; struct S4 : public S3 { }; void creator () { new S4; }
google
android
warn1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/warn1.C
271
utf_8
05a214e5c9ab380e4302724f5681b612
// { dg-do assemble } // { dg-options "-Wall -Wno-int-to-pointer-cast" } typedef char * charptr; typedef __SIZE_TYPE__ size_t; char c[]={'A','B','C','D'}; int i=size_t(&c); int *pp=&i; void foo() { } int main() { charptr(*pp)++; // { dg-error "lvalue" } return 0; }
google
android
p789
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p789.C
596
utf_8
72d67f4b286673551d4fa81f0e6920f8
// { dg-do run } // prms-id: 789 extern "C" int printf (const char *, ...); struct foo { static int count; virtual void print (int i, int j) { printf ("foo[%d][%d] = %d\n", i, j, x); } int x; foo () { x = count++; } }; int foo::count; struct bar : virtual public foo { virtual void print (int i, int j) { pri...
google
android
p418
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p418.C
290
utf_8
ba298996405848997fcb9dab5ada7067
// { dg-do assemble } // prms-id: 418 class Base { public: int foo; }; class Derived : public Base { public: int bar; }; void func(Base&); // { dg-message "" } referenced by error below void func2(const Derived& d) { func(d); // { dg-error "" } should be error because of const }
google
android
net43
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net43.C
213
utf_8
228a05190a5faf554c6e411269f848a1
// { dg-do assemble } // { dg-options "-ffriend-injection" } class foo { public: friend int operator ^(const foo&, const foo&); }; int main () { int (*funptr) (const foo &, const foo &) = operator ^; }
google
android
p2746
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p2746.C
2,254
utf_8
33ed7eb20af5e6ee2e8a40a2b916922a
// { dg-do assemble } // GROUPS passed scope pt class Link { public: Link(); Link(Link *); private: Link *next_; friend class IListBase; friend class IListIterBase; }; inline Link::Link() : next_(0) { } inline Link::Link(Link *next) : next_(next) { } class IListBase { public: IListBase(); IListBase(Link ...
google
android
net37
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net37.C
526
utf_8
d1b3cca7d3e88d90568183aebdc6db21
// { dg-do run } class B { public: int bi; void bProc ( void ) { bi = 39; } }; class D : public B { public: int di; void dProc (void ){ di = 42; } }; typedef void (B::*BPROC)(void); typedef void (D::*DPROC)(void); union AFX_PMSG { public: AFX_PMSG () {} AFX_PMSG ( BPROC bpr ) { bfn = bpr ; ...
google
android
eh51
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh51.C
349
utf_8
735afc5e7a57d25ace3db1170d3c1325
// { dg-do run { xfail sparc64-*-elf z8k-*-* arm-*-pe } } // { dg-options "-fexceptions" } #include <exception> void my_unexpected() { throw 42; } template <class T> void foo(T) throw (T) { throw "Hi"; } main() { std::set_unexpected (my_unexpected); try { foo(1); } catch (int i) { if (i == 42) ...
google
android
eh20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh20.C
89
utf_8
22c7d47e61ba6ed7efac218cd89e0a85
// { dg-do assemble } // { dg-options "-fexceptions -Wall" } int main() { throw 1; }
google
android
virt5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/virt5.C
1,057
utf_8
69b70bb7f0d0b25db18baaf30351b004
// { dg-do run } // Ensure that virtual base upcast and downcasting works on this // conversions during virtual function dispatch at ctor/dtor time // when dynamic vtable fixups for deltas are needed. int fail = 0; struct BASE1 { virtual ~BASE1 () { } }; class MID; class BASE2 { public: virtual MID *...
google
android
niklas01a
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C
328
utf_8
3df106f920b0be3b9db6d929db398d7c
// { dg-do assemble } // { dg-options "-fshow-column" } struct A { // { dg-error "" } forward declaration friend struct B : A { // { dg-error "invalid use of incomplete type 'struct A" "invalid" } int x; }; // { dg-error "class definition may not be declared a friend" "may not" { target *-*-* } { 5 } } in...
google
android
const2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/const2.C
418
utf_8
7a0b8d93048493a27e5dc08cd0e9d20f
// { dg-do link } // This test should get a linker error for the reference to A<int>::i. // { dg-prune-output "ld: symbol" } // { dg-message "i" "" { target *-*-* } 0 } template <class T> struct B { static const int i = 3; }; template <class T> struct A { static const int i = B<T>::i; }; const int *p = &A<int>::i; in...
google
android
explicit80
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit80.C
242
utf_8
420c2584a309cd3121698cdeef1c7bd2
// { dg-do assemble } // Bug: We were complaining about explicit instantiation of A<T>::B. template <class T> struct A { public: ~A() { } class B; }; template <> class A<int>::B { }; template class A<int>; template class A<double>;
google
android
tiemann2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/tiemann2.C
711
utf_8
ec10794193ab29b44ba0ed0a93de1ebc
// { dg-do run } extern "C" int printf (const char *, ...); template <class T> T max (const T&x, const T&y) { return (x>y)?x:y; } class complex { double re, im; public: complex (double r, double i=0) { re = r; im = i; } friend int operator > (const complex& x, const complex &y); void print () { printf ("re...
google
android
partial2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/partial2.C
736
utf_8
b68e78ca6a6b20cd26939f63cc2694dd
// { dg-do assemble } // Tests partial specialization template<class T> struct foo1 {}; template<class T, int n> struct foo1<T[n]>; foo1<char> bar1; foo1<char[10]> baz1; // { dg-error "" } incomplete type template<class T> struct foo2 {}; template<class T, unsigned n> struct foo2<T[n]>; foo2<char> bar2; foo2<char[10]...
google
android
pointer1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/pointer1.C
210
utf_8
f07eca4ce324c88a3c4c0a6c61c825d2
// { dg-do assemble } template <class T> struct S1 { }; template <class T> struct S2 { typedef T* pointer_t; }; int f(S2<S1<int> >::pointer_t p1, S2<S1<int> >::pointer_t p2) { return (int) (p1 - p2); }
google
android
memtemp56
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp56.C
328
utf_8
9fd903e5ed2b0f601536dfbd4c3a22a5
// { dg-do assemble } // GROUPS passed templates membertemplates template<class P_numtype, int N_length> class TinyVector {}; template<class P_numtype, int N_rank> struct Array { template<int N_rank2> Array() {} template<int N_rank2> P_numtype operator()(const TinyVector<int,N_rank2>& index) const...
google
android
unify1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/unify1.C
263
utf_8
d6c8f4a2bd3eee6e10304d0f21bed927
// { dg-do assemble } // Tests non-unification of parms that don't use template parms. enum kind {a, b}; class C { public: C () {} }; template<class P> void f (P c, kind k) {} template<class P> void f (P c, P d, kind k) {} template void f (C c, C, kind k);
google
android
explicit34
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit34.C
264
utf_8
e80e4bd286dae4f878fce619c275cb65
// { dg-do assemble } // { dg-options "-fshow-column" } // GROUPS passed templates template <class T> void foo(T t); template <> void foo(int) {}; // { dg-message "6:previously declared here" } template <> void foo<int>(int) {} // { dg-error "6:redefinition" }
google
android
ttp20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp20.C
327
utf_8
2c207ca3761392c64a1f955fbf76311e
// { dg-do run } template<class T> class D { public: int f(); }; template<class T> int D<T>::f() { return sizeof(T); } template<template<class> class D,class E> class C : D<E> { public: int g(); }; template<template<class> class D,class E> int C<D,E>::g() { return this->f(); } int main() { C<D,int> c; c....
google
android
overload11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/overload11.C
251
utf_8
e3bff0b8c186e28a157dd612f7988fc6
// { dg-do link } template <class T> int f(int (*fn)(T)) { return (*fn)(3); } struct S { static int g(int) { return 1; } static void g(); int h(); }; int S::h() { return f(&g); } int main() { S s; if (s.h () != 1) return 1; }
google
android
memclass20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memclass20.C
288
utf_8
7e7e4c8c8a3541a7ae94eff831f235bb
// { dg-do assemble } template <class X, class Y> struct S{}; template <class X> struct S<int, X> { template <class W> struct I {}; }; template <class T> void f() { typename S<T, T>::template I<T> si; } template void f<int>();
google
android
ttp53
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp53.C
703
utf_8
20fb2043be6ad6f1486e40c6e4909168
// { dg-do assemble } template <typename> class H; template <typename Target, typename Source> H<Target> foo(const H<Source>&); template <typename Type> class H{ #ifdef OK public: #endif template<template<class, class> class Caster, typename Source> static H<Type> cast(const H<Source>& s); #ifndef OK template <t...
google
android
crash53
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash53.C
177
utf_8
9a724df4741a6fe90242a34a989f24e6
// { dg-do assemble } struct S { }; S g (); template <class T> void f () { const S& s = g (); } template void f<int>();
google
android
expr6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/expr6.C
150
utf_8
619d962538d9d166d1131873bfc1b4ae
// { dg-do assemble } template <int X> class foo {}; foo< true ? 1 : 0 > bar;
google
android
enum3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/enum3.C
154
utf_8
d813a116a12ca2b98a36e5ef02510f85
// { dg-do run } struct S { enum en { s0, s1, s2 }; }; template<typename S::en e> int val( ) { return e; } int main() { return val<S::s0>( ); }
google
android
explicit54
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit54.C
643
utf_8
e3767555b3e9f69aafa4e31631545242
// { dg-do run } extern "C" void abort (); template <int a> inline int fact2 (); template <int a> inline int fact () { return a * fact2<a-1> (); } template <> inline int fact<1> () { return 1; } template <int a> inline int fact2 () { return a*fact<a-1>(); } template <> inline int fact2<1> () { return 1; }...
google
android
memtemp8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp8.C
159
utf_8
ade19ffe674662b17d243a6efafca792
// { dg-do assemble } // GROUPS passed templates membertemplates struct S { template <class T> operator T(); }; template <class T> S::operator T() { }
google
android
crash9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash9.C
221
utf_8
6a960d162880a1b8e179f479843c44e9
// { dg-do assemble } template <class T> void f(T) {} // { dg-error "initializing" } class C; // { dg-error "forward declaration" } void g(const C& c) { }
google
android
memtemp32
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp32.C
209
utf_8
c837d010beffec4b138ac83e31e887dc
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); struct S { template <class U> void g(U u) { i = 3; } int i; }; int main() { S s; s.g(3); }
google
android
memtemp71
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp71.C
110
utf_8
8b399162a70095f581a5d181e9cd51e2
// { dg-do assemble } class A { template<class T>T epsilon; // { dg-error "" } invalid member template };
google
android
memtemp37
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp37.C
215
utf_8
9e65539e1acb364e3e4d00df65134d79
// { dg-do assemble } // GROUPS passed templates membertemplates template <class T> struct S { template <class U> void f(U u); }; template <class T> template <class U> void S<T>::f(U) { } enum { a = 3 };
google
android
memtemp61
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp61.C
177
utf_8
ce141482239d76ab62a6ad4a98a68807
// { dg-do link } // GROUPS passed membertemplates struct S { template <class T> void foo(T t); }; template <> void S::foo(int i) { } int main() { S s; s.foo(3); }
google
android
crash56
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash56.C
469
utf_8
c2297c8c986cd0254bfff4e8fde33e63
// { dg-do assemble } // // bug 127. We ICE'd when given a non-template TYPE_DECL as a template name. template <class charT> class basic_string { public: typedef charT* iterator; explicit basic_string (); ~basic_string (); }; void foo () { basic_string<char>::iterator<char> p; // { dg-error "" } not a templat...
google
android
using1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/using1.C
567
utf_8
6db34b7b286cebb5470a57b834c15939
// { dg-do run } // Bug 1981. using declarations in namespace scope were not remembered. namespace A { void swap () {} } template <class T> void f() { using A::swap; } template void f<float> (); int foo (int) { return 0;} namespace B { int foo (int) { return 1;} template <class T> int baz () { using :...
google
android
memtemp30
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp30.C
223
utf_8
3b9a16ac3949a5bf0132472a7453bd4b
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); template <class X> struct S { template <class U> void g(U u) { this; } }; int main() { S<char*> s; s.g(3); }
google
android
static_cast
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/static_cast.C
338
utf_8
146d06d1176317370943a7d9242645dc
// { dg-do assemble } template <class InputIterator, class BinaryOperation> void accumulate(InputIterator first, BinaryOperation binary_op) { } template<class R> int p( int val, R& r ) { return val + r; } template<class R> void f(R) { accumulate(0, static_cast<int (*)(int, R&)>(p) ); } int ma...
google
android
memtemp72
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp72.C
197
utf_8
2064173d94827c41a431f024cee9d82a
// { dg-do assemble } template<class P> struct B { template<class T> void f(T& t) { t = T(); } }; enum ptype { t1, t2}; struct D : public B<ptype> { void g(double& d) { f(d); } }; D d;
google
android
memtemp95
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp95.C
261
utf_8
ba086b0c58b3721f78e407692a39cb9f
// { dg-do assemble } template <class T, class V> struct S { }; template <class T> struct S<T, int> { template <class U> void f (U); }; template <class T> template <class U> void S<T, int>::f (U) { }
google
android
ttp6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp6.C
137
utf_8
630345194d6b34b47811923d89376ea6
// { dg-do run } template<int> class F { }; template<template<int> class D,class E> class C { D<1> d; }; int main() { C<F,int> c; }
google
android
tiemann1r
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/tiemann1r.C
111
utf_8
50dc4935fd4767c5498d475789c47408
// { dg-do assemble } struct bs_1 { typedef int (*p_user_hashf)(int); }; bs_1::p_user_hashf i_user_hashf;
google
android
deduct4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/deduct4.C
216
utf_8
bebda0d9abe97c29d328a826c65a64eb
// { dg-do run } // Test that we can deduce t even though T is deduced from a later argument. template <int I> struct A { }; template <class T, T t> void f (A<t> &, T) { } int main () { A<42> a; f (a, 24); }
google
android
spec32
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec32.C
162
utf_8
0d5a7ee59e13d34e0cacef3333c95393
// { dg-do assemble } template<class T1, class T2> class foo; template<class T> struct foo<T,typename T::bar>;
google
android
repo1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/repo1.C
461
utf_8
706f15e009be25a8e79222ab0622d4fb
// { dg-do link } // { dg-options "-frepo" } // { dg-require-host-local "" } // { dg-skip-if "dkms are not final links" { vxworks_kernel } } // Bug: g++ complains about duplicate explicit instantiations with -frepo. // Build then link: template <class T> struct A { virtual ~A () { } }; template <class T> void g (T t)...
google
android
defarg11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/defarg11.C
156
utf_8
e990e8b7630b3cb36a2dc666abfb0ad9
// { dg-do assemble } template <class T, class U = int> struct A; template <class T = int, class U> struct A;
google
android
friend14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend14.C
244
utf_8
76cadfb500b872024ea4b780f9a0ef59
// { dg-do assemble } template <class U> class S1 { template <class T> friend class S2; static int i; }; template <class T> class S2 { public: static void f() { S1<T>::i = 3; } }; void g() { S2<double>::f(); S2<long>::f(); }
google
android
tt
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/tt.C
634
utf_8
1c1dde5705b7ef17dd1d6f9f2b5b2527
// { dg-do assemble } #define DEF_A struct A { A() { a = 2; } int a; } #if 1 int f1 () { DEF_A; A aa; return aa.a; } int f2 () { DEF_A; A ab; return ab.a; } /* results: tt.cc: In function int f2 (): tt.cc:9: conflicting types for `A::A ()' tt.cc:3: previous declaration of `A::A ()' /u2/projects/gcc2/s...
google
android
memtemp18
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp18.C
182
utf_8
3ff90e6f4aeaa29dda038bf5e6342894
// { dg-do assemble } // GROUPS passed templates membertemplates struct S { template <class T> void foo(T) {} }; template void S::foo(int); int main() { S s; s.foo(3); }
google
android
crash36
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash36.C
843
utf_8
cf9f23e3db0127ae7173829730e702a5
// { dg-do assemble } template<class Iterator> struct iterator_traits { typedef typename Iterator::iterator_category iterator_category; // { dg-error "" } no type iterator_category }; template<class Category> struct iterator { typedef Category iterator_category; }; template <class Iterator> struct reverse_iter...
google
android
nested2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/nested2.C
265
utf_8
b2734f7995a0e288c2b5eb646c538e3d
// { dg-do assemble } template<class T> struct a { struct b { T operator()(); }; }; template<class T> T a<T>::b::operator()() { return T(0); } template<> int a<int>::b::operator()() { return 1; }
google
android
memtemp83
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp83.C
259
utf_8
36f92bddcd9a081e531e4ab67b6bf3fa
// { dg-do assemble } struct cow_t { template<bool Q> static void tfunc(cow_t *cowp) {} void moo() { cow_t *cowp; tfunc<true>(cowp); } }; int main() { cow_t *cowp; cow_t::tfunc<true>(cowp); }
google
android
spec28
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec28.C
330
utf_8
312b1014cbf474dd927b7911815cf759
// { dg-do assemble } template <class T> bool f(T); template <class T> struct S1 { typedef T X; friend bool f<>(const S1&); }; template <class T> struct S2 { }; template <class T> struct S2<S1<T> > { typedef typename S1<T>::X Y; }; template <class T> typename S2<S1<T> >::Y f(const S1<T>&); template struct...
google
android
friend37
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend37.C
262
utf_8
c2141644fc33bf55b5da066f773db6fa
// { dg-do assemble } template <class T> class A { friend int ice<>( int k=0 ); // { dg-error "" } default argument friend inline int f<>(double); // { dg-error "" } inline };
google
android
m1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/m1.C
251
utf_8
68ae4259897949e12ba6f612c0e667b6
// { dg-do assemble } int f1 () { struct A { A() : b (2) { } int fred () { return b.hi_mom; } struct B { int hi_mom; B (int a) { hi_mom = a; } }; B b; }; A aa; return aa.fred(); } /* crashes with signal 11 */
google
android
explicit33
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit33.C
132
utf_8
96fc2f8745987f5b5d895256cba22cbf
// { dg-do assemble } // GROUPS passed templates template <class T> void foo(T t); template <> void foo(int) {} void foo(int) {}
google
android
t23
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t23.C
201
utf_8
bdaa6d5c9f9696147ac816a8e0746133
// { dg-do assemble } template <class T> class temp1 { public: T tvar; }; template <class T2> class temp2 { public : temp1<T2> t1var; }; temp1<int> temp1var; temp2<int> temp2var;
google
android
overload3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/overload3.C
172
utf_8
17d985f8e0055d711bd6f46440b506c0
// { dg-do assemble } template <class T> void g(T, T); template <class T> void g(int*, T); struct S { void f() const { g(X, X+3); } double X[3]; };
google
android
typename24
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typename24.C
329
utf_8
5ceebb7517e50a9faad0b76f35cf66b5
// { dg-do assemble } class ostream; extern ostream& cout; class Foo { }; ostream &operator<<(ostream &os, const Foo &) { return os; } template<class T> const typename T::fooz &operator<<(const Foo &, const T &t) { return t; } int main() { Foo foo; cout << foo; }
google
android
cast1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/cast1.C
129
utf_8
00bb322c649a2fe684c3fee1fdd590df
// { dg-do assemble } template <class T> void f (T t) { const_cast<T>(t); }
google
android
memtemp7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp7.C
308
utf_8
c7588e497b92cdcedbc471bdb943f423
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); struct S { template <class T, class U> S(T, U, T); }; template <class T, class U> S::S(T t1, U u1, T t2) { printf("Hello, world.\n"); } int main() { S s1(3, "abc", 3); S s2('a', s1, 'a'); }
google
android
static11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/static11.C
726
utf_8
4940f57a74db7e31c4818c81831d06a5
// 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. // { dg-do run { target unwrappe...
google
android
t03
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t03.C
156
utf_8
001ca48f810669a44c356cc1b8ad9db2
// { dg-do assemble } template <class A> class B { public: A a; }; static B<int> b_int; static B<char> b_char; int foo () { return b_int.a + b_char.a; }
google
android
defarg4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/defarg4.C
260
utf_8
5b703e6efa53e69590b3de81a09508cf
// { dg-do assemble } template <class T> struct S1 { void foo(T = t()); static T t(); }; template <class T> struct S2 { void bar(); }; template <class T> void S2<T>::bar () { S1<T> st; st.foo(); } int main() { S2<int> s2i; s2i.bar(); }
google
android
m2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/m2.C
136
utf_8
976da8859474ddc134f3109fc5b2789d
// { dg-do assemble } struct A { A() { a = 2; } int a; }; int f1 () { struct A { A() { a = 2; } int a; }; A aa; return aa.a; }
google
android
spec41
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec41.C
243
utf_8
cad9794eab82bd6f8f2d29e8df55bda4
// { dg-do assemble } // Bug: Specialization of implicitly created function should be // rejected. template<class T> class blah{}; blah<char>::blah(){} // { dg-error "" } invalid specialization int main(){}
google
android
spec14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec14.C
219
utf_8
fea725bbf029652eac5230a4f7249377
// { dg-do assemble } class X { public: template <typename A, typename B, typename C> X() {} template <typename A, typename B> X::X<A, void, B>() {} // { dg-error "" } non-template type used as a template };
google
android
crash35
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash35.C
175
utf_8
55b1abdb1a2e1df7825e673f1b1ac0d6
// { dg-do assemble } template <class O> struct Str { Str(int& val= (*new int())); }; template<class O> Str<O>::Str(int& val) {}
google
android
t01
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t01.C
122
utf_8
b97c2c6c13d4d6af7ec8d485c57e1918
// { dg-do assemble } template <class A> class B { public: A a; }; static B<int> b_int; int foo () { return b_int.a; }
google
android
friend22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend22.C
127
utf_8
518a930e33a9c7bffb804d4f439fcf24
// { dg-do assemble } template <class T = int> struct S { template <class U> friend class S; }; template struct S<int>;
google
android
defarg6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/defarg6.C
574
utf_8
415ffebe524a076f3757699994813db3
// { dg-do assemble } // { dg-options "-std=gnu++98" } template <class T> struct C { template <class U> void f(U); // OK template <class V = int> struct I {}; // OK template <class W = int> void h(W); // { dg-error "" } default argument template <class Y> void k(Y); }; template <class T> templat...
google
android
infinite1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/infinite1.C
599
utf_8
27d4030cb71631d44fc292c2e85c4a53
// { dg-do assemble } // { dg-options "-ftemplate-depth-10" } // Test for catching infinitely recursive instantiations. template <int i> void f() { f<i+1>(); // { dg-error "" } excessive recursion } // We should never need this specialization because we should issue an // error first about the recursive template i...
google
android
crash25
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash25.C
73
utf_8
bd8a95d6bf966374c13ce6ba143f5766
// { dg-do assemble } template <class T> void f() { int i[1 << 3]; }
google
android
memtemp46
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp46.C
250
utf_8
a6d4494dfcbff56e1372aa0b99ea4698
// { dg-do link } // GROUPS passed templates membertemplates template<class T, class U> class A { }; template<class U> class A<float, U> { public: template <class V> void func(V v1 = 0) {} }; int main() { A<float, int> a; a.func("abc"); }
google
android
friend40
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend40.C
189
utf_8
7c3b3464dfe617b8ca22b200865b00b2
// { dg-do assemble } // { dg-options "-Wno-non-template-friend" } template<class T> struct A { friend void f (); }; A<short> a; A<int> b;
google
android
explicit19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit19.C
212
utf_8
fa1d306eff36f8a6b5c774a26082ad13
// { dg-do link } // { dg-options "-ansi -pedantic-errors -w" } // GROUPS passed templates template <class T> int foo(T t); template <> int foo<int>(int i) { return 0; } int main() { return foo<int>(3.0); }
google
android
ttp15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp15.C
337
utf_8
023bcee7785516c4931ccce087cb23fd
// { dg-do run } template<class T> class D { public: int f(); }; template<class T> int D<T>::f() { return sizeof(T); } template<template<class> class D,class E> class C { D<E> d; public: int f(); }; template<template<class> class D,class E> int C<D,E>::f() { D<E> d2; return d2.f(); } int main() { C<D,i...
google
android
t11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t11.C
130
utf_8
4225a5fa8a7dd3d384ce411bdccbe3ca
// { dg-do assemble } template <class A> class B { public: A a; B() { x = 2; } // { dg-error "" } no x }; static B<int> bi;
google
android
crash64
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash64.C
638
utf_8
794c7a8a3273bd49aedaeef3511992c6
// { dg-do assemble } // Bug 1546. We ICE'd trying to unify an array of unknown bound, // checking to see if it was a variable sized array. template <class _Tp> class allocator {}; template <class _Tp, class _Allocator> struct _Alloc_traits { static const bool _S_instanceless = false; }; template <class _Tp, class _...