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
devirt-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-2.C
978
utf_8
0dba6d75aa6fd7afd6de9c1bb16bb4f7
/* Verify that simple virtual calls using this pointer are converted to direct calls by ipa-cp. */ /* { dg-do run } */ /* { dg-options "-O3 -fno-early-inlining -fno-inline -fdump-ipa-cp -fdevirtualize" } */ extern "C" void abort (void); class A { public: int data; virtual int foo (int i); int middleman (in...
google
android
decl-plugin-test
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/plugin/decl-plugin-test.C
876
utf_8
9d3407a3a51156df6b12203598d2c5e4
extern int global; // { dg-warning "Decl Global global" } int global_array[] = { 1, 2, 3 }; // { dg-warning "Decl Global global_array" } int takes_args(int arg1, int arg2) { int local = arg1 + arg2 + global; // { dg-warning "Decl Local local" } return local + 1; } int global = 12; // { dg-warning "Decl Global glo...
google
android
attribute_plugin-test-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/plugin/attribute_plugin-test-1.C
588
utf_8
fae03225a25cca8f1dbda83c6ce8c939
// { dg-warning "Callback to register attributes" "" { target *-*-* } 0 } void normal_func (char c, char c2); void normal_func (char __attribute__((user("param"))) c, char); void normal_func (char c, char __attribute__((user("param"))) c2) { } // { dg-warning "attribute 'user' on param 'c' of function normal_func" } ...
google
android
header-plugin-test
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/plugin/header-plugin-test.C
56
utf_8
b393922db8d338bed7f3bcf037edd19c
// Test case for the dumb plugin. // { dg-do compile }
google
android
self-assign-test-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/plugin/self-assign-test-1.C
1,177
utf_8
7be17227e6d3f44de792489c4efeed3b
// Test the self-assignemnt detection plugin. // { dg-do compile } // { dg-options "-O" } class Foo { private: int a_; public: Foo() : a_(a_) {} // { dg-warning "assigned to itself" } void setA(int a) { a_ = a_; // { dg-warning "assigned to itself" } } void operator=(Foo& rhs) { this->a_ = rhs.a...
google
android
self-assign-test-3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/plugin/self-assign-test-3.C
1,211
utf_8
83135d30e0c44ed545ee45f64b498e70
// Test the self-assignemnt detection plugin with the 'disable' argument. // { dg-do compile } // { dg-options "-O -fplugin-arg-selfassign-disable" } class Foo { private: int a_; public: Foo() : a_(a_) {} // { dg-bogus "assigned to itself" } void setA(int a) { a_ = a_; // { dg-bogus "assigned to itself" ...
google
android
self-assign-test-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/plugin/self-assign-test-2.C
1,250
utf_8
2f17422b2d230b0a4445005cb3502d19
// Test the self-assignemnt detection plugin without checking of operator-eq. // { dg-do compile } // { dg-options "-O -fplugin-arg-selfassign-no-check-operator-eq" } class Foo { private: int a_; public: Foo() : a_(a_) {} // { dg-warning "assigned to itself" } void setA(int a) { a_ = a_; // { dg-warning ...
google
android
pragma_plugin-test-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/plugin/pragma_plugin-test-1.C
577
utf_8
0555e81b1b7c9c8e06b4e9d9ffccb7ff
// { dg-warning "Callback to register pragmas" "" { target *-*-* } 0 } int some_func (int c); #pragma GCCPLUGIN sayhello "here" // { dg-warning "'pragma GCCPLUGIN sayhello' outside of function: here" } int some_func (const char* s) { #pragma GCCPLUGIN sayhello "at start" // { dg-warning "'pragma GCCPLUGIN sayhello' ...
google
android
dumb-plugin-test-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/plugin/dumb-plugin-test-1.C
1,146
utf_8
c595ed1ac1831b257035f373fac8a3ef
// Test case for the dumb plugin. // { dg-do compile } // { dg-options "-O -fplugin-arg-dumb_plugin-ref-pass-name=ccp -fplugin-arg-dumb_plugin-ref-pass-instance-num=1" } class Foo { private: int a_; public: Foo() : a_(a_) {} // { dg-warning "Before genericizing function" } void setA(int a) { a_ = a_; }...
google
android
error20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/error20.C
293
utf_8
218bee6f8ef89f6fec38dcc527310b88
// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } // PR c++/17821 struct A { A(int i) {} }; struct B { int i; }; struct C { B* p; }; int main() { C c; A(c.p.i); // { dg-error "9:request for member 'i' in 'c.C::p', which is of pointer type 'B" } return 0; }
google
android
pr20118
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/pr20118.C
255
utf_8
7f6e10791d7c1d2556e34458f5dc3067
// { dg-do compile } // { dg-options "-fshow-column" } template<typename t>struct foo { static const int i; }; const int foo<bool>::i = 5; // { dg-error "11:specializing member .foo<bool>::i. requires .template<>. syntax" } int main() { return 0; }
google
android
stmtexpr1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/stmtexpr1.C
142
utf_8
306b5f567acd6eaa85224e96d73ce3b9
// { dg-do compile } // { dg-options "" } int main (int argc, char **argv) { int a = ({ 1 ? 0 : 1; }); return ({ argc > 1 ? 1 : 0; }); }
google
android
crash53
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/crash53.C
410
utf_8
bb6ac4a17ab02af350881f64213ce26e
// PR c++/35112 namespace X { struct A; } // { dg-message "struct X::A" } namespace Y { struct A; } // { dg-message "struct Y::A" } namespace Z { struct A; } // { dg-message "struct Z::A" } namespace W { struct A; } // { dg-message "struct W::A" } using namespace X; using namespace Y; using namespace Z; using nam...
google
android
enum3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/enum3.C
111
utf_8
b6417b0027d2c08da74d972e5e9d29ca
// PR c++/28261 struct A {}; // { dg-error "A::A" } A::A (enum { e }) {} // { dg-error "defined|prototype" }
google
android
crash9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/crash9.C
296
utf_8
5818f331167c496db06ad694932a1beb
// { dg-do compile } // PR c++/10793: ICE in handling base class when the current class // contains error. template <typename> struct A {}; template <typename> struct A<INVALID> : A<int> { }; // { dg-error "not declared|invalid|token|extra" }
google
android
linkage3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/linkage3.C
83
utf_8
f860807cf54031b8df626f746711d411
// PR c++/37877 // { dg-do compile } extern "C++" struct S { static int x; } s;
google
android
constant1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/constant1.C
184
utf_8
5e710a192eedbb63fef23d8e83b354e1
// { dg-options -std=c++98 } void f () { switch (0) { case (3, 0): // { dg-error "" } break; } } int g (); struct S { int i : (false ? g () : 1); // { dg-error "" } };
google
android
bitfield5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/bitfield5.C
89
utf_8
472e82655269a7428276db0560093d16
// PR c++/46282 template<int> class A { A : i() {} // { dg-message "" } int i; };
google
android
crash56
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/crash56.C
327
utf_8
28ddbaa14692a16c706c5c2beb55f24b
/* PR c++/43081 */ /* { dg-do compile { target c++11 } } */ struct A { typedef void (F)(); F f = []{}; /* { dg-error "invalid pure" } */ }; struct B { typedef void (F)(); F f = 1; /* { dg-error "invalid pure" } */ virtual F f2 = 2; /* { dg-error "invalid pure" } */ F f3 = 3; /* { dg-error "invalid pure" }...
google
android
tmpl-tmpl-operator1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/tmpl-tmpl-operator1.C
375
utf_8
46e5b7b0e2493a6b4b30cb9948f3f116
// PR c++/8857 // { dg-do compile } template <typename T> struct A { template <typename U> operator U() { return sizeof(U); } }; template <typename T> struct B { template <template <typename U> class X> operator X<double>() { return X<double>(); } }; int main() { A<double> a; B<long> b; a = b; }
google
android
using1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/using1.C
46
utf_8
6bd4c0f7191355f693af56ab02582e5d
namespace A { using ::B; } // { dg-error "" }
google
android
namespace3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/namespace3.C
194
utf_8
b2cbb96c1cb51b252c9cad30717d2f28
/* PR c+/3816 */ /* { dg-do compile } */ namespace A {} namespace OtherNamespace { typedef struct { int member; } A; // used to conflict with A namespace } // end of namespace
google
android
ambig2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/ambig2.C
446
utf_8
3942d08ed7cbdaac837b06646132916e
// { dg-do compile } // PR 9212. We erroneously accepted an ill-formed // function-declaration, rather than a variable initializer. struct A { enum E { e }; A(E); }; struct B { enum F { f }; B(F); }; struct C { C(A, B, A); }; C c(A(A::e), B(B::f), A(A::e)); // This is not a function declaration
google
android
template5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/template5.C
385
utf_8
eb5012efbf2e76d0649338687d64eab1
// { dg-do compile } // PR 3902. More type/decl confusion. template <class T> struct S { S foo (T (T)); S foo (T(const T&)); }; int main () { S<int> (S<int>::*pf1)(int (int)) = &S<int>::foo; S<int> (S<int>::*pf2)(int (const int&)) = &S<int>::foo; }
google
android
unnamed1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/unnamed1.C
245
utf_8
92ada8b4167dd116c5c66ea62a120b06
// 9.4.2/4: Unnamed classes and classes contained directly or indirectly // within unnamed classes shall not contain static data members. typedef struct { // { dg-message "unnamed" } static int i; // { dg-error "static data member" } } A;
google
android
repo1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/repo1.C
154
utf_8
15c20313893567659b867565ddb52b45
// { dg-options "-frepo" } // { dg-require-host-local "" } extern "C" inline void f() {} int main () { f(); } // { dg-final { cleanup-repo-files } }
google
android
angle-bracket
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/angle-bracket.C
190
utf_8
bc8c4ed875b2c4b0e6b1ec9bcec25d41
// { dg-do compile } int main() { ( int() > int() ); return 0; }
google
android
ctor7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/ctor7.C
263
utf_8
cd3a6bbede42f377a3da5af13e16ebb5
//PR c++/28505 struct A { A : (); // { dg-error "primary-expression|incomplete type" } A : (int); // { dg-error "primary-expression|incomplete type|'int'" } }; struct B { char c; A a; }; B b = (B){0}; // { dg-error "compound-literals" }
google
android
pr31952-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/pr31952-2.C
472
utf_8
7e6ff18d87a2c84c1903a94d4b31133b
// PR c++/31952 void f0() { try { } catch (void *e) // { dg-message "previously" } { void *e; // { dg-error "redeclaration" } } } void f1() { try { } catch (void *e) { { void *e; // Ok, not outermost block. } } } void f2() try { } catch (void *e) // { dg-message "pre...
google
android
defarg11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/defarg11.C
271
utf_8
529313f5ea976406c251194ef2f9e0b0
// { dg-do compile } // { dg-options "-pedantic" } class foo { public: void operator& (int = 1); // { dg-error "default argument" } void operator++ (int = 2); // { dg-warning "default argument" } void operator-- (int = 3); // { dg-warning "default argument" } };
google
android
template12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/template12.C
115
utf_8
7ed414cad5851726c320604ea56d95bd
template <int J> struct A { }; struct B { template <int I> struct C : public A<I> {}; typedef double I; };
google
android
crash36
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/crash36.C
411
utf_8
e31b740be86fc08cf90985288e04b94d
// PR c++/32567 // { dg-do compile } // { dg-options "-std=c++98" } template <typename... T> struct A // { dg-warning "variadic templates" } { static T &t; // { dg-error "not expanded with" "not expanded" } // { dg-message "T" "T" { target *-*-* } 7 } static const int i = sizeof (++t); // { dg-error "was n...
google
android
redef2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/redef2.C
142
utf_8
ea5aebd8cd9820744d1d08f3b5429dca
// { dg-do compile } char * d [10]; // { dg-message "8: previous declaration as" } char e [15][10]; int (*f)(); int d; // { dg-error "" }
google
android
angle-bracket2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/angle-bracket2.C
246
utf_8
0befa26c74e8cbfa279f5b49a61408eb
// { dg-do compile } // Contributed by MattyT <mattyt-bugzilla at tpg dot com dot au> // PR c++/14028: Parser accepts invalid unbalanced bracket. template <int> struct A {}; template <typename TP> class B : public A<4 {}; // { dg-error "" }
google
android
cast1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/cast1.C
193
utf_8
012dcd0e9b2243e71ee6be0c01ac6a6d
// PR c++/13536 // { dg-require-effective-target ilp32 } */ // { dg-options "-w" } #include <typeinfo> void f() { (int((char*)0)); sizeof ((int((char*)0))); typeid ((int((char*)0))); }
google
android
ivdep
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/ivdep.C
281
utf_8
69b33deb6f06bb118a45d7839cc58fbd
/* { dg-do compile } */ /* PR other/33426 */ void foo(int n, int *a, int *b, int *c, int *d, int *e) { int i, j; #pragma GCC ivdep for (i = 0; ; ++i) { /* { dg-error "missing loop condition in loop with 'GCC ivdep' pragma before ';' token" } */ a[i] = b[i] + c[i]; } }
google
android
parse1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/parse1.C
117
utf_8
146f8527c55edf2aa401fbe3bf9f8237
/* PR c++/50 */ /* { dg-do compile } */ namespace A {typedef int Z;} int main(void) { A::Z* z; z->A::Z::~Z(); }
google
android
defarg4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/defarg4.C
455
utf_8
acfa06861c017963f9c07523acb57fdf
// { dg-do compile } // PR c++ 9162. default args got left unprocessed struct S { friend int foo (const S&, int = 100); }; S s; int i = foo (s); struct R { template <typename T> R (T, int = 0); }; int Foo () { R s (1); } template <typename T> struct Q { int Foo (T, int = 0); }; int Foo (Q<int> *s) { s->Foo (1...
google
android
constant6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/constant6.C
339
utf_8
1f1ea9b1dfbfdad52826fde93326f9d6
// PR c++/19883 template<typename T> struct A { static const T i = 1; char a[int(i)]; }; template<int> struct B {}; template<typename T> struct C { static const T i = 2; B<int(i)> a; }; template< typename T, T N > struct integral_c { static const T value = N; typedef integral_c< T, static_cast<T>((valu...
google
android
access6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/access6.C
368
utf_8
f9481feac597cbeb954234d2f50f7631
// { dg-do compile } // PR c++/3765: Changing access from public to private by member // using declaration. class A { public: int foo() { return 1; } // { dg-error "inaccessible" } }; class B : public A { private: using A::foo; }; int main() { B b; return b.foo(); // { dg-error "this context" } }
google
android
ctor5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/ctor5.C
141
utf_8
ecb95d97861e13e0906b5bdd938f7e2a
// PR c++/27309 struct A { int i; // { dg-message "previous" } A() i() {} // { dg-error "declaration" } }; struct B { A a; }; B b;
google
android
crash35
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/crash35.C
160
utf_8
5194e08088db0ba805ec7f6468c6a749
/* This used to ICE. */ /* { dg-do compile } */ struct a {}; class foo : public a, a // { dg-error "duplicate base" } { /* { dg-error "at end of input" } */
google
android
ctor4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/ctor4.C
115
utf_8
c98adb0de8743928eaf1466baf071cbf
// PR c++/27279 // { dg-do compile } struct A { A(void,void); // { dg-error "incomplete type|invalid use" } };
google
android
defarg6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/defarg6.C
246
utf_8
8649c92bbc4962e03bb01e44973f0119
// { dg-do compile } // PR c++/13166: ICE default function argument for friend declaration. namespace sc_dt { class sc_length_param { friend int compare_unsigned(int if_v_signed = 0) {} }; }
google
android
catch1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/catch1.C
124
utf_8
624bb3ca0554e6b3fb470f487ec8c1cc
// PR c++/28249 // { dg-do compile } void foo() { try {} catch (long long long) {} // { dg-error "long long long" } }
google
android
crash25
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/crash25.C
235
utf_8
e3496ce9889e97cda81ccaf581b0f310
// PR c++/20536 // Found by Wolfgang Wieser 03/2005. // { dg-do compile } struct yyguts_t { class TestScanner* yyextra_r; // { dg-error "forward declaration" } }; TestScanner::TestScanner() {} // { dg-error "invalid use" }
google
android
crash64
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/crash64.C
117
utf_8
9780b0576f8f381caa012fd27c2b608b
// PR c++/58565 // { dg-options "" } void foo() { int i = ({ L: ; }); // { dg-error "void value not ignored" } }
google
android
parens1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/parens1.C
203
utf_8
de20c30d40f4cceef57124b5828bf816
/* PR c++/8237 */ /* { dg-do compile } */ class A { public: A() { } }; class B { public: B(A a) { } void form() { } }; int main() { // This used to give a parse error. B(A()).form(); }
google
android
builtin2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/builtin2.C
59
utf_8
d8b50f7519f0c33caf6717bf07e5c8ae
// PR c++/14432 // { dg-options "" } struct Y {}; Y y1;
google
android
error5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/error5.C
837
utf_8
59539587f9ce69267e04ecab37d68dd8
// PR c++/13269 // { dg-options "-fshow-column" } class Foo { int foo() return 0; } }; // { dg-error "30:expected identifier before numeric constant" "identifier" { target *-*-* } 4 } // { dg-error "23:named return values are no longer supported" "named return" { target *-*-* } 4 } // the column number info of this...
google
android
crash28
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/crash28.C
641
utf_8
13f84e278094b4130876743926689ceb
template <class _Tp> class insert_iterator<slist<_Tp> > {}; // { dg-error "not a class template|not declared in this scope|expected unqualified-id|extra" } template <class _Value> class insert_iterator<int > { // { dg-error "template" } hash_set<_Value>; }; template<int> struct A<X<> > {}; // { dg-error "not a class ...
google
android
error14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/error14.C
515
utf_8
44c23d4a99191cf960efe169fd78b7eb
// { dg-options "-fshow-column" } // PR c++/13970 struct X { template< typename Z > Z Zunc() { return Z(); } template< typename Z > void Zinc() { } void tst() { Zunc<int>(); Zinc<int>( //); // } }; // { dg-error "2:expected '.' at end of input" "at end...
google
android
crash1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/crash1.C
49
utf_8
721a281ff33124a1c49ed8d68d2419fb
struct s { s(std::b o) { } }; // { dg-error "" }
google
android
funptr1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/funptr1.C
251
utf_8
8bf1527135b5cd5516b6bbd9bd9c62d2
// PR c++/9282 // { dg-do compile } typedef void (*fptr)(); struct A { template<int> static void foo() {} template<fptr f> static void bar() { (*f)(); } }; fptr f = A::bar< A::foo<0> >;
google
android
constant7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/constant7.C
107
utf_8
e773e9fc506890dda1d6fbb37fd77ae4
// PR c++/19991 enum { e = 1 }; template<typename> struct A { static const int i = e; char a[i]; };
google
android
offsetof9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/offsetof9.C
614
utf_8
7f291291c36ce0760b815fd17deee991
/* PR c/32041 */ /* { dg-do run } */ struct S { int c; struct { float f; } sa[2]; }; char a[__builtin_offsetof (S, sa->f) == __builtin_offsetof (S, sa[0].f) ? 1 : -1]; template <int N> struct T { int c[N]; struct { float f; } sa[N]; static int foo () { return __builtin_offsetof (T, sa->f); } stati...
google
android
struct-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/struct-1.C
149
utf_8
bf3916285ed2309a4ee27696a63242d1
// PR c++/18731 template<typename T> struct T::A {}; // { dg-error "invalid class name" }
google
android
nontype1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/nontype1.C
318
utf_8
975159f65456dba4b16d2ea9f6f10aac
// { dg-do compile } // PR c++/13289: Incorrectly reject non-type template argument that has // dependent type template <class T, T t> class C {}; template <class T, T t> class D { C<T, t-1> c; };
google
android
namespace11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/namespace11.C
114
utf_8
307391ca01b5e3f3edb4a285d4a148bc
// PR c++/43069 namespace std { template < typename > void swap (); } template std::swap // { dg-error "" }
google
android
ref-qual1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/ref-qual1.C
384
utf_8
19c9483f0726842c500357ad04acc983
// PR c++/57068 enum Enums { Enum1 = 0x00000000, Enum2 = 0x00000001 }; class Flags { public: Flags() : i(0) {} Flags(int i): i(i) {} Flags operator&(Enums f) { return Flags(Enums(i & f)); } operator bool() { return i; } private: int i; }; Flags windowState() { return Flags(); } int main() { if (b...
google
android
fused-params1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/fused-params1.C
311
utf_8
a008f92d788da0c9f15cdcad4fc19251
// PR c++/8785 // { dg-do compile } template <int N,typename T> struct A // { dg-error "" } { typedef T X; template <int M> void foo (const A<M,X>&); }; template <int N,int M,typename T> void A<N,T>::foo (const A<M,X>&) {} // { dg-error "" }
google
android
for1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/for1.C
209
utf_8
7e88973bdfdc21a3a39293ea054d3657
// PR c++/23440 // { dg-do compile } // { dg-options "" } # 0 "for1.C" void foo() { for (;;) // { dg-error "at end of input" "" { target *-*-* } 0 }
google
android
typespec1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/typespec1.C
85
utf_8
4d4dcf31f0a26386e361aca8846521cc
// PR c++/26571 struct A {}; unsigned A a; // { dg-error "expected initializer" }
google
android
typename8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/typename8.C
285
utf_8
fc99557b544b211def78f05030375621
// { dg-options "-fpermissive -w" } struct A { typedef int X; }; int i = typename A::X();
google
android
colon-autocorrect-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/colon-autocorrect-1.C
497
utf_8
c5147fdec1f8af57aa91c7960d61a37c
// PR c++/44522 // { dg-do compile } namespace x { struct a { }; a A0; } x:a a2; // { dg-error "nested-name-specifier" } x::a a3 = a2; x:a f (void) // { dg-error "nested-name-specifier" } { x::a a4; // x:a would parse like a label return a4; } x::a g (x:a a4) // { dg-error "nested-name-specifier" }...
google
android
lookup4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/lookup4.C
56
utf_8
0df586078c3c48e038440a354879ed6a
// PR c++/16637 typedef int I; struct S { ::I I; };
google
android
error3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/error3.C
398
utf_8
db0b26d01799a937f4aeb79af9db8842
// { dg-options "-fshow-column" } // PR c++/10779 static void InstantiateConstraint(const float&, unsigned, void(*AddFunction)(const TYPE&,bool&, char*, char*, unsigned*)); // { d...
google
android
friend5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/friend5.C
152
utf_8
11ef58ca2998b51220ffff019f7fcb9c
// PR c++/23694 extern "C" struct A { friend void foo(int) {} // { dg-message "declaration" } friend void foo() {} // { dg-error "foo" "err" } };
google
android
error25
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/error25.C
832
utf_8
b9ccf94d56a7c35ef00c32c84f4563ae
// { dg-do compile } // { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } // Origin: Steven Bosscher <steven at gcc dot gnu dot org> // PR c++/17401: ICE with invalid pure specifier // NOTE: This also tests QoI of diagnostic for invalid pure specifiers. // Please do *not* relax the dg-error tests. ...
google
android
access1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/access1.C
230
utf_8
41352a2a4cc8c007e49113d208fc4fac
// { dg-do compile } // PR c++/9554: Access checking for template ID as class head. class enclose { template<typename T> struct enclosed; }; template <> struct enclose::enclosed<int>;
google
android
error19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/error19.C
363
utf_8
5212b2e255dc83be331f93b8b3715b6c
// { dg-options "-fshow-column -fmessage-length=0 -ansi -pedantic-errors -Wno-long-long " } // PR C++/17867 struct A // { dg-message "8:operator=|no known conversion for implicit" } { A(int); }; const A& foo(); void bar() { foo()=A(0); // { dg-error "8:no match for 'operator='" } // { dg-message "candidate...
google
android
crash30
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/crash30.C
415
utf_8
291361ab389af29d2fe990be6fcbc43b
// { dg-do compile } namespace N { template<int> struct A { operator int() const; }; } namespace M { template<int> struct A {}; } namespace P { typedef int I; } template<typename> void foo() { +typename N::A<0>(); // { dg-bogus "expected" } } template<typename> void bar() { +typename M::A<0>; // { dg-error "exp...
google
android
fn-typedef1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/fn-typedef1.C
235
utf_8
e0c303cb9febd486b13b92d1bcdc185f
// PR c++/40750 // { dg-do run } extern "C" void abort (); typedef void Fn() const; struct Foo { Fn fn; }; bool called = false; void Foo::fn() const { called = true; } int main() { Foo f; f.fn(); if (!called) abort(); }
google
android
semicolon3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/semicolon3.C
3,213
utf_8
9048f641e56f80ef6ac544af5f7634d4
// PR c++/45331 // { dg-do compile } // { dg-options -std=c++98 } struct OK1 { int a; } // no complaints *s5; struct OK2 { int a; } // no complaints &s6 = *(new OK2()); struct OK3 { int a; } // no complaints (s7); __SIZE_TYPE__ test_offsetof (void) { // no complaints about a missing semicolon return...
google
android
typename4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/typename4.C
211
utf_8
95be08d8904a9272cf1346d3a396852b
// { dg-do compile } // PR c++/9364: ICE processing typename with name error. void find(typename int&); // { dg-error "typename|void|expected" }
google
android
crash29
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/crash29.C
249
utf_8
b81fff544050c834b6a58605e98eb828
template<int> struct A { A(void* = &operator new); };
google
android
offsetof5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/offsetof5.C
107
utf_8
d8bdf5788845d2336959275e9ea01e79
// PR c++/16618 #include <stddef.h> struct test { const char a; }; int main() { offsetof(test,a); }
google
android
friend2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/friend2.C
316
utf_8
ae8288fe09de8b635d6006a2c82ededf
// { dg-do compile } // PR c++/8591 // Template or class detection in friend declaration namespace NS { template <class T1, class T2, class T3 = int, class T4 = int> struct C {}; } template <class T> class X { friend class NS::C; // { dg-error "template|friend" } }; X<int> c;
google
android
error30
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/error30.C
243
utf_8
2ae7ac29f23156097f82fbafc938565b
// PR c++/30854 // { dg-do compile } // { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } struct A { A(); A(int); }; A a = -A(); // { dg-error "operand type is 'A'" } A b = -A(5); // { dg-error "operand type is 'A'" }
google
android
dtor4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/dtor4.C
220
utf_8
0e5bfee2fe061692451a1e06a97362d4
// { dg-do compile } // Contributed by Paul Koning <pkoning at equallogic dot com> // PR c++/15947: Accept destructor as template in qualified-id template <int N> struct X { ~X(); }; template <int N> X<N>::~X<N>(){}
google
android
cond4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/cond4.C
380
utf_8
2b89c868d5f6925718dfd16fdc5617c6
// PR c++/38635 // { dg-do compile } void foo() { if (st...
google
android
local-class1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/local-class1.C
310
utf_8
d71bba5a605bcf9e53086d66758b1f00
// Bug 19608: ICE on invalid void f () { class c { friend void g () { } // { dg-error "local class" "" } }; }
google
android
ctor8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/ctor8.C
249
utf_8
81e65c2a9ba3aa29d6a354330d5691cb
//PR c++/28505 struct A { A : (); // { dg-error "primary-expression|incomplete type" } A : (int); // { dg-error "primary-expression|incomplete type|'int'" } }; A a = (A){0}; // { dg-error "too many initializers|compound-literals" }
google
android
attr-ctor1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/attr-ctor1.C
162
utf_8
c51ee1846816a95e9af6e3d6b9e65695
// PR c++/6992 // { dg-do compile } // { dg-require-named-sections "" } class A { __attribute__((section("whatever"))) A(); };
google
android
constant5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/constant5.C
366
utf_8
b1b0ff115af64cdc79ca6322cda049d6
// { dg-options "-std=c++98 -pedantic-errors" } enum E { a = 24.2, // { dg-error "constant" } b = (int)3.7, c = int(4.2), d = (int)(4.2 + 3.7), // { dg-error "constant" } e = int(4.2 - 3.7), // { dg-error "constant" } f = (int)17.25 }; struct S { static const int i = (int)4.2; int j[(int)4.2]; sta...
google
android
template7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/template7.C
130
utf_8
3b33bd604d8a5886b0fee16fa6705f7c
// { dg-options -std=c++98 } template <int I> void f(); // { dg-message "note" } void g() { f<(3, 2)>(); } // { dg-error "" }
google
android
ref1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/ref1.C
257
utf_8
176cd37bac0e17d41ebe5f535df4a12c
// PR c++/6402 // { dg-do compile } class A { A (const A&); public: A(); }; struct B { A a; }; struct C : public B { void foo() { const A &ref = B::a; } // taking reference, not a copy! };
google
android
func-def1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/func-def1.C
171
utf_8
e8e9b52687fc710dc5ded14930091f3f
// PR c++/7917 // { dg-do compile } struct A { int i; void foo() = 0 {} // { dg-error "" } A() : i(0) {} };
google
android
error29
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/error29.C
484
utf_8
e7346aefeb3e898d171bb325d837d809
// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } // PR c++/25637 struct A { void foo(); A(); void operator delete(void *); }; struct B { friend void A::foo() {} // { dg-error "22:cannot define member function 'A::foo' within 'B'" } friend void A::operator delete(void*) {} // { dg-er...
google
android
template20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/template20.C
180
utf_8
b7b8ce1da8b4f096c9bf00a54541b5cc
// PR c++/28858 // { dg-do compile } template<int N struct A; // { dg-error "before" } bool i = 1 > 0; // { dg-bogus "" } int j = i; // { dg-bogus "" }
google
android
struct-5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/struct-5.C
70
utf_8
cbf7a3936e5d89d8e57f7c69e30d0fbe
// PR c++/55368 struct A { struct B *C,; }; // { dg-error "stray" }
google
android
crash19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/crash19.C
235
utf_8
885300f8f442ade64d801eeb7dc2d3ec
struct A {} // { dg-error "expected" "" }
google
android
crash44
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/crash44.C
276
utf_8
b00873228f69b3c957863b02c01a6968
// PR c++/37260 // { dg-options "" } struct pthread_once_t { }; struct test { pthread_once_t once; }; int main(void) { struct test foo = { once: PTHREAD_ONCE_INITIALIZER // { dg-error "'PTHREAD_ONCE_INITIALIZER' was not declared in this scope" } }; return 0; }
google
android
ret-type3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/ret-type3.C
91
utf_8
36603b3c2926b20a0727d10d5f631e75
// PR c++/21369 struct bar; template <class T> struct bar *foo (T *p) { return p->t; }
google
android
crash51
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/crash51.C
109
utf_8
4cf7d5674d2dcd5c3ed5f2b0314b425d
// PR c++/37554 struct A {}; class B : A {}; void foo(B b) { (A)b; // { dg-error "inaccessible base" } }
google
android
template15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/template15.C
443
utf_8
5734d08e2a5999c63930fd7571a24e44
// { dg-do compile } // Contributed by: Peter Schmid // <schmid at snake dot iap dot physik dot tu-darmstadt dot de> // PR c++/14545: constructor calls are not integer constant expressions struct A1 { A1(); }; struct A2 { }; template <class T> struct B { void foo() { A1(); A1 a1 = A1(); A2(); ...
google
android
crash23
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/crash23.C
198
utf_8
8b8f5d08ed05973b2184f7b2d97418e4
// PR c++/19733 struct A {}; typedef int I; void foo() { A().~A; // { dg-error "" } A().A::~A; // { dg-error "" } (int().I::~I, 3); // { dg-error "" } int().I::~I; // { dg-error "" } }
google
android
crash61
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/crash61.C
204
utf_8
02796255ff9d4aacb61ea075da81bea0
// PR c++/56241 // { dg-do compile } struct pair { constexpr pair (const) : }; // { dg-error "" } template <0> make_pair () {} // { dg-error "" } pair prefix[] = { 0, make_pair } // { dg-error "" }
google
android
new2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/new2.C
266
utf_8
64b1e63a6365adba9545b7d7ccede989
// { dg-do compile } // Contributed by David Daney <daney at gcc dot gnu dot org> // PR c++/14181: Cryptic error message for ill-formed new expressions void f1(void) { (void)new (char*)[10]; // { dg-error "parenthesized|parentheses" } (void)new char*[10]; }
google
android
varmod1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/parse/varmod1.C
147
utf_8
2b4ab97a787e4e5ab0056f2bb0da4a6d
int main(int argc, char** argv) { int nx = 2; void theerror(double a[][nx+1]); // { dg-message "" } double** a; theerror(a); return 0; }