plateform
stringclasses
1 value
repo_name
stringclasses
2 values
name
stringlengths
1
78
ext
stringclasses
2 values
path
stringlengths
15
1.11k
size
int64
1
8.55M
source_encoding
stringclasses
11 values
md5
stringlengths
32
32
text
stringlengths
0
8.49M
google
android
explicit78
.C
toolchain/gcc/gcc-4.9/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
android
tt2
.C
toolchain/gcc/gcc-4.9/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
android
friend23
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend23.C
231
utf_8
b0039b5263f1df623037dcbad914d501
// { dg-do assemble } template <class T = int> // { dg-message "note: original definition" } struct S { template <class U = int> friend class S; // { dg-error "redefinition of default argument" } }; template struct S<int>;
google
android
static4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/static4.C
82
utf_8
589231529de4c0a45cb857d76c3e2a2e
// { dg-do assemble } template <class T> struct S { static const T t = 3; };
google
android
crash31
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash31.C
247
utf_8
d7866497f7e5839b6b2923ee09574812
// { dg-do assemble } // Origin: Corey Kosak struct cow_t { template<bool Q> static void tfunc(cow_t *cowp) {} void moo() { cow_t *cowp; cow_t::tfunc<true>(cowp); } }; int main() { cow_t *cowp; cow_t::tfunc<true>(cowp); }
google
android
friend10
.C
toolchain/gcc/gcc-4.9/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
android
memtemp41
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp41.C
120
utf_8
20c70cba377d830ba9d6e50fe825dca3
// { dg-do assemble } // GROUPS passed templates membertemplates template <int i> struct S { static void foo() {} };
google
android
local7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/local7.C
360
utf_8
4e765c7240554e025c2792ca80ac15a9
// { dg-do assemble } 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...
google
android
typename13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typename13.C
323
utf_8
801140a6f90dacc2faec17aeb8b23875
// { dg-do assemble } // { dg-options "-fpermissive" } template <class T> struct B { typedef int I; }; template <class T> struct D : public B<T> { void f(); }; template <class T> void D<T>::f() { I(); // { dg-warning "" } } template <> struct B<int> { void I(); }; int main() { D<int> di; di.f();...
google
android
ttp17
.C
toolchain/gcc/gcc-4.9/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
android
local4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/local4.C
260
utf_8
1100c5bcce4a46a1489112c4c257c7a7
// { dg-do run } extern "C" void abort(); template <class T> struct S {}; S<int> si; template <class T> int f(T t) { struct S { int g(int i) { return i + 2; } }; S s; return s.g(t) + s.g(t); } int main() { if (f(3) != 10) abort(); }
google
android
m6
.C
toolchain/gcc/gcc-4.9/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
android
local1
.C
toolchain/gcc/gcc-4.9/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
android
defarg13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/defarg13.C
236
utf_8
a7bda05d1cbd63fdd8fa49b8acb6fee1
// { dg-do assemble } template <class T> void f (int i) { struct S { void g (int j = i) {} }; // { dg-error "" } default argument uses local S s; } template void f<double>(int);
google
android
t12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t12.C
467
utf_8
24e1a97a52be67a54cacdea0ae77c24d
// { dg-do assemble } class OBJECT {int a;}; class STDFILE {int b;}; template <class T> class VECTOR { T *v; int sz; public: T& elem(int i) { return v[i]; } T& operator[] (int i); }; template <class T> class PVECTOR : VECTOR<void *> { public: T*& elem(int i) {return (T*&) VECTOR<void *>:...
google
android
friend4
.C
toolchain/gcc/gcc-4.9/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
android
dynarray
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/dynarray.C
349
utf_8
5b8f05849adf02df49d6c7a143da6dd0
// { dg-do assemble } // { dg-options "" } inline const unsigned& f(unsigned const& a) { return a; } template <class T> void g(const unsigned n) { double D[f(n)]; } template <class T,class U> void g(unsigned const int) { } int main() { g<double>(18); }
google
android
spec11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec11.C
237
utf_8
e9268b8e99b3745bcf73bd2daf3e5819
// { 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 i) { return 1; } int main() { S<char> sc; if (sc.f(3) != 1) abort(); }
google
android
ptrmem1
.C
toolchain/gcc/gcc-4.9/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
android
t42
.C
toolchain/gcc/gcc-4.9/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
android
memtemp39
.C
toolchain/gcc/gcc-4.9/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
android
friend39
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend39.C
227
utf_8
b15b08047e33d87112dd5baa492b24fa
// { dg-do assemble } template <class T> struct S; template <class T> class C { friend void S<T>::f(); int i; }; template <class T> struct S { void f() { C<T> c; c.i = 3; } }; template void S<int>::f();
google
android
enum2
.C
toolchain/gcc/gcc-4.9/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
android
ttp52
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp52.C
317
utf_8
a0ad3717d706ab0e38262e2cb1818205
// { dg-do assemble } template<class A,class B> class mymap {}; template<class Key, class Value, template<class, class > class MapT> class base { }; // specialization template<class Key, class Value> class base<Key, Value, mymap<int, int > > // { dg-error "type/value|class template" } { };
google
android
nontype5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/nontype5.C
472
utf_8
b9bb8ed83d5de4ef7c492ee49635ea20
// { dg-do assemble } // Bug 1509. We ICE'd on trying to coerce a non-type template parm // that wouldn't. template<class T> struct A { typedef int F(); }; template<class T, typename A<T>::F f> struct B { static int g() { return f(); } }; int f() { return 0; } int main() { return B<int,&f>::g(); // { dg-error "" } co...
google
android
redecl2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/redecl2.C
107
utf_8
4b0d2c4de566d4685481d1e70444f070
// { dg-do assemble } struct A { template <class A> void f(A) {} }; void g() { A a; a.f(3); }
google
android
codegen1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/codegen1.C
212
utf_8
7b9ae09252e64b16ac90f079401bceeb
// { dg-do assemble } int i; struct S { ~S () { } }; template <class T> void f (T, S) { i = 0; } int main () { i = 1; f (3, S ()); return i; }
google
android
memtemp78
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp78.C
776
utf_8
ef6dd43a0a944829a8e40bb7d02ff802
// { dg-do assemble } struct A { void f() {} template <class U> void f() {} }; template <class T> struct B { void f() {} template <class U> void f() {} }; template struct B<int>; struct C { template <class U> void f() {} // { dg-error "with" } redeclaration template <class U> void f() {}...
google
android
memtemp17
.C
toolchain/gcc/gcc-4.9/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
android
t38
.C
toolchain/gcc/gcc-4.9/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
android
friend42
.C
toolchain/gcc/gcc-4.9/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
android
t14a
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t14a.C
233
utf_8
6ab53197c0d07f59425f5093c7a03a80
// { dg-do assemble } class OBJECT { int a; }; template <class T> class TESTA { public: TESTA(); T foo(int i) {T t = 0; return t;} }; void foo() { TESTA<OBJECT *> *foo; foo = new TESTA<OBJECT *>; }
google
android
crash24
.C
toolchain/gcc/gcc-4.9/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
android
crash41
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash41.C
222
utf_8
21144f64bc0931fe57f436f28fe0b6eb
// { dg-do compile } template <int> struct S1{}; struct S2 { int i; }; template <class T> void f(S2 s2) { S1<s2.i> s1; // { dg-error "" } } template void f<int>(S2);
google
android
memtemp42
.C
toolchain/gcc/gcc-4.9/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
android
ttp50
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp50.C
129
utf_8
4b8e846d9ad0f88ab881eb5334dca868
// { dg-do run } template <class T, template <T> class TT> class C {}; template <int> class D {}; int main() { C<int,D> c; }
google
android
defarg9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/defarg9.C
180
utf_8
3f681d59e13e6e66d4659f1dacf5ca23
// { dg-do assemble } template <class T = int> struct S { void g () { } friend void f (double) { } };
google
android
spec34
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec34.C
433
utf_8
1a92c1203dc984f1d9f74805db9b09cf
// { dg-do assemble } // lost the object's CV quals, leading to an utterly confusing error message. struct X; template <int dim> struct Y { X *f (int i = 0) const; }; template <> X *Y<2>::f (int i) const { return f (i); }
google
android
lookup1
.C
toolchain/gcc/gcc-4.9/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
android
friend44
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend44.C
546
utf_8
cdbb5542332d9ba2fba1f567d6e9e08c
// { dg-do compile } // Test that template friends referring to class template members are // respected. template <class T> struct A { int f (T); struct AI { int f (T); }; }; class B { template <class T> friend int A<T>::f (T); template <class T> friend struct A<T>::AI; int a; public: B(): a(0) { }...
google
android
ref4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ref4.C
454
utf_8
473d7d5b75c57a212b20cd7b20b515c4
// { dg-do assemble } // { dg-prune-output "mangled name" } // -C; //bogus error } int main() { test<c> (); }
google
android
friend32
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/friend32.C
305
utf_8
ea54812a51ee402d2c61381a8ccb3446
// { dg-do assemble } template <class T, class U> struct S { template <class X, class Y, class Z> friend X f(X, Y, Z); }; template class S<int, double>; template char f(char, long, short); template char* f(char*, long*, short*); template <class X, class Y, class Z> X f(X x, Y, Z) { return x; }
google
android
lookup9
.C
toolchain/gcc/gcc-4.9/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
android
goto
.C
toolchain/gcc/gcc-4.9/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
android
explicit38
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit38.C
220
utf_8
05d6224fa08964892ba5db34d1c4414a
// { dg-do assemble } template <int I> void f(int j); // { dg-message "note" } void g() { f<7, 12>(3); // { dg-error "" } no matching function. // { dg-message "candidate" "candidate note" { target *-*-* } 7 } }
google
android
crash39
.C
toolchain/gcc/gcc-4.9/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
android
memtemp2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp2.C
161
utf_8
f1363637cbb5dd90414cf0a0933c5159
// { dg-do assemble } // GROUPS passed templates membertemplates struct S { template <class T> void foo(T&); }; template <class U> void S::foo(U&) { }
google
android
instantiate1
.C
toolchain/gcc/gcc-4.9/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
android
instantiate11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/instantiate11.C
1,041
utf_8
e7ee5bb602fee5b34b1fc6b20d8d756c
// { dg-do assemble } // Origin: Neil Booth, from bug report #36 template <typename t> class vect; template <typename t> vect<t> operator-( const vect<t>&, const vect<t>& ); template <typename t> class vect { public: vect( t a ); vect( const vect<t>& v ); ~vect(); vect<t>& operator=( const vect<t>& v ); ...
google
android
local6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/local6.C
279
utf_8
65f4be3c56201636904549f241c4cf24
// { dg-do run } extern "C" void abort(); template <class T> int f(T) { struct S1 { virtual int foo() { return 1; } }; struct S2 : public S1 { int foo() { return 2; } }; S1* s2 = new S2; return s2->foo(); } int main() { if (f(3) != 2) abort(); }
google
android
memtemp66
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/memtemp66.C
159
utf_8
ce3df9ae4b9b6b8f504826c9542e10c8
// { dg-do assemble } template <class T> struct S { template <class U> void f(U u) { this->template f<>(3); } }; void g() { S<char> s; s.f(1.0); }
google
android
warn1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/warn1.C
269
utf_8
e4bacbe47abba3ebf1104b50d7cf9249
// { dg-do assemble } // { dg-options "-Wunused" } template <class T> struct S { struct R { R(); ~R(); }; void foo() { R r; // no warning int i; // { dg-warning "" } unused } S(); ~S(); }; void f() { S<int> si; si.foo(); }
google
android
partial4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/partial4.C
577
utf_8
a93d39dfa0350d17f446c06770e3022b
// { dg-do assemble } // Bug 29. We failed to verify that template argument deduction // produces a valid result in nondeduce context. template<class T> struct Y { typedef T X; }; template<class T, class U> struct Base {}; template<class T> struct Base<T, typename T::X> {}; template<class T> struct Base<typename T::X...
google
android
ptrmem9
.C
toolchain/gcc/gcc-4.9/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
android
crash48
.C
toolchain/gcc/gcc-4.9/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
android
crash46
.C
toolchain/gcc/gcc-4.9/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
android
explicit61
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/explicit61.C
609
utf_8
18f7175d1fd53378e80c51ca317d35b4
// { 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> (0); } void gg () { g<T> (1); } template <class U> void f () { abort(); } templat...
google
android
repo2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/repo2.C
465
utf_8
7f4f10aa57f0877b1c68c5f103359587
// { dg-do link } // { dg-options "-frepo" } // { dg-require-host-local "" } // { dg-skip-if "dkms are not final links" { vxworks_kernel } } // Test that collect2 isn't confused by GNU ld's "In function `foo':" message. // Build then link: template <class T> T f (T t) { return t; } template <class T> T g (T t) { r...
google
android
ttp32
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp32.C
455
utf_8
e6761a81b983120123cc446ee2bb99ba
// { 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<template <class> class F> class C<F,int> { F<int>...
google
android
local3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/local3.C
201
utf_8
e2e409c8ab85028ef09b220a91de6dfb
// { dg-do run } extern "C" void abort(); template <class T> void f(T) { int j; j = 6; struct S { int i; }; S s; s.i = j; if (s.i != 6) abort(); } int main() { f(7); }
google
android
ttp47
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/ttp47.C
250
utf_8
923e63997896ba4851da3c13603d075e
// { dg-do run } template <template<class,class> class TT, class T> void f(T) { } template <template<class> class TT, class T> void f(T) { } template <class T> class C {}; template <class T,class U> class D {}; int main() { f<C>(1); f<D>(1); }
google
android
eichin01a
.C
toolchain/gcc/gcc-4.9/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
android
partial1
.C
toolchain/gcc/gcc-4.9/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
android
m7
.C
toolchain/gcc/gcc-4.9/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
android
typename15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/typename15.C
251
utf_8
742238782ec9520e32525beeeda72fd2
// { dg-do assemble } // { dg-options "" } template <class T, bool B> struct R { struct X {}; }; template <class T, bool B = false> struct S : public R <T, B> { }; template <class T> void f() { typename S<T>::X(); } template void f<int>();
google
android
defarg5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/defarg5.C
320
utf_8
d76188a085acd697dff8b304e6cd63cc
// { dg-do assemble } template <int dim> class Point { public: Point (Point<dim> &); Point<dim> & operator = (Point<dim> &); }; template <int dim> class bar{ public: void foo (Point<dim> p = Point<dim>()); }; template <> void bar<2>::foo (Point<2> p) { const int dim = 2; Point<dim> q = p; }
google
android
spec26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec26.C
354
utf_8
c680e00cbe603257da2666614bc5752f
// { dg-do assemble } // Test that a specialization without an initializer is not a definition, // as specified in [temp.expl.spec]. struct X; template <class T> struct Y { static const X array[]; }; template <> const X Y<int>::array []; struct X { int i; }; template <> const X Y<int>::array [] = { 0, 1, 2, 3 };
google
android
niklas01
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/niklas01.C
110
utf_8
f74c2371b4b628dfae566fa1db2e4501
// { dg-do assemble } template <class T> struct A {}; template <class T> struct B : A<B<T> > {}; B<int> x;
google
android
static7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/static7.C
176
utf_8
72154d5a2f46122f8101c515f3a29357
// { dg-do assemble } template <class T> struct S { S() {} static S s; }; template <class T> S<T> S<T>::s; S<int> si;
google
android
t32a
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/t32a.C
178
utf_8
76baa57e62b2aebfb501c4f9fb42ec75
// { dg-do assemble } struct A { int x; int y (); int z (); int foo (int j); }; int A::foo (int q) { return q + (this->*(x ? &A::y : &A::z)) (); } // { dg-bogus "" }
google
android
const2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/const2.C
328
utf_8
91182227b7766e96a08954312e68a85b
// { dg-do run } // Example of static member constants extern "C" int printf (const char *, ...); struct T { static const char letter = 'a'; // this is the new stuff! char x[letter]; void f(); }; void T::f() { printf ("%p", &letter); } const char T::letter; // still need def after class int mai...
google
android
template29
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template29.C
292
utf_8
df154678c22816af85a841d67d2cbe30
// { dg-do assemble } // PRMS Id: 9500 template <int S> class base { public: inline base(); }; template <class T> class derived : public base<sizeof(T)> { public: inline derived(); }; template <class T> inline derived<T>::derived() : base<sizeof(T)>(){}
google
android
nested4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/nested4.C
303
utf_8
46cd51855bd2bcb4fb246570df6d963e
// { dg-do assemble } // Subject: extern "C" nested class // Date: Fri, 13 Aug 1993 15:33:53 +0200 extern "C" { struct A { struct B { int j; } *x; }; } void foo () { A a; struct A::B *b; b = a.x; // { dg-bogus "" } type `B' is not a base type for type `B' }
google
android
nested6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/nested6.C
82
utf_8
4417f26d73cb317679a1a7cdc4c7ff5d
// { dg-do assemble } union A { struct B { }; A::B b; // { dg-bogus "" } };
google
android
context
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/context.C
366
utf_8
7e6b372b5cf2e20339dfcaaaca502ad0
// { dg-do assemble } // PRMS Id: 3988 // Bug: DECL_CONTEXT of A::B gets clobbered in pushdecl when defining A::foo(). #pragma implementation "context.h" #line 1 "context.h" #pragma interface template <class T> struct A { inline void foo () { } class B { }; }; struct C : public A<int> { void bar (C::B&); }; #...
google
android
overload11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload11.C
261
utf_8
ae5a0dfe48e368790442e81a8b9d8426
// { dg-do run } // PRMS Id: 4697 // Bug: g++ calls the non-const method for a const object. class A { public: void foo(int &i) const { i = 0; } void foo(int &i) { i = 1; } }; int main() { A a; const A& b = a; int i = 2; b.foo (i); return i; }
google
android
enum3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/enum3.C
328
utf_8
837f785c12882efb205074f3bdcb14bc
// { dg-do assemble } // { dg-options "-Wall" } enum tristate { no = -1, maybe, yes }; tristate tristate_satisfies (register tristate const t1, register tristate const t2) { switch (t1) { case no: return (tristate) -t2; case maybe: return yes; case yes: return t2; } return m...
google
android
delete3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/delete3.C
231
utf_8
bab45524ccba473f2da00ba1b2c7f1a4
// { dg-do assemble } // PRMS Id: 6093 class A { public: A(); ~A(); protected: void operator delete(void *); // { dg-error "" } protected }; A::~A() { } void foo(A *p) { delete p; // { dg-error "" } in this context }
google
android
crash9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/crash9.C
328
utf_8
475dd57d3a9da91920b33efd76753177
// { dg-do assemble } // PRMS Id: 5085 // Bug: TYPE_POINTER_TO wasn't set. class A { A(const A &); void operator=(const A &); public: inline A(); }; class B { A a; public: B(); virtual void f() const; }; class C : public B { }; class D : C { public: void f() const; }; void D::f() const { C:...
google
android
overload29
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload29.C
243
utf_8
11a42fc661c310ee8e05bfb8f2769030
// { dg-do assemble } // Bug: we get an error trying to build up our ideal candidate. class C { public: C( const char * ); }; extern const char c1[]; void f2( const char * ); void f1() { C *fntp = new C(c1); // Line 10 f2( c1 ); }
google
android
temporary5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/temporary5.C
362
utf_8
775bb937779a50dd9c56199cec7eec12
// PRMS Id: 6604 // Old bug: Scoped constructor call is not properly recognized as a functional cast // But after DR 147 A::A() is a constructor call, not a functional cast. int c; struct A { A() { ++c; } ~A() { --c; } operator int () { return 1; } }; int main () { A a; a.A::A(); // { dg-error "" } A::...
google
android
bool2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/bool2.C
199
utf_8
d2be927bf834ef05a3cf71bff558668e
// { dg-do run } // Make sure that bool bitfields promote to int properly. struct F { bool b1 : 1; bool b2 : 7; }; int main() { F f = { true, true }; if (int (f.b1) != 1) return 1; }
google
android
byval3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/byval3.C
261
utf_8
e532df26a2e57d3c517f97d9d1dd2ac2
// { dg-do assemble } // Test to make sure that value return of classes with cleanups works; it // has been broken at various times on PCC_STATIC_STRUCT_RETURN targets. struct A {}; struct R : virtual A { virtual ~R(); }; R g(); void encode() { g(); }
google
android
incomplete2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/incomplete2.C
95
utf_8
f6155a6c2f02b991be6ed6d9e1a08f7a
// { dg-do assemble } struct A { int foo(A a) { return a.bar(); } int bar(); int n; };
google
android
ambig2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/ambig2.C
367
utf_8
c241c8b031388288ae124eb72c85b118
// { dg-do assemble } // { dg-options "-Wno-pointer-arith" } // Testcase for ambiguity between cast and parmlist. // This ambiguity accounts for 1 of the r/r conflicts. // Do not compile with -pedantic so that the compiler will accept taking // the sizeof a function type. void f(){ (void)sizeof(int((int)1.2)); (v...
google
android
synth5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/synth5.C
250
utf_8
6533edd5a6561a080c6dbde7e54e4d75
// { dg-do run } // Bug: generated B::operator= tries to call A::operator= #pragma implementation #line 1 "synth5.h" #pragma interface struct A { virtual A& operator= (const A&) = 0; }; struct B: public A { }; #line 5 "synth5.C" int main() { }
google
android
operator
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/operator.C
1,105
utf_8
8d9dbba4769eea9a0be1c2695887ed5b
// { dg-do assemble } // { dg-options "" } // General test for operator overloading permissiveness. typedef __SIZE_TYPE__ size_t; struct A { int operator?:(int a, int b); // { dg-error "expected type-specifier" } static int operator()(int a); // { dg-error "must be a nonstatic member" } static int opera...
google
android
template5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template5.C
511
utf_8
1c153dc25602cb13a7bd443db69588bf
// { dg-do assemble } // Bug: g++ fails to compare integer constants properly. template <int X, int Y> struct Matrix { int base [X] [Y]; }; template <int M,int H,int N> Matrix<M,N>& Mul(Matrix<M,N>& Q,Matrix<M,H>& A,Matrix<H,N>& B) { for(int i=0;i<M;i++) { for(int j=0;j<N;j++) { Q.base[i][j]=0; ...
google
android
rvalue2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/rvalue2.C
256
utf_8
a7a84efb83b07b626b9173305e6c605d
// { dg-do run } // Test for undesired aliasing. struct A { const A * get_this () const { return this; } }; int main () { A a; int r = 0; const A& ar1 = (A)a; if (&ar1 == &a) r |= 1; if (A(a).get_this () == &a) r |= 2; return r; }
google
android
access17
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/access17.C
533
utf_8
5dda388b1971d06e76c74bc56efbaf2e
// { dg-do assemble } // Make sure definitions of static members have the right access. struct A { protected: int i; // { dg-error "" } private int f (); // { dg-error "" } }; struct B: public A { static int A::*p; static int (A::*fp)(); }; int A::* B::p = &A::i; // { dg-er...
google
android
rfg9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/rfg9.C
131
utf_8
4db6c46266a3c32e83e4b4f8e13f4321
// { dg-do assemble } int cond; int i; int *ip; void test () { cond ? i : ip; /* { dg-error "" } pointer/integer mismatch */ }
google
android
template12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/template12.C
191
utf_8
931735532f8fbdf340eb9d9ee7eac790
// { dg-do assemble } // Testcase for 'this is a type' syntax. struct B { typedef int A; }; template <class T> struct Y { void f() { typename T::A *d; } }; template class Y<B>;
google
android
nested2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/nested2.C
633
utf_8
fe6c52c886b91594995d2cb6c7a51f3c
// { dg-do assemble } // PRMS Id: 3764 (c/h) // Bug: g++ gets into an infinite loop trying to find the top-level context class Menu; class MenuItem; class MenuAction { public: virtual void execute (Menu& menu, MenuItem& menuItem) = 0; protected: MenuAction () {} }; class Test { class MenuCBA : public MenuAct...
google
android
opeq6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/opeq6.C
363
utf_8
1477d34b82967d572fc358778ff2b504
// { dg-do assemble } // Testcase for wrongful generation of operator =. class ivResource { public: ivResource (); private: ivResource & operator =(const ivResource &); }; class ivButtonState : virtual public ivResource { public: void operator=(ivButtonState &); }; class ivPrintBS : public ivButtonState { }; ...
google
android
loverload3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/loverload3.C
276
utf_8
2e6b8c32c4dda50e4b1589ef9e67befe
// { dg-do assemble } // PRMS Id: 2010 // Bug: g++ doesn't deal with overloads involving C-language fns properly. extern "C" double pow (double, double); inline double pow (double d, int e) { return pow (d, (double) e); } void foo () { pow (1.0, 1); pow (1.0, 1.0); }
google
android
overload3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload3.C
294
utf_8
e54b50f23269d12102e222619f2a54e1
// { dg-do assemble } // Bug: bar is considered to be overloaded (i.e. its // IDENTIFIER_GLOBAL_VALUES are TREE_LISTs) even though it isn't, // so default_conversion thinks it can't resolve the name. void foo (); void bar (); void baz () { void (*p)() = 1 ? (void (*)()) &foo : bar; }
google
android
cast1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/cast1.C
179
utf_8
5b2e6d162a150fb1b7a57feab087fb05
// { dg-do assemble } // Bug: g++ fails to grok functional casts in all situations. class A { public: typedef int B; static B foo() { return B(1); } // { dg-bogus "" } };
google
android
parse1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/parse1.C
157
utf_8
8de8c00c90b1c1c9fc5ef99276b6c06f
// { dg-do assemble } // Bug: g++ parses the declaration of r as a function declaration. void foo (int i) { int &r (i); r = 1; // { dg-bogus "" } }
google
android
access6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/access6.C
172
utf_8
3b6c2594ca82c2df2368cad55253186e
// { dg-do assemble } // Simple testcase for access control. class A { public: void f (); }; class B: protected A { }; class C: protected B { void g() { f (); } };
google
android
destruct4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/destruct4.C
274
utf_8
b992f53c34c645aeccccb6057d446f0b
// { dg-do assemble } // PRMS Id: 4342 // Bug: g++ fails to massage ambiguity in calling virtual destructor. class A { public: virtual ~A();}; class B: public A { }; class C: public A { }; class D: public B, public C { }; void foo () { D* p = new D; delete p; }