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
default6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/default6.C
413
utf_8
80f3c563ca108ca76b87c22fbe6a3685
// PR c++/30108 class BaseRobot { typedef void (BaseRobot::*PseudoState)(void); typedef PseudoState STATE; STATE initial (); int ready (); STATE stpOtherTask (); STATE commonEventProcessing (STATE pIdleTarget=(STATE)&BaseRobot::ready); }; BaseRobot::STATE BaseRobot::initial () { return commonEventProcess...
google
chromium
dtor1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/dtor1.C
282
utf_8
1d7f492a5f6d9c2410071534745c8cc1
/* { dg-do compile } */ // PR C++/30303 // This used to ICE because we did not return NULL // in grokfndecl when an error happened. struct Ifoo { virtual ~Ifoo(){} }; struct foo : Ifoo { foo(){}; }; foo::~foo() // { dg-error "definition of implicitly-declared" } { delete this; }
google
chromium
crash-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/crash-3.C
540
utf_8
0d9c768cc6c1ceba304511794490d245
// { dg-do compile } // { dg-options "-g" } // Contributed by: <schmid at snake dot iap dot physik dot tu-darmstadt dot de> // and Niall Douglas <s_gccbugzilla at nedprod dot com> // PR c++/14246: ice in write_template_arg_literal while mangling boolean // expressions. namespace N1 { template <typename T> str...
google
chromium
new-size-type
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/new-size-type.C
189
utf_8
870dd50bee0d72f60475d1bf1979a635
// Origin: PR c++/36741 #include <stddef.h> const char* foo() { return new char[~static_cast<size_t>(0)];// { dg-bogus "large" } }
google
chromium
final1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/final1.C
417
utf_8
04870429937dd6ef6fd1cc727a935da3
/* Verify that final methods are devirtualized */ /* { dg-do compile } */ /* { dg-options "-fdump-tree-original -std=c++0x" } */ struct A final { virtual void foo () { } }; struct B { virtual void foo () final { } }; void fun(A* a, B* b) { a->foo(); b->foo(); } /* { dg-final { scan-tree-dump-times ...
google
chromium
new1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/new1.C
233
utf_8
88667285d39d29049b4e80cf22231d3f
// PR c++/28267 // { dg-do compile } struct A { A(); void* operator new(__SIZE_TYPE__, int = X); // { dg-error "not declared" } void operator delete(void*, int); }; void foo() { new A; // { dg-error "default argument" } }
google
chromium
first-global
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/first-global.C
181
utf_8
455aeb7100537f75958e97507174848d
/* { dg-do compile } */ /* { dg-add-options bind_pic_locally } */ /* { dg-final { scan-assembler "_GLOBAL__(I|sub_I)(_|_65535_0_)foobar" } } */ struct foo { foo (); }; foo foobar;
google
chromium
pr42645-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr42645-1.C
436
utf_8
a8acf41a97484b62691a92779ee9fc71
// PR tree-optimization/42645 // { dg-do compile } // { dg-options "-fcompare-debug -O1" } extern void foo (); struct S { struct T { int t1; char t2[4]; T *t3; } t; int m1 () const { return t.t3[0].t1; } char *m2 () { foo (); } void m3 (int x) { char *m = m2 (); if (m1 () > 0 && x > 0); } vo...
google
chromium
java2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/java2.C
135
utf_8
cbeaf45e0171e3fe5619451df416f658
// PR c++/??? // { dg-do compile } extern "Java" { struct A {}; } typedef void* jclass; A* p = new A; // { dg-error "class\\$" }
google
chromium
return1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/return1.C
353
utf_8
e3e3485aa8a1172e3051d442252937c1
struct wxString; struct wxString* wxGetEmptyString(); struct wxString GetHeader() // { dg-error "return type" "" } { return *wxGetEmptyString(); }
google
chromium
pr25632
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr25632.C
325
utf_8
8ed27916cb5b71de34de304c8c46a014
/* PR c++/25632 */ /* { dg-do compile } */ __extension__ typedef __INTPTR_TYPE__ intptr_t; struct sockaddr_un { char sun_path[1]; }; const unsigned SI_SUN_HEAD_LEN = (intptr_t)(((struct sockaddr_un *)0)->sun_path); int SiGetPeerName () { return SI_SUN_HEAD_LEN; } int SiAccept () { return SI_SUN_HEAD_LEN...
google
chromium
static11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/static11.C
511
utf_8
e789e85b8e83c35e7e483d4d892e55fd
// This is a copy of g++.old-deja/g++.pt/static11.C which at one // time got a SEGV for mmix-knuth-mmixware when compiled with // -da (or either -dj or -df). // { dg-do compile } // { dg-options "-da" } extern "C" void _exit (int); int r = 1; struct A { void f(){}; A(){ ++r; } ~A(){ r -= 2; _exit (r); } }; te...
google
chromium
access3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/access3.C
208
utf_8
9badaf0d3171514f4d628f2da49a35a9
// { dg-do compile } // { dg-options "-fno-access-control" } // PR c++/20022 // Make sure -fno-access-control doesn't crash, and actually grants at // least some access. class B { enum A {}; }; B::A r;
google
chromium
s390-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/s390-1.C
444
utf_8
6c164a00f937e457895437563cb4fbc2
// { dg-do compile { target s390x-*-* } } // { dg-options "-O3 -fPIC" } class A { public: void f (void) { _M_a = 0; } void g (void) { _M_a = 1; } void h (void); private: int _M_a; }; class B : virtual public A { }; void test (B& x) { for (int i = 0; i < 17; i++) { x.f (); (x.*&A::g) (); x.h ...
google
chromium
abstract2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/abstract2.C
1,810
utf_8
f08d1e182d4573cda49da8f5afb8ba41
// { dg-do compile } // Contributed by Gabriel Dos Reis <gdr at integrable-solutions dot net> // PR c++/2204: Check for parameters of abstract type in function declarations. namespace N1 { struct X; struct Y1 { void g(X parm1); // { dg-error "abstract" } void g(X parm2[2]); // { dg-error "abs...
google
chromium
offsetof5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/offsetof5.C
361
utf_8
c8a0394ef8dd7e34c554d30357574798
// PR c++/35741 // { dg-do compile } #include <stddef.h> struct A { char c; int &i; }; int j = offsetof (A, i); // { dg-warning "invalid access|offsetof" } template <typename T> struct S { T h; T &i; static const int j = offsetof (S, i); // { dg-warning "invalid access|offsetof" } }; int k = S<int>::j; ...
google
chromium
offsetof3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/offsetof3.C
464
utf_8
b4ab86a9b47b685c240e9376c6f65667
/* { dg-do compile } */ struct X { int x, y; protected: int z; }; typedef X* pX; typedef __SIZE_TYPE__ size_t; size_t yoff = size_t(&(pX(0)->y)); /* { dg-warning "invalid access" "" } */ /* { dg-warning "macro was used incorrectly" "macro" { target *-*-* } 16 } */
google
chromium
ellipsis1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/ellipsis1.C
375
utf_8
639bf05e0524c96ac92d1182ca1e6d91
// PR c++/26291 // { dg-do compile } struct A { A& operator= (A,...); // { dg-error "variable number of arguments" } A operator+ (...); // { dg-error "variable number of arguments" } operator int(...); // { dg-error "variable number of arguments" } int operator() (...); }; A operator- (A,...)...
google
chromium
vrp1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/vrp1.C
313
utf_8
7904744316bd21dc51afccc99c175c0f
// { dg-do compile } // { dg-options "-O2" } // This caused a crash in VRP because TREE_OVERFLOW was set for MIN. template<long long MIN> long long mod (long long l, long long r) { if (l == MIN && r == -1) return 0LL; return l % r; } template long long mod<-0x8000000000000000LL> (long long, long long);
google
chromium
dtor2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/dtor2.C
97
utf_8
a24d7cf3120e5c9c1cb8815c7c1afaf8
/* PR c++/35317 */ /* { dg-do compile } */ struct A { void operator delete[] (void*, ...); };
google
chromium
gc4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/gc4.C
138
utf_8
88d3ce293bea84b74d7f26a42a8538fb
// PR c++/41120 // { dg-options "--param ggc-min-heapsize=0 --param ggc-min-expand=0" } struct A { A(); }; struct B { A a; }; B b;
google
chromium
friend4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/friend4.C
222
utf_8
20d8428bc67d92d86f3b9cfa527b7be3
// Misleading diagnostic struct A { friend void A::foo(); // { dg-error "implicitly friends" } friend A::~A(); // { dg-error "implicitly friends" } };
google
chromium
classkey1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/classkey1.C
455
utf_8
a33402d123eb961aa44a527290e451c2
// { dg-do compile } // PR 775. Some mismatches which were broken. template <class T> struct A {}; union A<int> a; // { dg-error "'union' tag" "" } template <> union A<float> {}; // { dg-error "'union' tag" "" } struct B {}; union B b; // { dg-error "'union' tag" "" } union C {}; class C c; // { dg-error "'class' tag" ...
google
chromium
init1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/init1.C
386
utf_8
9a179a157dcd020b51f28328ef6fa43d
// { dg-do compile } // Bug 3154 class A {}; struct B : A { typedef A Parent; B () : Parent () {} }; class T { typedef int Foo; T () : Foo () {} // { dg-error "T::Foo' is not" "" } }; struct S : B { int Parent; S () :Parent (1) {} };
google
chromium
error1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/error1.C
368
utf_8
7228816342090a5efe94d0effa02c5bd
// { dg-do compile } // PR 90, stupid error message `(this + 160)' class foo { public: int fudge[40]; int bar [40]; inline int access(int i) { return bar(i); // { dg-error "cannot be used as a function" "" } } };
google
chromium
builtin-unreachable-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/builtin-unreachable-1.C
197
utf_8
ba848aa2a88ba59d1d57527eb8f55c01
// PR c++/40445 // Check that a function containing only __builtin_unreachable() // doesn't ICE. // { dg-do compile } // { dg-options "-O0" } const char * f (void) { __builtin_unreachable (); }
google
chromium
assign1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/assign1.C
118
utf_8
327666cc7728d2edf1a48530ef433c9f
// PR c++/27716 // { dg-do compile } int foo() { return i ""= i; // { dg-error "not declared|string constant" } }
google
chromium
redecl1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/redecl1.C
220
utf_8
22822b2c7eaa7d4e22eb88d6ce526a4c
// PR c++/5857 // This testcase failed because during duplicate_decls the type was promoted // to int. // { dg-do compile } typedef char baz; extern const char foo[]; const baz foo[] = "xyz"; const char bar[] = "abc";
google
chromium
incomplete3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/incomplete3.C
94
utf_8
f917991e6dd65d861c6bb45ad931fe8c
//PR c++/28054 struct A; struct B { friend A : 2; // { dg-error "incomplete type" } };
google
chromium
typedef1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/typedef1.C
316
utf_8
b3cee6698f91dc967087653171b6e50b
// PR c++/27572 // { dg-do compile } void f1(typedef) {} // { dg-error "no type|typedef declaration" } void f2(typedef x) {} // { dg-error "type|typedef declaration" } void f3(typedef x[]) {} // { dg-error "type|typedef declaration" } void f4(typedef int x) {} // { dg-error "typedef declaration" }
google
chromium
darwin-cfstring1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/darwin-cfstring1.C
848
utf_8
de94c719de36569fb4b6caf36c63e34c
/* Test whether the __builtin__CFStringMakeConstantString "function" fails gracefully when handed a non-constant /* { dg-do compile { target *-*-darwin* } } */ /* { dg-options "-mconstant-cfstrings" } */ #include <CoreFoundation/CFString.h> #ifdef __CONSTANT_CFSTRINGS__ #undef CFSTR #define CFSTR(STR) ((CFStringRe...
google
chromium
java1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/java1.C
543
utf_8
f32a6142208532cc717bb64d8020d355
// { dg-options "-w -ansi -pedantic" } extern "Java" { class One { ~One (); // { dg-error "cannot have a destructor" "" } One (); }; class Two {}; class Three : One {}; // { dg-error "cannot have an implicit" "" } class Four : Two {}; class Five : Two, Four {}; // { dg-error "cannot have multipl...
google
chromium
ptrmem1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/ptrmem1.C
834
utf_8
aeacbd129aa91e6acca9b9022f8e03ba
// { dg-do run } // PR 4379. We created pointers to member references and pointers to // member fields when we shouldn't have. int gs; int gm; struct D { D () :m (gm) {} int &m; static int &s; int Foo (); }; int &D::s = gs; template<class T> int f1(T x) { return x != &gm; } template<class T> int f2(T x)...
google
chromium
ptrmem6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/ptrmem6.C
160
utf_8
6b08cb238dd6367be52907131a810d21
// PR c++/19666 // { dg-do compile } struct A { int i; }; int foo (A *p) { return &p->i - &(p->*&A::i); }
google
chromium
pr23205-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr23205-2.C
404
utf_8
7ccd0cd05515ad0482772b7c60a639cb
/* { dg-do compile } */ /* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* } { "*" } { "" } } */ /* { dg-options "-gstabs+ -fno-eliminate-unused-debug-types -ftoplevel-reorder" } */ const int foobar = 4; int foo () { return foobar + 1; } int main() { int i; i = foo...
google
chromium
pr29610
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr29610.C
968
utf_8
28e9a172de1c6ea38bcb3af18a9eb52c
/* { dg-do compile } */ /* { dg-options "-O2 -funswitch-loops" } */ struct __normal_iterator { typedef int*const *_Iterator; int*const * _M_current; __normal_iterator(const _Iterator& __i) : _M_current(__i){} const _Iterator& base() const {} }; struct string { ~string(){} }; struct vector { int** _M_finish...
google
chromium
error8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/error8.C
678
utf_8
95e8f5237dd1f8559adddbcd743c6a6f
// { dg-do compile } // Contributed by: Michael Elizabeth Chastain // <mec dot gnu at mindspring dot com> // PR c++/13927: Wrong error message for redeclartion of type from union void foo(void) { union { int alpha; int beta; }; // { dg-error "previous declaration" } double alpha; // { dg-error "conflicting dec...
google
chromium
i386-8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/i386-8.C
505
utf_8
6185c7fefa3b45be6654d24324c94f7d
// PR rtl-optimization/45400 // { dg-do compile { target i?86-*-* x86_64-*-* } } // { dg-options "-O2 -msse2" } // { dg-options "-O2 -msse2 -fpic" { target fpic } } #include <xmmintrin.h> static inline unsigned short bar (unsigned short x) { return ((x << 8) | (x >> 8)); } unsigned int foo (float *x, short *y) { ...
google
chromium
canon-37342
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/canon-37342.C
242
utf_8
ec0bfdcd03b57cf0c62a78d8c06e0334
class Asm; template<typename _CharT> class basic_ostream; typedef basic_ostream<char> ostream; class Options { typedef void (Asm::* emitfunc_t) (ostream &); emitfunc_t getemit () const { return emitfunc; } emitfunc_t emitfunc; };
google
chromium
crash-4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/crash-4.C
805
utf_8
a948c138cf787909077fd994ee9ec3e1
// NOTE: This test assumes packed structure layout differs from unpacked // structure layout. This isn't true, e.g., with the default // arm-none-elf options. // { dg-options "-mstructure-size-boundary=8" { target arm*-*-* } } struct a { int m; a(const a&); }; struct b // { dg-error "cannot bind packed...
google
chromium
pr34435
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr34435.C
337
utf_8
47a370bdf6f3680e4929c23a0cdc94af
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-msse2 -Wno-abi" } */ #include <emmintrin.h> class Vec { __m128i vec; public: Vec(int mm) { vec = _mm_set1_epi16(mm); } operator __m128i() const { return vec; } }; int main() { _mm_shuffle_epi32(Vec(5), _MM_SHUF...
google
chromium
abstract1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/abstract1.C
1,650
utf_8
6fee34d8b3b51c74ff33cdfe391ca591
// { dg-do compile } // Contributed by <giovannibajo at gcc dot gnu dot org>, // <pavel_vozenilek at hotmail dot com>, // <bangerth at dealii dot org> // c++/9256: Make sure that a pointer to an array of abstract elements // cannot be created, not even during template substitution (DR337)...
google
chromium
error26
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/error26.C
96
utf_8
9ef00053a92ca05523cd1c287fd795b3
// PR c++/35333 void foo(__complex__ double x) { __builtin_conj(x)(); // { dg-error "~x" } }
google
chromium
struct-va_list
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/struct-va_list.C
101
utf_8
5e0beb379071427ec23de04edb342301
// { dg-do compile } // PR target/13302 #include <stdarg.h> struct NumArgState{ va_list ap; };
google
chromium
i386-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/i386-3.C
513
utf_8
84a63c94bf98278ea9153ed03ed135f7
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O -fkeep-inline-functions -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma" } */ /* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, mm3dnow.h, fma4intrin....
google
chromium
component1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/component1.C
625
utf_8
62c7e0b19a0713c16c861d1093f50759
// { dg-do compile } // PR 5123. ICE struct C { template<class T> void f(T); void g (); void g (int); }; void Foo () { C c; (c.g) (); (c.f) (1); (c.f<int>) (2); c.g; // { dg-error "statement cannot resolve" "" } c.f; // { dg-error "statement cannot resolve" "" } c.f<int>; // { dg-erro...
google
chromium
crash-7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/crash-7.C
267
utf_8
313fe90fb22f83c8baeb11009bfc8606
// Origin: PR c++/42336 // { dg-options "-std=c++0x -O2 -g" } // { dg-do compile } struct X { void func() {} }; template<typename T, void (X::*P)() = &T::func> void b(T) {} int main() { b(X()); /* line 9 */ X().func(); return 0; }
google
chromium
pr20366
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr20366.C
3,164
utf_8
f43f96bf3c378817b959c22aee3466c0
// Test fix for PR20366 // // { dg-do compile { target *-*-aix* } } // { dg-options "-D_LARGE_FILES" } // // cstdio includes stdio.h and undefs most of the functions declared // therein, unfortunately this means that #define fopen fopen64 goes // away. This tests the fix, and ensures that with -D_LARGE_FILES // fopen...
google
chromium
bitfield2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/bitfield2.C
119
utf_8
1c416edaf4596d6d655bbd79dbe1ca49
// PR c++/28052 // { dg-do compile } struct A { double d : 2; // { dg-error "non-integral" } A() {} ~A() {} };
google
chromium
anon-struct
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/anon-struct.C
138
utf_8
4a525e9796838f38d9c7110a0140c8eb
// { dg-do compile } namespace N { } namespace M { typedef struct { } N; }
google
chromium
ptrmem9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/ptrmem9.C
123
utf_8
1de8f2214cf4c9be9f9f9033866976fb
// PR c++/33969 // { dg-do compile } struct A; void (*A::* fp)() const; // { dg-error "invalid in variable declaration" }
google
chromium
typedef4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/typedef4.C
233
utf_8
b69dc2479f4dab741a9c03d2e626d4ea
// { dg-options "-g" } // { dg-do compile } // On some platforms like MIPS, __builtin_va_list is a // RECORD_TYPE. Make sure we don't wrongly try to generate debug info // for its TYPE_DECL and crash. typedef __builtin_va_list foo;
google
chromium
ptrmem11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/ptrmem11.C
427
utf_8
069172edd9acb6515c413842bdd8b7b6
// Origin PR c++/37093 struct A {}; template <int A::* p> int foo(A* q) // { dg-message "note" } { return q->*p; } template <typename T> int bar(int T::* p) { return foo<p>(0);// { dg-error "(not a valid template arg|no matching func|pointer-to-member|could not convert)" } // { dg-message "candidate" "candidate...
google
chromium
error31
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/error31.C
324
utf_8
1fabd6378b7b1a06677aafca744f5f25
// PR c++/35335 // { dg-do compile } // { dg-options "" } // { dg-bogus "not supported by" "" { target *-*-* } 0 } struct A {}; // { dg-message "operator=|no known conversion" } void foo () { A a; a = ({ { 1; } }); // { dg-error "no match for" } // { dg-message "candidate" "candidate note" { target *-*-* } 12 ...
google
chromium
offsetof6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/offsetof6.C
436
utf_8
19eb48777950ec2ddd6300d9e65a5288
// Origin PR c++/38699 // { dg-do compile } template<class T> struct A { const T *p; }; struct B { A<int> a; }; template class A<char>; void f0 () { __builtin_offsetof(A<char>, p); // OK __builtin_offsetof(A<char>, p[1]); // { dg-error "non constant address" } __builtin_offsetof(B, a.p); // OK __builtin_off...
google
chromium
enum1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/enum1.C
262
utf_8
c5b26d15a4924f5e39dad2e8b5b7608a
// PR c++/6037 // This testcase ICEd because start_enum expected pushtag to insert // the tag always into current binding level. struct A { ~A () { } }; struct B { void foo () { switch (0) { default: ; } A a; enum C { }; (void) a; } };
google
chromium
pr40561
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr40561.C
656
utf_8
5c8c2604c08c57cb2c21770bf3b416bf
// { dg-do compile } #include <set> class SyAccess; class VamsBase { public: virtual ~VamsBase(void); }; class VamsFnct : public VamsBase { public: ~VamsFnct(void); std::set<SyAccess*> getNullDependencies(void) const { return std::set<SyAccess*>(); } }; class VamsFnctSystem:public VamsFnct { public: Vams...
google
chromium
array6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/array6.C
172
utf_8
db68b7a03fb0ede3fec05340bda061e1
// PR c++/43036 typedef char T6[2][8]; const T6* p1; typedef char T[8]; typedef T T2[2]; typedef T T3[2]; typedef char T5[2][8]; const T2* p2; const T5* p3; const T3* p4;
google
chromium
pr24623
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr24623.C
1,038
utf_8
cbfc16147cdfd178e38e28c8ffca2385
/* This used to ICE due to a backend problem on s390. */ /* { dg-do compile } */ /* { dg-options "-O1" } */ class ReferenceCounted { public: virtual ~ ReferenceCounted () { } void decrementRefCount () const { if (--const_cast < unsigned int &>(_ref_count) == 0) { delete this; } } unsi...
google
chromium
constref2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/constref2.C
346
utf_8
192c9dfdcc513ccf5362da483582b639
// { dg-do compile } // Make sure that we can pass a cast-expression as an argument that's // passed to a function template by const reference. template <class T> void bar (const T&) { } void foo (int x) { bar ((long) x); }
google
chromium
access2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/access2.C
564
utf_8
65f203ac430205520ff2901caa9ed88f
// { dg-do compile } // PR c++/2739 // Access to base class private static member. class Base { private: static int fooprivate; protected: static int fooprotected; public: static int foopublic; }; class Derived : public Base { public: void test(); }; int Base::fooprivate=42; // { dg-error "private" } int Base::...
google
chromium
arm-neon-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/arm-neon-1.C
320
utf_8
2138aca3dce7e8ea857b666c6463bc03
/* Basic smoke test for arm_neon.h */ /* { dg-do assemble } */ /* { dg-require-effective-target arm_neon_ok } */ /* { dg-add-options arm_neon } */ #include "arm_neon.h" float a[4]; void test(void) { float32x2x2_t v; float32x2_t res; v = vld2_f32(a); res = vadd_f32(v.val[0], v.val[1]); vst1_f32(a, res); }
google
chromium
ptrmem10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/ptrmem10.C
540
utf_8
9d32f22603369fb73eb877d78579b8c9
// Origin PR c++/37093 template <class C, void (C::*M) ()> static void foo(void *obj) // { dg-message "note" } { C *p = static_cast<C*>(obj); (p->*M)(); } template <class C> static void bar(C *c, void (C::*m) ()) { foo<C,m>((void *)c);// { dg-error "(not a valid template arg|pointer-to-member|no matching fun|cou...
google
chromium
vararg-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/vararg-2.C
285
utf_8
60563e69386b8a906233c2d479c02e6b
// { dg-do compile } struct QString {}; typedef __builtin_va_list __gnuc_va_list; typedef __gnuc_va_list va_list; QString & sprintf(QString &s,const QString &szFmt,...) { va_list list; __builtin_va_start(list,((const char *)(&(szFmt)))); __builtin_va_end(list); return s; }
google
chromium
nested-extern-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/nested-extern-1.C
242
utf_8
34552611e0ea3221799b7ea6c572fbc0
/* { dg-do run } */ // { dg-additional-sources "nested-extern.cc" } /* PR 31775 */ extern "C" void abort(); extern int *p; int main() { extern int i; i = 1; *p = 2; if (i == 2) abort (); return 0; } static int i; int *p = &i;
google
chromium
friend5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/friend5.C
158
utf_8
72049c1dcfc100c2460af2d110eae2b1
/* PR c++/32111 */ /* This used to ICE. */ /* { dg-do compile } */ struct A { friend A::~A() {} /* { dg-error "implicitly friends of their class" } */ };
google
chromium
datasec1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/datasec1.C
212
utf_8
5af94f8039df2b744ff5d415b5e74405
// PR target/33168 // { dg-do compile } // { dg-require-effective-target named_sections } // { dg-options "-O2 -fdata-sections" } extern const int& foo; namespace { const int bar = 16; } const int &foo = bar;
google
chromium
pr31078
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr31078.C
814
utf_8
7c1a4ef9dd889bd9a64eeb9657827800
typedef int SLONG; typedef char SCHAR; typedef short SSHORT; typedef char TEXT; typedef long ISC_STATUS; const SLONG gds_arg_string = 2; const SLONG gds_sys_request = 335544373L; enum jrd_blk_t { type_str, type_dcc, type_sbm, type_smb, type_blb, type_irb, type_jrn }; struct blk { }; template < class RPT, SSHORT BLO...
google
chromium
operator1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/operator1.C
156
utf_8
5c4a588829781d8931751c4126ebd8aa
// PR c++/27547 // { dg-do compile } int operator=(int); // { dg-error "member function" } void foo() { operator=(0); // { dg-error "not defined" } }
google
chromium
incomplete2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/incomplete2.C
160
utf_8
468830bf97b25deba68d737c1fdec540
// PR c++/19963 // { dg-do compile } struct A; struct B { A a : 1; // { dg-error "incomplete" } }; struct S { S : 1; // { dg-error "incomplete" } };
google
chromium
i386-9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/i386-9.C
270
utf_8
a97214a6af5f7594b62fcb2dd5277097
// PR target/48142 // { dg-do run { target i?86-*-* x86_64-*-* } } // { dg-options "-Os -mpreferred-stack-boundary=5 -fstack-check -fno-omit-frame-pointer" } int main() { try { throw 0; } catch (...) {} return 0; }
google
chromium
increment1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/increment1.C
468
utf_8
91b5ed5104c76d620a1314b0a88fee48
// PR c++/37561 // { dg-do compile } // { dg-options "-Wno-int-to-pointer-cast" } __PTRDIFF_TYPE__ p; char q; void foo () { ((char *) p)++; // { dg-error "lvalue" } ((char *) q)++; // { dg-error "lvalue" } ((char *) p)--; // { dg-error "lvalue" } ((char *) q)--; // { dg-error "lvalue" } ++(char *) p; // { ...
google
chromium
init2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/init2.C
590
utf_8
84228402757e3c8e700713d288e64c46
// { dg-do run } // PR 160. Wrong code emitted for some reference initializers. void Foo () { } int fail; class C { public: int m; int &r; C () ; }; C::C () : m (1), r ((Foo (), m)) { m = 10; if (r != m) fail = 1; else if (&m != &r) fail = 2; } int main () { int m (1); int &r ((Foo (),...
google
chromium
crash-12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/crash-12.C
323
utf_8
37816617cea0cac04699c02e3a6eb9f4
// Origin: PR c++/43953 template<typename T, typename U, typename T::type V> class bad; // partial specialization // for T = U template<typename T, typename T::type V> class bad<T, T, V> { public: static void foo() {} }; struct dummy { typedef int type; }; int main() { bad<dummy, dummy, 0>::foo(); ...
google
chromium
semicolon
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/semicolon.C
208
utf_8
a2a80603fcddfe63208d0fe7940f2149
// PR c++/18368 // { dg-do compile } // { dg-options "-fshow-column" } struct A { struct B { int i; } // { dg-error "after struct definition" } void foo(); };
google
chromium
pr22003
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr22003.C
330
utf_8
45a2be25f7fc440c2cd2fc76af63be51
/* PR rtl-optimization/22003 */ /* { dg-do compile } */ /* { dg-require-effective-target freorder } */ /* { dg-options "-O2 -fno-exceptions -freorder-blocks-and-partition" } */ struct c1 { virtual ~c1(); }; class c4; struct c2 { virtual c4* func(); }; struct c3 : c1, c2 { c4* func(); }; c4* c3::fu...
google
chromium
gc1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/gc1.C
644
utf_8
32f21e74c5b90dde8aa8adfc0d8ea6f0
// This test failed with GGC_ALWAYS_COLLECT because not all unparsed // inline methods were registered with GC. // { dg-do compile } const char *foo () { struct A { const char *a1 () { return "a1"; } const char *a2 () { struct B { const char *b1 () { return "b1"; } cons...
google
chromium
pr37394
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr37394.C
215
utf_8
29dc51371e7e218914330b55739b55e1
// { dg-do compile { target ia64-*-* } } // { dg-options "-O -fschedule-insns2" } struct _Words { void *_M_pword; _Words (): _M_pword (0) { } } _M_word_zero;
google
chromium
big-struct
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/big-struct.C
158
utf_8
dc1cf6dc500d953cbe68a0048105430f
// { dg-do compile { target i?86-*-* x86_64-*-* } } // { dg-require-effective-target ilp32 } struct A { }; struct B : public A { char b[0x20000000]; } e;
google
chromium
anon4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/anon4.C
160
utf_8
eae464f788ecb24ce5c59bc76185c235
// PR c++/27951 // { dg-do compile } void foo() { int i; // { dg-error "previously" } union { int i; }; // { dg-error "redeclaration" } }
google
chromium
typename10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/typename10.C
127
utf_8
31eb059e3dbe1b34a067aafb14847fb8
// PR c++/19253 namespace N { struct X; } template<typename> struct A { A<typename N::X x> a; // { dg-error "invalid" } };
google
chromium
conv_op1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/conv_op1.C
513
utf_8
5a399fbfb7b6718be8ad9eb3ea24af68
// { dg-do compile } // PR 8572. ICE with templated conversion operators. template <typename T> struct A { struct B { }; operator B* () const; B *Foo (); }; template <typename T> typename A<T>::B *A<T>::Foo () { return 0; } template <typename T> A<T>::operator typename A<T>::B* () const { return 0; } void Foo...
google
chromium
parse4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/parse4.C
332
utf_8
a14487514c96c75316c03639ab23dab9
/* PR c++/88 */ /* { dg-do compile } */ class Hvec { public: Hvec(double x, double y, double z); ~Hvec(); }; class Camera1 { public: Camera1(const Hvec &basepos=Hvec(0.0,0.0,0.0)); ~Camera1(); }; class Camera2 { public: Camera2(const Hvec &basepos); inline Camera2() { Camera2(Hvec(0.0,0.0,0.0)); } ~Ca...
google
chromium
attr1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/attr1.C
636
utf_8
d84032d5d61187d741ca91d1d16ee607
// Test whether attributes are accepted both immediately after // struct/union keyword and after the closing brace. // { dg-do compile } struct foo { union __attribute__ ((packed)) { int a; long b; }; union __attribute__ ((packed)) __attribute__ ((unused)) { int c; long d; }; }; union __at...
google
chromium
constructor1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/constructor1.C
197
utf_8
08fcc4835671cba5afbc8ee95f91c89c
// { dg-do compile } // { dg-options "-fshow-column" } ACE_Process_Descriptor::ACE_Process_Descriptor () : // { dg-error "does not name a type" "no type" { target *-*-* } 4 } process_ (0) { }
google
chromium
enum4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/enum4.C
217
utf_8
37fc43724f8801d8874bb3001647ef4f
// PR c++/37389 // { dg-do compile } // { dg-options "-std=gnu++98" } enum { A = 9223372036854775807ULL * 2 + 1, B = B0, // { dg-error "was not declared|overflow" } C = C0 // { dg-error "was not declared" } };
google
chromium
crash35
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/crash35.C
146
utf_8
0657c3904f007c0b7e8f8f11de0483bd
/* This used to ICE. */ /* { dg-do compile } */ struct a {}; class foo : public a, a { /* { dg-error "duplicate base type|at end of input" } */
google
chromium
access6
.C
native_client/pnacl-gcc/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
chromium
crash54
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/crash54.C
202
utf_8
01dee0c926f79152e2a399f4cadb644f
// PR c++/42057 struct A; // { dg-error "forward declaration" } struct B { virtual B* foo(A); }; struct C : virtual B { virtual C* foo(A) { return 0; } // { dg-error "incomplete type" } }; C c;
google
chromium
typedef8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/typedef8.C
301
utf_8
aac47755dab9a02fde16f1e2bb5bd61c
//PR c++ 29024 typedef static int a; // { dg-error "conflicting" } typedef register int b; // { dg-error "conflicting" } typedef extern int c; // { dg-error "conflicting" } static typedef int a; // { dg-error "conflicting" } int foo() { typedef auto int bar; // { dg-error "conflicting" } }
google
chromium
typedef6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/typedef6.C
115
utf_8
174e24e49c802ceec036dddc815a14ff
// PR c++/14667 template<class T> class Class1; class Class2 {} typedef Class1<Class2> Type1; // { dg-error "" }
google
chromium
invalid-op1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/invalid-op1.C
336
utf_8
094471dbb5519a8fc0004177b10912fa
// PR c++/10150 // { dg-do compile } template <int I> struct A { template <int> struct B { enum { e = I * A<I-1>::B }; // { dg-error "dependent-name" "depname" } // { dg-message "note" "note" { target *-*-* } 9 } }; }; A<0>::B<0> a; // { dg-message "required" }
google
chromium
pure1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/pure1.C
167
utf_8
83d63dd38efaf7bc7408deb85bde6d3d
// PR c++/28506 struct A { virtual void* foo() = 1; // { dg-error "pure" } }; struct B { void operator()()() = 1; // { dg-error "pure|function|initializer" } };
google
chromium
cond5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/cond5.C
175
utf_8
66345f83d8ed0f9b1c9d5b8315c90b1e
// PR c++/40566 void f (int x, int y) { int c = x ? 23 : throw "bla"; short d = y ? throw "bla" : 23; char e = x ? 23 : throw "bla"; long f = x ? 23 : throw "bla"; }
google
chromium
pr26997
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/pr26997.C
681
utf_8
893f2840af6f1df245145eec652be3cb
// PR c++/26997 // { dg-do compile } void * malloc (unsigned long size); typedef struct { int a; } t; void foo() { t *v3; v3 = (t *) malloc( sizeof(t) * t->a // { dg-error "before '->' token" } ); } class C { public: void operator[](int); }; C bar (void) { (C ())(3); // { dg-erro...
google
chromium
typename9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/typename9.C
138
utf_8
35ab20568ffabae7969974eae553395b
// check that using a qualified name with a typename does // not report an error. struct A { typedef int X; }; int i = typename A::X();
google
chromium
explicit1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/explicit1.C
302
utf_8
e338c4b0ed33d2c11d4f6cf0d48ac4c9
// { dg-do compile } // PR c++/12403: ICE when explicit specialization is not in // namespace scope. struct foo { template<typename T> void bar (T &t) {} template<> void bar<double>(double &t) {} // { dg-error "non-namespace|template|function" } };
google
chromium
ret-type2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/ret-type2.C
481
utf_8
73dcc0a6dcc79d6ab16b0250ce5f7256
struct S {} f(); // { dg-error "return" "err" } // { dg-message "note" "note" { target *-*-* } 1 } struct T {} *g(); // { dg-error "return" } // { dg-message "note" "note" { target *-*-* } 3 } struct U {} h() {} // { dg-error "return" } // { dg-message "note" "note" { target *-*-* } 5 } struct V {} *i() {} // { dg-erro...
google
chromium
crash2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/crash2.C
170
utf_8
763dc11e85b1839d0dbe23a9460bf2df
/* { dg-do compile } */ int main(void) { char x, y; if ('A' == x) && ('B' == y)) { } /* { dg-error "" } */ if (x == 'A') && (y == 'B')) { } /* { dg-error "" } */ }
google
chromium
error33
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/parse/error33.C
279
utf_8
6a46430c88738717689a5fe077b970ca
/* PR c++/37556 */ /* { dg-do compile } */ struct A { void foo(); }; typedef void (A::T)(); /* { dg-error "typedef name may not be a nested" } */ void bar(T); /* { dg-message "note: declared here" } */ void baz() { bar(&A::foo); /* { dg-error "too many arguments" } */ }