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 | 900406_02 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900406_02.C | 496 | utf_8 | 91c5f6fa069ce699055f60aff08860cb | // { dg-do run }
// g++ bug 900406_02
// g++ fails to correctly parse some type specifications within casts.
// This results in incorrect errors being issued.
// These errors are not issued for identical code by either cfront or
// by gcc.
// cfront 2.0 passes this test.
// keywords: syntax, array types, casts
i... |
google | android | 900520_04 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900520_04.C | 1,200 | utf_8 | 32f9838a2677f4322d6422963ad75321 | // { dg-do run }
// g++ 1.37.1 bug 900520_04
// g++ does not yet support the initialization of scalar type objects
// (including built-in arithmetic types, enum types, and pointer types)
// via constructor initialization syntax except within a call to operator
// new.
// keywords: unimplemented, syntax, initializati... |
google | android | 900520_06 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900520_06.C | 1,546 | utf_8 | 365ad489a4b8cb4d59c97741b1d326bb | // { dg-do run }
// g++ 1.37.1 bug 900520_06
// When an object of a class type is passed into a formal parameter of the
// same class type (in a function call) the language definition calls for
// this action to be treated like any other form of an initialization of
// an object of the given class type.
// g++ fails... |
google | android | 900127_01 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900127_01.C | 686 | utf_8 | 85ce4a05df3617664e82ac5779f130e6 | // { dg-do assemble }
// g++ 1.36.1 bug 900127_01
// g++ often fails to detect (and issue errors for) ambiguous overload
// situations. In such cases, one of the possibilities is chosen
// (apparently arbitrarily). Errors should be issued instead.
// Cfront 2.0 passes this test.
// keywords: function overloading, ... |
google | android | 900210_08 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900210_08.C | 388 | utf_8 | 9e00b67da73217bd8eeac124e326b5bf | // { dg-do assemble }
// g++ 1.36.1 bug 900210_08
// g++ allows pointer-to-const values to be implicitly converted to
// void* values. This causes a silent loss of the const qualifier.
// Cfront 2.0 passes this test.
// keywords: pointer types, implicit type conversions
const char *ccp;
void *vp;
void function (... |
google | android | 900210_05 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900210_05.C | 1,395 | utf_8 | d2e249bd273e50ba61f866d644ecc468 | // { dg-do assemble }
// g++ 1.36.1 bug 900210_05
// Section 18.3 of the 2.0 Reference Manual says "An implementation
// providing { anachronistic features } should also provide a way for
// the user to ensure that they do not occur in a source file."
// The *only* proper way to "ensure" an absence of anachronstic f... |
google | android | 900407_01 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900407_01.C | 748 | utf_8 | 98b233cef5cf2faa9c7403a4afd54462 | // { dg-do assemble }
// g++ 1.37.1 bug 900407_01
// g++ fails to flag errors for uses of anachronistic features such as the
// invocation of a base class constructor in a ctor-initializer list without
// explicitly giving its name.
// Errors should probably be issued for such usage unless the -traditional
// option... |
google | android | 900207_03 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900207_03.C | 1,323 | utf_8 | e93debd4450b4bd4c90f612064b8ce9b | // { dg-do run }
// g++ 1.36.1 bug 900207_03
// g++ fails to allow objects of class or struct types to be initialized
// using "constructor syntax" in cases where an implicitly generated copy
// constructor would be invoked for the initialization, and where there is
// no explicitly specified constructor associated w... |
google | android | 900331_03 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900331_03.C | 628 | utf_8 | 4f31c4bcb0fc662ba06aa9b872dfd7a3 | // { dg-do run }
// { dg-options "" }
// g++ 1.37.1 bug 900331_03
// Special Options: -ansi
// The following code causes g++ to abort.
// Curiously, the abort does not occur if the -pedantic option is used.
// Cfront 2.0 passes this test.
// Keywords: abort, conditional operator?:, lvalues, composite types
struc... |
google | android | 900215_02 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900215_02.C | 1,456 | utf_8 | 25dec57ac8d1643dca7ab54962fdfd06 | // { dg-do assemble }
// g++ 1.36.1 bug 900215_02
// g++ allows global objects (which happen to be pointers to members of some
// class X) to be dereferenced without prefix object specifications within
// member functions of class X.
// In effect, g++ treats any dereference of a pointer-to-member which appears
// w... |
google | android | 900107_01 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900107_01.C | 831 | utf_8 | d316930e4fc77e247674bac7a76e3e3f | // { dg-do run }
// g++ 1.36.1 bug 900107_01
// Unlike GCC and Cfront 2.0, the g++ 1.36.1 compiler gives struct, union,
// and class declarations which are nested within blocks file scope.
// Cfront 2.0 passes this test.
// keywords: block scope, file scope, nested types, tagged types
class c1 { int c1_member1; };... |
google | android | 900121_01 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900121_01.C | 415 | utf_8 | 40a63e2f46749b91cd73cc6edd8e881d | // { dg-do assemble }
// g++ 1.36.1 bug 900121_01
// The following file causes g++ 1.36.1 (and 1.36.2) to abort.
// Cfront 2.0 passes this test.
// keywords: abort, incomplete types, reference types, formal parameters
struct s0; // { dg-error "" } forward declaration
void function (struct s0 &arg1, s... |
google | android | 900119_01 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900119_01.C | 1,321 | utf_8 | f79e48f086b54fea6db2125809fa0c62 | // { dg-options "-pedantic-errors -std=c++98" }
// { dg-do assemble }
// g++ 1.36.1 bug 900119_01
// g++ allows initializers to be included in the declaration of members
// of classes, structs, unions (even when -pedantic is used).
// This is not allowed by the C++ 2.0 Reference Manual or by Cfront 2.0.
// keywords... |
google | android | 900211_04 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900211_04.C | 756 | utf_8 | f9519950e375f26419d30233dc4b7bcd | // { dg-do assemble }
// g++ 1.36.1 bug 900211_04
// g++ fails to flag as errors attempts to compare pointer values against
// (nonzero) integer values;
// Since implicit conversions of pointer to integers (or vise versa) are
// illegal, these comparisons are also illegal.
// Cfront 2.0 passes this test.
// keywor... |
google | android | 900519_13 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900519_13.C | 1,090 | utf_8 | a5d8af920912a29d9471383754871192 | // { dg-do assemble }
// g++ 1.37.1 bug 900519_13
// If multiple inheritance creates a situation in which a given name is
// inherited from more than one base class, and if the inherited declarations
// for the name are for different categories of members (e.g. object members,
// function members, enumeral members), ... |
google | android | 891230_01 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/891230_01.C | 466 | utf_8 | 9b34d1cbf33fa9da4871818fe8c72b3c | // { dg-do run }
// g++ 1.36.1 bug 891230_01
// g++ gives typedefs which are nested within class declarations a scope
// which is local to the class declaration itself. This causes examples
// like the following to get compile-time errors.
// Cfront 2.0 passes this test.
// keywords: typedef, nested types, scope
... |
google | android | 900121_02 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900121_02.C | 1,018 | utf_8 | 7bf02bae95103f1dc7fcd668f4999248 | // { dg-do assemble }
// { dg-prune-output "note" }
// { dg-prune-output "deleted" }
// g++ 1.36.1 bug 900121_02
// Assignment of structs is defined as memberwise assignment,
// however g++ (1.36.2) and Cfront 2.0 differ on the definition
// of assignment for unions.
// (NOTE: Stroustrup now says that assignment of... |
google | android | 900404_04 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900404_04.C | 512 | utf_8 | 556dbc5118f231ade8f41134ea065eb2 | // { dg-do assemble }
// g++ 1.37.1 bug 900404_04
// [dcl.dcl] explains that simple-declarations may omit the
// init-declarator-list only if the decl-specifier-seq declares a
// class, i.e. if it contains a class-specifier, an
// elaborated-type-specifier with class key, or an enum-specifier. The
// declaration belo... |
google | android | 900215_01 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900215_01.C | 1,103 | utf_8 | c450a62abe78fccfcf808f72fc572e5a | // { dg-do assemble }
// g++ 1.36.1 bug 900215_01
// g++ allows the definition of a type conversion operator `operator void'
// for class types, but subsequently fails to generate calls (where needed)
// for such type conversion operators.
// Cfront 2.0 does generate such calls.
// The following program exits with ... |
google | android | 900213_01 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900213_01.C | 732 | utf_8 | 62b45e4698b10fd61f481b5ea11fe0d5 | // { dg-do assemble }
// g++ 1.36.1 bug 900213_01
// g++ incorrectly diagnoses the error when an attempt is made to reference
// a non-static data-member without an object indication.
// Similar attempts to reference non-static function-members are correctly
// diagnosed by g++.
// Cfront 2.0 passes this test.
// ... |
google | android | 900212_02 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900212_02.C | 537 | utf_8 | c5d3a07860a418caf7cf6c28c8418e87 | // { dg-do assemble }
// g++ 1.36.1 bug 900212_02
// g++ fails to flag as errors attempts to take the difference of two values
// of some compatible pointer-to-member type.
// Cfront 2.0 passes this test.
// keywords: pointer arithmetic, subtraction, member pointers
struct struct0 {
};
int struct0::*p0;
int struc... |
google | android | 900402_01 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900402_01.C | 323 | utf_8 | b2c690f79b9e0981a2f96dcdcdf7e947 | // { dg-do assemble }
// g++ 1.37.1 bug 900402_01
// The following erroneous code causes g++ to abort.
// Cfront 2.0 passes this test.
// keywords: abort, bit-fields, function types
typedef void (func_type) ();
struct s {
func_type f:32; // { dg-error "" } bitified with function type
};
int main () { return 0;... |
google | android | 900324_04 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900324_04.C | 594 | utf_8 | 4e0e41f367b26289726086977b1713af | // { dg-do assemble }
// g++ 1.37.1 bug 900324_04
// This extension is not described in the current C++ Reference Manual, and
// it is not implemented by cfront (2.0).
// g++ should generate errors for the use of this extension when -pedantic
// is used, however it does not.
// Cfront 2.0 passes this test.
// keywords... |
google | android | 900404_03 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C | 593 | utf_8 | 7fc650fc82623a5c992e3ab149626da4 | // { dg-do assemble }
// g++ 1.37.1 bug 900404_03
// g++ fails to be able to properly flag errors for even simple cases of
// ambiguous overload resolution (such as the one shown below).
// Cfront 2.0 passes this test.
// keywords: overloading, ambiguity, resolution
void function0 (int i, char c) // { dg-message "... |
google | android | 900519_05 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900519_05.C | 369 | utf_8 | 7d3b7aaac399fac800937dd08d251cec | // { dg-do run }
// g++ 1.37.1 bug 900519_05
// g++ fails to allow the use of function-reference types.
// cfront 2.0 passes this test.
// keywords: function types, reference types
typedef void (func_type) (int, int);
typedef func_type& func_ref_type;
void function (int arg1, int arg2)
{
}
func_type& global_fu... |
google | android | 900404_02 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900404_02.C | 594 | utf_8 | 154a87b721d11ed1738fbab683ce754a | // { dg-do assemble }
// g++ 1.37.1 bug 900404_02
// g++ fails to treat multicharacter literals as type "int" as required by
// section 2.5.2 of the C++ Reference Manual.
// The result is that the following program will exit with a nonzero
// exit status.
// keywords: character literals, multi-character literals, i... |
google | android | 900209_01 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900209_01.C | 554 | utf_8 | 53a5eae1f920d333696f18640f990961 | // { dg-do assemble }
// g++ 1.36.1 bug 900209_01
// g++ implicitly casts values whose types are "void*" to other pointer
// types (just as the language rules for C permit). Such implicit
// conversions are not allowed by the Cfront 2.0 Reference Manual
// however.
// Cfront 2.0 passes this test.
// keywords: void... |
google | android | stmtexpr1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/stmtexpr1.C | 131 | utf_8 | ea46aef8157f0a37daa39b1ac8c6bfa8 | // { dg-do assemble }
// { dg-options "" }
void f ()
{
int i = ({ l: 3; });
} |
google | android | asmspec1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/asmspec1.C | 163 | utf_8 | a73fc887eed082ef683e77dde6521d24 | // { dg-do assemble { target i?86-*-* x86_64-*-* } }
void foo ()
{
register const char *h asm("%esi") = "hey";
} |
google | android | pretty2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/pretty2.C | 1,677 | utf_8 | 02044b0d3f0a562855e9108718011a3e | // { dg-do run }
// make sure __FUNCTION__ and __PRETTY_FUNCTION__ work in member functions
#include <stdio.h>
#include <string.h>
static bool bad = false;
struct X
{
X ();
~X ();
void fn ();
operator int ();
};
X::X ()
{
char const *function = __FUNCTION__;
char const *pretty = __PRETTY_FUNCTION__;
p... |
google | android | addrfunc3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/addrfunc3.C | 266 | utf_8 | 5c7d62fe55678dd59032d65e2c6c4d0a | // { dg-do run }
// { dg-options "-fpermissive -w" }
// Test for overload resolution in comparison expressions.
void f (int) { }
void f ();
int main () {
void (*p)(int);
p = f;
if (p != f)
return 1;
} |
google | android | pretty | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/pretty.C | 732 | utf_8 | 7bf4e5e0e822e66bda26a8880cb1e595 | // { dg-do assemble }
// Test for PRETTY_FUNCTION
class SV;
class SVTable // : public Debug
{
// It is an array to pointer to a SV.
SV ** array;
// This is the size of array.
int maxCount;
// This is the current element count.
int count;
void fatal_error (const char *f, ...);
public:
SVTable (in... |
google | android | typeof1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/typeof1.C | 185 | utf_8 | 57ed6c77a969a28c7a415449b0bad7ea | // { dg-do assemble }
struct inttest {
int elem[1];
};
template <class T>
void F(T x)
{
typedef __typeof (x.elem[0]) dummy;
dummy i = 1;
}
int main() {
inttest x;
F(x);
}
|
google | android | array1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/array1.C | 503 | utf_8 | ad0913538dd7d6e5fa83fb6ba070dcf4 | // { dg-do assemble }
// { dg-options "" }
// Testcase for assignment of non-array to array (assigns the same value to
// each member)
// Special Options:
typedef struct {} ct2d_rigid, ct2d_rigid_a[1];
class ccInspection
{
protected:
ct2d_rigid_a _dev2phys;
};
class ccBgaInspection : public ccInspection
{
public... |
google | android | pretty3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/pretty3.C | 1,094 | utf_8 | 94ba708371ff08ece1345c37517ff7db | // { dg-do run }
// make sure __FUNCTION__ and __PRETTY_FUNCTION__ work in templates
#include <stdio.h>
#include <string.h>
static bool bad = false;
template<class T> void f1 (T)
{
char const *function = __FUNCTION__;
char const *pretty = __PRETTY_FUNCTION__;
printf ("generic\n");
printf ("__FUNCTION__ %s\n... |
google | android | namedret3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/namedret3.C | 357 | utf_8 | 95d2c4a18ce65af541fc6de3f5d3674a | // { dg-do assemble }
// { dg-options "-Wno-deprecated" }
extern "C" void abort();
int f2(int *x)
{
*x = 1;
return 2;
}
int f1() return x // { dg-error "" }
{
f2(&x); // { dg-error "" }
}
void g()
{
int scratch[100];
int i;
for (i = 0; i < 100; ++i)
scratch[i] = 0;
}
int main()
{
g();
if (f1... |
google | android | array2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/array2.C | 161 | utf_8 | 70a0389ce8c471f6a0bd878ddc94a9d4 | // { dg-do assemble }
// { dg-options "-w" }
// This testcase used to cause a crash on the Alpha.
struct A {
int i;
~A() { }
};
A f (int n)
{
A a[n];
}
|
google | android | anon2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/anon2.C | 191 | utf_8 | 6ce37734760abfd9bd961226e88f2716 | // { dg-do assemble }
// { dg-options "" }
// { dg-prune-output "note" }
struct S
{
S ();
};
union U {
struct {
S s; // { dg-error "" } struct with constructor in union
};
};
|
google | android | typeof2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/typeof2.C | 121 | utf_8 | a8177dc6e3f71f2c16aa0082b1f6d60a | // { dg-do assemble }
struct S
{
int i;
__typeof( S::i ) f ();
}; |
google | android | pretty4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/pretty4.C | 1,873 | utf_8 | 5190ae04151ad378ef34a94c3131bb45 | // { dg-do run }
// __PRETTY_FUNCTION__, __FUNCTION__ and __function__ should have the
// type char const [X], where X is the right value for that particular function
static void const *strings[4];
static void const *tpls[4];
static unsigned pos = 0;
static int fail;
static void const *ptr = 0;
void unover (char const... |
google | android | typename1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/typename1.C | 574 | utf_8 | 4bb09491c286d809524eeecc77d75765 | // { dg-do run }
// Bug: g++ forgets about the instantiation of class1 when looking up
// class11_value, and tries to look things up in class1<class2>.
template<class ItIsInt>
struct class1 {
struct class11 {
typedef ItIsInt class11_value;
};
};
template<class ItIsClass2>
struct class3 {
int f();
};
templ... |
google | android | attrib2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/attrib2.C | 335 | utf_8 | 070be7491ea6affff1e06a73a335043e | // { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } }
// Test that stdcall doesn't prevent us from using op delete.
struct A {
void operator delete (void *) __attribute__ ((stdcall));
};
void A::operator delete (void *) { }
int main()
{
A* ap = new A;
delete ap;
} |
google | android | jump1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/jump1.C | 271 | utf_8 | b6418b336a13fd226ab5d32e33b8f7a6 | // { dg-do run }
// { dg-options "-fpermissive -w" }
// Test that we can jump over the declaration of a non-POD object.
struct A { };
union U {
void (A::*p)();
};
int main()
{
goto foo;
U u;
foo:
return 0;
} |
google | android | label2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/label2.C | 395 | utf_8 | 0ca8735aa70dd60af0734860b2521e34 | // { dg-do run }
// { dg-options "" }
template <class T>
int f ()
{
int i = 0;
int j = 0;
int k = 0;
l:
if (j)
return 0;
({
__label__ l;
k = 0;
l:
if (++k <= 2)
goto l;
++i;});
if (i > 1 || k != 3)
return 1;
else
{
j = 1;
goto l;
}
}
int main ()
{
... |
google | android | anon1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/anon1.C | 180 | utf_8 | 83dc346ec7b1c2b8d6facdb07c9e5395 | // { dg-do run }
// { dg-options "" }
union U {
struct { int i; int j; };
int a[2];
};
int main ()
{
U u;
u.i = 42;
u.a[1] = 24;
return u.j != 24 || u.a[0] != 42;
}
|
google | android | array3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/array3.C | 154 | utf_8 | 0358c365e76d6d31e6b0d88db4a8b90b | // { dg-do assemble }
// { dg-options "" }
void *vp;
void f ()
{
int i = (*((int (*)[i]) vp))[0];
} |
google | android | arrnew | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/arrnew.C | 176 | utf_8 | 60de5c23c65fe5ebd8cb2707b86aa75a | // { dg-do assemble }
// { dg-options "" }
// PRMS Id: 4992
// { dg-prune-output "extended init" }
int *f(){
return new int[1] = { 1 }; // { dg-error "lvalue" "err" }
}
|
google | android | array4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/array4.C | 623 | utf_8 | b2f69c1973b3d4b6b9e01df5ce3b43ba | // { dg-do assemble }
// { dg-options "" }
// [nathan] We have a zero sized array extension, and (unfortunately) allow it
// to be the sole member of a struct (rather than the trailing member of a
// non-empty struct as C99 is/will allow). Such a type will have a size of
// zero, but is not incomplete.
struct A
{
in... |
google | android | namedret1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/namedret1.C | 221 | utf_8 | 3208432e3fbd078a0129ef1d5c752925 | // { dg-do assemble }
// { dg-options "-Wno-deprecated" }
int f(int x) return y(x) { } // { dg-error "" }
extern "C" void abort ();
int main()
{
if (f(1) != 1 || f(2) != 2 || f(3) != 3)
abort ();
return 0;
}
|
google | android | arrnew2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/arrnew2.C | 139 | utf_8 | 94198d25977b1de18c220c8dacb70fa3 | // { dg-do run }
// { dg-options "-w -fpermissive" }
int *foo = new int[1](42); // { dg-bogus "" }
int main ()
{
return foo[0] != 42;
}
|
google | android | memconst | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/memconst.C | 517 | utf_8 | a3633dc4c72b73a709616663aeab9f8b | // { dg-do assemble }
// { dg-options "-pedantic -pedantic-errors" }
// Subject: ss-940630:cc1plus: internal error
// Date: Sat, 2 Jul 1994 05:07:20 +0200
class qwerty {
public:
qwerty (const unsigned short userkey[8]);
~qwerty ();
};
class foo {
private:
static const unsigned char * const dummy_key = (unsign... |
google | android | addrfunc2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/addrfunc2.C | 264 | utf_8 | 6e877e5f18beeb20ce3cf850fea05b8d | // { dg-do run }
// { dg-options "-fms-extensions" }
// Test for implicit & on methods.
struct A {
void f (int = 0) { }
};
int
main ()
{
void (A::*p)(int) = 0;
p = A::f;
if (p != A::f)
return 1;
} |
google | android | addrfunc1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/addrfunc1.C | 335 | utf_8 | bd0efa0a1fe0ed98636fcebbc5fd05e3 | // { dg-do assemble }
// { dg-options "-fms-extensions" }
// Test that taking the address of a member function name produces
// a pointer to member function.
struct A { };
int (A::*p)();
struct B {
int f () { return 0; }
void g ();
};
void B::g ()
{
p = (int (A::*)())&f;
} |
google | android | bound1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/bound1.C | 512 | utf_8 | 3319bbc157c0ea8b1ee782f722a5788a | // { dg-do assemble }
// { dg-options "-Wno-pmf-conversions" }
// Testcase for cast of bound pointer to member function.
struct A {
int f ();
};
typedef int (*fptr)(A *);
typedef void* vptr;
typedef int (A::*pmf)();
void foo (A* ap, pmf fp, int A::* ip)
{
fptr p;
vptr q;
A a;
p = (fptr)(ap->*fp);
p = (... |
google | android | delvoid | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/delvoid.C | 245 | utf_8 | 04aaaf608d3428b0ce27c992835dd4ca | // { dg-do run }
// { dg-options "-w" }
// Test for deleting a void pointer, which the standard says is undefined,
// but which is used by several free C++ programs.
void *p;
int main ()
{
delete [] p;
} |
google | android | label1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/label1.C | 339 | utf_8 | 7c80d75a7a5060ebffa4bb21e1a5bca7 | // { dg-do run }
// { dg-options "" }
int main ()
{
int i = 0;
int j = 0;
int k = 0;
l:
if (j)
return 0;
({
__label__ l;
k = 0;
l:
if (++k <= 2)
goto l;
++i;});
if (i > 1 || k != 3)
return 1;
else
{
j = 1;
goto l;
}
} |
google | android | null1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/null1.C | 128 | utf_8 | 441e900253b789b6b51d853547d8c928 | // { dg-do run }
// Test for overloading with g++ NULL.
void f (int *) { }
void f (char, char);
int main ()
{
f (__null);
}
|
google | android | attrib3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/attrib3.C | 405 | utf_8 | 2036e7542ce315fbfca215322b08030b | // { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } }
// Test for proper handling of attributes in template instantiation.
template <class T>
struct A {
static void f () __attribute__ ((stdcall));
};
template <class T> void
A<T>::f () { }
void g (void (__attribute__ ((stdcall)) *p)()) { }
void g (int);
int
... |
google | android | overload1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/overload1.C | 493 | utf_8 | aaf28a2517f6c96e4befdb26d943ccd0 | // { dg-do assemble }
// { dg-options "-fpermissive" }
// Make sure we warn about our overload extension about picking the
// one with the least worse conversion
struct X
{
X (int);
};
void Foo (int, float, bool); // { dg-message "candidate" }
void Foo (float, int, X); // { dg-message "candidate" }
void Baz ()
{
F... |
google | android | constructor | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/constructor.C | 345 | utf_8 | 7e968cebb40357949b08db2dd18895f3 | // { dg-do run }
// { dg-options "" }
// Testcase for constructor expressions (GNU extension)
struct Any {
int *type;
int *addr;
};
int i, j;
main () {
struct Any *ap = (struct Any *)
__builtin_alloca (sizeof(struct Any));
*ap = ((struct Any){ &i, &j }) ;
if (ap->type != &i || ap->addr != &j)
... |
google | android | noweak1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/noweak1.C | 281 | utf_8 | 653defb4f71cb47ee4060cfa0b8c06a9 | // { dg-do run }
// { dg-options "-fno-weak" }
// Test that -fno-weak doesn't break explicit instantiation of static data.
template <class T> struct A
{
static int i;
};
template <class T> int A<T>::i = 42;
template class A<int>;
int main ()
{
return (A<int>::i != 42);
}
|
google | android | restrict1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/restrict1.C | 1,250 | utf_8 | df31b13912c1da9a3fc14ba82453bf22 | // { dg-do assemble }
// Test our restrict object pointer extension
struct A
{
void f1() __restrict__;
void g1(int *__restrict__);
void f2() __restrict__;
void g2(int *__restrict__);
void f3();
void g3(int *);
void f4();
void g4(int *);
};
void A::f1 () __restrict__ {}
void A::g1 (int *__restrict__) {}... |
google | android | attrib1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/attrib1.C | 325 | utf_8 | 9b40e92e0865a215292a4a7e43b7fd64 | // { dg-do assemble { target { { i?86-*-* x86_64-*-* } && ia32 } } }
// Test for using prefix attributes in a parameter decl.
#define _stdcall __attribute__ ((__stdcall__))
typedef void (_stdcall* pfn)();
void f (void (_stdcall*) ());
void f (void (_stdcall* pfn)()); |
google | android | attrib5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C | 250 | utf_8 | 4e51fb5cf85b5f790f1be106d234035f | // { dg-do run { xfail i?86-pc-cygwin } }
// Test that attributes weak and alias coexist.
// { dg-require-weak "" }
// { dg-require-alias "" }
extern "C" {
void _f () { }
void f () __attribute__((weak, alias ("_f")));
}
int main ()
{
f ();
}
|
google | android | namedret2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/namedret2.C | 549 | utf_8 | 0dad32ef7f07deaa5a2567a7c0267130 | // { dg-do assemble { target alpha*-*-* } }
// { dg-options "-Wno-deprecated" }
// This test verifies that return type promotion is working correctly.
// The Alpha ABI specifies that 32-bit return values have bit 31 propagated,
// i.e. the value is sign-extended even if the unpromoted type is unsigned.
unsigned int... |
google | android | default | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/default.C | 409 | utf_8 | 09e867b0fab670965c20be371975da13 | // { dg-do assemble }
// PRMS Id: 5353
// This may be an extension, but it's a very common one...
extern "C" int printf (const char *, ...);
class A {
public:
static A*func (int = 3);
static A*(*ptr)(int = 4); // { dg-error "" } .*
};
A*(*A::ptr)(int) = &A::func;
int main()
{
A foo;
A::ptr(); // { dg-err... |
google | android | attrib4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/attrib4.C | 656 | utf_8 | ae9068ea19cc94f508bcfca599cf3160 | // { dg-do assemble }
// { dg-options "-Wformat" }
// Test that attributes are really applied to function declarations under
// various conditions.
#define PF __attribute__ ((format (printf, 1, 2)))
struct A {
static PF void f (const char *, ...);
static PF void g (const char *, ...) { }
static void test ();
};
... |
google | android | anon3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/anon3.C | 855 | utf_8 | 6dc1c08f311f5bdbef96fd9a1f96e2ea | // { dg-do assemble }
// Bug 2914. New types can be created in a static member
// initializer. These should not be injected into the member's class's
// scope.
class DoubleSupport
{
public:
static void toDouble();
static const double s_NaN;
static const double s_positiveInfinity;
static const double s_neg... |
google | android | addrfunc4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/addrfunc4.C | 477 | utf_8 | 42f6563911a2f8cf1b2d1047bdaf7a81 | // { dg-do run }
// { dg-options "-fms-extensions" }
// Test that an object-dependent reference to a member function can be
// used to produce a pointer to member function, as in VC++.
struct A
{
int f(int a) { return 0; }
void f(int a, int b) { }
};
typedef int (A::* pmf1)(int);
typedef void (A::* pmf2)(int, in... |
google | android | return1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/return1.C | 367 | utf_8 | 6598d77c55ae33fc757c8ea1283eb7ff | // { dg-do assemble }
// { dg-options "-Wno-deprecated" }
// Test that the named return value extension works when passed as a reference.
void f (int &i)
{
i = 42;
}
int g () return r // { dg-error "" } named return value
{
f (r); // { dg-error "" } undeclared
}
int main ()
{
int i = g ();
return (i != 42);
} |
google | android | attrib6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/attrib6.C | 396 | utf_8 | 4a3cb5f4907fc2dd61b5a428d6f2a5eb | // { dg-do assemble }
// Test that postfix attributes only apply to a single declared object.
// (decl_attributes used to chain them onto the end of the prefix attributes,
// which caused them to apply to other declarations as well.)
void __attribute__((__noreturn__)) foo (const char *, ...) __attribute__((__format__(... |
google | android | syshdr1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.ext/syshdr1.C | 232 | utf_8 | 9c864011e86a2caf368208e1cf707f09 | // { dg-do assemble }
// { dg-options "" }
// Test that we don't complain about trying to define bool or wchar_t in a
// system header.
# 1 "syshdr1.C"
# 1 "syshdr1.h" 1 3
typedef int bool;
typedef int wchar_t;
# 2 "syshdr1.C" 2
|
google | android | vbase5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/vbase5.C | 486 | utf_8 | f24cdc14a8e761a5a448f7caa08a1ecd | // { dg-do assemble }
//
// 3130. A virtual base can have canonical and non-canonical instances
// of its primary. The canonical one should be first in dfs order.
struct A
{
virtual ~A ();
};
struct B
{
virtual ~B ();
};
struct C : virtual public A, virtual public B {};
class D : public virtual C {};
class E : pu... |
google | android | vtable | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/vtable.C | 1,340 | utf_8 | 305181b858f05a2e683bd7322f635642 | // { dg-do run }
// { dg-options "-fno-strict-aliasing" }
// Test various aspects of vtable layout.
#if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
struct S0
{
virtual void h ()
{
}
int k;
};
struct S1
{
virtual void f ()
{
}
int i;
};
struct S2 : virtual public S0
{
virtual void g ()
... |
google | android | vbase8-9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/vbase8-9.C | 1,164 | utf_8 | 55753064a6448159c52e77b933d914df | // { dg-do run }
// { dg-options "-ansi -pedantic-errors -w" }
// This is case number 9
class C0
{};
class C1
: public C0
{};
class C2
: public C1
, public C0
{};
class C3
: virtual public C0
, public C2
, virtual public C1
{};
class C4
: virtual public C2
, public C0
, virtual public C3
, public C... |
google | android | vtable3j | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/vtable3j.C | 342 | utf_8 | cd547f8ebbbd2c13300e6fd29957e501 | // { dg-do run }
// { dg-additional-files "vtable3.h" }
// Check constructor vtables work.
#define B1_EMPTY
#define B2_EMPTY
#define C_EMPTY
#define C_PARENTS virtual B1, virtual B2
#include "vtable3.h" |
google | android | crash1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/crash1.C | 497 | utf_8 | cadb8d830b6294a594d395f81b7e01d7 | // { dg-do assemble }
//
// Bug 1944. We failed to calculate nearly emptiness properly, and
// lost primary too.
struct A1 {};
struct A2 {};
struct B1 : virtual A1 {};
struct B2 : virtual A2 {};
struct C1 : virtual B2 {};
struct C2 : virtual B2 {};
struct D1 : virtual C1, virtual C2 {};
struct D2 : virtual C2, virtua... |
google | android | layout1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/layout1.C | 708 | utf_8 | e915ea504ea36f4637508e741b9b2d89 | // { dg-do run }
#if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
struct R
{
virtual void r ();
};
struct S
{
virtual void f ();
};
struct T : virtual public S
{
virtual void g ();
};
struct U : public R, virtual public T
{
virtual void h ();
};
struct V : public R, virtual public S, virtual public... |
google | android | vtable3h | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/vtable3h.C | 358 | utf_8 | b86d5b2f1a0ac5ed5ff66e208411b4de | // { dg-do run }
// { dg-additional-files "vtable3.h" }
// Check constructor vtables work.
#define A_EMPTY
#define B1_EMPTY
#define B2_EMPTY
#define C_EMPTY
#define C_PARENTS virtual B1, virtual B2
#include "vtable3.h" |
google | android | mangle1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/mangle1.C | 145 | utf_8 | c620ee03e0290cf5f0d193f0774b3dc8 | // { dg-do assemble }
struct S {};
void f (void (S::*)()) {}
void f (void (S::*)() const) {} |
google | android | bitfields | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/bitfields.C | 3,668 | utf_8 | 811b66f6f326ad47076d1bf6651e452c | // { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* i?86-*-freebsd* } }
// { dg-require-effective-target ilp32 }
// { dg-options "-malign-double" }
/* Test the layout of bitfields in C aggretagtes for compliance with
the IA-64 ABI. */
#include <cstring>
template<typename T>
inline unsigned
alignmentof... |
google | android | vtable3b | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/vtable3b.C | 326 | utf_8 | 56ddac7d105a11ccda8236145c04d603 | // { dg-do run }
// { dg-additional-files "vtable3.h" }
// Check constructor vtables work.
#define B1_EMPTY
#define B2_EMPTY
#define C_EMPTY
#define C_PARENTS B1, B2
#include "vtable3.h" |
google | android | vmihint | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/vmihint.C | 1,345 | utf_8 | 445d95964ba4a777690cdf56c7f1bcb7 | // { dg-do run }
// Test rtti hint flags
#include <typeinfo>
#if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
#include <cxxabi.h>
struct A {int m;};
struct A1vA : virtual A {int m;};
struct A2vA : virtual A {int m;};
struct A1A : A {int m;};
struct A2A : A {int m;};
struct B {int m;};
struct C1 : B, virtual... |
google | android | vbase7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/vbase7.C | 590 | utf_8 | 75d3d2cb334305e3b2db0cabeb9bfcfe | // { dg-do run }
// Build don't run
//
// 3132. A virtual thunk was missing.
struct A
{
int x;
virtual ~A() {}
};
struct B
{
virtual ~B() { }
};
struct C
{
virtual ~C () {}
};
struct D : public virtual A {};
struct E : virtual public B, virtual public D {};
struct F : virtual public C, virtual public E {};
st... |
google | android | align | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/align.C | 3,446 | utf_8 | ce9ca8f244fec164cb519029110d5c74 | // { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* i?86-*-freebsd* i?86-*-darwin* } }
// { dg-require-effective-target ilp32 }
// { dg-options "-malign-double" }
/* Test the size and alignment of fundamental C types for compliance
with the IA-64 ABI. */
template<typename T>
inline unsigned
alignmento... |
google | android | vtable2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/vtable2.C | 3,891 | utf_8 | 42d4bbe5c694e1f4bc9f0d996d822c52 | // { dg-do run }
// { dg-options "-fno-strict-aliasing" }
#if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
#include <stddef.h>
struct S0
{
virtual void s0 ();
};
struct S1 : virtual public S0
{
virtual void s1 ();
};
struct S2 : virtual public S1
{
virtual void s1 ();
virtual void s0 ();
};
struct S... |
google | android | vtable3i | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/vtable3i.C | 334 | utf_8 | 009984378760d1ddf776bfd45984bc54 | // { dg-do run }
// { dg-additional-files "vtable3.h" }
// Check constructor vtables work.
#define B1_EMPTY
#define B2_EMPTY
#define C_EMPTY
#define C_PARENTS virtual B1, B2
#include "vtable3.h" |
google | android | vbase4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/vbase4.C | 2,523 | utf_8 | 7a8c83347ec272dc6fe09ae4ba3841e0 | // { dg-do run }
// Bug 3089. We ICE'd in construction vtables.
int failed;
void fail (int val)
{
if (!failed)
failed = val;
}
struct A
{
virtual ~A();
A ();
virtual void check (void *whole, void *base);
};
A::A ()
{
check (this, this);
}
A::~A ()
{
check (this, this);
}
void A::check (void *whole, voi... |
google | android | vtable3c | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/vtable3c.C | 325 | utf_8 | 94c945a522d2f7e3475e5aafd3f5219b | // { dg-do run }
// { dg-additional-files "vtable3.h" }
// Check constructor vtables work.
#define A_EMPTY
#define B2_EMPTY
#define C_EMPTY
#define C_PARENTS B1, B2
#include "vtable3.h" |
google | android | cxa_vec | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C | 5,890 | utf_8 | 777b0f6e8a27246fb901416fa7d15279 | // This test fails on VxWorks in kernel mode because it depends on the
// library version of "::operator new[]" calling the "::operator new"
// defined in this module. This doesn't work because the library version
// of "::operator new[]" is built into the kernel itself; library relocations
// are resolved when the ke... |
google | android | vbase1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/vbase1.C | 2,821 | utf_8 | 84fee86dc35b4828d76a638ec9084b6d | // { dg-do run }
// Bug 1611. Under the new ABI, the vtable can be clobbered during dtoring our
// primary vbase. We mustn't use the vtable after that to locate our vbases.
#if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
#include <stdio.h>
#include <stdlib.h>
int *ctorVBase = 0;
int *dtorVBase = 0;
int *ct... |
google | android | primary3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/primary3.C | 1,096 | utf_8 | e70f6c72d0bdb4e3f855ac85cd751b3f | // { dg-do run }
// Check primary bases are chosen correctly.
struct A {virtual void Foo () {}};
struct B1 : virtual A {};
struct B2 : virtual A {};
struct C : virtual B1, B2 {};
struct D : virtual C {};
int main ()
{
C c;
D d;
A *apc = &c;
B1 *b1pc = &c;
B2 *b2pc = &c;
A *apd = &d;
B1 *b1pd = &d;
... |
google | android | vbase2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/vbase2.C | 465 | utf_8 | 7514a6865a786af97664162d7f6693e9 | // { dg-do run }
// Bug 3006. Constructor vtables were wrong.
struct A
{
virtual ~A() {}
};
class B : public virtual A {};
class C : public virtual B {};
class D1 : public virtual C {};
class D2 : public virtual C {};
class E
: public virtual D1,
public virtual D2
{
};
int
main(int argc, char* argv[])
{
new ... |
google | android | vtable3d | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/vtable3d.C | 325 | utf_8 | 71f2b50063c96145699b0d6494715818 | // { dg-do run }
// { dg-additional-files "vtable3.h" }
// Check constructor vtables work.
#define A_EMPTY
#define B1_EMPTY
#define C_EMPTY
#define C_PARENTS B1, B2
#include "vtable3.h" |
google | android | primary5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/primary5.C | 456 | utf_8 | 6f380830639cca69801edec0c70561f2 | // { dg-do run }
// Check primary bases are chosen correctly.
struct A1
{
virtual void Foo () {}
};
struct A : A1
{
};
struct B : A
{
};
struct C : virtual B
{
};
struct D : virtual B, virtual C
{
};
int main()
{
D d;
#if __GXX_ABI_VERSION >= 100
if (sizeof (D) != sizeof (A))
return 1;
#endif
return 0;
} |
google | android | primary | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/primary.C | 1,205 | utf_8 | b8080a80cc44827c530c09fa1b9d46d7 | // { dg-do run }
// Test to see that primary bases are selected correctly.
#if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
// S1 is a nearly-empty base.
struct S1
{
virtual void f ()
{
}
};
// S2 is a dynamic, but not nearly-empty, base.
struct S2
{
virtual void g ()
{
}
int i;
};
// S1 ... |
google | android | aggregates | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/aggregates.C | 2,320 | utf_8 | 1cdb371f2e69de6a5ce47c572f798792 | // { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* i?86-*-freebsd* } }
// { dg-require-effective-target ilp32 }
// { dg-options "-malign-double" }
/* Test the data layout of C aggregates by checking aggregate size and
alignment and field offsets for compliance with the IA-64 ABI. */
template<typename... |
google | android | vbase8-5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/vbase8-5.C | 1,184 | utf_8 | aa70acbcac721d041f597b57b2ec733b | // { dg-do run }
// { dg-options "-w" }
// Bug 3145 case 5. Horribly complicated class hierarchy
class C0
{};
class C1
: virtual public C0
{};
class C2
: public C0
, virtual public C1
{};
class C3
: virtual public C0
, virtual public C2
, public C1
{};
class C4
: virtual public C0
, virtual public C2
... |
google | android | ptrflags | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/ptrflags.C | 1,443 | utf_8 | 57336bb0967886c438b9ee6c25ae18ef | // { dg-do run }
// Test rtti pointer flags
#include <typeinfo>
#if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
#include <cxxabi.h>
struct A {int m;};
struct B;
using namespace abi;
int expect (int flags, std::type_info const &info)
{
abi::__pbase_type_info const *ptr =
dynamic_cast <abi::__pbase_t... |
google | android | primary4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.abi/primary4.C | 523 | utf_8 | 9395d9e9e9319220bb7b637faff8c284 | // { dg-do run }
// Check primary bases are chosen correctly.
struct A { virtual void Foo () {}};
struct B1 : virtual A {};
struct B2 : virtual A {};
struct C : virtual B1 {};
struct D : virtual B1, B2, C {};
int main ()
{
D d;
A *ap = &d;
C *cp = &d;
#if __GXX_ABI_VERSION >= 100
if (static_cast <void *> (a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.