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 | copy7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/copy7.C | 430 | utf_8 | 696c1f641ba8cf4c76eea17b05a68e7c | // { dg-do run }
// GROUPS passed copy-ctors
extern "C" int printf (const char *, ...);
extern "C" void exit (int);
void die () { printf ("FAIL\n"); exit (1); }
class B {
public:
B() {}
B(const B &) { printf ("PASS\n"); exit (0); }
private:
int x;
};
class A : public B {
public:
A() {}
A(const B &) {... |
google | android | crash65 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash65.C | 249 | utf_8 | fef44fa88ae32d141b474c51a371aa94 | // { dg-do assemble }
// GROUPS passed old-abort
class X {
public:
virtual const char* XY(const void* val) const = 0;
};
class Y : public X {
public:
using X::xy;// { dg-error "" } no memb.*
using X::z;// { dg-error "" } no memb.*
};
|
google | android | bit-fields1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/bit-fields1.C | 103 | utf_8 | 71850593e8cd2b3b928db637dd968118 | // { dg-do assemble }
// GROUPS passed bit-fields
struct bar {
int : 2 = 1;// { dg-error "" } .*
};
|
google | android | eh1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/eh1.C | 932 | utf_8 | 7816aea321580e21cb21e2cc75fe2480 | // { dg-do run }
// { dg-options "-O" }
// PRMS Id: 10776
extern "C" int printf (const char *, ...);
class Foo
{
public:
Foo(int n) : n_(n) { }
int f() { return n_; }
int badTest();
int goodTest();
private:
int n_;
};
int Foo::badTest()
{
try {
throw int(99);
}
catc... |
google | android | misc3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/misc3.C | 227 | utf_8 | a617bb436e9c9afcf63c2d3be86658dc | // { dg-do assemble }
// GROUPS passed miscellaneous-bugs
// The compiler should not error about taking the addr of main in this example.
class fred {
private:
void main () {
}
public:
fred ( ) {
&fred::main;
}
};
|
google | android | visibility1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/visibility1.C | 260 | utf_8 | 7039de8e1bf2bf7d90d526af5db1deb2 | // { dg-do assemble }
// GROUPS passed visibility
class foo {
protected:
int i; // { dg-error "" } protected
};
class bar : public foo {
public:
friend void baz (foo *);
};
void baz (foo *f)
{
f->i = 1; // error: i is protected// { dg-error "" } .*
}
|
google | android | typedef1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/typedef1.C | 310 | utf_8 | fb83949bbd4d6e05979bbb79b91d4010 | // { dg-do assemble }
class baseClassA
{
public:
private:
class internalClassA
{
public:
private:
typedef int privateType;
privateType memberA;
};
};
class baseClassB
{
public:
private:
class internalClassA
{
public:
private:
typedef unsigned int privateType;
privateType memberB;
};
};
|
google | android | scope4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/scope4.C | 602 | utf_8 | fd539b292de5deffe84b7aca6e365824 | // { dg-do assemble }
// GROUPS passed scoping
class BitString {
public:
int i;
int length() const;
};
typedef BitString BS;
class V {
public:
class BitString {
public:
static int x(const ::BitString& value);
static int y(const class ::BitString& value); // should be parsed ok
s... |
google | android | crash45 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash45.C | 103 | utf_8 | 5021dd2b75a24615fde95aee58b2241b | // { dg-do assemble }
// GROUPS passed old-abort
void foo() { static const char *const v[] = { 0 }; }
|
google | android | crash33 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash33.C | 113 | utf_8 | 33c3ae35e83af61bf06ee581e97f8dab | // { dg-do assemble }
// GROUPS passed old-abort
extern void foo(void *);
int
main() {
foo((struct bar *)0);
}
|
google | android | enum7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/enum7.C | 170 | utf_8 | 90cae2634dbb2044ba67663b6c759a0a | // { dg-do assemble }
// GROUPS passed enums
enum color { red, green, blue, orange, brown };
struct s {
enum color field:2; // { dg-warning "too small" }
};
|
google | android | nest18 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/nest18.C | 798 | utf_8 | af8abd37d8c348f3e90a688f87da5c28 | // { dg-do assemble }
// GROUPS passed nested-classes
// This is the first line of file ||t2.C||.
// This code demonstrates what appears to be a bug with nested types.
// In C++, nested typedefs are not supposed to be visible outside
// their class scopes but they apparently are in gcc 2.4.5. This code
// compiles f... |
google | android | union2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/union2.C | 161 | utf_8 | 5dd1d150555c34f6a755013cc0af5f0a | // { dg-do assemble }
// GROUPS passed unions
class B;
struct A {
A(B* x) : i(x) {}
A() : i(0) {}
union {
B* i;
B* c;
};
};
|
google | android | misc10 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/misc10.C | 202 | utf_8 | 398f13096520b38e320833aea7adaeed | // { dg-do assemble }
// GROUPS passed miscellaneous
// The compiler shouldn't give a `invalid operands to binary +' for this
// case.
enum flag { OFF, ON };
enum BOOL { FALSE = (enum flag) 0, TRUE };
|
google | android | crash31 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash31.C | 269 | utf_8 | 6922fd3ce96d0c6d55aa7e22ca9ea835 | // { dg-do assemble }
// GROUPS passed old-abort
struct mbuf {
struct mbuf *next;
};
void* malloc(int);
struct mbuf *
mbuf_allocate(int size)
{
struct mbuf *bp;
bp = (struct mbuf *) malloc( 10 /*(unsigned) (size + sizeof(struct mbuf))*/);
return bp;
}
|
google | android | line1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/line1.C | 217 | utf_8 | b190ae3d49262822e357f9006e09d861 | // { dg-do assemble }
// GROUPS passed error-messages
typedef struct s S;// { dg-message "" } previous.*
struct S { int member:1; }; // the lineno for this should be 2, not 0// { dg-error "" } conflicting types.*
|
google | android | friend4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/friend4.C | 230 | utf_8 | 94d3ab39061fa7dd30bbab154b3bf1e4 | // { dg-do assemble }
// GROUPS passed friends
// do_friend should complain that foo was declared as a friend of
// A before A was defined
struct A; // { dg-error "forward" }
struct B { friend A::foo (); };// { dg-error "" } .*
|
google | android | ptrmem1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/ptrmem1.C | 357 | utf_8 | 9393209c77dd45bd002437c27c5920e4 | // { dg-do assemble }
// GROUPS passed pointers-to-members
class my_class
{
public:
typedef void func_type (int num);
my_class (int num, func_type* proc);
void dispatch (void);
private:
int _num;
func_type *_proc;
};
my_class::my_class (int num, func_type* proc) : _num(num), _proc(proc)
{
}
void my_class... |
google | android | template22 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/template22.C | 290 | utf_8 | 331b872c84ae0b83cf60a5e245c5389d | // { dg-do run }
// GROUPS passed templates
extern "C" int printf (const char *, ...);
template <class T>
class Foo
{
public:
void func (int const& i);
};
template <class T>
void Foo<T>::
func (int const& i)
{}
int main ()
{
Foo<int const> foo;
printf ("PASS\n");
return 0;
}
|
google | android | enum2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/enum2.C | 276 | utf_8 | 776648f2fef522a6e4680ce5f119697c | // { dg-do assemble }
// GROUPS passed enums
class foo {
public:
enum bar { baz = 1, bat = 7 };
};
class foo2 {
public:
enum bar2 { baz2 = 1, bat2 = 7 };
};
class derv : public foo, public foo2 { };
int main()
{
foo::bar x = foo::baz;
derv::bar2 y = derv::bat2;
}
|
google | android | copy2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/copy2.C | 933 | utf_8 | f42dec6fcfdaae71455d2102182a896f | // { dg-do run }
// GROUPS passed copy-ctors
/*
The old g++ output is
Item()
Compound()
Pre foo
foo
~Compound()
~Item()
Post foo
~Compound()
~Item()
The output should be something like (produced from ATT 2.1)
Item()
Compound()
Pre foo
Item(const Item& i) <------ missing above
foo
~Compound()
~Item()
Post foo
~Co... |
google | android | redecl2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/redecl2.C | 843 | utf_8 | e2e8fdf313b5b763652b98d52b6fd29f | // { dg-do run }
// GROUPS passed redeclaration
// Check that if multiple declarations of the same single
// function are present in different places in the same file,
// and if these declarations differ (as allowed) in the number
// of argument defaults provided, that correct values are
// passed at all call points a... |
google | android | misc9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/misc9.C | 585 | utf_8 | f86b0e544d5f1025664f2856ea4e776d | // { dg-do assemble }
// GROUPS passed miscellaneous
//The program listed below produces the following error during compilation:
// % g++ bug17.cc
// bug17.cc: In method `class Y& Y::operator = (const class Y&)':
// bug17.cc:18: invalid use of non-lvalue array
class X {
public:
X& operator=(const X&) { retur... |
google | android | visibility6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/visibility6.C | 258 | utf_8 | 1914475b1bdf83ff9a257461ae04068e | // { dg-do assemble }
// GROUPS passed visibility
class bottom
{
public:
int b; // { dg-error "" } private
};
class middle : private bottom
{
public:
void foo () { b; }
};
class top : public middle
{
public:
void bar () { b; }// { dg-error "" } .*
};
|
google | android | copy9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/copy9.C | 709 | utf_8 | ebcf953de22d960ed17d4f132adceedc | // { dg-do run }
// GROUPS passed copy-ctors
#include <iostream>
// token types: from state parser
const int T_EOF = 257;
const int T_ERROR = 258;
const int T_Float = 259;
const int T_Int = 260;
const int T_ID = 261;
const int T_STRING = 262;
class Complex;
class State;
// token, from state parser.
class ParseToken... |
google | android | def-args1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/def-args1.C | 173 | utf_8 | 54f8d1fdf6f6cf1c18071d286afe93f1 | // { dg-do assemble }
// PRMS Id: 10860
class Beige
{
public:
static int yellow();
void white(int green = yellow());
void aqua(int green = Beige::yellow());
};
|
google | android | crash24 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash24.C | 611 | utf_8 | 207fe563f561496a1ca248b198318d28 | // { dg-do assemble }
// { dg-options "-O" }
// GROUPS passed old-abort
// gcc puts the array into a register, and then the store_bit_field () code
// in expmed.c gets confused when it tries to store zero past the end of the
// register (because the index is past the array bounds). It ends up calling
// store_split_... |
google | android | crash41 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash41.C | 154 | utf_8 | d5ee940012af3122df1f0a9b46ec0691 | // { dg-do assemble }
// GROUPS passed old-abort
typedef void (**ppfn)(void);
int main() {
ppfn fn;
fn = new (void(*)(void));
return 0;
}
|
google | android | warnings6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/warnings6.C | 247 | utf_8 | e1559a268a2d660793c81efda0d06780 | // { dg-do assemble }
// { dg-options "-O2 -Wall -ansi -pedantic" }
// GROUPS passed warnings
// should not emit this warning about func:
// x.C:2: warning: invalid storage class for function `func'
//
template <class T> inline void func(T)
{
}
|
google | android | init9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/init9.C | 272 | utf_8 | 0f0122e77a799ed8e3fc9e03da38cb59 | // { dg-do assemble }
// GROUPS passed initialization
int FALSE = 0;
class X {
public:
static int FALSE;
};
// The compiler should NOT complain about redeclaration of the global
// `FALSE' with this declaration...grokvardecl shouldn't be doing that.
int X::FALSE = 0;
|
google | android | visibility7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/visibility7.C | 214 | utf_8 | f972156231f09f8f3f84584c5eef280f | // { dg-do assemble }
// GROUPS passed visibility
class X
{
public:
void fn ();// { dg-error "" } .*
};
class Y : private X
{};
class Unrelated
{
public:
void foo () { Y y; y.fn (); }// { dg-error "" } .*
};
|
google | android | crash39 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash39.C | 711 | utf_8 | 2e312fb3ecdee7d2802bc5d63bafaf95 | // { dg-do assemble }
// { dg-options "-w" }
// GROUPS passed old-abort
//#include <GetOpt.h>
#include <stdio.h>
class GetOpt
{
private:
static char *nextchar;
enum OrderingEnum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER };
OrderingEnum ordering;
static int first_nonopt;
static int last_nonopt;
void exch... |
google | android | crash48 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash48.C | 604 | utf_8 | cee3e5035480d373c0be379e3061d191 | // { dg-do compile }
// GROUPS passed old-abort
class internal { // { dg-message "internal::internal|candidate expects|no known conversion" }
int field;
int anotherfield;
};
class bug { // { dg-message "bug::bug|candidate expects" }
internal* numbers;
bug(int size);
};
bug::bug(int size) // { dg-message "bug::bug... |
google | android | misc17 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/misc17.C | 859 | utf_8 | c6dde39d37d2cab8d05e481b356b539b | // { dg-do assemble }
// GROUPS passed miscellaneous-bugs
typedef int va_list;
class ostream;
class String {
public:
operator const char *() const;
};
class FwtErrorManager {
public:
FwtErrorManager(ostream& err, const char *program);
public:
void form(const char *format, ...);
protected:
const String _pro... |
google | android | crash46 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/crash46.C | 389 | utf_8 | 04ce4fbaa4f8ef72247f66f12db00ef1 | // { dg-do assemble }
// GROUPS passed old-abort
class Rational {
public:
Rational(int v): value(v)
{ }
int value;
};
typedef Rational __Rational;
extern int operator>(const Rational&, const Rational&);
class V {
public:
class Rational {
public:
static int x(const __Rational& value);
};
};
i... |
google | android | nest4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/nest4.C | 218 | utf_8 | 4811561ff30dbc1a325e8ace167fef89 | // { dg-do assemble }
// { dg-options "-pedantic-errors" }
// GROUPS passed nested-classes
class vec {
class blah { };
::vec::blah satan( 0);// { dg-error "" } .*
blah herman( 0);// { dg-error "" } .*
};
|
google | android | err-msg4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/err-msg4.C | 267 | utf_8 | 574b1869eeecbbe7e35891192119aae1 | // { dg-do assemble }
// GROUPS passed error-messages
class X {
public:
static int x;// { dg-message "" } previous.*
static int y;// { dg-message "" } previous.*
};
unsigned X::x;// { dg-error "" } conflict.*
unsigned X::y;// { dg-error "" } conflict.*
|
google | android | visibility8 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/visibility8.C | 334 | utf_8 | 39924637e7e7ef40764e478c625a4383 | // { dg-do assemble }
// GROUPS passed visibility
// Make sure private inheritance affects the visibility of
// static members used in an inherited context.
class foo
{
public:
static int y; // { dg-error "" } private
};
class foo1 : private foo
{ };
class foo2 : public foo1
{ public:
void bar () { y; }// { dg-err... |
google | android | ctors1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/ctors1.C | 448 | utf_8 | ef0c32aa9cb62fa23978bbf6604a9c13 | // { dg-do run }
// GROUPS passed constructors
// Check that global level object constructors get called.
extern "C" int printf (const char *, ...);
struct base {
int f1;
int f2;
base (int arg1, int arg2);
};
base global_base(0x55, 0xff);
int main ()
{
if ((global_base.f1 != 0x55) || (global_base.f2 != 0xff)... |
google | android | catch3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch3.C | 2,629 | utf_8 | d4c0ba3d45a00d15821ab3121af637c5 | // { dg-do run }
// { dg-options "-w" }
// We cannot catch an ambiguous base class. Check with a non-virtual public
// DAG.
// -- public, << private, == virtual
// D--B--A
// +--C--A
struct A { int m; };
struct B : A { int m; };
struct C : A { int m; };
struct D : B, C { int m; };
void fna(A *obj) { throw obj; }
void ... |
google | android | tmpl5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/tmpl5.C | 178 | utf_8 | ea01e485e96a2b4fc269ec88d516498b | // { dg-do assemble }
template <class T = int>
struct S
{
void f ()
{
try {
} catch (int) {
}
}
}; |
google | android | catch8p | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch8p.C | 2,496 | utf_8 | f53033f53b20e92e0c7776246dec74d0 | // { dg-do run }
// { dg-options "-w" }
// We cannot catch an ambiguous base class.
// -- public, << private, == virtual
// D--B--A
// +--C<<A
struct A { int m; virtual ~A(){}};
struct B : A { int m; };
struct C : private A { int m; };
struct D : B, C { int m; };
void fna(A *obj) { throw obj; }
void fnb(B *obj) { thro... |
google | android | catch1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch1.C | 418 | utf_8 | f9b83360c3e457b4d7a952e5cfea8d08 | // { dg-do assemble }
//
// We cannot catch an incomplete type, or ptr to one
struct A; // { dg-error "" } forward decl
void fn()
{
try {}
catch (A *p) {} // { dg-error "" } undefined type
try {}
catch (A p) {} // { dg-error "" } undefined type
try {}
catch (void const *p) {} // ok
} |
google | android | crash1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/crash1.C | 210 | utf_8 | 5465c867aef7fe0b375e0b733300bc1b | // { dg-do assemble }
// { dg-options "-O1 -fno-inline-functions" }
struct A
{
~A ();
};
bool foo ();
int i;
int j;
A bar ()
{
for (i = 0; i < 1; ++i)
if (j)
{
A tmp;
return tmp;
}
}
|
google | android | rethrow4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/rethrow4.C | 638 | utf_8 | 34717a940f38a3059d5e85f5417dfc31 | // { dg-do run }
// Testcase for proper handling of rethrow.
#include <stdio.h>
int c, d;
struct A
{
int i;
A () { i = ++c; printf ("A() %d\n", i); }
A (const A&) { i = ++c; printf ("A(const A&) %d\n", i); }
~A() { printf ("~A() %d\n", i); ++d; }
};
int
main ()
{
try
{
try
{
printf ("Throwi... |
google | android | catch13 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch13.C | 303 | utf_8 | 6a61b8e436a8ce420adde9146b5c36df | // { dg-do assemble }
// { dg-options "-O2" }
struct A;
A *foo();
struct A {
A *a() { try { return foo(); } catch (...) {} }
void b();
void c();
};
void A::b() {
a()->c();
} |
google | android | new2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/new2.C | 825 | utf_8 | 2791364aa04d58e8598a7d41b4c3c40d | // { dg-do run }
// Test that a throw in B's constructor destroys the A and frees the memory.
// Avoid use of none-overridable new/delete operators in shared
// { dg-options "-static" { target *-*-mingw* } }
#include <cstddef>
#include <cstdlib>
#include <new>
struct A {
A();
~A();
};
struct B {
B (A);
};
vo... |
google | android | catch11 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch11.C | 1,125 | utf_8 | a83d60c4fb96f4454d525c1e8b6a33a7 | // { dg-do run }
// we should be able to catch a base a virtual, provided it is accessible by at
// least one public path
// -- public, << private, == virtual
// E<<B==A
// +--C==A
// +<<D==A
struct A {};
struct B : virtual A {};
struct C : virtual A {};
struct D : virtual A {};
struct E : private B, public C, private... |
google | android | catch5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch5.C | 3,548 | utf_8 | a71ea0d01a33b5b4e9fb212065f0ee4c | // { dg-do run }
// { dg-options "-w" }
// We cannot catch an ambiguous base class.
// -- public, << private, == virtual
// D--B==A
// +--C==A
// +--AA-A
struct A { int m; };
struct B : virtual A { int m; };
struct C : virtual A { int m; };
struct AA : A { int m; };
struct D : B, C, AA { int m; };
void fna(A *obj) { t... |
google | android | catch4p | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch4p.C | 2,508 | utf_8 | f76e4f74d7a5922b67ca155ccb12af53 | // { dg-do run }
// { dg-options "-w" }
// We cannot catch an ambiguous base class. Check with a virtual
// polymorphic public DAG.
// -- public, << private, == virtual
// D--B==A
// +--C==A
struct A { int m; virtual ~A(){}};
struct B : virtual A { int m; };
struct C : virtual A { int m; };
struct D : B, C { int m; }... |
google | android | catchptr1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catchptr1.C | 3,051 | utf_8 | e04cf950955ebdaeda17f9fc71317cc7 | // { dg-do run }
// Test pointer chain catching
#include <stdio.h>
void fn () {}
struct A {void fn () {}};
static int var = 1;
static const int const_var = 2;
struct B;
struct C;
int test0 ()
{
try
{
throw &fn;
}
catch (void *)
{
// should not decay to void *
return 1;
}
catch (... |
google | android | catch10 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch10.C | 461 | utf_8 | 1e641d82ee233ceda2ae0ab2028661f9 | // { dg-do assemble }
// Test that we notice unfortunate handler ordering.
struct A { };
struct B: public A { };
struct C: private A { };
void f();
void g()
{
try { f(); }
catch (...) { } // { dg-error "" } ... followed by others
catch (A*) { }
try { f(); }
catch (A*) { } // { dg-warning "" } A* before ... |
google | android | catch12 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch12.C | 1,188 | utf_8 | 22f50aa9e05125f9a73411eeae9cd099 | // { dg-do run }
// we should be able to catch a base a virtual, provided it is accessible by at
// least one public path
// -- public, << private, == virtual
// E--B<<==A
// +--C--==A
// +--D<<==A
struct A {};
struct B : private virtual A {};
struct C : virtual A {};
struct D : private virtual A {};
struct E : public... |
google | android | tmpl6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/tmpl6.C | 199 | utf_8 | fefbac87316860d887029e17e36d1d08 | // { dg-do assemble }
struct S
{
int i;
};
template <class T>
void f ()
{
try {
} catch (S& s) {
s.i = 3;
}
}
template void f<int>(); |
google | android | spec6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/spec6.C | 5,905 | utf_8 | 50c207d03ac72984b056af6422525dab | // { dg-do assemble }
// Determine that throw specifiers are checked correctly.
// [except.spec] 1, a type in an exception specifier shall not be incomplete,
// or pointer or ref to incomplete
struct X; // { dg-error "" } forward declaration.*
void fn1() throw(X); // { dg-error "" ... |
google | android | spec7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/spec7.C | 277 | utf_8 | 1686e3d422e36e72d9253483d71d76dd | // { dg-do run }
// Test that we allow simple throw specs on pointers.
void f() throw () { }
void (*pf)() throw () = f;
struct A
{
void g() throw () { }
static void (A::*pmf)() throw ();
};
void (A::* A::pmf)() = &A::g;
int main()
{
pf ();
A a;
(a.*A::pmf)();
}
|
google | android | rethrow5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/rethrow5.C | 621 | utf_8 | b08fe5424b926c4b2ba51c914a22ebd3 | // { dg-do run }
// Testcase for proper handling of rethrow.
#include <stdio.h>
int c, d;
struct A
{
int i;
A () { i = ++c; printf ("A() %d\n", i); }
A (const A&) { i = ++c; printf ("A(const A&) %d\n", i); }
~A() { printf ("~A() %d\n", i); ++d; }
};
int
main ()
{
try
{
try
{
printf ("Throwi... |
google | android | inline1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/inline1.C | 345 | utf_8 | 039eb5ce59747bf780d3040d05a5b84f | // { dg-do assemble }
// { dg-options "-ansi -pedantic-errors -O2" }
struct Foo
{
inline ~Foo ();
};
inline void Wibble (int) throw ()
{
}
inline Foo::~Foo ()
{
Wibble (6);
}
int ExtendFoos ()
{
Foo tmp;
return 0;
} |
google | android | cleanup1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/cleanup1.C | 617 | utf_8 | ee2dd570f0862f7f990dbd673349a664 | // { dg-do run }
// Bug: obj gets destroyed twice because the fixups for the return are
// inside its cleanup region.
#ifdef __GXX_EXPERIMENTAL_CXX0X__
#define NOEXCEPT_FALSE noexcept (false)
#else
#define NOEXCEPT_FALSE
#endif
extern "C" int printf (const char *, ...);
int d;
struct myExc { };
struct myExcRaiser... |
google | android | rethrow1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/rethrow1.C | 638 | utf_8 | 14439300d0eacee555d7a12aeba4e6b8 | // { dg-do run }
// Testcase for proper handling of rethrow.
#include <stdio.h>
int c, d;
struct A
{
int i;
A () { i = ++c; printf ("A() %d\n", i); }
A (const A&) { i = ++c; printf ("A(const A&) %d\n", i); }
~A() { printf ("~A() %d\n", i); ++d; }
};
int
main ()
{
try
{
try
{
printf ("Throwi... |
google | android | vbase4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/vbase4.C | 596 | utf_8 | 01f7195df499dc15c0d0dfbe87e33fab | // { dg-do run }
// Derived from PR#7
// We need to destroy the thrown object when exiting the catch
// clause. That needs to destroy the original thrown object, not
// the caught one (which might be a base).
static int ok = 0;
struct A
{
A (){}
virtual ~A () {}
};
struct B : virtual A
{
int value;
B ()
:v... |
google | android | crash4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/crash4.C | 214 | utf_8 | 328c615c13278b502e18b7a38ea32810 | // { dg-do assemble }
// { dg-options "-O2" }
struct A
{
A (int) { }
~A () { }
int get () const { return 0; }
};
void f (const A &s) {
f (s.get ());
} |
google | android | ia64-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/ia64-1.C | 1,667 | utf_8 | 61d2aa8a2e535da0c60a9ce1a83a3357 | // { dg-do run }
// { dg-options "-O2" }
#include <exception>
using namespace std;
extern "C" void abort();
int i_0, i_1, i_2, i_3, i_4, i_5, i_6, i_7, i_8, i_9;
int j_0, j_1, j_2, j_3, j_4, j_5, j_6, j_7, j_8, j_9;
int k_0, k_1, k_2, k_3, k_4, k_5, k_6, k_7, k_8, k_9;
int l_0, l_1, l_2, l_3, l_4, l_5, l_6, l_7, l... |
google | android | catch8 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch8.C | 2,459 | utf_8 | 4b044e61d0b42f90c9174dd04acc1df0 | // { dg-do run }
// { dg-options "-w" }
// We cannot catch an ambiguous base class.
// -- public, << private, == virtual
// D--B--A
// +--C<<A
struct A { int m; };
struct B : A { int m; };
struct C : private A { int m; };
struct D : B, C { int m; };
void fna(A *obj) { throw obj; }
void fnb(B *obj) { throw obj; }
void ... |
google | android | catch2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch2.C | 139 | utf_8 | 3324d129f93366b1521e80f1d4b9bdd6 | // { dg-do assemble }
typedef char TCHAR;
int main()
{
try {}
catch( TCHAR* Err ) {}
} |
google | android | terminate2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/terminate2.C | 248 | utf_8 | e119c0abf28a26060ddb1897af1b2f33 | // { dg-do run }
// Test that an unhandled exception causes us to call terminate.
#include <exception>
#include <cstdlib>
void my_terminate ()
{
std::exit (0);
}
int main (void)
{
std::set_terminate (my_terminate);
throw 1;
return 1;
}
|
google | android | vbase1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/vbase1.C | 284 | utf_8 | 52161bf0667ab5bb0976ef620f54a3e7 | // { dg-do run }
int i;
int j;
struct B
{
B() { i = 1; }
~B() { j = 7; }
};
struct D : virtual public B {
D () { throw 3; }
};
int main ()
{
try {
D d;
} catch (int) {
if (i != 1 || j != 7)
return 1;
}
} |
google | android | flow1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/flow1.C | 252 | utf_8 | 69dc075b8772cb01d011939a1a0896fb | // { dg-do run }
#include <stdio.h>
int bar ()
{
throw 100;
return 0;
}
int main ()
{
int i = 0; // this gets deleted after flow analysis
try
{
i = bar ();
}
catch (...)
{
}
printf ("i = %d\n", i);
return i;
}
|
google | android | spec3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/spec3.C | 528 | utf_8 | a8575b670854fb806d0acdc9fea626a3 | // { dg-do run }
// Testing exception specifications.
// Test 3: the bad_exception throw succeeds.
#include <stdlib.h>
#include <exception>
void my_term () { exit (1); }
void my_unexp () { throw 42; }
void
f () throw (std::bad_exception)
{
throw 'a';
}
int main ()
{
std::set_terminate (my_term);
std::set_un... |
google | android | crash2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/crash2.C | 366 | utf_8 | 1604e9f615755f1d4b2fbb38669a2a74 | // { dg-do assemble }
// { dg-options "-O" }
struct C {
~C();
};
struct R {
bool empty() const;
C m_;
};
struct R1 {
R1( const R& a );
~R1 ();
C m_;
};
R1 get_empty();
R1::R1( const R& a ) :
m_( a.empty() ? get_empty().m_ : C() )
{}
void qnorm( const R & r)
{ R1 n( r ); } |
google | android | pdel1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/pdel1.C | 377 | utf_8 | dcd0f11cabbfb7e54d51c61ccdd6c00e | // { dg-do run }
// Test for calling placement delete.
#include <new>
#include <stddef.h>
int r = 1;
struct A {
A() { throw 1; }
void operator delete (void *p, int, int) { r = 0; ::operator delete (p); }
};
void * operator new (size_t size, int, int) { return operator new (size); }
int main ()
{
try {
A... |
google | android | rethrow2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/rethrow2.C | 634 | utf_8 | 95550e7ef609ae5195a6a1e6cc4baa59 | // { dg-do run }
// Testcase for proper handling of rethrow.
#include <stdio.h>
int c, d;
struct A
{
int i;
A () { i = ++c; printf ("A() %d\n", i); }
A (const A&) { i = ++c; printf ("A(const A&) %d\n", i); }
~A() { printf ("~A() %d\n", i); ++d; }
};
int
main ()
{
try
{
try
{
printf ("Throwi... |
google | android | vbase2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/vbase2.C | 311 | utf_8 | 29c8219607403d8ae6a93ba3cc8bbfd5 | // { dg-do run }
int i;
struct A
{
A () { i++; }
~A () { i--; }
};
struct B : public virtual A
{
B () { throw 1; }
};
struct D: public B, virtual public A
{
};
void f()
{
D d;
}
int main ()
{
try {
f();
} catch (int) {
}
return i;
} |
google | android | crash5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/crash5.C | 133 | utf_8 | 6f112400ec69874c71a11839a262eb16 | // { dg-do assemble }
int i;
int j;
void
f ()
{
j = j + (i ? 7 : throw 1);
}
|
google | android | tmpl2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/tmpl2.C | 411 | utf_8 | 10ba7935836a909b4eeef0ac2a8431b5 | // { dg-do assemble }
// { dg-options "-O" }
template<class T>
class FixSeq
{
public:
void append(const T&);
};
class foo
{
public:
void setupIR();
};
typedef FixSeq<foo *> bar;
extern void dummy (foo *);
void *
foobar (bar &x, foo *p)
{
try
{
p -> setupIR();
}
catch(...)
{
... |
google | android | inline2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/inline2.C | 324 | utf_8 | 1f10a9c93f1ab6845ba1a02819abf154 | // { dg-do run }
// { dg-options "-O" }
// Test that inlining a destructor with a catch block doesn't confuse the
// enclosing try block.
struct A {
~A()
{
try { throw 1; }
catch (...) { }
}
};
int main ()
{
try
{
A a;
throw 42;
}
catch (int i)
{
return (i != 42);
... |
google | android | spec5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/spec5.C | 64 | utf_8 | 6661bd6d7f84a5facb2e16615b994483 | // { dg-do assemble }
extern void *f(unsigned int k) throw();
|
google | android | crash3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/crash3.C | 291 | utf_8 | 739c732403e3a10677bc952248d7b3cf | // { dg-do assemble }
// Used to use -fsjlj-exceptions, but that isn't an option anymore.
extern double f(double a);
void
a()
{
double e;
double value;
if (e == 0)
throw 1;
value = f(e);
} |
google | android | catch7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch7.C | 4,259 | utf_8 | fb1572d0a22c1c07bc651b89054e61f2 | // { dg-do run }
// { dg-options "-w" }
// We cannot catch an ambiguous base class.
// -- public, << private, == virtual
// different levels
// F--D--B--A
// +--C--A
// +--E--A
struct A { int m; };
struct B : A { int m; };
struct C : A { int m; };
struct D : B, C { int m; };
struct E : A { int m; };
struct F : D, E... |
google | android | pdel2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/pdel2.C | 393 | utf_8 | e1c4cc132ea9728d91e30c0754ea6300 | // { dg-do run }
// Test for not calling mismatched placement delete.
#include <new>
#include <stddef.h>
int r = 0;
struct A {
A() { throw 1; }
void operator delete (void *p, int, long) { r = 1; ::operator delete (p); }
};
void * operator new (size_t size, int, int) { return operator new (size); }
int main ()... |
google | android | catch14 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch14.C | 404 | utf_8 | 9d8e8ea3328cf56e911bdfa42b0fa662 | // { dg-do assemble }
// { dg-options "-O1" }
void foo();
struct A {
A (int x) { };
~A() {
try {
foo ();
} catch (...) { }
};
};
struct B;
B *x;
struct B {
void a();
void b();
static B* c() {
A y = 0;
return x;
};
};
void B::a() {
c()->b();
} |
google | android | crash6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/crash6.C | 493 | utf_8 | c80d5660b1728bc2ac055847f51343bc | // { dg-do assemble }
//
// Bug 2368. When checking shadowed catchers, we didn't ignore
// template type parms etc, leading to an ICE
template<class CatchType1, class CatchType2>
void call(int& a)
{
try
{
}
catch (CatchType1&)
{
}
catch (CatchType2&)
{
}
} |
google | android | catch6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch6.C | 4,377 | utf_8 | a36acf1ee545471cf23048b2e8a2df6b | // { dg-do run }
// { dg-options "-w" }
// We cannot catch an ambiguous base class.
// -- public, << private, == virtual
// E==D--B==A
// +--C==A
// +--AA-A
struct A { int m; };
struct B : virtual A { int m; };
struct C : virtual A { int m; };
struct AA : A { int m; };
struct D : B, C, AA { int m; };
struct E : ... |
google | android | spec4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/spec4.C | 514 | utf_8 | 0000aedd1cb7d3fa4ce75d4e5e1f7e03 | // { dg-do run }
// Testing exception specifications.
// Test 4: all throws fail, call terminate.
#include <stdlib.h>
#include <exception>
void my_term () { exit (0); }
void my_unexp () { throw 42; }
void
f () throw (short)
{
throw 'a';
}
int main ()
{
std::set_terminate (my_term);
std::set_unexpected (my_u... |
google | android | new1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/new1.C | 764 | utf_8 | ec48f1b1b9cb65b917450299c74f997e | // { dg-do run }
// Test that a throw in foo destroys the A, but does not free the memory.
// Avoid use of none-overridable new/delete operators in shared
// { dg-options "-static" { target *-*-mingw* } }
#include <cstddef>
#include <cstdlib>
#include <new>
struct A {
A();
~A();
};
struct B {
B (A);
};
void ... |
google | android | badalloc1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C | 2,957 | utf_8 | a1c6dc9641c32c8bf7ce6bbfb1d1e58e | // This fails for VxWorks RTPs because the initialization of
// __cxa_allocate_exception's emergency buffer mutex will
// itself call malloc(), and will fail if there is no more
// memory available.
// { dg-do run { xfail { { xstormy16-*-* *-*-darwin[3-7]* } || vxworks_rtp } } }
const int arena_size = 262144;
#else
con... |
google | android | rethrow3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/rethrow3.C | 503 | utf_8 | 12e5b71c334940b1fa0faec9ac801e8f | // { dg-do run }
#include <stdio.h>
#include <stdlib.h>
#include <exception>
static void
eh_terminate ()
{
printf ("CALLING TERMINATE\n");
exit (1);
}
void
eh_test (int level)
{
try
{
if (level < 2)
eh_test (level + 1);
else
{
printf ("%d: Throwing\n", level);
throw (level);
}
}
... |
google | android | unwind1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/unwind1.C | 319 | utf_8 | 9bca9f25779ab51cf9eb8a105e239597 | // { dg-do run }
// Test that unwinding properly restores SP.
void f (int i)
{
throw i;
}
int main ()
{
void *sp1 = __builtin_alloca (0);
try
{
f (0);
}
catch (int)
{
}
void *sp2 = __builtin_alloca (0);
return (sp1 != sp2);
} |
google | android | throw1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/throw1.C | 129 | utf_8 | 5670e8b41fe518da30777cff2b48b76f | // { dg-do assemble }
void athrow(const int & e) throw(int)
{
throw e;
}
int main(void)
{
athrow(int());
return 0;
}
|
google | android | ptr1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/ptr1.C | 372 | utf_8 | b785622dc330cbfc73460329d254e2ed | // { dg-do run }
// Bug: catching pointers by reference doesn't work right.
extern "C" int printf (const char *, ...);
struct E {
int x;
E(int i) { x = i; }
};
int main()
{
try {
E *p = new E(5);
throw p;
}
catch (E *&e) {
printf ("address of e is 0x%lx\n", (__SIZE_TYPE__)e);
return !((__... |
google | android | catch4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch4.C | 2,481 | utf_8 | 633708e13e461fa275be7a0b1b690d9c | // { dg-do run }
// { dg-options "-w" }
// We cannot catch an ambiguous base class. Check with a virtual public
// DAG.
// -- public, << private, == virtual
// D--B==A
// +--C==A
struct A { int m; };
struct B : virtual A { int m; };
struct C : virtual A { int m; };
struct D : B, C { int m; };
void fna(A *obj) { throw ... |
google | android | spec2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/spec2.C | 526 | utf_8 | 9189513b7373fcafd70354c0feffe753 | // { dg-do run }
// Testing exception specifications.
// Test 2: the second throw succeeds.
#include <stdlib.h>
#include <exception>
void my_term () { exit (1); }
void my_unexp () { throw 42; }
void
f () throw (int, std::bad_exception)
{
throw 'a';
}
int main ()
{
std::set_terminate (my_term);
std::set_unex... |
google | android | tmpl3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/tmpl3.C | 188 | utf_8 | 6d0c3812ec0559cc3638491900029f8e | // { dg-do assemble }
template<class T> struct A {
void X() throw(T);
};
template<class T>
inline void A<T>::X()
throw(T) { } |
google | android | terminate1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/terminate1.C | 479 | utf_8 | 7d55190d2961ccde4c57bde2d6e6b4cd | // { dg-do run }
// Test that an exception thrown out of the constructor for the catch
// parameter (i.e. "after completing evaluation of the expression to be thrown
// but before the exception is caught") causes us to call terminate.
#include <exception>
#include <cstdlib>
void my_terminate ()
{
std::exit (0);
}
... |
google | android | tmpl1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/tmpl1.C | 146 | utf_8 | bfcd96a6be46cd19e464b5a874591ba6 | // { dg-do run }
template <class T>
void f() throw (T)
{
throw 7;
}
int main()
{
try {
f<int>();
} catch (...) {
return 0;
}
}
|
google | android | ctor1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/ctor1.C | 429 | utf_8 | a78322b7e2b26371f6af9224358067a2 | // { dg-do assemble }
struct A
{
A(); // { dg-message "A::A|candidate expects" } candidate
A(A&); // { dg-message "A::A|no known conversion" } referenced below
};
int
main ()
{
try
{
throw A(); // { dg-error "no matching" "match" } can't copy
// { dg-message "candidate" "candidate note" { ... |
google | android | catch6p | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch6p.C | 4,391 | utf_8 | 959f98c90792e99105ba3cc5ac5cf39b | // { dg-do run }
// { dg-options "-w" }
// We cannot catch an ambiguous base class.
// -- public, << private, == virtual
// E==D--B==A
// +--C==A
// +--AA-A
struct A { int m; virtual ~A(){}};
struct B : virtual A { int m; };
struct C : virtual A { int m; };
struct AA : A { int m; };
struct D : B, C, AA { int m; ... |
google | android | tmpl4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/tmpl4.C | 167 | utf_8 | 10467f823d0bb353512055f6c0547e95 | // { dg-do assemble }
template <class T> void test(){
try {
}
catch(int x){
}
}
template void test<int>(); |
google | android | catch3p | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch3p.C | 2,650 | utf_8 | e29f056220140463c6ac35c897fd3486 | // { dg-do run }
// { dg-options "-w" }
// We cannot catch an ambiguous base class. Check with a non-virtual
// polymorphic public DAG.
// -- public, << private, == virtual
// D--B--A
// +--C--A
struct A { int m; virtual ~A(){}};
struct B : A { int m; };
struct C : A { int m; };
struct D : B, C { int m; };
void fna(A ... |
google | android | spec1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/spec1.C | 538 | utf_8 | 48f9e05c20869ab203537dfe4e333f61 | // { dg-do run }
// Testing exception specifications.
// Test 1: the original exception succeeds.
#include <stdlib.h>
#include <exception>
void my_term () { exit (1); }
void my_unexp () { throw 42; }
void
f () throw (char, int, std::bad_exception)
{
throw 'a';
}
int main ()
{
std::set_terminate (my_term);
s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.