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
pr30567
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr30567.C
496
utf_8
e980bf95890544d46879b89f7aa98df6
/* { dg-do run } */ template <typename T> struct const_ref { const T* begin; const_ref(const T* b) : begin(b) {} }; template <typename T> T sum(const_ref<T> const& a) { T result = 0; for(unsigned i=0;i<1;i++) result += a.begin[i]; return result; } struct tiny_plain { int elems[2]; tiny_plain() { elems[...
google
chromium
pr46364
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr46364.C
209
utf_8
e9209566e49c153d9b35c2088acde779
// { dg-do compile } #include <string> void a() throw (int); void b(std::string const &); void c(std::string *e) { b(""); try { a(); } catch (...) { *e = ""; } } void d() { c(0); }
google
chromium
pr45934
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr45934.C
225
utf_8
2277fc1457feb3eb95e1d4868983fd02
/* { dg-do run } */ extern "C" void abort (); struct B *b; struct B { virtual void f () { } ~B() { b->f(); } }; struct D : public B { virtual void f () { abort (); } }; int main () { D d; b = &d; return 0; }
google
chromium
pr45393
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr45393.C
901
utf_8
f330bdf5883a6d3381a5cd9e818fa037
// { dg-do compile } class FloatPoint; class Path { public: ~Path(); void moveTo(const FloatPoint&); static void createEllipse(const FloatPoint& center, float rx, float ry); }; extern "C" { extern float cosf (float); extern float sinf (float); } const float piFloat = static_cast<float>(3.1415926535...
google
chromium
pr36191
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr36191.C
335
utf_8
99776ddbd6dfc9915d264bab7b74874a
// PR c++/36191 // { dg-do compile } // { dg-options "-fnon-call-exceptions" } // { dg-skip-if "Frame pointer required for unwind tables" { m68k*-*-* fido*-*-* } "-fomit-frame-pointer" "" } __complex__ double foo (__complex__ double x, double y) { try { return x / y; } catch (char *s) { ret...
google
chromium
pr36826
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr36826.C
7,484
utf_8
cf5d152ee553d0114e754f112878e09d
template <class T> T CoinMax(register const T x1, register const T x2); template <class T> T CoinMin(register const T x1, register const T x2); class CoinIndexedVector; class ClpModel { protected: double objectiveScale_; double rhsScale_; int numberRows_; int numberColumns_; double * rowActivity_; ...
google
chromium
pr45874
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr45874.C
1,743
utf_8
b3525a9984f80b9df4cf0385e6a84e16
// { dg-do compile } typedef struct { } IppLibraryVersion; typedef unsigned char Ipp8u; typedef unsigned int Ipp32u; typedef signed int Ipp32s; typedef enum e_vm_Status { VM_OK = 0, VM_OPERATION_FAILED =-999, VM_NOT_INITIALIZED =-998, VM_TIMEOUT =-987, VM_NOT_ENOUGH_DATA =-996, VM_NULL_PTR =-9...
google
chromium
pr40991
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr40991.C
4,663
utf_8
3d9da63278b38033f55230ad5c32d62f
/* { dg-options "-std=gnu++0x" } */ typedef __SIZE_TYPE__ size_t; namespace std __attribute__ ((__visibility__ ("default"))) { using ::size_t; void __throw_bad_function_call() __attribute__((__noreturn__)); } inline void* operator new(std::size_t, void* __p) throw() { return __p; } namespace std { clas...
google
chromium
pr44809
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr44809.C
138
utf_8
b40bbd38e5725b10a9230bce491b9b0c
// { dg-do compile } unsigned int mEvictionRank[(1 << 5)]; void Unswap(int i) { mEvictionRank[i] = ({ unsigned int __v = i; __v; }); }
google
chromium
pr42462
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr42462.C
1,023
utf_8
caab81fe664970346251ad3c65b46250
/* { dg-do run } */ #define INLINE inline __attribute__((always_inline)) extern "C" void abort (void); template<class> struct Foo { inline bool isFalse() { return false; } template <bool> void f1() {} template <bool> INLINE void f2() { f1<false>(); } template <bool> void ...
google
chromium
pr43068
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr43068.C
176
utf_8
dd22df6fbe8eea710f762c4b9dc3234b
/* { dg-do compile } */ /* { dg-options "-freorder-blocks -ftracer} */ struct A { virtual A *f(); }; struct B : virtual A { virtual B *f(); }; B *B::f() { return 0; }
google
chromium
pr47313
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr47313.C
1,982
utf_8
e87bebc595a173e1bb72705b26424cba
// { dg-do compile } namespace internal { template < class DSC, bool Const > struct CC_iterator { typedef CC_iterator iterator; typedef typename DSC::value_type value_type; typedef const value_type* pointer; CC_iterator () ; CC_iterator (const iterator &it) { } pointer p; pointer operator->() c...
google
chromium
pr42739
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr42739.C
154
utf_8
94167fe7caf3f0a098eb425cde1ee709
/* { dg-do compile } */ struct s { ~s() { s(); } }; int f() { M: s o = s(); f(); f(); L: goto *(f() ? &&L : &&M); return 0; }
google
chromium
pr33589-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr33589-1.C
396
utf_8
2398667e5078f8e7f3b3ca7e16893791
// { dg-do compile } struct base { void somemethod() {} }; struct derived : public base { }; struct smartpointer { ~smartpointer() { } operator derived*() const { return 0; } }; typedef void ( derived::* methodptr_type )(); methodptr_type getmemberptr() { return &derived::somemethod; } void somefun...
google
chromium
pr37146-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr37146-1.C
1,051
utf_8
a6f8a68c45819e14c2089195e56b5d01
// PR c++/37146 // { dg-do run } extern "C" void abort (); int a, b; struct A { int i:8; int j:8; int k:16; int l:32; } c; void f1 (int x, int y) { (x ? a : b) = y; } void f2 (int x, int y) { (x ? c.i : c.j) = y; } void f3 (int x, int y) { (x ? c.i : a) = y; } void f4 (int x, int y) { (x ? c.i : c.k) = y; ...
google
chromium
pr46287
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr46287.C
733
utf_8
53103bc6b95cbce9b824c821ba63074f
// Check that indirect calls to thunks do not lead to errors. // { dg-do run } extern "C" void abort (); class A { public: virtual void foo () {abort();} }; class B : public A { public: int z; virtual void foo () {abort();} }; class C : public A { public: void *a[32]; unsigned long b; long c[32]; vir...
google
chromium
pr45699
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr45699.C
629
utf_8
8522ec70c8ce30caf355cc42899c3552
// { dg-do run } extern "C" void abort (); class A { public: virtual void foo () {abort();} }; class B : public A { public: int z; virtual void foo () {abort();} }; class C : public A { public: void *a[32]; unsigned long b; long c[32]; virtual void foo () {abort();} }; class D : public C, public B {...
google
chromium
pr40323
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr40323.C
1,009
utf_8
45ff701ec258d48b40e6b97258dd6c62
/* Testcase for PR 40323. */ /* { dg-do compile } */ /* { dg-options "-fno-early-inlining" } */ /* { dg-add-options bind_pic_locally } */ extern void do_something (const char *, int); class Parent { private: const char *data; public: Parent (const char *d) : data(d) {} int funcOne (int delim) const; }; c...
google
chromium
pr33887-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr33887-1.C
677
utf_8
d3c8ab54a210cf43bc90436168df7276
/* { dg-do run } */ extern "C" void abort (void); struct S { unsigned int i : 24; } x; void __attribute__((noinline)) test1() { if (--x.i != 0x00ffffff) abort (); if (x.i != 0x00ffffff) abort (); } void __attribute__((noinline)) test2() { if (x.i-- != 0) abort (); if (x.i != 0x00ffffff) abort (...
google
chromium
20090706-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/20090706-1.C
1,666
utf_8
683450b729160794735761779ca70f64
/* { dg-do compile } */ namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp> class new_allocator { }; template<typename _Tp> class allocator: public new_allocator<_Tp> { }; template<typename _Tp, typename _Alloc> struct _Vector_base { }; template<typen...
google
chromium
20100702-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/20100702-1.C
737
utf_8
0b2b85ac6dafb7049980d831651adb25
// { dg-do compile } // { dg-options "-fprefetch-loop-arrays -w" } class ggPoint3 { public: ggPoint3(); inline double &x() { return e[0]; } inline double &y() { return e[1]; } ggPoint3(const ggPoint3 &p); double e[3]; }; class ggBox3 { public: ggPoint3 min() const; }; class ggHAffineM...
google
chromium
pr41257-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr41257-2.C
125
utf_8
4cfbe910579cb6bce1d3683cc1cb4058
/* { dg-do link } */ struct A { virtual ~A(); }; struct B : virtual A { virtual ~B() {} }; int main() { return 0; }
google
chromium
pr34953
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr34953.C
340
utf_8
85e911bb9e21255ea86be27fe65584a1
/* { dg-do compile } */ /* { dg-options "-w" } */ void B_CLEAR(void* ret); void B_NeverReturns(void* ret) __attribute__((noreturn)); int main() { const struct AutoErrPop { ~AutoErrPop() { } } AutoErrPopper = { }; B_NeverReturns(0); } void B_NeverReturns(void* ret) { B_CLEAR(ret); /* Never returns (does a...
google
chromium
pr38811
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr38811.C
2,112
utf_8
47f547029d2bafa168554e84ad1e90d8
/* { dg-do compile } */ typedef unsigned long ULONG; void iwos_ErrorMessage(long error, const char * const file_name, ULONG line_num, const char * const message); class AbcA2d { public: double x; double y; ~AbcA2d() { } }; enum AbcZyParamType { ABC_SP_1 }; class AbcExtent2d { Abc...
google
chromium
pr48165
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr48165.C
733
utf_8
e01f63077b5ff221c0cf9cc6d814eb33
/* { dg-do compile } */ typedef __SIZE_TYPE__ size_t; extern "C" { extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () { return __builtin___memcpy_chk...
google
chromium
pr33340
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr33340.C
497
utf_8
e7e4b2dc9d1619f87f1e2e87f843e498
void* operator new(__SIZE_TYPE__, void* __p) { } struct auto_ptr { int* p; ~auto_ptr() { delete p; } }; typedef void* T; struct vector { void push_back(const T& __x) { ::new(0) T(__x); insert(__x); } void insert(const T& __x); } v; void g(); voi...
google
chromium
pr37922
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr37922.C
11,849
utf_8
1ecbbaaa6e73ba832830eab989e19fa4
// { dg-do run } // { dg-options "-fpic" { target fpic } } typedef __SIZE_TYPE__ size_t; template <typename NumType> inline NumType absolute(NumType const& x) { if (x < NumType(0)) return -x; return x; } class trivial_accessor { public: typedef size_t index_type; struct index_value_type {}; trivia...
google
chromium
pr39002
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr39002.C
1,414
utf_8
1d870df7afc3c1bee9a83985d78555da
// PR target/39002 // { dg-do run } struct S { double x; double y; double z; }; double foo (S *, S *); void bar (S *, S *, S *, double &, double &, double &); double foo (S *a1, S *a2) { return __builtin_sqrt ((a1->x - a2->x) * (a1->x - a2->x) + (a1->y - a2->y) * (a1->y - a2->y) + (a1->z - a2->z) * (...
google
chromium
pr42760
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr42760.C
566
utf_8
43953aa4786b2f0d157a0429e79efabb
// PR middle-end/42760 // { dg-do compile } template <typename T> struct A { static T b (T it) { return it; } }; template <typename T, typename U> static U baz (T x, T y, U z) { for (long n = y - x; n > 0; --n) { *z = *x; ++z; } }; template <typename T, typename U> U bar (T x, T y, U z) { b...
google
chromium
pr41183
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr41183.C
340
utf_8
f28f286c697e103cd07cfc388614a22f
// PR c++/41183 // { dg-do compile } void foo (const char *); template <int *> struct A { template <typename T> A (const int &, T); int i; }; template <int *X> template <typename T> A<X>::A (const int &j, T) : i(j) { foo (0); foo (0); foo (__PRETTY_FUNCTION__); } int N; struct B { B (); A<&N> a; }; ...
google
chromium
pr47290
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr47290.C
186
utf_8
5dde3d0578e1439d9d3996d53c5837d5
// PR tree-optimization/47290 // { dg-do compile } struct V { V (int = 0); ~V () { for (;;) ; } int size (); }; struct S { V a, b; S () : b (a.size ()) {} } s;
google
chromium
pr44915
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr44915.C
179
utf_8
dc744dc373dfd8c3c33963f78a643762
/* { dg-do compile } */ /* { dg-options "-findirect-inlining" } */ struct A; typedef void (A::*f_ptr) (); void dummy (f_ptr) { } void call_dummy (f_ptr cb) { dummy (cb); }
google
chromium
pr37716
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr37716.C
636
utf_8
de29b40a08801f9b5e56f032d4682fb1
// PR tree-optimization/37716 // { dg-do compile } struct A { struct B { int a, b, c, d; void *e[1]; }; B *d; inline void **f1 (int i) const { return d->e + d->c + i; } }; template <typename T> struct C { struct D { void *v; inline T & f3 () { return *reinterpret_cast <...
google
chromium
pr43879-1_1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/pr43879-1_1.C
543
utf_8
1140055e1a01f12b51cb9cef67e2eea9
/* { dg-do run } */ /* { dg-options "-fipa-pta" } */ /* { dg-additional-sources "pr43879-1_0.C" } */ struct A { int *i; A(); ~A(); }; static inline int aa(int *a, int *b) { (void)b; return *a; } struct B { B() : i(0) {} int i; B(const A &a) : i(0) { f(*a.i); } void __att...
google
chromium
unwind-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/unwind-3.C
734
utf_8
860e4d2471279287c9143a2b9bb0e563
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ #include "test-unwind.h" #if !defined __PIC__ && !defined __USING_SJLJ_EXCEPTIONS__ /* Test situation 3: Stack realign really happen with DRAP reg DI */ void __attribute__ ((noinline)) __attribute__ ((regparm(3))) bar (int arg1, int arg2, int arg3) {...
google
chromium
unwind-5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/unwind-5.C
704
utf_8
22f292e5d79a03f64a7536467d29b689
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ #include "test-unwind.h" #if !defined __PIC__ && !defined __USING_SJLJ_EXCEPTIONS__ double g_f=1.0; /* Test situation 5: Stack realign dosn't really happen with DRAP reg CX */ void __attribute__ ((noinline)) __attribute__ ((regparm(2))) bar(int arg1,...
google
chromium
throw-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/throw-3.C
796
utf_8
c488ee7de768d61350ad78cfd41ad3f9
/* { dg-do run } */ #include "check.h" #ifndef ALIGNMENT #define ALIGNMENT 64 #endif typedef int t_align __attribute__((aligned(ALIGNMENT))); int global, global2; void bar() { volatile t_align a = 1; int i,j,k; i=j=k=0; for (i=0; i < global; i++) for (j=0; j < i; j++) global2 = ...
google
chromium
unwind-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/unwind-2.C
611
utf_8
6764e5471934a26fbf6d90847e9a6d8b
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ #include "test-unwind.h" #if !defined __PIC__ && !defined __USING_SJLJ_EXCEPTIONS__ /* Test situation 2: stack really realign with DRAP reg CX */ void __attribute__ ((noinline)) foo () { int __attribute__ ((aligned(64))) a=4; char * s = (char *) _...
google
chromium
unwind-4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/unwind-4.C
392
utf_8
4d8c80bb64655e322537b863f0eb652b
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ #include "test-unwind.h" #if !defined __PIC__ && !defined __USING_SJLJ_EXCEPTIONS__ volatile int __attribute__ ((aligned(32))) g_a=1; /* Test situation 4: no Drap and stack realign doesn't really happen */ void __attribute__ ((noinline)) foo() { int ...
google
chromium
eh-vararg-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-2.C
1,140
utf_8
3ae2c582ce62f5faabf7d8602cf8d231
/* { dg-options "-Wno-abi" {target arm_eabi} } */ /* { dg-do run } */ /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include <stdarg.h> #include "check.h" #ifndef ALIGNMENT #define ALIGNMENT 64 #endif typedef int aligned __attribute__((aligned(ALIGNMENT))); int global; void bar (char...
google
chromium
unwind-6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/unwind-6.C
704
utf_8
2a4f41d0ba2571b1211bd73b3edb34d4
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ #include "test-unwind.h" #if !defined __PIC__ && !defined __USING_SJLJ_EXCEPTIONS__ double g_f=1.0; /* Test situation 6: Stack realign dosn't really happen with DRAP reg DI */ void __attribute__ ((noinline)) __attribute__ ((regparm(3))) bar(int arg1,...
google
chromium
stdcall-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/stdcall-1.C
338
utf_8
b1433c47f1b3510e41343cb1176ab88e
// { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } // This case is to detect an assertion failure in stack branch development. bool f(); struct S { __attribute__ ((stdcall)) ~S(); }; void g() { for (;;) { S s1, s2, s3; if (f()) continue; if (f()) ...
google
chromium
throw-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/throw-1.C
1,002
utf_8
232d8b13d1b4cce42c5539a1b50ac79e
/* { dg-do run } */ /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" #ifndef ALIGNMENT #define ALIGNMENT 64 #endif typedef int t_align __attribute__((aligned(ALIGNMENT))); int global, global2; void bar() { volatile t_align a = 1; int i,j,k,l,m,n; ...
google
chromium
throw-4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/throw-4.C
893
utf_8
dd05e223c9a803ea6370d6be3a588f8f
/* { dg-do run } */ /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" #ifndef ALIGNMENT #define ALIGNMENT 64 #endif typedef int t_align __attribute__((aligned(ALIGNMENT))); int global, global2; void bar() { volatile t_align a = 1; int i,j,k; i=j=...
google
chromium
eh-inline-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/eh-inline-1.C
539
utf_8
92dfcd813d20a9f35f2bfef2a248980d
/* { dg-do run } */ /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" #ifndef ALIGNMENT #define ALIGNMENT 64 #endif typedef int aligned __attribute__((aligned(ALIGNMENT))); int global; class Base {}; struct A : virtual public Base { A() {} }; struct B {}; static v...
google
chromium
eh-thiscall-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/eh-thiscall-1.C
614
utf_8
20732e9e6c32512ab126c67b332996bb
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ #include "check.h" #ifndef ALIGNMENT #define ALIGNMENT 64 #endif typedef int aligned __attribute__((aligned(ALIGNMENT))); int global; class Base {}; struct A : virtual public Base { A() {} }; struct B {}; __attribute__ ((thiscall)) void foo (i...
google
chromium
unwind-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/unwind-1.C
387
utf_8
2aa74f86eb0a63ab07e4ff6ab3e3bec7
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ #include "test-unwind.h" #if !defined __PIC__ && !defined __USING_SJLJ_EXCEPTIONS__ /* Test situation 1: Stack really realign without DRAP */ void __attribute__ ((noinline)) foo () { int __attribute__ ((aligned(64))) a=1; if (check_int (&a, __ali...
google
chromium
eh-fastcall-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/eh-fastcall-1.C
614
utf_8
65dae60ad793312834f42540e993be33
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ #include "check.h" #ifndef ALIGNMENT #define ALIGNMENT 64 #endif typedef int aligned __attribute__((aligned(ALIGNMENT))); int global; class Base {}; struct A : virtual public Base { A() {} }; struct B {}; __attribute__ ((fastcall)) void foo (i...
google
chromium
unwind-0
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/unwind-0.C
298
utf_8
d53f4a36bfd00298b6b687881aad6861
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ #include "test-unwind.h" #if !defined __PIC__ && !defined __USING_SJLJ_EXCEPTIONS__ void __attribute__ ((noinline)) foo() { ALTER_REGS(); // Throw the except and expect returning to main throw 1; } #endif
google
chromium
throw-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/throw-2.C
873
utf_8
5ff41a020f8c55977a499ded1d20cd6a
/* { dg-do run } */ /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" #ifndef ALIGNMENT #define ALIGNMENT 64 #endif typedef int t_align __attribute__((aligned(ALIGNMENT))); int global, global2; void bar() { volatile t_align a = 1; int i,j,k; i=j=...
google
chromium
eh-vararg-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-1.C
1,048
utf_8
cc50573a10b6d39c7aa3927e2129fdc9
/* { dg-do run } */ /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include <stdarg.h> #include "check.h" #ifndef ALIGNMENT #define ALIGNMENT 64 #endif typedef int aligned __attribute__((aligned(ALIGNMENT))); int global; void bar (char *p, int size) { __builtin_strncpy (p, "good", s...
google
chromium
eh-inline-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/eh-inline-2.C
846
utf_8
7130a6732f64fb15d019de94d494c485
/* { dg-do run } */ /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" #ifndef ALIGNMENT #define ALIGNMENT 64 #endif typedef int aligned __attribute__((aligned(ALIGNMENT))); int global; void bar (char *p, int size) { __builtin_strncpy (p, "good", size); } class Base ...
google
chromium
eh-alloca-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/eh-alloca-1.C
800
utf_8
a2640d6e02d5a97f0d7dcdb40222c450
/* { dg-do run } */ /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" #ifndef ALIGNMENT #define ALIGNMENT 64 #endif typedef int aligned __attribute__((aligned(ALIGNMENT))); int global; void bar (char *p, int size) { __builtin_strncpy (p, "good", size); } class Base ...
google
chromium
eh-global-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/eh-global-1.C
495
utf_8
069fa26a1718a9edcb3339f15f230a93
/* { dg-do run } */ /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" #ifndef ALIGNMENT #define ALIGNMENT 64 #endif typedef int aligned __attribute__((aligned(ALIGNMENT))); int global; class Base {}; struct A : virtual public Base { A() {} }; struct B {}; void foo...
google
chromium
empty
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/pch/empty.C
47
utf_8
15aea326d8b4d518b4dadcac97f9f297
#include "empty.H" int main() { return 0; }
google
chromium
uninst
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/pch/uninst.C
154
utf_8
5e2076ec1abc6d548370361f9390b543
#include "uninst.H" template <class Type> void FOO() { } int main() { FOO<char>(); // stage 2 needs this return min<unsigned long>(5, 0); }
google
chromium
system-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/pch/system-1.C
90
utf_8
a5379c2bad433698a01b3bc2d5473a2e
#include "system-1.H" int main() { std::cout << "hello world!" << '\n'; return 0; }
google
chromium
externc-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/pch/externc-1.C
70
utf_8
0fe6f1480902d6dccb349304faa9020c
#include "externc-1.H" template <typename X> struct foo { X y; };
google
chromium
wchar-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/pch/wchar-1.C
21
utf_8
3c027648f765cf5846e0b1be267760f6
#include "wchar-1.H"
google
chromium
system-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/pch/system-2.C
95
utf_8
7daf10e506bd5381e81d1d9326cb6047
#include "system-2.H" int main() { std::cout << "hello world!" << std::endl; return 0; }
google
chromium
pch
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/pch/pch.C
145
utf_8
ad6f5086cf6e7c286f16360d228ebb1a
// { dg-options "-save-temps -fpch-preprocess -I." } #include "pch.H" int main() { return 0; } // { dg-final { cleanup-saved-temps ".s" } }
google
chromium
static-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/pch/static-1.C
131
utf_8
956a76bba7ed55fcdd73d80efdfa4c90
#include "static-1.H" int LocalStaticTest() { static A sa; } int main(int argc, char **argv) { A::StaticTest(); }
google
chromium
array-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/pch/array-1.C
118
utf_8
d9064b328bf2156a9e67df26156ec572
// PR c++/36852 #include "array-1.H" template <class T> T A::foo (T t[3][3]) { return t[0][1]; } int main () { }
google
chromium
template-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/pch/template-1.C
62
utf_8
0088d888a13d8099ceb6530a15ff9c5e
// PR c++/28217 #include "template-1.H" int main (void) { }
google
chromium
local-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/pch/local-1.C
65
utf_8
3456d98b10198c0bf9091088ba05d0f0
#include "local-1.H" int main() { func<int> (); return 0; }
google
chromium
initp1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/special/initp1.C
1,745
utf_8
d646642e04b6f7a6bb987dddc08a0268
/* { dg-do run { target init_priority } } */ #include <stdlib.h> class Two { private: int i, j, k; public: static int count; Two( int ii, int jj ) { i = ii; j = jj; k = count++; }; Two( void ) { i = 0; j = 0; k = count++; }; int eye( void ) { return i; }; int jay( void ) { return j;...
google
chromium
conpr-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/special/conpr-3.C
392
utf_8
ce313483756ae4ae75458a512a089656
/* { dg-do run { target init_priority } } */ /* { dg-additional-sources "conpr-3a.cc conpr-3b.cc" } */ #include <stdlib.h> class foo_t { int x; static int count; public: foo_t(void) { x=++count; } int get(void) { return x; } }; int foo_t::count; extern foo_t foo1, foo2; int main(void) { if ( (...
google
chromium
initpri2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/special/initpri2.C
1,346
utf_8
495d2d9e552898de91e04d1536c2d0bc
/* { dg-do compile { target init_priority } } */ /* Priorities must be in the range [0, 65535]. */ void c1() __attribute__((constructor (-1))); /* { dg-error "priorities" } */ void c2() __attribute__((constructor (65536))); /* { dg-error "priorities" } */ void d1() __attribute__((destructor (-1))); /...
google
chromium
initpri1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/special/initpri1.C
862
utf_8
ae5f6e9b349b6bd54b510d6f4e11eab0
/* { dg-do run { target init_priority } } */ extern "C" void abort (); int i; int j; void c1() __attribute__((constructor (500))); void c2() __attribute__((constructor (700))); void c3() __attribute__((constructor (600))); void c1() { if (i++ != 0) abort (); } void c2() { if (i++ != 2) abort (); } voi...
google
chromium
conpr-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/special/conpr-2.C
380
utf_8
10b8296ca633ed8ef18ef66de1472045
/* { dg-do run { target init_priority } } */ /* { dg-additional-sources "conpr-2a.cc" } */ #include <stdlib.h> class foo_t { int x; static int count; public: foo_t(void) { x=++count; } int get(void) { return x; } }; int foo_t::count; extern foo_t foo1, foo2; int main(void) { if ( (foo1.get() !...
google
chromium
conpr-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/special/conpr-1.C
299
utf_8
2a467b197d39f6d623192355bbc4b5d3
/* { dg-do run { target init_priority } } */ #include <stdlib.h> class foo_t { int x; public: foo_t(void) { x=1; } int get(void) { return x; } }; static foo_t foo __attribute__((init_priority(5000))); int main(void) { if (foo.get()) exit(0); else abort(); }
google
chromium
conpr-4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/special/conpr-4.C
392
utf_8
a0eb468046d5e36275ade20495e2f0c4
/* { dg-do run { target init_priority } } */ /* { dg-additional-sources "conpr-3b.cc conpr-3a.cc" } */ #include <stdlib.h> class foo_t { int x; static int count; public: foo_t(void) { x=++count; } int get(void) { return x; } }; int foo_t::count; extern foo_t foo1, foo2; int main(void) { if ( (...
google
chromium
operators10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/operators10.C
383
utf_8
b91033cea46793dace64923d9eb6d3e9
// { dg-do assemble } // GROUPS passed operators // opr-eq file // Subject: g++ bug // Date: Thu, 3 Jun 93 22:24:13 -0500 template <class T> struct Test { int data; Test& operator=(int i) { data = i; return *this; } }; int main() { Test<int> i, j; i = j; return 0; }
google
chromium
enum4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/enum4.C
666
utf_8
e2c91a6a5a94779a1019ea75239364a6
// { dg-do assemble } // GROUPS passed enums // enum file enum Enum {enumerator1, enumerator2}; struct Struct { int i; int getI(Enum) {return i;} // { dg-message "Struct::getI|no known conversion" } }; int funct (Enum) { return 0; } int main() { Enum e = enumerator1; Struct s; int x = funct(e+1);// { d...
google
chromium
nest5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/nest5.C
401
utf_8
3a28e8608852c676107da2157b8bcf50
// { dg-do assemble } // GROUPS passed nest // nest file void foo() { class Wrapper { public: void F (void * Wrapperptr) { Wrapper * wrapptr = ( Wrapper *) Wrapperptr; } }; }
google
chromium
visibility4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/visibility4.C
556
utf_8
19415a8b2c4bcb3642e9debecfffb440
// { dg-do assemble } // GROUPS passed visibility // visibility file class A { public: int b; // { dg-error "" } private }; class C : private A { // NOTE WELL. private, not public public: int d; }; extern "C" int printf( const char *, ...); class E : public C { void f() { ...
google
chromium
missed-error2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C
1,302
utf_8
099a13af65b3446a02cb78ffe2587b89
// { dg-do assemble } // GROUPS passed missed-error // missed-error file #include <iostream> // The VxWorks kernel-mode headers define a macro named "max", which is not // ISO-compliant, but is part of the VxWorks API. #if defined __vxworks && !defined __RTP__ #undef max #endif inline int max(int a, int b) {return a >...
google
chromium
scope1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/scope1.C
429
utf_8
46a6e26271d3f0d8ac451258913ab825
// { dg-do assemble } // GROUPS passed scoping // scoping file int main(void) { struct A{ public: int i; void set (int i) {A::i = i;} // g++ gives wrong error }; A a; a.set(17); return 0; }
google
chromium
cvt3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/cvt3.C
318
utf_8
5a53e590eeb34714c1cdc96900f7bf8c
// { dg-do assemble } // GROUPS passed conversions // cvt file
google
chromium
init3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/init3.C
342
utf_8
9b194baffdc3cd87c779ff60625d15f6
// { dg-do assemble } // GROUPS passed initialization // init file int main() { int offset; char buf[offset]=""; // { dg-error "" } ansi forbids variable arrays }
google
chromium
array1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/array1.C
488
utf_8
638fa4956e56c7fb5934d5d519cc118f
// { dg-do run } // GROUPS passed arrays // array file // Subject: constructors not called on new'ed array elements // Date: Sat, 11 Apr 92 22:53:35 CDT #include <stdio.h> int i = 0; class foo { private: static foo *array; public: foo() { i++; } }; foo* foo::array = new foo [5]; int main() { if (i ...
google
chromium
arm5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/arm5.C
543
utf_8
2b4a336aec2b1f50014550ed0e9a7d37
// { dg-do run } // GROUPS passed ARM-compliance // arm file // Subject: page 78 of the ARM // Date: Mon, 7 Dec 92 22:27:09 +0100 extern "C" int printf( const char *, ...); int & max( int & a, int & b) { return (a < b) ? b : a; } int main( void) { int a = 1; int b = 2; int & c = max( a,...
google
chromium
operators18
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/operators18.C
596
utf_8
851c5232212f96b8f53783fa25fb13c0
// { dg-do assemble } // GROUPS passed operators // opr-ampr file enum E { a, b, c }; struct Estr { E value; Estr() {} Estr( int i ) : value( (E)i ) {} operator E() { return value; } }; ...
google
chromium
visibility13
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/visibility13.C
2,494
utf_8
ada624624ac329cec31588daed334d60
// { dg-do assemble } // GROUPS passed visibility // visibility file #include <iostream> #include <cassert> // --------------- Array.h && Array.cc ------------------ using namespace std; const int ArraySize = 12; template <class Type> class Array { // { dg-error "" } .struct Array_RC redecl.* friend class Ar...
google
chromium
cvt19
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/cvt19.C
343
utf_8
59c4dcdbd25a43a3d1379b1156ae3c08
// { dg-do assemble } // GROUPS passed conversions // cvt file // Date: Tue, 13 Jul 93 17:00:44 BST class B {}; class A { public: operator const B*() const { return b; } private: B* b; }; int main() { A a; if (a!=0) { } }
google
chromium
template3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/template3.C
248
utf_8
d23ef9b8d21b1c02e42bdecdf5a495b8
// { dg-do assemble } // GROUPS passed templates template< class R, class T1 = R, class T2 = T1 > struct plus { R operator()( const T1& x, const T2& y ) const { return x + y; } }; int main() { plus< int > p; return 0; }
google
chromium
arg5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/arg5.C
287
utf_8
b0f9075e05d637f35c3bd890e20791bf
// { dg-do assemble } // GROUPS passed arg-matching extern double pow(double,int*); extern "C" { extern int printf (const char *, ...); extern double pow(double, double); } int main() { if (pow (2.0, 3.0) != 8.0) { printf ("FAIL\n"); return 1; } else printf ("PASS\n"); }
google
chromium
refs1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/refs1.C
777
utf_8
b13e21bd4f45e20bd28833048a99706f
// { dg-do run } // GROUPS passed references // (Message bugs/refs:1) #include <stdio.h> class C { private: const char** list; public: C(const char** ); void count (int&); }; C::C (const char** l) { list = l; } void C::count (int& total) { if (*list == NULL) return; else { list++; c...
google
chromium
operators22
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/operators22.C
172
utf_8
e9e99b7ca1bde9611e92275f33e876dc
// { dg-do assemble } // GROUPS passed operators template <class T> class t { public: t() {} }; class m { t<int> c; public: m() : c() {} }; m *p() {return new m;}
google
chromium
init5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/init5.C
430
utf_8
6b2391d549fd37a3bd0a45235a0e6fc4
// { dg-do assemble } // { dg-options "-pedantic-errors" } // GROUPS passed initialization // init file extern int fred( int); class X { public : void f( int = fred( 0) ) ; // { dg-error "" } previous spec } ; void X::f( int x = fred( 0) ) {// { dg-error "" } .* }
google
chromium
cvt7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/cvt7.C
1,170
utf_8
74e29b644a4c72c033604e00a32a038c
// { dg-do run } // GROUPS passed conversions // cvt file // Subject: implicit int. convs. from member refs. in switch expressions #include <cstdio> class A { public: A(int j) { i = j; } A(A& a) { i = a.i; } operator int() { return i; } void assign(int v) { i = v; } int i; }; class B { public: ...
google
chromium
parsing6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/parsing6.C
375
utf_8
1211d898222e0ecc0193f8e5f6ca4d9d
// { dg-do assemble } // GROUPS passed parsing // parsing folder typedef int (*cow[3])(...); int main() { cow fs; int (*pig[3])(...); // line 5 }
google
chromium
operators15
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/operators15.C
606
utf_8
06776eb2fb48141d4042c0f36e3d7340
// { dg-do run } // GROUPS passed operators // opr-del file // Subject: bug report // Date: Wed, 27 Jan 1993 16:37:30 -0500 extern "C" int printf(const char* ...); int delete_counter = -1; struct T{ void operator delete (void * p) {delete_counter ++; ::operator delete(p);} }; int main(void) { T * ps1 = new T; ...
google
chromium
missed-error3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/missed-error3.C
4,115
utf_8
148550d0fadd59c32845caec87bce551
// { dg-do assemble } // GROUPS passed missed-error // missed-error file // enum bool { FALSE = 0, TRUE = 1 }; typedef int T; class Traversable { public: virtual const T item() const = 0; virtual const bool off() const = 0; virtual ~Traversable() { } }; class Chain : public Traversable { public: virtua...
google
chromium
cvt16
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/cvt16.C
491
utf_8
8aa22627fdc9a22b8eef20f4fdcb3a12
// { dg-do assemble } // GROUPS passed conversions // cvt file // Subject: g++ bug // Date: Mon, 12 Apr 93 10:47:01 MDT #include <iostream> class B { }; class A : public B { short s; public: A(short _s = 0) { s = _s; } operator const short &() const { return s; } }; int main() { A a(37); //cout << a ...
google
chromium
arm9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/arm9.C
1,031
utf_8
e935bfe654e8cb35b29466d943a901ff
// { dg-do assemble } // GROUPS passed ARM-compliance #include <iostream> enum f1 { F1 }; enum f2 { F2 }; class A { public: void set (f1 f); }; void A::set (f1 f) { std::cout << "called A f1\n";} class B : public A { public: void set (f2 f); }; void B::set (f2 f) { std::cout << "called B\n|n...
google
chromium
ctors15
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/ctors15.C
535
utf_8
547a4a89b8882a89408c4da563c2cf13
// { dg-do run } // GROUPS passed constructors // ctor file // Subject: bug with new/delete of multidimensional array // Date: Sat, 27 Mar 93 14:04:52 EST #include <stdio.h> #include <stdlib.h> int construct = 0; class Element { public: Element() { construct++; if (construct > 6) {printf ("FAIL\n"); exit(1);}} ...
google
chromium
scope3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/scope3.C
440
utf_8
30ade8dcbeee835295128ff793fbf57f
// { dg-do assemble } // GROUPS passed scoping // local-class file void f() { { struct A { A() {} } a; }; { struct A { A() {} } a ; }; }
google
chromium
global-init1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/global-init1.C
487
utf_8
3dcbeb7d145ae39da345f01ab8299d61
// { dg-do run } // GROUPS passed initialization // global-init file // Subject: Initializers - gcc 2.2.2 (g++), SPARC, SunOS 4.1.1 // Date: Wed, 2 Dec 92 09:56:01 PST #include <stdio.h> struct S { int a; int c; }; int i = 3; S s = {6, i}; S * the_s () { return &s; } int main () { S * cls = the_s (); if (cls->a...
google
chromium
ctors1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.old-deja/g++.law/ctors1.C
342
utf_8
ddd94f6a966c58c0d4cb276a337f304f
// { dg-do assemble } // GROUPS passed constructors // ctor file class POOL { public: POOL(); }; struct VAL_LIST { POOL pool[2]; }; VAL_LIST baz;