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
hidden-class10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class10.C
284
utf_8
c288e61deca8ad2660914a4297a7c80b
// { dg-do compile } // Verify that a friend class is hidden even if it overrides a builtin // function name. class A { friend class abort; abort *b; // { dg-error "type|expected" } };
google
chromium
koenig3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/koenig3.C
150
utf_8
0efd4ef624e1a631dad2972522c30301
extern "C" void abort (); struct S { }; void f(S, int) { abort(); } void f(S, double) {} S s; int main() { extern void f(S, int); f(s, 3.0); }
google
chromium
main1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/main1.C
32
utf_8
6438f8158c9b2b3fffe8884a62ce29af
struct main {}; int main () {}
google
chromium
hidden-class9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class9.C
234
utf_8
d13c196ccdbbc4683a8238093061dcba
// { dg-do compile } namespace N { class A { friend class B; }; } using N::B; // { dg-error "declared" }
google
chromium
extern-c-redecl5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/extern-c-redecl5.C
360
utf_8
61e0f5516fe31d2cad426334ee149b9a
// Origin: PR c++/41020 // { dg-do compile } class frok { int this_errno; friend int fork (void); // { dg-error "previous declaration .*?C\\+\\+. linkage" } }; extern "C" int fork (void) // { dg-error "conflicts with new declaration .*?C. linkage" }} { frok grouped; return grouped.this_errno; }
google
chromium
extern-c-redecl4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/extern-c-redecl4.C
306
utf_8
7c60f81e64a51ac83c0d2dbdd26d17e7
// Origin: PR c++/41020 // { dg-options "" } // { dg-do compile } // { dg-final { scan-assembler "call\[\t \]+\[^\$\]*?_Z4forkv" { target i?86-*-* x86_64-*-* } } } class frok { int this_errno; friend int fork (void); }; void foo () { fork (); }
google
chromium
ambig1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/ambig1.C
416
utf_8
f1339a059a53b8c932f6dd4870283209
// { dg-do compile } // Bug 16889:Undetected ambiguity. struct B { int f(); // { dg-error "int B::f" "" } }; struct B1 : virtual B {}; struct B2 : B {}; struct BB : B1, B2 {}; int i = BB().f(); // { dg-error "ambiguous" "" }
google
chromium
hidden-temp-class5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-temp-class5.C
231
utf_8
5a5f41370026fd44a0bad756fb1c01f2
// { dg-do compile } class A { template <class T> friend class B; }; template <class T> class B; B<int>* b;
google
chromium
using14
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/using14.C
88
utf_8
566f22665e5dbaacccc9bab0af697314
// PR c++/21784 // { dg-options "" } namespace mine { int cpow; } using mine::cpow;
google
chromium
koenig6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/koenig6.C
297
utf_8
2b57e70eb4d75a58c6bd335db965b478
// PR c++/17365 // ADL should not find B::N. namespace A { namespace B { template <typename T> struct N {int n_;}; } template <typename T> int N( T p ) { return p->n_; } template <typename T> void f( T p ) { N(p); } // #1 } int main() { A::B::N<int> n; A::f(&n); return 0; }
google
chromium
hidden-class11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class11.C
378
utf_8
d363d9de44498afed8d14153c451f6f9
// { dg-do compile } // Verify that a friend class is hidden even if it is hidden by a non-builtin // function name. namespace M { void F (void); class F; } namespace N { void F(void); class A { friend class F; }; } using namespace M; using namespace N; class F *b;
google
chromium
template1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/template1.C
527
utf_8
a793e64bb6b34881797f23d0f6a812f7
/* PR c++/3009 */ /* { dg-do run } */ // According to 14.6.2.4 of C++ Standard: // "If a base class is a dependent type, a member of that // class cannot hide a name declared within a template, or a // name from the template's enclosing scopes." class B { public: int foo() { return 1; } }; int foo() { return 0; }...
google
chromium
using19
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/using19.C
412
utf_8
2f7856e44d88c2a8a051c1b70aff3f85
// { dg-do compile } // C++ Standard, 7.3.3, clause 10: // "Since a using-declaration is a declaration, the restrictions on // declarations of the same name in the same declarative region (3.3) also // apply to using-declarations." namespace M { union A; void B(); } void A(); union B; using M::A; using M::B;
google
chromium
decl2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/decl2.C
637
utf_8
d64551040d13bf36f94a380b6b298ea5
// { dg-do compile } // PR 9053. Failed to consider templates that are disambiguated by // return type. template <typename T> class bar; template <> struct bar<const char*> { typedef void type; }; template <typename T> class qux; template <> struct qux<int> { typedef void type; }; template <typename T> typename bar<T>:...
google
chromium
two-stage5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/two-stage5.C
330
utf_8
55b606de81dcee47c1021a188831f526
// { dg-do run } extern "C" void abort (); namespace N { template <class T> T foo (T) { return T (); } template <class T> T bar (T t) { return foo (t); } } struct S { S (int i = 0): i_ (i) { } int i_; }; namespace N { /* template <> */ S foo (S) { return S (1); } } int main () { if (1 == N::bar (S()).i_) abo...
google
chromium
using8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/using8.C
362
utf_8
05105c11218492c8a6c6943b32a316ec
// { dg-do compile } // Origin: Bill Clarke <llib at computer dot org> // PR c++/11097: using declartion for a converter operator to a nested class // in a base type template <typename T> struct A { struct Nested {}; operator Nested*(); }; template <typename T> struct B : A<T> { using A<T>::operator typename A...
google
chromium
friend8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/friend8.C
250
utf_8
55fad96206146b00439be99fa14cb114
// Test that we look up a friend declared at top level ahead of an // undeclared friend found by argument dependent lookup. // { dg-do run } int f(int) { return 0; } struct S { friend int f(char) { return 1; } }; int main () { return f('a'); }
google
chromium
using7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/using7.C
298
utf_8
9b2f75de04724a15459525668a32458a
template <typename T, bool=T::X> struct A { int i; }; template <typename T> struct B : A<T> // { dg-error "incomplete" } { using A<T>::i; // { dg-error "incomplete" "incomplete" } // { dg-error "using" "using" { target *-*-* } 8 } }; B<void> b; // { dg-message "required" }
google
chromium
new1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/new1.C
456
utf_8
1054a720e51f3308719b6df5ebdd4766
// { dg-do compile } // Origin: <igodard at rational dot com> // PR c++/2518: operator new must not be looked up in local scope int main() { int i; void* operator new(__SIZE_TYPE__ s, int* p); int* e = new(&i) int; // { dg-error "no matching function" } // { dg-message "candidate" "candidate...
google
chromium
koenig1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/koenig1.C
286
utf_8
751d0b5e7453f5f49c388d10446f6515
// { dg-do compile } // PR 10026. We ICE'd class X; void foo() { X x(1); // { dg-error "incomplete type" "" } bar(x); // { dg-error "not declared" "" } }
google
chromium
koenig11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/koenig11.C
133
utf_8
b9e805fb75a33ef1129f6679048f585f
// Test that we treat unions like other classes in arg-dep lookup. union U { friend void f (U); }; int main() { U u; f(u); }
google
chromium
java2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/java2.C
1,137
utf_8
c640da1e1f515bb2b0001b9266b2da05
// { dg-do compile } // { dg-options "-fdollars-in-identifiers" } // Origin: Giovanni Bajo <giovannibajo at libero dot it> // Make sure that Java special functions can be called correctly. // (continue from java1.C) extern "Java" { typedef __java_int jint; namespace java { namespace lang { class Cl...
google
chromium
name-clash9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/name-clash9.C
162
utf_8
e75e8ca4f1fd8db629d15eaf98c1208b
// { dg-do compile } // PR c++/48010 struct A { struct type {}; // { dg-error "conflicts with previous" } typedef int type; // { dg-error "declaration" } };
google
chromium
using9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/using9.C
738
utf_8
0711b02435a6db8ce647317b3997b2d5
// { dg-do compile } // Origin: C++ Standard Draft (7.3.3/12) // PR c++/2294: using declarations should not conflict, but only cause // an ambiguous overload set to be created. namespace B { void f(int); // { dg-message "note" } void f(double); // { dg-message "note" } } namespace C { void f(int); // ...
google
chromium
using18
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/using18.C
367
utf_8
1444086871f0b0607a6cba4f9bcdcf10
// { dg-do compile } namespace N1 { void f (); struct f; // { dg-error "" "candidate" } } namespace N2 { void f (int); struct f; // { dg-error "" "candidate" } } namespace M { using namespace N1; using namespace N2; } using M::f; // { dg-error "ambiguous" }
google
chromium
conv-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/conv-3.C
385
utf_8
5ea2bf1f15c014fc72f6b7b8c42b05e8
// { dg-do compile } // { dg-final { scan-assembler "_ZNK2A1IiEcviEv" } } template <typename T> struct A1 { operator T () const; // this one }; struct A2 : A1<int> { template<typename T> operator T () const; }; int Foo (A2 const &b) { return b; }
google
chromium
forscope1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/forscope1.C
327
utf_8
c961035d55063ab35ff011e8098d8ea9
// { dg-do compile } // Bug 4206. We were nesting SCOPE_STMTs badly. struct A { A (); ~A (); }; void Go( ) { while (1) { switch (1) { default: {} } A d; } }
google
chromium
this1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/this1.C
164
utf_8
8b9ae54e36b3204ee122989fbde5a184
// PR c++/27581 // { dg-do compile } struct A { template<int> static void foo(); static void bar() { this->A::foo<0>(); } // { dg-error "unavailable" } };
google
chromium
using4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/using4.C
361
utf_8
a9f8bb8a4c2ceef1805b242e53567377
// { dg-do compile } // PR c++/9432: ICE in validate_nonmember_using_decl when decl is a // SCOPE_REF. template <class T> struct Foo; template <class T> struct Bar : public Foo<T> { void foo() { using Foo<T>::i; // { dg-error "not a namespace" } } };
google
chromium
strong-using-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/strong-using-2.C
414
utf_8
2acdd78e9203c9d17adab6f5c945e08a
// PR c++/13594 // { dg-options "" } // { dg-do compile } namespace foo { inline namespace foo_impl { class T; // { dg-error "T" "" } } } namespace bar { inline namespace bar_impl { class T; // { dg-error "T" "" } } using namespace foo; } namespace baz { using namespace foo; using namespace bar;...
google
chromium
using6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/using6.C
220
utf_8
8db693e8a73657ac0a6ba980e910013c
// { dg-do compile } // PR c++/9022, nested namespace in using declaration namespace gnu { namespace gcc { } } using gnu::gcc; // { dg-error "namespace" }
google
chromium
name-clash1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/name-clash1.C
204
utf_8
6c99bf6f0c2260471ad74e39e36cdf71
// { dg-do compile } // PR c++/5402 struct A { struct B {}; }; struct C { typedef int B; }; struct D : A { struct E : C {}; struct B {}; };
google
chromium
koenig5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/koenig5.C
1,450
utf_8
b819fd86a63b35c2e9f86a6b0832c379
// Koenig lookup is not defined as intended in the std. DR 218 gives // an indication of what is meant. This test case encapsulates the // current conservative behaviour namespace N { struct A {}; void One (...); // { dg-message "N::One" } void (*Two) (...); // { dg-message "N::Two" } namespace Three {} //...
google
chromium
friend4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/friend4.C
377
utf_8
96ad222df48d0097eb84d66dbf37d17d
// { dg-do compile } // Friend name lookup in class defined outside its namespace // (Local class case) void f() { class A { class B; class C; }; class A::B { friend class C; typedef int i; }; class A::C { A::B::i j; }; }
google
chromium
conv-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/conv-2.C
356
utf_8
b59dc1be1de7788c3e2134a73db76fc4
// { dg-do compile } // { dg-final { scan-assembler "_ZNK2A1cviEv" } } struct A1 { operator int () const; // this one }; struct A2 : A1 { template<typename T> operator T () const; }; int Foo (A2 const &b) { return b; }
google
chromium
hidden-class8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class8.C
246
utf_8
43ad4f369597420b26688a9f8ee0553a
// { dg-do compile } namespace N { class A { friend class B; }; } class N::B { // { dg-error "not name a class" } };
google
chromium
two-stage2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/two-stage2.C
251
utf_8
1d4d95969d27910bf0528926c351da6c
// { dg-do compile } // PR c++/2922 char& f(char); template<class T> void g(T t) { char& c1 = f(1); // not dependent char& c2 = f(t); // dependent } int&f (int); int main() { g(2); // two f(char) g('a'); // two f(char) }
google
chromium
error1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/error1.C
297
utf_8
e1065e3c32eb11e771ff730bee591915
// PR c++/17609 // { dg-do compile } namespace N { int i; } // { dg-message "N::i" } void foo() { i; } // { dg-error "not declared" } // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } 6 } using namespace N; void bar() { i; }
google
chromium
hidden-temp-class8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-temp-class8.C
266
utf_8
7329bb8e573ed03d12f2ea0f32cdb168
// { dg-do compile } class A { template <class T> friend class B; }; class C { friend class B; // { dg-error "argument required|friend" } };
google
chromium
friend6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/friend6.C
278
utf_8
f00af47e1b16d7d6e6577ae76572b806
// { dg-do compile } // PR c++/19258: Wrong lookup scope for friend defined in class. class X { template<class T> friend int ff(T*, int y=anX.x) { return y; } int f() { return ff(&anX); } static X anX; int x; }; X dummy;
google
chromium
redecl1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/redecl1.C
110
utf_8
bcba89d3ec64e8fc005f26cebc29ef75
// PR c++/14668 class A {}; // { dg-error "" } class B { static A *A; // { dg-error "" } }; A *B::A = 0;
google
chromium
crash1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/crash1.C
456
utf_8
eca250664b688ff2d60db784a03646f6
// { dg-do compile } // PR c++/11871 Regression namespace std { class A { public: enum result { ok }; }; template<typename T> class B : public A { public: typedef A::result result; }; } int main() { for(float result = 1.0;;); }
google
chromium
forscope2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/forscope2.C
127
utf_8
0a537641a6f07027fc6b83c330555682
// { dg-do compile } struct S { void foo() { for (_ptr; ;) {} // { dg-error "not declared" } _ptr = 0; } };
google
chromium
friend7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/friend7.C
421
utf_8
825ad6385b6944ed35c3c48ad981441e
// { dg-do compile } // PR c++/7874: Don't inject friend functions into global name space. namespace N { template<typename T> struct A { friend void f(A) { } }; } int main() { N::A<int> a; N::f(a); // { dg-error "not a member" } } struct S { friend void g(); friend void h(S); }; struct T { friend void g(); fri...
google
chromium
using12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/using12.C
80
utf_8
4aa371c96c095ece93ba36b9aa1ab516
// PR c++/16707 int i; using N::i; // { dg-error "'N' has not been declared" }
google
chromium
hidden-temp-class6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-temp-class6.C
232
utf_8
754fc789506af415caca6ae05d0b538d
// { dg-do compile } class B; namespace N { class A { template <class T> friend class B; B* b; }; }
google
chromium
typedef1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/typedef1.C
320
utf_8
8bcdfec3b2bc3c59b46d319647268367
// PR c++/33516 // { dg-do compile } struct S1; typedef S1 T1; struct S1 { typedef int U; T1::U i; }; struct S2; typedef S2 T2; struct S2 { typedef int U; }; T2::U j; struct S3; typedef S3 T3; struct S3 { typedef int U; S3::U i; }; void foo () { S1 s1; S2 s2; S3 s3; s1.i = 6; j = 7; s3.i = 8; }
google
chromium
java1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/java1.C
1,327
utf_8
982d219f3971a11f0bdf84813dcb1b80
// { dg-do compile } // { dg-options "-fdollars-in-identifiers" } // Origin: Giovanni Bajo <giovannibajo at libero dot it> // Make sure that Java special functions can be called correctly. extern "Java" { typedef __java_int jint; namespace java { namespace lang { class Class; class Object; ...
google
chromium
ptrmem1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/ptrmem1.C
163
utf_8
f30dda31dee159f3aebbbc269a5fd8e4
struct A { virtual void f (); }; struct B : public A { }; struct C : public A { }; struct D : public B, C { virtual void f (); }; void (D::*p)() = &D::f;
google
chromium
hidden-temp-class1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-temp-class1.C
236
utf_8
30e82b8c154368eba73727110f43e382
// { dg-do compile } class A { template <class T> friend class B; B<int> *b; // { dg-error "type|expected" } };
google
chromium
name-clash4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/name-clash4.C
242
utf_8
4e9fb69366257ce11558488f9cdac95d
// { dg-do compile } // PR c++/18100: Invalid nested type. struct A { template<int> struct A {}; // { dg-error "same name" } }; A::A<0> a; // { dg-error "not a template|constructor" }
google
chromium
scoped7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/scoped7.C
319
utf_8
36c8df686ba39d71b24a97d15b78bcba
//PR c++/11507 //The new parser used to fail on this. // { dg-do compile } namespace NS { void foo(bool arg1); } namespace M { namespace K { bool Bc(bool x); } void bar() { NS::foo (K::Bc(true)); // GCC could not find K or Bc. } }
google
chromium
using16
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/using16.C
471
utf_8
1788182ab6169bae6e77693083dd449b
// { dg-do compile } namespace M { struct S {}; // { dg-error "struct M::S" "candidate 1" } } namespace N { int S; struct S {}; // { dg-error "struct N::S" "candidate 2" } } using namespace M; using namespace N; struct ::S s; // { dg-bogus "ambiguous.*ambiguous" "duplicate error" } // { dg-error "reference to 'S'...
google
chromium
hidden-temp-class3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-temp-class3.C
234
utf_8
ab292b30848b42061657e1886f73b081
// { dg-do compile } class A { template <class T> friend class B; template <class T> class B; B<int> *b; };
google
chromium
conv-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/conv-1.C
505
utf_8
6050742dc94dc2938a38db83c24e67d0
// { dg-do compile } // Failed to spot ambiguous conversion struct A1 { operator int () const; // { dg-message "A1::operator" "" } }; struct A2 { operator int () const; // { dg-message "A2::operator" "" } }; struct B : A1, A2 { }; int Foo (B const &b) { return b; // { dg-error "ambiguous" "" } // { dg-message...
google
chromium
friend10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/friend10.C
236
utf_8
6379d610cdb9d3f95e70e88bdbaf87f7
// PR c++/18681 // Bug: The friend declaration in A failed to give C::D access to A::B // as specified in DR 45. class A { struct B; friend class C; }; class C { struct D { void f(); }; }; void C::D::f() { A::B* p; }
google
chromium
strong-using-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/strong-using-3.C
276
utf_8
7da1d317c0e74ab901f17a10189784da
// PR c++/13659 // { dg-options "" } // { dg-do compile } namespace bar { inline namespace foo { template <class T> void f(T, T); } template <class T> void f(T); } int main() { // Make sure both declarations are brought in. using bar::f; f(1); f(1, 1); }
google
chromium
scoped5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/scoped5.C
283
utf_8
fcbd72a09a4049e1a9619d23e1f3c841
// { dg-do compile } // PR c++/10230: ICE while determining if refered non-static member // is from a base type of the current class. class A { public: class B { public: int a; }; }; class C { public: void f(void) { sizeof(A::B::a); } };
google
chromium
hidden-class16
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class16.C
368
utf_8
1f90cef4dec7c40cc66289214d7ea0fe
// Origin PR c++/36019 // { dg-do compile } struct F { static const int y = 0; }; struct A { static const int x = 0; }; struct B : public A { template <typename A> static int f () { return A::x; // { dg-error "'x' is not a member of 'F'" } } }; int main () { int j = B::f<F> (); return 0; }
google
chromium
crash4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/crash4.C
184
utf_8
7e5cb27f2cb8fd20d4617c4cfb845085
// { dg-do compile } // // PR 3761 struct A {}; struct B {}; template <class T> struct Foo : A, B { void func(void); struct Nested { friend void Foo::func(void); }; };
google
chromium
hidden-class1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class1.C
213
utf_8
7cbc76b65ea52678814739292360a219
// { dg-do compile } class A { friend class B; B *b; // { dg-error "type|expected" } };
google
chromium
two-stage1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/two-stage1.C
313
utf_8
0f014086c6e90e67e8879d132fc019d6
/* PR c++/2437 */ /* { dg-do run } */ // Test of two-stage name lookup. int g(double) { return 0; } template <class T> struct X { int f() { return g(2); } // should call g(double) }; inline int g(int) { return 1; } int main() { return X<int>().f(); // should call g(double), but used to call g(int) }
google
chromium
decl1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/decl1.C
755
utf_8
7f3fadfecc160e192db942c4e24b7c75
// { dg-do compile } // PR 8702. Failure to match templates. template <typename X> struct C1{}; template <typename X> struct C2 { template<typename Y> operator C1<Y>(); template<typename Y> operator C2<Y>(); }; template<typename X> template<typename Y> C2<X>::operator C1<Y>() { return C1<Y>(); } struct A { oper...
google
chromium
pretty1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/pretty1.C
49
utf_8
9fc063d780e4510399927cfe832e8770
void foo() { for ( __PRETTY_FUNCTION__ ; ; ) ; }
google
chromium
enum1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/enum1.C
87
utf_8
3920de89ada5d72255d7202c8a1f6da8
// PR c++/14476 struct tree_common { enum tree_code code : 8; // { dg-error "" } };
google
chromium
friend5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/friend5.C
339
utf_8
187ba092057b229619d98cf5e000c6e1
// { dg-do compile } // PR c++/3332: Friend function lookup in class defined outside its // namespace namespace N { class A; } class N::A { void x(); friend void func(void); }; namespace N { void func(void); } void N::func(void) { N::A a; a.x(); } int main() { return 0; }
google
chromium
hidden-class6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class6.C
188
utf_8
75d6130ec7488ae9b8d9c00b3d8439f1
// { dg-do compile } // PR c++/1016: Name lookup for injected friend class class B; namespace N { class A { friend class B; B* b; }; }
google
chromium
friend9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/friend9.C
290
utf_8
9d3865e2b7ad7f2ada40573eca29da7d
// PR c++/25492 class Base { public: class Nested {}; }; class Derived:public Base { public: class Nested { public: void m(); }; class AnotherNested { friend class Nested; AnotherNested() {} }; }; void Derived::Nested::m() { Derived::AnotherNested instance; }
google
chromium
scoped3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/scoped3.C
378
utf_8
fd5b1d6b45ff24d721908d389585b869
// { dg-do compile } // PR 7964. ICE with scoped method call struct A { virtual void ostr() const; }; class B : public virtual A {}; template<typename T> struct C : public B { void ostr() const { B::ostr(); } }; template struct C<int>;
google
chromium
hidden-temp-class9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-temp-class9.C
256
utf_8
553918de93ea2e1a018822b6746d8a0a
// { dg-do compile } class A { friend class B; }; class C { template <class T> friend class B; // { dg-error "not a template" } };
google
chromium
anon7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/anon7.C
376
utf_8
8efa7c4066efa37096c6aa5f256ab6dc
// PR c++/39560 // { dg-options -Wunused } struct X { }; class Z { public: X* cc(int c); }; class F { public: typedef X* (Z::*MethO)(int); typedef X* (F::*MethF)(int); template<MethO m> X* xwrapper(int i) { union { Z *z; F *f; }; // { dg-bogus "unused" } f = this; return ((z-...
google
chromium
two-stage3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/two-stage3.C
340
utf_8
673f5cb94e0c6c5a86bce634e4eb2be5
// { dg-do compile } // PR c++/2922 namespace tpl_ { template<class T> char test(T); template<class T> struct check { static T const t; enum { value = 1 == sizeof(test(t)) }; }; double test(int); } bool const two_phase_lookup_supported = tpl_::check<int>::value; int compile_time_assert[two_phase_lookup_s...
google
chromium
ambig5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/ambig5.C
267
utf_8
f4bbc35342b6996af8bf4b092976e3ee
// PR c++/13377 // { dg-do compile } namespace N { namespace M {} // { dg-error "M" } } namespace M {} // { dg-error "M" } using namespace N; using namespace M; // { dg-error "namespace-name|ambiguous" }
google
chromium
anon4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/lookup/anon4.C
62
utf_8
57709e2c9e6767a799d8af24fcd9fa61
static union { int i; }; int *ip; void g() { ip = &i; }
google
chromium
partition1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tree-prof/partition1.C
1,118
utf_8
53fa0402b1fdf9ca5505893587d14d29
/* { dg-require-effective-target freorder } */ /* { dg-options "-O2 -freorder-blocks-and-partition" } */ /* { dg-skip-if "PR target/47683" { mips-sgi-irix* } } */ struct A { A () __attribute__((noinline)); ~A () __attribute__((noinline)); }; A::A () { asm volatile ("" : : : "memory"); } A::~A () { asm volatile ("" : :...
google
chromium
inline_mismatch_args
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tree-prof/inline_mismatch_args.C
752
utf_8
d5c1aa2747e777e103754805cd94dbb2
/* { dg-options "-O2 -fdump-tree-einline" } */ class DocId { public: DocId() { } DocId(const DocId &other) { } }; int g; class Base { public: virtual void Foo(DocId id) { g++; } }; class Super: public Base { public: void Foo(DocId id) { } void Bar(Base *base, DocId id) __attribute__((noinline)); }; void Sup...
google
chromium
partition3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tree-prof/partition3.C
230
utf_8
ea1da784f9e49aa78c8f869baf3f3bd7
// PR middle-end/45566 // { dg-require-effective-target freorder } // { dg-options "-O -fnon-call-exceptions -freorder-blocks-and-partition" } int k; int main () { try { if (k) throw 6; } catch (...) { } }
google
chromium
partition2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tree-prof/partition2.C
261
utf_8
513d9db2c08a96002c2640cd5bc9619e
// PR middle-end/45458 // { dg-require-effective-target freorder } // { dg-options "-fnon-call-exceptions -freorder-blocks-and-partition" } // { dg-skip-if "PR target/47683" { mips-sgi-irix* } } int main () { try { throw 6; } catch (...) { } }
google
chromium
indir-call-prof-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tree-prof/indir-call-prof-2.C
2,025
utf_8
80d09170dea54500770122f27eddf44e
/* { dg-options "-O" } */ int foo1(void) { return 0; } int bar1(void) { throw 1; } void foo2(void) { } void bar2(void) { throw 1; } void __attribute__((noinline,noclone)) test1(void (*f)(void)) { (*f)(); } void __attribute__((noinline,noclone)) test2(void (*f)(void)) { (*f)(); } int __attribute__((noinline,noclone)) t...
google
chromium
indir-call-prof
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tree-prof/indir-call-prof.C
723
utf_8
4dc349da4967d37af86f2fe0ef0ffb87
/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */ struct A { A () {} virtual int AA (void) { return 0; } }; struct B : public A { B () {} virtual int AA (void) { return 1; } }; void * __attribute__((noinline,noclone)) wrap (void *p) { return p; } int main (void) { A a; B b; ...
google
chromium
no-rtti-voidptr
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/no-rtti-voidptr.C
205
utf_8
11ddfffc9b05013900dc0f7fcf21274e
// { dg-do compile } // { dg-options "-fno-rtti" } // PR C++/28687 struct A { virtual ~A() { } }; struct B : A { }; A* f() { return new B(); } int main() { void* b = dynamic_cast<void*>(f()); }
google
chromium
typeid5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/typeid5.C
225
utf_8
81cc751e8ba06b5401bbaef96e3aa2e4
// PR c++/29928 // { dg-do compile } #include <typeinfo> struct S; void f() { const std::type_info& info1 = typeid(int []); const std::type_info& info2 = typeid(S [3]); const std::type_info& info3 = typeid(S []); }
google
chromium
crash2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/crash2.C
303
utf_8
34c4c8f1721c4f70c2261dcc1b0a7630
struct facet { virtual ~facet(); }; struct ctype_base {}; struct ctype : facet, ctype_base {};
google
chromium
crash3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/crash3.C
142
utf_8
afdb3cc7ece3c7c60179cd6d1819ab81
// PR c++/23947 // { dg-do compile } class A {}; class B {}; class C : public A, public B {}; class D : public C {}; void f () throw (D) { }
google
chromium
typeid1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/typeid1.C
109
utf_8
a4ca49fa3677bf87a27b0e961eab1cee
#include <typeinfo> struct A { virtual ~A() {} }; int main() { A* a = new A; typeid(*a).name(); }
google
chromium
anon-ns1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/anon-ns1.C
228
utf_8
2bcb8e987d41c50dbd1de216296fd071
// PR c++/49440 // The typeinfo name for A should start with * so we compare // it by address rather than contents. // { dg-final { scan-assembler "\"\*N\[^\"\]+1AE" } } namespace { class A { }; } void f() { throw A(); }
google
chromium
predefined-rtti-macro-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/predefined-rtti-macro-2.C
140
utf_8
d53958b1de4c01a672e8ec50c3bfa248
// { dg-do compile } // { dg-options "-fno-rtti" } struct B { }; void f(B* bp) { bp = #ifndef __GXX_RTTI static_cast<B*>(0); #endif }
google
chromium
repo1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/repo1.C
312
utf_8
9f6df32bba52c4b0c518b3f546aa5491
// PR c++/22204 // { dg-options "-frepo" } // { dg-require-host-local "" } // { dg-skip-if "dkms are not final links" { vxworks_kernel } } #include <typeinfo> template<int> struct function1 { function1() { typeid(int[100]); } }; function1<1> b; int main () {} // { dg-final { cleanup-repo-files } }
google
chromium
incomplete1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/incomplete1.C
141
utf_8
b5e04568d275d9d8237df66b459409ef
// PR c++/28109 // { dg-do compile } #include <typeinfo> struct A; void foo() { A a; // { dg-error "incomplete type" } typeid (a); }
google
chromium
dyncast3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/dyncast3.C
1,446
utf_8
2ac14f900e107af4423a784213db1cc3
// This testcase used to crash while looking in A for my_module. I'm still // not sure it's well-formed, but it works now because of the optimization // to look at the expected address first. // { dg-do run } extern "C" int puts (const char *); extern "C" void abort (); struct my_object { my_object() { puts ("in ...
google
chromium
typeid9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/typeid9.C
420
utf_8
1f8ec1c3ba15e07e5cd63d52ea64abab
// Test that the typeid name for a local class is properly null-terminated. // { dg-do run } #include <string.h> #include <typeinfo> #include <stdio.h> int f() { struct A {}; struct B {}; const std::type_info &ti = typeid(A); const std::type_info &ti2 = typeid(B); puts (ti.name()); puts (ti2.name()); retu...
google
chromium
typeid3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/typeid3.C
218
utf_8
3e23755748cd7e94d3bc13c5d2f78cc9
#include <typeinfo> template <template <class> class T> struct A { void error() { typeid(T).name(); // { dg-error "missing" } } }; template <class T> struct B {}; template void A<B>::error();
google
chromium
dyncast2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/dyncast2.C
321
utf_8
c13886fc7e0e1c4f2f10e10b0cf68ec5
// PR c++/34364 // { dg-do run } struct A { virtual ~A () {} }; struct B : public A { template <typename T> struct C { static void f (A &a) { dynamic_cast <B &>(a).g (); } }; B () : c (6) {} void g () { c++; } int c; }; B b; int main (void) { B::C<int>::f (b); return b.c != 7; }...
google
chromium
dyncast4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/dyncast4.C
355
utf_8
84b81c1f12b7f888ee1b6e2e05445b09
// Test to make sure that we keep searching if we don't find the type we // want at the expected address. // { dg-do run } struct A { virtual void f() {}; }; struct B: A { }; struct C: A { }; struct D: B, C { }; int main() { D d; A* ap = static_cast<B*>(&d); C* cp = dynamic_cast<C*>(ap); if (cp == 0) ...
google
chromium
dyncast1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/dyncast1.C
390
utf_8
1922780b3e3f1002f29284ad087d37d6
class JunkBase { public: virtual void DoSomething( void ) = 0; protected: virtual ~JunkBase( void ) {} JunkBase( void ) {} }; class Junk : protected JunkBase { public: Junk( void ) : JunkBase() {} virtual ~Junk( void ) {} protected: inline JunkBase * AsBase( void ) { return dynamic_cast< Ju...
google
chromium
typeid7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/typeid7.C
649
utf_8
b0c0786c803eaf05e6755f729c87257e
// PR c++/32260 // { dg-do compile } // { dg-options "-O2 -W -Wall" } #include <typeinfo> const std::type_info & f1 (int i) { return typeid (i + 1); } const std::type_info & f2 () { return typeid (int); } struct A { A (); virtual ~A (); void foo (); }; const std::type_info & f3 () { return typeid (A); ...
google
chromium
no-rtti
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/no-rtti.C
199
utf_8
8f46e7645aa4679909b2df4d299e9558
// { dg-do compile } // { dg-options "-fno-rtti" } // PR C++/10891 struct A { virtual ~A() { } }; struct B : A { }; A* f(); int main() { B* b = dynamic_cast<B*>(f()); // { dg-error "" } }
google
chromium
template1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/template1.C
359
utf_8
bce635f684a724553abba95d702b1cb8
// PR c++/49387 #include <typeinfo> struct ResourceMonitorClient { }; template <typename T> struct ResourcePool : public ResourceMonitorClient { virtual ~ResourcePool() { } }; template <typename T> struct BaseWriter { BaseWriter() { typeid(ResourcePool<int>*); } virtual void run() { ResourcePool<i...
google
chromium
typeid8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/typeid8.C
607
utf_8
3bf0c0d4697ad1ada3cda87b9bc2dc61
// PR c++/36405 // { dg-do compile } #include <typeinfo> struct A { void foo () { typeid (foo).name (); // { dg-error "invalid use of member" } typeid (A::foo).name (); // { dg-error "invalid use of member" } } void bar () { typeid (foo).name (); // { dg-error "invalid use of member" } typei...
google
chromium
tinfo1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/tinfo1.C
842
utf_8
daac611a89b8fa8aa874e3b9f2cc9663
// Test if a local definition is in a linkonce/comdat section. // { dg-do compile } // { dg-final { scan-assembler "_ZTIP9CTemplateIhE\[: \t\n\]" } } // { dg-final { scan-assembler-not "(.globl|.global)\[ \]+_ZTIP9CTemplateIhE" } } // { dg-final { scan-assembler-not ".section\[^\n\r\]*_ZTIP9CTemplateIhE\[^\n\r\]*" } }...