plateform
stringclasses
1 value
repo_name
stringclasses
2 values
name
stringlengths
1
78
ext
stringclasses
2 values
path
stringlengths
15
1.11k
size
int64
1
8.55M
source_encoding
stringclasses
11 values
md5
stringlengths
32
32
text
stringlengths
0
8.49M
google
chromium
deduct4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/deduct4.C
216
utf_8
bebda0d9abe97c29d328a826c65a64eb
// { dg-do run } // Test that we can deduce t even though T is deduced from a later argument. template <int I> struct A { }; template <class T, T t> void f (A<t> &, T) { } int main () { A<42> a; f (a, 24); }
google
chromium
spec6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/spec6.C
412
utf_8
216b43891b00dedddfc46563fb1a5ea3
// { dg-do assemble } struct S1 { template <class T> void f(T t1, T t2); }; template <> void S1::f(int i1, int i2); template <class U> struct S2 { template <class T> void f(T t1, T t2); }; template <> template <> void S2<char>::f(int i1, int i2); void h() { S1 s1; s1.f(3, 'c'); // { dg-error "" } no ...
google
chromium
friend6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/friend6.C
237
utf_8
f37440b612cf6d74499b8cf3c614fdb2
// { dg-do run } template <class T> void f(T); class C { template <class T> friend void f(T) { C c; c.i = 3; } public: void g() { f(3.0); } int i; }; int main() { f(7); C c; c.g(); }
google
chromium
assign1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/assign1.C
221
utf_8
7b56ab77e4324e29b1f9db68cfbae31d
// { dg-do compile } template <class T> struct S { // { dg-error "assignment" } S(); T t; }; void f() { S<const int> s; s = s; // { dg-message "synthesized" } }
google
chromium
redecl1
.C
native_client/nacl-gcc/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
chromium
spec29
.C
native_client/nacl-gcc/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
chromium
typename2
.C
native_client/nacl-gcc/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
chromium
mangle1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/mangle1.C
173
utf_8
784b251702b100d813b64092c48d83c8
// { dg-do assemble } typedef enum {} i; template <int II> class Bar {}; void f (Bar<21>, int) {} void f (Bar<2>, i) {}
google
chromium
typename14
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/typename14.C
255
utf_8
29cbf5200ec98010b37b50f68e0e920d
// { dg-do assemble } // { dg-options "-Wno-deprecated" } template <class T> struct B { typedef T X; }; template <class T> struct S : public B<T> { struct I { void f(X x); // { dg-error "'X' has not been declared" } implicit typename }; };
google
chromium
explicit31
.C
native_client/nacl-gcc/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
chromium
crash1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash1.C
228
utf_8
dd98e99fef875456445a8b55b18ded46
// { dg-do assemble } template<class T> class A { public: class subA {}; }; template<class T> class B : public A<T> { public: class subB : public A::subA {}; // { dg-error "" } not a class or namespace };
google
chromium
fntry1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/fntry1.C
220
utf_8
623927839b1440501a83a44e8c6cd07a
// { dg-do run } // Bug: g++ silently ignores function-try-blocks in templates. template <class T> void f (T) try { throw 1; } catch (...) { } int main () { f (1); }
google
chromium
t11a
.C
native_client/nacl-gcc/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
chromium
friend7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/friend7.C
213
utf_8
2a8c138073677b413a3c89de42d324f2
// { dg-do run } template <class T> void f(T); template <class U> class C { template <class T> friend void f(T); int i; }; template <class T> void f(T) { C<T> c; c.i = 3; } int main() { f(7); }
google
chromium
spec31
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/spec31.C
152
utf_8
5d85c96e7ef4ccffcea361ff582c4dac
// { dg-do assemble } template <> struct A {}; // { dg-error "" } not a specialization template <> void f (); // { dg-error "" } not a specialization
google
chromium
m9a
.C
native_client/nacl-gcc/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
chromium
overload2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/overload2.C
174
utf_8
9d9938bf727f56481aae89ded9100089
// { dg-do assemble } template<class T> class C { public: C<T*> O(); C<T*> O() const; }; int main() { C<char*> c; char* p = Z(c.O); //{ dg-error "" } ambiguous c.O }
google
chromium
call2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/call2.C
282
utf_8
9c3bb0bec6650550ae0bcd2455ff2f6e
// { dg-do assemble } struct IsCompressed { }; struct Field { }; template<class C> inline bool for_each(const Field& p, IsCompressed, C) { return p.IsCompressed(); // { dg-error "" } calling type like a method } template bool for_each<int>(const Field& p, IsCompressed, int);
google
chromium
conv3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/conv3.C
215
utf_8
c0f0a60cf74d252087303d25f5507357
// { dg-do assemble } struct A { template<typename T> explicit A(T t) {} }; void f(A a) {} int main() {f(1);} // { dg-error "" } no conversion from int to A.
google
chromium
crash17
.C
native_client/nacl-gcc/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
chromium
typedef1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/typedef1.C
188
utf_8
318620e10c25eca63522f04dec88b5d7
// { dg-do assemble } // Testcase for handling of typedef wierdness. template <class T> struct A { typedef enum { foo } B; A (B b); }; template <class T> A<T>::A (B b) { }
google
chromium
crash50
.C
native_client/nacl-gcc/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
chromium
using1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/using1.C
567
utf_8
6db34b7b286cebb5470a57b834c15939
// { dg-do run } // Bug 1981. using declarations in namespace scope were not remembered. namespace A { void swap () {} } template <class T> void f() { using A::swap; } template void f<float> (); int foo (int) { return 0;} namespace B { int foo (int) { return 1;} template <class T> int baz () { using :...
google
chromium
niklas01a
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C
312
utf_8
af710ba92cd08b57bcdabcd940b8ed54
// { dg-do assemble } // { dg-options "-fshow-column" } struct A { // { dg-error "" } forward declaration friend struct B : A { // { dg-error "invalid use of incomplete type 'struct A'" } int x; }; // { dg-error "class definition may not be declared a friend" "" { target *-*-* } { 5 } } int y; };
google
chromium
m1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/m1.C
251
utf_8
68ae4259897949e12ba6f612c0e667b6
// { dg-do assemble } int f1 () { struct A { A() : b (2) { } int fred () { return b.hi_mom; } struct B { int hi_mom; B (int a) { hi_mom = a; } }; B b; }; A aa; return aa.fred(); } /* crashes with signal 11 */
google
chromium
ptrmem1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ptrmem1.C
206
utf_8
46176d6da474c7c2a2b4d0d630c4b9cb
// { dg-do run } class foo { public: template<class T> T bar() { return 7; } }; int main() { foo f; int (foo::*s)() = &foo::bar<int>; if ((f.*s)() == 7) return 0; else return 1; }
google
chromium
ptrmem6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C
602
utf_8
a502c5d9ab715358ae3280f9865dba06
// { dg-do assemble } class A { public: virtual void f(); int i; }; class B : public A { public: void f(); int j; }; template <void (A::*)() > void g() {} template <int A::*> void h() {} int main() { g<&A::f>(); h<&A::i>(); g<&B::f>(); // { dg-error "" } h<&B::j>(); // { dg-error "" } g<(void ...
google
chromium
explicit64
.C
native_client/nacl-gcc/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
chromium
syntax1
.C
native_client/nacl-gcc/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
chromium
expr3
.C
native_client/nacl-gcc/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
chromium
t38
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t38.C
378
utf_8
75bc3e70f5f3963a4a43e97741cf1de7
// { dg-do assemble } // { dg-options "" } extern "C" int printf (const char *, ...); template<class X> struct A { A (int, char); ~A (); A (X *, float); }; template<class Y> inline A<Y>::A (int i, char c) { printf ("%d, %d\n", i, c); } template<class Z> A<Z>::~A() {} template<class W> A<W>::A (W * d, float f...
google
chromium
ttp22
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp22.C
400
utf_8
90b00b8bdc7f8cddd6f5cc747c5f937a
// { 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 DD,class EE> class C : DD<EE> { public: int f(); }; template<template<class> class DD,class EE> int C<DD,EE>::f() { return DD<EE>::f(); } class E : C<D,int> ...
google
chromium
t35
.C
native_client/nacl-gcc/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
chromium
memtemp39
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp39.C
230
utf_8
ac938eb9f6361016ed3ba4b16de68d55
// { dg-do assemble } // GROUPS passed templates membertemplates template <class T> struct S { template <class U> void f(U u) { g(u); } template <class U> void g(U u) { f(u); } }; void foo() { S<int> si; si.f(3); }
google
chromium
memtemp63
.C
native_client/nacl-gcc/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
chromium
unify6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/unify6.C
1,112
utf_8
4724760baae794a880b83a1a3ef43965
// { 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
chromium
friend35
.C
native_client/nacl-gcc/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
chromium
parms1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/parms1.C
435
utf_8
98e623a44647fcd383fe6c264bcafea1
// { dg-do run } // Testcase for use of template parms as types for other template parms. template <class T, T t> class A { T a; public: A(): a(t) {} operator T () { return a; } }; template <class S, S s> class B { A<S,s> a; public: B(A<S,s>& b): a(b) {} operator S () { return a*20; } }; i...
google
chromium
memtemp77
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp77.C
483
utf_8
5d98c7e0c879b48ad8380fe828229d97
// { dg-do run } extern "C" int strcmp(const char*, const char*); template <class T> struct S3 { template <class U> static const char* h(U); }; template <> template <> const char* S3<double>::h(int) { return __PRETTY_FUNCTION__; } template <> template <> const char* S3<char>::h(int) { return __PRETTY_FUNCTION__...
google
chromium
tiemann1r
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/tiemann1r.C
111
utf_8
50dc4935fd4767c5498d475789c47408
// { dg-do assemble } struct bs_1 { typedef int (*p_user_hashf)(int); }; bs_1::p_user_hashf i_user_hashf;
google
chromium
friend10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/friend10.C
267
utf_8
f42ef8c7b2cef5c1709cba71199b5d77
// { dg-do run } template <class T> void f(T); template <class U> class C { template <class T> friend void f(T) { C<U> c; c.i = 3; } public: void g() { f(3.0); } int i; }; int main() { f(7); C<double> c; c.g(); }
google
chromium
spec41
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/spec41.C
243
utf_8
cad9794eab82bd6f8f2d29e8df55bda4
// { dg-do assemble } // Bug: Specialization of implicitly created function should be // rejected. template<class T> class blah{}; blah<char>::blah(){} // { dg-error "" } invalid specialization int main(){}
google
chromium
t04
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t04.C
201
utf_8
b50c701134c37b321e4a69d0c58403cc
// { dg-do assemble } template <class A> class B { public: A a; }; static B<int> b_int; static B<char> b_char; static B<unsigned char> b_uchar; int foo () { return b_int.a + b_char.a + b_uchar.a; }
google
chromium
t29
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t29.C
228
utf_8
54e47e28f776181981b3f04a07edc35a
// { dg-do assemble } 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
chromium
crash44
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash44.C
218
utf_8
a69d4126135230851c76a71f97b39819
// { dg-do assemble } template <class T> struct S { template <class U> friend S<U>; // { dg-error "" } friend must use tag }; template struct S<int>;
google
chromium
lookup9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/lookup9.C
187
utf_8
8c797dc59b9303d1a902aa6710560044
// { dg-do assemble } struct B { int m; }; template< class T > void q( T& t ) { t.T::m=1; } void f() { B b; b.B::m=1; q( b ); }
google
chromium
deduct2
.C
native_client/nacl-gcc/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
chromium
crash66
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash66.C
650
utf_8
1a9c4871548707b67769bd59919e484e
// { dg-do assemble } // // Bug 2525. We ICEd when a namespace scope template was erroneously // given as a base member init. namespace N1 { template<typename T> struct B { B (T); }; template<typename T> struct D : B<T> { D (T r) : B (r) // { dg-error "" } no field named B {} }; ...
google
chromium
decl4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/decl4.C
224
utf_8
bb80eeb4577bc0be3bc12a6e2efd2bef
// { dg-do assemble } typedef std::vector<int>::iterator iter; // { dg-error "" } syntax error before `::'
google
chromium
local2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/local2.C
175
utf_8
ecde9e102937ee809f8b67e5efbae236
// { dg-do run } extern "C" void abort(); template <class T> void f(T) { struct S { int i; } s; s.i = 3; if (s.i != 3) abort(); } int main() { f(7); }
google
chromium
instantiate6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C
416
utf_8
1130999e39b9899091bf14b629a2f610
// { dg-do link } // { dg-options "-frepo" } // { dg-require-host-local "" } // Build then link: template <class T> class foo{ public: void g(); void h(); }; template <class T> void foo<T>::g() { h(); } template <class T> void foo<T>::h() { } int main() { foo<int> f; f.g(); } // { dg-final { cleanup-repo-file...
google
chromium
t34
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t34.C
202
utf_8
b0bd1180be5ac11fdc14fa8adc5618cf
// { dg-do assemble } template <class X> struct A { int operator [] (int); }; template <class Y> int A<Y>::operator[] (int j) { return j * j; } extern A<void **> avpp; int q () { return avpp[99]; }
google
chromium
crash24
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash24.C
227
utf_8
44226c6ee5a09a6e2641782f88d1b326
// { dg-do assemble } template<typename T, template <class> class U> void template_fn (T); template<typename T> void callme ( void (*)(T)); template<typename T> struct S1; int main() { callme(&template_fn<double, S1>); }
google
chromium
t03
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t03.C
156
utf_8
001ca48f810669a44c356cc1b8ad9db2
// { dg-do assemble } template <class A> class B { public: A a; }; static B<int> b_int; static B<char> b_char; int foo () { return b_int.a + b_char.a; }
google
chromium
memtemp33
.C
native_client/nacl-gcc/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
chromium
friend46
.C
native_client/nacl-gcc/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
chromium
crash4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash4.C
178
utf_8
afe8ec8e9a353fb58c292fe0888627c5
// { dg-do assemble } template <unsigned rank> class Tensor { }; template <unsigned rank> class Tensor<2> : Tensor<rank> { // { dg-error "" } template parameters not used };
google
chromium
t14
.C
native_client/nacl-gcc/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
chromium
memtemp31
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp31.C
198
utf_8
ff2e1e306c99266ec1c5e0c8fd28f834
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); struct S { template <class U> void g(U u) { this; } }; int main() { S s; s.g(3); }
google
chromium
enum5
.C
native_client/nacl-gcc/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
chromium
typename12
.C
native_client/nacl-gcc/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
chromium
explicit34
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit34.C
262
utf_8
ea4de1514c6917f7a0d794c7c7c9844e
// { dg-do assemble } // { dg-options "-fshow-column" } // GROUPS passed templates template <class T> void foo(T t); template <> void foo(int) {}; // { dg-error "6:previously declared here" } template <> void foo<int>(int) {} // { dg-error "6:redefinition" }
google
chromium
memtemp73
.C
native_client/nacl-gcc/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
chromium
explicit32
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit32.C
197
utf_8
a8aa5392322852bedda84a7e946a8c38
// { dg-do assemble } // GROUPS passed templates template <class T> struct S { }; template <> struct S<int> { void foo(); }; void S<int>::foo() { } void bar() { S<int> si; si.foo(); }
google
chromium
explicit65
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit65.C
363
utf_8
eb933f81dcd66316a1f88bca5cc66d82
// { dg-do run } extern "C" void abort (); template <class T> void f () { abort (); } template <> void f<char> () { abort (); } template <class T> void f (int) { abort (); } template <> void f<char> (int) { } template <class T> class C { friend void f<char> (int); public: void ff () { f<char> (0); }...
google
chromium
ttp17
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp17.C
363
utf_8
963f18e46e5f9f4e89f16a33a2900a71
// { 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,E> d2; return d2.g...
google
chromium
typename4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/typename4.C
381
utf_8
95a1f95a27b94a2bbc535e18d2fea581
// { dg-do assemble } // { dg-options "-Wno-deprecated" } template <class T> struct A { typedef T A_Type; }; template <class U> struct B : public A<U> { }; template <class U> struct C : public B<U> { A_Type Func(); // { dg-error "does not name a type" } implicit typename }; template <class U> C<U>::A_Type C...
google
chromium
lookup2
.C
native_client/nacl-gcc/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
chromium
crash53
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash53.C
177
utf_8
9a724df4741a6fe90242a34a989f24e6
// { dg-do assemble } struct S { }; S g (); template <class T> void f () { const S& s = g (); } template void f<int>();
google
chromium
ptrmem9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ptrmem9.C
169
utf_8
abb79ef912e0e96abdb5a966b3df11bb
// { dg-do assemble } struct A; template <class T> void f (void (A::* const)(T)) {} void (*p)(void (A::* const)(int)) = f;
google
chromium
instantiate1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/instantiate1.C
346
utf_8
80c08f8b43302e8c0fb233e29218ede3
// { dg-do assemble } template <class T> void f(T t) {} template void f<int>(int); template void f<>(long); template <class T> struct S { void bar(int) {} template <class U> void baz(U u) {} }; template struct S<char>; template void S<int>::bar(int); template void S<double>::baz<short>(short); template v...
google
chromium
partial1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/partial1.C
401
utf_8
709717334255f3a6d05461e494b17891
// { dg-do run } template<class T_type, int N> class foo { public: enum bar { z = 0 }; }; template<int N> class foo<double, N> { public: enum bar { z = 1 }; }; template<class T_type> class foo<T_type, 2> { public: enum bar { z = 2 }; }; int main() { if ((foo<int,3>::z == 0) && (foo<double,3>::z == 1) ...
google
chromium
decl1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/decl1.C
440
utf_8
7ff13cbadc027cf3969e195ccccf78aa
// { dg-do assemble } struct S { template <class T> int f(T), g(T); // { dg-error "" } more than one declarator }; template <class T> void x(T), y(T); // { dg-error "" } more than one declarator template <class T> struct S2 { static int i, j; // OK. }; template <class T> int S2<T>::i, S2<T>::j; // { dg-error...
google
chromium
typedef4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/typedef4.C
237
utf_8
71a2c13ad42702533a6f21d43d2049d5
// { dg-do assemble } struct B1 { typedef int X; }; struct B2 { typedef int X; }; template <class T> struct D : public B1, public B2 { typedef int X; }; template struct D<int>;
google
chromium
memtemp72
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp72.C
197
utf_8
2064173d94827c41a431f024cee9d82a
// { dg-do assemble } template<class P> struct B { template<class T> void f(T& t) { t = T(); } }; enum ptype { t1, t2}; struct D : public B<ptype> { void g(double& d) { f(d); } }; D d;
google
chromium
memtemp71
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp71.C
110
utf_8
8b399162a70095f581a5d181e9cd51e2
// { dg-do assemble } class A { template<class T>T epsilon; // { dg-error "" } invalid member template };
google
chromium
memtemp67
.C
native_client/nacl-gcc/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
chromium
t40
.C
native_client/nacl-gcc/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
chromium
explicit26
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit26.C
178
utf_8
ff484f1d424746014d1bcf8bf7f8a1b1
// { dg-do link } // GROUPS passed templates template <class T> int foo(T t) { return 1; } template <> int foo(int i) { return 0; } int main() { (int (*)(int)) &foo<int>; }
google
chromium
array6
.C
native_client/nacl-gcc/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
chromium
explicit51
.C
native_client/nacl-gcc/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
chromium
spec19
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/spec19.C
127
utf_8
20894f40e5d69e5aae0b8e042159c827
// { dg-do assemble } template<class T> T f(T o) { return o; } template<> int f(int o) { return o; } template int f(int);
google
chromium
unify2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/unify2.C
276
utf_8
bf884302d62e4009612a7e93dd7f10df
// { dg-do assemble } template <class T> struct S { typedef T S_Type; }; template <class T> void foo(typename S<T>::S_Type) { } template <class T> void foo(T) { } struct S2 {}; void bar() { foo(S2()); // We can't unify with the first foo, so we get the second. }
google
chromium
spec8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/spec8.C
227
utf_8
3612c391a5a866716ef9cd0a70802bfe
// { dg-do run } extern "C" void abort(); template <void* P> void f(int j); template <int I> void f(int j); template <void* P> void f(int j) { abort(); } template <int I> void f(int j) { } int main() { f<3>(7); }
google
chromium
parse2
.C
native_client/nacl-gcc/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
chromium
t00
.C
native_client/nacl-gcc/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
chromium
goto
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/goto.C
120
utf_8
7d17efe21e893f6a4b70fab91215dc54
// { dg-do assemble } template<class T> void compute(T) { goto Exit; Exit: ; } int main() { compute(0); }
google
chromium
deduct7
.C
native_client/nacl-gcc/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
chromium
tt2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/tt2.C
362
utf_8
cad9d7dbca50e29c77f796d1e03c0a8b
// { dg-do assemble } int f1 () { struct A { A() : b (2) { } int fred () { return b.hi_mom; } struct B { int hi_mom; B (int a) { hi_mom = a; } }; B b; }; A aa; return aa.fred(); } int f2 () { struct A { ~A() { a = 3; } int a; int fred () { return a + 1; } }; ...
google
chromium
ttp6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp6.C
137
utf_8
630345194d6b34b47811923d89376ea6
// { dg-do run } template<int> class F { }; template<template<int> class D,class E> class C { D<1> d; }; int main() { C<F,int> c; }
google
chromium
ttp60
.C
native_client/nacl-gcc/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
chromium
friend38
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/friend38.C
325
utf_8
25728cd1922b24f7061261700cacef93
// { dg-do assemble } template<class P, class Q> struct foo { typedef P parent_type; friend parent_type; // { dg-error "" } template parameters cannot be friends friend Q; // { dg-error "" } template parameters cannot be friends };
google
chromium
defarg8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/defarg8.C
472
utf_8
e9e4ffab1856eb43275fed8552ccdd51
// { dg-do assemble } // Default arguments containing more than one non-nested explicit // template argument leads to parse error // This might be ill formed. See DR 325 (one proposed resolution is to make // it so) template <class T> class foo1; template <class T, class U> class foo2; struct bar { template <cla...
google
chromium
t24
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t24.C
148
utf_8
a0067eafe5ab9c011aacc6badd3420ea
// { dg-do assemble } // { dg-options "" } template <class X> int f (X x, X y) { return 23; } int foo () { return f (7); // { dg-error "" } }
google
chromium
spec15
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/spec15.C
599
utf_8
2f8e3ba39b62e7596b8074418d5931ca
// { dg-do run } extern "C" void abort(); template <class T> struct S1 { static void f(); }; template <> void S1<int>::f() {} struct S2 { template <class T> static void g(T); }; template <> void S2::g(double) {} template <> void S2::g<int>(int) {} template <class T> struct S3 { template <class U> stati...
google
chromium
spec40
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/spec40.C
439
utf_8
9032596d62c4af42055e4c705300a122
// { dg-do run } // More from bug 1617. We didn't resolve partial ordering properly. The // std is rather vague about it anyway, DR 214 talks about this. template <typename T> int Foo (T const *) {return 1;} template <unsigned I> int Foo (char const (&)[I]) {return 2;} int main () { return Foo ("a") != 2; }
google
chromium
ttp24
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp24.C
247
utf_8
01feee6c104db689f628b2499f63542f
// { 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> int f() { D<E> d; return d.f(); } int main() { f<D,int>(); f<D,char>(); }
google
chromium
t37
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t37.C
257
utf_8
afccb64f42e87f045abab9cb26c0647d
// { dg-do assemble } class A { // { dg-error "" } synthesized copy ctor public: A(int); // { dg-error "" } referenced below A(float); // { dg-error "" } referenced below ~A(); }; A::A() { // { dg-error "" } } A::A(int) { } A::~A() { }
google
chromium
local1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/local1.C
354
utf_8
faad4b7453073f9f2fd7194dd4af782a
// { dg-do run } template <class STRUCT, class MEMBER> inline STRUCT * setback(MEMBER *bp, MEMBER STRUCT::*offset) { if(!bp) return 0; union { int i; MEMBER STRUCT::*of; } u; u.of = offset; return (STRUCT *) ((__SIZE_TYPE__) bp - u.i); } struct S { int i; }; int main() { S s; ...
google
chromium
friend45
.C
native_client/nacl-gcc/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;