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
spec5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec5.C
540
utf_8
55739ef433ca4b858eefdf9834471755
// { dg-do assemble } template <class T> void f(T t1, T t2); // { dg-message "note" } template <> void f(int i, int j); template <class T> void g(T t1, T t2) {} // { dg-message "note" } template void g(int i, int j); void h() { f(3, 'c'); // { dg-error "" } no matching function // { dg-message "(candidate|d...
google
android
typename26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typename26.C
489
utf_8
db1631478430e161613055ed79847014
// { dg-do assemble } // // We failed to spot where a typename T::t didn't actually declare // anything. [7.1.5.3]/1 template<class LB> struct C { typename LB::DataType; // { dg-error "" } does not declare anything typename LB::DataType m; }; struct B {}; struct A { B; // { dg-erro...
google
android
ttp55
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp55.C
460
utf_8
960d60e90f42a0eb908c58d544fbd322
// { dg-do assemble } // Testing overloading of function argument involving template template // parameters template<class A> class H{}; template <class T> void f( const T& ){} // #1 template< template<class, class> class X, class A, class B> void f( const X<A,B> & x ) // #2 {} in...
google
android
memtemp33
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp33.C
230
utf_8
3e3817c31eb5cbe035ca1d5ddb762f73
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); template <class T> struct S { template <class U> void g(U u) { i; } int i; }; int main() { S<char> s; s.g(3); }
google
android
label1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/label1.C
216
utf_8
6803b17fa32f4f77f08d5a8e67084bf5
// { dg-do assemble } template <class T> struct S {}; template <class T> inline void g(T t) { here: S<T> st; goto here; } template <class T> void f(T t) { here: g(t); goto here; } void h() { f(3); }
google
android
debug1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/debug1.C
255
utf_8
ad2cc6cd72ed2f9aa4e2d8675680e0f2
// { dg-do assemble } // { dg-options "-g" } template<template<class> class _Oper, template<class, class> class _Meta1, template<class, class> class _Meta2, class _Dom1, class _Dom2> class _BinClos;
google
android
crash21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash21.C
377
utf_8
68803e05712c2baacd757fb9aa114da5
// { dg-do assemble } // { dg-options "" } class Pooled { }; class RefCounted { }; class BrickExpressionBase : public RefCounted, public Pooled { }; template<unsigned Dim, class LHS, class RHS, class OP> class BrickExpression : public BrickExpressionBase { }; template <unsigned Dim, class T> void f() { typedef ...
google
android
memtemp79
.C
toolchain/gcc/gcc-4.9/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
android
explicit37
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit37.C
279
utf_8
54e834b01eba47e0229c4fe0fc098994
// { dg-do link } // GROUPS passed templates class ostream {}; template <class T> class S; template <class T> void operator<<(ostream&, S<T>) {} template <class T> class S { friend void operator<<<>(ostream&, const S<T>); }; int main() { ostream o; o << S<int>(); }
google
android
deduct6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/deduct6.C
466
utf_8
162fbede0debf0447f169eae092debca
// { dg-do assemble } // Bug 1962. We were not dealing with qualified array types properly. #include <stdio.h> template <typename T, unsigned I> int Baz (T (&obj)[I]) { printf ("%s\n", __PRETTY_FUNCTION__); return 1; } int main () { static int const ca[1] = {1}; static int a[1] = {1}; Baz (ca); Baz (a);...
google
android
defarg12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/defarg12.C
163
utf_8
916263ca55139f5dfeb25afe206b20f1
// { dg-do assemble } template <class T = int> struct S { void f () { struct U { }; } };
google
android
explicit70
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit70.C
1,117
utf_8
df89f31954abaa2bcd836c323c80421a
// { dg-do assemble } template <class T> void f(T) {} template <class T> struct S { static T t; }; template <class T> T S<T>::t; template void f(int); template void f(int); // { dg-error "duplicate explicit instantiation" } template int S<int>::t; template int S<int>::t; // { dg-error "duplicate explicit instan...
google
android
explicit79
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit79.C
118
utf_8
0a01afb5703d9cccdd8b1ca091e20bb6
// { dg-do assemble } template <int I> void f(int (*)[I] = 0); template <int J> void f(); void g() { f<-1>(); }
google
android
overload1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/overload1.C
283
utf_8
6edbc1c34baa440f9fe7ac5a9c57d073
// { dg-do run } template <class T> struct B { }; template <class T> struct A { template <class U, class V> int operator () (U u, V v); template <class U, class V> void operator () (B<U> u, B<V> v) { } }; int main () { A<int> a; B<char> b1; B<short> b2; a (b1, b2); }
google
android
ttp34
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp34.C
363
utf_8
8dc60b7b5d5ad7afa8de972e489b2967
// { 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(); } template class C<D,...
google
android
crash3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash3.C
237
utf_8
73f1c630433f0de92c38f58a030c691d
// { dg-do assemble } template <class Type> class CVector { public: CVector<int> f() const { CVector<int> v(); return v; } CVector<long> g() const { CVector<long> v(); return v; } };
google
android
instantiate13
.C
toolchain/gcc/gcc-4.9/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
android
memtemp93
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp93.C
340
utf_8
f35cb75300dd054bed326f0c936c8d1b
// { dg-do link } template <int n> struct A { template <class T> A (T t); template <class T> int f(T t) const; }; template <> template<class T> int A<1>::f(T t) const {return 1;} template <> template<class T> A<1>::A (T t) {} int main() { A<1> a (3); a.f(1); return 0; }
google
android
enum4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/enum4.C
151
utf_8
5b19e434a6998b0c505946afafea7527
// { dg-do assemble } template <class T> struct U { T mT; }; template <class H> struct M { enum FLAG {On, Off}; U<FLAG> mUF; }; M<char> gm;
google
android
memtemp19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp19.C
320
utf_8
493b4d1e7f3c7ba9dadc35d078a0284a
// { 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(); } template S::operator int(); int main() { S s; int i = s.operator int(); }
google
android
explicit25
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit25.C
175
utf_8
6ca295110a7bfb90129d0058fdb6a886
// { dg-do assemble } // GROUPS passed templates template <int I> class S {}; template <int I, class T> void foo(T t, S<I>); void bar() { S<3> s3; foo<3>("abc", s3); }
google
android
ttp16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp16.C
343
utf_8
dc2f5a3a4f430f79cf1552940261f2d9
// { dg-do run } template<class T> class D { T a; 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() { ...
google
android
friend34
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend34.C
365
utf_8
7fd566f65442c4f27f4580049b3f9b54
// { dg-do assemble } // This testcase won't fail if class ::foo is forward-declared in the // global namespace, nor if class bar is not a template class. template <typename T = void> class bar { public: friend class foo; // this is not bar::foo, it forward-declares ::foo class foo {}; bar() { foo(); } // but ...
google
android
memtemp67
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp67.C
281
utf_8
0a74c4c76b6fcd8398559155d15ee562
// { dg-do run } template <class T> struct A { template <class T2> operator A<T2>() const { return A<T2>(); } }; int main() { A<int> a1; A<long> a2; A<double> a3; A<char> a4; a2 = a1.operator A<long>(); a3 = (A<double>) a1; a4 = a1; }
google
android
explicit51
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit51.C
271
utf_8
2c8ce97ca222558286e1f2b5c915ba03
// { dg-do run } extern "C" void abort (); template <int a> int fact () { return 0; } template <> int fact<1> () { return 1; } int main() { if (fact<3> () != 0 || fact<1> () != 1 || fact<3> () != 0 || fact<1> () != 1 || fact<1+0> () != 1) abort (); }
google
android
repo3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/repo3.C
573
utf_8
a0d605887e4cfa4fc11cb4fdcee31f9b
// { dg-do link } // { dg-options "-frepo" } // { dg-require-host-local "" } // { dg-skip-if "dkms are not final links" { vxworks_kernel } } // Test that we properly generate the vtable and such for C. // Build then link: struct A { virtual ~A () {} }; template <typename T> struct B : virtual public A { virtual voi...
google
android
spec9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec9.C
251
utf_8
a8e3f81a6b6d012a1195ec088520808e
// { dg-do assemble } extern "C" void abort(); template <class T> inline int f(T t) { return 0; } int main() { if (!f(3)) abort(); } template <> int f(int i) // { dg-error "specialization\[^\n\]*after instantiation" } { return 1; }
google
android
crash13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash13.C
259
utf_8
fcadc5744a7361e664ae053c8da7d49f
// { dg-do assemble } template <class T> struct A {}; template <class T> struct A<T>; // { dg-error "" } does not specialize args template <class T> const struct A; // { dg-error "" } parse error template <class T> template A<int>; // { dg-error "" } .*
google
android
enum9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/enum9.C
217
utf_8
ee9b7f755fa40a8a83f089ffffd2ac7b
// { dg-do assemble } template <typename _CharT> class _Format_cache { public: enum { _S_digits, _S_digits_end = _S_digits+10, _S_xdigits = _S_digits_end }; }; template class _Format_cache<int>;
google
android
memtemp74
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp74.C
337
utf_8
97549afab832b77fda5672aa7d7c815a
// { dg-do assemble } template <class T> class S { protected: template <class U> void f(U); // { dg-error "" } is protected private: template <class U> void g(U); // { dg-error "" } is private }; void f() { S<double> s; s.f(3); // { dg-error "" } within this context s.g(2.0); // { dg-error "" } withi...
google
android
t29
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t29.C
250
utf_8
9b506c3b40aff92d1d6e6fbd03ad8084
// { 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]; extern double d[99]; int foo (int ii) { return f (&i); } // causes abort double foo (double dd) { return f (&d); }
google
android
typename20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typename20.C
253
utf_8
b0164f6d3cdac676564180c326f3b9df
// { dg-do assemble } // { dg-options "" } template <class T> struct B { typedef int I; }; template <class T, class X = int> struct S : public B <T> { struct I { }; void f(int i = true) {} };
google
android
memtemp92
.C
toolchain/gcc/gcc-4.9/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
android
ehspec1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ehspec1.C
176
utf_8
212704e4697b00282618e37be0a789ac
// { dg-do assemble } // Bug: g++ forgets to instantiate A<int> template <class T> struct A { }; void f () throw (A<int>);
google
android
memclass18
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memclass18.C
166
utf_8
4f8da01902d9e16c6bb00329dab07164
// { dg-do assemble } template <class T> struct A { template <class U> struct B; }; template <class T> template <class U> struct A<T>::B { }; A<int>::B<int> b;
google
android
expr7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/expr7.C
134
utf_8
eae71438b36cca63e4ee07118b036001
// { dg-do assemble } template<int I> struct A { }; template<int I, int J> int f(A<I+J>); int g() { A<3> a; return f<1,2>(a); }
google
android
explicit6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit6.C
207
utf_8
6cd92bef67a152661ec9cc6c52e1a5d3
// { dg-do link } // { dg-options "-ansi -pedantic-errors -w" } // GROUPS passed templates template <class T> int foo(T t); template <> int foo(int i) { return 0; } int main() { return foo<int>(3.0); }
google
android
friend35
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend35.C
146
utf_8
8128d5f99ff0424b79698d2a412658bd
// { dg-do assemble } class foo { friend void bar<int>(int); // { dg-error "" } must be declared first }; template <typename T> void bar(T);
google
android
crash6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash6.C
355
utf_8
4d6eefa32368637a08b03b35fc374f73
// { dg-do assemble } template <class T> class List; template <class T> struct ListIterator { ListIterator (); ListIterator (const ListIterator<T>& rhs); }; template <class T> struct List { void length () const { for (ListIterator<T> li; li; ); // { dg-error "" } used where a `bool' } }; void test(Lis...
google
android
t11a
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t11a.C
106
utf_8
47ca705cccef9227752773d7328ffd2b
// { dg-do assemble } template <class A> class B { public: A a; B() { a = 2; } }; static B<int> bi;
google
android
t06
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t06.C
355
utf_8
35e4a5f53fc28256636ed59b15b28e0b
// { dg-do assemble } typedef int I; int i; template <class A> class B { A a; public: B(A&aa); B(); ~B(); }; template <class B> class C { public: B b; }; template <class I, class i> class D : I { public: i ii; }; typedef B<int> b_int; typedef C<int> c_int; typedef C<b_int> c_b_int2; c_b_int2 x2; ...
google
android
t32
.C
toolchain/gcc/gcc-4.9/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
android
ttp42
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp42.C
226
utf_8
17c2c9c9db2600b7847866cd4285af11
// { dg-do run } template <class T, template <class T> class C> struct X {}; template <class T> struct Y {}; template <class T> struct Z {}; template <class T> struct X<T,Y> {}; int main() { X<int,Y> a; X<int,Z> b; }
google
android
recursion
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/recursion.C
494
utf_8
d32874636fe85b59968597a9e03e060b
// { dg-do assemble } const double M_PI=3.14159265358979323846; template<int N,int I,int J,int K> inline double SineSeries() { const double x=I*2*M_PI/N; const bool go=K+1!=J; return 1.0-x*x/(2*K+2)/(2*K+3)*SineSeries<N*go,I*go,J*go,(K+1)*go>(); } template<> inline double SineSeries<0,0,0,0>() { return 1.0;...
google
android
nttp2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/nttp2.C
446
utf_8
94f0fcc44ea927fff0f0b4a7ea3ee67c
// { dg-do run } // Test for nested template template parameter feature template <template<template <class> class> class TTT> struct C { int f() { return 0; } }; template <template <class> class TT> struct D { int a; }; template <template <class> class TT> struct E { int a; int b; }; template <template <template <...
google
android
memtemp73
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp73.C
245
utf_8
096249ca2aedb9920fbcf11775a2edb7
// { dg-do run } template <class T> struct A { template <class U> void f(U); }; template <int i> struct B { }; template <class T> template <class U> void A<T>::f (U) { enum { foo }; B<foo> b; } int main () { A<char> a; a.f (42); }
google
android
explicit58
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit58.C
509
utf_8
095090d773534f21e887a80cc92b8721
// { dg-do run } extern "C" void abort (); template <class T> void f (); template <class T> void g () { abort (); } template <> void g<char> () { abort (); } template <class T> class C { public: template <class U> void f () {} template <class U> void g () {} void ff () { f<T> (); } void gg () ...
google
android
ttp4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp4.C
184
utf_8
abf587e48be196dfc52c8e436cd098c2
// { dg-do assemble } template<class E> class D { }; template<template<class> class D,class E> class C { D<1> d; // { dg-error "" } arg not match }; int main() { C<D,int> c; }
google
android
crash26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash26.C
254
utf_8
b68c315d87c6da3200c5e40ecf94e0a3
// { dg-do assemble } double f(double); typedef double (*M)(double); class A { public: template <const M n> void g(); }; class B: public A { public: void g() { A::g<f>(); } };
google
android
ttp44
.C
toolchain/gcc/gcc-4.9/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
android
explicit75
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit75.C
212
utf_8
6dc249c48a7588e19f2cda04b44f8be4
// { dg-do assemble } // Test for not complaining about mismatches during unification. template <void (*F)(int)> void f(); template <void (*F)(double)> void f(); extern void g(double); void h () { f<g>(); }
google
android
ref3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ref3.C
334
utf_8
2ee7c20401a918194c5b9f8b6b65df26
// { dg-do run } // { dg-prune-output "mangled name" } template <class T, int& Size> struct Base { Base() : obj(Size) {} T obj; }; int globalInt = 5; struct A { A(int arg) : ia(arg) {} int ia; }; int main() { Base<A, globalInt> ob; if (ob.obj.ia != 5) return 1; }
google
android
assign1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/assign1.C
279
utf_8
5e367a6d46451726ae5272df625f03c8
// { dg-do compile } template <class T> struct S { // { dg-error "const member\[^\n\r\]*can't use default assignment operator" } S(); T t; }; void f() { S<const int> s; s = s; // { dg-message "synthesized|deleted" } }
google
android
explicit59
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit59.C
509
utf_8
d84ed9cd9341b25e5d07e16a9c8497c0
// { dg-do run } extern "C" void abort (); template <class T> void f (); template <class T> void g () { abort (); } template <> void g<char> () { abort (); } template <class T> class C { public: void ff () { f<T> (); } void gg () { g<T> (); } template <class U> void f () {} template <class U> ...
google
android
explicit67
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit67.C
483
utf_8
3672847d5ce87a4434d6f8b4b8ef66f7
// { dg-do assemble } struct S { void f(int); void f(double); }; void g(int); void g(double); template <int* IP> void foo(); // { dg-message "note" } template <long l> void foo(); // { dg-message "note" } void bar() { foo<S::f>(); // { dg-error "" } no matching function // { dg-message "candidate" "cand...
google
android
friend45
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend45.C
366
utf_8
df7d01cb9e83b1ca1b006b7718b0b8bf
// { dg-do assemble } // // bug 42. We ICE'd on instantiating a template with a bogus templated friend. template<typename T> struct X { template<typename D> friend X<D>; // { dg-error "" } friend must use aggr tag }; X<int> g;
google
android
memtemp58
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp58.C
480
utf_8
b481f5b7e9b4fb7319ff5c17d06963fa
// { dg-do assemble } // GROUPS passed templates membertemplates template<int N, class T> struct B { }; template<int N1, int N2, int N3> struct D { struct E { template<int N4, class T> static void f(B<N4,T>) { } }; }; template<int N> struct A { template<int N2, class T, int N3> ...
google
android
test5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/test5.C
90
utf_8
ccb1258479fc3c67a962243e8c6ac4ba
// { dg-do assemble } template <char *a, const char *b, char *const c> class A{int x;};
google
android
enum5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/enum5.C
96
utf_8
47c5d6ee862751ca0f2e8f1aa3656027
// { dg-do assemble } template <> enum E {e}; // { dg-error "" } template declaration of enum
google
android
to2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/to2.C
155
utf_8
92be9313dbfafa9a6e904d05fe194212
// { dg-do assemble } template <class A> class B { public: A a; }; static B<int> b_int; static B<int> b_int2; int foo () { return b_int.a + b_int2.a; }
google
android
t00
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t00.C
180
utf_8
ae7c36b1eeaed02bf6c81ef92931372f
// { dg-do assemble } int f1 () { struct A { A() { a = 2; } int a; } ; A aa; return aa.a; } int f2 () { struct A { A() { a = 2; } int a; } ; A ab; return ab.a; }
google
android
memtemp44
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp44.C
221
utf_8
b1f420bac9ad1cf7cf61622145d050cc
// { dg-do link } // GROUPS passed templates membertemplates template<class T> class A { }; template<> class A<float> { public: template<class U> void func(U v1) {} }; int main() { A<float> a; a.func(3); }
google
android
ttp58
.C
toolchain/gcc/gcc-4.9/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
android
instantiate2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/instantiate2.C
245
utf_8
7aec59bb622f42c16476e3d897fb0cb4
// { dg-do assemble } template<class T> struct X_two { template <class T2> T2 conv_compare_ge(T2 test) { T2 tmp_value = T2 (0); return (tmp_value > test ? tmp_value : test); } }; template int X_two<double>::conv_compare_ge(int);
google
android
array7
.C
toolchain/gcc/gcc-4.9/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
android
spec4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec4.C
225
utf_8
5cca19f1e13cebaaa185c729d0f8bba8
// { dg-do assemble } template <class T> struct S {}; template <> struct S<int> { void f(); void g(); }; void S<int>::f() {} template <> void S<int>::g() {} // { dg-error "" } does not match any template declaration
google
android
ttp7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp7.C
220
utf_8
6ea9d35ef3a59d12408e3850c580de1f
// { dg-do assemble } template<class E> class D { }; template<template<class> class D,class E> class C // { dg-error "" } ref below { D<int,int> d; // { dg-error "" } arg not match }; int main() { C<D,int> c; }
google
android
ttp62
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp62.C
572
utf_8
4abf594b84571dba7c9b8f4c8ea604c8
// { dg-do run } extern "C" void abort (); template <template <class X> class B, class A> struct is_instance_of { enum { answer=false }; }; template <template <class X> class B, class T> struct is_instance_of<B, B<T> > { enum { answer=true }; }; template <class X> struct C { }; template <class X> struct D { }; t...
google
android
memtemp69
.C
toolchain/gcc/gcc-4.9/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
android
typename16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typename16.C
409
utf_8
69e1a1399b8c3ab305cd0f8d2fb6a034
// { dg-do link } // { dg-options "-Wno-deprecated" } struct B { typedef int I; }; template <class T> struct D1 : public B { }; template <class T> struct D2 : public D1<T> { I i; // { dg-error "" } not a type }; template <> struct D1<int> { typedef double I; }; template <class T> void f(T); template <> voi...
google
android
unify3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/unify3.C
298
utf_8
1e49fa76a69677164367e1fd374b5370
// { dg-do assemble } template <class T1, class T2> struct ComputeBinaryType { }; template<class T1> struct ComputeBinaryType<T1, double> { void g(); }; template<class T1> struct ComputeBinaryType<T1&, double> { void h(); }; void f() { ComputeBinaryType<double, double> cb; cb.g(); }
google
android
instantiate8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/instantiate8.C
659
utf_8
b760cfdba7c16665da061ab5cab1fa55
// { dg-do assemble } // bug 616. We failed to complete the type of decls in templates, leading to // bogus errors. struct Z; struct Y { Y (int i = 1); }; void g () { const Y y; Z z; // { dg-error "" } incomplete } template <int dim> struct X { X (int i=1); }; void h () { const X<2> z; Z z1; ...
google
android
ptrmem10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ptrmem10.C
830
utf_8
d00c12bf337e38e16d7cd0be407455f2
// { dg-do assemble } // // A pointer to member can only be formed by `&T::m', however, other forms // are ok for pointer to static member. Thus the error can only be determined // after overload resolution. In template deduction, this can disambiguate // otherwise ambiguous cases. struct A { static int f (int); ...
google
android
crash59
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash59.C
481
utf_8
d0d8ba0e054ba50de0985f73d345f355
// { dg-do assemble } // Bug 532. We failed to bail out when tsubsting a _DECL failed class ATOMSET { }; template <class T> void addConstsTo(const T &container) { typename T::const_iterator l = 0; // { dg-error "" } no type const_iterator } void tallyConstants() { addConstsTo(ATOMSET()); }
google
android
ttp10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp10.C
411
utf_8
d6a1c491e887e233e9f3e46e18ea05c7
// { dg-do assemble } 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 d; // { dg-error "" } D is a template public: int f(); }; template<template<class> class D,class E> int C<D,E>::f() { return ...
google
android
redecl1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/redecl1.C
570
utf_8
c117737b07bf9bb98aecae88beabb2dd
// { dg-do assemble } template <class T> struct S1; // { dg-message "previous declaration" } template <class T, class U> struct S1 {}; // { dg-error "redeclared" } used 1 template parameter template <class T = int> // { dg-message "original definition" } struct S2; template <class T = int> struct S2; // { dg-err...
google
android
ctor2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ctor2.C
255
utf_8
a6b4e27547baeda5f7f6c29ad2d456d5
// { dg-do assemble } // Test for use of template parms in constructor name. template <class T> struct A { A<T>(); }; template <class T> A<T>::A<T>() // { dg-error "constructor|qualified name" } { }
google
android
memclass19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memclass19.C
171
utf_8
f99aa1081528c48bcecd5a6e5e0fad52
// { dg-do assemble } template <class T> struct A { template <class U> struct B; }; template <class T> template <class U> struct A<T>::B<U*> { }; A<int>::B<int*> b;
google
android
expr8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/expr8.C
831
utf_8
a6a26715b5f2ee08c03c1c1ddb18236a
// { dg-do assemble } // There is a grammar ambiguity with greater-than compare as a default // template parameter value or template arg list. 14.2/2 and 14.1/15 // say how to resolve it, but we'd sometimes get it wrong. template <int> class C { }; void f() { C<1> c1; C<1 & 2> c2; C<1>2> c3; // { dg-error "" } parse e...
google
android
parse2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/parse2.C
152
utf_8
315b0f17950eae8a3c5bee4ebfe1676e
// { dg-do assemble } template <class T> struct A { A (const A&) { } }; template A<int>::A (const A&);
google
android
memtemp62
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp62.C
182
utf_8
b4da1e4647d3a394d7b6d4aea652680d
// { dg-do link } // GROUPS passed membertemplates struct S { template <class T> void foo(T t); }; template <> void S::foo<int>(int i) { } int main() { S s; s.foo(3); }
google
android
spec39
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec39.C
854
utf_8
ba4e5b12f2ce628d2a7e46bf22658d96
// { dg-do assemble } // // Bug 1656. We failed to make sure that a template-id was built // from a primary template. template <int dim> struct Outer { struct Inner {}; void f() { Inner<dim> i; // { dg-error "" } non-template Inner<> j; // { dg-error "" } non-template } }; struct O ...
google
android
t21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t21.C
187
utf_8
769d64b01fc99ed38e04cd629540261d
// { dg-do assemble } template <class X> class A { public: int a; X x; }; template <class X> X f (A<X> a) { return a.x; } extern A<double> a_dbl; double fred () { return f (a_dbl); }
google
android
explicit2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit2.C
153
utf_8
6c2da1ad2b74221941a0aafe4d1f215f
// { dg-do assemble } // GROUPS passed templates template <class T> void foo(T t) {} void bar() { (void (*)(int)) (void (*)(double)) &foo<double>; }
google
android
explicit62
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit62.C
218
utf_8
5363ea03d6d7a724304c1bc655259f69
// { dg-do run } extern "C" void abort (); template <class T> void f () { } template <class T> class C { friend void f<char> (); public: void ff () { f<char> (); } }; int main () { C<int> c; c.ff(); }
google
android
expr3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/expr3.C
331
utf_8
404a0a471a1caad24684b4d52de19172
// { dg-do assemble } template <int I> struct S {}; template <int J> void foo(S<J - 1>); template <class T> void baz(S<sizeof(T)>); template <int J> void fun(S<J>, S<J * 2>); void bar() { foo<5>(S<4>()); // OK - 4 is 5 - 1. baz<int>(S<sizeof(int)>()); // OK fun(S<4>(), S<8>()); // OK - deduce J from first a...
google
android
m9a
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/m9a.C
144
utf_8
130a1ddab5d7f57a2f4ae6e57f547378
// { dg-do assemble } struct A { A() { a = 1; } int a; }; // { dg-error "" } struct A { A() { a = 2; } int a; }; // { dg-error "" } A aavv;
google
android
memtemp94
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp94.C
223
utf_8
c0b5553d772c8bdf4602ec9e397bc5a8
// { dg-do assemble } struct H { template <class T> void k() const { } typedef void (H::*pmf)() const; pmf f() const { return &H::k<int>; } };
google
android
ttp5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp5.C
180
utf_8
2117ae72852be8839191fb8e5bc6984a
// { dg-do assemble } template<int> class D { }; template<template<int> class D,class E> class C { D<int> d; // { dg-error "" } arg not match }; int main() { C<D,int> c; }
google
android
memtemp60
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp60.C
158
utf_8
014af7a2fb5cdcb52d0e8d45b22fafdc
// { dg-do assemble } // GROUPS passed membertemplates template <class T> struct S { S(const S<T>& x) {} template <class U> S(const S<U>& x) {} };
google
android
friend17
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend17.C
260
utf_8
cedd42154223762b31d44f587554acc4
// { dg-do assemble } template <class T> class S2 { public: static void f(); }; class S1 { template <class T> friend class S2; static int i; }; template <class T> void S2<T>::f() { S1::i = 3; } void g() { S2<double>::f(); S2<char>::f(); }
google
android
memtemp6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp6.C
173
utf_8
1ee8c188da61392b6521d0806d4a59db
// { dg-do assemble } // GROUPS passed templates membertemplates struct S { template <class T, class U> S(T, U, T); }; template <class T, class U> S::S(T, U, T) { }
google
android
mi1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/mi1.C
1,389
utf_8
87452b1c6afe1ec037d90c332b3c9fd1
// { dg-do run } // Test that binfos aren't erroneously shared between instantiations. class PK_CryptoSystem { }; class PK_Encryptor : public virtual PK_CryptoSystem { }; class PK_FixedLengthCryptoSystem : public virtual PK_CryptoSystem { public: virtual unsigned int CipherTextLength() const =0; }; class PK_FixedLen...
google
android
memtemp11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp11.C
352
utf_8
9dc3b3369aa7e0765d33c2633d91e958
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); struct S { template <class U> S(U u, int i) {} template <class T> T foo(T t) { printf("Hello, world.\n"); return t; } }; int main() { S s(3, 4); int i = s.foo(3); s.foo("hello"); s.f...
google
android
spec10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec10.C
379
utf_8
78f3b4847f76087dd14f1722999a7331
// { dg-do run } extern "C" void abort(); template <class T> struct S { template <int i> int f(int j) { abort(); return 0; } }; template <> template <> int S<double>::f<7>(int j) { return j + 7; } template <> template <> int S<double>::f<8>(int j) { return j + 8; } int main() { S<double> s; if (s.f<7>(3) ...
google
android
m3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/m3.C
179
utf_8
75e5e46903a6ccd9aec9094d2672dc10
// { dg-do assemble } struct A { A() { a = 2; } int a; }; struct B { struct A { A() { a = 2; } int a; }; A aa; }; char xx[]="../tests/m3.cc:4: redefinition of `struct A'";
google
android
crash38
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash38.C
443
utf_8
72e40be37b279bda4c656cc8d02bde6a
// { dg-do assemble } template <class T> struct S { typedef typename T::Y<T>::Z X; // { dg-error "non-template" "non-template" } No Y in A // { dg-message "note" "note" { target *-*-* } 6 } // { dg-error "does not declare" "not declare" { target *-*-* } 6 } X x; // { dg-error "does not name a type" } No Y in A }; ...
google
android
overload7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/overload7.C
486
utf_8
64439adf1230740eabd7fda1399e40fc
// { dg-do assemble } // { dg-prune-output "note" } template<class T> struct moo_t { struct cow_t {}; }; template<class T> void foo(typename moo_t<T>::cow_t) {} template<class T> void foo(moo_t<T>) { typename moo_t<T>::cow_t p; foo(p); // { dg-bogus "" "" { xfail *-*-* } } - no matching function for call - } i...
google
android
spec18
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec18.C
331
utf_8
be4c4aaf4896a204dd3b537e9467220b
// { dg-do assemble } template<class A, class B> void foo(const A& a, const B& b) { } template<class A, class B> void foo(const A& a, const int& b) { } template<class A*, class B> void foo(const A*& a, const B& b) { } template<> void foo(const int&, const double&) { } int main() { foo("98239", 23); foo(232, ...
google
android
explicit29
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit29.C
144
utf_8
0c6a13d8b71463fc19387254998b81ae
// { dg-do link } // GROUPS passed templates template <class T> int foo(T) { return 0; } int foo(int); int main() { return foo<int>(3); }