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 | mangle34 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle34.C | 932 | utf_8 | 98d74115f2d27834eff6022eecd4d051 | // Origin PR c++/40808
// { dg-do compile }
// This tests the mangling of empty template argument list in a template
// id.
// { dg-final {scan-assembler "_ZNK5DummyclI3GenEENT_3SigIE10ResultTypeERKS2_" } }
struct Void {};
template <class R> struct FunType {
typedef R ResultType;
};
struct WrongNumberOfSigArgs {};
te... |
google | chromium | arm_rtti1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/arm_rtti1.C | 375 | utf_8 | 1f9e050ee7f8c952e5a9e739fdf898c6 | // { dg-do compile { target arm*-*-eabi* arm*-*-symbianelf* } }
// { dg-options "-O2" }
// Check that, even when optimizing, we emit an out-of-line call to
// the type-info comparison function.
// { dg-final { scan-assembler _ZNKSt9type_infoeqERKS_ } }
#include <typeinfo>
extern const std::type_info& t1;
extern cons... |
google | chromium | bitfield1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/bitfield1.C | 618 | utf_8 | dfa3e514ddbfea694774f9c287f40215 | // { dg-do run }
// { dg-options "-ansi -pedantic-errors -funsigned-bitfields" }
typedef int Int;
typedef signed int SInt;
typedef unsigned int UInt;
struct A
{
SInt bitS : 1; // signed
UInt bitU : 1; // unsigned
Int bit : 1; // signedness by -f{signed,unsigned}-bitfields
};
int main ()
{
A a;
a.bitS = 1; //... |
google | chromium | pr39188-1a | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/pr39188-1a.C | 160 | utf_8 | 0b334e68ad96b9b585797769690bad26 | // PR c++/39188
// { dg-do run }
// { dg-options "-O2" }
// { dg-additional-sources "pr39188-1b.C" }
#include "pr39188-1.h"
int
x (int i)
{
return f (i);
}
|
google | chromium | dtor1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/dtor1.C | 380 | utf_8 | 9b5fe1eda32f4e6ddea3106ea8d9f1da | // { dg-do compile { target i?86-*-* x86_64-*-* } }
// { dg-require-effective-target ilp32 }
// { dg-options "-fabi-version=0" }
struct A {
virtual void a ();
};
struct B {
virtual ~B ();
};
struct C : public A, public B {
virtual void c ();
};
struct D : virtual public C {
virtual void d ();
};
void D::d ... |
google | chromium | vbase8-21 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/vbase8-21.C | 1,136 | utf_8 | 4e52fadd0c4d30bc4065944636aef4b2 | // { dg-options -w }
// { dg-do run }
// Bug 3145 case 10. Horribly complicated class hierarchy
class C0
{};
class C1
: virtual public C0
{};
class C2
: virtual public C1
, virtual public C0
{};
class C3
: virtual public C2
, virtual public C1
{};
class C4
: virtual public C2
, public C0
, public C1
{};... |
google | chromium | pr39188-3a | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/pr39188-3a.C | 160 | utf_8 | afd0ff2e30705970415e4aa6ca6e1468 | // PR c++/39188
// { dg-do run }
// { dg-options "-O2" }
// { dg-additional-sources "pr39188-3b.C" }
#include "pr39188-3.h"
int
x (int i)
{
return f (i);
}
|
google | chromium | empty10 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/empty10.C | 368 | utf_8 | 9d59f34907d1d9588084fc4da7772c02 | // { dg-do run { target i?86-*-* x86_64-*-* } }
// { dg-require-effective-target ilp32 }
// { dg-options "-fabi-version=0 -w" }
struct E {};
struct E2 : public E {};
struct A {
int i;
};
struct B {
int j;
};
struct C :
public E,
public A,
public E2,
virtual public B {
};
C c;
int main () {
if (((... |
google | chromium | mangle30 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle30.C | 363 | utf_8 | 8e5a5b931b1491b101190dc53cb5bf77 | // Test for mangling of template args in a typename type.
struct A
{
template <class T>
struct B
{
typedef T myT;
};
};
struct C {};
template <class T>
void f (T t, typename T::template B<C>::myT u, typename T::template B<int>::myT v);
int main()
{
f (A(), C(), 1);
}
// { dg-final { scan-assembler "_... |
google | chromium | dtor2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/dtor2.C | 216 | utf_8 | a52edd14facd7ba603f78fb8bad62852 | // { dg-do compile }
// { dg-options "-Wabi -fabi-version=1" }
struct A {
virtual void a ();
};
struct B {
virtual ~B ();
};
struct C : public A, public B { // { dg-warning "virtual" }
virtual void c ();
};
|
google | chromium | pr39188-1b | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/pr39188-1b.C | 168 | utf_8 | c96cb62975d4855a114a03ac254e17ce | #include "pr39188-1.h"
extern "C" void abort ();
extern int x (int);
int
main (void)
{
if (x (1) != 0)
abort ();
if (f (1) != 1)
abort ();
return 0;
}
|
google | chromium | mangle31 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle31.C | 297 | utf_8 | 13633dcf96cb50988a92cf548dff31cb | // PR c++/39095
// { dg-do compile }
struct B
{
int b;
};
struct A
{
B *operator->();
A ();
B b;
};
A::A ()
{
}
B *
A::operator->()
{
return &b;
}
A a;
int
foo ()
{
return a->b;
}
// { dg-final { scan-assembler "_ZN1AptEv" } }
// { dg-final { scan-assembler-not "_ZN1AdtEv" } }
|
google | chromium | mangle22 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle22.C | 201 | utf_8 | f27a51ea9de5c032fc80016778dbe5ec | // PR c++/16240
// { dg-options "-fabi-version=3" }
void foo(char);
template<void (&)(char)> struct CB {};
void g(CB<foo> i) {}
// { dg-final { scan-assembler "\n_?_Z1g2CBIL_Z3foocEE\[: \t\n\]" } }
|
google | chromium | bitfield7 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/bitfield7.C | 145 | utf_8 | 52af9e2f39dba23a45c367738de05a69 | // { dg-do compile }
// { dg-options "-Wabi -fabi-version=1" }
union U { // { dg-warning "ABI" }
int i: 4096; // { dg-warning "exceeds" }
};
|
google | chromium | cookie1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/cookie1.C | 205 | utf_8 | b587f170bbc6f95ef287e408bcafe1e3 | // { dg-options "-fabi-version=0" }
void *operator new[](__SIZE_TYPE__, void *);
struct A {
~A(){}
};
int main()
{
A * a = (A*) new char[20];
A * b = new(a) A[3];
if (a != b)
return 1;
}
|
google | chromium | mangle1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle1.C | 1,057 | utf_8 | 2e043f4f1db73efd7ba04afe8375a72e | // Test for mangling of simple testcase involving construction vtables.
// { dg-do compile }
// { dg-options "-fno-inline" }
struct A {
virtual void f () { }
};
struct B: public virtual A { };
struct C: public B { };
C c;
// { dg-final { scan-assembler "\n_?_ZN1A1fEv\[: \t\n\]" } }
// { dg-final { scan-assembler... |
google | chromium | rtti1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/rtti1.C | 226 | utf_8 | d90943e976dded1f4182aeb500d1f2c7 | // Test that we don't emit the type_info for a polymorphic class other than
// with the vtable.
struct A {
virtual ~A();
};
void f ()
{
throw A();
}
// { dg-final { scan-assembler-dem-not {\ntypeinfo for A[: \t\n]} } }
|
google | chromium | thunk1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/thunk1.C | 399 | utf_8 | 0a188cd301551f22c8ddc09030b2eb28 | // { dg-do compile { target i?86-*-* x86_64-*-* } }
// { dg-require-effective-target ilp32 }
struct A {
virtual void f ();
};
struct B : public virtual A {
virtual void f ();
};
struct C {
virtual void g ();
};
struct D : public C, public B {
virtual void f ();
};
void D::f () {}
// { dg-final { scan-ass... |
google | chromium | param2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/param2.C | 208 | utf_8 | afc405c144dbb0308035897270d134fe | // PR target/20795
// Test passing aligned empty aggregate
// { dg-do compile }
struct S { union {} a; } __attribute__((aligned));
S
foo (S arg)
{
return arg;
}
void
bar (void)
{
S arg;
foo (arg);
}
|
google | chromium | mangle27 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle27.C | 380 | utf_8 | d3b8c2dcc1a0c5ff234fb977a0abc283 | // Test of std::basic_iostream<char, std::char_traits<char> > mangling
// { dg-do compile }
// { dg-options "-fno-inline" }
namespace std {
template<typename> struct char_traits;
template<typename, typename> struct basic_iostream { basic_iostream(){} };
}
std::basic_iostream<char,std::char_traits<char> > s1;
/... |
google | chromium | mangle24 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle24.C | 660 | utf_8 | 7706c83724dcb01347cfc38561b3bafc | // Test mangling of __float80.
// The C++ ABI document says __float80 is mangled as "e". It
// also says that "long double" is mangled as "e", so these conflict on
// ia64-hpux where "long double" is "e" and __float80 is "u9__float80".
// { dg-do compile { target i?86-*-* x86_64-*-* ia64-*-* } } */
// { dg-options "" ... |
google | chromium | covariant2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/covariant2.C | 478 | utf_8 | dad843e79ded2bf5c0fd0c65f41b64f8 | // { dg-do compile }
// PR c++/12881. ICE in thunk generation
struct c1 {};
struct c3 : virtual c1
{
virtual c1* f6() {}
int i;
};
struct c6 : virtual c3 { };
struct c7 : c3
{
virtual c3* f6() {}
};
struct c24 : virtual c7
{
virtual c6* f6();
};
c6* c24::f6() { return 0; }
struct c31 : c24 {}; |
google | chromium | bitfield6 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/bitfield6.C | 207 | utf_8 | 9c87e70c80da00c75493118cabefc7f7 | // { dg-do run }
// { dg-options "-w -fabi-version=0" }
#include <limits>
union U {
int i: 4096;
};
int main () {
if (sizeof (U) * std::numeric_limits<unsigned char>::digits != 4096)
return 1;
}
|
google | chromium | macro0 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/macro0.C | 122 | utf_8 | 47b1f29300530040f4c65e1acb36904a | // { dg-options "-fabi-version=0" }
#if __GXX_ABI_VERSION != 999999
#error "Incorrect value of __GXX_ABI_VERSION"
#endif
|
google | chromium | bitfield2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/bitfield2.C | 647 | utf_8 | 5e02907f2e56c04ec78ba7b8ce16b583 | // { dg-do run }
// { dg-options "-ansi -pedantic-errors -fsigned-bitfields" }
typedef int Int;
typedef signed int SInt;
typedef unsigned int UInt;
struct A
{
SInt bitS : 1; // signed
UInt bitU : 1; // unsigned
Int bit : 1; // signedness by -f{signed,unsigned}-bitfields
};
int main ()
{
A a;
a.bitS = 1; // {... |
google | chromium | arm_cxa_vec2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/arm_cxa_vec2.C | 920 | utf_8 | cb4ad686f7564a8666256212398d911d | // Check that ARM vector delete functions accept NULL pointers as
// inputs.
// { dg-do run { target arm*-*-* } }
#ifdef __ARM_EABI__
#include <cxxabi.h>
typedef void *(dtor_type)(void *);
extern "C" {
void abort();
void *__aeabi_vec_dtor_cookie(void *, dtor_type);
void __aeabi_vec_delete(void *, dtor_type);
... |
google | chromium | mangle-neon | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle-neon.C | 1,928 | utf_8 | 5b9ca747db2c1aee0fdafa1b71b9b2aa | // Test that ARM NEON vector types have their names mangled correctly.
// { dg-do compile }
// { dg-require-effective-target arm_neon_ok }
// { dg-options "-mfpu=neon -mfloat-abi=softfp" }
#include <arm_neon.h>
void f0 (int8x8_t a) {}
void f1 (int16x4_t a) {}
void f2 (int32x2_t a) {}
void f3 (uint8x8_t a) {}
void f... |
google | chromium | mangle20-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle20-2.C | 565 | utf_8 | 58664c1f709ce0a53e36f82e21474535 | // { dg-do compile }
// { dg-options "-fabi-version=1 -Wabi" }
// PR 9043
// mangled array types in templates
template <int I> void f(int (*)[2]) {} // { dg-warning "mangled name" }
template <int I> void g(int (*)[I+2]) {}
template void f<1>(int (*)[2]);
// { dg-final { scan-assembler "\n_?_Z1fILi1EEvPALi2E_i\[: \t\... |
google | chromium | vtt1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/vtt1.C | 119 | utf_8 | 59cdef1c2f5ac26231205b723cb9ea52 | // { dg-do compile }
struct A {
};
struct B : virtual public A {
};
B b;
// { dg-final { scan-assembler _ZTT1B } }
|
google | chromium | empty9 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/empty9.C | 326 | utf_8 | bbab6b1f77eed09d3a2c4f07991cdb40 | // { dg-do run { target i?86-*-* x86_64-*-* } }
// { dg-require-effective-target ilp32 }
// { dg-options "-w -fabi-version=0" }
struct E1 {};
struct E2 : public E1 {
virtual void f ();
};
struct E3 : virtual public E1 {
};
struct S : public E2, virtual public E3 {
};
int main () {
if (sizeof (S) != 12)
return... |
google | chromium | enum1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/enum1.C | 225 | utf_8 | 7cbe4b1023b73117f1fca798569bc98d | // { dg-do run }
#include <cstdlib>
enum foo
{
foo1 = 0,
foo2 = 0xffffffffffffffffULL,
foo3 = 0xf0fffffffffffffeULL
};
int main ()
{
if (sizeof (enum foo) != sizeof (unsigned long long))
std::abort ();
}
|
google | chromium | empty8 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/empty8.C | 225 | utf_8 | c5566cc05c36a22382128eb694f66bc5 | // { dg-do run }
// { dg-options "-fabi-version=0" }
struct E1 {};
struct E2 : public E1 {};
struct S1 { int i; };
struct S2 : public S1, E2 {};
S2 s2;
int main () {
if ((char *)(E2*) &s2 != (char *)&s2)
return 1;
}
|
google | chromium | thunk2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/thunk2.C | 498 | utf_8 | 8c08a43b9a6c3a1ec099f45dedd4965e | // { dg-do compile { target i?86-*-* x86_64-*-* } }
// { dg-require-effective-target ilp32 }
// { dg-options -w }
struct A {
virtual void f2 ();
virtual void f3 ();
};
struct B : virtual public A {
virtual void f3 ();
};
struct C : public A, public B {
virtual void f4 ();
};
struct D : virtual public B, vir... |
google | chromium | vbase8-10 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/vbase8-10.C | 1,112 | utf_8 | 5f1a733d38a5e3069cd4160135f2f94e | // { dg-options -w }
// { dg-do run }
// Bug 3145 case 10. Horribly complicated class hierarchy
class C0
{};
class C1
: public C0
{};
class C2
: public C1
, virtual public C0
{};
class C3
: public C1
, public C2
, virtual public C0
{};
class C4
: virtual public C1
, virtual public C0
, virtual public ... |
google | chromium | local1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/local1.C | 268 | utf_8 | 4ab5160617737559c38e1ffb650b797e | // { dg-do run }
// { dg-additional-sources "local1-a.cc" }
#include <typeinfo>
struct B {
virtual void b() {}
};
static B* f() {
struct D : public B {
};
return new D;
}
extern B* g();
int main () {
if (typeid (*f()) == typeid (*g()))
return 1;
}
|
google | chromium | empty7 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/empty7.C | 495 | utf_8 | d3abb8f9307b552b4063b456bfe2f213 | // { dg-do run { target i?86-*-* x86_64-*-* } }
// { dg-require-effective-target ilp32 }
// { dg-options "-fabi-version=0" }
struct S1 {};
struct S2 { virtual void f () {} S1 s1[4]; };
struct S3 : virtual public S2 {};
struct S4 : virtual public S2 { int i; };
struct S5 : public S3, virtual public S4 {};
struct S6 { S... |
google | chromium | vbase8-22 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/vbase8-22.C | 1,222 | utf_8 | cf73a61c2f7a372a6e32d4bbc343cd44 | // { dg-options -w }
// { dg-do run }
// Bug 3145 case 22. Horribly complicated class hierarchy
class C0
{};
class C1
: public C0
{};
class C2
: public C1
, virtual public C0
{};
class C3
: virtual public C0
, virtual public C2
, virtual public C1
{};
class C4
: virtual public C2
, public C1
, virtual... |
google | chromium | mangle8 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle8.C | 338 | utf_8 | cc6afae4c242d6e5a9083cec1a9a9907 | // Red Hat bugzilla 65035
// Bug: We were encoding the name of the instantiation as 'operator int'
// rather than 'operator T'.
// { dg-do compile }
struct C {
template <class T>
operator T ();
};
template <class T>
C::operator T () { return 0; }
template C::operator int ();
// { dg-final { scan-assembler _... |
google | chromium | mangle19-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle19-1.C | 390 | utf_8 | c987443e1c703fb66f78ea2786ae4cd5 | // { dg-do compile }
// { dg-options "-fabi-version=2" }
// PR 13242
// mangled template arguments that are external objects incorrectly
extern int N;
template <int &> struct S {};
void n (S<N>) {}
// { dg-final { scan-assembler "\n_?_Z1n1SILZ1NEE\[: \t\n\]" } } |
google | chromium | align1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/align1.C | 417 | utf_8 | c7c251f16058a4d4f1db8e0df28385ff | // This was failuring on powerpc-darwin and powerpc-aix as
// we were taking the embeded type as the first field decl.
// This was PR target/18761.
// { dg-do run }
union A {
double d;
};
union B {
enum E { e };
double d;
};
struct AlignA {
char c;
A a;
};
struct AlignB {
char c;
B b;
};
extern "C" vo... |
google | chromium | guard2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/guard2.C | 267 | utf_8 | 3eec2b181cfb238503543d9d81b99eb2 | // PR c++/41611
// Test that the guard gets its own COMDAT group.
// { dg-final { scan-assembler "_ZGVZN1A1fEvE1i,comdat" { target *-*-linux* } } }
struct A {
static int f()
{
static int &i = *new int();
return i;
}
};
int main()
{
return A::f();
}
|
google | chromium | rtti2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/rtti2.C | 285 | utf_8 | 8deae0db66776c34c77f2551c9679b7c | // { dg-do run }
#include <cxxabi.h>
#include <typeinfo>
int main () {
const std::type_info& ti = typeid (const int (*)[3]);
const abi::__pointer_type_info& pti
= static_cast<const abi::__pointer_type_info&>(ti);
if ((pti.__flags & pti.__const_mask) == 0)
return 1;
}
|
google | chromium | vbase10 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/vbase10.C | 703 | utf_8 | e36a8fd36846ca34b500150cfaf2d8fa | // { dg-do compile }
// -fpack-struct is necessary because the code below assumes the initial
// packing is larger than 1, which cannot ge guaranteed for all targets.
// { dg-options "-Wabi -fabi-version=1 -fpack-struct=8" }
// On ARM processors, the alignment of B will be 4 even though it
// contains only a single "ch... |
google | chromium | pr40492 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr40492.C | 719 | utf_8 | 38eb20fb2c768d3f2d8258601e427a27 | typedef unsigned short ushort;
class QChar {
public:
QChar( const QChar& c );
ushort ucs;
};
inline QChar::QChar( const QChar& c ) : ucs( c.ucs ) { };
class QString { };
class KoAutoFormat {
public:
struct TypographicQuotes { QChar begin, end; };
TypographicQuotes getConfigTypographicDoubleQuotes() ... |
google | chromium | pr33887-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr33887-2.C | 301 | utf_8 | ac9b9ea255f72e7339eeaf103a832da5 | /* { dg-do run } */
extern "C" void abort() __attribute__ ((noreturn));
struct s
{
unsigned long long f1 : 40;
unsigned int f2 : 24;
} sv;
int main()
{
int f2;
sv.f2 = (1 << 24) - 1;
__asm__ volatile ("" : : : "memory");
++sv.f2;
f2 = sv.f2;
if (f2 != 0)
abort();
return 0;
}
|
google | chromium | pr31081-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr31081-1.C | 314 | utf_8 | ff110b3c564473b839e08fc2d962f439 | /* { dg-do compile } */
static int get_record (void);
void f(void);
int g(void);
static int get_record (void)
{
int result;
try
{
result = g();
f();
}
catch (const int &) { }
return result;
}
int NAV_get_record ( )
{
int result;
for (;;)
if (get_record ())
return 1;
}
|
google | chromium | pr34235 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr34235.C | 203 | utf_8 | a236f1d6b976dcdc6d96e37d197d8bba | /* { dg-do run } */
extern "C" void abort (void);
int main()
{
short x = -1;
unsigned int c = ((unsigned int)x) >> 1;
if (c != 0x7fffffff)
abort();
return 0;
}
|
google | chromium | pr33572 | .C | native_client/nacl-gcc/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 | chromium | pr42183 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr42183.C | 1,586 | utf_8 | 2a7843fc7360185d8c597e00ef02ddcb | // { dg-do compile }
class IntSize {
public:
IntSize(int width, int height) : m_width(width), m_height(height) { }
int m_width, m_height;
};
class IntPoint {
public:
IntPoint(int x, int y) : m_x(x), m_y(y) { }
int m_x, m_y;
};
class IntRect {
public:
IntRect(int x, int y, int width, int height)
... |
google | chromium | pr34241 | .C | native_client/nacl-gcc/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 | chromium | pr40335 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr40335.C | 238 | utf_8 | a7f9b10c8589802dfa8f02f013c7ac2e | /* { dg-do run } */
extern "C" void abort (void);
int
main (void)
{
int i = -1;
switch ((signed char) i)
{
case 255: /* { dg-bogus "exceeds maximum value" "" { xfail *-*-* } } */
abort ();
default:
break;
}
}
|
google | chromium | pr42773 | .C | native_client/nacl-gcc/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 | chromium | pr34850 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr34850.C | 1,920 | utf_8 | 666acf15eb48620b3f7069782879bf3a | /* { dg-do compile } */
/* { dg-options "-O2" } */
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_len (void) __attribute__((__warning__ ("")));
extern __inline _... |
google | chromium | pr35526 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr35526.C | 407 | utf_8 | f0828251cc6bd9dc4a1cc272f8b3d558 | /* { dg-do compile } */
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;
void
gSignalHandler (int psignalNr, int pinfo, int pctx)
{
memcpy (u_... |
google | chromium | pr37345 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr37345.C | 2,211 | utf_8 | 812d6862a7c6ee4d0b3f6e68a439d3af | /* { dg-do compile } */
class EbmlElement {
virtual EbmlElement * Clone() const; ... |
google | chromium | pr41273 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr41273.C | 348 | utf_8 | 9f12519b907a84c635fb7ea8fb8fa7ba | /* { dg-do compile } */
/* { dg-options "-g" } */
long *H2_ipX_ener_sort;
double H2_old_populations[2];
double H2_total;
void H2_LevelPops()
{
double sum_pop = 0.;
long nEner = 0;
while( nEner < 3 && sum_pop/H2_total < 0.99999 )
{
long ip = H2_ipX_ener_sort[nEner];
sum_pop += H2_old_populations[... |
google | chromium | pr31081-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr31081-2.C | 818 | utf_8 | 9fd72fc7657b473f879f5e1dc5b4f59f | /* { dg-do compile } */
class CString
{
public:
CString();
~CString() { operator delete(_rep); }
operator const char*() const { return _rep; }
private:
CString(char* cstr);
char* _rep;
};
class String
{
public:
String();
String(const char* str);
~String();
CString getCString() con... |
google | chromium | pr37456 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr37456.C | 181 | utf_8 | ddcb713d149db91f8154d95a295da33d | /* { dg-do compile } */
int zot(int);
struct bar {
~bar() { }
};
int x;
void doit(int a, int b, int c)
{
bar pn;
int b1 = zot(a) * c;
int b2 = zot(b) * c;
x = b1 + b2;
}
|
google | chromium | predcom-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/predcom-1.C | 422 | utf_8 | 9832be91178ec7c78651fc4d49380a93 | /* Test for ICE in predictive commoning with empty loop header block
on arm-none-linux-gnueabi. */
struct Foo
{
double *ptr;
Foo (double *ptr_)
: ptr (ptr_)
{
}
Foo PostInc ()
{
return Foo (ptr++);
}
};
bool Baz (Foo first, double *last)
{
Foo prev (first.ptr);
first.ptr++;
w... |
google | chromium | pr37421 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr37421.C | 490 | utf_8 | b9e867af0146342c37d2ac67626d327e | /* { dg-do compile } */
#include <stdio.h>
#include <string.h>
inline int
bci (const float &source)
{
int dest;
memcpy (&dest, &source, sizeof (dest));
return dest;
}
inline float
bcf (const int &source)
{
float dest;
memcpy (&dest, &source, sizeof (dest));
return dest;
}
float
Foo ()
{
const int foo = bci (... |
google | chromium | pr36444 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr36444.C | 462 | utf_8 | eb60a71e0db6ada6e100a6a8705a053f | /* { dg-do compile } */
#define vector __attribute__((vector_size(16) ))
struct struct1 {
union {} vmx;
struct struct2 {
struct2(const struct2& r) {}
} w;
} __attribute__((aligned(16)));
struct struct3 {
vector float vmx;
operator const struct1& () const{
return *reinterpret_cast<const struct1*... |
google | chromium | pr33134 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr33134.C | 410 | utf_8 | a290e0d99d5d90235194f3576ea12cbe | /* { dg-do compile } */
/* { dg-options "-O2" } */
class FXObject;
class FXStream
{
public:FXStream (const FXObject *cont = __null);
FXStream & operator<< (const unsigned char &v);
};
bool fxsaveGIF (FXStream &store)
{
int bitsperpixel;
unsigned char c1;
c1 = 0x80;
c1 |= (bitsperpixel - 1) << 4;
store << ... |
google | chromium | pr32563 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr32563.C | 107 | utf_8 | e9780c172c681062c7a2b35fc6317156 | /* { dg-do compile } */
struct A
{
char c[1];
} a;
const __SIZE_TYPE__ i = (__SIZE_TYPE__)&a.c[0] - 1;
|
google | chromium | pr34641 | .C | native_client/nacl-gcc/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 | chromium | pr40924 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr40924.C | 2,319 | utf_8 | fa014de9d87f4833c5c4020ce1b29d2f | // PR rtl-optimization/40924
// { dg-do run }
extern "C" void abort (void);
#define MAY_ALIAS __attribute__((__may_alias__))
typedef struct { float v[2]; } floata;
typedef struct { int v[2]; } inta;
typedef unsigned int uint MAY_ALIAS;
typedef signed int sint MAY_ALIAS;
typedef float flt MAY_ALIAS;
static inline u... |
google | chromium | pr40321 | .C | native_client/nacl-gcc/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 | chromium | ipa-cp-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/ipa-cp-1.C | 451 | utf_8 | 4054dd6c177ca7971902e3ac60e34695 | /* { dg-do compile } */
// With IPA-CP, this caused a problem on darwin, where
// _M_reset is being cloned, it was still being marked
// as weak and then we had to change the calls to the
// newly marked function for the non throwing behavior.
int& f(int&);
inline void _M_reset(int &_M_vbp) throw()
{
f(_M_vbp);
}
... |
google | chromium | pr39764 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr39764.C | 233 | utf_8 | eaa64cc3e3ed3a9b485164b7d1cd003d | /* { dg-do compile } */
class A;
class B { };
extern const double NaN;
B foo(A* exec, double d);
inline B baz(A* a) {
return foo(a, NaN);
}
B bar(A* a) {
return baz(a);
}
extern const double NaN = (__builtin_nanf(""));
|
google | chromium | pr36445 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr36445.C | 605 | utf_8 | c81584eb2adb619c7d464a0ee038fee4 | /* { dg-do compile } */
// This used to fail as we would try to expand a VCE where one side had
// a mode of BLKmode and the other side was a vector mode.
#define vector __attribute__((vector_size(16) ))
struct struct1 {
union { float a[3]; } vmx;
struct struct2 {
struct2(const struct2& r) {}
} w;
} __a... |
google | chromium | pr35164-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr35164-2.C | 605 | utf_8 | d189c1337cd585db66672b0b6d7b9ff3 | struct __shared_count {
__shared_count() { _M_pi = new int; }
int * _M_pi;
};
template<typename _Tp>
class __shared_ptr {
public:
__shared_ptr(_Tp* __p);
void reset(int * __p) {
__shared_ptr(__p).swap(*this);
}
void swap(__shared_ptr<_Tp>& __other) {
__other._M_refcount._M_pi = _... |
google | chromium | 20080625-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/20080625-1.C | 572 | utf_8 | cba46ba0e799162dc4863891ff25ded3 | extern "C" {
typedef unsigned char sal_Bool;
typedef struct _rtl_uString {
} rtl_uString;
void rtl_uString_release( rtl_uString * str ) throw ();
}
class OUString {
rtl_uString * pData;
public:
OUString() {}
~OUString() {
rtl_uString_release( pData );
}
sal_Bool equalsIgnoreAsciiCas... |
google | chromium | pr37343 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr37343.C | 485 | utf_8 | a77a01236fb32add6af8d40930f948c0 | /* { dg-do compile } */
typedef enum RW { rwBitmapGrey, rwBitmapGrey16 } RW;
void FindDepth(RW);
void ParseDumpBitmap(RW kind, int maxfiles)
{
static const RW normalTypes[] = { };
const RW *bitmapTypes;
int i;
switch (kind) {
case rwBitmapGrey:
case rwBitmapGrey16:
bitmapTyp... |
google | chromium | pr39678 | .C | native_client/nacl-gcc/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 | chromium | pr35164-1 | .C | native_client/nacl-gcc/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 | chromium | pr39259 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr39259.C | 576 | utf_8 | f9460d2eec98500885b88a6a391adc63 | // PR tree-optimization/39259
// { dg-do compile }
// { dg-options "-O2" }
extern "C" int __mysetjmp () __attribute__ ((__returns_twice__));
class TContStatus {};
class TContEvent
{
public:
inline void Execute () throw();
};
class TCont
{
public:
TContStatus ReadD (void* buf, int deadline)
{
TContEvent e... |
google | chromium | pr34651 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr34651.C | 599 | utf_8 | b4f36f5dd9e57a473980dae121c14b78 | /* { dg-do compile } */
typedef bool Bool;
struct CString {
CString (const char * =__null);
CString & operator += (const CString &);
};
struct THotKey {
short Key;
Bool Control;
Bool Shift;
Bool Alt;
};
THotKey m_HotKey;
THotKey GetHotKey () { return m_HotKey; }
void Serialize ()
{
THotKey inHot... |
google | chromium | 20070621-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/20070621-1.C | 5,966 | utf_8 | e8a225540788d75a19a3cdf32929234b | /* Reduced from libstdc++-v3/testsuite/25_algorithms/equal/1.cc
1.2.ii: In function 'void test1()':
1.2.ii:104: error: true/false edge after a non-COND_EXPR in bb 15
1.2.ii:104: internal compiler error: verify_flow_info failed
*/
__extension__ typedef __PTRDIFF_TYPE__ ptrdiff_t;
namespace std __attribute__ ((__visib... |
google | chromium | pr40642 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr40642.C | 474 | utf_8 | cc64abdcaba4ecac02a922ed5702c2e2 | // { dg-do compile }
// { dg-options "-fprofile-generate" }
// GCC used to ICE with some EH edge missing.
inline void* operator new(__SIZE_TYPE__, void* p) throw() { return p; }
inline void operator delete (void*, void*) throw() { }
template<typename T> void foo(void* p, T t)
{
new(p) T(t);
}
void bar();
templat... |
google | chromium | pushpop_macro | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pushpop_macro.C | 241 | utf_8 | d28910105d9c9253d94d70eacd5e19d4 | /* Do the preprocessor push_macro/pop_macro test. */
/* { dg-do run } */
extern "C" void abort ();
#define _ 2
#pragma push_macro("_")
#undef _
#define _ 1
#pragma pop_macro("_")
int main ()
{
if (_ != 2)
abort ();
return 0;
}
|
google | chromium | pr40834 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr40834.C | 807 | utf_8 | 91e7beb2ed0c5925d2d5b5b4bf37f40f | /* { dg-do run } */
extern "C" void abort (void);
class XalanDOMString
{
public:
int y;
};
class XObject
{
public:
const XalanDOMString& str() const { return x; }
XalanDOMString x;
};
class XObjectPtr
{
public:
XObjectPtr(const XObjectPtr& theSource)
{
m_xobjectPtr = theSource.m_xobjectPtr;
}
... |
google | chromium | pr41775 | .C | native_client/nacl-gcc/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 | chromium | pr37146-2 | .C | native_client/nacl-gcc/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 | chromium | pr31579 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr31579.C | 294 | utf_8 | e572bcc11c7547b7dc25eb1055bb6ea4 | /* { dg-do compile } */
// middle-end/31579
// Expand was crashing while expanding the tree for the initializer
struct Industry {
unsigned char produced_cargo[2];
};
unsigned int a = (((unsigned long)&reinterpret_cast<const volatile
char&>((((Industry*)(char*)8)->produced_cargo[0]))) - 8);
|
google | chromium | pr32304 | .C | native_client/nacl-gcc/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 | chromium | pr41257 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr41257.C | 182 | utf_8 | b2bf0f9adca2bf600320f6fbc03908cd | /* { dg-do compile } */
struct A
{
virtual void foo();
virtual ~A();
int i;
};
struct B : virtual A {};
struct C : B
{
virtual void foo();
};
void bar()
{
C().foo();
}
|
google | chromium | pr33627 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr33627.C | 1,799 | utf_8 | d031e736766609d70f05c6a22b19ee44 | /* { dg-do compile } */
typedef unsigned int UT_uint32;
typedef UT_uint32 PT_DocPosition;
typedef UT_uint32 PT_BlockOffset;
typedef enum _PTStruxType { PTX_Block } PTStruxType;
typedef UT_uint32 PL_ListenerId;
typedef const void * PL_StruxFmtHandle;
class PX_ChangeRecord;
class pf_Frag {
public:
typedef enum _PFT... |
google | chromium | pr34099 | .C | native_client/nacl-gcc/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 | chromium | pr30252 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr30252.C | 6,369 | utf_8 | a84e9fff95df4801f8e582fbc33303b8 | /* { dg-do run } */
/* { dg-options "-fstrict-aliasing" } */
extern "C" void abort (void);
namespace sigc {
template <class T_type>
struct type_trait
{
typedef T_type& pass;
typedef const T_type& take;
typedef T_type* pointer;
};
template <class T_base, class T_derived>
struct is_base_and_deriv... |
google | chromium | pr38705 | .C | native_client/nacl-gcc/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 | chromium | pr41144 | .C | native_client/nacl-gcc/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 | chromium | pr40460 | .C | native_client/nacl-gcc/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 | chromium | pr39362 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr39362.C | 2,473 | utf_8 | b34431a13b5558652ebeda9bf86d9416 | /* { dg-do compile } */
void *fastMalloc (int n);
void fastFree (void *p);
template <class T> struct C
{
void deref () { delete static_cast <T *>(this); }
};
template <typename T>
struct D
{
D (T *ptr) : m_ptr (ptr) { }
~D () { if (T * ptr = m_ptr) ptr->deref (); }
T *operator-> () const;
T *m_ptr;
typedef... |
google | chromium | pr40389 | .C | native_client/nacl-gcc/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 | chromium | pr39713 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr39713.C | 360 | utf_8 | d85efea6bf5e227cbfe01031a191490d | /* { dg-do compile } */
template <typename To, typename From>
static inline To
bitwise_cast (From from)
{
union
{
From f;
To t;
} u;
u.f = from;
return u.t;
}
extern void foo (unsigned char *);
double
bar ()
{
unsigned char b[sizeof (unsigned long long)];
foo (b);
return bitwise_cast<... |
google | chromium | str_empty | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/str_empty.C | 268 | utf_8 | 5afe578074ff640a77903318faea8e72 | // PR c++/31617
// Segfault in integer_zerop
// { dg-do compile }
struct polynomial {
~polynomial ();
};
void spline_rep1 ()
{
new polynomial[0]; // { dg-bogus "allocating zero-element array" }
} |
google | chromium | pr42357 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr42357.C | 639 | utf_8 | b10e8543fb804e02bf658bba9b63a306 | // { dg-do compile }
typedef unsigned char uint8;
typedef unsigned int uint32;
class PixelARGB {
public:
~PixelARGB() throw() { }
PixelARGB (const uint32 argb_) throw() : argb (argb_) { }
inline __attribute__((always_inline)) uint8 getRed() const throw() {
return components.r;
}
union {
ui... |
google | chromium | pr38565 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/pr38565.C | 360 | utf_8 | f532ea52badae9bec7e18063e926083e | // { dg-do compile }
// Ignore warning on some powerpc-linux configurations.
// { dg-prune-output "non-standard ABI extension" }
#define vector __attribute__((vector_size(16) ))
vector unsigned int f(int a)
{
vector unsigned int mask = a ? (vector unsigned int){ 0x80000000, 0x80000000,
0x80000000, 0x80000000 } : (vec... |
google | chromium | pr33819 | .C | native_client/nacl-gcc/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 | chromium | type-generic-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/torture/type-generic-1.C | 316 | utf_8 | e308462ebc3dc0718769f21a6bb40678 | /* Do the type-generic tests. Unlike pr28796-2.c, we test these
without any fast-math flags. */
/* { dg-do run } */
/* { dg-options "-mieee" { target alpha*-*-* sh*-*-* } } */
/* { dg-skip-if "No Inf/NaN support" { spu-*-* } } */
#include "../../gcc.dg/tg-tests.h"
int main(void)
{
return main_tests ();
}
|
google | chromium | pr41680 | .C | native_client/nacl-gcc/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);
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.