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
ptrmem1
.C
native_client/nacl-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/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-temp-class1.C
239
utf_8
24386d1bd9589b7dedc4605e12d5d632
// { dg-do compile } class A { template <class T> friend class B; B<int> *b; // { dg-error "no type|expected" } };
google
chromium
name-clash4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/name-clash4.C
232
utf_8
8987951c940f83baf2c7608b76695a1a
// { 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" }
google
chromium
scoped7
.C
native_client/nacl-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/nacl-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/nacl-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/nacl-gcc/gcc/testsuite/g++.dg/lookup/conv-1.C
436
utf_8
334a58bf975baf837b83e8405358424f
// { 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" "" } }
google
chromium
friend10
.C
native_client/nacl-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/nacl-gcc/gcc/testsuite/g++.dg/lookup/strong-using-3.C
255
utf_8
ed66c2bd8be1e94505421cb6dab7cbdd
// PR c++/13659 // { 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/nacl-gcc/gcc/testsuite/g++.dg/lookup/scoped5.C
350
utf_8
2a64c61d7cff0a81c852ac88971f57a2
// { 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; // { dg-error "object missing" } }; }; class C { public: void f(void) { sizeof(A::B::a); } // { dg-error "this location" } };
google
chromium
hidden-class16
.C
native_client/nacl-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/nacl-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/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class1.C
216
utf_8
0673992edce3a2ed0347433f5a52904a
// { dg-do compile } class A { friend class B; B *b; // { dg-error "no type|expected" } };
google
chromium
two-stage1
.C
native_client/nacl-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/nacl-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/nacl-gcc/gcc/testsuite/g++.dg/lookup/pretty1.C
49
utf_8
9fc063d780e4510399927cfe832e8770
void foo() { for ( __PRETTY_FUNCTION__ ; ; ) ; }
google
chromium
enum1
.C
native_client/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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
two-stage3
.C
native_client/nacl-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/nacl-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/nacl-gcc/gcc/testsuite/g++.dg/lookup/anon4.C
62
utf_8
57709e2c9e6767a799d8af24fcd9fa61
static union { int i; }; int *ip; void g() { ip = &i; }
google
chromium
indir-call-prof
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-prof/indir-call-prof.C
895
utf_8
1e015db2c28f0131b9bf647f8de438b9
/* { dg-options "-O2 -fdump-tree-optimized -fdump-tree-tree_profile" } */ struct A { A () {} virtual int AA (void) { return 0; } }; struct B : public A { B () {} virtual int AA (void) { return 1; } }; int main (void) { A a; B b; A* p; p = &a; p->AA (); p = &b; p->AA (); return ...
google
chromium
no-rtti-voidptr
.C
native_client/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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
predefined-rtti-macro-2
.C
native_client/nacl-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/nacl-gcc/gcc/testsuite/g++.dg/rtti/repo1.C
248
utf_8
8e11f8f4f99de8dfcc1792a3b2734451
// PR c++/22204 // { dg-options "-frepo" } // { dg-require-host-local "" } #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/nacl-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
typeid3
.C
native_client/nacl-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/nacl-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
dyncast1
.C
native_client/nacl-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/nacl-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/nacl-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
typeid8
.C
native_client/nacl-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/nacl-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\]*" } }...
google
chromium
typeid4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/rtti/typeid4.C
430
utf_8
f45226306cb853d7f47a657db3e4f853
// { dg-do run } // { dg-options "-O2" } #include <typeinfo> #include <iostream> struct A { virtual ~A () {} }; struct APtr { APtr (A* p) : p_ (p) { } A& operator* () const { return *p_; } A* p_; }; int main () { APtr ap (new A); std::type_info const* const exp = &typeid (*ap); for (bool cont = true;...
google
chromium
typeid2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/rtti/typeid2.C
293
utf_8
f03a5377eca516c74e77fcf76b40f948
// { dg-do run } #include <typeinfo> template <typename T> const char *print_type (const T &) { return typeid(T).name(); } /* no template */ void pp1 (int) {} template <typename X> void pp2 (X) {} int main () { if (print_type (&pp1) != print_type (&pp2<int>)) return 1; }
google
chromium
crash1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/rtti/crash1.C
208
utf_8
7345c9463c7d47c7d425463846af6b14
// { dg-do compile } // PR 7788. ICE class foo; extern const foo bar; class bar;
google
chromium
predefined-rtti-macro-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/rtti/predefined-rtti-macro-1.C
163
utf_8
352a1ba9eb698ac9c7b5ff1d691318bb
// { dg-do compile } struct A { virtual ~A() { }; }; struct B : A { }; void f(B* bp) { bp = #ifdef __GXX_RTTI dynamic_cast<B*>(static_cast<A*>(0)); #endif }
google
chromium
darwin-builtin-linkage
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/rtti/darwin-builtin-linkage.C
530
utf_8
a30f80781bea4012b3066258d71adff2
/* { dg-do compile { target *-*-darwin* } } */ /* { dg-final { scan-assembler-not "\\.weak_definition __ZTI" } } */ /* Verify that none of the type_info structures for the fundamental types are emitted as weak on Darwin. */ #include <cxxabi.h> namespace __cxxabiv1 { using namespace std; // This has special mea...
google
chromium
cv1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/rtti/cv1.C
222
utf_8
7c2277ddbea5545cda84aae94fdb88ad
// { dg-do run } #include <typeinfo> #include <string.h> struct S {}; typedef S volatile T[4]; T t[3]; const std::type_info& ti = typeid (t); int main () { if (strcmp (ti.name (), "A3_A4_1S") != 0) return 1; }
google
chromium
typeid6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/rtti/typeid6.C
151
utf_8
fa4939a5b9ad3f1e2d86d16ba8f86a6f
// PR c++/33463 namespace std { class type_info {}; } template<int> void foo() { !typeid(void); // { dg-error "!typeid\\(void\\)|candidates" } }
google
chromium
init-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/tls/init-1.C
363
utf_8
672816eb7e5f78098e143fcebf95f2de
/* Valid initializations. */ /* { dg-require-effective-target tls_native } */ __thread int i = 42; static int j; __thread int *p = &j; /* Note that this is valid in C++ (unlike C) as a run-time initialization. */ int *q = &i; /* Valid because "const int k" is an integral constant expression in C++. */ __thread c...
google
chromium
diag-5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/tls/diag-5.C
201
utf_8
ba47f159845d15494da6497d230a450d
// PR c++/30536 // Invalid __thread specifiers. // { dg-require-effective-target tls_native } struct A { __thread register int i; }; // { dg-error "multiple storage classes|storage class specified" }
google
chromium
diag-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/tls/diag-1.C
448
utf_8
68f6e05b258a2d736730f2813ad0bf76
// Valid __thread specifiers. // { dg-require-effective-target tls_native } __thread int g1; extern __thread int g2; static __thread int g3; void foo() { extern __thread int l1; static __thread int l2; } struct A { static __thread int i; }; __thread int A::i = 42; template <typename T> struct B { static __...
google
chromium
diag-4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/tls/diag-4.C
318
utf_8
861e01382acc51946e8b3079e33b7b50
/* Invalid __thread specifiers. */ /* { dg-require-effective-target tls_native } */ __thread typedef int g4; /* { dg-error "multiple storage classes" } */ void foo() { __thread auto int l2; /* { dg-error "multiple storage classes" } */ __thread register int l4; /* { dg-error "multiple storage classes" } */ }
google
chromium
static-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/tls/static-1.C
367
utf_8
caa0ba3c129dce5da87608fe9c420918
// { dg-do run } // { dg-options "-O2" } // { dg-require-effective-target tls_runtime } // { dg-additional-sources "static-1a.cc" } extern "C" void abort (); extern int test (); struct A { static __thread int i; }; __thread int A::i = 8; int main () { if (A::i != 8) abort (); if (test ()) abort (); ...
google
chromium
init-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/tls/init-2.C
331
utf_8
7a4a5a91e4b35af4e4c05aa82abe7e22
/* Invalid initializations. */ /* { dg-require-effective-target tls_native } */ extern __thread int i; __thread int *p = &i; /* { dg-error "dynamically initialized" } */ extern int f(); __thread int j = f(); /* { dg-error "dynamically initialized" } */ struct S { S(); }; __thread S s; /* { dg-error "" } two erro...
google
chromium
diag-3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/tls/diag-3.C
389
utf_8
ced86e64b11f4ca32b25baf6a950cc01
// Report invalid extern and __thread combinations. // { dg-require-effective-target tls_native } extern int j; // { dg-error "previously declared here" } __thread int j; // { dg-error "follows non-thread-local" } extern __thread int i; // { dg-error "previously declared here" } int i; // { dg-error "follows thre...
google
chromium
trivial
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/tls/trivial.C
63
utf_8
5012133131ee10aaef28214a5c8940d2
// { dg-require-effective-target tls_native } __thread int i;
google
chromium
diag-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/tls/diag-2.C
1,136
utf_8
f8110705785a050cc253eed8ebe2f52f
/* Invalid __thread specifiers. */ /* { dg-require-effective-target tls_native } */ __thread extern int g1; /* { dg-error "'__thread' before 'extern'" } */ __thread static int g2; /* { dg-error "'__thread' before 'static'" } */ __thread __thread int g3; /* { dg-error "duplicate '__thread'" } */ typedef __thread int...
google
chromium
truefalse
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp/truefalse.C
470
utf_8
d80eeb1b5ab70a413bed1a37f44a69d6
/* Source: Neil Booth, 18 Apr 2003. */ /* { dg-do preprocess } */ /* { dg-options "-ansi -pedantic -Wundef" } */ /* Check that for C++ we handle true and false correctly, and do not treat them as undefined identifiers. */ #if true /* { dg-bogus "is not defined" } */ #error foo /* { dg-error "foo" } */ #endif #if...
google
chromium
c++_cmd_1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp/c++_cmd_1.C
238
utf_8
7e8a47b64bd4b7100fb7912bb8130ffa
int main () { return 0; }
google
chromium
c++98-pedantic
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp/c++98-pedantic.C
288
utf_8
8ce78309bd631829da82f2798d24d628
/* { dg-do preprocess } */ /* { dg-options "-std=c++98 -pedantic" } */ /* This file is for testing the preprocessor in -std=c++98 -pedantic mode. Neil Booth, 2 Dec 2000. */ #if 1LL /* { dg-warning "long long" } */ #endif
google
chromium
string-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp/string-1.C
292
utf_8
ead0ed22e4b6b79f8450b4a030173cbc
// Test location of diagnostics for interpreting strings. Bug 17964. // { dg-do compile } const char *s = "\q"; // { dg-error "unknown escape sequence" } const char *t = "\ "; // { dg-error "unknown escape sequence" } const char *u = "";
google
chromium
_Pragma1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp/_Pragma1.C
359
utf_8
923080ef50b2f1b142bdc12bde733eb6
// PR c++/27748 // This is supposed to succeed only if // the target defines HANDLE_PRAGMA_PACK_PUSH_POP // and doesn't define HANDLE_PRAGMA_PACK_WITH_EXPANSION. // { dg-do compile { target { ! { powerpc-ibm-aix* *-*-solaris2* fido-*-* m68k-*-* sh*-[us]*-elf m32c-*-* } } } } #define push bar #define foo _Pragma ("pac...
google
chromium
string-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp/string-2.C
224
utf_8
f84dfddf756951bbf37a1a9e3972a445
// Test diagnostics for interpreting strings: This is a pedwarn. // { dg-do compile } // { dg-options "" } const char *s = "\q"; // { dg-warning "unknown escape sequence" }
google
chromium
ucnid-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp/ucnid-1.C
577
utf_8
b84d9012b6465e41dff6383936a93a52
/* { dg-do preprocess } */ /* { dg-options "-std=gnu++98 -pedantic -fextended-identifiers" } */ \u00AA /* { dg-error "not valid in an identifier" } */ \u00AB /* { dg-error "not valid in an identifier" } */ \u00B6 /* { dg-error "not valid in an identifier" } */ \u00BA /* { dg-error "not valid in an identifier" } */ \u0...
google
chromium
stringop-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp/stringop-1.C
863
utf_8
9b49b49677814c73da8c0db6d2d2811c
/* Test for buffer overrun stringizing named operators longer than 4 characters. */ /* { dg-do compile } */ #define str(x) #x #define var(v,a,b,c,d) static const char v##a##b##c##d[] = str(xor_eq) #define var1(v,a,b,c) \ var(v,a,b,c,0); var(v,a,b,c,1); var(v,a,b,c,2); var(v,a,b,c,3); \ var(v,a,b,c,4); v...
google
chromium
c++98
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp/c++98.C
232
utf_8
731959b0908b124d4eee4dab104d68bb
/* { dg-do preprocess } */ /* { dg-options "-std=c++98" } */ /* This file is for testing the preprocessor in -std=c++98 mode. Neil Booth, 2 Dec 2000. */ #if 1LL #endif
google
chromium
pedantic-errors
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp/pedantic-errors.C
158
utf_8
5e10de393d1872d51958157aa6257743
/* { dg-do preprocess } */ /* { dg-options "-std=c++98 -pedantic-errors" } */ #if 1 #endif 1 /* { dg-error "extra tokens at end of #endif directive" } */
google
chromium
weak
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp/weak.C
107
utf_8
388f26d66093d4cf51084fa41b5fbe6e
// { dg-options "-fno-weak" } #if __GXX_WEAK__ #error "__GXX_WEAK__ defined when -fno-weak in use" #endif
google
chromium
normalize-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/cpp/normalize-1.C
733
utf_8
d0fc7f2038f9a304e12ca3a354fa5aae
/* { dg-do preprocess } */ /* { dg-options "-fextended-identifiers -Wnormalized=id" } */ \u00AA \u00B7 \u0F43 /* { dg-warning "not in NFC" } */ a\u05B8\u05B9\u05B9\u05BBb a\u05BB\u05B9\u05B8\u05B9b /* { dg-warning "not in NFC" } */ \u09CB \u09C7\u09BE /* { dg-warning "not in NFC" } */ \u0B4B \u0B47\u0B3E /* { dg-wa...
google
chromium
ns1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/ns1.C
140
utf_8
f6c50007b333f25964b3ad2eb06e3773
// PR c++/14821 namespace A { namespace B {} } namespace A { namespace Alias = ::A::B; } namespace A { namespace Alias = ::A::B; }
google
chromium
gc2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/gc2.C
576
utf_8
bc5371eb8e8dcf79efb0889828991560
// PR c++/12316 // { dg-do compile } // { dg-options "--param ggc-min-expand=0 --param ggc-min-heapsize=0" } inline void FOO() {} template<typename> struct A { A() {} ~A() throw() {} }; template<typename> struct B { static void foo(); static void bar() { foo(); } }; struct C {}; template<typename> struc...
google
chromium
scope1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/scope1.C
323
utf_8
97e48186eadf96baa75dab50f7628d6a
// { dg-do compile } // PR 3381 namespace N { template<class T> class A { }; } template class N::A<unsigned>; // this works (by itself) template class ::N::A<int>; // but this doesn't
google
chromium
switch3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/switch3.C
262
utf_8
bb7141945a25ded3ef95f8a4fab53bff
// PR c++/39371 // { dg-do compile } void foo (bool b) { switch ((unsigned int) b) { case 1: case 2: break; } } void bar (unsigned char b) { switch ((unsigned int) b) { case 1: case 257: case 513: break; } }
google
chromium
pr27495
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/pr27495.C
162
utf_8
d135b9a72f0f848337f5db8cd4d42ca2
// Test to make sure we do not ICE on this invalid program. struct A { template<int> void foo(); void bar() { this.A::foo<0>(); } // { dg-error "" } };
google
chromium
spu2vmx-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/spu2vmx-1.C
310
utf_8
a9957b37b938af52bd091dea4f661da6
/* { dg-do compile { target powerpc*-*-* } } */ /* { dg-require-effective-target powerpc_spu } */ /* { dg-options "-maltivec" } */ #include <altivec.h> #include <spu2vmx.h> vec_uint4 f(vec_uint4 a, vec_uint4 b) { return spu_add(a, b); } vec_float4 f(vec_float4 a, vec_float4 b) { return spu_add(a, b); }
google
chromium
array1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/array1.C
204
utf_8
ceb0c0d2e878f1b7898a912bfe02d365
// Test typeid of multidimensional array with no bounds. // { dg-do compile } #include <typeinfo> int main() { const char *s = typeid(double[][]).name(); // { dg-error "bounds|confused" } return 0; }
google
chromium
pr36944
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/pr36944.C
326
utf_8
8063a4cb70e924f46779754da6c98175
/* { dg-do compile } */ class XObject { public: int foo; }; class XObjectPtr { public: explicit XObjectPtr(XObject* theXObject = 0) : m_xobjectPtr(theXObject) { } private: XObject * m_xobjectPtr; }; class SelectionEvent { public: SelectionEvent(bool selection) : m_selection() {} const XObjectPtr m_selectio...
google
chromium
anon-union
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/anon-union.C
273
utf_8
e7bda64a0fd9d0057a48814a978e1851
// { dg-do compile } // { dg-options -O2 } int foo (); double bar (void) { union { char a[8]; double b; }; a[0] = foo (); a[1] = foo (); a[2] = foo (); a[3] = foo (); a[4] = foo (); a[5] = foo (); a[6] = foo (); a[7] = foo (); return b; }
google
chromium
field1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/field1.C
540
utf_8
852e036628024a86c673fccff94ec3f4
// { dg-do compile } // PR c++ 9483. accepted fields with same name as class struct test { char test; // { dg-error "with same name as class" "" } test(); }; template <typename T> struct X { char X; // { dg-error "with same name as class" "" } X (); }; template <> struct X<int> { char X; // { dg-error "wi...
google
chromium
infloop-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/infloop-1.C
294
utf_8
78e796e41e24a5aabf8b9d7868a3129a
// PR 18300: This sends old compilers into an infinite loop on x86_64 struct base1 { }; struct base2 { }; struct base3 { }; struct derived : base1, base2, base3 { }; void foo(derived); int main() { foo(derived()); }
google
chromium
ctor1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/ctor1.C
227
utf_8
77b7a83e4c4a267c5a040e6fe91b27f2
/* { dg-do compile } */ // PR C++/30303 // This used to ICE because we did not return NULL // in grokfndecl when an error happened. class A { int i; }; A::A() { A(); } /* { dg-error "definition of implicitly-declared" } */
google
chromium
cv_func
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/cv_func.C
662
utf_8
63b7b98a70bc3e591093a887e3c9dc16
// { dg-do compile } // { dg-options "-pedantic -pedantic-errors" } typedef int FIC(int) const; typedef int FI(int); FIC f; // { dg-error "qualified" } // { dg-error "ignoring" "ignoring" { target *-*-* } 6 } struct S { FIC f; // OK const FI g; // { dg-error "qualifier" } int h(int) const; }; FIC S::*pm = &S:...
google
chromium
pr39496
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/pr39496.C
928
utf_8
13032d4b520ba4039fd6df337bd67601
// PR target/39496 // { dg-do compile { target { { i?86-*-linux* x86_64-*-linux* } && ilp32 } } } // { dg-options "-O0 -fverbose-asm -fno-omit-frame-pointer -mtune=i686 -msse2 -mfpmath=sse" } // Verify that {foo,bar}{,2}param are all passed on the stack, using // normal calling conventions, when not optimizing. // { dg...
google
chromium
canon-31724
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/canon-31724.C
124
utf_8
011b8ddc593601155e855d2cf648258c
struct ac {ac();}; ac spline_rep1(void) { typedef ac at[2]; ac * b = new ac[2]; at *a = (at*)b; return (*a)[0]; }
google
chromium
error7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/error7.C
248
utf_8
1879c54136b23a17a6c8b571f8a19c12
// { dg-do compile } // Origin: <andrewp at andypo dot net> // c++/8046: ICE on illegal code involving destructor being treated as bit-not // expression class A; namespace N {} void foo(void) { N::~A(); // { dg-error "not a class-name" } }
google
chromium
i386-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/i386-1.C
588
utf_8
a4ba2b7b6eafda312857cd7cbde61596
/* { dg-do run { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-msse2" } */ #include <xmmintrin.h> #include "cpuid.h" static void sse2_test (void) { float a = 1.0f; float b = 2.0f; float c = 3.0f; float r; __m128 v = _mm_set_ps(a, b, c, 0); v = (__m128)_mm_srli_si128((__m128i)v, 4); _mm_store_...
google
chromium
ptrmem2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/ptrmem2.C
814
utf_8
c79782b762cef64300df319862fcdc0f
// { dg-do compile } // PR 4379. We created pointers to member references and pointers to // member fields when we shouldn't have. struct D { int &m; // { dg-error "invalid use of non-static data member" "" } static int &s; int Foo (); }; template<class T> int f1(T x); template<class T> int f2(T x); i...
google
chromium
opaque-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/opaque-2.C
391
utf_8
b4568481fda7d8fe66f09f6c78ec5fab
/* { dg-do compile } */ /* { dg-options "-mcpu=8540 -mspe -mabi=spe -mfloat-gprs=single" } */ /* { dg-skip-if "not an SPE target" { ! powerpc_spe_nocache } { "*" } { "" } } */ #define __vector __attribute__((vector_size(8))) typedef float __vector __ev64_fs__; __ev64_fs__ f; __ev64_opaque__ o; extern void bar (__ev6...
google
chromium
static1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/static1.C
301
utf_8
2224c373f6ef60421d14c9389ef3412d
// PR c++/9574 // The new parser ICE on this test and then it could // not find z in bar::bar(). // { dg-do compile } struct X { void operator[](const int& __k); }; struct foo { static X x; }; struct bar { int z; bar () { foo::x[z]; } };
google
chromium
error29
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/error29.C
661
utf_8
f6ef4e2724fa7ce062da94fa1778b050
// PR c++/35334 // { dg-do compile } // { dg-bogus "not supported by" "" { target *-*-* } 0 } __complex__ unsigned int i; int j; char k; __complex__ double l; double m; float n; void foo () { ((__complex__ int)i)(); // { dg-error "cannot be used as a function" } ((__complex__ int)j)(); // { dg-error "cannot be ...
google
chromium
friend1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/friend1.C
293
utf_8
4e454805fdba784ccf383bf015fee2fc
// { dg-do compile } // Bug 4476. We tangled up inline friends and pure virtuals during // class definition. struct A { friend void f () { } void g (A a) { } };
google
chromium
error12
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/error12.C
126
utf_8
e1eac1beda3a4145544bb54bc5a9b600
//PR c++/28292 extern "Java" { struct A { void foo(void; // { dg-error "before|incomplete type|invalid use" } }; }
google
chromium
pr35011
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/pr35011.C
418
utf_8
4ab0218701107940b50c945a0965a43d
// { dg-do compile } // { dg-options "-O3 -fcheck-data-deps" } double foo(const double* p0, const double* p1, const double* q0) { double d; for (; p0 != p1; ++p0, ++q0) d += *p0 * *q0; return d; } struct A { double x[3]; const double* begin() const { return x; } }; struct B { A a0, a1; double d; ...
google
chromium
const2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/const2.C
379
utf_8
65c0a747dff974d4f19eda6304e002f9
// PR c++/3331: just because 'this' is readonly and bars[0].b is readonly // doesn't mean that the result of the member reference is readonly. struct foo { int a; struct bar { int foo::* b ;}; static const bar bars[]; void bad () { this->*(bars[0].b) = 42; // { dg-bogus "read-only" "" } } }; cons...
google
chromium
anon5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/anon5.C
437
utf_8
26c484a2f2e6b5ca50ab1340cb4b29d6
// PR c++/34094 // { dg-do link { target { ! { *-*-darwin* *-*-hpux* *-*-solaris2.* } } } } // { dg-options "-g" } namespace { struct c { static const bool t = 0; }; } const bool &f() { return c::t; // { dg-message "undefined" "undefined" { target *-*-* } 0 } // Some targets report the error for the pre...
google
chromium
error13
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/error13.C
249
utf_8
3abed794d8856544709a2aa1e35dd512
//PR c++/28258 struct A { // { dg-message "note" } A(void x); // { dg-error "invalid use|incomplete type|candidates" } }; struct B : A {}; // { dg-error "no matching function for call" } B b; // { dg-message "synthesized method" }
google
chromium
warning1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/warning1.C
390
utf_8
3ab882b7c3b941e862b055e33a605891
// { dg-do compile } // PR c++/7804 // Floating point formatting in error and warning messages extern "C" int printf(const char *, ...); struct S { static const float inf = 1.0f / 0.0f; // { dg-warning "1.0|float|initialization" } static const float nan = 0.0f / 0.0f; // { dg-warning "0.0|float|initialization" }...
google
chromium
pr39060
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/pr39060.C
591
utf_8
b5e1f069377d2f6c229e4b9cec2afc7d
// PR c++/39060 // { dg-do compile } struct A { A(void* i=); // { dg-error "with|specification" } A(void* i=); // { dg-error "overloaded" } A(void* i=); // { dg-error "overloaded" } void operator+ (void* i=); // { dg-error "arguments" } virtual void foo1(=); // { dg-error "identifier" } void foo2(=); //...
google
chromium
error2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/error2.C
385
utf_8
a7f642f46d2d9259194f51e24e5b9ee6
// { dg-do compile } // PR 196. Misleading diagnostic namespace N { class B { friend void operator>>(int, class B); }; class N { friend void operator>>(int,class N); }; } void N::operator>>(int, N::B) // { dg-error "N::N::B|N::operator>>" } { }
google
chromium
default1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/other/default1.C
244
utf_8
9e7395f0094f6f5737290e2034fc9ed7
// PR c++/24103 // ICE in simple_cst_equal // { dg-do compile } // { dg-options "" } struct S { int i; }; struct A { A(S = (S){0}); }; struct B { B(S = (S){0}); }; B::B(S) {}