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
crash61
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash61.C
406
utf_8
be61b4f9c204928b91f812a20e086e44
// { dg-do assemble } // Source: Neil Booth, from PR # 106. 4 Dec 2000. template <bool b> class bar { }; class A_a { public: static const bool b = true; }; class B_b { public: static const bool b = false; }; template <class A, class B> class foo { }; template <class A, class B> bar<(A::b || B::b)> do_fu...
google
chromium
t06
.C
native_client/nacl-gcc/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
chromium
crash40
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash40.C
298
utf_8
536d144e5eab0baecffc0286597ddea1
// { dg-do assemble } template< class X > struct VB: public virtual X {}; template< class MOPTerm1, class MOPTerm2 > struct MOPTermUnify { struct MO: public VB<MOPTerm1>, public VB<MOPTerm2> { void fix() { } }; };
google
chromium
ttp20
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp20.C
327
utf_8
2c207ca3761392c64a1f955fbf76311e
// { dg-do run } template<class T> class D { public: int f(); }; template<class T> int D<T>::f() { return sizeof(T); } template<template<class> class D,class E> class C : D<E> { public: int g(); }; template<template<class> class D,class E> int C<D,E>::g() { return this->f(); } int main() { C<D,int> c; c....
google
chromium
ttp34
.C
native_client/nacl-gcc/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
chromium
t35a
.C
native_client/nacl-gcc/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
chromium
explicit38
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit38.C
125
utf_8
0cc59787506973953d607c3b3cfbccba
// { dg-do assemble } template <int I> void f(int j); void g() { f<7, 12>(3); // { dg-error "" } no matching function. }
google
chromium
ptrmem10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ptrmem10.C
766
utf_8
cbdac9d43cfae98d351a552aad60b962
// { 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
chromium
asm1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/asm1.C
372
utf_8
9ad6c674ab6a9f9b3887f2753be55e8e
// { dg-do assemble { target i?86-*-linux* x86_64-*-linux* } } // We'd use ebx with -fpic/-fPIC, so skip. // { dg-skip-if "" { ilp32 } { "-fpic" "-fPIC" } { "" } } template<int i> int foo(int v) { __asm__ __volatile__("addl %1, %0" : "=a" (v) : "b" (i)); return v; } int bar(int i) { return foo<123>(i); }
google
chromium
memtemp89
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp89.C
340
utf_8
9e390bf90a7c130f4742ac3047c677eb
// { dg-do assemble } class Q { template<class T> class X { // { dg-error "" } Q::X private }; }; template<template<class> class XX> class Y { XX<int> x_; }; Y<Q::X> y; // { dg-error "" } instantiated from here
google
chromium
explicit23
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit23.C
225
utf_8
ff368b7934b08c23823271b831360d66
// { dg-do link } // { dg-options "-ansi -pedantic-errors -w" } // GROUPS passed templates template <class T> int foo(T t) { return 1; } template <> int foo<int>(int i) { return 0; } int main() { return foo<int>(3.0); }
google
chromium
unify1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/unify1.C
263
utf_8
d6c8f4a2bd3eee6e10304d0f21bed927
// { dg-do assemble } // Tests non-unification of parms that don't use template parms. enum kind {a, b}; class C { public: C () {} }; template<class P> void f (P c, kind k) {} template<class P> void f (P c, P d, kind k) {} template void f (C c, C, kind k);
google
chromium
conv2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/conv2.C
223
utf_8
9275b4addba7abf9dad17529be1ea6d3
// { dg-do assemble } template<class T> class A { public: operator const T*() const; const T* cast() const; }; template<class T> const T* A<T>::cast() const { return operator const T*(); } template class A<char>;
google
chromium
inject2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/inject2.C
245
utf_8
2561cc9788102a262f6b817b51c51ea8
// { dg-do assemble } // { dg-options "-Wno-non-template-friend" } template<int I> class C { friend void f(struct X *); }; template class C<0>; class D { friend void f(struct X*); };
google
chromium
memtemp98
.C
native_client/nacl-gcc/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
chromium
crash15
.C
native_client/nacl-gcc/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
chromium
memtemp25
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp25.C
269
utf_8
1e75e85c15d51caa86b1f88f913409c0
// { 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) { printf ("%d\n", sizeof (U)); } int i[4]; }; int main() { S<char*> s; s.f(3); s.f(s); }
google
chromium
typename7
.C
native_client/nacl-gcc/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
chromium
memtemp17
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp17.C
391
utf_8
0e2cbe2d453069ac1c8a7d096cbd1e68
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); template <class V> struct S { template <class T, class U> S(T, U, T); }; template <class V> template <class T, class U> S<V>::S(T t1, U u1, T t2) { printf("Hello, world.\n"); } int main() { S<int> s1(3, "...
google
chromium
friend5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/friend5.C
144
utf_8
fa9d23d193f4b405787db50998ee1850
// { dg-do run } class C { template <class T> friend void f(T) { C c; c.i = 3; } int i; }; int main() { f(7); }
google
chromium
crash10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash10.C
288
utf_8
ea448308ef445f8821315bbe5dfaaefc
// { dg-do assemble } template<int M, int N> class GCD { public: enum { val = (N == 0) ? M : GCD<N, M % N>::val }; // { dg-warning "division" "division" } // { dg-error "not a valid" "valid" { target *-*-* } 6 } }; int main() { GCD< 1, 0 >::val; // { dg-message "instantiated" } }
google
chromium
memtemp35
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp35.C
233
utf_8
ec27f665d21ce7ab16a07bd62e210ce5
// { dg-do assemble } // GROUPS passed templates membertemplates template <class T> struct S { S(const S& s) {} template <class U> S(S<U>& s) { S<U> s2(s); } }; extern S<int>& si; void foo() { S<char*> sc(si); }
google
chromium
crash27
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash27.C
173
utf_8
8986c1670e0c717d65ec99c78532722b
// { dg-do assemble } template<int i> int f (void) { if (__extension__ ({ 1; })) return 0; return 1; } void g (void) { f<1> (); }
google
chromium
friend9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/friend9.C
184
utf_8
54620ae07f8d0c64d61abbe14d28c5d4
// { dg-do run } template <class U> class C { template <class T> friend void f(T); int i; }; template <class T> void f(T) { C<int> c; c.i = 3; } int main() { f(7); }
google
chromium
memtemp16
.C
native_client/nacl-gcc/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
chromium
crash30
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash30.C
355
utf_8
acf4b3be0fecc691751cb7785e03caae
// { dg-do assemble } extern "C" int printf(const char *, ...); template <class T> struct A { typedef typename T::X B; // { dg-error "" } not a class A(double); }; template <class T> void xxx(typename A<T>::B); template <class T> struct B { friend void xxx<T>(T); // { dg-error "" } does not match any templa...
google
chromium
ttp56
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp56.C
517
utf_8
582b66897280ddfad16ac377519b1a22
// { dg-do assemble } template<class X> class A { }; template<class Y> class B { }; template<template<class XX> class AA> // { dg-bogus "" } `template <class XX> template <class X> class A<X>' previously declared here class C { class D { }; D d; class E : public B<D> { }; E e; }; int main() { C<A> c; // { dg-bo...
google
chromium
explicit9
.C
native_client/nacl-gcc/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
chromium
parms2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/parms2.C
758
utf_8
e36ad3d6e053eb47203e23904d6d6e3a
// { dg-do assemble } // // bug 73. We failed to compare explicit arguments for a TEMPLATE_ID_EXPR in a // TYPENAME_TYPE. struct Plus { template <class T> struct Sig { typedef int Third;}; }; template <class T> struct Ethel { typedef int WrappedType; }; struct Fred { template <class Q, class LA, class LB>...
google
chromium
explicit63
.C
native_client/nacl-gcc/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
chromium
operator1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/operator1.C
320
utf_8
f1256260eab2b60b9e6f1cb00dd7cc6c
// { dg-do assemble } struct Example { template <class U> void operator= (U); }; template <> void Example::operator=<double> (double);
google
chromium
memtemp59
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp59.C
424
utf_8
aad5f3bdb50f6977327b5b218d32526b
// { dg-do assemble } // GROUPS passed templates membertemplates template <int N> struct IndexPlaceholder {}; template <int N1, int N2, int N3> struct ArrayIndexMapping {}; template <class T_numtype, int N_rank> struct Array { template<int N0, int N1> ArrayIndexMapping<N_rank, N0, N1> f(IndexPlaceholder<N0>, ...
google
chromium
explicit59
.C
native_client/nacl-gcc/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
chromium
ttp10
.C
native_client/nacl-gcc/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
chromium
crash46
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash46.C
245
utf_8
3b631ecc19c47b91272ae4beb1e49b20
// { dg-do assemble } class AA { protected: template <class T> struct BB { T x; BB(const T &x) : x(x) { } }; template <class T> struct CC : public BB<T> { CC(const T &x) : BB<T>(x) { } }; };
google
chromium
spec13
.C
native_client/nacl-gcc/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
chromium
spec33
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/spec33.C
282
utf_8
68df4c1c06ed2c04200d90b294704422
// { dg-do link } class A { public: template <class T> A(T x, bool y = false); }; template <class T> A::A(T, bool) { } template <> A::A(char, bool) { } int main() { int b; char c; A x(b); A z(c, false); }
google
chromium
friend42
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/friend42.C
172
utf_8
540fd956d325d0aa4769600acae7c0c2
// { dg-do assemble } template <class T> struct S { template <class U> friend struct S2; }; template struct S<int>;
google
chromium
explicit55
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit55.C
172
utf_8
695a1da378b9cb5d29b4810dc64c2356
// { dg-do run } template <class T> T* create () { return new T; } template <class T> T* create2() { return create<T>(); } int main() { int *p = create2<int>(); }
google
chromium
explicit68
.C
native_client/nacl-gcc/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
chromium
inherit2
.C
native_client/nacl-gcc/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
chromium
shadow1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/shadow1.C
187
utf_8
7259c6f6b64b40712386f6548cabea8e
// { dg-do assemble } template <class T> struct S { typedef T X; class C { typedef T X; }; }; template <int I> struct S2 { enum { A = I }; void f() { int A; } };
google
chromium
eichin01b
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/eichin01b.C
403
utf_8
f5f3de616299b02e21b6229917343923
// { dg-do run } template <class X> class TC { public: X aaa; static X sss; TC(X a) {aaa = a; } TC(X a, X s) {aaa = a; sss = s; } void sz(X s) { sss = s; } void syy(X syarg) { sss = syarg; } }; template <> long TC<long>::sss = 0; template <> float TC<float>::sss = 0.0; TC<long> xjj(1,2); int main(int,ch...
google
chromium
friend40
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/friend40.C
189
utf_8
7c3b3464dfe617b8ca22b200865b00b2
// { dg-do assemble } // { dg-options "-Wno-non-template-friend" } template<class T> struct A { friend void f (); }; A<short> a; A<int> b;
google
chromium
memtemp44
.C
native_client/nacl-gcc/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
chromium
memclass7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memclass7.C
273
utf_8
4de67264651c0cd591ec8d92687a7fb0
// { dg-do run } // { dg-options "-ansi -pedantic-errors -w" } struct S { template <class U> struct Y { template <class T> void foo(T t); }; }; template <> template <> void S::Y<char>::foo<int>(int i) { } int main() { S::Y<char> s; s.foo<int>(3.0); }
google
chromium
enum12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/enum12.C
174
utf_8
71ddd0d94190c1df7e268b312cee5e5b
// { dg-do assemble } template <int I> struct S1 { }; template <class T> struct S2 { enum { x = 3 }; void f(S1<x>&); }; template <class T> void S2<T>::f(S1<x>&) { }
google
chromium
memtemp32
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp32.C
209
utf_8
c837d010beffec4b138ac83e31e887dc
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); struct S { template <class U> void g(U u) { i = 3; } int i; }; int main() { S s; s.g(3); }
google
chromium
defarg10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/defarg10.C
225
utf_8
07ca97ef4fcf85ee32103d562a5667ab
// { dg-do assemble } struct A {}; template<class M, class T = A, class C> class Tc {}; // { dg-error "" } no defarg int main () { Tc<int> oops; // { dg-error "" } using template }
google
chromium
ttp29
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp29.C
380
utf_8
88555227089654b7519e701bc3b6f621
// { dg-do run } template<class T> class D { public: int f(); }; template<class T> int D<T>::f() { return sizeof(T); } extern "C" void abort(); template<template<class> class D,class E> class C { D<E> d; public: int f() { abort(); return 0; } }; template<class E> class C<D,E> { D<E> d; public: int f(...
google
chromium
memtemp12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp12.C
161
utf_8
c49d75255634dd1d38c00b4ccd12186f
// { dg-do assemble } // GROUPS passed templates membertemplates template <class T> struct S { template <class U> void foo(U); }; void f() { S<int> s; }
google
chromium
instantiate2
.C
native_client/nacl-gcc/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
chromium
explicit78
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit78.C
414
utf_8
a0032889c996056c4231f106c2bfc43d
// { dg-do assemble } template <int I> struct A { }; template <int I, int J> struct B { operator A<3> (); operator B<3, 7> (); }; template <int I, int J> void f(B<I, J>); template <int I> void f(A<I>) { } int main() { // Deduction fails with the first `f'. Since `3' is explicitly // specified, we don't ...
google
chromium
enum2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/enum2.C
217
utf_8
c1dd17dce0fa19e95a8a2c79c6a1d90b
// { dg-do assemble } struct U { static int STATIC; }; template <int* x> class FOO { public: enum { n = 0 }; }; template <class A> class BAR { public: enum { n = FOO<&A::STATIC>::n }; }; int n = BAR<U>::n;
google
chromium
friend47
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/friend47.C
334
utf_8
7c69d10be073a85966d0fe1737fbf230
// { dg-do assemble } // Bug 1033. We ICE'd when trying to make a non template class a templated // friend. class A {}; class B { template<class T> friend class A; // { dg-error "" } not a template };
google
chromium
t13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t13.C
213
utf_8
529d83fc81378eb5042bacfe331e7873
// { dg-do assemble } template <class A> class B { public: B(); A a; int i; }; void *f () { return new B<char *>; } struct foo { int i[10]; }; extern B<foo> *foop; void f2 () { foop = new B<foo>; }
google
chromium
spec32
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/spec32.C
162
utf_8
0d5a7ee59e13d34e0cacef3333c95393
// { dg-do assemble } template<class T1, class T2> class foo; template<class T> struct foo<T,typename T::bar>;
google
chromium
spec36
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/spec36.C
1,319
utf_8
26f197ce8b46e51c044d5b32830ec0ff
// { dg-do run } // Bug 1617. We didn't resolve partial ordering properly. The std is rather // vague about it anyway, DR 214 talks about this. extern "C" int puts (char const *); template <typename T> int Foo (T *) {puts (__PRETTY_FUNCTION__); return 1;} template <typename T> int Foo (T &) {puts (__PRETTY_FUNCTION__)...
google
chromium
overload1
.C
native_client/nacl-gcc/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
chromium
enum
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/enum.C
261
utf_8
d40150664de8eb0bbab1f8ae93675776
// { dg-do assemble } // GROUPS passed enums template<class T> struct templ { enum { val = 0 }; }; struct Foo { enum { bar = 0, len = templ<int>::val }; }; void func() { int s = Foo::bar; // Ensure that expansion of templ did not erase bar }
google
chromium
expr8
.C
native_client/nacl-gcc/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
chromium
array1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/array1.C
100
utf_8
0a61a52254c1e3a2b526ab1a815a4328
// { dg-do assemble } char *stuff() { char array[10]; // { dg-warning "" } return array; }
google
chromium
template3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/template3.C
699
utf_8
d3aa332b02a50a2c976fd3acd8f16058
// { dg-do assemble } // prms-id: 9979 template < class Referencee > class Referencer { public: Referencer() {} }; template <class T> class List { public: List() {} }; template<class T, class KEY> class Dictionary { public: Dictionary() : i_buckets (new List<T>[1234]) {} ~Dictionary() { delete [] i_...
google
chromium
delete1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/delete1.C
352
utf_8
e43a987d5f329395c6204f18e61bf3d7
// { dg-do run } // prms-id: 7330 #include <stddef.h> int size = 0; struct X { int x; void *operator new[](size_t sz) throw() { size = sz; return 0; } void operator delete[] (void *vp) { ::operator delete(vp); } }; int main() { X (*px) [10]; px = new X[5][10]; ...
google
chromium
case1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/case1.C
199
utf_8
8056dcfa8917dfb2a0e8d121205bf105
// { dg-do assemble } // prms-id: 9028 class Foo; int main() { int i=0; switch (i) { case ((Foo *)0): // { dg-error "" } case ((Foo *)1): // { dg-error "" } break; } }
google
chromium
static1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/static1.C
148
utf_8
8a5844fd85b143ac9bd9023567daf7b5
// { dg-do assemble } class A { public: static int a; }; class B : public A { public: static int b; }; int B::a; // { dg-error "" }
google
chromium
friend1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/friend1.C
89
utf_8
2f188fa554c65d209a21f12ca8a60494
// { dg-do assemble } class C { public: static friend int f(); // { dg-error "" } };
google
chromium
extern_C
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/extern_C.C
95
utf_8
5ee897a497e0e7fff1e9152d9a6d4fed
// { dg-do assemble } extern "C" { class A { public: void a(); }; } void A::a() {}
google
chromium
template4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/template4.C
250
utf_8
aeb5818b98767c6df0e85e3dd85f0da7
// { dg-do run } // prms-id: 10166 template <class A> class B { public: int f() { for(int x=0;x<10;x++) { continue; return 1; } return 0; } private: A w; }; int main() { B<int> c; return c.f(); }
google
chromium
packed1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/packed1.C
226
utf_8
50764f255f496da7ca7c46c49a36a323
// { dg-do run } int main() { struct s { int a; short b; } __attribute__((packed)) t; if (sizeof (t) != (sizeof(int)+sizeof(short))) { return 1; } else { return 0; } }
google
chromium
inherit1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/inherit1.C
345
utf_8
6381324057bf382a0e9584c5fcc52260
// { dg-do assemble } class A { char str[10]; public: char* m1 () { return str;} }; class C : public A { public: }; class B : public A { public: char* m1 () { C::m1(); return ""; } // { dg-error "cannot call" } // { dg-warning "deprecated" "depr" { target *-*-* } 14 } }; int main () { A a; B b; C c; a...
google
chromium
nested1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/nested1.C
163
utf_8
da80b7e97d4e9ee67decc3ead64065ff
// { dg-do assemble } struct A { struct B { typedef long T; int i; }; }; struct C { struct B { typedef float T; int i; }; }; C::B::T a;
google
chromium
template2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/template2.C
791
utf_8
320f3eae6dc6bbd5aa64e7a285f758f7
// { dg-do assemble } // prms-id: 10046 template <class T> class Array { public: T const & operator[] (int i) const; }; class Referenceable {}; template < class Referencee > class Referencer { public: operator Referencee *() const { return i_referencee; } protected: Referencee* i_referencee; }; class S...
google
chromium
incomplete-cast1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/incomplete-cast1.C
370
utf_8
779ab9435dff9dfb3a118872034a5aaa
// { dg-do assemble } // prms-id: 5274 class VHDLIdentifier; class VHDLPackageProtoRep { public: int thing(); private: virtual VHDLIdentifier &actual_name() ; }; extern void form(const char *format, ... ); int VHDLPackageProtoRep::thing() { form("package `%s'", (char *)actual_name()); // { dg-error "" } c...
google
chromium
array2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/array2.C
89
utf_8
4814bbc47b79f5ea9993897987c92f2e
// { dg-do assemble } extern const int a[]; extern const int a[]; extern const int a[];
google
chromium
cond1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/cond1.C
666
utf_8
98963d688b2d53c91b4029129c2fab7a
// { dg-do assemble } // prms-id: 9866 class TChar { public: explicit inline TChar(unsigned int aChar); inline operator unsigned int() const; private: unsigned int iChar; }; inline TChar::TChar(unsigned int aChar) : iChar(aChar) {} inline TChar::operator unsigned int() const {return(iChar);} c...
google
chromium
template1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/template1.C
483
utf_8
07128f5cc8798df78f430904baa475f2
// { dg-do assemble } // prms-id: 10038 template < class Referencee > class Referencer { public: Referencer (Referencee const * pReferencee); }; template <class T> class Array { public: int addElement (T const & e); int addElement (); }; class ScenarioGroup; class ScenarioSet : public Array< Referencer<...
google
chromium
protected1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/protected1.C
452
utf_8
60348e5e92f6eabe517fbf0fe4c86b01
// { dg-do assemble } class A { public: int i; A(int j) : i(j){} }; class B : protected A { public: B(int j) : A(j){} void f(){ A k(*this); } }; class C : protected B { public: C(int j) : B(j){} void f(); void g(){ A k(i); } }; class D : public C { public: D(int w) : C(i) {} void ...
google
chromium
inherit2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bob/inherit2.C
413
utf_8
b14458ab0624e60edbfb3778dc9c585f
// { dg-do assemble } #include <stdlib.h> class A { public: void z(); A(void) {} private: A(const A &) { abort(); } // { dg-error "private" } const A& operator =(const A &) { abort(); } }; class B : public A { // { dg-error "within" } public: B(void) {} }; void f(B b) { } void g() { B h; f(h); // { ...
google
chromium
ns1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns1.C
204
utf_8
12c3557fbe98239f95e9be8ad07692de
// { dg-do run } namespace foo{ int eine_funktion(int) { return 0; } int eine_funktion(int,int) { return 1; } } int main(int,char**) { return foo::eine_funktion(1); }
google
chromium
using5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/using5.C
125
utf_8
153674baa1aaa794e45086f74ebc1719
// { dg-do assemble } namespace a { class b { using std::c; //{ dg-error "" } namespace using on class level }; }
google
chromium
koenig8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/koenig8.C
291
utf_8
cd857848d7724ef9eb3c2c50f4897375
// { dg-do assemble } // caused an ICE determining whether to perform Koenig lookup // when checking is enabled template<class T> void Zap (T); void V3 () { Zap (1); }
google
chromium
ns12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns12.C
208
utf_8
eb31b0947da8881be39e7a024d7a729f
// { dg-do run } namespace fred { int barney(); extern int wilma; } int fred::barney() { return fred::wilma; } int fred::wilma; int barney() { return 1; } int main() { return fred::barney(); }
google
chromium
ns17
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns17.C
116
utf_8
e0503518569255a591c3fcca225a6f8f
// { dg-do assemble } namespace foo { class c { }; } int foo::c:fn () // { dg-error "" } syntax error { }
google
chromium
overload4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/overload4.C
121
utf_8
cc53a89f144459e878c2fc27cb7cd750
// { dg-do assemble } namespace A{ void f(); } using A::f; void f(); // { dg-error "" } duplicate declaration
google
chromium
ns5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns5.C
60
utf_8
557768ccdda273c39a1385dffc6aa700
// { dg-do assemble } namespace X{ class Y{}; } X::Y z;
google
chromium
crash2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/crash2.C
232
utf_8
3a95064d597c5a12f6a8fbcb78c86a9f
// { dg-do assemble } namespace hei { class CSomeClass {}; extern CSomeClass SomeClass; } hei::CSomeClass hei::CSomeClass; // { dg-error "" "" { xfail *-*-* } } should be hei::SomeClass -
google
chromium
template3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template3.C
272
utf_8
5621c68204abd0c2c17fd2fdee5ff97a
// { dg-do run } //Check instantiation of templates outside their namespace namespace A{ template <class T>void g(){} template <class T> struct B { B(){ f(); } void f() { g<T>(); } }; } template class A::B<int>; A::B<int> s; int main() { return 0; }
google
chromium
scoped1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/scoped1.C
472
utf_8
f96f046ae42a16ff9abb1cb64171b3ce
// { dg-do assemble } // // Bug 354. We ICE'd before saying a namespace isn't an aggregate type. namespace mlp { struct base { void reset (); }; } struct eo : mlp:: base { }; void foo (eo &ref) { ref.mlp::base::reset (); ref.base::reset (); ref.reset (); ref.mlp::reset (); // { dg-error "" } ...
google
chromium
koenig4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/koenig4.C
225
utf_8
627c546ae03053e235bd919cd22bc376
// { dg-do run } void f(); void f(int); namespace A{ struct S{ void f(); void f(S); }; void f(S&){} void h(S&){} } template<class T> void g(T t){ f(t); } int main() { A::S s; f(s); g(s); h(s); }
google
chromium
ns18
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns18.C
375
utf_8
b8b0fe060e50229aafa1ec35c4033669
// { dg-do assemble } namespace Bname { class B; } template <class T> class A { friend class Bname::B; static const int a = 1; public: A() { } }; namespace Bname { class B { int a; public: template<class T> B(const T&):a(T::a) { } }; } int main() { A<int> a; Bname::B b(a); }
google
chromium
invalid1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/invalid1.C
243
utf_8
89941597be39f2078ede1d0b9fc6f061
// { dg-do assemble } namespace x { } void f(int); int main() { x(); // { dg-error "" } calling a namespace x=4; // { dg-error "" } assigning to a namespace f(x); // { dg-error "" } passing a namespace as parameter }
google
chromium
crash3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/crash3.C
138
utf_8
09eaee0c15c01d4ecc5f7f840db179fd
// { dg-do assemble } namespace N { template <class T> struct S; } void f() { N::S(); // { dg-error "" } invalid use of template }
google
chromium
alias7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/alias7.C
122
utf_8
5fe86212645da2b58490150f55889487
// { dg-do assemble } namespace A{ namespace B{int i;} using namespace B; } namespace C=A; void f(){ C::i = 1; }
google
chromium
template6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template6.C
582
utf_8
8f3f01d9a9a8f5fdba3934718e292dbc
// { dg-do assemble } namespace A { namespace B { template <class T1,class T2> struct B { static const unsigned count = 0; template <class ForwardIter> void SetError(ForwardIter it,const T1& p1,const T2& p2) const { } }; template <> ...
google
chromium
template5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template5.C
421
utf_8
442e49475c9a00e4cbed4344561a2788
// { dg-do run } //Check whether namespace-scoped template instantiations //are mangled differently. namespace X{ template<class T> struct Y{ int f(T){ return 1; } template<class X>void g(){} }; } template<class T> struct Y{ int f(T){ return 2; } }; int main() { X::Y<int> z; if (z.f(...
google
chromium
friend1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/friend1.C
91
utf_8
1ac4f8617c42fa9ac34245cdbdf20c7d
// { dg-do assemble } namespace A{ void f(int); } class X{ friend void A::f(int); };
google
chromium
template12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/template12.C
355
utf_8
09d89e1d6a0ce7924dfddbbec1198053
// { dg-do assemble } // Templates can be defined outside of the namespace if the have been declared // inside namespace bar { template <typename T> T const foo(T const &); template<> const int foo<int>(int const &); } template <typename T> T const bar::foo(T const &a) { return a; } template<> const int bar:...
google
chromium
ns2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/ns2.C
278
utf_8
6c46a063049be9ddf8a77c067c0a9b0f
// { dg-do run } namespace foo{ struct X{ int i; void f(); static int k1,k2; }; void X::f(){} int var; int X::k1; } using namespace foo; X zzz; int X::k2; void andere_funktion() { zzz.f(); var=4; } int main(int,char**) { andere_funktion(); return 0; }
google
chromium
using10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.ns/using10.C
156
utf_8
b45aaba13f8b63e19c0b611e64f6867b
// { dg-do assemble } template<class> class foo{}; namespace ABC { using ::foo; }