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
friend14
.C
native_client/nacl-gcc/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
chromium
inline1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/inline1.C
177
utf_8
9becc6b60e24b9b917c3240eb67cdf79
// { dg-do assemble } // { dg-options "-O2 -Winline" } template <class T> inline void f () { } void g () { f<int> (); }
google
chromium
crash31
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash31.C
247
utf_8
d7866497f7e5839b6b2923ee09574812
// { dg-do assemble } // Origin: Corey Kosak struct cow_t { template<bool Q> static void tfunc(cow_t *cowp) {} void moo() { cow_t *cowp; cow_t::tfunc<true>(cowp); } }; int main() { cow_t *cowp; cow_t::tfunc<true>(cowp); }
google
chromium
ttp45
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp45.C
234
utf_8
a7322de888b4b6c05466d26e51372412
// { dg-do assemble } template<class M, class T> struct temp2; template<template<class> class M, class T> struct temp2<M<T>, T> {}; template<class M> struct temp1; template<template<class> class M, class T> struct temp1<M<T> > {};
google
chromium
lookup7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/lookup7.C
205
utf_8
ace1d008dd08c5bb54e89244f9df1cd6
// { dg-do assemble } struct A { typedef int B; }; template <int B> struct C : public A { B b; void f(); }; template <int B> void C<B>::f() { B b; }
google
chromium
ttp59
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp59.C
234
utf_8
0d497e87f240e53b2bbced36a7aabcf6
// { dg-do assemble } template<template<typename> class t1, typename t0> void single() { single<t1,t0>(); } template<typename a> class T1 {}; int main() { single<T1,int>(); }
google
chromium
inline2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/inline2.C
227
utf_8
c27b3924e12665aa819d9c1eb8b515ab
// { dg-do assemble } // { dg-options "-O" } template <class T> struct S { inline ~S () {} }; template <class T> void f () { static S<T> s; } template void f<int>();
google
chromium
memclass3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memclass3.C
397
utf_8
b2895d81098caa1d254d4aad183cc47f
// { dg-do run } template <class T> struct A { template <class U> struct B { template <class V> struct C { template <class W> struct D { template <class X> struct E { template <class Y> struct F { template <class Z> void f (Z) { } void g () { } }; }; }; }; }; }; int main () {...
google
chromium
lookup8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/lookup8.C
205
utf_8
94f54627b1304f85623bf165622f411a
// { dg-do assemble } template <class T> class X{}; class Y : public X<int> { void f(); }; void Y::f() { X x; // { dg-error "" } X is not a type. }
google
chromium
explicit15
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit15.C
420
utf_8
0b036ce91227775ab2f7e28527d9f32e
// { dg-do assemble } // GROUPS passed templates template<int N_rank> class Array; template<class T> class ArraySectionInfo { public: enum { rank = 0 }; }; template<class T1> class SliceInfo { public: enum { rank = ArraySectionInfo<T1>::rank }; typedef Array<rank> T_slice; }; tem...
google
chromium
conv1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/conv1.C
212
utf_8
39f08277505df0f4dda7bde601ff4ef1
// { dg-do assemble } template <class T> struct S1 {}; struct S2 { template <class T> operator S1<T>*(); }; struct D: public S1<int> { }; void f() { S2 s; (D*) s; // { dg-error "" } cannot convert }
google
chromium
t08
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t08.C
124
utf_8
f98acb35fadb4e573d4df33880e42721
// { dg-do assemble } template <class A> class B { A a; public: B (); ~B (); }; B<int> b_int; B<int> *bp = &b_int;
google
chromium
t07
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t07.C
165
utf_8
a2feedbc0bbbcf664f944a1d26e5e961
// { dg-do assemble } template <class A> class B { A a; public: const A& value () { return a; } }; static B<int> b_int; int foo () { return b_int.value(); }
google
chromium
spec30
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/spec30.C
596
utf_8
1493ad25bf38b894f4a1e792c22d0411
// { dg-do run } #include <cstddef> template <class T> struct S { void *operator new (size_t); void *operator new (size_t, int); void operator delete (void*); }; static void* s[2]; template <> void* S<int>::operator new (size_t b) { s[0] = ::operator new(b); return s[0]; } template <> void* S<int>::op...
google
chromium
explicit5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit5.C
218
utf_8
2ccceee4388a48911c34763f6e79896b
// { dg-do assemble } // GROUPS passed templates template <class T> void foo(T t) {} template <class T> struct S {}; template <class T> void bar(T t) { void (*f)(S<T> ) = &foo<S<T> >; } void baz() { bar(3); }
google
chromium
friend30
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/friend30.C
382
utf_8
72083e7908b694935f8899884c04f89e
// { dg-do assemble } template <class T, class U> struct S { template <class X, class Y, class Z> friend X f(X, Y, Z); }; template <class X, class Y, class Z> X f(X x, Y, Z) { return x; } template char f(char, long, short); template char* f(char*, long*, short*); template class S<int, double>; template class ...
google
chromium
memtemp84
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp84.C
432
utf_8
7cf08f0eb255714be41e1bc90c91a2ca
// { dg-do assemble } struct B { template <class> void bar(); } b; template <class T> void foo() { b.bar<T>(); // { dg-bogus "" } bar undeclared b.template bar<T>(); // { dg-bogus "" } ditto b.B::bar<T>(); } template void foo<void>(); // { dg-bogus "" }
google
chromium
crash52
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash52.C
271
utf_8
591fbda8670d791612ad69788de74af5
// { dg-do assemble } template <class T> struct S1 { template <class U> struct S2 { S2(U); }; template <class U> void f(U u) { S2<U> s2u(u); } }; void g() { S1<int> s1; s1.f(3.0); }
google
chromium
static10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/static10.C
357
utf_8
6e1f9dfcbea7082174a6264d33e93969
// { dg-do assemble } // regression test - template<class A> struct X { X(A) { } }; template<class A> struct Y { static X<A> x(A(1)); // { dg-error "" } ANSI C++ forbids in-class initialization of non-const static member `x' }; Y<int> y;
google
chromium
spec1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/spec1.C
346
utf_8
1c96663624a060c4cc29a4ae37cce796
// { dg-do assemble } template <class S, class T> class mem_fun1_t { public: mem_fun1_t(S (T::*pf)(double)) {} }; template <class T> class mem_fun1_t<void, T> { public: mem_fun1_t(void (T::*pf)(double)) {} }; struct Operation { double eval(double) { return 0; } }; int main() { mem_fun1_t<double, Operatio...
google
chromium
memclass6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memclass6.C
305
utf_8
e841de59f68e727816ffaae50c0f221d
// { dg-do run } // Compiler: egcs-2.91.12 980302 // Error: compiler error in ctor of 'foo::bar<T>::bar(T const &)' struct foo { template <typename T> struct bar { bar(T const &t) : tt(t) {} T tt; }; }; int main() { foo::bar<int> fb(3); return 0; }
google
chromium
memtemp20
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp20.C
522
utf_8
57131ddff95db101deaa3f1a8531b57f
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); struct S { template <class T, class U> void foo(T t, U u); template <class U> void foo(char*, U); void foo(int i); }; template <class T, class U> void S::foo(T t, U u) { printf ("T,U version\n"); } t...
google
chromium
memtemp24
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp24.C
395
utf_8
652ae1b58d6749944daad11f3f765054
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); template <class X> struct S { S() { printf ("In S::S()\n"); f(3); } S(char) { printf ("In S::S(char)\n"); f(*this); } template <class U> void f(U u) { printf ("In S::f(U)\nsizeof(U) == %d\n", sizeof...
google
chromium
memtemp48
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp48.C
168
utf_8
4c8a9249e4ac3af9638122d522718271
// { dg-do assemble } // GROUPS passed templates membertemplates struct S { template <class T> void f(T t1, T t = T()) {} }; void foo() { S si; si.f(3); }
google
chromium
ptrmem3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ptrmem3.C
158
utf_8
fd6c9bbde46f9a741d3ea6fcf4196c71
// { dg-do assemble } template <class T> struct S : public S<T*> {}; template <> struct S<int**> {}; void g() { int S<int*>::*p; int S<int>::*q = p; }
google
chromium
typename13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/typename13.C
323
utf_8
801140a6f90dacc2faec17aeb8b23875
// { dg-do assemble } // { dg-options "-fpermissive" } template <class T> struct B { typedef int I; }; template <class T> struct D : public B<T> { void f(); }; template <class T> void D<T>::f() { I(); // { dg-warning "" } } template <> struct B<int> { void I(); }; int main() { D<int> di; di.f();...
google
chromium
dynarray
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/dynarray.C
349
utf_8
5b8f05849adf02df49d6c7a143da6dd0
// { dg-do assemble } // { dg-options "" } inline const unsigned& f(unsigned const& a) { return a; } template <class T> void g(const unsigned n) { double D[f(n)]; } template <class T,class U> void g(unsigned const int) { } int main() { g<double>(18); }
google
chromium
explicit50
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit50.C
278
utf_8
39e97d1cd7053844c7e2404804e8cc05
// { dg-do run } extern "C" void abort (); template <class T> int f () { return sizeof(T); } int main () { if (f<long> () != sizeof(long) || f<char> () != sizeof(char) || f<long> () != sizeof(long) || f<long int> () != sizeof(long int)) abort (); }
google
chromium
static8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/static8.C
352
utf_8
89ecd6c73fd87f973e737c007e6defb0
// { dg-do run } int i; template <class T> struct S { S() { ++i; } virtual void g() {} virtual void f(); static S s; }; template <class T> void S<T>::f() { s.f(); } S<int> si; template <class T> S<T> S<T>::s; int main () { si.g(); if (i != 2) return 1; else return 0; }
google
chromium
error3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/error3.C
353
utf_8
69934beb5853875136b70df407860519
// { dg-do assemble } // Bug 1606. We sorry'd issuing an error. struct A {}; template <class T = A> class Tpl {}; struct B { Tpl<int> s; }; void foo (B *ptr) { ptr->Tpl.t (); // { dg-error "" } template as expression }
google
chromium
t28
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t28.C
209
utf_8
9d1a90d478f9d7cd8e7147d1688c25ca
// { dg-do assemble } template <class X> class B; template <class X> int f (B<X> b) { return 37; } template <class Y> class B { public: Y y; B() { y = 1; } }; int foo () { B<double> bd; return f(bd); }
google
chromium
ptrmem5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ptrmem5.C
407
utf_8
307b552baa37598a74e96cc36e240254
// { dg-do assemble } struct Null { template <typename T> operator T*() { return 0; } template <typename C, typename T> operator T C::*() { return 0; } #if WORK_AROUND typedef int pmf(); template <typename C> operator pmf C::* () { return 0; } #endif } NULL; int *pd = NULL; int (*pf)() = NULL; int Null::*pmd =...
google
chromium
memtemp69
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp69.C
480
utf_8
45dbdf02e6239b98048ef7584013b0f1
// { dg-do run } struct S { template <class T> void f(T (&i)[7]) {} void g() { int i[] = {1, 2, 3, 4, 5, 6, 7}; f(i); int j[7]; f(j); } }; struct foo { template <typename T, int N> static T* array_end(T(&array)[N]) { return &array[N]; } }; struct X { template <class ...
google
chromium
friend18
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/friend18.C
245
utf_8
7f8d45f974ba7ee12815e85047b95d7b
// { 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
chromium
memtemp8
.C
native_client/nacl-gcc/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
chromium
poi1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/poi1.C
218
utf_8
4f7cbba362e22c31077f4ebd633a360a
// { dg-do assemble } template <class T> class TLITERAL : public T { int x; }; class GATOM; typedef TLITERAL<GATOM> x; extern TLITERAL<GATOM> y;
google
chromium
nontype4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/nontype4.C
347
utf_8
b8f73a75eea223306130ca7acbb0d8c0
// { dg-do assemble } template <class R, void (R::* A) (void)> class s { public: s (R &r) : _r (r) {} void e (void) { (_r.*A) (); } private: R &_r; }; class x { public: void test1 (void) { int j = 0; } void test2 (void) { int j = 1; } }; int main (void) { x r; s<x, &x::test1> c4 (r); s<x, &x::tes...
google
chromium
enum13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/enum13.C
194
utf_8
7b4f8898d8f20a0985e804ffbba64dbc
// { dg-do assemble } template <typename T> struct foo { enum { A = 4 >= 4, B = (1 ? true : A) }; }; foo<int> bar;
google
chromium
spec28
.C
native_client/nacl-gcc/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
chromium
spec5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/spec5.C
294
utf_8
85fefb6db26df1ac52e3a1bd38c24162
// { dg-do assemble } template <class T> void f(T t1, T t2); template <> void f(int i, int j); template <class T> void g(T t1, T t2) {} template void g(int i, int j); void h() { f(3, 'c'); // { dg-error "" } no matching function g(3, 'c'); // { dg-error "" } no matching function }
google
chromium
memclass11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memclass11.C
166
utf_8
ab9e7f877c53ad0353502b73855312d3
// { dg-do assemble } struct S1 { template <class T> struct S2; template <class T> struct S2 { enum E { a }; }; }; int i = (int) S1::S2<double>::a;
google
chromium
static2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/static2.C
233
utf_8
b0ee25173b0e8adc17515578b0821f22
// { dg-do assemble } template <class A> class TEST { public: TEST (A) {} }; template <class A> class TEST2 { static A i; }; template <class A> A TEST2 <A>::i (0); TEST2 <TEST <int> > a; template class TEST2 <TEST <int> >;
google
chromium
static9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/static9.C
281
utf_8
6e11a4161127a251dd4e656f70f7bb7b
// { dg-do assemble } template <class T> struct S { int i; }; template <class T> struct X { static S<T> s[]; }; template <class T> S<T> X<T>::s[] = { { 3 } }; struct Z {}; void f(S<Z>* s); void g() { f (X<Z>::s); }
google
chromium
static5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/static5.C
157
utf_8
d3753adb4f484f4fb4b4e2fc61de3464
// { dg-do assemble } template <class T> struct S { static const T t = 3; // { dg-error "" } initializing non-integral type }; double d = S<double>::t;
google
chromium
static3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/static3.C
288
utf_8
cce93274cc52f32776c18c658a1f9dde
// { dg-do run } // On targets that don't support weak symbols, we require an explicit // instantiation of arr. // { dg-require-weak "" } template<class T> struct A { static T arr[5]; }; template <class T> T A<T>::arr[5] = { 0, 1, 2, 3, 4 }; int main () { return A<int>::arr[0]; }
google
chromium
memtemp79
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp79.C
152
utf_8
ba93ff2f6f392b1f1ec5abdc4d4dead2
// { dg-do assemble } struct foo { template<typename T> static void bar( foo* ); template<typename T> void bar() const; // { dg-bogus "" } quals };
google
chromium
virtual2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/virtual2.C
279
utf_8
ea4785010f99b86cb5329befa86499b3
// { dg-do assemble } template <class T> struct B { virtual void f() = 0; }; template <class T> struct D : public B<T> { virtual void f(); }; void g() { B<int>* bi = new D<int>; } template <class T> void B<T>::f() {}
google
chromium
crash32
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash32.C
216
utf_8
32a446cae5b7f28dc0947d6e7ad5f38b
// { dg-do assemble } template <class T> struct A { struct B; }; template<class T> struct C { friend typename A<T>::B; // { dg-error "" } `typename' not allowed };
google
chromium
t32
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t32.C
315
utf_8
7c4f4dc67e63781b875169ea666fdae5
// { dg-do assemble } template <class X> struct A { int fooo (int x); int x; inline int y () { return 3; } inline int z () { return 5; } }; template <class Y> int A<Y>::fooo (int t) { return (this->*(x?&A<Y>::y : &A<Y>::z))() + t; } // { dg-bogus "" } A<int> ai; int frop () { return ai.fooo (100); }
google
chromium
memtemp86
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp86.C
301
utf_8
f4d80a9a5994f70c15b091b311c9c1ca
// { dg-do assemble } struct Q { template<class> class X { }; }; template<template<class> class> class Y { }; Y<typename Q::X> y; // { dg-error "" } typename out of template context
google
chromium
ptrmem7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ptrmem7.C
163
utf_8
43af7526c15acf063c86ed2628da6ed1
// { dg-do assemble } struct A { int i; }; template<const int A::* P> struct B { }; int main() { B<&A::i> b; }
google
chromium
memtemp75
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp75.C
229
utf_8
439cfe31ad68b6ca4c28b91498a9b16b
// { dg-do assemble } void print(const int& i) { } template<class A> class bar { public: template<void (*B)(const A& a)> void doit(const A& a) { B(a); } }; int main() { bar<int> b; b.doit<print>(2); }
google
chromium
overload8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/overload8.C
285
utf_8
3e1e706e620fe63e0069f79a46d7d1cd
// { dg-do assemble } struct baz; void operator*(baz&, double); template <class T> inline T operator*(double s, const T &p) ; // { dg-bogus "" "" } - must have argument of class type - void m(baz& a) { a * .5; }
google
chromium
typename22
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/typename22.C
266
utf_8
82b2d6c1bd6b51ffd07d163c6670c8d0
// { dg-do assemble } template <class T> struct S { template <class U> struct I { typedef U X; X f(); }; }; template <class T> template <class U> typename S<T>::template I<U>::X S<T>::I<U>::f() {}
google
chromium
ttp64
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp64.C
1,056
utf_8
4ab0afb1cb3c9db02b756d5cf4e5e6f0
// { dg-do assemble } // Bug: We fail to set DECL_TEMPLATE_PARM_P when reducing template // parameter level. template <class T> class A2 { public: A2() {} virtual ~A2() {} template <class other> A2 & operator=(const A2<other> o) { i=o.i; return *this; } T i; T j; }; template <class T> cla...
google
chromium
switch1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/switch1.C
172
utf_8
b419885700082cf1ee793296d408f7b4
// { dg-do assemble } template <class T> void f () { int i; switch (int i = 3) { } } template void f<int>();
google
chromium
typename28
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/typename28.C
575
utf_8
e218c9983c5cf2834e97d221625c2831
// { dg-do assemble } // // Bug 1844. We can meet types in cp_tree_equal via a template-id-expr. typedef int *Ptr; template<class T> struct B { typedef typename T::template X<T> type; typedef typename T::template X<Ptr> type2; typedef typename T::template X<int *> type3; void foo (type); void baz (type2);...
google
chromium
ttp11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp11.C
287
utf_8
6b638ad39fe12b3954b07cd5b390a0e2
// { 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() { return d.f(); } }; int main() { C<D,int> c; C<D,char> d; c.f(); d.f(); }
google
chromium
ttp12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp12.C
326
utf_8
565c0feee97fb10e6c6160cf197d28b3
// { 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 E,class D> class C { E<D> d; public: int f(); }; template<template<class> class E,class D> int C<E,D>::f() { return d.f(); } int main() { C<D,int> c; c.f...
google
chromium
array7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/array7.C
193
utf_8
0bf7b9320971f79173514bee96bfc707
// { dg-do assemble } template <typename T> struct S { enum E { e = 5 }; static int i[e]; }; template <typename T> int S<T>::i[S<T>::e];
google
chromium
explicit41
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C
140
utf_8
86bf6569e7990d0b919fec697655a984
// { dg-do assemble } template <int I> void f(int i); void g() { int i; f<i>(7); // { dg-error "" } template argument 1 is invalid. }
google
chromium
instantiate11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/instantiate11.C
1,041
utf_8
e7ee5bb602fee5b34b1fc6b20d8d756c
// { dg-do assemble } // Origin: Neil Booth, from bug report #36 template <typename t> class vect; template <typename t> vect<t> operator-( const vect<t>&, const vect<t>& ); template <typename t> class vect { public: vect( t a ); vect( const vect<t>& v ); ~vect(); vect<t>& operator=( const vect<t>& v ); ...
google
chromium
ttp58
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp58.C
477
utf_8
be7fe9403723e05f6868efccab83a224
// { dg-do assemble } namespace NS { template <class T, int V> struct Base { }; template <class T> struct Z { const static int value_ = false; }; struct Outer { template <class T> struct A : public Base <T, Z<T>::value_> { }; }; template <class T> void f(T) { } } template <template <class T> class U>...
google
chromium
incomplete1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/incomplete1.C
353
utf_8
ffb40aa7b5891e7058c5a6dc1f565c67
// { dg-do assemble } // Inspired by 756. We'd ICE when trying to define a member of an // incomplete template type. template<class X> struct ObjCount; template<class X> int ObjCount<X>::m; // { dg-error "" } undefined type
google
chromium
ttp31
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp31.C
401
utf_8
5f123e63e7f82c710a78560e26acc28a
// { dg-do run } template<class T> class D { public: int f(); }; template<class T> int D<T>::f() { return sizeof(T); } extern "C" void abort(); template<template<class> class D,class E> class C { D<E> d; public: int f() { abort(); return 0; } }; template<template <class> class F> class C<F,int> { F<int>...
google
chromium
explicit73
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit73.C
404
utf_8
917c36ea68204c0b56125939b620134c
// { dg-do assemble } // According to [temp.expl.spec]/2, a template explicit specialization // must be declared in the namespace that contains the declaration of // the template namespace N { template <class T> class foo; // { dg-error "" } referenced below } using namespace N; template <> class foo<void>; // { dg-...
google
chromium
ttp3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp3.C
218
utf_8
aa8220744cffd386d90038a43341a131
// { dg-do assemble } template<class E,class F> class D { }; template<template<class> class D,class E> class C { }; int main() { C<D,int> c; // { dg-error "" } param list not match/sees it as not having a type }
google
chromium
spec26
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/spec26.C
354
utf_8
c680e00cbe603257da2666614bc5752f
// { dg-do assemble } // Test that a specialization without an initializer is not a definition, // as specified in [temp.expl.spec]. struct X; template <class T> struct Y { static const X array[]; }; template <> const X Y<int>::array []; struct X { int i; }; template <> const X Y<int>::array [] = { 0, 1, 2, 3 };
google
chromium
crash57
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash57.C
317
utf_8
918dc72262b95765f343b2263ffcaa9d
// { dg-do assemble } // // bug 382. We ICE'd rather than decay to an address. struct A { template <class T> static void f(T) {} }; void (*h)(int) = A::f<int>; void (*i)(int) = &A::f<int>;
google
chromium
defarg4
.C
native_client/nacl-gcc/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
chromium
defarg
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/defarg.C
128
utf_8
9b2b436f0cd34620fbb48b6126c2dea0
// { dg-do run } template <class T> void f(T t, int i = 10); template <class T> void f(T t, int i) {} int main() { f(3); }
google
chromium
friend37
.C
native_client/nacl-gcc/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
chromium
ttp28
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp28.C
446
utf_8
93e2d26dad1778805146f119b74b1529
// { 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() { return d.f(); } }; template<template<class> class D,class E> int f(D<E> &d1) { d1.f(); C<D,E> d2; d2.f(); ...
google
chromium
memtemp92
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp92.C
566
utf_8
540eb82bf8e3b6776f6a090e68ebf3f7
// { dg-do assemble } template <class Style, class Base> class theme_map { }; class QWidget { protected: virtual void *harmony_get_list_for_signal(const char *) const; public: static theme_map<int, QWidget> ContentsThemes; protected: virtual void updateDrawingObjects (void) { update_dro (QWidget::Conte...
google
chromium
instantiate13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/instantiate13.C
410
utf_8
d7cca84493aad98aec660bbff1f5b1c5
// { dg-do assemble } // Bug 1551. We were accessing some uninitialized memory, causing us // to reject this. template <typename T> struct base { base(); base(unsigned); }; template <typename V> struct Y { Y(unsigned = 0); }; template <> Y<char>::Y(unsigned) { } base<double> x;
google
chromium
explicit12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit12.C
271
utf_8
d7e010e7483688160e518f4917ad84e8
// { dg-do link } // { dg-options "-ansi -pedantic-errors -w" } // GROUPS passed templates template <class U> struct S { template <class T> void foo(T t); }; template <> template <> void S<char*>::foo<int>(int) {} int main() { S<char*> s; s.foo<int>(3.0); }
google
chromium
union2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/union2.C
424
utf_8
f6b916c76f9053393e246e9234587d63
// { dg-do assemble } template<class T> struct vector_base { typedef T elm_t; protected: union { double alignment_hack; char defbuf_space[2 * sizeof (elm_t)]; }; elm_t *def_basep () { return reinterpret_cast<elm_t *> (defbuf_space); } }; template<class T> struct vector : public vector_base<T> { vecto...
google
chromium
ttp44
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp44.C
376
utf_8
592098ebd3db56f6ca9ebfc3dadb8984
// { dg-do assemble } template < class T, template < class > class E1, template < class > class E2 > class Add { public: Add(const E1<T>& e1, const E2<T>& e2) {} }; template < class T > struct Id { template < template < class > class E > Add < T, ::Id, E > operator+(const E<T>& e) const { return Add < T, :...
google
chromium
explicit36
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit36.C
205
utf_8
ddc0504c1242a1e73e50ba46667f3643
// { dg-do link } // GROUPS passed templates template <class T> void foo(T); class S { friend void foo<>(int); int i; }; template <> void foo(int) { S s; s.i = 3; } int main() { foo(3); }
google
chromium
ttp57
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp57.C
443
utf_8
d553757204d9635a60968599e5f184e8
// { dg-do assemble } namespace NS { template <class T, int V> struct Base { }; template <class T> struct Z { const static int value_ = false; }; template <class T> struct A : public Base <T, Z<T>::value_> { }; template <class T> void f(T) { } } template <template <class T> class U> struct B { }; int main ...
google
chromium
lookup6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/lookup6.C
500
utf_8
4922c229088bbca4c83064c2e8943fef
// { dg-do assemble } class t {}; template <class T> struct A { typedef T t; typedef T u; }; template <class T> struct B : public A<T> { // according to [temp.dep.type], `t' and `u' cannot be dependent types, // and so there's no reason to delay lookup to specialization time. void f(t p); // this is ::t [temp.de...
google
chromium
lookup5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/lookup5.C
150
utf_8
810c6d88c6102f9dbb1890bec44124be
// { dg-do assemble } struct B { int i; }; struct D: public B { int i; }; template <class T> struct D2 : public D { void f() { i = 3; } };
google
chromium
m9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/m9.C
217
utf_8
46df5c4cfffb3709e86a3342eda1d702
// { dg-do assemble } struct A { A() { a = 1; } int a; }; struct Q { struct A { A() { a = 2; } int a; }; struct R { struct A { A() { a = 3; } int a; }; A aaz; }; R rrr; A aay; } ; Q qqq; A aav;
google
chromium
memtemp97
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp97.C
254
utf_8
d79149c2006aa1786cb67b94840b5231
// { dg-do run } template <class T> struct A { template <class U> int f(U) { return 1; } }; template <> template <class U> int A<int>::f(U) { return 0; } A<int> a; int main () { return a.f (3); }
google
chromium
memclass14
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memclass14.C
146
utf_8
afb2741438e7d3a3a8dec7e741781414
// { dg-do assemble } template <class X, class Y> struct Inner; struct S { template <class U> struct Inner { }; }; S::Inner<int> si;
google
chromium
explicit3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit3.C
156
utf_8
7bdddb0a02eca12773fd1a051cd165a9
// { dg-do assemble } // GROUPS passed templates template <class T, class U> void foo(T t, U u) {} void bar() { (void (*)(double, int)) &foo<double>; }
google
chromium
lookup3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/lookup3.C
176
utf_8
171bc2e8b8d9b2c6e3abdde111a5f050
// { dg-do run } template<class T> class A { public: void f() { } }; class B : public A<int> { public: void f(); }; int main() { B b; B& b1 = b; b1.A<int>::f(); }
google
chromium
m4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/m4.C
190
utf_8
81c5bf6abf911fc27a5b6e1d13f20524
// { dg-do assemble } struct A1 { struct B { B(); } b; }; struct A2 { struct B { ~B(); } b; }; char xx[] ="../tests/m4.cc:1: warning: return type specification for constructor invalid";
google
chromium
crash58
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash58.C
1,136
utf_8
0553b4ff4cacf52f95008ed21e2d39db
// { dg-do assemble } // // bug 147. We ICE'd on an unprocessed LOOKUP_EXPR during tsubsting namespace EManip { template <class T> void do_assign(T* d); // { dg-error "" } candidate } template <class T> void do_assign(T* d); // { dg-error "" } candidate template <class T> struct MatrixC { void foo () { ...
google
chromium
memtemp3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp3.C
272
utf_8
36d4d3c6025343e652003f710e36c1ba
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); struct S { template <class T> void foo(T); }; template <class T> void S::foo(T) { printf("Hello, world.\n"); } int main() { S s; s.foo(3); s.foo(s); }
google
chromium
t05
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t05.C
244
utf_8
c9dd17f8476881c1e35103d9cbf5168d
// { dg-do assemble } template <class A> class B { // { dg-message "note" } A a; public: B(A&aa); // { dg-message "candidates" } ~B(); }; static B<int> b_int (3); // { dg-error "no matching function" }
google
chromium
crash45
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash45.C
149
utf_8
340c2f747b9a9dcc127c9fbab8276b60
// { dg-do assemble } template <class T> void f() { extern void g (); } int main() { f<int>(); }
google
chromium
friend48
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/friend48.C
238
utf_8
c6e5016152bfb759118ae6067f94bc98
// { dg-do assemble } template <class T> class C { template <class U> friend class ::C; }; namespace N { template <class T> class D { template <class U> friend class N::D; }; }
google
chromium
spec11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/spec11.C
237
utf_8
e9268b8e99b3745bcf73bd2daf3e5819
// { dg-do run } extern "C" void abort(); template <class T> struct S { template <class U> int f(U u); }; template <> template <> int S<char>::f(int i) { return 1; } int main() { S<char> sc; if (sc.f(3) != 1) abort(); }
google
chromium
typedef2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/typedef2.C
173
utf_8
635ca269f6f2bfc52b9ee1ab75a92b3e
// { dg-do assemble } typedef const int cint; template<class T> class A { public: T f(cint i); }; template <class T> T A<T>::f(cint i) { } int main() { A<int> a; }
google
chromium
static7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/static7.C
176
utf_8
72154d5a2f46122f8101c515f3a29357
// { dg-do assemble } template <class T> struct S { S() {} static S s; }; template <class T> S<T> S<T>::s; S<int> si;
google
chromium
crash42
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash42.C
232
utf_8
e591311991b921eb27cecccbd9c06e6e
// { dg-do assemble } template <class T> class list {}; class newtype { }; void crash() { newtype* n; n->list.size (); // { dg-error "" } invalid use of template }
google
chromium
explicit4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit4.C
216
utf_8
eeba0732ab375cb0baaae85b577f967b
// { dg-do assemble } // GROUPS passed templates template <class T> void foo(T t); template <class T> struct S {}; template <class T> void bar(T t) { void (*f)(S<T> ) = &foo<S<T> >; } void baz() { bar(3); }
google
chromium
overload6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/overload6.C
326
utf_8
44907ff5ef1d1066b6b39107ecb88f74
// { dg-do run } // Check that foo<int> isn't resolved too early. template <class T> void foo(T*); template <class T, class U> void foo(T*, U) { } template <class T, class U> void bar(void (*)(T, U), U) { } int main() { bar<int*>(&foo, 1); bar<int*>(&foo<int>, 1); bar<int*>(foo, 1); bar<int*>(foo<int>, 1)...
google
chromium
typename8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/typename8.C
456
utf_8
167271a487e0146b0977b14e0bdabaec
// { dg-do assemble } template < class T > class A { public: typedef typename T::myT anotherT; // { dg-error "" } undefined type anotherT t; // { dg-error "" } undefined type A() { } A(anotherT _t) { // { dg-error "" } undefined type t=_t; } anotherT getT() { // { dg-error "" } undefined type ...