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
angle-bracket
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/angle-bracket.C
190
utf_8
bc8c4ed875b2c4b0e6b1ec9bcec25d41
// { dg-do compile } int main() { ( int() > int() ); return 0; }
google
chromium
parens1
.C
native_client/nacl-gcc/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
chromium
template8
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/template8.C
155
utf_8
a76a003b61428c2be731bd20905309c2
namespace N { template <typename> struct A { template <typename T> A(A<T>); }; } void foo(N::A<int>); void bar() { foo(N::A); // { dg-error "" } }
google
chromium
crash1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/crash1.C
49
utf_8
721a281ff33124a1c49ed8d68d2419fb
struct s { s(std::b o) { } }; // { dg-error "" }
google
chromium
template9
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/template9.C
187
utf_8
356e4d1e05dbe26b39b63b26f68c0b2e
template <typename T> void f() { g(); // { dg-error "must be available" "err" } // { dg-message "note" "note" { target *-*-* } 3 } h(3); // { dg-error "must be available" } }
google
chromium
struct-as-enum1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/struct-as-enum1.C
258
utf_8
f42b0bb25b92b005f83dd5873027f5ea
// PR c++/163, PR c++/8595 // { dg-do compile } namespace N { struct A {}; // { dg-error "previous declaration" } } typedef enum N::A B; // { dg-error "enum|invalid type" }
google
chromium
friend7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/friend7.C
813
utf_8
0b623ff17f198c05d7580f1a4b97218c
// PR c++/34488 // { dg-do compile } struct A { A (); ~A (); A (const A &); }; struct B { friend A::A (); friend A::~A (); friend A::A (const A &); }; struct C { friend int C (); // { dg-error "return type|in friend decl" } friend int ~C (); // { dg-error "return type|in friend decl" } friend int...
google
chromium
stmtexpr1
.C
native_client/nacl-gcc/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
chromium
non-dependent3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/non-dependent3.C
272
utf_8
4c962ba814ec62b887039d1d3eb9e82b
// PR c++/14586 enum E { e }; E & operator |= (E &f1, const E &f2); E operator | (const E &f1, const E &f2) { E result = f1; result |= f2; return result; } template <typename> void foo () { const E flags = e | e; } template void foo<double> ();
google
chromium
crash17
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/crash17.C
302
utf_8
d8abd079d4556274ffc3d12c8558da15
// PR c++/16716 template <typename> class allocator; template<typename T> class vector { // With the dg-error on the next line, we are really just trying to // check that the message is not an ICE message. typedef typename allocator<T> allocator_type; // { dg-error "expected|invalid" } };
google
chromium
typedef1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/typedef1.C
135
utf_8
090e0ecfb088a06e2c98b34c59b893d6
// PR c++/6477 typedef struct A_ *A; // { dg-error "previous declaration" } typedef struct A B; // { dg-error "typedef|invalid type" }
google
chromium
crash50
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/crash50.C
270
utf_8
eab4e98ede2f5e34a65b3e233498c286
// Origin PR c++/38636 // { dg-do compile } struct A; // { dg-error "forward declaration of 'struct A'" } A::A( struct B; // { dg-error "expected '\\)' before ';' token|invalid use of incomplete type 'struct A'" }
google
chromium
using1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/using1.C
46
utf_8
6bd4c0f7191355f693af56ab02582e5d
namespace A { using ::B; } // { dg-error "" }
google
chromium
template19
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/template19.C
197
utf_8
ee0c3e9e026c58152af8cead89a077fa
// PR c++/26558 // { dg-do compile } template<int> struct A { template<int> void foo() { foo<0>::; // { dg-error "before" } } };
google
chromium
ptrmem1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/ptrmem1.C
105
utf_8
a7c7523f78d6f162791c48963beb5abd
struct A { void f(int = 0) const; }; typedef void (A::*PF)(int) const; void f() { PF pf = &A::f; }
google
chromium
pragma1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/pragma1.C
68
utf_8
5a9d33aff7826f90760a0154af35d9f0
// PR c++/17916 class T { #pragma X struct S { }; #pragma Y };
google
chromium
specialization1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/specialization1.C
290
utf_8
26f42f00216f10d4e115c59c2cbbc006
// PR c++/5723, PR c++/8522 // { dg-do compile } template <typename T> class A; template <typename T> class A<T>::B; // { dg-error "declaration" "err" } // { dg-warning "declaration" "warn" { target *-*-* } 6 }
google
chromium
ptrmem6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/ptrmem6.C
113
utf_8
58b8f9b33890f80dd9050c24c55321aa
//PR C++/27805 struct A; void foo() { int A::* p; A a; // { dg-error "incomplete type" } a.*p; }
google
chromium
expr3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/expr3.C
1,007
utf_8
6d7be91bc2c8c6e24eeb0e2834b30879
/* { dg-do compile } */ #define test(lower, higher, a, b, c, d) \ test_(lower, higher, a, b, c, d, __LINE__) #define test_(lower, higher, a, b, c, d, line)\ test__(lower, higher, a, b, c, d, line) /* The first declaration tests that the parentheses are added correctly by the expression parser. The second tests...
google
chromium
dtor4
.C
native_client/nacl-gcc/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
chromium
octal1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/octal1.C
31
utf_8
619df7743f49825b46dea1243056ee99
int i = 08; // { dg-error "" }
google
chromium
error8
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/error8.C
437
utf_8
07525c7b08f73744da5414f298a2873c
// PR c++/13438 // { dg-options "-fshow-column" } struct A { friend typename struct B; }; // { dg-error "19:using 'typename' outside of template" "" { target *-*-* } 4 } // { dg-error "28:expected nested-name-specifier before 'struct'" "" { target *-*-* } 4 } // { dg-error "35:multiple types in one declaration" "" ...
google
chromium
offsetof7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/offsetof7.C
228
utf_8
f4b27a4b97096a1f4de4209f7e4c5f26
/* { dg-do compile } */ // From PR28573 struct A { int operator [] ( int indx ) { return indx; } }; struct B { A a; }; int main() { return __builtin_offsetof(B, a[0]); /* { dg-error "cannot apply.*offsetof" } */ }
google
chromium
ctor6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/ctor6.C
157
utf_8
029f99332fa546e28fc0e5a825a5db37
// { dg-do compile } // There is no ambiguity in finding a right constructor for X b(a). class X { public: X(const X&, int = 3); }; extern X a; X b(a);
google
chromium
error26
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/error26.C
367
utf_8
9631cfdd244214bc8252ec0e32e95fb6
// PR c++/20148 // { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } void foo() { if (({int c[2];})) ; // { dg-error "7:ISO C.. forbids" "7" } // { dg-error "20:could not convert" "20" { target *-*-* } 6 } } void bar() { if (({})); // { dg-error "7:ISO C.. forbids" "7" } // { dg-error "11:c...
google
chromium
crash44
.C
native_client/nacl-gcc/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
chromium
crash24
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/crash24.C
146
utf_8
2d0d8584a6096ef0ba4c486d09f3620e
// PR c++/20461 // { dg-do compile } class C; // { dg-error "forward declaration" } C::C() : f() {} // { dg-error "invalid use|does not have" }
google
chromium
ctor7
.C
native_client/nacl-gcc/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
chromium
crash4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/crash4.C
144
utf_8
ea254dd6e59a027998efd9cbcb6f405d
struct Bar { typedef int type; }; struct Foo { void func(void) { mutable Bar::type x; // { dg-error "" } } };
google
chromium
enum5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/enum5.C
419
utf_8
52d8bf09effe5fa7a9c7ed5cba8a73ca
// PR c++/41127 #define CHAR_BIT 8 enum EE {ee}; typedef unsigned int T; struct D { T : sizeof(unsigned int) * CHAR_BIT; // OK EE : sizeof(EE) * CHAR_BIT; // OK enum EE : sizeof(EE) * CHAR_BIT; // not OK enum EE xxxx : sizeof(EE) * CHAR_BIT; // OK T x : sizeof(unsigned int) * C...
google
chromium
bitfield2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/bitfield2.C
461
utf_8
0463e583a4846a5d315881bf64031841
//PR c++/28053 struct X {}; struct A { X x : 2; // { dg-error "non-integral type" } }; struct B : A {}; template <typename T> struct C { T t : 3; }; C<int> c; template <typename T> struct D { T t : 3; // { dg-error "non-integral type" } }; D<double> d; // { dg-message "i...
google
chromium
args1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/args1.C
246
utf_8
4d4f8ace7c1f4d0f32bbd4530d5b07c1
// { dg-do compile } // PR c++ 11050. Accepted ill-formed void Foo (int) { Foo(2 2); // { dg-error "expected" "" } }
google
chromium
typename4
.C
native_client/nacl-gcc/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
chromium
lookup2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/lookup2.C
269
utf_8
467d03fdcc01cdf24c21d2264e026db6
template <typename T> struct A { typedef int X; }; template <typename T> struct B { typename A<T>::X x; }; template <typename T> struct C { void foo(int); B<A<T>*> b; }; template <typename T> struct D { enum { e }; void bar() { C<T*>::foo(e); } };
google
chromium
typedef4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/typedef4.C
322
utf_8
01868060d91b3d4c08d8c0220dd7a8fc
// { dg-do compile } // PR c++/7983: ICE typedef to typename as friend. template<class T> class smart_ptr2 { T* real_ptr; public: typedef typename T::subT td; // { dg-error "previous declaration" } friend class td; // { dg-error "typedef|not name a class" } };
google
chromium
error31
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/error31.C
362
utf_8
4253299be031aa184372343d76b84d72
// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } // PR c++/32190 template<typename T> class foo{ }; int main() { foo<int> i; // this column number is not accurate yet, but that will make it for now. foo<foo<int> j; // { dg-error "18:template argument 1 is invalid" } int k; i...
google
chromium
offsetof6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/offsetof6.C
243
utf_8
62fcaf77de8a6f92f01587074bf5ec24
/* { dg-do compile } */ // From PR28573 struct A { char d[44]; char &operator [] ( int indx ) { return d[indx]; } }; struct B { A a; }; int main() { return __builtin_offsetof(B, a[0]); /* { dg-error "cannot apply.*offsetof" } */ }
google
chromium
enum1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/enum1.C
50
utf_8
bffa59fb0720de69133074cfe6a10f52
// PR c++/15862 enum yn { Y, N }; enum yn x = Y;
google
chromium
namespace2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/namespace2.C
197
utf_8
bd51556645331c9b9f2e39ae3f2bd858
/* PR c++/2537 */ /* { dg-do compile } */ // Used to have namespace name/identifier conflict, prior to 3.4. namespace baz {} namespace foo { struct bar { unsigned baz:1; }; }
google
chromium
parse2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/parse2.C
205
utf_8
0b60dfafca867d56068025a0cd9cee2d
/* PR c++/67 */ /* { dg-do compile } */ template <class T> struct foo { static const int bar [3]; }; // Used to fail if 2+1 rather than 3. template <class T> const int foo<T>::bar [2+1] = { 0, 0, 0 };
google
chromium
comma1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/comma1.C
149
utf_8
cc7bbad3182c61322827fb53d2c0de46
// PR c++/14278 // { dg-options "" } struct X { X (int p); }; struct A { A(X); }; void *p_fun; A a(X ((*(int (*)(int, int)) p_fun)(0, 0)));
google
chromium
defarg8
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/defarg8.C
123
utf_8
e2fbf3072476c0cbc11390fbb8a885c4
struct A { static void g(int); }; struct S { static int i; friend void f(int = i); friend void A::g(int = i); };
google
chromium
error-column
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/error-column.C
188
utf_8
a64e620ac0df90a741fe0e470ee25a52
// { dg-do compile } // Make sure column information is correctly shown in error reporting // { dg-options "-fshow-column" } void foo () { cout << "blah"; // { dg-error "3:'cout'" } }
google
chromium
access2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/access2.C
416
utf_8
54c26f1516f9e36b3819b0dc7464c933
// { dg-do compile } // Deferred access checking of variable declaration. class A { typedef int X; // { dg-error "private" } static X a, b, c; }; A::X A::a; A::X A::b, x; // { dg-error "this context" } A::X y, A::c; // { dg-error "this context" } A::X z; // { dg-error "this context" }
google
chromium
local1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/local1.C
285
utf_8
d1474e603dfda7a944b4131661d47d65
// PR c++/28056 void f1(); namespace N { void f2(); } class C { static void f3(); }; void foo() { void ::f1(); // { dg-error "qualified" } void N::f2(); // { dg-error "qualified" } void C::f3(); // { dg-error "qualified" } void ::f4(); // { dg-error "qualified" } }
google
chromium
crash40
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/crash40.C
855
utf_8
1334bbce2c304f13b5c2a96e46c900fe
/* PR c++/34059 */ /* { dg-do "compile" } */ struct A { template<int> void foo(); }; struct B : A {}; struct C : A {}; class AA { template<int> void foo(); /* { dg-error "is private" } */ }; struct BB : AA {}; class AAA { int get() const {} }; struct BBB { static BBB *foo(); private: int get() const {} /* ...
google
chromium
array-size2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/array-size2.C
406
utf_8
19145c49c68fa82257f0dd59ca0da42e
// PR c/25682 // { dg-do compile } // Test whether we don't ICE on invalid array sizes. struct S { char a[4]; int b; }; extern void bar (char *, char *); void foo (void) { char g[(char *) &((struct S *) 0)->b - (char *) 0]; // { dg-error "not an integral constant-expression" } char h[(__SIZE_TYPE__) &((struc...
google
chromium
named_ops
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/named_ops.C
264
utf_8
fe86870b21fda02350088a1a430beacb
/* { dg-do compile } */ /* { dg-options -fpreprocessed } */ /* Tests that C++ named ops are still there with -fpreprocessed. */ /* Source: Neil Booth, 23 May 2002. */ int main () { return 2 xor 2; }
google
chromium
asm1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/asm1.C
88
utf_8
765f7e5bc908ac50e66bdeeac57851f0
//PR c++/30849 void foo() { asm("" : 0); // { dg-error "numeric constant|token" } }
google
chromium
template23
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/template23.C
280
utf_8
87bc0a78f9f80772f7bb60fbaacbf8a3
/* PR c++/30895 This used to ICE. */ /* { dg-do "compile" } */ template<int> struct A {}; template<typename T> struct B { A<T(0i)> a1; /* { dg-error "imaginary constants are a GCC extension" } */ A<T(0i)> a2; /* { dg-error "imaginary constants are a GCC extension" } */ };
google
chromium
crash15
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/crash15.C
267
utf_8
a61247b0784709761dc6bf67cf0c5a0c
// { dg-do compile } // Bug 16260. ICE template<typename T> int foo() { return T::X::Y; }
google
chromium
ctor9
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/ctor9.C
167
utf_8
8c293342bc3c676bc54ba6fbaa67643a
/* PR c++/37647 */ /* { dg-do "compile" } */ struct A { A() { void A(); } /* { dg-error "return type specification for constructor invalid|non-class scope" } */ };
google
chromium
dtor10
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/dtor10.C
127
utf_8
23c806ba9e6196854cbbb11ad8950882
// PR c++/27508 // { dg-do compile } namespace N { struct A { ~A(); }; } N::~A () {} // { dg-error "not a class-name" }
google
chromium
typename7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/typename7.C
754
utf_8
748fa76be6b15cfd75239360f2d1667b
// { dg-do compile } // PR c++/18757: ICE in get_innermost_template_args struct A { template<typename> void foo(int); template<typename T> void bar(T t) { this->foo<typename T>(t); } // { dg-error "expected|parse error|no matching" } template<typename T> void bad(T t) { foo<typename T>(t); } // { dg-err...
google
chromium
friend5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/friend5.C
215
utf_8
0c8363e844757a682f31d7700f891941
// PR c++/23694 extern "C" struct A { friend void foo(int) {} // { dg-error "declaration" } friend void foo() {} // { dg-error "foo" "err" } // { dg-warning "already a friend" "warn" { target *-*-* } 6 } };
google
chromium
crash10
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/crash10.C
281
utf_8
206fc7088f21a3e8ffcf7aaa9bb5d682
// { dg-do compile } // PR c++ 10953. ICE // { dg-bogus "" "" { target *-*-* } 14 } class { typename:: // { dg-error "" "" } ; // { dg-error "" "" }
google
chromium
crash27
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/crash27.C
122
utf_8
668499d14cf7bce476dba23762cb87c5
// Bug: 23225 void Dispatcher() (__builtin_offsetof (ArgsType, largeMsgLen)) // { dg-error "initialize|end of input" }
google
chromium
constant6
.C
native_client/nacl-gcc/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
chromium
crash30
.C
native_client/nacl-gcc/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
chromium
attr-externally-visible-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/attr-externally-visible-1.C
1,482
utf_8
b597255f4d6679e8f7935dba66f5703d
// { dg-do compile } // { dg-options "-O3 -fwhole-program" } // { dg-options "-O3 -fwhole-program -fpie" { target { ! nonpic } } } // { dg-final { scan-assembler "foo1" } } // { dg-final { scan-assembler "foo2" } } // { dg-final { scan-assembler "foo3" } } // { dg-final { scan-assembler "foo4" } } // { dg-final { scan-...
google
chromium
operator1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/operator1.C
176
utf_8
ca050d3a19382312a7cd864019542cf5
/* PR c++/8982 */ /* { dg-do compile } */ namespace foo { template<class X> int operator- (X x); } int main() { using foo::operator-; // syntax error under gcc 3.2 }
google
chromium
template17
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/template17.C
113
utf_8
28909671f33bd21fb848fe0c1fa14d4d
// PR c++/23841 template <int I> struct S { int f(int i = I) { return i; } }; void g () { S<(int)0.> a2; }
google
chromium
crash46
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/crash46.C
387
utf_8
6d2878f7f81e6a3049295c06692ede10
// PR c++/37532 // { dg-do compile } void foo (_Decimal32) // { dg-error "declared void" } { } // { dg-error "was not declared" "" { target *-*-* } 5 } void bar (_Bool) // { dg-error "declared void" } { } // { dg-error "was not declared" "" { target *-*-* } 10 } void baz (_Fract) // { dg-error "declared void" ...
google
chromium
casting-operator2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/casting-operator2.C
874
utf_8
69f48dece672507159e28e5ae62e9640
// { dg-do compile } // Contributed by Martin Loewis <loewis at informatik dot hu-berlin dot de> // PR c++/8856: Make sure template conversion operators are not parsed as // template names. struct K {}; template <bool> struct K2 {}; template <class T> struct A { template <class U> operator U() { return U(); } }; ...
google
chromium
concat1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/concat1.C
484
utf_8
c20d14b721443c68f73728331d14fbe0
/* PR c/3581 */ /* { dg-do compile } */ /* Intended as a compile-time test for string literal concatenation. The fact that the string isn't actually used in the resulting program should allow this to compile for any target. */ #define e0 "a" #define e1 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 #define e2 e1 e1 e1 e1 e1 e1...
google
chromium
defarg10
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/defarg10.C
212
utf_8
d72df6d061e8fff8ce0bb0717e4f05bc
// From java library. void Foo (int = 0); class Klasse { friend void Foo (int); };
google
chromium
pr37862
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/pr37862.C
323
utf_8
a57434275b0ab07b7a1f918fef7791bc
// { dg-do run } #include <stdlib.h> class A { public: virtual void get (void) { } }; class B : public A { public: void get (void) { abort (); } }; class C : public B { }; int main (void) { C c; C * p = &c; p->A::get (); (p->A::get) (); // The C++ parser used to resolve this to B::get() return 0;...
google
chromium
typedef9
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/typedef9.C
215
utf_8
81a5a8a38ef087a12d91190b90e80423
// PR c++/38794 // { dg-do compile } typedef void foo () {} // { dg-error "invalid function declaration" } struct S { typedef int bar (void) { return 0; } // { dg-error "invalid member function declaration" } };
google
chromium
catch1
.C
native_client/nacl-gcc/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
chromium
enum2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/parse/enum2.C
197
utf_8
7db35a121c5e06c218be6e74693c8270
// { dg-do compile } // PR c++/18123: ICE pushing tag from invalid template. template<int> enum E { e }; // { dg-error "declaration|expected" }
google
chromium
array12
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/array12.C
472
utf_8
cdd8bcf2d0f951ea0f042ff962ed9854
// PR c++/12253 // Bug: We were failing to destroy the temporary A passed to the // constructor for b[0] before going on to construct b[1]. // { dg-do run } extern "C" int printf (const char *, ...); int c; int r; struct A { A() { printf ("A()\n"); if (c++) r = 1; } A(const A&) { printf ("A(const A&)\n"); ++c; ...
google
chromium
array1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/array1.C
413
utf_8
92960aa3fba7b251d088910f7ca36c73
// Test that completing an array declared with a typedef doesn't change // the typedef. // { dg-do run } typedef int iArr[]; const iArr array4={ 1, 2, 3, 4 }; const iArr array3={ 1, 2, 3 }; const iArr array5={ 1, 2, 3, 4, 5 }; int main() { if (sizeof (array4)/sizeof (array4[0]) != 4 || sizeof (array...
google
chromium
cleanup2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/cleanup2.C
394
utf_8
7d94225f3f0c383bec9dd200a01a0b33
// PR c++/12526 // We decided that the call to strcmp has no side-effects because strcmp is // pure, even though the first argument has side-effects. As a result, we // stripped the CLEANUP_POINT_EXPR. Hilarity ensued. extern "C" int strcmp (const char *, const char *); struct A { A(int); const char *str(); ...
google
chromium
delete2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/delete2.C
769
utf_8
468ee3e464fecbec120056e490e0ffe4
// PR c++/15097 // { dg-do run } typedef __SIZE_TYPE__ size_t; extern "C" void * malloc (size_t); extern "C" void free (void *); extern "C" void abort(void); void *saved; void * operator new (size_t size) { void *p = malloc (size); saved = p; return p; } void operator delete (void *p) { if (p != saved) ...
google
chromium
new9
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/new9.C
235
utf_8
d9b779b618b81e9ea527baf5e2af4c4e
// PR 12337 class A {}; template <typename T> class X : public A { public: X(T&); }; class B { public: bool foo(A*); template <typename T> bool foo(T& t) { return foo(new X<T>(t)); } }; int main() { B x, y; x.foo(y); }
google
chromium
init-ref3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/init-ref3.C
688
utf_8
c9be9788e0023890c93cbcdd3e3bcbd1
// { dg-do link } template <class T> class Ptr { protected: T * ptr; public: Ptr(void) : ptr(0) { } Ptr(T * p) : ptr(p) { } ~Ptr(void) { delete ptr; } operator T & () { return *ptr; } }; class base { public: base(void) { } ~base(void) { } }; class foo : public base { private: foo(const foo & r...
google
chromium
value7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/value7.C
158
utf_8
4487271d3a3d8cbbe87a8aa0dee4b541
// PR c++/30111 // { dg-do run } struct pod { int i; }; struct inherit : pod { inherit() : pod() {} }; int main() { inherit i; return i.i != 0; }
google
chromium
ref13
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/ref13.C
94
utf_8
9fd35f214b88e04577c6edb14b23477c
// PR c++/28338 void foo() { { static const int& i = 0; } { static const int& i = 0; } }
google
chromium
elide2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/elide2.C
429
utf_8
e657849b9797c7df684fd4fafe1341d1
// PR c++/8674 // Bug: Since B().a is an rvalue, we tried to treat it like a TARGET_EXPR // and elide the copy. But that produces a bitwise copy, which causes us // to abort in cp_expr_size. // Test that we actually run the A copy constructor when calling f(). // { dg-do run } int c; struct A { A () { ++c; } ...
google
chromium
ctor1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/ctor1.C
710
utf_8
77ceed5edeb6a109374c44ef23679bef
// { dg-do run } // From WindRiver SPR 80797 // We were inadvertently SAVE_EXPRing volatile arrays during delete[] struct A { A *ptr; static int ok; A () {ptr = this;} ~A () {ok = ptr == this;} }; int A::ok = -1; struct B { B *ptr; static int ok; B () {ptr = this;} ~B () {ok = ptr == this;} }; int...
google
chromium
aggr1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/aggr1.C
247
utf_8
f6bd229ad72e1e0526a7e259faf50163
// Test that initializing an aggregate with complex copy constructor // and assignment ops doesn't cause cp_expr_size to abort. struct A { A(); A(const A&); A& operator=(const A&); }; struct B { A a; }; int main () { B b = { A() }; }
google
chromium
for3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/for3.C
111
utf_8
07dcd9a47aa0d73fd3c9a976d1f3ba07
// { dg-do compile } struct A { int i; A(); A(const A&); }; void bar() { A a; for ( ;; a=A() ) ; }
google
chromium
delete1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/delete1.C
116
utf_8
27316aef2661ec451196e55a019579a8
// PR c++/19811 class C; // { dg-error "forward" } void foo(void *p) { delete [] ((C*)p) ; // { dg-error "" } }
google
chromium
new6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/new6.C
178
utf_8
6142030ce76d1ab9453ff0a223722577
// { dg-options "-fkeep-inline-functions" } struct B1 { virtual ~B1(); }; struct B2 { virtual ~B2(); }; struct D : B1, B2 {}; struct X : D { X (); }; X::X () { new int; }
google
chromium
ctor5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/ctor5.C
242
utf_8
a6128e1518e0ce6bdc30c0b7a23dfd18
// PR C++/21645 // We were crashing because we forgot to update the type for // the cloned argument for the cloned ctor. struct color { ~color(); }; struct style { color col; style (color); }; style::style(color c) { }
google
chromium
ref9
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/ref9.C
603
utf_8
ded575d1c35757dbf89f635e5a86910d
// { dg-do run } struct ex; struct basic { int refcount; ex eval() const; basic() : refcount(0) {} }; struct ex { basic *bp; ex() : bp(0) { } ex(const basic &); virtual ~ex(); void construct_from_basic(const basic &); }; ex basic::eval() const { throw 1; } inline ex::ex(const basic &b) { construct...
google
chromium
new12
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/new12.C
64
utf_8
bd503383d6a9825355b68023ee042168
// PR c++/18369 void breakme () { int *v = new (int [5]); }
google
chromium
brace6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/brace6.C
451
utf_8
40e3b6e031b07760a08e43cf8d47ab50
/* PR c++/30759 */ /* { dg-do "compile" } */ struct A { A(int) { } }; struct B { B(const B&); // { dg-message "candidate" } int b; }; struct C {}; struct D { int c; }; int main() { int i = { 1 }; int j = { 1, 2 }; /* { dg-error "requires one element" } */ A a = { 6 }; /* { dg-error "initialize"...
google
chromium
new7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/new7.C
131
utf_8
625c88e7ce2f57c2f27e69085c8278eb
template <class T> struct Foo {}; template <class T> void Foo<T>::NON_EXISTENT(int* val = new int()) {} // { dg-error "" }
google
chromium
copy3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/copy3.C
199
utf_8
507c17431c10231f129d442ae2f706a2
// { dg-do run } // { dg-options "-fno-elide-constructors" } int copies; struct S { S () {} S (const S&) { ++copies; } }; S s[1] = { S () }; int main () { if (copies != 1) return 1; }
google
chromium
ptrmem2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/ptrmem2.C
135
utf_8
74ea9e49b5fe45a570f00a8474ac7198
// PR c++/19916 // { dg-do run } struct S { char k; }; char const volatile S::* const p01 = &S::k; int main(void) { return 0; }
google
chromium
new20
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/new20.C
199
utf_8
9b183ec2b575bdf5465306fc4e259b43
// PR c++/31743 typedef int A[]; A* p = new A; // { dg-error "invalid use of array with unspecified bounds" } A* q = new (A); // { dg-error "invalid use of array with unspecified bounds" }
google
chromium
aggr2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/aggr2.C
528
utf_8
a79ad2e50ca8d0ab6dd5b27254f204b5
// PR c++/15172 // { dg-do run } extern "C" int printf (const char *, ...); extern "C" void abort (); struct A { static A* p; A() { p = this; } A(const A&); ~A() { if (this != p) abort (); } void print () { } }; A* A::p; struct B { A a; }; B b = { A () }; struct A2 { static A2* p; A2() { p = thi...
google
chromium
ctor8
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/ctor8.C
147
utf_8
649afd1f0ee64cdf809736af7d5a8c2a
// PR c++/29039 typedef struct S { int &r; }; // { dg-warning "'typedef' was ignored" } S f () { return S (); // { dg-error "reference" } }
google
chromium
static1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/static1.C
85
utf_8
36c7bdcd9c002a17bbb025dd79e017b7
struct A { static const int size = BOGUS; // { dg-error "" } }; const int A::size;
google
chromium
member1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/member1.C
530
utf_8
92b26afd4701c3cf8c0b9d502787aeee
// Bug 20789: ICE on invalid template<typename> struct A; template<int> struct B {}; template<typename T> struct C { static const int i = A<T>::i; // { dg-error "incomplete" } static const int j = i; // { dg-error "non-constant expression" } B<j> b; // { dg-error "not a valid template arg" } }; C<int> c; int i...
google
chromium
new17
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/new17.C
721
utf_8
557af6e40f5cf48ba8036befe29ee59c
// { dg-do compile } // { dg-options "-O2 -fstrict-aliasing -fdump-tree-final_cleanup" } // Test that placement new does not introduce an unnecessary memory // barrier. // See PR 29286. typedef __SIZE_TYPE__ size_t; inline void* operator new(size_t, void* __p) throw() { return __p; } template <class T, int D> class...
google
chromium
new25
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/new25.C
957
utf_8
ccfb55277b45e67e6b5a86c7f05fd0a8
// PR c++/31988 #include <new> class C { public: void* operator new(std::size_t = 32) throw (std::bad_alloc); // { dg-error "first parameter" } void* operator new[](std::size_t = 32) throw (std::bad_alloc); // { dg-error "first parameter" } void* operator new(std::size_t = 32, const std::nothrow_t&) throw(); // ...
google
chromium
const2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/const2.C
86
utf_8
4db32f4d35d147ab0e7b83fc5a21a848
// PR c++/19878 struct S { char k; }; char const volatile S::* const p01 = &S::k;
google
chromium
string1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/init/string1.C
124
utf_8
8b181745d241d484dd529391acd12c57
extern void f (char*); extern const char * const target = "foo"; void g () { f (target); // { dg-error "conversion" } }