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
crash48
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash48.C
146
utf_8
d074aa627e88ef4cee6ecc88d370b805
// { dg-do assemble } template<class T> void foo(T *data) { ((char *)data)->~T(); }
google
chromium
deduct1
.C
native_client/nacl-gcc/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
chromium
eichin01a
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/eichin01a.C
367
utf_8
5c9ac24285bce54d4230b3f47a4e03b1
// { 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; } }; template <> long TC<long>::sss = 0; template <> float TC<float>::sss = 0.0; TC<long> xjj(1,2); int main(int,char**) { TC<float> xff(9.9,3.14); ...
google
chromium
typename25
.C
native_client/nacl-gcc/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
chromium
cond2
.C
native_client/nacl-gcc/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
chromium
expr5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/expr5.C
166
utf_8
33bb4f80f7a5c24d5679b2923c5670d5
// { dg-do assemble } template <class T, int i> struct S1; template <class T, int i, int j> struct S2 { typedef typename S1<T, (i >= j ? 0 : 1) >::type type; };
google
chromium
memclass20
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memclass20.C
288
utf_8
7e7e4c8c8a3541a7ae94eff831f235bb
// { dg-do assemble } template <class X, class Y> struct S{}; template <class X> struct S<int, X> { template <class W> struct I {}; }; template <class T> void f() { typename S<T, T>::template I<T> si; } template void f<int>();
google
chromium
t30
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t30.C
244
utf_8
51cc8731024011463ae200a3ff582412
// { dg-do assemble } template <class X, int n> X f (auto X (*x)[n]) { return (*x)[n/2]; } extern int i[30], i2[33]; extern double d[99]; int foo (int ii) { return f (&i) + f(&i2); } // causes abort double foo (double dd) { return f (&d); }
google
chromium
virtual3
.C
native_client/nacl-gcc/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
chromium
t12a
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t12a.C
98
utf_8
9ef5be0611dbb2e8f35161b175a47fc4
// { dg-do assemble } int a (void * x) { return 1; } typedef void *T; int b (T x) { return 2; }
google
chromium
explicit82
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit82.C
425
utf_8
4be526353ade77179b9091ca5fdb9cf1
// { dg-do assemble } // Bug 508. We failed to set/clear lastiddecl appropriately for // operator names. struct A {}; template <typename N> void foo (A, int); template <typename N> void operator<< (A, int); int main() { A a; operator<< <bool>(a, 0); foo <bool>(a, 0); }
google
chromium
ttp33
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp33.C
430
utf_8
aa0cde2e02ea719b588fe2a369e2b71a
// { 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: template<template<class> class F> int f(F<int>); }; template<template<class> class D,class E> template<template<class> ...
google
chromium
crash11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash11.C
154
utf_8
5abad4783367058ab516ca82870dc4f1
// { dg-do assemble } class A { class A_impl; public: A(){} }; template <class j> class A::A_impl // { dg-error "non-template" } { };
google
chromium
link1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/link1.C
318
utf_8
74f901046228380449ae3baeb5096fbd
// { dg-do link } template <class T> int f(T); template <class T> struct S { template <class U> friend int f(U) { return 0; } }; int k = f(2); template <class T> int g(T); int h = g(7); template <class T> int g(T) { S<T> si; return 0; } int main() { }
google
chromium
explicit17
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit17.C
418
utf_8
4cbe60932d0e94a06976d96ebe6152cc
// { dg-do assemble } // { dg-options "-ansi -pedantic-errors -w" } // GROUPS passed templates template <class T, class U> void foo(U u, T t); template <class T> void foo(T t); template <class T> struct S {}; template <class T> void foo(const S<T>&); void bar() { void (*fn)(double, int) = (void (*)(double, ...
google
chromium
enum3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/enum3.C
154
utf_8
d813a116a12ca2b98a36e5ef02510f85
// { dg-do run } struct S { enum en { s0, s1, s2 }; }; template<typename S::en e> int val( ) { return e; } int main() { return val<S::s0>( ); }
google
chromium
crash51
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash51.C
243
utf_8
be55e2194ca68fe3f42466daee65f998
// { dg-do assemble } // { dg-options "-fpermissive -w" } char foo[26]; template <class T> void f () { foo = "0123456789012345678901234"; // { dg-error "array" } } template void f<int>();
google
chromium
decl2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/decl2.C
208
utf_8
9858f161fed7cab46f56279efd868f75
// { dg-do assemble } template <class T> struct foo { foo(); }; template<class T> foo<T>::foo() {} T; // { dg-error "" } no type
google
chromium
bad-type
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/bad-type.C
220
utf_8
1adb535176b9d881aafd1bb9dc833b29
// { dg-do assemble } template<class Type> class A { public: Type m; }; template<class Type> void f(A<Type>& a, Type d) { A.m=d; // { dg-error "" } invalid use of template } int main() { A<int> a; f(a,2); }
google
chromium
explicit72
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit72.C
835
utf_8
255520dfcb827d85c254e37d553e38e1
// { dg-do assemble } // plain char, signed char and unsigned char are distinct types template <class X, class Y> struct bug {}; template <class X> struct bug<X,char> { typedef char t; }; template <class X> struct bug<X,unsigned char> { typedef unsigned char t; }; template <class X> struct bug<X,signed char> { typedef...
google
chromium
t23
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t23.C
201
utf_8
bdaa6d5c9f9696147ac816a8e0746133
// { dg-do assemble } template <class T> class temp1 { public: T tvar; }; template <class T2> class temp2 { public : temp1<T2> t1var; }; temp1<int> temp1var; temp2<int> temp2var;
google
chromium
m6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/m6.C
606
utf_8
483a399bdedfca8f3f4eef45aa1acd6a
// { dg-do assemble } struct B { struct A { A(); int a; } aa; }; B::A::A () { a = 37; } const char* xx[] = { "../tests/m6.cc:1: warning: return type specification for constructor invalid", "../tests/m6.cc:2: semicolon missing after declaration of `A'", "../tests/m6.cc:2: warning: empty declaration", "../tests/m6.cc: ...
google
chromium
ttp65
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp65.C
615
utf_8
4f7d940afd2ce812774283089291f6d6
// { dg-do assemble } // Bug: We used reject template unification of two bound template template // parameters. template <class T, class U=int> class C { }; template <class T, class U> void f(C<T,U> c) { } template <class T> void f(C<T> c) { } template <template<class,class=int> class C, class T, class U> void g(C<T,U...
google
chromium
crash14
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash14.C
136
utf_8
8362f30058de81564a32b4120b51b1d4
// { dg-do assemble } template <class T> struct A {}; template <class T> struct A<T*>; A<int*> ai; // { dg-error "" } incomplete type
google
chromium
inject1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/inject1.C
149
utf_8
df8b6fb117055d3030ac4a16e7d9652b
// { dg-do assemble } template <int I> struct S { struct T* x; }; template struct S<2>; T* t;
google
chromium
crash26
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash26.C
254
utf_8
b68c315d87c6da3200c5e40ecf94e0a3
// { dg-do assemble } double f(double); typedef double (*M)(double); class A { public: template <const M n> void g(); }; class B: public A { public: void g() { A::g<f>(); } };
google
chromium
ttp5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp5.C
180
utf_8
2117ae72852be8839191fb8e5bc6984a
// { dg-do assemble } template<int> class D { }; template<template<int> class D,class E> class C { D<int> d; // { dg-error "" } arg not match }; int main() { C<D,int> c; }
google
chromium
asm2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/asm2.C
490
utf_8
6e7995b25cead45381bee1b2b6852987
// { dg-do assemble { target i?86-*-linux* x86_64-*-linux* } } // { dg-require-effective-target ilp32 } // We'd use ebx with -fpic/-fPIC, so skip. // { dg-skip-if "" { *-*-* } { "-fpic" "-fPIC" } { "" } } typedef void (function_ptr)(int); void foo(int) { } template<function_ptr ptr> void doit(int i) { __asm__("pushl %...
google
chromium
t31
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t31.C
203
utf_8
f5cd99f666857129dc16f71b72b32464
// { dg-do assemble } struct B { int foo (); }; int B::foo() { return 37; } template <class A> struct X { void f(); }; template <class A> void X<A>::f () {} X<int> x; void xyzzy () { x.f (); }
google
chromium
friend49
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/friend49.C
606
utf_8
3fa14c24a814fa00f1e6d0e86d69bf36
// { dg-do assemble } // Bug 2929. We were forgetting about template parm scope when // injecting a friend decl into a class template specialization's // containing scope. template <class Type> class Vec; template <> class Vec<double> { public: Vec (); Vec<double> & Fn (double); friend Vec<double> Fn (const Vec<...
google
chromium
vaarg2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/vaarg2.C
576
utf_8
b020aa07093e2d7a2422bbdc0b9b3c25
// { dg-do assemble } // We attempted to expand va_arg prematurely in a template function. #include <stdarg.h> template <class Type> void PrintArgs (Type somearg, ...) { va_list argp; va_start (argp, somearg); Type value; while ( ( value = va_arg (argp, Type) ) > 0.0) continue; va_end (argp); } int main (void) { do...
google
chromium
overload5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/overload5.C
167
utf_8
081417a25f47a26a37e0a73a0d3057a2
// { dg-do assemble } template <class T> void foo(); // { dg-error "" } candidate void (*bar)() = foo<void>; void (*baz)() = foo; // { dg-error "" } can't deduce T
google
chromium
typename27
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/typename27.C
428
utf_8
679e18c47a0bd7b78b62cbf46c438146
// { dg-do assemble } // // bugs 173, 174 & 406 all ICE'd due to Koenig lookup involving // typename T::t. struct A { typedef int type; }; template<typename T> void same_key (T, typename T::type); template <class T> void foo (T *, void (*) (T, int)); void baz (A *ptr) { foo (ptr, same_key); }
google
chromium
instantiate10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/instantiate10.C
246
utf_8
d66c4fde23d4d04d14422202940dde41
// { dg-do assemble } // Origin: Neil Booth, from bug report #44 #include <iterator> template<class T> struct X { }; template<class T> X<T> operator+(const X<T>&, const X<T>&); template<> X<int> operator+<int>(const X<int>&, const X<int>&);
google
chromium
memclass5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memclass5.C
433
utf_8
e04462a0a9b0e5347afd025e4514df54
// { dg-do run } template <class T> struct A { template <class U> struct B { template <class V> static void f () { } void g () { } }; }; template <class T, class U> void f () { A<T>::template B<U>::template f<T> (); typename A<T>::template B<U> b; typename A<T>::template B<U> b2; b.A<T>::template ...
google
chromium
ptrmem8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ptrmem8.C
208
utf_8
e52e6177e655a4986751dbd9747d4dc7
// { dg-do assemble } template <class T> struct S { void f (const T&); void f (T&); }; class C { }; typedef int (C::*cp)(); template struct S<cp>;
google
chromium
typename5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/typename5.C
455
utf_8
c5212dc4f0952ca03a1daedbe58403f1
// { 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> { void Func(A_Type); // { dg-error "has not been declared" } implicit typename }; template <class U> void C<U...
google
chromium
explicit66
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit66.C
120
utf_8
8266c169b6e9ca69bee1c35b3cbc8746
// { dg-do run } void f(int) {} void f(double); template <void (*fn)(int)> void foo() {} int main() { foo<f>(); }
google
chromium
t10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t10.C
161
utf_8
23324631d401176730aa21b6453b5397
// { dg-do assemble } template <class A> class B { public: A a; B(); }; template <> class B<char> { public: int y[10]; }; static B<int> bi; static B<char> bc;
google
chromium
typename26
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/typename26.C
489
utf_8
db1631478430e161613055ed79847014
// { dg-do assemble } // // We failed to spot where a typename T::t didn't actually declare // anything. [7.1.5.3]/1 template<class LB> struct C { typename LB::DataType; // { dg-error "" } does not declare anything typename LB::DataType m; }; struct B {}; struct A { B; // { dg-erro...
google
chromium
friend8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/friend8.C
152
utf_8
e012862cb4020fa7673f263b6698a326
// { dg-do run } template <class T> class C { friend void f (C<T> c) { c.i = 3; } int i; }; int main() { C<int> ci; f(ci); }
google
chromium
recursion2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/recursion2.C
262
utf_8
f52f7adcc5fe58e460e0e642279da385
// { dg-do run } template< int i > struct T : public T< i-1 > { }; template<> struct T< 0 > { }; template< class F > struct T1 : public T< F::dim > { }; template< int i > struct S { enum { dim = i } ; }; int main() { T1< S< 4 > > t ; return( 0 ) ; }
google
chromium
typename11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/typename11.C
258
utf_8
f0e11d6518f0fceed09780cc74f1c25a
// { dg-do assemble } template <class T, int I> struct S { struct X {}; }; template <class T, class U, int I> typename S<T,I>::X f(T, U) { typename S<T, I>::X(); return typename S<T, I>::X(); } template S<int, 3>::X f<int, double, 3>(int, double);
google
chromium
memtemp7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp7.C
308
utf_8
c7588e497b92cdcedbc471bdb943f423
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); struct S { template <class T, class U> S(T, U, T); }; template <class T, class U> S::S(T t1, U u1, T t2) { printf("Hello, world.\n"); } int main() { S s1(3, "abc", 3); S s2('a', s1, 'a'); }
google
chromium
explicit80
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit80.C
242
utf_8
420c2584a309cd3121698cdeef1c7bd2
// { dg-do assemble } // Bug: We were complaining about explicit instantiation of A<T>::B. template <class T> struct A { public: ~A() { } class B; }; template <> class A<int>::B { }; template class A<int>; template class A<double>;
google
chromium
array5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/array5.C
232
utf_8
d54d7f76b19f79dd290e5553a5679f48
// { dg-do assemble } template <class T> void h(T&); template <class T> void g () { h ("abcdefghi"); } template void g<int>(); template <class T> void h(T&) { T t = {}; }
google
chromium
memtemp96
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp96.C
557
utf_8
8241764ee81eb4d8d3a3be6f72a7a782
// { dg-do run } // Test for partial specialization of a member function template. template <class T> struct A { template <class U> int f(U) { return 42; } }; template <> template <class U> int A<char>::f(U); template <> template <class U> int A<double>::f(U) { return 24; } int main () { A<int> ai; if (ai.f(0) !...
google
chromium
explicit42
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit42.C
159
utf_8
35a228037896375cfd1218c82e509f52
// { dg-do run } extern "C" void abort(void); template <int I> void f(int i) { } template <void*> void f(int i) { abort(); } int main() { f<0>(3); }
google
chromium
memtemp1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp1.C
161
utf_8
7c9ff7b48f36a935cfbb8498fa18c47f
// { dg-do assemble } // GROUPS passed templates membertemplates struct S { template <class T> void foo(T&); }; template <class T> void S::foo(T&) { }
google
chromium
lookup1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/lookup1.C
296
utf_8
d0a260f00fcfb13618176d41eac13a5a
// { dg-do assemble } template <class T, class Allocator> struct __vector_alloc_base { typedef int allocator_type; }; template <class T> struct vector : __vector_alloc_base<T,int> { typedef short allocator_type; explicit vector(const allocator_type& a = allocator_type()) {} };
google
chromium
nttp2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/nttp2.C
446
utf_8
94f0fcc44ea927fff0f0b4a7ea3ee67c
// { dg-do run } // Test for nested template template parameter feature template <template<template <class> class> class TTT> struct C { int f() { return 0; } }; template <template <class> class TT> struct D { int a; }; template <template <class> class TT> struct E { int a; int b; }; template <template <template <...
google
chromium
deduct5
.C
native_client/nacl-gcc/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
chromium
lookup4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/lookup4.C
218
utf_8
42986431ad9b15940c229226d6ec4a86
// { dg-do assemble } void h(int); template <class T> class i {}; struct B { int i; }; template <class T> struct D : public B { void f(); void g() { h(i); } }; template <class T> void D<T>::f() { h(i); }
google
chromium
crash29
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash29.C
1,337
utf_8
0511f114a053d6ee5a46245be973b120
// { dg-do assemble } typedef __SIZE_TYPE__ size_t; class UUId {}; template <class T> class MetaClass; class TypeInfo; struct MetaClassGeneric { MetaClassGeneric( TypeInfo& ); }; struct TypeInfo { void (*constructor)( void* ); void ...
google
chromium
koenig1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/koenig1.C
472
utf_8
c913be06a5e2d46f52d6942dcb160400
// { dg-do assemble } // // bug 123. We ICEd when koenig lookup found a COMPONENT_REF inside a // TEMPLATE_ID_EXPR. void foo(void (*f)()); struct A { template <int s> static void g(); template <int s> void f(); // { dg-error "" } candiate static void f_plus () { foo (f<0>); // { dg-error "" } no match...
google
chromium
ttp61
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp61.C
227
utf_8
4b62026d7f31a8f925f49c26dbc4d2d7
// { dg-do assemble } // Origin: grg at ai dot mit dot edu class A; template<template<class Ignored> class base> class C : public base<A> { public: C(A& newa) : base<A>(newa) {} };
google
chromium
lookup10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/lookup10.C
504
utf_8
1cfd70d8f9071e06a3860770bf0b6165
// { dg-do assemble } // We'd get confused entering a namespace via an alias namespace Outer { namespace Render_Real { typedef void Type; } namespace Core_Real {} namespace Core = Core_Real; namespace Core_Real { template<class T> void Foo (T *) {} // { dg-error "definition" } } template<> void...
google
chromium
friend21
.C
native_client/nacl-gcc/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
chromium
ttp2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ttp2.C
169
utf_8
91ae82c96542c91f95c0377f8bf9d606
// { dg-do assemble } template<class E> class D { }; template<template<class> class D,int> class C { }; int main() { C<1,D> c; // { dg-error "" } args not match }
google
chromium
m7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/m7.C
520
utf_8
3f24c9e9977652c80cc7a7a04ed2aad5
// { dg-do assemble } struct B { struct A { A(); int a; }; A aa; }; B::A::A () { a = 37; } const char *xx[]= {"/*", "../tests/m7.cc:1: warning: return type specification for constructor invalid", "../tests/m7.cc: In function struct A A ():", "../tests/m7.cc:2: `a' undeclared (first use this function)", "../tests/m7.c...
google
chromium
cast1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/cast1.C
129
utf_8
00bb322c649a2fe684c3fee1fdd590df
// { dg-do assemble } template <class T> void f (T t) { const_cast<T>(t); }
google
chromium
memclass15
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memclass15.C
300
utf_8
7c353edc5e8c81c94f858f4fde721e74
// { dg-do assemble } template <class T> struct S1 { template <class U> struct S2 {}; template <class X, class Y, class Z> void f(X, Y, Z) { S2<Z> s2z; } template <class X, class Z> void g(X, Z) { S2<Z> s2z; } }; void h() { S1<int> si; si.g(3, 4); }
google
chromium
syntax2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/syntax2.C
906
utf_8
e9efff2b62f9ddbce9f908fa384b7346
// { 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. template <class T> class image { public: template <cla...
google
chromium
deduct6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/deduct6.C
466
utf_8
162fbede0debf0447f169eae092debca
// { dg-do assemble } // Bug 1962. We were not dealing with qualified array types properly. #include <stdio.h> template <typename T, unsigned I> int Baz (T (&obj)[I]) { printf ("%s\n", __PRETTY_FUNCTION__); return 1; } int main () { static int const ca[1] = {1}; static int a[1] = {1}; Baz (ca); Baz (a);...
google
chromium
shadow2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/shadow2.C
228
utf_8
7832134a73622623fa6b54ea86054246
// { dg-do assemble } template <class T> struct A { // { dg-error "" } shadowed parameter struct B { void T(); // { dg-error "" } shadows template parameter }; }; A<int> a;
google
chromium
crash13
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash13.C
259
utf_8
fcadc5744a7361e664ae053c8da7d49f
// { dg-do assemble } template <class T> struct A {}; template <class T> struct A<T>; // { dg-error "" } does not specialize args template <class T> const struct A; // { dg-error "" } parse error template <class T> template A<int>; // { dg-error "" } .*
google
chromium
static11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/static11.C
726
utf_8
4940f57a74db7e31c4818c81831d06a5
// Some targets (e.g. those with "set_board_info needs_status_wrapper 1" // in their dejagnu baseboard description) require that the status is // final when exit is entered (or main returns), and not "overruled" by a // destructor calling _exit. It's not really worth it to handle that. // { dg-do run { target unwrappe...
google
chromium
stmtexpr2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/stmtexpr2.C
200
utf_8
5db15e0a52bb9bee309b37da293a7cb3
// { dg-do run } extern "C" void abort(); int i; void g() { i++; } template <class T> void f(T) { __extension__ ({g();}); } int main() { f(3.0); if (i != 1) abort(); return 0; }
google
chromium
derived3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/derived3.C
346
utf_8
2e15c769911caa11add06c8fae7ae44e
// { dg-do compile } template<class T> class X { class Y : public T { // { dg-error "base type .* fails to be" } }; Y y; // { dg-message "instantiated" } }; int main() { X<int> x; // { dg-message "instantiated" } }
google
chromium
cond3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/cond3.C
385
utf_8
df2c973c281b61ba430c736c714be46c
// { dg-do assemble } template <class T> class REFptr { public: operator T* () const; }; class CamFocus; typedef REFptr<CamFocus> CamFocusptr; class CamFocus { protected: static CamFocusptr _focus; public : static CamFocusptr &cur() { return _focus; } }; void test() { if (CamFocus::cur...
google
chromium
ref3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/ref3.C
296
utf_8
0326d6254bda67a154ca4ff2b4bd4982
// { dg-do run } template <class T, int& Size> struct Base { Base() : obj(Size) {} T obj; }; int globalInt = 5; struct A { A(int arg) : ia(arg) {} int ia; }; int main() { Base<A, globalInt> ob; if (ob.obj.ia != 5) return 1; }
google
chromium
overload10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/overload10.C
194
utf_8
23da0d7551e361709930e1dbb363fbcd
// { dg-do run } struct B { int f(int) { return 1; } }; struct D { template <class T> int f(T) { return 0; } }; int main() { int (D::*g)(int) = &D::f; D d; return (d.*g)(0); }
google
chromium
t42
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t42.C
334
utf_8
a8453a0423b23d07a9388be4c9d8f47a
// { dg-do run } extern "C" void abort (); struct A { struct stat { int x; stat (int j) { abort (); } }; static int stat (double d) { return 0; } // { dg-bogus "" } cfront takes it static int zap () { stat (0); return stat (1); // { dg-bogus "" } this should work } }; int main () { return...
google
chromium
m5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/m5.C
170
utf_8
0529737246a919aac9b8b2d78f4e5aab
// { dg-do assemble } struct B { struct A { A(); int a; } aa; }; struct A { A(); int a; }; B::A::A () { a = 37; } char xx[]="../tests/m5.cc:3: Segmentation violation";
google
chromium
crash39
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash39.C
260
utf_8
5aa83f41d9dd76aac5bd62155f035575
// { dg-do assemble } class Action { public: virtual void action () = 0; }; class Var { public: template<class Base> void Add() { struct tmp : public Action { void action () {} }; tmp *tp = new tmp; } };
google
chromium
t18
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/t18.C
272
utf_8
933beb1baf7c9b5eba412bbc82a23eb3
// { dg-do assemble } extern void byebye (); template <class T1, class T2> struct A { T1 t1; T2 t2; A() { t1 = 0; t2 = 0; } ~A() { byebye(); } }; template <class Q> int f (A<int, Q> a) { return a.t1; } extern A<int,double*> aa; int foop () { return f(aa); }
google
chromium
explicit2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit2.C
153
utf_8
6c2da1ad2b74221941a0aafe4d1f215f
// { dg-do assemble } // GROUPS passed templates template <class T> void foo(T t) {} void bar() { (void (*)(int)) (void (*)(double)) &foo<double>; }
google
chromium
typename17
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/typename17.C
218
utf_8
536ba4b55b2ed2977446152d5277860c
// { dg-do assemble } template <class T> struct A { typedef T A_Type; }; template <class U> struct B : public A<U> { typename B<U>::A_Type Func(); }; template <class U> typename B<U>::A_Type B<U>::Func() { }
google
chromium
memtemp94
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp94.C
223
utf_8
c0b5553d772c8bdf4602ec9e397bc5a8
// { dg-do assemble } struct H { template <class T> void k() const { } typedef void (H::*pmf)() const; pmf f() const { return &H::k<int>; } };
google
chromium
sizeof2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/sizeof2.C
520
utf_8
c42a41548aa56c8333e7d2c7000231f1
// { dg-do run } // Although template class B is not used at all, it causes the // incorrect specialization of A to be selected extern "C" void abort(); template<int N, class T> // Base class class A { public: static int n() { return sizeof(T); } }; template<int N> // Derived #1 class B: public A<N,char[N]> {}; templa...
google
chromium
defarg2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/defarg2.C
170
utf_8
9f39cdc786faf8f9b4f883d68f99be57
// { dg-do run } template <int S=0, class T=int> struct X {}; template <> struct X<0,int> {}; template <int S> struct X<S,int> : X<> {}; int main() { X<1,int> x; }
google
chromium
crash21
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/crash21.C
377
utf_8
68803e05712c2baacd757fb9aa114da5
// { dg-do assemble } // { dg-options "" } class Pooled { }; class RefCounted { }; class BrickExpressionBase : public RefCounted, public Pooled { }; template<unsigned Dim, class LHS, class RHS, class OP> class BrickExpression : public BrickExpressionBase { }; template <unsigned Dim, class T> void f() { typedef ...
google
chromium
memtemp58
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp58.C
480
utf_8
b481f5b7e9b4fb7319ff5c17d06963fa
// { dg-do assemble } // GROUPS passed templates membertemplates template<int N, class T> struct B { }; template<int N1, int N2, int N3> struct D { struct E { template<int N4, class T> static void f(B<N4,T>) { } }; }; template<int N> struct A { template<int N2, class T, int N3> ...
google
chromium
ttp48
.C
native_client/nacl-gcc/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
chromium
explicit62
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit62.C
218
utf_8
5363ea03d6d7a724304c1bc655259f69
// { dg-do run } extern "C" void abort (); template <class T> void f () { } template <class T> class C { friend void f<char> (); public: void ff () { f<char> (); } }; int main () { C<int> c; c.ff(); }
google
chromium
memtemp26
.C
native_client/nacl-gcc/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
chromium
friend4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/friend4.C
160
utf_8
bd62ddf844767510d988a91418f1c5cb
// { dg-do run } class C { template <class T> friend void f(T); int i; }; template <class T> void f(T) { C c; c.i = 3; } int main() { f(7); }
google
chromium
spec18
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/spec18.C
331
utf_8
be4c4aaf4896a204dd3b537e9467220b
// { dg-do assemble } template<class A, class B> void foo(const A& a, const B& b) { } template<class A, class B> void foo(const A& a, const int& b) { } template<class A*, class B> void foo(const A*& a, const B& b) { } template<> void foo(const int&, const double&) { } int main() { foo("98239", 23); foo(232, ...
google
chromium
memtemp29
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp29.C
460
utf_8
3773ce18b307505136a6c017bbaa1a63
// { 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); template <class U> void g(U u); int c[16]; }; template <class X> template <class U> void S<X>::f(U u) { printf ("In S::f(U)\n"); g(u); } t...
google
chromium
memtemp80
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp80.C
319
utf_8
dfe226bdc2e8df4b798d0ebefbd4ccc1
// { dg-do assemble } template<typename T> T baz() { return 0; } struct foo { template<typename T> static T staticbar() { return 0; } template<typename T> T bar() { return 0; } }; void f() { foo t; int i = baz<int>(); int j = foo::staticbar<int>(); int k = t.bar<int>(); }
google
chromium
instantiate12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/instantiate12.C
1,421
utf_8
66f7eda343a08a3bd202b6bfcb2295a1
// { dg-do run } // Bug 635. We failed to emit initializer code for out-of-class defined // static const members of template instantiations. static int inited = 0; static bool setFlag() { inited++; return true; } template<typename T> struct X { static const bool cflag; static bool flag; static const bool ifl...
google
chromium
friend29
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/friend29.C
283
utf_8
dff364a9f8234743175609061fb00129
// { dg-do assemble } template <class T> class a; template <class T> void foo( a<T>& thea ); template <class T> class a { public: friend void foo<>( a<T>& thea ); private: T amember; }; template <class T> void foo( a<T>& thea ) { thea.amember = 0; } template class a<int>;
google
chromium
instantiate7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/instantiate7.C
389
utf_8
d98d69ee99fb3f74d27827ff24fb8b3c
// { dg-do assemble } template <class T> void Wibble (void (*fn) (), T *const __restrict__ &p2) {} template<class T1, class T2> void Wibble (T1 *const __restrict__ &p1, T2 *const __restrict__ &p2) {} void Baz (); void Foo (void const *ptr) { Wibble (&Baz, ptr); }
google
chromium
memtemp30
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp30.C
223
utf_8
3b9a16ac3949a5bf0132472a7453bd4b
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); template <class X> struct S { template <class U> void g(U u) { this; } }; int main() { S<char*> s; s.g(3); }
google
chromium
memtemp42
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp42.C
299
utf_8
2c27c4ec4b415f8d461890c795e98549
// { dg-do link } // GROUPS passed templates membertemplates template<class T, int N> class Foo { public: template<int N2> Foo<T,N> operator=(const Foo<T,N2>& z) { return Foo<T,N>(); } }; int main() { Foo<double,4> x; Foo<double,7> y; x = y; return 0; }
google
chromium
spec12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/spec12.C
243
utf_8
629a9c9d3e53fc2a9cb8b0f4f7590172
// { dg-do run } extern "C" void abort(); template <class T> struct S { template <class U> int f(U u); }; template <> template <> int S<char>::f<int>(int i) { return 1; } int main() { S<char> sc; if (sc.f(3) != 1) abort(); }
google
chromium
extern1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/extern1.C
173
utf_8
d524cd55771d824295565e10315fd2bf
// { dg-do assemble } template <class T> void f () { extern int i; extern T j; i = j; } template void f<int>();
google
chromium
explicit35
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/explicit35.C
228
utf_8
1000d74288a54fb28014c5dd12c3f164
// { dg-do link } // { dg-options "-ansi -pedantic-errors -w" } // GROUPS passed templates struct S { template <class T> void foo(T t); }; template <> void S::foo<int>(int i) { } int main() { S s; s.foo<int>(3.0); }
google
chromium
memtemp10
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.pt/memtemp10.C
297
utf_8
4ec5b1638579f803a480fb71c9d548b4
// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf(const char*, ...); struct S { template <class T> operator T*(); }; template <class T> S::operator T*() { printf("Hello, world.\n"); return 0; } int main() { S s; char* cp = s.operator char*(); }
google
chromium
error1
.C
native_client/nacl-gcc/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>();