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
crash62
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash62.C
263
utf_8
c123d0b9a12303c4b06fb3047614c601
// { dg-do assemble } // Bug 911, ICE on bogus template declaration template <class T> class A<T>; // { dg-error "" } not a template
google
android
memtemp15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp15.C
194
utf_8
f1b9246013e671507344ddcd9657020b
// { dg-do assemble } // GROUPS passed templates membertemplates template <class T> struct S { template <class U> void foo(U) {} }; void f() { S<int> s; s.foo(3); s.foo("hello"); }
google
android
copy1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/copy1.C
237
utf_8
25d39394e96b80fde77f2b916b2c699b
// { dg-do run } int i = 0; template <class T> class F { public: F() {} template <class T2> F(F<T2>) { i = 1; } }; F<int> foo() { F<int> f1; F<int> f2(f1); return f1; } int main() { return i; }
google
android
crash60
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash60.C
513
utf_8
a08181c1dc010836e1aae123f0b87bcc
// { dg-do assemble } // We ICE'd rather than fail to instantiate. template< typename SID, class SDR > void k( SID sid, SDR* p, // { dg-error "no type named 'T'" } void (SDR::*) ( typename SID::T ) ); struct E { }; struct S { void f( int ); }; void f() { k( E(), (S*)0, &S::f ); // { dg-error "" } no match // {...
google
android
ttp46
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp46.C
126
utf_8
4c791b2f93efc50503c6c5e3eaa7dd35
// { dg-do assemble } template <template<class> class TT> void f() {} template <template<class,class> class TT> void f() {}
google
android
t40
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t40.C
145
utf_8
e751f7def809cea6c632d7fb5b80ccb8
// { dg-do assemble } struct A { struct B { B (int); }; static int foop (B); static int splat () { return foop (B (1)); } };
google
android
spec40
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec40.C
1,258
utf_8
c7ef11ee5c8e8c82483968d3ff597502
// { dg-do compile } // More from bug 1617. The resolution of DR 214 implies that the below // call to Foo is ambiguous. // // The type transformation (on the function parameter of Foo) allowed // in the context of partial ordering of the Foo template overloads is // the following ([temp.deduct.partial]/5): // // ...
google
android
memtemp100
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp100.C
491
utf_8
1bef8782d08b3c6de2bab59c7370d8e2
// { dg-do assemble } // { dg-options "" } #include <iostream> using namespace std; template <class T> struct traits { typedef long next; }; template <class T> struct c1 { template <class U> struct c2 { c2() { cout << __PRETTY_FUNCTION__ << endl; } }; }; template <class T> void foo() { co...
google
android
friend43
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend43.C
256
utf_8
301f35594b1f8e003468b70f0975722e
// { dg-do assemble } class A { public: static void f(); }; template <class T> class B : public A { friend void A::f(); }; template <class T> class C : public B<T> { }; template class C<char>;
google
android
spec22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec22.C
225
utf_8
05b0244f0c064cd598fd696cc4cdfbf1
// { dg-do assemble } template <class T> struct S { template <class U> void f(); }; template <class T> template <> // { dg-error "enclosing class templates|invalid explicit specialization" } void S<T>::f<int> () { }
google
android
typename19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typename19.C
396
utf_8
de446625154d3572cdeda6495d684400
// { dg-do run } // { dg-options "" } template <class T> struct O { typedef char X; }; template <class T> struct S { typedef double X; template <class U> struct I : public O<U> { static X x; }; }; template <class T> template <class U> typename S<T>::X S<T>::I<U>::x; int main() { return sizeof (S<int>::...
google
android
memtemp84
.C
toolchain/gcc/gcc-4.9/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
android
memtemp26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp26.C
330
utf_8
12aa4b512a6963472981ee0025ca4de3
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); template <class X> struct S { template <class U> void f(U u); int i[4]; }; template <class X> template <class U> void S<X>::f(U u) { printf ("%d\n", sizeof (U)); } int main() { S<char*> s; s.f(3); ...
google
android
memtemp87
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp87.C
316
utf_8
feabcce3083246b2a0ec3a5f2b1b96be
// { dg-do assemble } class Q { public: template<class> class X { }; }; template<template<class> class> class Y { }; Q::template X<int> x; // { dg-error "template" "" { target { ! c++11 } } }
google
android
typename12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typename12.C
301
utf_8
74aec9ed40f7ea6975297f746e40db9e
// { dg-do run } // { dg-options "" } // execution test int i = 0; template <class T> struct S { struct X {}; }; template <class T> void f(T) { S<T>::X(); } template <> struct S<int> { static void X() { i = 1; } }; int main() { f(3); if (i != 1) return 1; else return 0; }
google
android
explicit22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit22.C
172
utf_8
b4be1895fa850f3ebcd6ef35168961e2
// { dg-do assemble } // GROUPS passed templates template <class T, class U> T foo(T t, U* u); template <class T> T foo(T t, T* u); template <> int foo<int>(int, int*);
google
android
memtemp99
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp99.C
215
utf_8
a60f1480d0af85827b066c90abdfd6a5
// { dg-do assemble } template<typename T, unsigned int N> class Vector { public: template<unsigned int I> class Vector<T,N>::CommaInit { }; // { dg-error "" } invalid definition };
google
android
overload9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/overload9.C
201
utf_8
6da07c77e41065f4fd25d2590a0cc546
// { dg-do run } template <class T> int f(T) { return 1; } template <class T> int f(T*) { return 0; } int main() { int (*h)(int*) = &f; int (&k)(int*) = f; return (*h)(0) || (*k)(0); }
google
android
friend18
.C
toolchain/gcc/gcc-4.9/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
android
overload14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/overload14.C
443
utf_8
a7cc7afc5b4d3917287e2eb1136e72b7
// { dg-do assemble } // // Bug 1639. We failed to have builtin relop candidates with enumeral type. template <typename T1, typename T2> void operator == (T1, T2); enum E {e1}; void operator != (E, E); bool Foo (E e) { return e == e1; } bool Baz (E e) { return e != e1; // { dg-error "" } void not ignored. }
google
android
overload8
.C
toolchain/gcc/gcc-4.9/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
android
crash58
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash58.C
1,140
utf_8
0d1d2b53aa1bf95cefef4d80775e45a4
// { 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-message "" } candidate } template <class T> void do_assign(T* d); // { dg-message "" } candidate template <class T> struct MatrixC { void foo () { ...
google
android
memclass11
.C
toolchain/gcc/gcc-4.9/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
android
virtual2
.C
toolchain/gcc/gcc-4.9/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
android
explicit53
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit53.C
373
utf_8
e208383b6955846029d595c3bd03b356
// { dg-do run } extern "C" void abort (); template <int a> inline int fact (); template <> inline int fact<1> (); template <int a> inline int fact () { return a * fact<a-1> (); } template <> inline int fact<1> () { return 1; } int main() { if (fact<3> () != 6 || fact<1> () != 1 || fact<3> () != 6 || f...
google
android
derived3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/derived3.C
338
utf_8
741859656e0df7350bf09949ed93e660
// { dg-do compile } template<class T> class X { class Y : public T // { dg-error "base type .* fails to be" } { }; Y y; // { dg-message "required" } }; int main() { X<int> x; // { dg-message "required" } }
google
android
ttp48
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp48.C
230
utf_8
392f36747d5240b754e0b5ba3e899557
// { dg-do run } template <template<int> class TT, class T> void f(T) { } template <template<class> class TT, class T> void f(T) { } template <class T> class C {}; template <int> class D {}; int main() { f<C>(1); f<D>(1); }
google
android
memtemp16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp16.C
403
utf_8
4f35a5fbc93b0be54fc836a6bc8b068c
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); template <class U> struct S { template <class T> void operator+(T); }; template <class U> template <class T> void S<U>::operator+(T) { printf("Hello, world.\n"); } int main() { S<int> s; s + 3; s + s; ...
google
android
crash15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash15.C
169
utf_8
2abe02bab2c536f2c534865125b58f90
// { dg-do assemble } template <class T> template <class U> struct A { // { dg-error "" } too many template parameter lists public: A() {} A(const A<T>& b) {} };
google
android
explicit11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit11.C
167
utf_8
41ea3db1352a4253869e4c8ee7f1c8d2
// { dg-do assemble } // GROUPS passed templates template <class T> void foo(T t); template <class T> struct S {}; int main() { S<int> si; foo<S<int> >(si); }
google
android
explicit69
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit69.C
92
utf_8
74d16901f6598da62f8e10339b1e13b9
// { dg-do assemble } template class x {}; // { dg-error "" } not a template instantiation
google
android
explicit12
.C
toolchain/gcc/gcc-4.9/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
android
explicit81
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit81.C
790
utf_8
a026eff7f55e0343c0d357e41998e870
// { dg-do assemble } // // bug 371 We failed to subst explicit template args before trying to // deduce the template. namespace N { enum E { e0 }; template< E e > void nf(); } template< N::E e > void gf(); struct X { template<N::E e> void xfn (); template<N::E e> static void sfn (); }; template < class C > void ...
google
android
static1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/static1.C
220
utf_8
e0d0fe1b8240ee54372126de5a91f0c7
// { dg-do run } extern "C" void abort(); template <class T> class A { public: static int foo(int); }; template <> int A<int>::foo(int i) { return i; } int main() { if (A<int>::foo(22) != 22) abort(); }
google
android
explicit1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit1.C
137
utf_8
273c61d41e502ce4ff763228572c5f0c
// { dg-do assemble } // GROUPS passed templates template <class T> void foo(T t) {} void bar() { (void (*)(double)) &foo<double>; }
google
android
stmtexpr
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/stmtexpr.C
180
utf_8
728932a75888ba7fb19987b8fcc2c22d
// { dg-do run } extern "C" void abort(); template <class T> T f(T) { T t = __extension__ ({ T j = 4; j + 3; }); return t; } int main() { if (f(3) != 7) abort(); }
google
android
syntax1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/syntax1.C
704
utf_8
0bf819f894a73840e575e5f45c0f80d5
// { dg-do assemble } // and several others. With templates, it's very easy to say something // erroneous like // template class X::X<whatever> // The culprit // ... class X::X ... // caused us to ICE as we got confused about pushing and popping scopes. class Y { public: template <class T> Y(T &); }; templat...
google
android
friend21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend21.C
440
utf_8
e8d08245e2efb53a450af3ba9c642e8f
// { dg-do assemble } template <class T> struct A { static void f(); }; template <class T> class B { friend class A<T>; static int i; // { dg-error "" } private }; template <class T> class C { template <class U> friend class A; static int i; }; template <class T> void A<T>::f() { B<T>::i = 3; C<T>...
google
android
spec38
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec38.C
356
utf_8
bc15e40e290206d22d8803ef0d77c08f
// { dg-do assemble } // // Bug 1638. We failed to check if a function instantiation produced a void // parameter type. template <class T> struct S { int f (T); // { dg-error "" } void type }; void foo () { S<void> s; }
google
android
explicit68
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit68.C
248
utf_8
12cc5ce647e319b2d6947602ceb1bb66
// { dg-do assemble } template <bool B> struct S { static void g(); }; template <bool B> void g(); template<unsigned Length> void f() { const bool b = true; g<b>(); const bool b1 = (Length == 2); S<b1>::g(); } void h() { f<3>(); }
google
android
memtemp55
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp55.C
200
utf_8
8f8e98c8dc91cd3216edcdd0105c25d7
// { dg-do assemble } // GROUPS passed templates membertemplates template<class X> class _bz_update { }; template<class T> struct S { template<int N_destRank> void foo() { _bz_update<int>(); } };
google
android
error1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/error1.C
289
utf_8
d76effa03214da94f36f9a3401e3527a
// { dg-do assemble } template <class T> struct S { template <class U> void f (); }; template <class T> template <class U> void S<T>::f () { U& u; // { dg-error "" } uninitialized reference } template void S<int>::f<double>();
google
android
crash34
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash34.C
325
utf_8
b8a43da58e14e7b6fd2c0512bd16c158
// { dg-do assemble } template <class T> class A { public: class B { }; class C: public B { public: C(A&):B() { } }; C f() { return C(*this); } }; int main() { A<int> a; a.f(); }
google
android
explicit63
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit63.C
212
utf_8
264fbfea36f006909453ff26209f77db
// { dg-do run } extern "C" void abort (); template <class T> void f () { } template <class T> class C { friend void f<T> (); public: void ff () { f<T> (); } }; int main () { C<int> c; c.ff(); }
google
android
deduct1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/deduct1.C
404
utf_8
eaff282b339b621747f695a9dbfae2db
// { dg-do assemble } template<class CoordinateSystem, class MeshTag> struct Mesh { }; struct RectGrid { }; struct RectMesh { }; struct Cartesian { }; template<class CS> struct Mesh<CS, RectGrid> { }; template<class CS> struct Mesh<CS, RectMesh> : public Mesh<CS, RectGrid> { }; template<class CS> void foo(const...
google
android
memtemp68
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp68.C
179
utf_8
803c276204be0edf76ffb65079479c5a
// { dg-do assemble } struct locale { template<class _Facet> locale (const locale&, _Facet*); locale(int*) throw(); }; void f(int* p) { locale keep (p); }
google
android
ttp63
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp63.C
182
utf_8
e8c2f6385f09e7463a4d5153f6c63846
// { dg-do assemble } template <template <class> class TT> class X {}; template <class T> class Y { X< ::Y> x; };
google
android
spec30
.C
toolchain/gcc/gcc-4.9/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
android
explicit41
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C
237
utf_8
43d28623060a5713965b46fe72393165
// { dg-do assemble } template <int I> void f(int i); // { dg-message "void f" } void g() { int i; f<i>(7); // { dg-error "" } template argument 1 is invalid. // { dg-message "candidate" "candidate note" { target *-*-* } 8 } }
google
android
typename7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typename7.C
509
utf_8
5a6ba6bb5095ef176bfc6475c1dfb8e7
// { dg-do assemble } // { dg-options "" } // Test for implicit typename template <class T> struct A { protected: typedef struct B { } B; }; template <class T> struct C { }; template <class T> struct D : public A <C <T> > { void f () { B* new_entries = (B *) 0; // { dg-error "'B' was not declared in ...
google
android
enum10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/enum10.C
143
utf_8
ee05018b3a3474e051d3aefc4620a8a4
// { dg-do assemble } template <class T> struct S { enum E { a = (int) T::b }; }; struct S2 { enum E2 { b }; }; template class S<S2>;
google
android
lookup8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/lookup8.C
169
utf_8
6a6ef305436e96478bb07832e56b02e7
// { dg-do assemble } template <class T> class X{}; class Y : public X<int> { void f(); }; void Y::f() { X x; }
google
android
ttp18
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp18.C
366
utf_8
d1488ec6b9b284255236a3f2c2a1bd9d
// { 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(); int g() { return 0; } }; template<template<class> class D,class E> int C<D,E>::f() { C<D,char> d2; return d...
google
android
deduct5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/deduct5.C
611
utf_8
b98ab69e2ba83f30cbf876e0eb2bd158
// { dg-do run } // Bug 1960. We were not dealing with qualified array types properly. #include <stdio.h> template <typename T> int Foo (T const *ptr) { static int count; printf ("%s\n", __PRETTY_FUNCTION__); count++; return count; } int main () { static int const cs = 1; static int const ca[1] = {1}...
google
android
enum14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/enum14.C
723
utf_8
1e48bee97188537da1115301ec5f1da1
// { dg-do assemble } // Bug 511. We failed to set access correctly for enumeration members of // template classes template <class> class A { public: enum foo {bar}; typedef int baz; }; struct C: public A<int> { void choke (foo); void choke (baz); }; template <class> struct B { private: enum foo {bar}; /...
google
android
virtual3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/virtual3.C
198
utf_8
dfc0324b20d7c26de08a9be2bd7d3c72
// { dg-do assemble } struct S { int i; }; template <typename T> struct X : virtual public T, virtual public S { int i; X () : i (3) {} };
google
android
niklas03
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/niklas03.C
175
utf_8
8a0d7ebd9bf3655a75d60e165673494a
// { dg-do assemble } template <class A> struct X { A operator[] (int); }; template <class A> A X<A>::operator[] (int i) { return A(); // { dg-bogus "" } } X<int> x;
google
android
array2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/array2.C
205
utf_8
3b220deaab541cb68cedec5e541bfe9e
// { dg-do assemble } template<int N, class C> class Bar {}; template<class C> class Huh {}; template<int N> void foo(const Bar<N,Huh<float[1]> > &x) {} int main() { foo(Bar<3,Huh<float[1]> >()); }
google
android
memtemp98
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp98.C
301
utf_8
986db54c0885195fa31e214d42c77ff4
// { dg-do assemble } //Purpose: // Test nested template as template template arg. //Result: // Before the patch, got: // `C' is not a template template <template <typename S> class T> struct A { T<int> m_t; }; struct B { template <typename V> struct C { V m_v; }; }; A<B::C> z;
google
android
poi1
.C
toolchain/gcc/gcc-4.9/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
android
ptrmem3
.C
toolchain/gcc/gcc-4.9/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
android
spec13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec13.C
484
utf_8
f0dc61d0c11cfe14e42aed869ff6453d
// { dg-do run } template <class T> void f(T t); template <class T> void f(T* t); template <> void f(int* ip) {} struct S1 { template <class T> void f(T t); template <class T> void f(T* t); }; template <> void S1::f(int* ip) {} template <class U> struct S2 { template <class T> void f(T t); templat...
google
android
ttp45
.C
toolchain/gcc/gcc-4.9/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
android
inherit2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/inherit2.C
1,222
utf_8
bce617d75e4dab85e3ef89e7ab113a6f
// { dg-do assemble } // Make sure we make the right unqualified class a friend // See PR c++/4403 template <class T> struct A { struct AA; struct AC; }; template <class T> class B :public A<T> { friend struct B::AA; // OK, this has an implicit typename // as if it is 'friend struct typename B::AA' ...
google
android
spec6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec6.C
658
utf_8
ffaeeb1f8aec37c78a183356df585b25
// { dg-do assemble } struct S1 { template <class T> void f(T t1, T t2); // { dg-message "note" } }; template <> void S1::f(int i1, int i2); template <class U> struct S2 { template <class T> void f(T t1, T t2); // { dg-message "note" } }; template <> template <> void S2<char>::f(int i1, int i2); void h...
google
android
spec7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec7.C
191
utf_8
48eac1a120525c146e973dea81905b73
// { dg-do run } extern "C" void abort(); template <class T> void f(T t1, T t2); template <> void f(int i, int j) { abort(); } void f(short s, char c) { } int main() { f(3, 'c'); }
google
android
memclass9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memclass9.C
295
utf_8
fa42ab5756ba6106b506e9c1fb45aceb
// { dg-do assemble } template <class T> struct S1 { template <class U> struct S2 { S2(U); void g() { S2<U> s2u (u); } U& u; }; template <class U> void f(U u) { S2<U> s2u(u); s2u.g(); } }; void g() { S1<int> s1; s1.f(3.0); }
google
android
explicit16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit16.C
403
utf_8
acb1c7686098e1ea15825a87f66d7902
// { 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: static const int rank = ArraySectionInfo<T1>::rank; typedef Array<rank> T_slice; }; template<class T2> t...
google
android
unify6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/unify6.C
1,289
utf_8
aa86fd1c8c19adf9dd8767268c87e4b2
// { dg-do assemble } // Template deduction and type unification should not issue diagnostics when // they're trying to see if it's possible. Here deduction fails in some cases // because you cant cv qualify a function type. template<class T> void fn(){} // A template<class T> void fn(T const *){} // B // these next ...
google
android
crash43
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash43.C
422
utf_8
d39baf707f17d64bdfa9d0c3824a66da
// { dg-do assemble } template <int T> struct S { struct X {}; struct Y {}; template <int U> friend struct S<U>::X; template <int U> friend typename S<U>::Y; // { dg-error "" } typename as friend }; struct T { template <int T> friend struct S<T>::X; }; struct U { template <int T> friend typename S<...
google
android
cond2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/cond2.C
212
utf_8
773908de3086f266546f3b9c039e01f6
// { dg-do assemble } struct S { S (int); operator bool () const; }; template <class T> void f () { if (const S &s = 3) { } } template void f<int>();
google
android
ttp60
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp60.C
255
utf_8
786445305581ecfffa79fb53ba89528c
// { dg-do assemble } template<template<typename> class t1, typename t0> t1<t0> single() { return single<t1,t0>(); } template<typename a> class T1 {}; int main() { single<T1,int>(); }
google
android
explarg1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explarg1.C
382
utf_8
73e8a2e83664d61664447fff504aa31a
// { dg-do run } // Bug: g++ generates an error trying to generate the first foo<int>, when // it should silently fail and go on to the next one. template<class T, typename U> class A { }; template<class T> void foo(const A<T,typename T::N>&); template<typename T> class B { }; template<typename T> void foo(B<T> co...
google
android
t35
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t35.C
231
utf_8
6af909875fa9f90e1e7206db6ad54117
// { dg-do assemble } // { dg-options "" } template<class X> struct A { A (); ~A(); int x, y, z; }; template <class Y> inline A<Y>::A () { x = y = 3; z = 99; } template <class Z> inline A<Z>::~A() { y = 9999; } A<int> ai;
google
android
explicit5
.C
toolchain/gcc/gcc-4.9/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
android
friend25
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend25.C
259
utf_8
f0c38d7d73bae947b233e0a3eb2e7454
// { dg-do assemble } template <class T> struct A; struct B { template <class U> friend class A<U>; // { dg-error "" } does not specialize any args }; struct C { template <class U> friend class A<U*>; // { dg-error "" } partial specialization };
google
android
static8
.C
toolchain/gcc/gcc-4.9/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
android
crash20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash20.C
293
utf_8
f2ba0084cbf550aa1f113754d14b9f5b
// { dg-do compile } template <class T = int> struct A { // { dg-message "const|operator=" "assignment" } const T x; A() : x(0) { } A(T x) : x(x) { } }; template <class B> void func () { B y; y = B(); // { dg-message "synthesized|deleted" } } int main (void) { func< A<> >(); }
google
android
crash50
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash50.C
163
utf_8
32a247728ae8abdf4928dbe880ec7941
// { dg-do assemble } template <class T> void f () { __extension__ ( { if (3); }); } template void f<int>();
google
android
explicit50
.C
toolchain/gcc/gcc-4.9/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
android
builtin
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/builtin.C
243
utf_8
f2dc0c4f766e43328cdd36ba323cdfa6
// { dg-do assemble } // { dg-options "-Wno-abi" { target arm_eabi } } // Bug: Checking whether A depends on template parms, we crash because // __builtin_va_list lacks TYPE_LANG_SPECIFIC. void f (__builtin_va_list arg) { enum { a } A; }
google
android
scope1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/scope1.C
145
utf_8
a8546d341b42085260ccd351b918e18c
// { dg-do assemble } template<class X, class Z> class foo { public: typedef X y; class bar { public: void blah () { y Y; } }; };
google
android
asm1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/asm1.C
392
utf_8
bb8d2d0fe6b1dcc9273c8b8fb7b54f87
// { dg-do assemble { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } // We'd use ebx with 32-bit pic code, so skip. // { dg-skip-if "" { ilp32 && { ! nonpic } } { "*" } { "" } } template<int i> int foo(int v) { __asm__ __volatile__("addl %1, %0" : "=a" (v) : "b" (i)); return v; } int bar(int i) { return foo<12...
google
android
t35a
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t35a.C
135
utf_8
1f2805de9d0dd928b7dc9d6396f793df
// { dg-do assemble } template <class X> struct A { }; template <> struct A<int> { int foo (); }; int A<int>::foo () { return 37; }
google
android
nontype3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/nontype3.C
305
utf_8
c31cb85da575ef89bae17d43d16c2431
// { dg-do assemble } enum E { e }; template <const E* ep> struct S1 { static const char* s; }; template <int D> struct S2 {}; template <> struct S2<1> { static E es[1]; }; struct S3 { typedef S1<S2<1>::es> S3_Type; }; E S2<1>::es[1] = {e}; template <> const char* S1<S2<1>::es>::s = "abc";
google
android
alignof
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/alignof.C
199
utf_8
d83edbe52eb7bc716fbb4d703952fd5c
// { dg-do run } extern "C" void abort(); struct S { char c; double d; }; template <class T> void foo(T) { if (__alignof__(T) != __alignof__(S)) abort(); } int main() { foo(S()); }
google
android
memtemp45
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp45.C
225
utf_8
3d7592fe0dae485e1e9663cee792b524
// { dg-do link } // GROUPS passed templates membertemplates template<class T> class A { }; template<> class A<float> { public: template<class U> void func(U v1 = 0) {} }; int main() { A<float> a; a.func(3); }
google
android
friend11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend11.C
431
utf_8
fe71e5ffa467de3989fe0db5887d2c44
// { dg-do assemble } template <class T> class C; template <class T> struct S { template <class U> void f(U u) { C<U> cu; cu.i = 3; // { dg-error "" } S<double>::f<U> is a friend, but this is // S<int>::f<double>. } }; template <class T> class C { template <class U...
google
android
inline1
.C
toolchain/gcc/gcc-4.9/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
android
explicit31
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit31.C
270
utf_8
5ed0cade54d7b0288e8fef406aa39372
// { dg-do link } // { dg-options "-ansi -pedantic-errors -w" } // GROUPS passed templates template <class T> struct S { template <class U> static double foo(U u) { return (double) u; } }; int main() { double d = S<int>::foo<char>(3.3); return (d >= 3.1); }
google
android
t41
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t41.C
138
utf_8
44cf9bfda2364b0753fbd446690d0f2e
// { dg-do assemble } struct A { struct B { B (int); }; static int foop (B); int splat () { return foop (B (1)); } };
google
android
explicit9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit9.C
138
utf_8
2048df52f559bb2dad17983568c0d774
// { dg-do assemble } // GROUPS passed templates void foo(int); void bar() { foo<int>(3); // { dg-error "" } foo is not a template. }
google
android
crash54
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash54.C
331
utf_8
ebfd66f22ee0c6dde20bb0c2daa37dd9
// { dg-do assemble } template <class T> int g (T); int j = g (3); template <class T> inline T f (T) { return 2; } template <class T> struct S { static const int i; }; template <class T> const int S<T>::i = f (3); template <class T> int g (T) { return S<double>::i; }
google
android
unify8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/unify8.C
758
utf_8
7972f588f3710dd3c8a8ee3e8cc1c903
// { dg-do assemble } // Bug 1630. Template deduction at a call allowed conversions more lenient than // qualification conversions. That would lead to misleading diagnostics during // overload resolution. template <typename T> void Foo (T const **); // { dg-message "note" } template <typename T> void Bar (T const * co...
google
android
crash68
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash68.C
1,067
utf_8
3854df7d687f6b27c1a8728b646f4944
// { dg-do assemble } // { dg-prune-output "mangled name" } // // Bug 3624. Template instantiation of a reference type was not // converted from reference when doing a call. #include <iostream> using namespace std; template <class A, class B, class C, C& c, bool d> class eo: public A { public: eo() { cout <<...
google
android
explicit3
.C
toolchain/gcc/gcc-4.9/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
android
crash67
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash67.C
411
utf_8
f22cf44c7dbbb47eb64c9173b3afe6c9
// { dg-do assemble } // { dg-options "" } // // Bug 2526. We ICE'd after diagnosing dependent name confusion in // friendliness when not being pedantic. template<typename T> struct B { typedef B<T> Mother; }; template<typename T> struct D : B<T> { friend class Mother; };
google
android
typename25
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typename25.C
651
utf_8
ed21332d8a03e521a9e2d3cd3e643d1a
// { dg-do assemble } // { dg-options "" } // Our implicit typename extension was causing this pedantically // correct program to fail struct list { typedef int reference; }; class d0_Collection_Base {}; template <class T> class d0_List_1 : virtual public d0_Collection_Base, public list { public: typedef int...
google
android
t39
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t39.C
468
utf_8
94fb3f4d92db5a0db2265c73873ffa25
// { dg-do run } extern "C" int printf (const char *, ...); template <class T> struct frob { T *ptr; void print (); frob (T* init) { ptr = init; } }; template <class T> void frob<T>::print () { printf ("this = %08x\n", this); printf (" ptr = %08x\n", ptr); printf (" values = %x %x %x ...\n", ptr[0], ptr[...
google
android
friend26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend26.C
109
utf_8
6bebb5862e10035a9ad5d5d4f55e2305
// { dg-do assemble } struct S { friend void f<>(int); // { dg-error "" } does not match any template };