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 | pmf4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/pmf4.C | 532 | utf_8 | 9a3b6813081867a1df6cba19658db429 | // { dg-do run }
// Bug: g++ doesn't compensate for finding a virtual function in a
// non-primary vtable when generating PMFs.
struct A {
virtual ~A() {}
};
struct B {
virtual void f () = 0;
};
struct C : public A, public B {
void f ();
};
void (C::* B_f)() = &B::f; // this works
void (C::* C_f)() = &C::f; // t... |
google | android | inline10 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/inline10.C | 182 | utf_8 | 50d7ee902563f62414c3d4e1c3e2be49 | // { dg-do assemble }
// { dg-options "-O2" }
struct S
{
};
inline const S f ()
{
return S ();
}
void g ()
{
S s;
f ();
} |
google | android | op1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/op1.C | 136 | utf_8 | 47d2d0b024512d64bb5cf3a664e78979 | // { dg-do assemble }
struct S {
bool operator! (int, ...); // { dg-error "" }
}; |
google | android | typeid1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/typeid1.C | 282 | utf_8 | 1d27cd1e6509508bee24a6470a13c2ee | // { dg-do assemble }
// { dg-options "" }
#include <typeinfo>
int main ()
{
typeid(char*);
int len = 1;
char carr[len];
typeid(typeof(carr)); // { dg-error "" } type has variable size
typeid(carr); // { dg-error "" } type has variable size
} |
google | android | goto3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/goto3.C | 680 | utf_8 | c316b72961a5e3b35f0cad6ae96805dd | // { dg-do assemble }
// Testcase for various invalid gotos.
void f ()
{
goto foo1; // { dg-error "" } jumps
try { foo1:; } catch (...) { } // { dg-error "" } into try
goto foo2; // { dg-error "" } jumps
try { } catch (...) { foo2:; } // { dg-error "" } into catch
goto foo3; // { dg-error "" } jumps... |
google | android | union2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/union2.C | 508 | utf_8 | de2953c02f20c253d55673ce9923a7ab | // { dg-do run }
// Bug: g++ crashed on empty initializers for unions.
// Bug: gcc and g++ didn't zero unions with empty initializers.
extern "C" void exit (int);
typedef union u
{
union u *up;
void *vp;
} u;
static u v = {};
void bar (u);
void baz (u);
void foo()
{
u w = {};
u x = { &v };
baz... |
google | android | lookup17 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/lookup17.C | 179 | utf_8 | 8a1fafd7339e35a324f0c9633e4504e0 | // { dg-do run }
// Bug: t->B is resolved to the type instead of the field.
struct A {
struct B { } *B;
int i, j, k, l, m;
};
struct A a;
int
main ()
{
void *p = a.B;
}
|
google | android | anon3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/anon3.C | 1,283 | utf_8 | 367733c92db9bcfe12fccf6f5357cd64 | // { dg-do run }
// Although anon unions cannot have user defined member functions
// [class.union/2]. They should have implicitly defined copy ctors and
// and the like [class.copy/4]. Make sure we generate one of the correct
// signature and that it works ok.
extern "C" void abort();
struct A
{
union
{
int... |
google | android | cond1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/cond1.C | 215 | utf_8 | 7ce8357f84bf1c23ea2ef3e1897f0788 | // { dg-do link }
template <class T>
void f (T&) ;
template <>
void f (void (&)())
{
}
void g ()
{
}
void h ()
{
}
bool b;
int main ()
{
f (b ? g : h);
} |
google | android | static4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/static4.C | 192 | utf_8 | 7052f8cb3819c3897cd5141e9caf9ecb | // { dg-do run }
// { dg-options "-O" }
struct A {
A(int, int);
};
A::A(int, int) {}
static A _A(0, 0);
int main() { return(0); } |
google | android | crash31 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/crash31.C | 137 | utf_8 | 1703e72cd30f5bb840b4131a1214464e | // { dg-do assemble }
namespace bar
{
struct foo
{
foo();
}; // { dg-error "expected" } |
google | android | friend10 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/friend10.C | 405 | utf_8 | a8a2b073e880541aac32c952a151d54e | // { dg-do assemble }
// Origin: Neil Booth, from PR #78
namespace MySpace
{
class Tag1 { };
class Tag2 { };
template<class Tag>
class Object
{
public:
friend void Forgotten(Object const & m) {}
};
typedef Object<Tag1> U1;
typedef Object<Tag2> U2;
void foo()
{
Forgotten... |
google | android | return1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/return1.C | 270 | utf_8 | 9c8cbb38ce8d4bece4eccb6a484c763c | // { dg-do assemble }
// Special g++ Option:
struct C {
int f() {return 0;}
};
struct D {
C a[1];
C* g();
};
C* D::g() {
int i = 0;
while (i < 1 && a[i].f() != 1) {}
return undefined_variable; // { dg-error "" }
} |
google | android | local4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/local4.C | 170 | utf_8 | 27f9dff2a26887c8da1bef9ace8c5587 | // { dg-do run }
// Test that a local declaration of one of a global overload set works
int f () { return 0; }
int f (int);
int main ()
{
int f ();
return f ();
}
|
google | android | decl5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/decl5.C | 2,180 | utf_8 | b5bff59738d7a2328a6f6318082a50c6 | // { dg-do assemble }
// http://gcc.gnu.org/ml/gcc-bugs/1999-04n/msg00631.html
// the code is wrong, but we fell over badly
struct A {
int A::fn(); // { dg-error "extra qualification" }
int A::m; // { dg-error "extra qualification" }
struct e;
struct A::e {int i;}; // { dg-error "extra quali... |
google | android | local1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/local1.C | 181 | utf_8 | f02d7bee1a6e33dff41829b90a2f55e5 | // { dg-do link }
struct Outer {
virtual ~Outer() {}
};
int
main()
{
{ struct Inner : virtual public Outer {} inner; }
{ struct Inner : virtual public Outer {} inner; }
}
|
google | android | linkage6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/linkage6.C | 253 | utf_8 | 031860326d5d4c1b03d2fa8b5333dc2b | // { dg-do assemble }
// { dg-options "-fno-weak" }
template <typename T>
void f ();
void h () { f<int> (); }
template <void (*X)()>
void g () {}
template <typename T>
void f ()
{
g<&f<T> >();
} |
google | android | friend4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/friend4.C | 691 | utf_8 | a81525f7456919fc54f1c69499313ca6 | // { dg-do assemble }
// I'm not 100% sure this program is correct, but g++ shouldn't just
// crash.
// The idea is to give privileged access to bar<A> only to
// specializations foo<A,B>, for all B.
template <class A, class B> void foo();
template <class C> class bar {
int i; // { dg-error "" } private
template <... |
google | android | comdat1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/comdat1.C | 435 | utf_8 | f34963eb24bc981aff6b296a0854778b | // { dg-do run }
// { dg-additional-sources " comdat1-aux.cc" }
// { dg-options "-O" }
// Test that statics in inline functions are unified between
// translation units. Currently we handle this by just suppressing
// inling and relying on unification of the function itself.
inline int f ()
{
static int i;
retur... |
google | android | ptrmem1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/ptrmem1.C | 162 | utf_8 | f75732a46d8496aac3e6fbd99609c316 | // { dg-do assemble }
class x
{
public:
virtual int is_constant();
};
void foo()
{
x* y;
if (y->is_constant) // { dg-error "" } assuming &
{
}
}
|
google | android | lookup20 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/lookup20.C | 189 | utf_8 | ec3df6ff05f5895bbe08f752327dc07a | // { dg-do assemble }
// Bug: typename_sub2 returned the type, so we tried to look up "A" in B.
struct A { struct A1 { }; };
struct B {
typedef A Q;
};
struct C: public B::Q::A1 { };
|
google | android | pmf7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/pmf7.C | 300 | utf_8 | e8c1b04efac1c3d4b2dc87bc880171ed | // { dg-do assemble }
// Test for proper diagnostics on trying to take the address of a non-static
// member function.
struct A {
void f ();
void f (int);
void g ();
};
int main ()
{
A a;
&a.f; // { dg-error "" } overloaded
&a.g; // { dg-error "" } can't write a pmf like this
}
|
google | android | dtor1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/dtor1.C | 211 | utf_8 | 42930a953066f66409a9916d49210973 | // { dg-do run }
// Test for use of typedef in explicit destructor call.
#include <new>
struct X {
typedef X foo;
};
X x;
unsigned char bar[sizeof (X)];
int
main ()
{
X* p = new (bar) X;
p->~foo();
}
|
google | android | comdat3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/comdat3.C | 278 | utf_8 | 3cb11229a87ec97d36dc77b6c3b38fd3 | // { dg-do run }
// { dg-additional-sources " comdat3-aux.cc" }
// Test that duplicate elimination of implicit instantiations of static
// data members works properly.
// Additional files: comdat3.h
#include "comdat3.h"
int main ()
{
const bool *p = &A<int>::b;
f ();
}
|
google | android | asm3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/asm3.C | 205 | utf_8 | f213d17d284e5fe46a0e8455aaf71d07 | // { dg-do assemble { target i?86-*-* x86_64-*-* } }
// { dg-options "-O2" }
typedef unsigned long long uint64;
uint64 fstps(void)
{
uint64 ret;
asm volatile("fstps %0" : "=m" (ret));
return ret;
}
|
google | android | access11 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/access11.C | 292 | utf_8 | 556fbcb3dab4f03751dfdafd58f0b61d | // { dg-do assemble }
// { dg-options "-w" }
class A
{
private:
template <class T> void g(T t) {}
int i;
};
template <>
void A::g<int>(int t) { i = 1; } // { dg-error "" } private
int main()
{
A a;
a.g<int>(0); // { dg-error "" } private
} |
google | android | sibcall1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/sibcall1.C | 182 | utf_8 | df2e977a7fb4fb0bc14455136a875f07 | // { dg-do run }
// { dg-options "-O2" }
#include <iostream>
std::ostream& foo (const char *x, std::ostream &y)
{
return y << "" << x;
}
int main ()
{
foo ("", std::cout);
}
|
google | android | enum2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/enum2.C | 304 | utf_8 | feb92c7dc6c4aa9d4c55f0948efbc038 | // { dg-do assemble }
// We'd like the enum location to be its identifier.
enum thing // { dg-error "" } previous def
{
val1
};
enum thing // { dg-error "" } multiple def
{
val2
}; |
google | android | copy2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/copy2.C | 246 | utf_8 | c51d339838c157d1f925c6eb729dbd72 | // { dg-do run }
int i;
struct B {
B () {}
B (B&) { i = 1; }
B (const B&) { i = 2; }
};
struct D : public B {
D () {}
};
int main ()
{
D d;
D d2 (d);
if (i != 2)
return 1;
} |
google | android | redecl2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/redecl2.C | 212 | utf_8 | 021b847eaf4c57e6a1b1059adaf32f51 | // { dg-do assemble }
struct S {
S(int); // { dg-error "with" }
S(int); // { dg-error "overloaded" } already declared
~S();// { dg-error "with" }
~S(); // { dg-error "overloaded" } already declared
};
|
google | android | delete6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/delete6.C | 407 | utf_8 | 002b9210ec0b57b8244b0909a259b25f | // { dg-do run }
typedef __SIZE_TYPE__ size_t;
int i;
struct B{};
struct A{
static void* operator new(size_t)
{return &i;}
inline static void operator delete(void*p);
static void operator delete(void*, const B&){}
};
inline void A::operator delete(void*p)
{A::operator delete(p,B());}
int main()
{A *ap=new A;... |
google | android | decl9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/decl9.C | 351 | utf_8 | e132f4eacd09364c6ba47417c0724608 | // { dg-do assemble }
// Build don't link
typedef struct { } S; // OK
typedef struct { }; // { dg-error "" } Missing type-name
typedef union { } U; // OK
typedef union { }; // { dg-error "" } Missing type-name |
google | android | externC1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/externC1.C | 187 | utf_8 | 20c3e7bd2094e334ab8bfcd82a2b1e43 | // { dg-do assemble }
extern "C"
{
struct T
{
~T ();
};
struct S
{
T t;
};
}
S* s;
void f ()
{
delete s;
} |
google | android | lineno1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/lineno1.C | 283 | utf_8 | 5d4a0219ff1355aba34b447f98bcca36 | // { dg-do assemble }
// { dg-options "-w" }
// Bug: g++ was giving the wrong line number for statics.
class A
{
A(); // { dg-error "" } private
~A(); // { dg-error "" } private
};
static A a; // { dg-error "" } here |
google | android | crash24 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/crash24.C | 592 | utf_8 | 45154e4709b2aea272998f08d5fa0ddf | // { dg-do assemble }
class foo {
public:
class __iterator;
friend class __iterator;
typedef __iterator const_iterator;
virtual ~foo() { }
__iterator begin(); // { dg-message "foo::begin|no known conversion for implicit" }
};
static void iteratorTest(const foo &x)
{
foo::const_iterator i = x.beg... |
google | android | ambig1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/ambig1.C | 594 | utf_8 | e5a4d0d3d65e88db5c260b60723419d8 | // { dg-do assemble }
struct A {
int operator ++(); // { dg-message "" } candidates
void operator ()(); // { dg-message "" } candidates
void operator delete(void*); // { dg-message "" } candidates
};
struct B {
int operator ++(int); // { dg-message "" } candidates
void operator ()(); // { dg-message "" } c... |
google | android | access5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/access5.C | 219 | utf_8 | 8c4bee7285989e59f3019a3018e7abba | // { dg-do assemble }
class A
{
protected:
int i;
};
class B : private A
{
protected:
A::i; // { dg-warning "deprecated" }
};
struct C : public B {
friend int f(C *p);
};
int f(C *p) {
return p->i;
}
|
google | android | defarg9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/defarg9.C | 644 | utf_8 | f7f9c2f14ef416153be680c07c0850ff | // { dg-do assemble }
//
// Bug 2608. A default parameter introduced in the definition of a
// ctor never made it into the clones, leading to later overload
// resolution failures. This is related to bug 2356.
struct A
{
A (int, int);
};
A::A (int d, int = 0)
{
if (d)
{
A a (0);
}
}
void get_width (... |
google | android | warn4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/warn4.C | 1,474 | utf_8 | 5714f810f94d6b2d3d9c4f3373d916a5 | // { dg-do assemble }
// { dg-options "-Wsign-conversion" }
// make sure we only warn on assigning a negative (signed) value
// to an unsigned type, and don't warn just if the unsigned value
// happens to have the top bit set.
typedef unsigned U;
void fn (unsigned);
void fu ()
{
unsigned s1 = -1u;
unsigned s2(-1u)... |
google | android | lookup1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/lookup1.C | 166 | utf_8 | f99b40c8a5dca68f114e31c176c89436 | // { dg-do assemble }
// simple test for id from base class during class defn
struct foo {
enum { blah = 1 };
};
struct bar : public foo {
char cache[blah];
};
|
google | android | ref4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/ref4.C | 476 | utf_8 | 79d707ba18e6801d7bcfcbfa35d50f7a | // { dg-do assemble }
// Bug 2117. A conversion op to reference type created a temporary, even
// when bound to another reference.
struct Abstract
{
virtual void Foo () = 0;
};
struct Proxy
{
operator Abstract & ();
Abstract &Convert ();
};
void Baz (Abstract &);
void Foo ()
{
Proxy proxy;
Baz (proxy);
... |
google | android | init9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/init9.C | 837 | utf_8 | 0696a984444c04ea186eb0741dab5b5d | // { dg-do assemble }
// X is not a POD because it has a user-defined destructor.
// Therefore, we can't cross its initialization.
// vector<int> is not even an aggregate; nevertheless, no error is
// reported...
struct A {
A() {}
};
void a() {
goto bar; // { dg-error "" } jump from here
A x; // { dg-error "" } ... |
google | android | anon4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/anon4.C | 345 | utf_8 | 0f703db296c3a1d1c06be17ffadd3f98 | // { dg-do assemble }
// Anon unions cannot have user defined member functions
// [class.union/2]. Make sure we spot that.
struct A
{
union
{ // { dg-error "" } anon union cannot have member fns
void bad();
};
}; |
google | android | lookup9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/lookup9.C | 97 | utf_8 | a9a74cf7de9ad7a2eaa872544ff3f96b | // { dg-do assemble }
struct S {
typedef long I;
};
struct D : virtual public S {
I i;
};
|
google | android | static12 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/static12.C | 139 | utf_8 | df5bbaffad19a99974b639991af19e0a | // { dg-do assemble }
int main ()
{
static const int n = 10;
static const int *p = &n;
} |
google | android | comdat5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/comdat5.C | 240 | utf_8 | 8bdec5d59e3ad4184e303beb93c1b552 | // PR target/17828
// { dg-do link { target fpic } }
// { dg-additional-sources " comdat5-aux.cc" }
// { dg-options "-O2 -fPIC" }
// { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } }
#include "comdat4.C"
|
google | android | crash39 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/crash39.C | 429 | utf_8 | 135d27e338f13f3cf263a6d927ea3b3d | // { dg-do assemble }
// Bug 595. We failed to clear out some things after seeing a duplicate
// struct definition. That caused us to become inconsistent.
struct X
{
~X ();
};
struct S { X a; }; // { dg-error "" } previous defn
struct S { X a; }; // { dg-error "" } redefinition
void c1(S s)
{
} |
google | android | regstack | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/regstack.C | 368 | utf_8 | 94c5e744c201427e7b5dffedacfb7873 | // { dg-do run { target i?86-*-* x86_64-*-* } }
// { dg-options "-O2" }
inline double foo (double x)
{
register double r;
asm volatile ("fsqrt" : "=t" (r) : "0" (x));
return r;
}
struct X
{
~X() {}
};
int b;
double bar (X x)
{
if (b)
return 1.0;
return 36.0 * foo (36.0);
}
int main ()
{
X x;
if... |
google | android | ptrmem9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/ptrmem9.C | 269 | utf_8 | 11aead89d7c9ba7d1d714df900e9e821 | // { dg-do run }
// Test that const-correctness is observed when using pointers-to-members.
struct A {
int f () { return 1; }
int f () const { return 0; }
};
struct B {
A a;
B() { }
};
int main ()
{
A B::*bm = &B::a;
const B b;
return (b.*bm).f ();
}
|
google | android | using8 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/using8.C | 776 | utf_8 | dcadc285f1b7a525ad8b9352919eae27 | // { dg-do assemble }
// We rejected using decls bringing in functions from a base which would hide a
// nested class of the same name, but only if we had no functions by that name
// already. Also, we failed to find that using declaration during lookup. Also
// we failed to reject using declarations which matched the... |
google | android | local3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/local3.C | 275 | utf_8 | d66fe3a8dd3fe648291bfe2f4d9cff5d | // { dg-do run }
// Bug: g++ lies about DECL_CONTEXT, so the backend thinks B::f is not
// function-local.
struct A {
virtual void f () = 0;
};
int main()
{
struct B : public A {
void f () { }
};
B b;
} |
google | android | warn01 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/warn01.C | 364 | utf_8 | 92af271225d9aaa11fbb66029eb292ac | // { dg-do assemble }
// { dg-options "-W -Wall" }
typedef unsigned long size_t;
extern void* malloc (size_t);
extern void free (void*);
extern void* realloc (void*, size_t);
struct vtable {
void* (* _malloc) (size_t);
void (* _free) (void*);
void* (* _realloc) (void*, size_t);
};
struct vtable mtable = { mal... |
google | android | defarg5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/defarg5.C | 228 | utf_8 | c8d9865e55428fe9bef770d7cf7a264d | // { dg-do assemble }
// Bug: the SAVE_EXPR in the new expression remembers that it's in g(),
// causing the compiler to crash in h().
struct A {
A ();
};
void f (A* = new A);
void g ()
{
f ();
}
void h ()
{
f ();
}
|
google | android | syshdr1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/syshdr1.C | 179 | utf_8 | 21e31c820eea768ab1908212d3565046 | // { dg-do assemble }
// { dg-options "" }
# 1 "foo" 3
void f () {}
extern "C" void foo(int);
extern "C" void foo(int) throw(); |
google | android | static7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/static7.C | 132 | utf_8 | 5716a35500cf10cf7c0b79db0019b806 | // { dg-do run }
int j = 42;
int main ()
{
static int i = j;
return (i != 42);
} |
google | android | 57619 | .C | toolchain/gcc/gcc-4.9/libstdc++-v3/testsuite/23_containers/unordered_map/insert/57619.C | 1,564 | utf_8 | 2d8c27d4b4b4778bde1f14d2332bf653 | // { dg-options "-std=gnu++11" }
//
#include <unordered_map>
#include <string>
#include <testsuite_hooks.h>
void test01()
{
bool test __attribute__((unused)) = true;
{
std::unordered_map<std::string, std::string> mymap;
std::pair<std::string, std::string> mypair{std::string("key"),
... |
google | android | 57619 | .C | toolchain/gcc/gcc-4.9/libstdc++-v3/testsuite/23_containers/unordered_multimap/insert/57619.C | 1,579 | utf_8 | e4d2aa7d33eb568eb72570d73c8425c1 | // { dg-options "-std=gnu++11" }
//
#include <unordered_map>
#include <string>
#include <testsuite_hooks.h>
void test01()
{
bool test __attribute__((unused)) = true;
{
std::unordered_multimap<std::string, std::string> mymmap;
std::pair<std::string, std::string> mypair{std::string("key"),
... |
google | android | 16251 | .C | toolchain/gcc/gcc-4.9/libstdc++-v3/testsuite/27_io/basic_iostream/cons/16251.C | 1,041 | utf_8 | 2b733d0a714f6c45f452bdb1f8a0be26 | // 27.6.1.5 - Template class basic_iostream
#include <iostream>
class mystream
: public std::iostream
{
public:
mystream () { };
};
// libstdc++/16251
void test01()
{
mystream x;
x.rdbuf(std::cout.rdbuf());
x << std::endl;
}
int main()
{
test01();
return 0;
} |
google | android | dr630-3 | .C | toolchain/gcc/gcc-4.9/libstdc++-v3/testsuite/26_numerics/valarray/dr630-3.C | 1,057 | utf_8 | c3709885a85fb4bdc39940a98a2da473 | #include <valarray>
#include <testsuite_hooks.h>
// libstdc++/57666
void test01()
{
bool test __attribute__((unused)) = true;
std::valarray<int> a(3), b(3), d1, d2;
d1 = a;
VERIFY( d1.size() == 3 );
d2 = a + b;
VERIFY( d2.size() == 3 );
}
int main()
{
test01();
return 0;
} |
google | android | throwdown | .C | toolchain/gcc/gcc-4.9/libitm/testsuite/libitm.c++/throwdown.C | 140 | utf_8 | 46762fbea0ec17d69930afcc614c45b1 | // { dg-do compile }
#include <libitm.h>
static void throwit() {
throw 1;
}
void tranfunc() {
__transaction_atomic {
throwit();
}
}
|
google | android | static_ctor | .C | toolchain/gcc/gcc-4.9/libitm/testsuite/libitm.c++/static_ctor.C | 727 | utf_8 | 2742ff75bdd09e5d7b7a8243faf7a139 | /* { dg-do run } */
/* { dg-options "-pthread" } */
/* { dg-skip-if "PR libitm/51822" { *-*-* } } */
/* Tests static constructors inside of transactional code. */
#include <pthread.h>
#include <stdlib.h>
int f(int x) __attribute__((noinline,transaction_safe));
int f(int x)
{
static int y = x;
return y*x;
}
stat... |
google | android | dropref | .C | toolchain/gcc/gcc-4.9/libitm/testsuite/libitm.c++/dropref.C | 173 | utf_8 | 11785412cb94b04ecc293453486ad223 | /* { dg-xfail-run-if "unsupported" { *-*-* } } */
#include <libitm.h>
char *pp;
int main()
{
__transaction_atomic {
_ITM_dropReferences (pp, 555);
}
return 0;
}
|
google | android | eh-1 | .C | toolchain/gcc/gcc-4.9/libitm/testsuite/libitm.c++/eh-1.C | 319 | utf_8 | d806946f2845368f69a6513f60b085d2 | // { dg-do run }
extern "C" void abort ();
int dothrow;
int g;
static void f1()
{
g++;
if (dothrow)
throw 1;
}
static void f2()
{
__transaction_atomic {
f1();
}
}
int main()
{
dothrow = 0;
f2();
dothrow = 1;
try {
f2();
} catch (...) {
}
if (g != 2)
abort ();
return 0;
}
|
google | android | task-3 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/task-3.C | 973 | utf_8 | 27531bc2a807e1107292fe33e894f8a0 | // { dg-do run }
extern "C" void abort ();
struct A
{
A ();
~A ();
A (const A &);
unsigned long l;
};
int e;
A::A ()
{
l = 17;
}
A::~A ()
{
if (l > 30)
#pragma omp atomic
e++;
}
A::A (const A &r)
{
l = r.l;
}
void
check (int i, A &a, int j, A &b)
{
if (i != 6 || a.l != 21 || j != 0 || b... |
google | android | single-3 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/single-3.C | 242 | utf_8 | 7d0f24f8edab30e9e5aa2d3f5133e9f4 | extern "C" void abort (void);
void
single (int a, int b)
{
#pragma omp single copyprivate(a) copyprivate(b)
{
a = b = 5;
}
if (a != b)
abort ();
}
int main()
{
#pragma omp parallel
single (1, 2);
return 0;
}
|
google | android | taskgroup-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/taskgroup-1.C | 38 | utf_8 | 8578798fb9936f8addf78e6b2b068a18 | #include "../libgomp.c/taskgroup-1.c"
|
google | android | ctor-2 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/ctor-2.C | 923 | utf_8 | 77ef1f3b35655957d8c63625800cc252 | // { dg-do run }
#include <omp.h>
#include <assert.h>
struct B
{
static int ccount;
static int dcount;
static int xcount;
static B *expected;
B();
B(int);
B(const B &);
~B();
B& operator=(const B &);
void doit();
};
int B::ccount;
int B::dcount;
int B::xcount;
B * B::expected;
B::B(int)
{
exp... |
google | android | loop-2 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/loop-2.C | 353 | utf_8 | 7d422e9589fd31ce814a2465d8342053 | #include <omp.h>
/* Orphaned work sharing. */
extern "C" void abort (void);
#define N 10
void parloop (int *a)
{
int i;
#pragma omp for
for (i = 0; i < N; i++)
a[i] = i + 3;
}
main()
{
int i, a[N];
#pragma omp parallel shared(a)
{
parloop (a);
}
for (i = 0; i < N; i++)
if (a[i] != i + 3... |
google | android | pr43893 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/pr43893.C | 2,303 | utf_8 | 467dc8995782492f741eb1d9548a272b | // PR c/43893
// { dg-do run }
extern "C" void abort ();
template <typename T, T M, T N>
void
f1 ()
{
int c;
T i;
c = 0;
#pragma omp parallel for reduction(+:c)
for (i = M; i < N; i++)
c++;
if (c != 1)
abort ();
}
template <typename T, T M, T N>
void
f2 ()
{
int c;
T i;
c = 0;
#pragma omp par... |
google | android | task-6 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/task-6.C | 1,464 | utf_8 | f3fc31477cdff517af07a5eaed3977b4 | extern "C" void abort ();
int a = 18;
template <typename T>
void
f1 (T i, T j, T k)
{
T l = 6, m = 7, n = 8;
#pragma omp task private(j, m) shared(k, n)
{
j = 6;
m = 5;
if (++a != 19 || ++i != 9 || j != 6 || ++l != 7 || m != 5 || ++n != 9)
#pragma omp atomic
k++;
}
#pragma omp taskwait
if (... |
google | android | udr-17 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-17.C | 77 | utf_8 | 2de2f1bc580f670fa5b9f9e02878f648 | // { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-7.C"
|
google | android | ctor-4 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/ctor-4.C | 1,163 | utf_8 | 35977f0d2ad0a90d819510aebcbf6e04 | // { dg-do run }
#include <omp.h>
#include <assert.h>
struct B
{
static int ccount;
static int dcount;
static int ecount;
static B *e_inner;
static B *e_outer;
B();
B(int);
B(const B &);
~B();
B& operator=(const B &);
void doit();
};
int B::ccount;
int B::dcount;
int B::ecount;
B * B::e_inner;... |
google | android | shared-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/shared-1.C | 822 | utf_8 | 860ab4774cd57bc33c45802cc8ba5ad1 | #include <omp.h>
extern "C" void abort (void);
struct Y
{
int l[5][10];
};
struct X
{
struct Y y;
float b[10];
};
void
parallel (int a, int b)
{
int i, j;
struct X A[10][5];
a = b = 3;
for (i = 0; i < 10; i++)
for (j = 0; j < 5; j++)
A[i][j].y.l[3][3] = -10;
#pragma omp parallel shared (... |
google | android | collapse-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/collapse-1.C | 584 | utf_8 | 3cf387e0409514607d2a5bfe5450a908 | // { dg-do run }
#include <string.h>
#include <stdlib.h>
int
main ()
{
int i, j, k, l = 0;
int a[3][3][3];
memset (a, '\0', sizeof (a));
#pragma omp parallel for collapse(4 - 1) schedule(static, 4)
for (i = 0; i < 2; i++)
for (j = 0; j < 2; j++)
for (k = 0; k < 2; k++)
a[i][j][k] = i + j * 4 + ... |
google | android | for-10 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/for-10.C | 849 | utf_8 | 325a8a87e18b89a296100f50ff483415 | extern "C" void abort ();
#define M(x, y, z) O(x, y, z)
#define O(x, y, z) x ## _ ## y ## _ ## z
#define F simd
#define G simd
#define S
#define N(x) M(x, G, normal)
#include "../libgomp.c/for-2.h"
#undef S
#undef N
#undef F
#undef G
#define F parallel for simd
#define G pf_simd
#include "../libgomp.c/for-1.h"
#unde... |
google | android | ctor-3 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/ctor-3.C | 1,111 | utf_8 | 30fe7293fbfe4d3917ee957be0df04b8 | // { dg-do run }
#include <omp.h>
#include <assert.h>
struct B
{
static int icount;
static int dcount;
static int ccount;
static B *e_inner;
static B *e_outer;
B();
B(int);
B(const B &);
~B();
B& operator=(const B &);
void doit();
};
int B::icount;
int B::dcount;
int B::ccount;
B * B::e_inner;... |
google | android | simd-7 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/simd-7.C | 1,464 | utf_8 | 56e5a5def81a4763b39f8f8ea0468a5e | // { dg-do run }
// { dg-options "-O2" }
// { dg-additional-options "-msse2" { target sse2_runtime } }
// { dg-additional-options "-mavx" { target avx_runtime } }
extern "C" void abort ();
int a[1024] __attribute__((aligned (32))) = { 1 };
struct S
{
int s;
S () : s (0) {}
S (int x) : s (x) {}
~S () {}
};
#pra... |
google | android | target-3 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/target-3.C | 35 | utf_8 | f5f370945da4ed9519d04fd309672472 | #include "../libgomp.c/target-2.c"
|
google | android | target-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/target-1.C | 35 | utf_8 | 130e99845504e36944b25622bd268c8f | #include "../libgomp.c/target-1.c"
|
google | android | udr-19 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-19.C | 77 | utf_8 | 77736c38bb0eb6d52782233a967611d2 | // { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-9.C"
|
google | android | simd-9 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/simd-9.C | 1,058 | utf_8 | e7079692a564dbf5ba9a4e6b88667164 | // { dg-do run }
// { dg-options "-O2" }
// { dg-additional-options "-msse2" { target sse2_runtime } }
// { dg-additional-options "-mavx" { target avx_runtime } }
extern "C" void abort ();
int a[1024] __attribute__((aligned (32))) = { 1 };
#pragma omp declare reduction (foo:int:omp_out += omp_in) \
initializer (... |
google | android | loop-3 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/loop-3.C | 292 | utf_8 | 8f3bc76b2120d347e3809519041332d4 | extern "C" void abort (void);
int a;
void
foo ()
{
int i;
a = 30;
#pragma omp barrier
#pragma omp for lastprivate (a)
for (i = 0; i < 1024; i++)
{
a = i;
}
if (a != 1023)
abort ();
}
int
main (void)
{
#pragma omp parallel num_threads (64)
foo ();
return 0;
}
|
google | android | cancel-taskgroup-2 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/cancel-taskgroup-2.C | 116 | utf_8 | 59eb5d2d8d52e87d5eecc851095e66e6 | // { dg-do run }
// { dg-set-target-env-var OMP_CANCELLATION "true" }
#include "../libgomp.c/cancel-taskgroup-2.c"
|
google | android | udr-8 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-8.C | 575 | utf_8 | a0ed7c5ec445acca5bb4d3efd5041bbf | // { dg-do run }
extern "C" void abort ();
struct S;
void foo (S *, S *);
void bar (S &, S &);
#pragma omp declare reduction (+:S:foo (&omp_out, &omp_in))
#pragma omp declare reduction (*:S:bar (omp_out, omp_in))
struct S { int s; S () : s (0) {} };
void
foo (S *x, S *y)
{
x->s += y->s;
}
void
bar (S &x, S &y)
{
... |
google | android | for-8 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/for-8.C | 8,472 | utf_8 | 880af38017f64c833eb1331938f980cd | // { dg-do run }
typedef __PTRDIFF_TYPE__ ptrdiff_t;
extern "C" void abort ();
template <typename T>
class I
{
public:
typedef ptrdiff_t difference_type;
I ();
~I ();
I (T *);
I (const I &);
T &operator * ();
T *operator -> ();
T &operator [] (const difference_type &) const;
I &operator = (const I &... |
google | android | simd-3 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/simd-3.C | 3,089 | utf_8 | 98c079c9ed871281f72c473c7bde704a | // { dg-do run }
// { dg-options "-O2" }
// { dg-additional-options "-msse2" { target sse2_runtime } }
// { dg-additional-options "-mavx" { target avx_runtime } }
extern "C" void abort ();
int a[1024] __attribute__((aligned (32))) = { 1 };
int b[1024] __attribute__((aligned (32))) = { 1 };
unsigned char c[1024] __attr... |
google | android | cancel-sections-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/cancel-sections-1.C | 600 | utf_8 | 9874d2651f8d264ffe5215b9ac3a9a67 | // { dg-do run }
// { dg-set-target-env-var OMP_CANCELLATION "true" }
#include <omp.h>
#include "cancel-test.h"
int
main ()
{
if (!omp_get_cancellation ())
return 0;
#pragma omp parallel num_threads (32)
{
S a;
#pragma omp sections
{
{
S b;
#pragma omp cancel sections
abort ();
}
... |
google | android | copyin-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/copyin-1.C | 515 | utf_8 | f1e175a4d49888d51652b27c0e3c8c01 | // { dg-do run }
// { dg-require-effective-target tls_runtime }
#include <omp.h>
extern "C" void abort (void);
int thr = 32;
#pragma omp threadprivate (thr)
int
main (void)
{
int l = 0;
omp_set_dynamic (0);
omp_set_num_threads (6);
#pragma omp parallel copyin (thr) reduction (||:l)
{
l = thr != 32;
... |
google | android | loop-7 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/loop-7.C | 276 | utf_8 | dfcc405ebd10d6186baef55d22ddcf08 | // PR c++/24502
// { dg-do run }
extern "C" void abort ();
template <typename T> T
foo (T r)
{
T i;
#pragma omp for
for (i = 0; i < 10; i++)
r += i;
return r;
}
int
main ()
{
if (foo (0) != 10 * 9 / 2 || foo (2L) != 10L * 9 / 2 + 2)
abort ();
return 0;
}
|
google | android | single-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/single-1.C | 183 | utf_8 | 989f18f6eb61c820627dc227d206e00d | extern "C" void abort (void);
main()
{
int i = 0;
#pragma omp parallel shared (i)
{
#pragma omp single
{
i++;
}
}
if (i != 1)
abort ();
return 0;
}
|
google | android | loop-4 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/loop-4.C | 347 | utf_8 | 59398898638181cfa7e418afc26a6c23 | extern "C" void abort (void);
main()
{
int i, a;
a = 30;
#pragma omp parallel for firstprivate (a) lastprivate (a) \
num_threads (2) schedule(static)
for (i = 0; i < 10; i++)
a = a + i;
/* The thread that owns the last iteration will have computed
30 + 5 + 6 + 7 + 8 + 9 = 65. */
if (a != 65)
... |
google | android | loop-11 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/loop-11.C | 7,937 | utf_8 | 7d8d309be88fba3f64b8a8a60b8ed182 | #include <omp.h>
#include <stdlib.h>
#include <string.h>
int
test1 ()
{
short int buf[64], *p;
int i;
memset (buf, '\0', sizeof (buf));
#pragma omp parallel for
for (p = &buf[10]; &buf[54] > p; p++)
*p = 5;
for (i = 0; i < 64; i++)
if (buf[i] != 5 * (i >= 10 && i < 54))
abort ();
memset (buf,... |
google | android | task-4 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/task-4.C | 615 | utf_8 | 0d8cf66e014b36ac1b99ff0ada601105 | #include <omp.h>
extern "C" void *memset (void *, int, __SIZE_TYPE__);
extern "C" void abort (void);
int e;
void
baz (int i, int *p, int j, int *q)
{
if (p[0] != 1 || p[i] != 3 || q[0] != 2 || q[j] != 4)
#pragma omp atomic
e++;
}
void
foo (int i, int j)
{
int p[i + 1];
int q[j + 1];
memset (p, 0, s... |
google | android | atomic-3 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/atomic-3.C | 1,097 | utf_8 | ed304e6a8199d4a60a7bb4acd1a4f4fc | // { dg-do run }
extern "C" void abort (void);
bool v, x1, x2, x3, x4, x5, x6;
void
foo ()
{
#pragma omp atomic capture
v = ++x1;
if (!v)
abort ();
#pragma omp atomic capture
v = x2++;
if (v)
abort ();
#pragma omp atomic read
v = x3;
if (!v)
abort ();
#pragma omp atomic read
v = x4;
... |
google | android | simd10 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/simd10.C | 198 | utf_8 | efbd2e4864876ba2f991a788cf935827 | // { dg-do run }
// { dg-options "-O2" }
// { dg-additional-options "-msse2" { target sse2_runtime } }
// { dg-additional-options "-mavx" { target avx_runtime } }
#include "../libgomp.c/simd-14.c"
|
google | android | task-7 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/task-7.C | 203 | utf_8 | e58d1f21c043b7905dfd8072efa52a05 | // PR c++/36523
// { dg-do run }
template<typename T>
struct A
{
A() { }
A(const A&) { }
void foo() { }
};
int main()
{
A<int> a;
#pragma omp task firstprivate (a)
a.foo();
return 0;
}
|
google | android | udr-9 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-9.C | 50 | utf_8 | f8306bcde3b73b14f3e4d12cc73d9544 | // { dg-do run }
#include "../libgomp.c/udr-1.c"
|
google | android | pr34513 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/pr34513.C | 396 | utf_8 | a41af349d54ba08799297bcd040e9521 | // PR c++/34513
// { dg-do run }
#include <omp.h>
extern "C" void abort ();
static int errors = 0;
static int thrs = 4;
int
main ()
{
omp_set_dynamic (0);
#pragma omp parallel num_threads (thrs)
{
static int shrd = 0;
#pragma omp atomic
shrd += 1;
#pragma omp barrier
if (shrd != thrs... |
google | android | atomic-10 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/atomic-10.C | 1,862 | utf_8 | 75d6941396142273d25d6693d7556616 | // { dg-do run }
extern "C" void abort (void);
int x = 6;
int
main ()
{
int v, l = 2, s = 1;
#pragma omp atomic
x = -3 + x;
#pragma omp atomic read
v = x;
if (v != 3)
abort ();
#pragma omp atomic update
x = 3 * 2 * 1 + x;
#pragma omp atomic read
v = x;
if (v != 9)
abort ();
#pr... |
google | android | udr-15 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-15.C | 77 | utf_8 | e6c39b4d66d93f876e859e474b722c81 | // { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-5.C"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.