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
sizeof2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/sizeof2.C
773
utf_8
1714277b99f69dbeee24b2fdf5626d32
// { dg-do compile } // Contributed by Wolfgang Bangerth <bangerth at ticam dot utexas dot edu> // PR c++/9259: Allow non-qualified member calls in sizeof expressions. template <bool> struct StaticAssert; template <> struct StaticAssert<true> {}; struct S { static int check (); static double check2 (); static ...
google
chromium
lval4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/lval4.C
67
utf_8
5c18be9f015e2213b97193f9d20079c7
// ++i is always an lvalue void f() { bool i = 0; ++i = 3; }
google
chromium
bitfield7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/bitfield7.C
94
utf_8
d7b50316002a163842608f185be9c7a2
// PR c++/31273 enum E { e }; struct S { E v:5; }; S s; int main() { if (!s.v) return 0; }
google
chromium
cast3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/cast3.C
287
utf_8
43b3f0cf8dc0665f8a82af5379392da1
// { dg-do compile } enum MyState { QUIT = 0, START, STOP, PAUSE }; double GetDouble() { return 1.0; } int main() { MyState the_state; the_state = (MyState)GetDouble(); // { dg-bogus "invalid cast" } return 0; }
google
chromium
cast10
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/cast10.C
224
utf_8
234b04abbf4ba798c38bda66394b82a7
// { dg-do compile } // This used to error out because we would try to convert m to a short. struct a {}; void b() { int a::*m; a *c; }
google
chromium
assign1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/assign1.C
648
utf_8
39cb0859475193884781cf1fe587c70e
// { dg-do run } // PR c++/13387. Clobbered tail padding of base inline void *operator new (__SIZE_TYPE__, void *ptr) { return ptr; } struct Base { Base() : i(0), c(0) {} int i; char c; }; struct Sub : Base { Sub () : d(0) {} char d; }; int main() { Sub sub; char base_alias[size...
google
chromium
call2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/call2.C
312
utf_8
11d589082fe10f4614aafaae41200569
// { dg-do compile } // PR c++/12184. ICE class C; class D; bool mm(D); void g(C& f) { mm(f); // { dg-error "parameter" "" } }
google
chromium
ptrmem1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/ptrmem1.C
537
utf_8
d108472b30fd8a2ccb535bb57ff25d0a
// { dg-do compile } // PR 11766. ICE template<typename T> struct normal_iterator { normal_iterator(const T& __i); }; template<typename _Tp> struct vector { void end() const { normal_iterator<const _Tp*> (this->pt); } void size() const { end(); } _Tp* pt; }; struct MuonTag { typedef void (MuonTag::*Select...
google
chromium
ptrmem6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/ptrmem6.C
188
utf_8
39041dce87ae406151a5cca310cd2ce4
// PR C++/21614 // { dg-additional-sources "ptrmem6a.C" } // { dg-do run } extern struct Z *p; extern int (Z::*m) (); int main () { if ((p->*m)() == 7) return 0; return 1; }
google
chromium
dtor4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/dtor4.C
89
utf_8
96485302525dddaf878ba9c9bd2027a5
typedef int C; typedef double D; void f () { C o; o.D::~C (); // { dg-error "" } }
google
chromium
anew3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/anew3.C
545
utf_8
88cfba5bf8bdd95998bb48be16446076
// { dg-do run } // PR 11228: array operator new, with zero-initialization and a variable sized array. // Regression test for PR #include <new> #include <stdlib.h> #include <string.h> struct X { int a; double b; }; X* allocate(int n) { void *p; p = malloc(n * sizeof (X)); memset (p, 0xff, n * sizeof(X)); r...
google
chromium
bitfield6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/bitfield6.C
82
utf_8
fd46219c0040c2b4569b36afd840025b
// PR c++/30274 struct S { bool x : 4; }; S s; void f() { ++s.x = false; }
google
chromium
pr29066
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/pr29066.C
451
utf_8
60bb03281297f707f9874467907ac6cf
// PR c++/29066 // Test pointer to member function comparison // { dg-do run } extern "C" void abort (void); struct X { virtual void a(void)=0; }; struct Z : public X { void a(void) {} }; void f(X *obj) { void (X::*xp)(void) = 0; void (X::*xp2)(void) = 0; xp = &X::a; if (xp == xp2) { abort(...
google
chromium
bitfield2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/bitfield2.C
136
utf_8
38db662a9b8573d4e2269a76f0f370f9
// PR c++/27979 class Ast { enum AstKind { }; const AstKind kind : 8; void foo(AstKind k) { } void bar(void) { foo(kind); } };
google
chromium
enum1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/enum1.C
126
utf_8
fd680877ab1cfa7b118501bb1e133e2a
// { dg-do run } extern "C" void abort(); int main() { enum { shelf = 4 } t = shelf; if (!(t & shelf)) abort (); }
google
chromium
static_cast6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/static_cast6.C
260
utf_8
b908cbd89626f67c64bd034d95994258
// PR c++/21853 struct blah { int a; }; int main( int argc, char ** argv ) { int blah::* ptdma = &blah::a; const void *ptdmv = static_cast< void * >( &ptdma ); int blah::* const ptdmb = * static_cast< int blah::* const * >( ptdmv ); return 0; }
google
chromium
comma1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/comma1.C
286
utf_8
0bfd27616952c8ba004102d8eaa6d65c
// { dg-do run } extern "C" void abort (); struct gtst { unsigned char data[2]; }; static struct gtst s; int main(int argc, char *argv[]) { unsigned char * pc; struct gtst * ps; ps = &s; pc = (ps->data[0]='A', ps->data); if (&s.data[0] != pc) abort(); return 0; }
google
chromium
static_cast1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/static_cast1.C
62
utf_8
89139f7a57a0c8dd7c105624b328d423
void foo(int x) { static_cast<const unsigned int&>(x); }
google
chromium
lval3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/lval3.C
85
utf_8
73d538ed393311f1cc1a3918a0194983
// i++ is never an lvalue void f() { bool i = 0; i++ = 3; // { dg-error "" } }
google
chromium
ptrmem6a
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/ptrmem6a.C
104
utf_8
014c6e35722352b75d65d090cb999dd7
struct Z { int f(); }; int Z::f() { return 7; } struct Z z; int (Z::*m)() = &Z::f; struct Z*p = &z;
google
chromium
lval1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/expr/lval1.C
110
utf_8
e9c430238d4efd57c1f944c12443406d
void f () { int n; (char) n = 1; // { dg-error "" } }
google
chromium
mangle23
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle23.C
200
utf_8
ae32a28f733f8cea6995e7bf6120d7ce
// PR c++/16240 // { dg-options "-fabi-version=2" } void foo(char); template<void (&)(char)> struct CB {}; void g(CB<foo> i) {} // { dg-final { scan-assembler "\n_?_Z1g2CBILZ3foocEE\[: \t\n\]" } }
google
chromium
mangle21
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle21.C
268
utf_8
19d5bab4f182e97a38690a5ff4541700
// PR c++/14324 // { dg-do assemble } extern "C" { void fun1(void) { do { static int xyz __attribute__((unused)) = 1; } while (0); do { static int xyz __attribute__((unused)) = 2; } while (0); do { static int xyz __attribute__((unused)) = 3; } while (0); } }
google
chromium
thunk3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/thunk3.C
425
utf_8
64d1aa038d30ffe9d535aa3f5ea90c51
// { dg-require-weak "" } // { dg-final { scan-assembler-not ".weak\[\t \]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* } } } } } // { dg-final { scan-assembler-not ".weak_definition\[\t \]_?_ZThn._N7Derived3FooEv" { target { *-*-darwin* } } } } struct Base { virtual void Foo (); }; struct Filler { virtu...
google
chromium
vthunk3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/vthunk3.C
432
utf_8
6881f6a907aed22e3604db9a81d71753
// { 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 public A { virtual void b (); virtual void a (); }; struct C { virtual void c (); }; struct D : public C, public B { }; struct...
google
chromium
bitfield10
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/bitfield10.C
52
utf_8
9966069a163a3254b4d24ab2f38965c2
// { dg-options "-w" } struct S { int i : 64; };
google
chromium
macro2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/macro2.C
120
utf_8
06f0193b05c4ae743af4e38aec8d1122
// { dg-options "-fabi-version=2" } #if __GXX_ABI_VERSION != 1002 #error "Incorrect value of __GXX_ABI_VERSION" #endif
google
chromium
mangle10
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle10.C
243
utf_8
e284ef1906cd5f1de0a8f3009ac761ff
// { dg-options "-fabi-version=0" } template <template <typename> class Q> void f (typename Q<int>::X) {} template <typename Q> struct S { typedef int X; }; template void f<S> (int); // { dg-final { scan-assembler _Z1fI1SEvNT_IiE1XE } }
google
chromium
mangle26
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle26.C
216
utf_8
d946103cc1268a8d464c04c3ae31af29
// Test of std mangling // { dg-do compile } // { dg-options "-fno-inline" } namespace std { struct A { virtual void f () { } }; } std::A a; // { dg-final { scan-assembler "\n_?_ZNSt1AC1Ev\[: \t\n\]" } }
google
chromium
vbase1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/vbase1.C
685
utf_8
6b15aad70c63bb9bebfefe5096394d41
// { dg-do compile } // Bug 3986. Another indirect primary base problem. struct Consts { }; struct MathLib : virtual Consts { }; struct Parallel : virtual Consts { }; struct Particles : virtual MathLib, virtual Parallel { }; struct Ring : virtual Particles { }; struct Injection : virtual Particles, virtua...
google
chromium
vbase13
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/vbase13.C
357
utf_8
2c858a9c525d6228c68ebd9b6adc4724
// { dg-do run } // { dg-options "-fabi-version=0 -w" } struct E1 {}; struct E2 : public E1 {}; struct E : public E1, public E2 {}; struct N : public E { virtual void f () {} }; struct X : virtual public N { }; int main () { X x; /* N should not be the primary base of X; it is not nearly empty. */ if ((void*)...
google
chromium
cookie2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/cookie2.C
263
utf_8
3bd4bb420676c4310003c9fffe83abe9
// { dg-options "-fabi-version=1" } void *operator new[](__SIZE_TYPE__, void *); struct A { ~A(){} }; int main() { A * a = (A*) new char[20]; A * b = new(a) A[3]; // In the 3.2 ABI, a cookie was allocated in this case. if (a == b) return 1; }
google
chromium
bitfield9
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/bitfield9.C
197
utf_8
14697006c1045d90c0f505dbfc8c5072
// { dg-do run { target i?86-*-* x86_64-*-* } } // { dg-require-effective-target ilp32 } // { dg-options -w } struct X { char : 45; }; int main () { if (__alignof__ (X) != 4) return 1; }
google
chromium
mangle3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle3.C
450
utf_8
7ea778117a3d82dba90f3647d292b1c5
// Test mangling of type casts // { dg-do compile } template<int i> class A {}; template<bool b> class B {}; template<int i> void f(A<i> &, B<bool(i)> &) {} template<int i> void g(A<i> &, B<static_cast<bool>(i)> &) {} int main() { A<1> a; B<true> b; f(a, b); g(a, b); } // { dg-final { scan-assembler "\n_?_Z...
google
chromium
macro1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/macro1.C
119
utf_8
5a7979aab90c38484879bf5742d1bfae
// { dg-options "-fabi-version=1" } #if __GXX_ABI_VERSION != 102 #error "Incorrect value of __GXX_ABI_VERSION" #endif
google
chromium
pr39188-2a
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/pr39188-2a.C
165
utf_8
fe56cd912c0f058bb4436bed7ee10cea
// PR c++/39188 // { dg-do run } // { dg-options "-O2" } // { dg-additional-sources "pr39188-2b.C" } #include "pr39188-2.h" int x (int i) { return f<int> (i); }
google
chromium
offsetof
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/offsetof.C
578
utf_8
a6fb1aab1fbc0b1d04911a6330e496f1
// Test that we can refer to the address of a base member of a null pointer // to get its offset. The standard says that offsetof shall not be used on // non-POD classes, but there seems to be no such restriction on the common // implementation thereof. // Yes, this is bad, naughty, evil code. But it seems to be wel...
google
chromium
structret1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/structret1.C
541
utf_8
51349b3acb94d1dc1909aec6ba384dae
// { dg-do run { target ia64-*-* } } // { dg-options "-fabi-version=0" } extern "C" void abort (); struct ConstructedObject { ConstructedObject() {}; ~ConstructedObject() {}; ConstructedObject(const ConstructedObject &from) {}; }; struct FrameworkObject { ConstructedObject action(); }; ConstructedObject Fra...
google
chromium
mangle6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle6.C
618
utf_8
91c28df1b9796be812f1b833d650c6b1
/* Check that __int128 types are mangled. */ /* { dg-do compile { target mips*-*-* } } */ #ifdef __mips64 typedef int int128 __attribute__ ((mode(TI))); typedef unsigned int uint128 __attribute__ ((mode(TI))); struct S { int128 i; int128 func1 (int128) const { return i; } uint128 func2 (uint128) const { return...
google
chromium
mangle9
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle9.C
196
utf_8
7e14b0353ae53e5a5a8bcf850c4fcbc9
// { dg-options "-fabi-version=0" } template <typename Q> void f (typename Q::X) {} struct S { typedef int X; }; template void f<S> (int); // { dg-final { scan-assembler _Z1fI1SEvNT_1XE } }
google
chromium
mangle12
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle12.C
222
utf_8
3de3f384e3accaeb680f27697b03affd
// { dg-options "-Wabi -fabi-version=1" } template <template <typename> class Q> void f (typename Q<int>::X) {} // { dg-warning "mangle" } template <typename Q> struct S { typedef int X; }; template void f<S> (int);
google
chromium
mangle18-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle18-1.C
577
utf_8
bfbdcf19399c74a6691d65ef0ba49cd3
// { dg-do compile } // { dg-options "-fabi-version=2" } // PR 13241 // mangled template arguments that are external objects incorrectly extern "C" void Foo (); namespace NMS { extern "C" int V; } template <void (*)()> struct S {}; template <int *> struct T {}; void f (S<Foo>){} // { dg-final { scan-assembler "\n_?_...
google
chromium
layout3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/layout3.C
418
utf_8
6372326d116dead9b369290e7a9ccb46
// { dg-do run { target i?86-*-* x86_64-*-* } } // { dg-require-effective-target ilp32 } // { dg-options "-fabi-version=0 -w" } struct S { virtual void f() {} }; struct T : virtual public S { }; struct U : public S, virtual public T { char c[100]; }; struct V : public U, virtual public S {}; struct W : public...
google
chromium
key2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/key2.C
628
utf_8
566b277074549a74732c7ed51a289742
// On Darwin, key methods that are inline result in comdat style things. */ // PR darwin/25908 // { dg-do compile { target *-*-darwin* } } // { dg-final { scan-assembler ".globl __ZTV1f\\n .weak_definition __ZTV1f(\\n .section __DATA,__const_coal,coalesced)?\\n .align" } } // { dg-final { scan-assembler ".globl __ZTS...
google
chromium
inline1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/inline1.C
94
utf_8
111786b8402b8dd840adfb9a53cf3aac
struct S { S() {} virtual void g() {} }; // { dg-final { scan-assembler-not "_ZTV1S" } }
google
chromium
mangle25
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle25.C
670
utf_8
21d8818f36c244970e59356b83354367
// Test mangling of __float128. // The C++ ABI document says __float128 is mangled as "g". It // also says that "long double" is mangled as "e", so these conflict on // ia64-hpux where "long double" is "e" and __float128 is synonymous with // "long double". // { dg-do compile { target ia64-*-* i?86-*-* x86_64-*-* } } ...
google
chromium
mangle11
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle11.C
177
utf_8
b607e2ace0fdeea670b56e751bc27f27
// { dg-options "-Wabi -fabi-version=1" } template <typename Q> void f (typename Q::X) {} // { dg-warning "mangle" } struct S { typedef int X; }; template void f<S> (int);
google
chromium
bitfield11
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/bitfield11.C
161
utf_8
e5e5ef8164ac7b43c7f20df7cfcd9b99
// { dg-do run } // { dg-options "-w -fabi-version=0" } struct S { char c : 1024; }; S s; int main () { s.c = 1; if (*(char *)&s != 1) return 1; }
google
chromium
thunk5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/thunk5.C
226
utf_8
0ec5c22fec9ed33618612b880a806f5c
// PR c++/35067 // The thunks should be weak even on targets without one-only support. // { dg-require-weak "" } // { dg-final { scan-assembler "weak.*ZTv" } } struct A { virtual ~A() { } }; struct B: virtual A { }; B b;
google
chromium
mangle15
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle15.C
249
utf_8
8ffaa1b19590f5f7ddf6464b1d009a9c
// { dg-do compile } // { dg-options "-fabi-version=0" } struct A { template <typename T> int f (); }; typedef int (A::*P)(); template <P> struct S {}; void g (S<&A::f<int> >) {} // { dg-final { scan-assembler _Z1g1SIXadL_ZN1A1fIiEEivEEE } }
google
chromium
vbase11
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/vbase11.C
293
utf_8
144d7001c1ac9ab9c89d8f5c56de4e09
// { dg-do run { target i?86-*-* x86_64-*-* } } // { dg-require-effective-target ilp32 } // { dg-options "-fabi-version=0" } struct A { virtual void f(); char c1; }; struct B { B(); char c2; }; struct C : public A, public virtual B { }; int main () { return 1; }
google
chromium
bitfield12
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/bitfield12.C
124
utf_8
3fd7e30befde66c7c5adb5b41e25923e
// { dg-options "-Wabi -fabi-version=1" } struct S { // { dg-warning "ABI" } char c : 1024; // { dg-warning "width" } };
google
chromium
mangle33
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle33.C
16,396
utf_8
c5d5176bf2a0d86ae5769b300e777296
// Testcase for mangling very long names. #define N \ abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcde...
google
chromium
mangle29
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle29.C
376
utf_8
f511f2cd46e1fa5fad1320edf3b06bdc
// Test of std::basic_ostream<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_ostream { basic_ostream(){} }; } std::basic_ostream<char,std::char_traits<char> > s1; // { ...
google
chromium
vcall1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/vcall1.C
379
utf_8
c88701df415b47ac9bf5cba84cf379ab
// { dg-do run } // { dg-options "-w" } extern "C" void abort (); struct B; B* b; struct A { virtual void f () {} }; struct B : virtual public A { B () { b = this; ((A*) this)->f (); } virtual void f () { if (this != b) abort (); } }; struct C : public B { }; struct D : public C, pub...
google
chromium
vbase12
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/vbase12.C
268
utf_8
90c43a38beef1adc9c358d0c1f470c6f
// { dg-do run } // { dg-options "-fabi-version=0" } struct A {}; struct B { A a; virtual void f () {} }; struct C : public B, virtual public A {}; struct D : public C, virtual public A {}; D d; int main () { if (((char*)(A*)&d - (char*)&d) != 0) return 1; }
google
chromium
forced
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/forced.C
434
utf_8
6f15172d825edc5509c1d35da3bfb275
// This test only applies to glibc (NPTL) targets. // { dg-do run { target *-*-linux* } } // { dg-options "-pthread" } #include <pthread.h> #include <cxxabi.h> extern "C" int printf (const char *, ...); int main() { try { pthread_exit (0); } catch (abi::__forced_unwind &) { printf ("caught...
google
chromium
arm_va_list
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/arm_va_list.C
449
utf_8
bbaf5f69b74e41af6b2db211ab43bb8f
// { dg-do compile } // { dg-options "-Wno-abi" } // { dg-require-effective-target arm_eabi } // AAPCS \S 7.1.4 requires that va_list be a typedef for "struct // __va_list". The mangling is as if it were "std::__va_list". // #include <stdarg.h> typedef __builtin_va_list va_list; // { dg-final { scan-assembler "\n_Z1...
google
chromium
empty11
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/empty11.C
355
utf_8
5ce11bfa25802ab713c346269c112592
// { dg-do run } // { dg-options "-w -fabi-version=0" } struct E {}; struct E2 : public E {}; struct E3 : public E, public E2 {}; struct E4 : public E, public E2, public E3 { }; struct E5 : public E, public E2, public E3, public E4 {}; struct S : public virtual E5 { E e; }; S s; int main () { if ((char*)(E4*)&s...
google
chromium
mangle20-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle20-1.C
566
utf_8
dc5e5444adf348136bebba2aeea75a56
// { dg-do compile } // { dg-options "-fabi-version=2" } // PR 9043 // mangled array types in templates template <int I> void f(int (*)[2]) {} template <int I> void g(int (*)[I+2]) {} static const int I=1; static const int J=2; template void f<1>(int (*)[2]); // { dg-final { scan-assembler "\n_?_Z1fILi1EEvPA2_i\[: \t\...
google
chromium
rtti3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/rtti3.C
567
utf_8
4b367f2168f94ba928402e9bd93e516c
// PR 20647, we must emit the typeinfo's string as weak, but not the // necessarily the type info object // { dg-require-weak "" } // { dg-final { scan-assembler ".weak\[ \t\]_?_ZTSPP1A" { target { ! { *-*-darwin* } } } } } // { dg-final { scan-assembler-not ".weak\[ \t\]_?_ZTIPP1A" { target { ! { *-*-darwin* } } } } ...
google
chromium
key1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/key1.C
487
utf_8
a128b5b94590dd451ff32844c5adb5e7
// On ARM EABI platforms, key methods may never be inline. // { dg-do compile { target arm*-*-eabi* arm*-*-symbianelf* } } // { dg-final { scan-assembler-not _ZTV1S } } // { dg-final { scan-assembler-not _ZTV1T } } // { dg-final { scan-assembler _ZTV1U } } struct S { virtual void f(); }; inline void S::f() {} stru...
google
chromium
vbase8-4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/vbase8-4.C
1,113
utf_8
6083c948c9046f70dfbcdfc448a5f784
// { dg-options -w } // { dg-do run } // Bug 3145 case 4. Horribly complicated class hierarchy class C0 {}; class C1 : virtual public C0 {}; class C2 : public C0 , public C1 {}; class C3 : virtual public C0 , public C1 , public C2 {}; class C4 : public C2 , public C3 , virtual public C1 , virtual pu...
google
chromium
mangle2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle2.C
270
utf_8
2fe54fcb3681eed20518e8a88f7e3849
// Test that we handle mangling of statics in inlines properly. // { dg-options -fno-weak } // { dg-do run } inline int f () { static int nested; nested = 24; { static int nested; nested = 42; } return (nested != 24); } int main() { return f (); }
google
chromium
bitfield5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/bitfield5.C
312
utf_8
7a715981fdef3b0ea85d77633f3443e9
// { dg-do compile } // { dg-options "-Wabi -fabi-version=1" } // { dg-options "-Wabi -fabi-version=1 -mno-ms-bitfields" { target i?86-*-* x86_64-*-* } } struct A { virtual void f(); int f1 : 1; }; struct B : public A { int f2 : 1; // { dg-warning "ABI" } int : 0; int f3 : 4; int f4 : 3; };
google
chromium
vbase9
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/vbase9.C
475
utf_8
aa7850bb832428b452c702abac4c2357
// { dg-do compile } // PR 5681. ICE in build_secondary_vtable struct A { virtual int f1 (); }; struct B : virtual A {}; struct C { virtual int f2 (); }; struct E : A {}; struct D : E, B {}; struct F : virtual D {}; struct G : virtual F, C {}; struct H : virtual F {}; struct I : G, H {};
google
chromium
param1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/param1.C
405
utf_8
a6094bf319c105760bebe41768865b66
// { dg-do run } // // Failed on powerpc64-linux for structure sizes > 64 and with size not a // multiple of 8 after padding. struct object { int i1; char s1[60]; int i2; char s2[64]; }; extern int subr (struct object obj); int main () { struct object obj; obj.i1 = 1234; obj.i2 = 5678; return subr (...
google
chromium
bitfield8
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/bitfield8.C
307
utf_8
20c8af1b6abeb0a339e5fd9c3edbde57
// { dg-do run { target i?86-*-* x86_64-*-* } } // { dg-options "-fabi-version=0" } // { dg-require-effective-target ilp32 } struct A { virtual void f() {} int f1 : 1; }; struct B : public A { int f2 : 31; int f3 : 4; int f4 : 3; }; int main () { if (sizeof (B) != 16) return 1; }
google
chromium
empty6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/empty6.C
532
utf_8
f59a9fb631035bed123e09958b87e5ec
// { dg-options "-Wabi" } struct A {}; struct B { A a; // { dg-warning "empty" "" { xfail mmix-*-* } } virtual void f () {} } __attribute__((aligned(2 * sizeof (void *)))); /* The preceding attribute is necessary on targets with BIGGEST_ALIGNMENT <= POINTER_SIZE to trigger the warning, as otherwise the offs...
google
chromium
layout4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/layout4.C
258
utf_8
bce89527ea384ef57e8233c6ea7e1ed2
// { dg-do run { target i?86-*-* x86_64-*-* } } // { dg-require-effective-target ilp32 } // { dg-options "-fabi-version=1" } struct C4 { int b:30; C4(){}; }; struct C1: virtual C4 { int i; }; int main() { if (sizeof (C1) != 12) return 1; }
google
chromium
mangle19-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle19-2.C
435
utf_8
af9f8cddd1244dd9ba598cbf9f64adf5
// { dg-do compile } // { dg-options "-fabi-version=1 -Wabi" } // PR 13242 // mangled template arguments that are external objects incorrectly extern int N; template <int &> struct S {}; void n (S<N>) {} // { dg-warning "mangled name" } // { dg-final { scan-assembler "\n_?_Z1n1SIXadL_Z1NEEE\[: \t\n\]" } }
google
chromium
arm_cxa_vec1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/arm_cxa_vec1.C
493
utf_8
c2811ee088c257695995272d9e41f470
// Check that __cxa_vec_[c]ctor returns a pointer to the array // { dg-do run { target arm*-*-* } } #include <cxxabi.h> #ifdef ___ARM_EABI__ static void cctor (void * a, void * b) { *(char *) a = *(char *) b } int main() { char data; char data2; char *p; p = __cxa_vec_ctor (&data, 1, 1, NULL, NULL); if ...
google
chromium
empty5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/empty5.C
196
utf_8
b3ca6b59f60c246ebf1e969e6120765f
// { dg-options "-fabi-version=0" } struct A {}; struct B { A a; virtual void f () {} }; struct C : public B, public A {}; C c; int main () { if ((void*) (A*) &c != &c) return 1; }
google
chromium
bitfield3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/bitfield3.C
1,413
utf_8
34982a6497281461ef10aa9c04840b9d
// Test for oversized bitfield alignment in structs on IA-32 // { dg-do run { target i?86-*-* x86_64-*-* } } // { dg-options "-O2" } // Cygwin and mingw32 default to MASK_ALIGN_DOUBLE. Override to ensure // 4-byte alignment. // { dg-options "-mno-align-double" { target i?86-*-cygwin* i?86-*-mingw* } } // { dg-require-e...
google
chromium
mangle14
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle14.C
284
utf_8
a34b61046b432b42bb70d5c1efdb3f68
// { dg-do compile } // { dg-options "-Wabi -fabi-version=1" } // { dg-final { scan-assembler "_Z1g1SIXadsr1ANS0_1fIiEEivEE" } } struct A { template <typename T> int f (); }; typedef int (A::*P)(); template <P> struct S {}; void g (S<&A::f<int> >) {} // { dg-warning "mangle" }
google
chromium
vthunk1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/vthunk1.C
883
utf_8
5acd6755c279afd8abbf0ca970932bf8
// { dg-do link } // Bug 3631. We mis-calculated the non-virtual part of a virtual // thunk. Leading to a link failure, in this case. struct A { virtual ~A () {} }; struct B : virtual public A { virtual void destroy() {} }; class C : virtual public B {}; class D : virtual public C {}; class E : public virtual A {}; s...
google
chromium
covariant5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/covariant5.C
851
utf_8
488e3869493233b0552a676aa01a7912
struct A { virtual void One (); }; struct B { virtual B *Two (); virtual B &Three (); }; struct C : A, B { virtual C *Two (); virtual C &Three (); }; void A::One () {} B *B::Two() {return this;} B &B::Three() {return *this;} C *C::Two () {return 0;} C &C::Three () {return *(C *)0;} B *Foo (B *b)...
google
chromium
vthunk2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/vthunk2.C
306
utf_8
a3ef49aa5fa035e0eaa1fb23c589fe61
// { dg-do compile { target i?86-*-* x86_64-*-*} } // { dg-require-effective-target ilp32 } struct c0 { virtual void f (); }; struct c1 : virtual public c0 { }; struct c2 : virtual public c0, public c1 { virtual void f (); }; void c2::f () {} // { dg-final { scan-assembler _ZTv0_n12_N2c21fEv } }
google
chromium
mangle18-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle18-2.C
654
utf_8
ed08764439318b92bcfc00c24907e5eb
// { dg-do compile } // { dg-options "-fabi-version=1 -Wabi" } // PR 13241 // mangled template arguments that are external objects incorrectly extern "C" void Foo (); namespace NMS { extern "C" int V; } template <void (*)()> struct S {}; template <int *> struct T {}; void f (S<Foo>){} // { dg-warning "mangled name" ...
google
chromium
mangle5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle5.C
170
utf_8
8d713f873b380f7cb5bf13fe8019b486
// Test mangling of pointers to cv-qualified member functions struct A; void f (void (A::*)() const) {} // { dg-final { scan-assembler "\n_?_Z1fM1AKFvvE\[: \t\n\]" } }
google
chromium
covariant1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/covariant1.C
414
utf_8
16ddae14467c12ed70e65f2952905e5a
// { dg-do compile } // { dg-options "-w" } // We don't want to use a covariant thunk to have a virtual // primary base struct c4 {}; struct c6 : c4 { virtual c4* f17(); }; c4* c6::f17() { return 0; } struct c11 : virtual c6 { int i; }; struct c12 : c11 { }; struct c14 : virtual c12, virtual c11 { virtual c...
google
chromium
pr39188-2b
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/pr39188-2b.C
173
utf_8
0e0d3fd200f3fd63503e40a56053caf0
#include "pr39188-2.h" extern "C" void abort (); extern int x (int); int main (void) { if (x (1) != 0) abort (); if (f<int> (1) != 1) abort (); return 0; }
google
chromium
vague1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/vague1.C
357
utf_8
9266f22cfbaad15702320f26c3b6c146
// instantiations. // Disable debug info so we don't get confused by the symbol name there. // { dg-options "-g0" } template <class T> struct A { static const T t = 0; }; template <class T> const T A<T>::t; int i; int main () { i = A<int>::t; // Should just use the value }
google
chromium
mangle4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle4.C
509
utf_8
200f21813a4ee7cb051aaf6d88d18b5b
// Test mangling of type casts // { dg-do compile } class A {}; class B : public A {}; template<const A* a> class C {}; template<const B* b> class D {}; template<B* b> class E {}; template<const B* b> void f(D<b> &, C<static_cast<const A*>(b)> &) {} // { dg-error "" } template<const B* b> void g(D<b> &, E<const_cast...
google
chromium
vbase14
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/vbase14.C
257
utf_8
530a9c9d639369e0e074a2ac0f3f8e59
// { dg-options "-Wabi -fabi-version=1" } struct E1 {}; struct E2 : public E1 {}; // { dg-warning "layout" } struct E : public E1, public E2 {}; // { dg-warning "layout|ambiguity" } struct N : public E { virtual void f () {} }; // { dg-warning "nearly" }
google
chromium
mangle28
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle28.C
376
utf_8
588881d3d6cf72183ed9fe7c181c1ac2
// Test of std::basic_istream<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_istream { basic_istream(){} }; } std::basic_istream<char,std::char_traits<char> > s1; // { ...
google
chromium
pr39188-3b
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/pr39188-3b.C
168
utf_8
98c00465484f65e4b1d1c30fbbb31e23
#include "pr39188-3.h" extern "C" void abort (); extern int x (int); int main (void) { if (x (1) != 0) abort (); if (f (1) != 0) abort (); return 0; }
google
chromium
mangle16
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle16.C
457
utf_8
d6cfcf12071b19ad5863b84ad45b916e
// { dg-options "-fabi-version=0" } enum E { e = 3 }; template <int I> struct S {}; template <int I> void f (S<e + 1>) {} template void f<7>(S<e + 1>); template <int I> void g (S<e>) {} template void g<7>(S<e>); template <int I> void h (S<I + 1>) {} template void h<7>(S<7 + 1>); // { dg-final { scan-assembler _Z1...
google
chromium
bitfield4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/bitfield4.C
1,002
utf_8
b8aaec32a77e9927231c6c5f3237432f
/* { dg-do run { target { pcc_bitfield_type_matters || default_packed } } } */ /* Check bitfields and non-bitfields are aligned & sized similarly. */ #include <limits.h> #include <stdio.h> static int fail; #define CHECK1(N, T) do { \ typedef struct Field_##N { char c; T f; } Field_##N; \ typedef struct BitField_##N...
google
chromium
mangle7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle7.C
144
utf_8
3ca84e7c044b9a2c08f1b773db1d5f4f
/* { dg-do compile } */ typedef void *const t1[2]; float const f1(t1 (&)[79], ...) {} /* { dg-final { scan-assembler _Z2f1RA79_A2_KPvz } } */
google
chromium
layout1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/layout1.C
340
utf_8
44d0f298ab4a8fb8dcb8f4930bac5fd0
// Red Hat bugzilla 64535 // Bug: We are allocationg stuff into the tail padding of POD class "A". // { dg-do run } struct A { int x; char y; }; struct B : public A { virtual void f () {} char z; }; A a = { 21, 42 }; B b; int main (void) { b.x = 12; b.y = 24; b.z = 36; A *ap = &b; *ap = a; re...
google
chromium
covariant4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/covariant4.C
950
utf_8
a65da95a628d80d93aad25db51b4e19c
// { dg-do run } // Bug 19891: Incorrect covariant vtables struct Model { bool full_tree; virtual Model* clone() const =0; virtual const char *name() const =0; virtual ~Model() {} }; struct R: virtual public Model { virtual R* clone() const =0; }; struct A: virtual public Model { virtual A* clone() const=0...
google
chromium
layout2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/layout2.C
548
utf_8
629ced02f7a4d9d57a9b120d8c7bbbde
// Red Hat bugzilla 65210 // { dg-do run } struct A { int a; }; struct B : public virtual A {}; struct C { long double c; }; struct D : public virtual C { int d; }; struct E : public B, public D { int e; }; E e; /* The layout of E should begin with the B-in-E vtable pointer, followed by the D-in...
google
chromium
dcast1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/dcast1.C
729
utf_8
ae8183ac34cf252335be257cff5018dc
// { dg-do compile } // PR 9433. segfault at runtime. struct A { virtual void f() {} }; struct B {int b;}; struct C : A, B { virtual void f() {} int c;}; struct D : C {int d;}; struct E : C {int e;}; struct F : protected D, E {int f;}; struct H : virtual F {int h;}; struct I : H {int i;}; struct J...
google
chromium
thunk4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/thunk4.C
436
utf_8
c7ec06715420438ad1b0fd1169265a31
// { dg-require-weak "" } // { dg-final { scan-assembler ".weak\[ \t\]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* } } } } } // { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZThn._N7Derived3FooEv" { target { *-*-darwin* } } } } struct Base { virtual void Foo (); }; struct Filler { virtual void ...
google
chromium
regparm1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/regparm1.C
1,042
utf_8
1ed81d7e7edebea54ec04f2234fe6cec
// PR c++/29911 (9381) // { dg-options -std=c++0x } // { dg-do run { target i?86-*-* x86_64-*-* } } extern "C" int printf(const char *, ...); void *save_this; int *save_addr1, *save_addr2; int fail; struct Base { __attribute((regparm(3))) void set(int *addr1, int *addr2) { if (this != save_this) { ...
google
chromium
empty4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/empty4.C
1,449
utf_8
47c3d191ca7e599a86988d8cfdf3dfce
// { dg-do run } // padding. Which clobbers whatever they overlay. struct Empty {}; struct Inter : Empty {}; long now = 0; struct NonPod { long m; NonPod () {m = 0x12345678;} NonPod (long m_) {m = m_;} NonPod &operator= (NonPod const &src) {now = m; m = src.m; return *this;} NonPod (NonPod const &src) {m = sr...
google
chromium
mangle13
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle13.C
864
utf_8
bcf6566eabf2af39caacb3af143f90c8
// { dg-options "-fabi-version=0" } struct A { template <typename T> int f (); int operator+(); operator int (); template <typename T> int operator-(); }; typedef int (A::*P)(); template <P> struct S {}; template <typename T> void g (S<&T::template f<int> >) {} template <typename T> void g (S<&T::operato...
google
chromium
mangle17
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/mangle17.C
335
utf_8
f713d612b449a8bc202244d8b38880bb
// { dg-options "-Wabi -fabi-version=1" } enum E { e = 3 }; template <int I> struct S {}; template <int I> void f (S<I + e + int (3.7)>) {} // { dg-warning "mangle" } template void f<7>(S<7 + e + int (3.7)>); template <int I> void g (S<I + e + int (3.7)>) {} // { dg-warning "mangle" } template void g<7>(S<7 + e +...
google
chromium
covariant3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/abi/covariant3.C
1,292
utf_8
836325701db2acafab5dfd4a8eea9e11
// { dg-do run } // PR c++/13118. Missing covariant thunk. struct c0 {}; struct c1 : virtual c0 { virtual c0* f6(); }; struct c5 { virtual void foo(); }; struct c10 : virtual c1 { virtual void foo(); }; struct c1a : c1 {}; // disambiguation struct c11 : virtual c10, c1a { int i; virtual c1* f6 () = 0; }; ...