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
pr32950
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr32950.C
161
utf_8
61a41127865c15f172eb94912777d1f6
/* { dg-do compile } */ struct A { __complex__ double c; }; struct B { A a; B(A x) : a(x) {} void foo(); }; void bar() { B b = A(); B(b).foo(); }
google
chromium
pr33735
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr33735.C
522
utf_8
a5cfb04004f59a611e1b6efa6796b3ca
// { dg-do compile } #include <string> typedef struct _ts { } PyThreadState; PyThreadState * Py_NewInterpreter(void); void Py_EndInterpreter(PyThreadState *); class ApplicationError { public: ApplicationError(std::string errormsg) : errormsg(errormsg) { } std::string errormsg; }; void run() { PyThreadState...
google
chromium
pr36745
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr36745.C
1,934
utf_8
422a9c53562cdc7ec73e46f2becd2fdf
/* PR target/36745 */ /* { dg-do compile } */ /* { dg-options "-O2 -fPIC" } */ /* { dg-require-effective-target fpic } */ typedef __SIZE_TYPE__ size_t; class QBasicAtomicInt { public: int _q_value; inline bool operator== (int value) const { } bool ref (); bool deref (); }; inline bool QBasicAtomicInt::ref ...
google
chromium
pr38745
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr38745.C
552
utf_8
b40a32ddc241492f6a395ad16cd948ee
/* { dg-do compile } */ union u_u16 { unsigned short v; struct { unsigned char lo8, hi8; } __attribute__ ((__may_alias__)) u; } __attribute__ ((__may_alias__)); union u_u32 { unsigned int v; struct { u_u16 lo16, hi16; } u; } __attribute__ ((__may_alias__)); union u_u64 { struct ...
google
chromium
pr42110
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr42110.C
359
utf_8
6288fd3a3bd0bd1724da11910b425047
/* { dg-do compile } */ bool foo(); struct A { A* fooA() { if (foo()) foo(); return this; } virtual void barA(char); }; template<int> struct B { A *p, *q; }; template<int N> inline void bar(B<N> b) { b.fooB(0); } extern template void bar(B<0>); void (*f)(B<0>) = bar; void baz() { B<0>().fooB(0); }
google
chromium
pr37354
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr37354.C
296
utf_8
0062aafd51bb4104c7553c9a0698f0ca
/* { dg-do compile } */ class GenericClass; struct AlsaDriver { virtual int _read (unsigned nframes); }; typedef void (GenericClass::*GenericMemFuncType) (); GenericMemFuncType m_pFunction; void AlsaDriver1 () { m_pFunction = reinterpret_cast < GenericMemFuncType > (&AlsaDriver::_read); }
google
chromium
pr27218
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr27218.C
186
utf_8
161154ed9f6193a2a7da119e068c3f3f
/* { dg-do compile } */ struct Vector { double _x, _y; }; typedef Vector Point; Vector d; static inline Vector f(void) { return d; } void add_duck (void) { new Point (f()); }
google
chromium
pr33589-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr33589-2.C
193
utf_8
49a9ebbf21acce6fcc392bc19ee94d44
// { dg-do compile } void f(void*) throw(); void somefunction() { try { void (*g)(void*) = (void (*)(void*))f; void (*g2)(int*) = (void (*)(int*))g; g2(0); } catch (...) {throw;} }
google
chromium
pr35400
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr35400.C
117
utf_8
95e1ec333ba17743fc8ea464d26d4981
/* { dg-do compile } */ /* { dg-options "-Wtype-limits" } */ struct A { A(); ~A(); }; void foo() { A x[1]; }
google
chromium
pr33887-3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr33887-3.C
310
utf_8
537dd6ad14d9bd3e4fe18b40c792c0fa
/* { dg-do run } */ extern "C" void abort (void); struct s { unsigned long long f1 : 40; unsigned int f2 : 24; }; s sv; void __attribute__((noinline)) foo(unsigned int i) { unsigned int tmp; sv.f2 = i; tmp = sv.f2; if (tmp != 0) abort (); } int main() { foo (0xff000000u); return 0; }
google
chromium
pr31863
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr31863.C
16,826
utf_8
dfb1626356d6433808c5d9d4ab027a50
/* { dg-do link } */ /* { dg-timeout-factor 2.0 } */ namespace Loki { class NullType {}; template <class T, class U> struct Typelist { typedef T Head; typedef U Tail; }; namespace TL { template < typename T1 = NullType, typename T2 = NullType...
google
chromium
pr34222
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr34222.C
2,623
utf_8
1248abde88d3f7551bab7396c44ba034
/* { dg-do compile } */ namespace std __attribute__ ((__visibility__ ("default"))) { template<class _CharT> struct char_traits; } __extension__ typedef __PTRDIFF_TYPE__ ptrdiff_t; namespace std __attribute__ ((__visibility__ ("default"))) { typedef ptrdiff_t streamsize; template<typename _CharT, type...
google
chromium
pr30567
.C
native_client/nacl-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
pr36191
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr36191.C
224
utf_8
9a0cbbf9f862de68e3fecd180e92a870
// PR c++/36191 // { dg-do compile } // { dg-options "-fnon-call-exceptions" } __complex__ double foo (__complex__ double x, double y) { try { return x / y; } catch (char *s) { return x; } }
google
chromium
pr36826
.C
native_client/nacl-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
pr40991
.C
native_client/nacl-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
pr42462
.C
native_client/nacl-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
pr33589-1
.C
native_client/nacl-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/nacl-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
pr33887-1
.C
native_client/nacl-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
pr41257-2
.C
native_client/nacl-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/nacl-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/nacl-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
pr33340
.C
native_client/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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
pr37716
.C
native_client/nacl-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
unwind-3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/unwind-3.C
735
utf_8
eedf48ff150f2074cb51905539db3b12
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ #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/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/unwind-5.C
705
utf_8
ed3b0907e2324303bffedb1a2a65c9ef
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ #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/nacl-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/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/unwind-2.C
612
utf_8
db76d2ec00f6e73cf48e13c1e1d8483f
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ #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/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/unwind-4.C
393
utf_8
4f93917247b91b34ae320c9bb1977766
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ #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/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-2.C
1,013
utf_8
6ad898e652d8ffef67f664f1993d17d6
/* { dg-do run } */ #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", size); } class Base {}; struct A : virtual public Base { A() {} }; struct...
google
chromium
unwind-6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/unwind-6.C
705
utf_8
6aaccd06c187881592d88374d3798be0
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ #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/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/stdcall-1.C
339
utf_8
376d248087b3caf138eaa66f89dbfd63
// { dg-do compile { target { { i?86-*-* x86_64-*-* } && ilp32 } } } // 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/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/throw-1.C
925
utf_8
f2b5df66a411d2ec5f1041e6129cc1fd
/* { 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,l,m,n; i=j=k=0; for (i=0; i < global; i++) for (j=0; j < i; j++) for (k=0...
google
chromium
throw-4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/throw-4.C
816
utf_8
f750ae1b933b1f8f399373fb84eb3b14
/* { 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++) { glo...
google
chromium
eh-inline-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/eh-inline-1.C
462
utf_8
4229d11aa2fed9026a247dec9c583d7f
/* { dg-do run } */ #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 void inline __attribute__((always_inline)) foo (void) throw (B,A) { aligned ...
google
chromium
unwind-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/unwind-1.C
388
utf_8
f3e9b767373dde8b46bd9e601471ea45
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ #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, __al...
google
chromium
eh-fastcall-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/eh-fastcall-1.C
615
utf_8
1ee38b8103e5ff2dcd9ec5ef505ad12b
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ #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 (...
google
chromium
unwind-0
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/unwind-0.C
299
utf_8
a0c10ac76d85b6ecada03fb7301c1b0d
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ #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/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/throw-2.C
796
utf_8
e441da7ca8d1b92ee69e5cba365514dd
/* { 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
eh-vararg-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-1.C
971
utf_8
c89eeb7386a0b26d3e1ceb51155ed882
/* { dg-do run } */ #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", size); } class Base {}; struct A : virtual public Base { A() {} }; struct...
google
chromium
eh-inline-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/eh-inline-2.C
769
utf_8
07008cb3eaf9b312fd9c2aa8c292b225
/* { dg-do run } */ #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 {}; struct A : virtual public Base { A() {} }; struct B {}; static void ...
google
chromium
eh-alloca-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/eh-alloca-1.C
723
utf_8
27708882c7594b7b202c329549264ce2
/* { dg-do run } */ #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 {}; struct A : virtual public Base { A() {} }; struct B {}; void foo (in...
google
chromium
eh-global-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/stackalign/eh-global-1.C
418
utf_8
cbfce62125ed62558e21bc14109bdf57
/* { dg-do run } */ #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 (void) throw (B,A) { aligned i; if (check_int (&i, __alignof__(i)) != ...
google
chromium
empty
.C
native_client/nacl-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/nacl-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/nacl-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/nacl-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/nacl-gcc/gcc/testsuite/g++.dg/pch/wchar-1.C
21
utf_8
3c027648f765cf5846e0b1be267760f6
#include "wchar-1.H"
google
chromium
system-2
.C
native_client/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-gcc/gcc/testsuite/g++.old-deja/g++.law/enum4.C
575
utf_8
f95ac78eb85267ee98fa27add7382fed
// { dg-do assemble } // GROUPS passed enums // enum file enum Enum {enumerator1, enumerator2}; struct Struct { int i; int getI(Enum) {return i;} // { dg-message "candidates" } }; int funct (Enum) { return 0; } int main() { Enum e = enumerator1; Struct s; int x = funct(e+1);// { dg-error "invalid" } ...
google
chromium
nest5
.C
native_client/nacl-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/nacl-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/nacl-gcc/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C
1,237
utf_8
1f8258d5d903f2ac9453ee5f6ab17020
// { 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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-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/nacl-gcc/gcc/testsuite/g++.old-deja/g++.law/arm9.C
924
utf_8
8848109775dcc385dd38a2ffd1b9719e
// { 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";...
google
chromium
ctors15
.C
native_client/nacl-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/nacl-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/nacl-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/nacl-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;
google
chromium
dtors1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.law/dtors1.C
331
utf_8
84a28c855235b7c01f16dbd24342986f
// { dg-do assemble } // GROUPS passed destructors // friends file void f() { int i; i.i::~i();// { dg-error "" } .* }
google
chromium
enum7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.law/enum7.C
327
utf_8
a148f19373f2b475268eafbb0a19cd4c
// { dg-do assemble } // GROUPS passed enums // friends file class X { enum E { A, B }; static enum E e; }; enum X::E X::e = A;
google
chromium
except1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.law/except1.C
494
utf_8
fa91781a296ec68a2631735b5a3d93e8
// { dg-do assemble } // { dg-options "-fexceptions" } // GROUPS passed exceptions // except file // Subject: Bugs // Date: Wed, 22 Jul 92 08:29:30 EDT extern "C" void puts(const char *); class foo { public: class error {}; void cause_error(void) { throw error(); } }; int main(void) { foo f; try { f.cause_...
google
chromium
operators9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.law/operators9.C
458
utf_8
7ad5cc2c0bdcd58a8b4868d47bbe3f5b
// { dg-do assemble } // GROUPS passed operators // opr-eq file // Subject: 2.3.3: failed to detect error // Date: Thu, 14 Jan 93 16:14:21 +0100 class B { public: operator=(B &); // { dg-error "no type" } // { dg-message "candidates" "note" { target *-*-* } 12 } }; void test(B &b1, const B &b2) { b...
google
chromium
operators31
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.law/operators31.C
352
utf_8
137bc288c72aa898b2ca9453751cf6e6
// { dg-do assemble } // GROUPS passed operators // opr-del file class A { char *s; public: void f (); }; void A::f () { delete [] A::s; }
google
chromium
operators6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.law/operators6.C
441
utf_8
55b05d62217b8d49e3417722b1406cea
// { dg-do assemble } // GROUPS passed operators // opr-as file class A { public: A(int){} A& operator=(const A&){return *this;} }; class B: public A { public: B(int i): A(i) {} }; int main() { B b=1; b=1; }