plateform stringclasses 1
value | repo_name stringclasses 2
values | name stringlengths 1 78 | ext stringclasses 2
values | path stringlengths 15 1.11k | size int64 1 8.55M | source_encoding stringclasses 11
values | md5 stringlengths 32 32 | text stringlengths 0 8.49M |
|---|---|---|---|---|---|---|---|---|
google | android | 20090706-1 | .C | toolchain/gcc/gcc-4.9/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 | android | vshuf-v4si | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/vshuf-v4si.C | 483 | utf_8 | c99c1b8dd6a5b0f66d5362a5b3b13e26 | // { dg-do run { target c++11 } }
#if __SIZEOF_INT__ == 4
typedef unsigned int V __attribute__((vector_size(16)));
typedef V VI;
#elif __SIZEOF_LONG__ == 4
typedef unsigned long V __attribute__((vector_size(16)));
typedef V VI;
#else
# define UNSUPPORTED
#endif
#define A 0x11121314
#define B 0x21222324
#define C 0x31... |
google | android | PR58294 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/PR58294.C | 259 | utf_8 | 080ecc95e15ea3b4ed02e0e24c727d53 | // { dg-do compile }
struct A {
virtual ~A();
virtual void m_fn1() { delete this; }
void m_fn2() { m_fn1(); }
};
struct B {
A *pi_;
B() { pi_->m_fn2(); }
};
struct C {
B pn;
};
void _setjmp();
int png_decode() {
_setjmp();
C a;
return 0;
}
|
google | android | pr60750 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr60750.C | 394 | utf_8 | 5f42e568cc105049d43016ffc65ea36f | // { dg-do run }
// { dg-options "-std=c++11" }
#include <string>
#include <stdexcept>
const std::string err_prefix = "Problem: ";
void thrower (std::string msg)
{
throw std::runtime_error(err_prefix + std::move(msg));
}
int main(int argc, char **argv)
{
try {
std::string base = "hello";
thrower(std:... |
google | android | pr41144 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr41144.C | 586 | utf_8 | 8891afbc518a1af478d823bddfecbe7a | /* { dg-do compile } */
struct rgba8;
template<class ColorT> class span_gouraud {
public:
struct coord_type { };
coord_type m_coord[3];
};
template<class ColorT> class span_gouraud_rgba : public span_gouraud<ColorT>
{
typedef ColorT color_type;
typedef span_gouraud<color_type> base_type;
typedef t... |
google | android | pr41680 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr41680.C | 279 | utf_8 | e8f19401702ff3d3395f9dcdc0536e04 | // PR target/41680
// { dg-do compile }
extern void baz (float);
inline bool
bar (float x)
{
union { float f; int i; } u;
u.f = x;
return (u.i & 1);
}
void
foo (float *x)
{
for (int i = 0; i < 10; i++)
{
float f = x[i];
if (!bar (f))
baz (f);
}
}
|
google | android | pr31863 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr31863.C | 16,894 | utf_8 | b2e08f7dfeca668db86cf581f9e9d893 | /* { dg-do link } */
/* { dg-timeout-factor 2.0 } */
/* { dg-skip-if "Program too big" { "avr-*-*" } { "*" } { "" } } */
namespace Loki
{
class NullType {};
template <class T, class U>
struct Typelist
{
typedef T Head;
typedef U Tail;
};
namespace TL
{
template
... |
google | android | pr39678 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr39678.C | 438 | utf_8 | 505f48097bb932b0861f32000e2c985b | /* PR target/39678 */
/* { dg-do run } */
/* { dg-options "-Wno-psabi" } */
struct Y {};
struct X {
struct Y y;
__complex__ float val;
};
struct X __attribute__((noinline))
foo (float *p)
{
struct X x;
__real x.val = p[0];
__imag x.val = p[1];
return x;
}
extern "C" void abort (void);
float a[2] = { 3., -2... |
google | android | pr48695 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr48695.C | 665 | utf_8 | 4d9b3aec8dc1acddc3c78be118c41e0e | // { dg-do run }
typedef __SIZE_TYPE__ size_t;
inline void *operator new (size_t, void *__p) throw() { return __p; }
struct _Vector_impl
{
int *_M_start;
int *_M_finish;
_Vector_impl () :_M_start (0), _M_finish (0) {}
};
struct vector
{
_Vector_impl _M_impl;
int *_M_allocate (size_t __n)
{
return __... |
google | android | pr60648 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr60648.C | 863 | utf_8 | 6a1fc676aaed201857ec15f7c375b917 | // PR target/60648
// { dg-do compile }
// { dg-additional-options "-fPIC" { target fpic } }
enum component
{
Ex,
Ez,
Hy,
Permeability
};
enum derived_component
{};
enum direction
{
X,
Y,
Z,
R,
P,
NO_DIRECTION
};
derived_component a;
component *b;
component c;
direction d;
inline direction fn1 (comp... |
google | android | pr48954 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr48954.C | 355 | utf_8 | 9f37a6cceabc57b93082714e5a4d2035 | /* { dg-do compile } */
/* { dg-options "-O2 -flto -fno-early-inlining -fkeep-inline-functions" } */
/* { dg-require-effective-target lto } */
struct A
{
virtual void foo () = 0;
};
struct B : A {};
struct C : A {};
struct D: C, B
{
void foo () {}
};
static inline void
bar (B *b)
{
b->foo ();
}
int
main ()
{... |
google | android | pr60659 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr60659.C | 1,191 | utf_8 | 8c2dc2c3e3d744280501f821dd5cfb10 | // { dg-do compile }
template <typename _InputIterator> void __distance (_InputIterator);
template <typename _InputIterator>
void distance (_InputIterator, _InputIterator p2)
{
__distance (p2);
}
namespace boost
{
template <class Iterator> struct A
{
typedef typename Iterator::difference_type type;
};
template <cl... |
google | android | pr55789 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr55789.C | 520 | utf_8 | 6cc0176aadaadb85c8233f256edc49a5 | /* { dg-do compile } */
/* { dg-options "-fno-guess-branch-probability -fno-tree-forwprop --param max-early-inliner-iterations=10 --param=early-inlining-insns=176" } */
template < typename T > struct intrusive_ptr
{
~intrusive_ptr ()
{
delete px;
}
T *px;
};
struct section_info
{
intrusive_ptr < sectio... |
google | android | pr34241 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr34241.C | 267 | utf_8 | 2f2bca9639982242f96213d55143fc90 | /* { dg-do compile } */
inline void *operator new (__SIZE_TYPE__, void *__p) throw ()
{
return __p;
}
struct A
{
A(int, double);
inline explicit A (int pattern, bool cs)
{
new (this) A (pattern, double(cs));
}
};
A test ()
{
const A a (42, true);
}
|
google | android | pr57107 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr57107.C | 7,817 | utf_8 | 397e326ce730ec59e37411b6738a00f4 | // { dg-do compile }
typedef long unsigned int size_t;
namespace std {
}
namespace std __attribute__ ((__visibility__ ("default"))) {
template<class _Sp, class _Tp> struct __traitor {
enum {
__value = bool(_Sp::__value) || bool(_Tp::__value) };
};
template<typename _Tp> struct __is_intege... |
google | android | pr47541 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr47541.C | 454 | utf_8 | 2875f29910a1c9fceb2c3abacae94988 | /* { dg-do run } */
struct Dummy {};
struct RefCount : public Dummy {
~RefCount(); /* Has to be non-pod. */
int *a;
int *b;
};
RefCount::~RefCount(){}
struct Wrapper : public Dummy { RefCount ref; };
void __attribute__((noinline,noclone))
Push(Wrapper ptr)
{
*ptr.ref.b = 0;
}
extern "C" void abort (void... |
google | android | pr49039 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr49039.C | 1,721 | utf_8 | 66f4e88fb15a5c2f5a4fc2d591edff41 | // PR tree-optimization/49039
// { dg-do run }
template <class T1, class T2>
struct pair
{
T1 first;
T2 second;
pair (const T1 & a, const T2 & b):first (a), second (b) {}
};
template <class T1, class T2>
inline pair <T1, T2>
make_pair (T1 x, T2 y)
{
return pair <T1, T2> (x, y);
}
typedef __SIZE_TYPE__ size_t... |
google | android | pr39002 | .C | toolchain/gcc/gcc-4.9/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 | android | pr57499 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr57499.C | 173 | utf_8 | f57dc8a39ba283ab87221e83f802be5a | // PR middle-end/57499
// { dg-do compile }
struct S
{
~S () __attribute__ ((noreturn)) {} // { dg-warning "function does return" }
};
void
foo ()
{
S s;
throw 1;
}
|
google | android | pr55260-2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr55260-2.C | 222 | utf_8 | 519a40ca79bffb405b64d395bbacd3ba | /* { dg-do compile } */
/* { dg-add-options bind_pic_locally } */
struct B
{
virtual void test_suite_finish ();
};
void
fn1 (B & p2)
{
fn1 (p2);
B & a = p2;
a.test_suite_finish ();
B b;
fn1 (b);
}
|
google | android | Wsizeof-pointer-memaccess1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess1.C | 43,289 | utf_8 | 1221de13d4c441dc90bc7c61916d7dcd | // Test -Wsizeof-pointer-memaccess warnings.
// { dg-do compile }
// { dg-options "-Wall" }
// Test just twice, once with -O0 non-fortified, once with -O2 fortified.
// { dg-skip-if "" { *-*-* } { "*" } { "-O0" "-O2" } }
// { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
extern "C" {
typedef __SIZE_TYPE__ size_t;
ex... |
google | android | pr37922 | .C | toolchain/gcc/gcc-4.9/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 | android | pr34953 | .C | toolchain/gcc/gcc-4.9/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 | android | pr44069 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr44069.C | 478 | utf_8 | 2719444d1d7a7d86ae85daae86a66833 | /* { dg-do run } */
template <unsigned R, unsigned C>
class M {
public:
M(const int* arr) {
for (unsigned long r = 0; r < R; ++r)
for (unsigned long c = 0; c < C; ++c)
m[r*C+c] = arr[r*C+c];
}
int operator()(unsigned r, unsigned c) const
{ return m[r*C+c]; }
private:
int m[R*C];
};
exter... |
google | android | pr33589-2 | .C | toolchain/gcc/gcc-4.9/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 | android | pr53011 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr53011.C | 1,458 | utf_8 | cbcadbc30cc238fb12a5bc2e1f08a285 | // { dg-do compile }
extern "C" class WvFastString;
typedef WvFastString& WvStringParm;
struct WvFastString {
~WvFastString();
operator char* () {}
};
class WvString : WvFastString {};
class WvAddr {};
class WvIPAddr : WvAddr {};
struct WvIPNet : WvIPAddr {
bool is_default() {}
};
template<class T, bool> struct ... |
google | android | Wsizeof-pointer-memaccess2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess2.C | 43,529 | utf_8 | 1de82593533e30d1cf4daf38b9e9dad3 | // Test -Wsizeof-pointer-memaccess warnings.
// { dg-do compile }
// { dg-options "-Wall" }
// Test just twice, once with -O0 non-fortified, once with -O2 fortified.
// { dg-skip-if "" { *-*-* } { "*" } { "-O0" "-O2" } }
// { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
extern "C" {
typedef __SIZE_TYPE__ size_t;
ex... |
google | android | pr49720 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr49720.C | 224 | utf_8 | 7dd611bbf63323f0b35b857a27dd4dfc | /* { dg-do compile } */
__extension__ typedef __PTRDIFF_TYPE__ pdiff_t;
extern char t_start[], t_end[], t_size[];
bool foo (void)
{
pdiff_t size = reinterpret_cast<pdiff_t>(t_size);
return (size == t_end - t_start);
}
|
google | android | pr35164-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr35164-1.C | 1,909 | utf_8 | 6e26e84f00c6983f8cd03d80694067c3 | typedef __SIZE_TYPE__ size_t;
template<typename _Iterator, typename _Container> class __normal_iterator {
public:
const _Iterator& base() const;
};
template<typename _BI1, typename _BI2> inline
void copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) {
while (__first != __last) *--__result = *--__last;
}
templa... |
google | android | pr52772 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr52772.C | 1,445 | utf_8 | 15ec0b1c30622d0b9973cda693d17469 | // { dg-do compile }
typedef __SIZE_TYPE__ size_t;
class c1;
class c2 {
public: c2() { };
void *operator new(size_t size, const c1 & crc1);
};
class c3 {
public: c3() { _Obj = 0; }
~c3() { if (_Obj) delete _Obj; }
void set(c2 *pObj);
protected: c2 *_Obj;
};
void c3::set(c2 *pObj) { _Obj = pObj; };
tem... |
google | android | pr50672 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr50672.C | 357 | utf_8 | ce1cdfddb6a49b62f6948eebbab0fa93 | // { dg-do compile }
struct A
{
bool isHint();
};
class B
{
void makeLine( int *) const;
void drawLine() const; A* to() const;
void _print() const;
};
A a;
void B::makeLine(int *p1) const
{
if (a.isHint() && to()->isHint()) ;
else {
if (p1) B::drawLine(); else B::_print();
return;
}
if (p1... |
google | android | pr59226 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr59226.C | 256 | utf_8 | deb5be16005eb806e56fb201a4e0bf1b | // { dg-do compile }
struct A
{
virtual void foo() {}
};
struct B
{
virtual void foo() {}
};
struct C : virtual A {};
struct D : virtual A, B
{
virtual void foo() {}
};
struct E : C, D
{
virtual void foo() {}
};
void bar(A* p)
{
p->foo();
}
|
google | android | pr57235 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr57235.C | 3,366 | utf_8 | 5d4696210540a213c561c17661077cf3 | // { dg-do compile }
namespace std
{
template < class _Elem > struct char_traits
{
};
struct _Container_base
{
};
template < class _Ty > struct _Allocator_base
{
};
template < class _Ty > class allocator:public _Allocator_base < _Ty >
{
};
class _String_base:public _Container_base
{
}... |
google | android | pr34641 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr34641.C | 4,162 | utf_8 | aca35bc17de99bf227d0bc470b3dfff6 | // { dg-do compile }
// { dg-require-effective-target fpic }
// { dg-require-visibility "" }
// { dg-options "-fPIC" }
typedef __SIZE_TYPE__ size_t;
extern "C" void *
malloc (size_t __size)
throw () __attribute__ ((__malloc__));
namespace std __attribute__ ((__visibility__ ("default")))
{
using::size_t;
}
inli... |
google | android | pr44535 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr44535.C | 404 | utf_8 | a33cbb24fc74fe5e413c5ca21e00db9d | /* { dg-do run } */
namespace FOO {
template <typename T>
class A
{
public:
void Enum();
virtual void OnProv() = 0;
virtual ~A() { }
};
typedef A<char> B;
template<typename T>
void A<T>::Enum ()
{
OnProv ();
}
} // namespace FOO
class C {};
class D: public C, public FOO::B {
public:
void OnProv... |
google | android | pr44813 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr44813.C | 1,776 | utf_8 | d014fa87d832e14e180ee69b18e48f61 | typedef unsigned int PRUint32;
typedef int PRInt32;
typedef unsigned long PRUint64;
typedef int PRIntn;
typedef PRIntn PRBool;
struct nsRect {
nsRect(const nsRect& aRect) { }
};
enum nsCompatibility { eCompatibility_NavQuirks = 3 };
class gfxContext;
typedef PRUint64 nsFrameState;
class nsPresContext {
public:
... |
google | android | vshuf-v4df | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/vshuf-v4df.C | 553 | utf_8 | d26edbd147b8e12edb6faf98b0cbe53c | // { dg-do run { target c++11 } }
#if __SIZEOF_DOUBLE__ == 8 && __SIZEOF_LONG_LONG__ == 8
typedef double V __attribute__((vector_size(32)));
typedef unsigned long long VI __attribute__((vector_size(32)));
#else
#define UNSUPPORTED
#endif
#define A 0.69314718055994530942
#define B 2.7182818284590452354
#define C 2.302... |
google | android | pr53085 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr53085.C | 338 | utf_8 | ab3d67318bf55ce6b5a13434fa385def | // { dg-do compile }
// { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } }
// { dg-options "-fdump-tree-optimized" }
class aa{
void f();
private:
volatile int a;
};
void aa::f(){
a=1;
a=1;
}
// { dg-final { scan-tree-dump-times "a ={v} 1;" 2 "optimized" } }
// { dg-final { cleanup-tree-dum... |
google | android | pr42462 | .C | toolchain/gcc/gcc-4.9/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 | android | pr53161 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr53161.C | 480 | utf_8 | de8c32125948cc3e5562883ac65f710e | /* { dg-do compile { target c++11 } } */
void gg();
static __typeof(gg) __gthrw_gg __attribute__((__weakref__("gg")));
template<typename R,typename... A>
struct data {
template<typename Y,typename X>
data(Y& y,R(X::*f)(A...));
};
template<typename Y,typename X,typename R,typename... A>
data<R,A...> make_data(Y& y,R... |
google | android | pr42450 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr42450.C | 3,345 | utf_8 | 375f3e5695d27b3a597504372a44228d | /* { dg-do compile } */
template < typename > class basic_stringstream;
struct basic_string {
basic_string();
};
struct ios_base {
virtual ~ios_base();
};
class ostream:ios_base {};
class istream:virtual ios_base {};
template < typename > struct basic_iostream:public istream, ostream {
~basic_iostream () {}
... |
google | android | pr48661 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr48661.C | 829 | utf_8 | db620ec233982ee1836c3317fec0f45d | // PR middle-end/48661
// { dg-do run }
extern "C" void abort ();
__attribute__((noinline))
double
foo (double x, double y)
{
asm volatile ("" : : : "memory");
return x + y;
}
__attribute__((noinline, noclone))
void
bar (int x)
{
if (x != 123)
abort ();
}
struct A
{
double a1, a2;
};
struct B
{
virt... |
google | android | pr33887-3 | .C | toolchain/gcc/gcc-4.9/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 | android | pr56837 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr56837.C | 380 | utf_8 | 8a7d86131908cdb65be662a8ab125bb0 | // { dg-do run }
// { dg-options "-ftree-loop-distribute-patterns" }
extern "C" void abort (void);
extern "C" int memcmp (const void *, const void *, __SIZE_TYPE__);
bool b1[8];
bool b2[8] = { true, true, true, true, true, true, true, true };
int main()
{
unsigned int i;
for(i=0 ; i < 8; i++)
b1[i] = true;
... |
google | android | pr41186 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr41186.C | 377 | utf_8 | 9a4c30ad05a6c9428a3e66a4527ee68a | /* { dg-do run } */
struct Foo {
Foo() {};
int i;
short f;
};
struct Bar : public Foo {
Bar() {};
short b;
};
extern "C" void abort(void);
int main()
{
Bar b1, b2;
b2.i = 0;
b1.f = 0;
b1.b = 1;
b2.f = 1;
b2.b = 2;
static_cast<Foo&>(b1) = static_cast<Foo&>(b2);
if (b1.i != 0 || b1.b != 1)
... |
google | android | pr35526 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr35526.C | 475 | utf_8 | e33eadcaed926d8254fad85a797b2dde | /* { dg-do compile } */
// { dg-options "-fpermissive" }
// { dg-prune-output "narrowing" }
extern void *memcpy (void *__dest, __const void *__src, __SIZE_TYPE__ __n);
char internal_crash_read_ip[] = { 0xb8 };
struct u_internal_crash_read_t
{
char ip[sizeof (internal_crash_read_ip)];
}
u_internal_crash_read;
voi... |
google | android | darwin-cfstring-3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/darwin-cfstring-3.C | 1,455 | utf_8 | 8e9f5b7c091bd1c8d9aad12b2fe2c7e8 | /* Test whether the __builtin__CFStringMakeConstantString
/* { dg-do compile { target *-*-darwin* } } */
/* { dg-options "-mconstant-cfstrings" } */
typedef const struct __CFString *CFStringRef;
#ifdef __CONSTANT_CFSTRINGS__
#define CFSTR(STR) ((CFStringRef) __builtin___CFStringMakeConstantString (STR))
#else
#error ... |
google | android | pr41775 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr41775.C | 6,921 | utf_8 | b2d53f4aa50404a2e6c3d51d0a0213f1 | /* { dg-do compile } */
/* { dg-require-visibility "" } */
typedef unsigned int size_t;
namespace std __attribute__ ((__visibility__ ("default")))
{
template < typename _Iterator > struct iterator_traits
{
};
template < typename _Tp > struct iterator_traits <_Tp * >
{
typedef _Tp & reference;
};
}
nam... |
google | android | pr40321 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr40321.C | 617 | utf_8 | 3085fa5de27d22da7db3c4cf8f7abfab | /* { dg-do compile } */
struct VectorD2
{
VectorD2() : x(0), y(0) { }
VectorD2(int _x, int _y) : x(_x), y(_y) { }
int x, y;
int GetLength2() const { return x*x + y*y; };
VectorD2 operator+(const VectorD2 vec) const {
return VectorD2(x+vec.x,y+vec.y);
}
};
struct Shape
{
enum Type { ST_RECT, ST_CIRC... |
google | android | pr45843 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr45843.C | 344 | utf_8 | 899aff880eda02736daf5cd753f86d9a | // PR target/45843
// { dg-do run }
#include <stdarg.h>
extern "C" void abort ();
struct S { struct T { } a[14]; char b; };
struct S arg, s;
void
foo (int z, ...)
{
char c;
va_list ap;
va_start (ap, z);
c = 'a';
arg = va_arg (ap, struct S);
if (c != 'a')
abort ();
va_end (ap);
}
int
main ()
{
fo... |
google | android | pr37146-2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr37146-2.C | 763 | utf_8 | 87fa4b505d0fbf900af0c6864b9dd8eb | // 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;
int
f1 (int x)
{
return x ? a : b;
}
int
f2 (int x)
{
return x ? c.i : c.j;
}
int
f3 (int x)
{
return x ? c.i : a;
}
int
f4 (int x)
{
return x ? c.i : c.k;
}
int
f5 (int x)
{
return... |
google | android | pr45854 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr45854.C | 291 | utf_8 | 68f9b4757da40ed02486f2296a081c7d | // { dg-do compile }
template < typename = void >
struct X { } ;
struct Y
{
Y () ;
} ;
template < typename = X < > >
struct T
{
void f ()
{
f () ;
}
} ;
struct S
{
S ( X < > = X < > ()) ;
~S ()
{
T < > () . f () ;
}
} ;
struct Z
{
S s ;
Y y ;
} a ;
|
google | android | pr42739 | .C | toolchain/gcc/gcc-4.9/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 | android | pr60854 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr60854.C | 189 | utf_8 | 2cd5e243f12b5ca6cf66ca1966b24a84 | template <typename T>
class MyClass
{
public:
__attribute__ ((__always_inline__)) inline MyClass () { ; }
};
extern template class MyClass<double>;
void Func()
{
MyClass<double> x;
}
|
google | android | pr38705 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr38705.C | 358 | utf_8 | 3b157b9f50453a488b521cd22a937234 | // PR c++/38705
// { dg-do compile }
typedef int T;
typedef __SIZE_TYPE__ size_t;
extern "C" void *memcpy (void *, const void *, size_t);
void
foo (char *p, const int q)
{
memcpy (p, &q, sizeof (int));
}
struct S
{
T t;
int u;
int bar () const;
template <class T> void foo (const T &x) const {}
};
int
S::b... |
google | android | pr43879-1_0 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr43879-1_0.C | 95 | utf_8 | a9183140f924e2b97b58b04769243a15 | struct A {
int *i;
A();
~A();
};
static int x = 0;
A::A() : i(&x) {}
A::~A() {}
|
google | android | pr56854 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr56854.C | 337 | utf_8 | e98948443ddbeeb525e86474cba062c6 | // PR tree-optimization/56854
// { dg-do compile }
inline void *
operator new (__SIZE_TYPE__, void *p) throw ()
{
return p;
}
struct A
{
int a;
A () : a (0) {}
~A () {}
A &operator= (const A &v) { this->~A (); new (this) A (v); return *this; }
};
A b[4], c[4];
void
foo ()
{
for (int i = 0; i < 4; ++i)
... |
google | android | pr36191 | .C | toolchain/gcc/gcc-4.9/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 | android | pr51198 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr51198.C | 191 | utf_8 | 53d06d9f86d0198a02a3edc88fc936fb | // { dg-do compile { target c++11 } }
struct A
{
int i = 0 ? 0 : throw 1;
};
struct B
{
int f();
int i = f();
};
struct C
{
C(int);
};
struct D
{
C a = 0;
};
A a;
B b;
D d;
|
google | android | pr40389 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr40389.C | 1,174 | utf_8 | 4035a1e00eace7a7615f43772cc94b78 | /* { dg-do run } */
template <typename V> struct S
{
V *f, *l;
__attribute__ ((noinline)) S (void) { f = 0, l = 0; }
void foo (V *x)
{
if (x->p != 0)
x->p->n = x->n;
else
f = x->n;
if (x->n != 0)
x->n->p = x->p;
else
l = x->p;
}
__attribute__ ((noinline)) void bar (V... |
google | android | vshuf-v2si | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/vshuf-v2si.C | 395 | utf_8 | 8a41ac34b52ea561c927d0fbdb8e1009 | // { dg-do run { target c++11 } }
#if __SIZEOF_INT__ == 4
typedef unsigned int V __attribute__((vector_size(8)));
typedef V VI;
#elif __SIZEOF_LONG__ == 4
typedef unsigned long V __attribute__((vector_size(8)));
typedef V VI;
#else
#define UNSUPPORTED
#endif
#define A 0x11121314
#define B 0x21222324
#define X 0xd1d2d... |
google | android | pr38747 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr38747.C | 299 | utf_8 | 45aef0fb4191dc0ae2c98c11807df53f | /* { dg-do run } */
extern "C" void abort (void);
inline void *operator new (__SIZE_TYPE__, void *__p) throw () { return __p; }
int __attribute__((noinline))
foo(void)
{
float f = 0;
int *i = new (&f) int (1);
return *(int *)&f;
}
int main()
{
if (foo() != 1)
abort ();
return 0;
}
|
google | android | pr49115 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr49115.C | 396 | utf_8 | 8fb5fa994e892c2497eac146b34e663e | // { dg-do run }
extern "C" void abort (void);
struct MyException {};
struct Data {
int nr;
Data() : nr(66) {}
};
Data __attribute__((noinline,noclone)) getData(int i)
{
if (i) throw MyException();
Data data;
data.nr = i;
return data;
}
int main(int, char **)
{
Data data;
try {
data = getData... |
google | android | pr62121 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr62121.C | 143 | utf_8 | af2ab3b9ceedb2dbeb48d6c62a313372 | // { dg-do compile }
class A
{
virtual double operator()();
};
class B : A
{
public:
double operator()();
};
extern B a[];
int b = a[0]();
|
google | android | pr34099 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr34099.C | 386 | utf_8 | 746d247dbba7ad5322d6f842b465f70e | /* { dg-do run } */
#include <complex>
typedef std::complex<double> NumType;
void
multiply(NumType a, NumType b, unsigned ac, NumType &ab)
{
NumType s;
for (unsigned j=0; j<ac; j++)
s = a * b;
ab = s;
}
extern "C" void abort (void);
int main()
{
NumType a(1,2), b(3,-2), c;
multiply(a, b, 1, c);
if (c... |
google | android | pr34850 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr34850.C | 2,047 | utf_8 | 5c9b581a3a5e5af7b9ee1b520e255519 | /* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
/* { dg-options "-ffat-lto-objects" } */
typedef unsigned char uint8_t;
typedef unsigned int uint32_t;
typedef uint8_t byte;
typedef uint32_t u32bit;
__extension__ typedef __SIZE_TYPE__ size_t;
extern "C" {
extern void __warn_memset_zero_le... |
google | android | pr33572 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr33572.C | 258 | utf_8 | fef6e4af1918b51b514676a2dc0186ab | // { dg-do run }
#include <vector>
#include <memory>
struct Foo { virtual void f() {} };
int main(int argc, char**)
{
std::auto_ptr<Foo> foo;
if (argc >= 0) {
foo.reset(new Foo());
} else {
std::vector<int> v;
}
Foo* p = foo.release();
p->f();
}
|
google | android | pr49615 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr49615.C | 372 | utf_8 | 6aad70b4e5ba908ab559e27d7d2bbb1d | /* { dg-do compile } */
/* { dg-options "-g" } */
template <class T>
static inline bool Dispatch (T* obj, void (T::*func) ())
{
(obj->*func) ();
}
class C
{
bool f (int);
void g ();
};
bool C::f (int n)
{
bool b;
switch (n)
{
case 0:
b = Dispatch (this, &C::g);
case 1:
b = Dispatch (thi... |
google | android | pr48165 | .C | toolchain/gcc/gcc-4.9/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 | android | pr52918-2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr52918-2.C | 1,102 | utf_8 | 8a3a69da710faa57631f70b9ac3bf019 | // { dg-do compile }
typedef __SIZE_TYPE__ size_t;
void* __cxa_allocate_exception(size_t) throw();
typedef struct { } __gthread_mutex_t;
extern int __gthr_win32_mutex_unlock (__gthread_mutex_t *);
int __gthread_mutex_lock (__gthread_mutex_t *__mutex);
int __gthread_mutex_unlock (__gthread_mutex_t *__mutex);
void _... |
google | android | pr43068 | .C | toolchain/gcc/gcc-4.9/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 | android | pr44148 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr44148.C | 1,083 | utf_8 | e5fc7e96fce391069c98fe8b6a6e48eb | // PR c++/44148
// { dg-do compile }
// { dg-options "" }
// { dg-options "-fpic" { target fpic } }
template <typename T> struct S2
{
typedef const T &t2;
t2 operator* () const {}
};
template <typename T> struct S3
{
typedef S2 <T> t5;
};
template <typename T1, typename T2> T2 foo1 (T1 x, T2 y) { y (*x); }
templ... |
google | android | vshuf-v8si | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/vshuf-v8si.C | 667 | utf_8 | 5c082db3ca152a32ca325ca9728dcf0f | // { dg-do run { target c++11 } }
#if __SIZEOF_INT__ == 4
typedef unsigned int V __attribute__((vector_size(32)));
typedef V VI;
#elif __SIZEOF_LONG__ == 4
typedef unsigned long V __attribute__((vector_size(32)));
typedef V VI;
#else
# define UNSUPPORTED
#endif
#define A1 0x11121314
#define B1 0x21222324
#define C1 0... |
google | android | pr59822 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr59822.C | 369 | utf_8 | 59d4e20857451d2cff606095fd194b51 | // { dg-do compile }
typedef struct rtvec_def *rtvec;
enum machine_mode { VOIDmode };
struct rtvec_def { void *elem[1]; };
extern void *const_tiny_rtx[2];
void
ix86_build_const_vector (enum machine_mode mode, bool vect,
void *value, rtvec v, int n_elt)
{
int i;
for (i = 1; i < n_elt; ++i)
((v)->elem[i]) = ... |
google | android | pr57140 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr57140.C | 6,264 | utf_8 | c4915b14f78d4a30d538c7d375b59011 | // { dg-do compile }
namespace std {
typedef long unsigned int size_t;
template<typename> class allocator;
template<class _CharT> struct char_traits;
template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_string;
ty... |
google | android | pr56694 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr56694.C | 682 | utf_8 | 3b3b391f3cc230575b20a64dc6a1555e | // { dg-do compile }
// { dg-options "-fopenmp" }
// { dg-require-effective-target fopenmp }
class GException {
public:
class vector_mismatch {
public:
vector_mismatch(int size1, int size2);
};
};
class GVector{
public:
GVector& operator+=(const GVector& v);
int m_num;
double* m_data;
};
inlin... |
google | android | pr43611 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr43611.C | 313 | utf_8 | aa78ba484148219421767f1d48d903dd | // { dg-do compile }
// { dg-options "-fkeep-inline-functions" }
template < typename >
struct A {
void init (int);
A ()
{
this->init (0);
}
};
template < typename >
struct B : A < int > {
A < int > a;
B () {}
};
extern template struct A < int >;
extern template struct B < int >;
B < int > b;
|
google | android | pr42773 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr42773.C | 1,182 | utf_8 | eb50f7b8b6b7679ccdd519260c76e1ce | // { dg-do compile }
// { dg-options "-fno-exceptions" }
typedef unsigned int uint;
struct QShared {
bool deref() {
return !--count;
}
uint count;
};
template <class T> class QValueListNode {
public:
QValueListNode<T>* next;
QValueListNode<T>* prev;
};
template <class T> class QValueListPrivate : ... |
google | android | pr44357 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr44357.C | 5,981 | utf_8 | 7063a1d0e2e7d10ebad128af0ec171f1 | /* { dg-do compile } */
extern "C"
{
typedef long unsigned int size_t;
}
namespace llvm
{
namespace dont_use
{
template < typename T > double is_class_helper (...);
}
template < typename T > struct is_class
{
public:enum
{ value = sizeof (char) == sizeof (dont_use::is_class_helper < T > (0)) };
... |
google | android | pr62175 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr62175.C | 492 | utf_8 | 2dab7d0ec5bd96c1fc2d49137dd14a65 | // { dg-do compile }
// { dg-additional-options "-ftrapv" }
struct B {
B(int = 0);
};
int c;
int *d;
struct G {
G();
int numProcs_;
};
int fn1();
B fn2() {
return 0;
return B();
}
long &fn3(long &p1, long &p2) {
if (p2 < p1)
return p2;
return p1;
}
void fn4(long p1) {
long a = fn... |
google | android | pr54902 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr54902.C | 4,149 | utf_8 | 408a748c38d402106bb0c603193ee7e6 | // { dg-do compile }
namespace std __attribute__ ((__visibility__ ("default"))) {
template<typename _Iterator> struct iterator_traits {
};
template<typename _Tp> struct iterator_traits<_Tp*> {
typedef _Tp& reference;
};
}
namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))... |
google | android | pr45877 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr45877.C | 4,418 | utf_8 | ac70bfaeac2de9969633388552b48e28 | // { dg-do compile }
namespace std __attribute__ ((__visibility__ ("default")))
{
typedef __SIZE_TYPE__ size_t;
template<typename _Alloc> class allocator;
template<class _CharT> struct char_traits;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_Char... |
google | android | pr33819 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr33819.C | 352 | utf_8 | efb566f0ac18dfe0860d475880f8bae3 | /* { dg-do run } */
class s
{
public:
s(long long aa) : a(aa), i1(0) { }
long long id() const { return (this->a << 16) >> 16; }
bool operator< (s sv) { return this->a < sv.id(); }
private:
long long a : 48;
int i1 : 16;
};
s g(1);
extern "C" void abort (void);
int
main(int, char**)
{
if (g < (1LL << 38) - ... |
google | android | pr46149 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr46149.C | 571 | utf_8 | 02d684eb83ab100608e69960f657a0e0 | // { dg-do run }
// { dg-options "-fno-tree-sra" }
struct S
{
S ():p ((char *) __builtin_calloc (1, 1))
{
}
char *p;
};
template < class T > struct A
{
A (const S & __m1, const T & __m2):m1 (__m1), m2 (__m2)
{
}
const S & m1;
const T & m2;
};
struct B:A < S >
{
B (const S & __v):A < S > (__v, __v)
... |
google | android | pr54563 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr54563.C | 185 | utf_8 | 223cbe0817bf9dd882b64bfda782f806 | // PR tree-optimization/54563
// { dg-do compile }
extern "C" float powf (float, float);
struct S { ~S (); };
double bar ();
double x;
void
foo ()
{
S s;
x = powf (bar (), 2.);
}
|
google | android | pr53752 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr53752.C | 5,090 | utf_8 | 16bea23af67221b5b9ae63c61dcfbb3a | // { dg-do compile }
// { dg-options "-g" }
typedef unsigned int uint32_t;
typedef unsigned long int uint64_t;
namespace mpl_ {
template< typename T, T N > struct integral_c {
static const T value = N;
};
}
namespace mpl {
using namespace mpl_;
};
template <class T, T val> struct integral_constant : publi... |
google | android | pr32304 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr32304.C | 99 | utf_8 | 2b9b21a174d22a50425b2e0f0538d74f | // { dg-do compile }
struct S {
S() {}
};
S f() {
static S s;
return s;
}
|
google | android | pr53336 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr53336.C | 428 | utf_8 | d599ebf8031516ce985dd3ae65bd8b97 | // { dg-do compile }
bool foo();
struct C
{
C()
{
if (foo())
foo();
}
};
struct S
{
struct dummy
{
int i_;
};
typedef int dummy::*bool_type;
operator bool_type() const
{
return foo() ? &dummy::i_ : 0;
}
};
int x;
struct adaptor
{
C c;... |
google | android | pr51903 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr51903.C | 179 | utf_8 | c26e5af08201d96e59522545f827c5f6 | // { dg-do compile }
// { dg-options "-O2 -fnon-call-exceptions -fno-guess-branch-probability" }
#include <vector>
void foo ()
{
std::vector < std::vector< int > > (20000);
}
|
google | android | pr37345 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr37345.C | 2,211 | utf_8 | 812d6862a7c6ee4d0b3f6e68a439d3af | /* { dg-do compile } */
class EbmlElement {
virtual EbmlElement * Clone() const; ... |
google | android | vshuf-v4sf | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/vshuf-v4sf.C | 675 | utf_8 | 3f9d2c6b337d0bfd7093b7c17f08e891 | // { dg-do run { target c++11 } }
#if __SIZEOF_FLOAT__ == 4
typedef float V __attribute__((vector_size(16)));
# if __SIZEOF_INT__ == 4
typedef unsigned int VI __attribute__((vector_size(16)));
# elif __SIZEOF_LONG__ == 4
typedef unsigned long VI __attribute__((vector_size(16)));
# else
# define UNSUPPORTED
# endif
#... |
google | android | pr46364 | .C | toolchain/gcc/gcc-4.9/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 | android | 20100825 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/20100825.C | 292 | utf_8 | 525821efab8625fd7aaf799d1e7ba186 | // { dg-do run }
typedef enum { zero = 0, one = 1, two = 2, ENUM_MAX = 3 } my_enum;
my_enum e;
extern "C" void abort (void);
int __attribute__((noinline)) foo() { return 10; }
int main()
{
int r;
r = foo();
if ((r < 0) || (r >= ENUM_MAX))
return 0;
e = (my_enum)r;
abort ();
}
|
google | android | pr41183 | .C | toolchain/gcc/gcc-4.9/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 | android | pr35634 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr35634.C | 272 | utf_8 | 83d18b5f008694ca8d1fc8826cfa9bf1 | /* { dg-do run } */
extern "C" void abort (void);
extern "C" void exit (int);
void foo (int i)
{
static int n;
if (i < -128 || i > 127)
abort ();
if (++n > 1000)
exit (0);
}
int main ()
{
signed char c;
} |
google | android | pr33589-1 | .C | toolchain/gcc/gcc-4.9/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 | android | vshuf-v2di | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/vshuf-v2di.C | 346 | utf_8 | d73ed0e35278b773c8d877e1a421c704 | // // { dg-do run { target c++11 } }
#if __SIZEOF_LONG_LONG__ == 8
typedef unsigned long long V __attribute__((vector_size(16)));
typedef V VI;
#else
#define UNSUPPORTED
#endif
#define A 0x1112131415161718
#define B 0x2122232425262728
#define X 0xc1c2c3c4c5c6c7c8
#define Y 0xd1d2d3d4d5d6d7d8
#include "vshuf-2.inc"
... |
google | android | pr44206 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr44206.C | 258 | utf_8 | 21914f1786b649768c65385d18cbda0c | // { dg-do compile }
template<int> struct A
{
void foo(void(*)(A));
void bar(void(*f)(A)) { foo(f); foo(f); }
};
template<int N> inline void FOO(A<N> a)
{
a.foo(0);
}
extern template void FOO(A<0>);
void BAR()
{
A<0> a;
FOO(a);
a.bar(FOO);
}
|
google | android | pr40460 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr40460.C | 165 | utf_8 | 39c666253aab951b3677dc9c7b19514f | /* { dg-do compile } */
void bar(int);
void foo(void)
{
for (int i = 0; i<1; ++i)
bar (i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i);
}
|
google | android | pr47382 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/torture/pr47382.C | 287 | utf_8 | c2620174c12bbff392c51fb1170c0929 | // { dg-do run }
extern "C" void abort ();
struct A
{
inline ~A ();
virtual void foo () {}
};
struct B : A
{
virtual void foo () { abort(); }
};
static inline void middleman (A *a)
{
a->foo ();
}
inline A::~A ()
{
middleman (this);
}
int main ()
{
B b;
return 0;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.