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
deduct7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/deduct7.C
303
utf_8
df719460482635555fea5cd129e97296
// { dg-do run } // Test that deduction can add cv-quals to a pointer-to-member type. struct A; int A::* pi; template <typename T> void f (const T A::*) {} int main () { f (pi); }
google
android
memclass21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memclass21.C
186
utf_8
c779fbb2e6d392d978c77df210983e28
// { dg-do assemble } struct moo { template<bool x> struct cow {}; template<bool x> struct moo2 { void func(cow<x> &c) { } }; };
google
android
crash40
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash40.C
298
utf_8
536d144e5eab0baecffc0286597ddea1
// { dg-do assemble } template< class X > struct VB: public virtual X {}; template< class MOPTerm1, class MOPTerm2 > struct MOPTermUnify { struct MO: public VB<MOPTerm1>, public VB<MOPTerm2> { void fix() { } }; };
google
android
explicit35
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit35.C
228
utf_8
1000d74288a54fb28014c5dd12c3f164
// { dg-do link } // { dg-options "-ansi -pedantic-errors -w" } // GROUPS passed templates struct S { template <class T> void foo(T t); }; template <> void S::foo<int>(int i) { } int main() { S s; s.foo<int>(3.0); }
google
android
vbase1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/vbase1.C
414
utf_8
28c56363351732087dd578beb285fa79
// { dg-do run } // Check that template classes handle inherited virtual bases // properly, initializing them before direct non-virtual bases. extern "C" void exit (int); int aflag; struct A { A() { aflag = 1; } }; struct B : virtual public A { B() { } }; struct C { C() { if (!aflag) exit (1); } }; templa...
google
android
friend36
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend36.C
207
utf_8
14cafbdd39314e5cca83ecee2ab80c28
// { dg-do assemble } template <class T> void f(T) {} // { dg-message "previously" } template <class U> struct S { template <class T> friend void f(T) {} // { dg-error "redefinition" } }; S<int> si;
google
android
warn2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/warn2.C
182
utf_8
3309094d2647252bd9b04ea2b4de883f
// { dg-do assemble } // { dg-options "-Wall" } template <typename T> void f() { for(;;) for(;;) goto a; a: ; } void g() { f<long>(); }
google
android
t22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t22.C
183
utf_8
573e00e68110eaba11e9c0eda33a484a
// { dg-do assemble } class AA { public: static int xx; }; template <class X> class A { public: static int x; }; int AA::xx; template <class Y> int A<Y>::x; // { dg-bogus "" }
google
android
instantiate10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/instantiate10.C
246
utf_8
d66c4fde23d4d04d14422202940dde41
// { dg-do assemble } // Origin: Neil Booth, from bug report #44 #include <iterator> template<class T> struct X { }; template<class T> X<T> operator+(const X<T>&, const X<T>&); template<> X<int> operator+<int>(const X<int>&, const X<int>&);
google
android
ttp57
.C
toolchain/gcc/gcc-4.9/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
android
vaarg
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/vaarg.C
265
utf_8
9a7ae6b76deb786bde29550bc4676039
// { dg-do run } #include <stdarg.h> extern "C" void abort(); template <class T> T* f(T t, ...) { va_list ap; va_start(ap, t); T* r = va_arg(ap, T*); va_end(ap); return r; } struct S { }; int main() { S s; if (f(s, &s) != &s) abort(); }
google
android
crash52
.C
toolchain/gcc/gcc-4.9/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
android
defarg7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/defarg7.C
260
utf_8
147c0d1c22fa61d6df040461b286f76f
// { dg-do assemble } template <int Dim, class T, class EngineTag> class Engine {}; struct Brick; template<int Dim, class T = double , class EngineTag = Brick > struct ConstArray { static const int dimensions = Engine<Dim, T, EngineTag>::dimensions; };
google
android
vaarg2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/vaarg2.C
576
utf_8
b020aa07093e2d7a2422bbdc0b9b3c25
// { dg-do assemble } // We attempted to expand va_arg prematurely in a template function. #include <stdarg.h> template <class Type> void PrintArgs (Type somearg, ...) { va_list argp; va_start (argp, somearg); Type value; while ( ( value = va_arg (argp, Type) ) > 0.0) continue; va_end (argp); } int main (void) { do...
google
android
lookup3
.C
toolchain/gcc/gcc-4.9/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
android
memtemp24
.C
toolchain/gcc/gcc-4.9/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
android
instantiate12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/instantiate12.C
1,421
utf_8
66f7eda343a08a3bd202b6bfcb2295a1
// { dg-do run } // Bug 635. We failed to emit initializer code for out-of-class defined // static const members of template instantiations. static int inited = 0; static bool setFlag() { inited++; return true; } template<typename T> struct X { static const bool cflag; static bool flag; static const bool ifl...
google
android
typename21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typename21.C
345
utf_8
dfb67d61dc724f688029b5c625517ab9
// { dg-do assemble } // { dg-options "" } template <class T> struct S1 { typedef T X; }; template <class T> struct B { typedef T I; }; template <class T> struct S2 : public B<T> { struct I {}; typedef typename S1<I>::X IX; void f(IX); }; template <class T> void S2<T>::f(IX) {}
google
android
ttp3
.C
toolchain/gcc/gcc-4.9/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
android
t30
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t30.C
266
utf_8
3f51fbcaf5cbddd472248c2d51e91a5a
// { dg-do assemble { target { ! c++11 } } } template <class X, int n> X f (auto X (*x)[n]) { return (*x)[n/2]; } extern int i[30], i2[33]; extern double d[99]; int foo (int ii) { return f (&i) + f(&i2); } // causes abort double foo (double dd) { return f (&d); }
google
android
explicit10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit10.C
163
utf_8
ef7f4bd0cfe753d04ab64fcd4f60d8c6
// { dg-do assemble } // { dg-options "-ansi -pedantic-errors -w" } // GROUPS passed templates template <class T> void foo(T t); int main() { foo<int>(3.0); }
google
android
ttp41
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp41.C
281
utf_8
3cdf8833c7201ef7de13a2d83944c091
// { dg-do compile } // { dg-options "" } template<template<class> class D,class E> class C { public: int g() { return 1; } }; template<class T> class D { public: int f(); }; template<class T> int D<T>::f() { C<D,D> c; return c.g(); } int main() { D<char> d; d.f(); }
google
android
deduct2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/deduct2.C
425
utf_8
ca69a68946097c21181986529a0442c2
// { dg-do assemble } // // bug 79 & 59. We failed to tsubst non-type template parms which used // (previously deduced) type parms. struct C {}; template< class T, T *G > struct S {}; template< class T, T *G > void boz ( S<T,G> s1); C c1Gen; void foo () { S< C, &c1Gen > s1; boz (s1); }
google
android
lookup2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/lookup2.C
269
utf_8
01792d5ba05f8e61b80b5518e6b1cc09
// { dg-do assemble } // { dg-options "-fpermissive" } class A { protected: void f1() {}; }; template <class T> class B : private A { protected: using A::f1; }; template <class T> class D : private B<T> { public: void f2() { f1(); }; // { dg-warning "" } };
google
android
unify4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/unify4.C
283
utf_8
4f935e6d535e84f97548827b3596ccb4
// { dg-do assemble } template <class T> void f (T); // { dg-message "note" } void g (); void g (int); int main () { f (g); // { dg-error "" } ambiguous unification // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 10 } return 0; }
google
android
spec3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec3.C
375
utf_8
e2acae1babefa4ee3bb8f9db59ab76e3
// { dg-do run } extern "C" void abort(); class X { public: virtual int f() const = 0; }; template <class T> class Y: public X { public: virtual int f() const; }; template <class T> int Y<T>::f() const { abort(); return 0; } template <> int Y<bool>::f() const; template <> int Y<bool>::f() const { ...
google
android
sizeof2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/sizeof2.C
520
utf_8
c42a41548aa56c8333e7d2c7000231f1
// { dg-do run } // Although template class B is not used at all, it causes the // incorrect specialization of A to be selected extern "C" void abort(); template<int N, class T> // Base class class A { public: static int n() { return sizeof(T); } }; template<int N> // Derived #1 class B: public A<N,char[N]> {}; templa...
google
android
memclass13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memclass13.C
173
utf_8
3372708d0f49623ec94ca5651cf5b073
// { dg-do assemble } template <class X, class Y> struct Inner; template <class T> struct S { template <class U> struct Inner { }; }; S<double>::Inner<int> si;
google
android
typedef2
.C
toolchain/gcc/gcc-4.9/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
android
memclass7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memclass7.C
273
utf_8
4de67264651c0cd591ec8d92687a7fb0
// { dg-do run } // { dg-options "-ansi -pedantic-errors -w" } struct S { template <class U> struct Y { template <class T> void foo(T t); }; }; template <> template <> void S::Y<char>::foo<int>(int i) { } int main() { S::Y<char> s; s.foo<int>(3.0); }
google
android
overload15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/overload15.C
439
utf_8
b120569cbaba674fa6fa0e1461c92fc8
// { dg-do assemble } // Test resolution of templatized overloaded constructors. // The more specialized constructor, i.e., A (const B<Dim1,Dim2> &b) // should be chosen per \S 14.5.5.2/2 [temp.func.order/2]. template <int Dim1, int Dim2> struct B { int f; }; struct A { template <int Dim1, int Dim2> A (const B...
google
android
friend9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend9.C
184
utf_8
54620ae07f8d0c64d61abbe14d28c5d4
// { dg-do run } template <class U> class C { template <class T> friend void f(T); int i; }; template <class T> void f(T) { C<int> c; c.i = 3; } int main() { f(7); }
google
android
array6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/array6.C
284
utf_8
9deafe0c23dcd9d4742de631c72fa4d3
// { dg-do assemble } // { dg-options "" } template<typename _CharT> struct basic_filebuf { virtual void underflow() { int __size = 5; char __conv_buf[__size]; } }; template class basic_filebuf<char>;
google
android
partial3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/partial3.C
305
utf_8
a51913000fc79ce5fce525d2592b04ca
// { dg-do run } // Test that partial ordering works between conversion ops from different // classes. struct A { template <class T> operator T*() { return 0; } }; struct B : public A { template <class T> operator T(); }; int main() { B b; (void*) b; }
google
android
t12a
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t12a.C
98
utf_8
9ef5be0611dbb2e8f35161b175a47fc4
// { dg-do assemble } int a (void * x) { return 1; } typedef void *T; int b (T x) { return 2; }
google
android
ref2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ref2.C
166
utf_8
9496be7cce9dca2d16421479e66c783d
// { dg-do assemble } template <class T, T&> class C; template <int& I> class C<int, I> {}; int i; C<int, i> c;
google
android
expr2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/expr2.C
295
utf_8
a556ffb919fc257fcb4ab79111bfcd1d
// { dg-do assemble } template <int I> struct S {}; template <int J> void foo(S<J + 2>); // { dg-message "note" } void bar() { foo(S<3>()); // { dg-error "" } no way to deduce J from this. // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 11 } }
google
android
crash17
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash17.C
122
utf_8
1811071a193b352d2fe96d8aaad51eac
// { dg-do assemble } template <int B> class foo; template <class U> class bar { typedef foo<(U::id > 0)> foobar; };
google
android
ttp65
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp65.C
615
utf_8
4f7d940afd2ce812774283089291f6d6
// { dg-do assemble } // Bug: We used reject template unification of two bound template template // parameters. template <class T, class U=int> class C { }; template <class T, class U> void f(C<T,U> c) { } template <class T> void f(C<T> c) { } template <template<class,class=int> class C, class T, class U> void g(C<T,U...
google
android
memtemp81
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp81.C
267
utf_8
9f295b7bbe5eeccadc572942fe8b113b
// { dg-do assemble } template <int i> class a { public : int k; template <int j> int f() const { return this->f<j-1>(); } int g() const { return f<i>(); } }; template <> template <> int a<2>::f<0>() const { return 0; } int main() { a<2> x; return x.g(); }
google
android
memtemp59
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp59.C
424
utf_8
aad5f3bdb50f6977327b5b218d32526b
// { dg-do assemble } // GROUPS passed templates membertemplates template <int N> struct IndexPlaceholder {}; template <int N1, int N2, int N3> struct ArrayIndexMapping {}; template <class T_numtype, int N_rank> struct Array { template<int N0, int N1> ArrayIndexMapping<N_rank, N0, N1> f(IndexPlaceholder<N0>, ...
google
android
t14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t14.C
259
utf_8
b59e3f5f7ff0b0c2278313d6bf906fc3
// { dg-do assemble } class OBJECT { int a; }; template <class T> class TESTA { public: TESTA(); T foo(int i) {T t = 0; return t}; // { dg-error "" } no semi }; void foo() { TESTA<OBJECT *> *foo; foo = new TESTA<OBJECT *>; }
google
android
ptrmem2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ptrmem2.C
494
utf_8
42b546af24cd6a9e6b0bf9288a0c9adb
// { dg-do run } struct S; template <S* (S::*p)()> struct F { S* f (S& s) { return (s.*p)(); } }; template <int S::*p> struct D { void d (S& s) { (s.*p) = 3; } }; struct S { S* g (); int i; F<&S::g> fg; D<&S::i> di; S* h(), k(F<&S::h>); F<&S::g> fg2; D<&S::i> di2; }; S...
google
android
ttp54
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp54.C
328
utf_8
5d047fa0fb43bd8a4a3df486c8742dd9
// { dg-do assemble } // [temp.deduct.type] // Make sure we treat <T> in the construct TT<T> as any type containing T. template <class T> class C { }; template <class T, template <class> class TT> void f (TT<T *> &t) { } int main () { C<char *> c; }
google
android
crash2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash2.C
127
utf_8
188863c21f7ace70d58d22b340b5478e
// { dg-do assemble } template <class T> struct S1 { T* t; static int foo; }; struct S2 : public S1<S2> { S2* s; };
google
android
t07
.C
toolchain/gcc/gcc-4.9/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
android
explicit21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit21.C
231
utf_8
7437ee8e90b9247271b62efd4da1ab65
// { dg-do assemble } // GROUPS passed templates template <class T> T foo(T* t); template <> int foo<char>(char c); // { dg-error "" } does not match declaration. template <> int bar<char>(); // { dg-error "" } no template bar.
google
android
memtemp28
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp28.C
280
utf_8
435c6c6661db967edab09bec8456f1e8
// { dg-do run } extern "C" void abort(); int k; template <class X> struct S { template <class U> void f(U u) { ++k; g(u); } template <class U> void g(U u) { ++k; } int c[16]; }; int main() { S<char*> s; s.f(3); s.f("adf"); if (k != 4) abort(); }
google
android
overload13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/overload13.C
214
utf_8
beb45c829eba7caee32113489bd66046
// { dg-do assemble } struct A { template <class T> int f (T) { return 0; } int f (int) { return 1; } }; int main () { A a; return a.template f (0); // { dg-error "template" "" { target { ! c++11 } } } }
google
android
explicit64
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit64.C
262
utf_8
8bfb6a2e09db64150dece30a8e9d8138
// { dg-do run } extern "C" void abort (); template <class T> void f () { abort (); } template <> void f<char> () { } template <class T> class C { friend void f<char> (); public: void ff () { f<char> (); } }; int main () { C<int> c; c.ff(); }
google
android
explicit17
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit17.C
418
utf_8
4cbe60932d0e94a06976d96ebe6152cc
// { dg-do assemble } // { dg-options "-ansi -pedantic-errors -w" } // GROUPS passed templates template <class T, class U> void foo(U u, T t); template <class T> void foo(T t); template <class T> struct S {}; template <class T> void foo(const S<T>&); void bar() { void (*fn)(double, int) = (void (*)(double, ...
google
android
memtemp63
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp63.C
188
utf_8
4703ed2bafd93bd240f15e50f461e2f2
// { dg-do run } template <class T> struct A { template <class U> void f (U u); }; A<int> a; template <class T> template <class U> void A<T>::f (U u) { } int main() { a.f (24); }
google
android
memclass10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memclass10.C
186
utf_8
56b1bdd1db0bf5887d8d8c29324977e5
// { dg-do assemble } struct S1 { template <class T> struct S2 {}; // { dg-error "" } previous definition template <class T> struct S2 {}; // { dg-error "" } redefinition };
google
android
parms3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/parms3.C
184
utf_8
6f8ecc7e23bd84e90b15a55b95660d7a
// { dg-do assemble } // Test that we can represent static_casts in template arg lists. template <int I> struct A { }; template <class T> struct B { A<static_cast<T>(3.14)> a; };
google
android
defarg3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/defarg3.C
148
utf_8
adb534905ca3eef8ea15cc52273f4636
// { dg-do assemble } template <class T> struct S; template <class T = int> struct S {}; template <class T> struct S; void f() { S<> s; }
google
android
crash14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash14.C
136
utf_8
8362f30058de81564a32b4120b51b1d4
// { dg-do assemble } template <class T> struct A {}; template <class T> struct A<T*>; A<int*> ai; // { dg-error "" } incomplete type
google
android
memtemp76
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp76.C
173
utf_8
ee2a00cd5bfa8956405211c4f6261960
// { dg-do assemble } class base { public: virtual void method()=0; }; class der: public base { public: template<class C> void method() { C foo; } };
google
android
unify7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/unify7.C
435
utf_8
cb46cc17a18f69d164593218a5d630a0
// { dg-do assemble } // template functions can be distinguished by return type alone. The return // type may also be a template parameter. template <typename C> C foo (); // { dg-bogus "" } void g () { int (*pfn1) () = &foo; // { dg-bogus "" } void (*pfn2) () = &foo; // { dg-bogus "" } }
google
android
instantiate4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
528
utf_8
e28db19ea86e39497310ad6bb9c55fc6
// { dg-do link } // { dg-options "-frepo -Werror" } // { dg-require-host-local "" } // { dg-skip-if "dkms are not final links" { vxworks_kernel } } // the vtable of Foo<int> wouldn't be generated template <typename A> struct Foo { virtual void foo() {} }; template <typename A> struct Bar { void bar(); }; temp...
google
android
operator1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/operator1.C
320
utf_8
f1256260eab2b60b9e6f1cb00dd7cc6c
// { dg-do assemble } struct Example { template <class U> void operator= (U); }; template <> void Example::operator=<double> (double);
google
android
crash5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash5.C
161
utf_8
e68988007739c2e9ddee5744984d1a58
// { dg-do assemble } template <class T, int i> struct K { void f(); }; template <class T> void K<T, i>::f() // { dg-error "" } i has not been declared { }
google
android
memtemp23
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp23.C
375
utf_8
25f1c2d93a682c7ccdedc03abc5854c1
// { 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
android
friend46
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend46.C
614
utf_8
81e33521c902dd01bd10a901800a8b1c
// { dg-do assemble } // bug 43. Two failings, bison parser ickiness caused us to find the member // named the same as a friend, and then when instantiating, we'd lookup in // the wrong scope. namespace X { template <class T> class P; template <class T> void operator- (const P<T>&); template <class T> st...
google
android
friend1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend1.C
191
utf_8
06f103101341810a7b72f8ec0de0c29c
// { dg-do run } template <class T> void f(T); class C { template <class T> friend void f(T); int i; }; template <class T> void f(T) { C c; c.i = 3; } int main() { f(7); }
google
android
friend20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend20.C
138
utf_8
291eeae46367198762ea84f48881a4a8
// { dg-do assemble } template <class T = int> struct A; template <class T> struct B { friend class A<T>; }; template class B<int>;
google
android
crash49
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash49.C
653
utf_8
e3287bda1a9a60c1052e85ec61c1a31e
// { dg-do assemble } template <class T> class REFptr { public: virtual ~REFptr(); REFptr<T> &operator = (const REFptr<T>& p); }; class STR { }; class str_ptr : public REFptr<STR> { }; template <class T> class ARRAY { protected: T *_array; int _num; int _max; public: vi...
google
android
spec24
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec24.C
146
utf_8
c641e36402b485a24d11862e3fabfc28
// { dg-do assemble } template <class T> class A; // template <> class A<int>; // { dg-error "" "" { xfail *-*-* } } missing template header -
google
android
crash11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash11.C
154
utf_8
5abad4783367058ab516ca82870dc4f1
// { dg-do assemble } class A { class A_impl; public: A(){} }; template <class j> class A::A_impl // { dg-error "non-template" } { };
google
android
memtemp5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp5.C
299
utf_8
cc10988f7b82b80020afb2cbc2be6736
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); struct S { template <class T> void operator+(T); }; template <class T> void S::operator+(T) { printf("Hello, world.\n"); } int main() { S s; s + 3; s + s; s.operator+("Hi"); }
google
android
spec29
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec29.C
313
utf_8
8ee1d6648f3481623123d00a6c0c4137
// { dg-do run } char c; struct S { template <typename T> operator T*(); template <typename T> operator T(); }; template <> S::operator int() { return 2; } template <> S::operator char*() { return &c; } int main() { S s; int i = s; char* cp = s; if (i != 2 || cp != &c) return 1; }
google
android
typedef3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typedef3.C
231
utf_8
228fb8c248bec1bea4d3213d3004fbec
// { dg-do assemble } template <class T> void f(T, T) { } struct A { typedef enum { VAL1 } result_t; }; struct B { typedef enum { VAL2 } result_t; }; void g() { f(A::VAL1, A::VAL1); f(B::VAL2, B::VAL2); }
google
android
conv2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/conv2.C
223
utf_8
9275b4addba7abf9dad17529be1ea6d3
// { dg-do assemble } template<class T> class A { public: operator const T*() const; const T* cast() const; }; template<class T> const T* A<T>::cast() const { return operator const T*(); } template class A<char>;
google
android
crash42
.C
toolchain/gcc/gcc-4.9/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
android
memtemp86
.C
toolchain/gcc/gcc-4.9/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
android
koenig1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/koenig1.C
474
utf_8
831bc4ecb83fadd3ac106884254b0bd1
// { dg-do assemble } // // bug 123. We ICEd when koenig lookup found a COMPONENT_REF inside a // TEMPLATE_ID_EXPR. void foo(void (*f)()); struct A { template <int s> static void g(); template <int s> void f(); // { dg-message "" } candiate static void f_plus () { foo (f<0>); // { dg-error "" } no mat...
google
android
memtemp53
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp53.C
462
utf_8
31f5811bfdcc1b0d77eea99c0fdd2d0a
// { dg-do link } // GROUPS passed templates membertemplates template<int N> struct I { }; template<class T> struct A { int r; template<class T1, class T2> void operator()(T1, T2) { r = 0; } template<int N1, int N2> void operator()(I<N1>, I<N2>) { r = 1; } }; int main() { A<float> x; I<0> a;...
google
android
spec16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec16.C
257
utf_8
64311d9b9b0edd106090cad4ab1185f1
// { dg-do assemble } template<class K> struct A { int foo(const K&); int bar(const K&); }; template<class K> int A<K>::bar(const K& k) { return(foo(k)); } template<> int A<const char*>::foo(const char*const& k) { return((__SIZE_TYPE__)k); }
google
android
expr5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/expr5.C
166
utf_8
33bb4f80f7a5c24d5679b2923c5670d5
// { dg-do assemble } template <class T, int i> struct S1; template <class T, int i, int j> struct S2 { typedef typename S1<T, (i >= j ? 0 : 1) >::type type; };
google
android
explicit74
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit74.C
409
utf_8
695894147e35bacef9739ba9e6da11f6
// { dg-do run } // egcs 1.1 seems to generate code that deletes a NULL pointer. template <class bar> struct foo { void fuz(); ~foo(); }; struct baz { int i; foo<baz> j; } *p = 0; template <class bar> void foo<bar>::fuz() { delete p; } template <class bar> foo<bar>::~foo() { delete p; } template class foo<baz>; int ma...
google
android
spec36
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec36.C
1,319
utf_8
26f197ce8b46e51c044d5b32830ec0ff
// { dg-do run } // Bug 1617. We didn't resolve partial ordering properly. The std is rather // vague about it anyway, DR 214 talks about this. extern "C" int puts (char const *); template <typename T> int Foo (T *) {puts (__PRETTY_FUNCTION__); return 1;} template <typename T> int Foo (T &) {puts (__PRETTY_FUNCTION__)...
google
android
t26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t26.C
180
utf_8
2c1853754e948bba7e6a12e55a3f9632
// { dg-do assemble } template <class X> int f (X x, unsigned int j = 3) { return 29; } template <class X> int f (X x, X y) { return 23; } int foo () { return f (7.0, 9.0); }
google
android
crash63
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash63.C
326
utf_8
7d86f366dec7adde6f297f1ba3ad2238
// { dg-do assemble } // Bug 1585. We ICEd on a template template parm with no parms. template<template<class> class C> class B; template<template<> class C> class D; // { dg-error "" } parse error
google
android
ptrmem8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ptrmem8.C
208
utf_8
e52e6177e655a4986751dbd9747d4dc7
// { dg-do assemble } template <class T> struct S { void f (const T&); void f (T&); }; class C { }; typedef int (C::*cp)(); template struct S<cp>;
google
android
spec25
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec25.C
163
utf_8
791cb8011101118669713cbe197ead57
// { dg-do assemble } template <class T, int I> struct S { }; template <int I> struct S <double, I> { }; template <class T> void f () { S<double, T::x> s; }
google
android
mangle2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/mangle2.C
772
utf_8
783914ae2b155c7e758a36fe70c320a4
// { dg-do assemble } // // Bug 2559. We hadn't implemented code to mangle numbers bigger than // HOST_WIDE_INT. template<class T, T min_val, T max_val> class integer_traits_base { public: static const bool is_integral = true; }; template<class T> class integer_traits { public: static const bool is_integral = false; ...
google
android
call1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/call1.C
281
utf_8
f2d3dfbbab290614f2f519d07999a477
// { dg-do assemble } struct IsCompressed { }; struct Field { bool IsCompressed() const { return true; } }; template<class C> inline bool for_each(const Field& p, IsCompressed, C) { return p.IsCompressed(); } template bool for_each<int>(const Field& p, IsCompressed, int);
google
android
ttp21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp21.C
386
utf_8
92ffa78e27566e1323a2f50e9a788fcb
// { 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(); } class E : C<D,int> { public:...
google
android
explicit30
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit30.C
187
utf_8
1e407c297205faae887b343991298a46
// { dg-do assemble } // GROUPS passed templates template <class T> void foo(T, T*); void bar() { double d; (*((void (*)(int, double*)) (void (*)(int, int*)) &foo<int>))(3, &d); }
google
android
spec35
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec35.C
1,516
utf_8
254cdc2dd1cc8cdf952e7c9a0bcddb84
// { dg-do assemble } // // Bug 1617. We didn't resolve partial ordering properly. The std is rather // vague about it anyway, DR 214 talks about this. extern "C" int puts (char const *); template <typename T> int Foo (T); // { dg-message "note" } template <typename T> int Foo (T &); // { dg-message "note" } can...
google
android
memtemp43
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp43.C
246
utf_8
e47e80330529cb7afe4ed055b4576ee5
// { dg-do link } // GROUPS passed templates membertemplates template<class T, int N> class A { public: template<class U> void operator=(A<U, N> const & a) { return; } }; int main() { A<float, 3> a; A<double, 3> b; a = b; }
google
android
inline2
.C
toolchain/gcc/gcc-4.9/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
android
friend24
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend24.C
172
utf_8
c12484746b3b3d5f2233a8cb42f6464a
// { dg-do assemble } template <class T> struct S { template <class U = T> friend class S; void f(T); }; template struct S<int>; void g() { S<> s; s.f(3); }
google
android
memtemp48
.C
toolchain/gcc/gcc-4.9/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
android
overload12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/overload12.C
301
utf_8
85002418b0a0d9b73ede0fb73079e630
// { dg-do run } // Testcase for not trying a candidate that would generate an ill-formed // instantiation. template <int N> struct A { int ar[N]; }; template <int N> struct B { B () { } B (const A<N> &) { } B (const A<N-1> &, int); }; int main () { A<1> a; B<1> b1; B<1> b2 (a); }
google
android
memtemp9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp9.C
290
utf_8
ca7227714ddc7523bdb374afe260b78f
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); struct S { template <class T> operator T(); }; template <class T> S::operator T() { printf("Hello, world.\n"); return T(); } int main() { S s; int i = s.operator int(); }
google
android
crash16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash16.C
668
utf_8
4dfee212c337a24dc64b844b1d77da82
// { dg-do assemble } // { dg-xfail-if "" { xstormy16-*-* } { "*" } { "" } } // { dg-options "" } extern "C" void qsort(void *base, __SIZE_TYPE__ nmemb, __SIZE_TYPE__ size, int (*compar)(const void *, const void *)); struct R { int count; int state1; int state2; }; int cmp_d(const R* a, const R* ...
google
android
memtemp49
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp49.C
192
utf_8
d1d9a8d5e40b5fb0441e4c88a9a58bc6
// { dg-do assemble } // GROUPS passed templates membertemplates template <class X> struct S { template <class T> void f(T t1, T t = T()) {} }; void foo() { S<int> si; si.f(3); }
google
android
typename2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typename2.C
292
utf_8
2bf4b2118909bb04f7b587915266c6c4
// { dg-do assemble } class Base { public: class Bar { public: virtual ~Bar() {} }; }; class Derived : public Base { public: class Bar : public Base::Bar {}; }; template <class T> struct XYZ : public T::Bar { XYZ(): T::Bar() { } }; void test() { XYZ<Base> b; XYZ<Derived> d; }
google
android
t08
.C
toolchain/gcc/gcc-4.9/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
android
repo4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/repo4.C
288
utf_8
77de8441a356c3a922649e61860dd9d3
// { dg-do link } // { dg-options "-frepo" } // { dg-require-host-local "" } // { dg-skip-if "dkms are not final links" { vxworks_kernel } } template <class T> struct S { ~S (); }; template <class T> S<T>::~S () {} int main () { S<int> s; } // { dg-final { cleanup-repo-files } }